Views
No views yet
| Metric | v3 | v4 | Delta |
|---|---|---|---|
| mAP@50 | 99.3% | 99.5% | +0.2% |
| mAP@50-95 | 87.5% | 99.2% | +11.7% |
| Precision | 99.9% | 100% | +0.1% |
| Recall | 98.9% | 98.9% | same |
1from ultralytics import YOLO
2from huggingface_hub import hf_hub_download
3
4model = YOLO(hf_hub_download(
5 repo_id="davanstrien/archival-index-card-detector-v4",
6 filename="model.pt"
7))
8
9results = model.predict("scan.jpg")
10
11for result in results:
12 for box in result.boxes:
13 x1, y1, x2, y2 = box.xyxy[0].tolist()
14 confidence = box.conf[0].item()
15 print(f"Card at ({x1:.0f}, {y1:.0f}, {x2:.0f}, {y2:.0f}) conf={confidence:.2f}")