Image Segmentation
ultralytics
instance-segmentation
yolo
cell-biology
microscopy
wound-healing-assay
Instructions to use nmariotto/scratch-assay-segmentation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use nmariotto/scratch-assay-segmentation with ultralytics:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("nmariotto/scratch-assay-segmentation") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,122 @@
|
|
| 1 |
---
|
| 2 |
license: agpl-3.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: agpl-3.0
|
| 3 |
+
tags:
|
| 4 |
+
- image-segmentation
|
| 5 |
+
- instance-segmentation
|
| 6 |
+
- ultralytics
|
| 7 |
+
- yolo
|
| 8 |
+
- cell-biology
|
| 9 |
+
- microscopy
|
| 10 |
+
- wound-healing-assay
|
| 11 |
+
library_name: ultralytics
|
| 12 |
+
pipeline_tag: image-segmentation
|
| 13 |
---
|
| 14 |
+
|
| 15 |
+
# Scratch-assay wound segmentation — YOLO11-seg
|
| 16 |
+
|
| 17 |
+
Instance-segmentation weights for the cell-free gap in brightfield scratch (wound-healing)
|
| 18 |
+
assay images. Two scales are provided: `M.pt` is the default and `S.pt` is a faster
|
| 19 |
+
alternative that trades about four percentage points of recall for roughly half the CPU
|
| 20 |
+
latency.
|
| 21 |
+
|
| 22 |
+
These weights accompany the manuscript *"Deep Learning Instance Segmentation for
|
| 23 |
+
Quantitative Analysis of Cell Migration in Wound Healing Assays"* (Cytometry Part A, under
|
| 24 |
+
revision).
|
| 25 |
+
|
| 26 |
+
## ⚠️ These are not the weights of the originally submitted version
|
| 27 |
+
|
| 28 |
+
The first submission evaluated models trained on a dataset partitioned at the **image**
|
| 29 |
+
level, so frames of the same acquisition field appeared in both training and test sets. Every
|
| 30 |
+
performance figure in that version was optimistic. The dataset was rebuilt and partitioned at
|
| 31 |
+
the level of the **physical acquisition field**, and all configurations were retrained. The
|
| 32 |
+
weights here are from the corrected partition. The superseded weights remain available in the
|
| 33 |
+
earlier deposit, marked as such; they should not be used.
|
| 34 |
+
|
| 35 |
+
## Files
|
| 36 |
+
|
| 37 |
+
| File | Scale | Parameters | Size | CPU (ms/img) | GPU (ms/img) | mAP@50 | Recall |
|
| 38 |
+
|---|---|---|---|---|---|---|---|
|
| 39 |
+
| `M.pt` | YOLO11m-seg | 22.4 M | 45.2 MB | 345 | 92 | 93.40 ± 1.08 | 78.34 ± 2.99 |
|
| 40 |
+
| `S.pt` | YOLO11s-seg | 10.1 M | 20.5 MB | 174 | 85 | 93.98 ± 0.74 | 74.32 ± 2.30 |
|
| 41 |
+
|
| 42 |
+
Accuracy is mean ± SD over five training seeds on a held-out test set of 234 images from 37
|
| 43 |
+
acquisition groups. Latency is the median over 40 images, CPU on 16 cores, GPU on an NVIDIA
|
| 44 |
+
GeForce RTX 4060 Ti. Both weights are the seed-42 checkpoint.
|
| 45 |
+
|
| 46 |
+
**The two scales are not statistically distinguishable in mAP.** Across all five
|
| 47 |
+
configurations evaluated, mean mAP@50 spans 93.3–94.0% and none of the ten pairwise
|
| 48 |
+
differences has a cluster-bootstrap confidence interval excluding zero. The reason to prefer
|
| 49 |
+
`M` is recall at the deployed operating point, not accuracy in aggregate.
|
| 50 |
+
|
| 51 |
+
## Training
|
| 52 |
+
|
| 53 |
+
| | |
|
| 54 |
+
|---|---|
|
| 55 |
+
| Architecture | YOLO11-seg (Ultralytics 8.4.102) |
|
| 56 |
+
| Initialisation | COCO checkpoint |
|
| 57 |
+
| Input | 640 × 640, letterbox with black padding |
|
| 58 |
+
| Schedule | 100 epochs, batch 4, early stopping disabled |
|
| 59 |
+
| Augmentation | HSV 0.015/0.7/0.4, translate 0.1, scale 0.5, fliplr 0.5, mosaic (off for the last 10 epochs) |
|
| 60 |
+
| Framework | PyTorch 2.6.0, CUDA 12.4 |
|
| 61 |
+
| Seeds | 42–46; the checkpoint published here is seed 42 |
|
| 62 |
+
|
| 63 |
+
Training data: 932 images (197 validation, 234 held-out test) of HUVEC and SKOV-3 monolayers,
|
| 64 |
+
brightfield, 5× objective, single laboratory. One class, `wound`.
|
| 65 |
+
|
| 66 |
+
## Usage
|
| 67 |
+
|
| 68 |
+
```python
|
| 69 |
+
from ultralytics import YOLO
|
| 70 |
+
|
| 71 |
+
model = YOLO("M.pt") # or S.pt for the fast variant
|
| 72 |
+
r = model.predict("scratch.png", conf=0.80, retina_masks=True)
|
| 73 |
+
mask = r[0].masks # polygon and binary mask of the gap
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
`conf=0.80` is the operating point at which the reported precision and recall were measured
|
| 77 |
+
and the default of the companion web interface.
|
| 78 |
+
|
| 79 |
+
## What these weights are good for, and where they fail
|
| 80 |
+
|
| 81 |
+
Agreement with a supervised reference standard, over 97 paired observations from both cell
|
| 82 |
+
lines: Pearson r 0.820 ± 0.042, Lin's concordance correlation coefficient 0.803 ± 0.049, mean
|
| 83 |
+
bias +0.053 ± 0.018 in the closure fraction, 95% limits of agreement −0.288 to +0.395.
|
| 84 |
+
|
| 85 |
+
Read that last number carefully. **A single automated measurement can differ from a careful
|
| 86 |
+
manual one by about thirty percentage points of closure.** The workflow is suitable for
|
| 87 |
+
comparing conditions across many wells; it is not a substitute for manual measurement of an
|
| 88 |
+
individual well.
|
| 89 |
+
|
| 90 |
+
Two known limits:
|
| 91 |
+
|
| 92 |
+
- **Small wounds.** Performance is governed by wound size rather than elapsed time. Above 10%
|
| 93 |
+
of the field the model agrees closely with the reference standard; between 2% and 5% mean
|
| 94 |
+
intersection over union falls to 0.362. Measurements taken while the residual gap is below
|
| 95 |
+
roughly 5% of the field are the least reliable part of a series.
|
| 96 |
+
- **Isolated cells.** The gap is quantified as the region enclosed by the segmented contour,
|
| 97 |
+
so cells that detach and migrate individually into an otherwise continuous gap are not
|
| 98 |
+
subtracted from it.
|
| 99 |
+
|
| 100 |
+
The ceiling is not the architecture. On blinded repeat corrections the human observer
|
| 101 |
+
reproduced their own delineation at a median intersection over union of 0.861 — about what
|
| 102 |
+
the models achieve. What limits agreement here is the reproducibility of the wound boundary
|
| 103 |
+
itself.
|
| 104 |
+
|
| 105 |
+
Acquisition envelope: one inverted microscope, brightfield, 5× objective, one institution. No
|
| 106 |
+
external testing was performed. Robustness to other microscopes, magnifications or contrast
|
| 107 |
+
modalities is unknown.
|
| 108 |
+
|
| 109 |
+
## Licence
|
| 110 |
+
|
| 111 |
+
**AGPL-3.0.** These weights are trained with Ultralytics YOLO11, which is AGPL-3.0, and no
|
| 112 |
+
commercial licence was obtained; the trained weights are a derivative work and carry the same
|
| 113 |
+
licence. The image dataset is released separately under CC BY 4.0, and the statistical
|
| 114 |
+
analysis code under MIT.
|
| 115 |
+
|
| 116 |
+
## Citation
|
| 117 |
+
|
| 118 |
+
Data and code archive: https://doi.org/10.5281/zenodo.20298129
|
| 119 |
+
Code repository: https://github.com/nykemariotto/scratch-assay-segmentation
|
| 120 |
+
Web interface: https://huggingface.co/spaces/nmariotto/Scratch-assay-segmentation
|
| 121 |
+
|
| 122 |
+
Contact: Allan F. F. Alves — allan.alves@unesp.br — ORCID 0000-0002-0954-9919
|