How azamat1ch/rsna-knee-2nd-place works
This repository implements a competition pipeline for detecting 12 knee MRI abnormalities. At inference, the prediction runner prepares and validates the deployment, runs four core model members and optional specialists, then produces a rank-weighted submission. The package also supports DICOM preprocessing, training, and report/image-derived labels; the external reader and PF specialist provide separate model paths. The README documents the prediction and blend workflow, while source excerpts show selected preprocessing and model-input details. Several training and inference components are unsampled, so their internal links are omitted where not evidenced.
Main entry points: infer.py Core inference · predict.py Prediction runner · tiles.py Crop inputs · windows.py Window inputs
Components 21
MRI inputs
- Competition data
Core inference
- Prediction runner
predict.py - DICOM decoding
knee/dicom.py - Series selection
knee/series.py - Knee centering
knee/centre.py - Crop inputs
knee/tiles.py - Window inputs
knee/windows.py - Core models
knee/models.py - Core inference
knee/infer.py
Specialist models
- Reader members
knee/external.py - Reader inference
external/reader/infer_c.py - PF specialist
external/v731/kaggle_infer.py - PF native inputs
external/v731/prepare_native.py
Labels and training
- Label generation
knee/labels.py - Expert image panels
knee/panels.py - Training stores
knee/stores.py - Core training
knee/train.py - PF training
external/train/pf-specialist/train.py - Label tables
Prediction outputs
- Rank blend
knee/blend.py - Submission output
Connections 27
- Competition data → Prediction runner: provides exams
- Prediction runner → Core inference: runs core
- Prediction runner → Reader members: runs specialists
predict.py - Prediction runner → Rank blend: writes blend
predict.py - Core inference → DICOM decoding: decodes exams
knee/infer.py - Core inference → Series selection: selects series
knee/infer.py - Core inference → Crop inputs: uses crop inputs
knee/infer.py - Core inference → Window inputs: uses window inputs
knee/infer.py - Core inference → Core models: runs models
knee/infer.py - Crop inputs → Knee centering: uses centre
knee/tiles.py - Crop inputs → DICOM decoding: reads pixels
knee/tiles.py - Window inputs → Knee centering: uses centre
knee/windows.py - Window inputs → DICOM decoding: reads pixels
knee/windows.py - Reader members → Reader inference: runs reader
knee/external.py - Reader members → PF specialist: runs PF model
knee/external.py - PF specialist → PF native inputs: builds native inputs
external/v731/kaggle_infer.py - Rank blend → Submission output: writes predictions
- Prediction runner → Submission output: writes receipt
- Label generation → Expert image panels: uses image panels
knee/labels.py - Label generation → Label tables: produces targets
- Competition data → Expert image panels: supplies MRI images
knee/panels.py - Competition data → Training stores: supplies training data
- Training stores → Core training: provides inputs
- Label tables → Core training: provides targets
- Core training → Core models: trains weights
knee/train.py - Label tables → PF training: provides targets
- PF training → PF specialist: trains specialist