CoolFace
Modelpublic

Bachstelze/yolo26_large_segmentation_dendritic-cells

sourceHugging Facecc-by-nc-4.0updated 8mo agoView on Hugging Face
0likes
Model Card

Dendritic cell segmentation with a pretrained Yolo model

Example Model training for cracks identification with Ultralytics YOLO based on A Systematic Review of YOLO-Based Object Detection in Medical Imaging: Advances, Challenges, and Future Directions. A set of models is trained with different augmentations (to balance the dataset) and model sizes.

For only detecting detentric cells without segmentation, the selection of pretrained object detection models could be better. A bigger prompt model is also possible.

Task Description: Detecting and Segmenting Dendritic Cells in the Nerve Plexus Layer

In this task, you are going to train a segmentation model to detect/segment dendritic cells (type 1 and type 2) in IVCM images of the corneal nerve plexus layer. The main objective is to obtain accurate segmentation results that can be used to calculate the density of dendritic cells in the analyzed region. Dendritic cells (DCs) are antigen-presenting immune cells that play a central role in initiating and regulating immune responses. In the cornea, variations in the density and morphology of DCs are associated with inflammation, infection, and systemic diseases such as diabetes and autoimmune disorders. Therefore, quantifying DC density serves as an important biomarker for assessing ocular surface inflammation and related systemic conditions.

Metrics overview for yolo26

As expected by the dataset distribution of type 1 and 2 instances, the trained models perform better on type 1 (white labels) than on type 2 (gray labels) across all runs. Data augmentation helps to mitigate this imbalance (compare the simple nano model and the augmented nano model in the following table). Only flipping images with type 2 instance performs similarly to rotating and flipping those images (compare augmented nano with rotation + flip type 2 and flip type 2 only). The flip type 2-only augmentation is used in the training runs for the increased model sizes due to the smaller dataset size. Increasing the model size also increases the performance. The (extra)-large model performs similarly to the previous model due to the small dataset size. Increasing the epochs to 30 helps the large model, but it is still insufficient for the extra-large model.

Legend of yolo performance metrics:

  • —Precision
  • —Recall
  • —mAP: Mean Average Precision
  • —mAP50: Mean average precision calculated at an intersection over union (IoU) threshold of 0.50. It's a measure of the model's accuracy considering only the "easy" detections.
  • —mAP50-95: The average of the mean average precision calculated at varying IoU thresholds, ranging from 0.50 to 0.95. It gives a comprehensive view of the model's performance across different levels of detection difficulty.
Training setupClassImagesInstancesBox PBox RBox mAP50Box mAP50-95Mask PMask RMask mAP50Mask mAP50-95
Simple 10 epoch nano trainingall20021680.4450.4510.3930.1820.3490.3500.2530.0755
Simple 10 epoch nano trainingwhite19717840.4280.8050.6360.3040.2890.5860.3430.0956
Simple 10 epoch nano traininggray1393840.4620.09640.1510.05920.4080.1150.1630.0554
Augmented nano (rotation + flip type 2)all20021680.500.5240.4830.2450.3540.3990.2720.0776
Augmented nano (rotation + flip type 2)white19717840.620.7200.6990.3640.3720.4600.3030.0812
Augmented nano (rotation + flip type 2)gray1393840.3790.3280.2660.1250.3360.3390.2400.0740
Augmented nano (flip type 2 only)all20021680.4970.5210.4940.2360.4060.3920.3120.0921
Augmented nano (flip type 2 only)white19717840.5990.7580.7120.3490.3820.4790.3240.0879
Augmented nano (flip type 2 only)gray1393840.3950.2830.2760.1240.4300.3050.3000.0963
Augmented small (flip type 2 only)all20021680.5590.5710.5610.3030.4440.4300.3600.107
Augmented small (flip type 2 only)white19717840.6870.7640.7700.4470.4370.4790.3520.0952
Augmented small (flip type 2 only)gray1393840.4300.3780.3520.1600.4510.3810.3670.118
Augmented middle (flip type 2 only)all20021680.6020.5730.5960.3340.4690.4460.3750.11
Augmented middle (flip type 2 only)white19717840.7370.7430.7910.4580.4570.4690.3430.0873
Augmented middle (flip type 2 only)gray1393840.4680.4040.4010.2090.4810.4220.4070.132
Augmented large (flip type 2 only)all20021680.6080.5410.5720.3360.4780.4300.3770.117
Augmented large (flip type 2 only)white19717840.7090.7390.7790.4920.4840.5160.4140.126
Augmented large (flip type 2 only)gray1393840.5070.3430.3650.1800.4720.3440.3410.107
Augmented large (flip type 2 only), batch 8, 30 epochsall20021680.6080.6370.6430.3890.4760.4960.4170.122
Augmented large (flip type 2 only), batch 8, 30 epochswhite19717840.7440.8110.8330.5350.4760.5220.3950.107
Augmented large (flip type 2 only), batch 8, 30 epochsgray1393840.4720.4640.4530.2430.4760.4710.4390.137
Augmented extra large (flip type 2 only), 30 epochsall20021680.6210.6090.6280.3770.4910.4800.4080.119
Augmented extra large (flip type 2 only), 30 epochswhite19717840.7830.7210.8160.5290.5230.4750.4020.106
Augmented extra large (flip type 2 only), 30 epochsgray1393840.4590.4970.4400.2250.4590.4840.4150.132

Augmented large training with only flip of type 2 and batch size 8 for 30 epochs

ClassImagesInstancesBox PBox RBox mAP50Box mAP50-95Mask PMask RMask mAP50Mask mAP50-95
all20021680.6080.6370.6430.3890.4760.4960.4170.122
white19717840.7440.8110.8330.5350.4760.5220.3950.107
gray_8080801393840.4720.4640.4530.2430.4760.4710.4390.137

Prediction example with a larger batch:

[image]

The training metrics:

[image]

Citation

@model{yolo26_large_segmentation_dendritic-cells,
  title={{EDendritic cell segmentation with a pretrained Yolo model}},
  author={Kalle Hilsenbek},
  url={https://huggingface.co/Bachstelze/yolo26_large_segmentation_dendritic-cells},
  year={2026}
}