/ Модель

Характеристики

Лицензия
CC BY-NC-SA 4.0
Библиотека
nnunetv2
Опубликована
16 сен 2026

total-feet-seg

Сегментация изображенийИзображение → mask3 профессии

Модель nnU-Net v2 для исследовательской 3D-сегментации 56 костей стоп и голеностопных суставов на КТ.

0скачиваний за 30 дней0лайковвеса обновлены25 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Модель BoneHub/total-feet-seg разработана для nnU-Net v2 и сегментирует 56 костей обеих стоп и голеностопных суставов на КТ: дистальные отделы большеберцовых и малоберцовых костей, кости предплюсны, плюсны и фаланги. Для левой и правой стороны предусмотрены отдельные метки. Используется 3D Residual Encoder U-Net конфигурации ResEnc M с режимом 3d_fullres; итоговая модель объединяет пять сетей, обученных в схеме пятикратной кросс-валидации.

Модель рассчитана на исследовательскую сегментацию КТ, подготовленных в формате NIfTI с корректной ориентацией и областью охвата обеих стоп, лодыжек и нижних участков голеней. В пятифолдовой проверке на 30 обучающих исследованиях средний Dice по группам костей составлял примерно 0,95–0,96, однако независимой проверки не проводилось. Фаланги сегментируются хуже из-за малого размера; возможна путаница левой и правой сторон. Модель обучена только на ограниченной выборке, поэтому качество может снижаться на других сканерах, при иных полях обзора, имплантах и патологиях. Лицензия CC BY-NC-SA 4.0; автор указывает, что модель предназначена только для исследований и не предназначена для клинического применения.

Сценарии применения

  • сегментация костей обеих стоп на КТ
  • раздельная разметка левых и правых костей стопы
  • подготовка 3D-масок костей стоп для исследований
  • анализ костей предплюсны, плюсны и фаланг на КТ

Ограничения

Модель обучена на 30 исследованиях и оценивалась только перекрёстной проверкой, без независимого тестового набора; возможны ошибки определения стороны, а фаланги сегментируются менее точно. Она рассчитана на КТ обеих стоп с подходящим полем обзора, может ошибочно размечать другую анатомию и не предназначена для клинического применения.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

total-feet-seg

This repository contains an nnU-Net v2 model that segments 56 bones of both feet and ankles in CT scans: the distal tibia and fibula, the tarsals, the metatarsals and the phalanges. Left and right bones get separate labels.

total-feet-seg output

It also contains the scripts that trained the model (training/), so the training can be repeated step by step.

Model

NetworkResidual encoder U-Net, preset M (nnUNetResEncUNetMPlans)
Configuration3d_fullres, patch 64 × 160 × 96 voxels at 1.09 × 0.5 × 1.09 mm
TrainernnUNetTrainerNoMirroring (no mirroring, so left and right are never swapped)
Folds5-fold cross-validation (0 1 2 3 4); a prediction averages all 5 networks
Checkpointcheckpoint_final.pth (end of the full 1000-epoch schedule)
Postprocessingkeep only the largest connected component, for the bones where this improved the Dice
Size5 × 785 MB

Accuracy

Five-fold cross-validation on the 30 training scans: each scan was segmented by the network that did not see it during training. This estimates the accuracy on new scans of the same kind. It is not a test on an independent dataset.

Bone groupDiceDice after postprocessing
Tibia and fibula0.9550.963
Tarsals0.9590.962
Metatarsals0.9530.956
Phalanges0.8980.899
All bones0.9270.930
BoneLeftRight
Tibia0.9830.952
Fibula0.9740.943
Talus0.9720.950
Calcaneus0.9860.953
Navicular0.9740.940
Cuboid0.9760.945
Medial cuneiform0.9740.968
Intermediate cuneiform0.9600.951
Lateral cuneiform0.9650.953
Metatarsal 10.9710.972
Metatarsal 20.9580.947
Metatarsal 30.9590.945
Metatarsal 40.9580.939
Metatarsal 50.9640.944
Toe 1: proximal, distal phalanx0.962, 0.9110.965, 0.915
Toe 2: proximal, middle, distal0.952, 0.926, 0.9060.948, 0.904, 0.880
Toe 3: proximal, middle, distal0.945, 0.905, 0.8980.942, 0.904, 0.864
Toe 4: proximal, middle, distal0.941, 0.896, 0.8950.909, 0.855, 0.822
Toe 5: proximal, middle, distal0.910, 0.864, 0.8440.874, 0.845, 0.805

Mean Dice per scan: 28 of the 30 scans score between 0.89 and 0.96. Two scans score lower:

  • Scan 018 (0.62): left and right swapped. The network labelled the right tibia, fibula, talus and calcaneus as the left bones. The shapes were correct, only the side was wrong. Postprocessing then removed these bones, because each left label had two parts and only the largest was kept. This one scan pulls down the right-side Dice of the hindfoot bones in the table above.
  • Scan 030 (0.82): the scan ends in the metatarsals, so the toes are outside the image.

The phalanges have the lowest Dice. They are small, so an error of one voxel layer at the surface already costs a lot of Dice.

