Pedicle Screw Trajectory Model
Dual-view CT regression model with Core ML export for on-device use
Typeclient
Statusprototype
Updated2026-02-19
SourcePrivate
What it is
A PyTorch pipeline for a medical-device client that predicts pedicle screw trajectories from two CT views. Two ResNet18 encoders (axial and lateral, one channel each) feed a small regression head that outputs eight values: entry point and direction in each view. The folder includes dataset loading, training, evaluation with versioned runs, and a Core ML converter.
The problem
Surgeons plan screw trajectories by hand from CT views; this explores predicting them automatically.
How it works
- DualViewRegressor uses two ImageNet-pretrained ResNet18 encoders adapted to one-channel input, concatenating 1024 features into a 256-unit head with 8 outputs.
- The dataset is per-case axial.png, lateral.png and label.json folders, with optional per-vertebra-level grouping.
- train.py, evaluate.py and version.py handle runs and best-checkpoint selection.
- convert_coreml.py exports the trained checkpoint to Core ML for iPhone inference.
Stack
PythonPyTorchtorchvisionCore ML ToolsNumPyPillow
Disciplines
For your business
Custom computer-vision regression models trained on a client's images and packaged for on-device deployment.