Cancer Detection — YOLOv8 (n/s/m)
3-variant YOLOv8 benchmark for cancer localization. YOLOv8m: test mAP50=0.6782, Precision=0.7633, F1=0.6941. 1,968 training images. Exported ONNX (49.8 MB) + TorchScript (99.1 MB).
1,968 cancer images, 1 class, ~1.1 bbox/image
3-variant YOLOv8 benchmark with ONNX + TorchScript export for deployment
YOLOv8 benchmark for cancer detection in histopathology/medical images.
Dataset
- ▸1,968 train / 185 val / 94 test images — single class: cancer
- ▸Average 1.10 bounding boxes per image
- ▸Lesion size distribution: left-skewed (many small, few large)
3-Model Comparison (Test Set)
| Model | mAP50 | mAP50-95 | Precision | Recall | F1 |
|---|---|---|---|---|---|
| YOLOv8n (3.2M) | 0.6191 | — | — | — | — |
| YOLOv8s (11.2M) | 0.5879 | — | — | — | — |
| YOLOv8m (25.9M) | 0.6782 | 0.2305 | 0.7633 | 0.6364 | 0.6941 |
Validation Set (for reference) YOLOv8n val mAP50=0.6849 (slightly higher than m on val — may have overfit val distribution)
Training Config 50 epochs, auto-batch, FP16 mixed precision, mosaic augmentation, AdamW, patience=10
Deployment Exports
| Format | Size |
|---|---|
| ONNX (FP16) | 49.8 MB |
| TorchScript | 99.1 MB |
Key Finding On the test set, the larger YOLOv8m outperforms nano and small despite the small dataset. The COCO pretrained weights transfer relevant object detection priors even for medical images, and the larger capacity better captures subtle cancer features.