Training curves

Loss and pseudo-Dice per epoch of the 5 folds (top panel of each fold's progress.png):

Fold 0Fold 1Fold 2Fold 3Fold 4
fold 0fold 1fold 2fold 3fold 4

In all folds, the train loss (blue) and validation loss (red) fall together and then stay level, so the networks did not overfit. Fold 3 has a higher validation loss and a lower pseudo-Dice than the other folds. Its 6 validation scans include scan 018, where left and right were swapped, and scans 026 and 030, which end in the toes or metatarsals.

Labels

LeftRight
Tibia12
Fibula34
Talus56
Calcaneus78
Navicular910
Cuboid1112
Medial / Intermediate / Lateral cuneiform13 / 15 / 1714 / 16 / 18
Metatarsals 1–519, 21, 23, 25, 2720, 22, 24, 26, 28
Phalanges of toe 1 (proximal, distal)29, 3130, 32
Phalanges of toes 2–5 (proximal, middle, distal)33–55, odd34–56, even

The full list of label names is in the model's dataset.json. In a name like Phalange_Foot_<toe>_<phalanx>_<side>:

  • Toe: 1 is the big toe.
  • Phalanx: counted from proximal to distal.

Prediction

1. Install

Install PyTorch for your CUDA version, then:

pip install nnunetv2 huggingface_hub

2. Download the model

models/ is an nnU-Net results folder:

hf download BoneHub/total-feet-seg --include "models/*" --local-dir ./total-feet-seg
export nnUNet_results="$PWD/total-feet-seg/models"
M="$nnUNet_results/Dataset002_vsd-feet-seg/nnUNetTrainerNoMirroring__nnUNetResEncUNetMPlans__3d_fullres"

3. Prepare the input

Put the CT scans (in Hounsfield units, .nii.gz) in one folder, named <name>_0000.nii.gz (nnU-Net's channel suffix).

  • Crop the scans to both feet. The training scans contain both feet, the ankles and the lower end of the tibia and fibula: the box around the foot bones plus about 5 cm along the leg and 11–13 cm across (typically 35 × 23 × 23 cm). The model has not seen other anatomy, such as the knees, and may label it as foot bones.
  • The orientation must be correct, because the model predicts left and right labels.

4. Predict and postprocess

nnUNetv2_predict -i ./scans -o ./segmentations_raw -d Dataset002_vsd-feet-seg -c 3d_fullres \
    -tr nnUNetTrainerNoMirroring -p nnUNetResEncUNetMPlans -f 0 1 2 3 4 -npp 1 -nps 1

nnUNetv2_apply_postprocessing -i ./segmentations_raw -o ./segmentations \
    -pp_pkl_file "$M/crossval_results_folds_0_1_2_3_4/postprocessing.pkl" \
    -plans_json "$M/plans.json" -dataset_json "$M/dataset.json" -np 2

-f 0 1 2 3 4 averages the 5 networks. -npp 1 -nps 1 processes one scan at a time, because a large scan can need tens of GB of RAM.

Each file in ./segmentations/ is a label map with the same size and position as its input scan.

Training

The model was trained with the scripts in training/, one Python script per step. Each script prints the nnU-Net commands it runs. All settings are in training/common.py.

StepScriptWhat it doesTime
101_create_nnunet_raw.pybuilds the dataset in nnUNet_raw/seconds
202_check_dataset.pychecks orientation, left/right and missing labels30 s
303_plan_and_preprocess.pynnUNetv2_plan_and_preprocess, 5-fold split7 min
404_train.pytrains the folds, without the final validation35 h per fold
505_validate.pynnUNetv2_train --val for each fold30 min
606_evaluate.pynnUNetv2_find_best_configuration, Dice tables40 min

Times are for an RTX 4000 Ada (20 GB).

pip install torch nnunetv2 huggingface_hub     # used here: torch 2.15, nnunetv2 2.8.1
git clone https://huggingface.co/BoneHub/total-feet-seg
cd total-feet-seg
hf download BoneHub/vsd-feet-seg --repo-type dataset --local-dir vsd-feet-seg

python training/01_create_nnunet_raw.py
python training/02_check_dataset.py
python training/03_plan_and_preprocess.py
python training/04_train.py --gpu 0 --folds 0 1 2 3 4     # or one process per GPU, each with some folds
python training/05_validate.py
python training/06_evaluate.py

The scripts can be re-run: finished work is skipped and an interrupted fold continues from its last checkpoint. nnU-Net's folders are created in nnUNet_data/.

Choices

  • 5-fold cross-validation. Every scan is predicted once by a network that did not train on it, so the Dice above estimates the accuracy on new scans. The released model is the ensemble of the 5 folds.
  • No mirroring (nnUNetTrainerNoMirroring). A left foot flipped left-right looks like a right foot but keeps its "left" labels, so the default mirroring augmentation would teach the network the wrong side.
  • Default schedule and final checkpoint. 1000 epochs with a learning rate decreasing from 0.01 to 0. checkpoint_best.pth is chosen by the noisy pseudo-Dice and is not used.
  • ResEnc M (presets), the preset that fits a 20 GB GPU. ResEnc L with a 16 GB budget has a larger patch but takes 77 h per fold instead of 35 h.
  • Only 3d_fullres. The 3d_lowres/cascade configurations were not trained, so step 6 has nothing to choose between. The cascade sees more of the scan at once and might avoid left/right swaps like the one in scan 018.
  • Validation is a separate step (step 5, one fold at a time), because validating one fold needed up to 47 GB of RAM.

Dataset findings (step 2)

  • All 30 scans have the same orientation (LPS), with the left bones on the patient's left.
  • Scans 026 and 030 lack some phalanx labels because the image ends in the toes (026) or the metatarsals (030). The labels are not wrong, and the scans are used as they are.

Fine-tuning on your own data

This starts from the released weights.

  1. Prepare your data. Create your own dataset in $nnUNet_raw, e.g. Dataset004_my-feet, in the nnU-Net format (imagesTr/, labelsTr/, dataset.json). Use the same labels as above if possible.

  2. Reuse the released plans and preprocess. Copy the model's plans to $nnUNet_preprocessed, transfer them to your dataset, and preprocess:

    mkdir -p "$nnUNet_preprocessed/Dataset002_vsd-feet-seg"
    cp "$M/plans.json" "$nnUNet_preprocessed/Dataset002_vsd-feet-seg/nnUNetResEncUNetMPlans.json"
    
    nnUNetv2_extract_fingerprint -d 4
    nnUNetv2_move_plans_between_datasets -s Dataset002_vsd-feet-seg -t 4 -sp nnUNetResEncUNetMPlans -tp nnUNetResEncUNetMPlans
    nnUNetv2_preprocess -d 4 -plans_name nnUNetResEncUNetMPlans -c 3d_fullres
    
  3. Train from the released weights, here from the network of fold 0:

    nnUNetv2_train 4 3d_fullres 0 -tr nnUNetTrainerNoMirroring -p nnUNetResEncUNetMPlans \
        -pretrained_weights "$M/fold_0/checkpoint_final.pth"
    

See nnU-Net's fine-tuning guide for details.

Training data

The model was trained on 30 CT scans of the feet. The images come from VSDFullBodyBoneReconstruction. The labels were created from the bone meshes of VSDFullBodyBoneModels, with the fused foot bones split into individual bones.

The training data is published as BoneHub/vsd-feet-seg.

Earlier versions

Earlier versions of this repository had two models (ResEnc L and plain U-Net) trained on fold all, stopped before the end of the schedule (epochs 681 and 179) and with a lower learning rate than nnU-Net's default. Their reported pseudo-Dice was measured on training data and is not comparable with the cross-validation Dice above. They are still in the git history.

Limitations

  • The model was trained on only 30 subjects and not tested on an independent dataset.
  • The model was trained only on scans cropped to both feet (see Prepare the input). Scans of a single foot or with a much larger field of view were not tested.
  • Results may be worse on other scanners, fields of view, implants or pathologies.
  • Left and right can be swapped (see scan 018). Check the side labels.
  • For research use only. The model is not for clinical use.

License

CC BY-NC-SA 4.0

Citation

If you use this model, please cite nnU-Net and the used datasets:

@article{isensee2021nnunet,
  title   = {nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation},
  author  = {Isensee, Fabian and Jaeger, Paul F. and Kohl, Simon A. A. and Petersen, Jens and Maier-Hein, Klaus H.},
  journal = {Nature Methods},
  volume  = {18},
  number  = {2},
  pages   = {203--211},
  year    = {2021}
}
@inproceedings{isensee2024nnunetrevisited,
  title     = {nnU-Net Revisited: A Call for Rigorous Validation in 3D Medical Image Segmentation},
  author    = {Isensee, Fabian and Wald, Tassilo and Ulrich, Constantin and Baumgartner, Michael and Roy, Saikat and Maier-Hein, Klaus and J{\"a}ger, Paul F.},
  booktitle = {Medical Image Computing and Computer Assisted Intervention (MICCAI)},
  year      = {2024}
}
@misc{seyedhamidrezaalaviVsdfeetseg,
  title = {Vsd-Feet-Seg},
  author = {Seyed Hamidreza Alavi and Malte Asseln},
  year = {2026},
  publisher = {Hugging Face},
  doi = {10.57967/HF/10470},
  url = {https://huggingface.co/datasets/BoneHub/vsd-feet-seg},
  urldate = {2026-09-16}
}
@article{fischerDatabaseSegmentationsSurface2023,
  title = {Database of Segmentations and Surface Models of Bones of the Entire Lower Body Created from Cadaver {{CT}} Scans},
  author = {Fischer, M.C.M.},
  year = 2023,
  journal = {Scientific Data},
  volume = {10},
  number = {1},
  pages = {763},
  publisher = {Nature Publishing Group},
  issn = {2052-4463},
  doi = {10.1038/s41597-023-02669-z},
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · nnunetv2 · image-segmentation

Нельзя запустить

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
eead2d8

0 моделей