Instructions to use karimii0214/Thyrops_ConvNext-base_RSNA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use karimii0214/Thyrops_ConvNext-base_RSNA with timm:
import timm model = timm.create_model("hf_hub:karimii0214/Thyrops_ConvNext-base_RSNA", pretrained=True) - Notebooks
- Google Colab
- Kaggle
Thyrops ConvNeXt-Base RSNA
Research checkpoint for pediatric bone-age regression from a grayscale hand radiograph and recorded sex. The model was trained on the RSNA Pediatric Bone Age Challenge training release and returns bone age in years.
This release is for research only. It is not a medical device, is not clinically validated, and must not be used for diagnosis or treatment decisions.
Files
| File | Purpose |
|---|---|
model.safetensors |
Recommended inference-only FP32 model state |
training_checkpoint.pth |
Original epoch-7 PyTorch checkpoint, including AdamW and scheduler state |
modeling_thyrops.py |
Self-contained model architecture |
preprocessing_thyrops.py |
Exact released PNG/JPEG inference preprocessing |
inference.py |
Single-image command-line inference |
config.json |
Architecture and preprocessing contract |
benchmark_results.json |
Machine-readable evaluation summary |
checksums.sha256 |
SHA-256 integrity manifest |
Architecture
- ConvNeXt-V2-Base grayscale backbone (
timm, 1 input channel) - Feature Pyramid Network over stages with channels
[128, 256, 512, 1024] - 256-channel aggregation by concatenation, 1x1 convolution, and global average pooling
- sex-conditioned FiLM (
female=0,male=1) - regression head in years and an auxiliary 20-bin ordinal head
- 90,248,330 parameters
The exact tag of the upstream timm pretrained initialization was not recorded at training time. This limits full initialization provenance even though the released final state is deterministic and integrity-checked.
Preprocessing Contract
- Convert the rendered radiograph to grayscale.
- Map 8-bit pixels to the project's pseudo-HU convention with
pixel * (4000 / 255). - Apply window center 600 and window width 2000.
- Resize with preserved aspect ratio and letterbox to 1024x1024.
- Pad with
0.523483and normalize with mean0.523483, standard deviation0.284501. - Supply sex as
1.0for male or0.0for female.
The pseudo-HU mapping is a project normalization convention for rendered PNG images. It does not recover physical Hounsfield units.
Usage
pip install -r requirements.txt
python inference.py \
--image hand.png \
--sex female \
--weights model.safetensors
Use --bf16 for CUDA BF16 autocast. FP32 is the default and matches the primary benchmark rows.
Validation Results
Results below use fixed 40-image validation subsets from benchmark manifest SHA-256 2f17acf1e1fe93783ac6e3b9521a63c9e9e42b6ca09a2ba008eb3e296d13665f.
| Domain | MAE (years) | RMSE (years) | Pearson r | Within 1 year | Within 2 years |
|---|---|---|---|---|---|
| RSNA validation | 0.3796 | 0.4975 | 0.9915 | 92.5% | 100.0% |
| RHPE domain-shift validation | 2.5214 | 3.0581 | 0.6020 | 22.5% | 45.0% |
These are small validation measurements, not independent clinical test results. The original training split manifest is unavailable, so overlap between the 40-image RSNA diagnostic subset and the original training split cannot be excluded. Official test releases available during this evaluation were unlabeled, so no test MAE is claimed. The RHPE result demonstrates substantial domain-shift degradation.
Precision Sensitivity
The following results are weight quantize-dequantize quality ablations with FP32 GPU execution. They do not represent native BF16/FP8/FP4 latency or memory use.
| Weight ablation | RSNA MAE | Delta | RHPE MAE | Delta |
|---|---|---|---|---|
| FP32 baseline | 0.3796 | baseline | 2.5214 | baseline |
| BF16 QDQ | 0.3790 | -0.15% | 2.5209 | -0.02% |
| FP8 E4M3 QDQ | 0.3808 | +0.32% | 2.5312 | +0.39% |
| NVFP4 E2M1 block-16 QDQ | 0.3879 | +2.17% | 2.5826 | +2.43% |
Training Checkpoint
training_checkpoint.pth contains:
- model state
- AdamW optimizer state
CosineAnnealingWarmRestartsscheduler state- epoch (
7) - best training-time validation MAE (
0.6927681565284729years) - early-stopping counter
Only load pickle-based PyTorch checkpoints from trusted sources. Use model.safetensors for inference.
Limitations
- The missing original split manifest prevents a strict independent RSNA evaluation claim.
- The compact benchmark subsets are too small to characterize rare pathologies or demographic subgroups.
- Recorded sex is a required model input and may encode dataset-specific bias.
- RHPE evaluation shows poor transfer outside the RSNA domain.
- PNG/JPEG inference is provided; raw DICOM deployment is not validated in this release.
- Distribution shift across scanners, institutions, ages, and acquisition protocols can materially reduce accuracy.
- Predictions require expert review in any research workflow involving patient data.
No training or evaluation images are included in this repository. The source RSNA data terms permit academic research, education, and other non-commercial uses subject to attribution requirements.
- Downloads last month
- 7