File size: 3,028 Bytes
fd0e3e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109c1a2
fd0e3e0
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
license: mit
tags:
  - object-detection
  - instance-segmentation
  - medical-imaging
  - microbiology
  - antibiotic-susceptibility-testing
library_name: pytorch
pipeline_tag: object-detection
---

# ZoneVision — Inhibition-Zone Detection for AST

Automated inhibition-zone (antibiotic halo) detection and quantitative measurement on 96-well plate photographs for antibiotic susceptibility testing (AST).

## Model Weights

| File | Size | Architecture | Purpose |
|------|------|-------------|---------|
| `rfdetr_seg_small_best.pth` | 128 MB | RF-DETR-Seg-Small (33.4M params) | End-to-end zone instance segmentation |
| `sam3.pt` | 3.2 GB | SAM3 | Optional mask refinement within detected ROIs |
| `yolo26n.pt` | 5.3 MB | YOLO26n | Pretrained backbone for plate geometry estimation |
| `yolo26n-seg.pt` | 6.4 MB | YOLO26n-seg | YOLO segmentation model (alternative detector) |

## Performance

| Metric | Value |
|--------|-------|
| F1 Score | 0.952 |
| Precision | 0.973 |
| Recall | 0.931 |
| Mean IoU | 0.896 |
| Diameter MAE | 0.234 mm (3.08% relative) |
| Pearson r (diameter) | 0.973 |

Evaluated on 11 plate photos with 233 manually annotated inhibition zones.

## Pipeline

1. **Plate geometry** — YOLO26n + Hough Circles detect the 96-well grid; estimate px/mm from 9.0 mm well pitch
2. **Zone segmentation** — RF-DETR-Seg-Small produces per-zone masks
3. **Mask refinement** (optional) — SAM3 refines boundaries
4. **Measurement** — Pixel-to-mm conversion, diameter/area extraction, QC flags
5. **Output** — CSV with per-well phenotypes, overlay images, binary masks

## Quick Start

```bash
# Install
pip install -e .

# Download weights
hf download logichenry/ZoneVision --local-dir weights/

# Run inference
python scripts/run_pipeline.py \
  --input path/to/plate_photos/ \
  --output outputs/ \
  --config configs/config.yaml \
  --detector rfdetr
```

## Training

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.

## Intended Use

- Automated measurement of inhibition zones in antibiotic susceptibility testing
- High-throughput screening of antimicrobial peptide libraries on 96-well plates
- Quantitative phenotyping for lanthipeptide or bacteriocin activity assays

## Limitations

- Designed for color photographs of 96-well plates; may not generalize to other formats
- SAM3 refinement requires ~3.2 GB VRAM; can be disabled for resource-constrained environments
- Best performance on plates with clear zone boundaries; heavily overlapping zones may reduce accuracy

## Citation

```bibtex
@article{zonevision2026,
  title={Automated Inhibition-Zone Detection for Antibiotic Susceptibility Testing Using Cascade Vision},
  author={Baice},
  journal={Chinese Journal of Biotechnology},
  year={2026}
}
```

## License

MIT License. See [LICENSE](https://github.com/SmartisanNaive/ZoneVision/blob/main/LICENSE).