digital-inspector / README.md
AlihanSDev's picture
Add all 6 models, metrics, plots β€” Run 3 results
345327c verified
|
Raw
History Blame Contribute Delete
2.46 kB
---
license: apache-2.0
tags:
- object-detection
- document-analysis
- yolov8
- stamps
- signatures
language:
- ru
- kk
metrics:
- map
pipeline_tag: object-detection
---
# 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
![Pareto](plots/comparisons/pareto_speed_accuracy.png)
## Performance Comparison
![Bar Chart](plots/comparisons/final_metrics_bar_chart.png)
## Training Curves
![Curves](plots/training_curves/all_training_curves.png)
## Precision vs Recall
![Scatter](plots/comparisons/precision_recall_scatter.png)
## Detection Examples
![Detections](plots/comparisons/detection_examples_collage.png)
## 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
```python
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)
```python
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](https://github.com/AlihanSDev/digital-inspector)