AvoCahDoe/invoice-layout-yolov8n
0535
Invoice Layout Detection — YOLOv8n
Fine-tuned YOLOv8n for 8-class invoice document layout region detection (metadata, vendor/customer blocks, table, line items, summary, payment, column headers).
Part of the Hub collection [Invoice Layout Extraction](https://huggingface.co/collections/AvoCahDoe/invoice-layout-extraction-6a39cd2a061a508c8049d825).
Classes
Metrics
Test split (held-out, 7 images)
Validation (best epoch 62)
Training time: ~41.0 min on RTX 4070 Laptop GPU.
Training configuration
Training results
Learning curves
Precision–Recall
Confusion matrices
Validation predictions
Training batches (augmented)
Label distribution
Usage
Ultralytics (recommended)
from ultralytics import YOLO
from huggingface_hub import hf_hub_download
weights = hf_hub_download("AvoCahDoe/invoice-layout-yolov8n", "weights/best.pt")
model = YOLO(weights)
results = model.predict("invoice_page.png", imgsz=1024, conf=0.25)
results[0].show()Load from Hub by repo id
from ultralytics import YOLO
model = YOLO("hf://AvoCahDoe/invoice-layout-yolov8n/weights/best.pt")
results = model.predict("invoice_page.png")Training reproduction
python scripts/train_comparison.py --models yolov8nRepository layout
weights/best.pt # Best checkpoint (use this)
weights/last.pt # Last epoch checkpoint
config/ # Training configuration
metrics/ # Per-epoch and summary metrics
assets/ # Plots and visualizationsModel comparison (test split)
All six architectures fine-tuned on the same invoice layout dataset.
License
Apache 2.0
