Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- object-detection
|
| 5 |
+
- instance-segmentation
|
| 6 |
+
- medical-imaging
|
| 7 |
+
- microbiology
|
| 8 |
+
- antibiotic-susceptibility-testing
|
| 9 |
+
library_name: pytorch
|
| 10 |
+
pipeline_tag: object-detection
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# ZoneVision — Inhibition-Zone Detection for AST
|
| 14 |
+
|
| 15 |
+
Automated inhibition-zone (antibiotic halo) detection and quantitative measurement on 96-well plate photographs for antibiotic susceptibility testing (AST).
|
| 16 |
+
|
| 17 |
+
## Model Weights
|
| 18 |
+
|
| 19 |
+
| File | Size | Architecture | Purpose |
|
| 20 |
+
|------|------|-------------|---------|
|
| 21 |
+
| `rfdetr_seg_small_best.pth` | 128 MB | RF-DETR-Seg-Small (33.4M params) | End-to-end zone instance segmentation |
|
| 22 |
+
| `sam3.pt` | 3.2 GB | SAM3 | Optional mask refinement within detected ROIs |
|
| 23 |
+
| `yolo26n.pt` | 5.3 MB | YOLO26n | Pretrained backbone for plate geometry estimation |
|
| 24 |
+
| `yolo26n-seg.pt` | 6.4 MB | YOLO26n-seg | YOLO segmentation model (alternative detector) |
|
| 25 |
+
|
| 26 |
+
## Performance
|
| 27 |
+
|
| 28 |
+
| Metric | Value |
|
| 29 |
+
|--------|-------|
|
| 30 |
+
| F1 Score | 0.952 |
|
| 31 |
+
| Precision | 0.973 |
|
| 32 |
+
| Recall | 0.931 |
|
| 33 |
+
| Mean IoU | 0.896 |
|
| 34 |
+
| Diameter MAE | 0.234 mm (3.08% relative) |
|
| 35 |
+
| Pearson r (diameter) | 0.973 |
|
| 36 |
+
|
| 37 |
+
Evaluated on 11 plate photos with 233 manually annotated inhibition zones.
|
| 38 |
+
|
| 39 |
+
## Pipeline
|
| 40 |
+
|
| 41 |
+
1. **Plate geometry** — YOLO26n + Hough Circles detect the 96-well grid; estimate px/mm from 9.0 mm well pitch
|
| 42 |
+
2. **Zone segmentation** — RF-DETR-Seg-Small produces per-zone masks
|
| 43 |
+
3. **Mask refinement** (optional) — SAM3 refines boundaries
|
| 44 |
+
4. **Measurement** — Pixel-to-mm conversion, diameter/area extraction, QC flags
|
| 45 |
+
5. **Output** — CSV with per-well phenotypes, overlay images, binary masks
|
| 46 |
+
|
| 47 |
+
## Quick Start
|
| 48 |
+
|
| 49 |
+
```bash
|
| 50 |
+
# Install
|
| 51 |
+
pip install -e .
|
| 52 |
+
|
| 53 |
+
# Download weights
|
| 54 |
+
hf download logichenry/ZoneVision --local-dir weights/
|
| 55 |
+
|
| 56 |
+
# Run inference
|
| 57 |
+
python scripts/run_pipeline.py \
|
| 58 |
+
--input path/to/plate_photos/ \
|
| 59 |
+
--output outputs/ \
|
| 60 |
+
--config configs/config.yaml \
|
| 61 |
+
--detector rfdetr
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
## Training
|
| 65 |
+
|
| 66 |
+
The RF-DETR model was trained on 233 annotated inhibition zones across 11 plate photos in COCO format. See the [GitHub repo](https://github.com/SmartisanNaive/ZoneVision) for training scripts and dataset preparation tools.
|
| 67 |
+
|
| 68 |
+
## Intended Use
|
| 69 |
+
|
| 70 |
+
- Automated measurement of inhibition zones in antibiotic susceptibility testing
|
| 71 |
+
- High-throughput screening of antimicrobial peptide libraries on 96-well plates
|
| 72 |
+
- Quantitative phenotyping for lanthipeptide or bacteriocin activity assays
|
| 73 |
+
|
| 74 |
+
## Limitations
|
| 75 |
+
|
| 76 |
+
- Designed for color photographs of 96-well plates; may not generalize to other formats
|
| 77 |
+
- SAM3 refinement requires ~3.2 GB VRAM; can be disabled for resource-constrained environments
|
| 78 |
+
- Best performance on plates with clear zone boundaries; heavily overlapping zones may reduce accuracy
|
| 79 |
+
|
| 80 |
+
## Citation
|
| 81 |
+
|
| 82 |
+
```bibtex
|
| 83 |
+
@article{zonevision2026,
|
| 84 |
+
title={Automated Inhibition-Zone Detection for Antibiotic Susceptibility Testing Using Cascade Vision},
|
| 85 |
+
author={Han Jiang},
|
| 86 |
+
journal={Chinese Journal of Biotechnology},
|
| 87 |
+
year={2026}
|
| 88 |
+
}
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
## License
|
| 92 |
+
|
| 93 |
+
MIT License. See [LICENSE](https://github.com/SmartisanNaive/ZoneVision/blob/main/LICENSE).
|