YOLOv8 Document Inspector
Automatic detection of signatures, stamps, and QR codes in business documents (Russian/Kazakh).
Results (Run 3 β Conservative Augmentation)
| Model | mAP@50 | mAP@50-95 | AP Signature | AP Stamp | ms/img | Params |
|---|---|---|---|---|---|---|
| y8n_1024 β | 0.881 | 0.669 | 0.355 | 0.982 | 237 | 3.2M |
| y8m_1024 | 0.872 | 0.649 | 0.378 | 0.920 | 308 | 25.9M |
| y8l_1024 | 0.858 | 0.642 | 0.302 | 0.981 | 316 | 43.7M |
| y8s_1024 | 0.831 | 0.630 | 0.354 | 0.905 | 249 | 11.2M |
| y8s_640 | 0.823 | 0.615 | 0.333 | 0.897 | 225 | 11.2M |
| y8s_768 | 0.836 | 0.596 | 0.317 | 0.875 | 233 | 11.2M |
Speed vs Accuracy
Performance Comparison
Training Curves
Precision vs Recall
Detection Examples
Key Findings
| Run | Augmentation | mAP@50-95 |
|---|---|---|
| Run 1 | None | 0.650 |
| Run 2 | Mosaic + copy-paste | 0.252 β |
| Run 3 | Conservative | 0.669 β |
y8n beats y8l: 3.2M params model outperforms 43.7M params model in both speed (237ms vs 316ms) and accuracy (0.669 vs 0.642).
Usage
from ultralytics import YOLO
model = YOLO("models/y8n_1024/best.pt")
results = model.predict("document.jpg", imgsz=1024, conf=0.25)
results[0].show()
Training Config (Run 3)
model.train(
imgsz=1024, epochs=150, patience=30,
degrees=3.0, translate=0.05, scale=0.2,
hsv_v=0.2, hsv_s=0.1,
mosaic=0.0, # OFF β harmful for documents
fliplr=0.0, # OFF β text would mirror
flipud=0.0,
)
Dataset
Provided during a hackathon competition. Contains annotated Russian/Kazakh business documents. Dataset is not publicly available due to privacy constraints.
Source code: github.com/AlihanSDev/digital-inspector




