Instructions to use average23/yolo26x-p2-packaging-text-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use average23/yolo26x-p2-packaging-text-detection with ultralytics:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("average23/yolo26x-p2-packaging-text-detection") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
YOLO26x-P2 Packaging Text Detection
YOLO26x-P2 detector fine-tuned for locating text regions in packaging, documents, screenshots, and natural-scene images. The model predicts axis-aligned text bounding boxes and does not recognize the text itself.
The P2 detection head and 1024 px training resolution target small and dense text that would otherwise be clipped before OCR.
Example from the Food Packaging OCR Dataset v2 validation split. Red boxes are
the model predictions at conf=0.35; ground-truth annotations are not shown.
Files
best.ptโ production checkpoint.packaging-text-detection-showcase.jpgโ prediction visualization.training-config.yamlโ reproducible training summary.benchmark-comparison.jsonโ detailed benchmark counts and metrics.SHA256SUMSโ artifact checksums.
Usage
from ultralytics import YOLO
model = YOLO("best.pt")
results = model.predict(
source="image.jpg",
imgsz=1024,
conf=0.05,
iou=0.5,
max_det=2000,
end2end=False,
)
for result in results:
for box in result.boxes:
print(box.xyxy[0].tolist(), float(box.conf[0]))
conf=0.05 is the high-recall benchmark setting. Calibrate the threshold on
your production layouts if false positives are more expensive than missed
text.
Training
- Architecture: YOLO26x-P2
- Parameters before fusion: approximately 57.8M
- Image size: 1024
- Batch size: 2
- Optimizer: AdamW
- Training framework: Ultralytics 8.4.107
- Early stopping: best result at stage-two epoch 6; stopped after epoch 10
- Hardware: NVIDIA GeForce RTX 5070 Ti 16 GB
Training data:
- DonkeySmall/Yolo-Text-Detection, MIT license.
- Food Packaging OCR Dataset v2, CC BY 4.0.
The Food Packaging training split contributed 8,730 unique images and 224,615 text boxes after removing ignored regions and exact duplicates. Its validation split was kept out of training.
Evaluation
All comparison runs used imgsz=1024, conf=0.05, and IoU 0.5.
| Dataset | Model | Precision | Recall | Tiny-text recall | Dense-page recall |
|---|---|---|---|---|---|
| Donkey test | YOLO11n baseline | 81.86% | 98.60% | 97.57% | 98.93% |
| Donkey test | YOLO26x-P2 | 80.62% | 97.74% | 96.60% | 98.37% |
| Packaging valid | YOLO11n baseline | 54.24% | 76.91% | 54.55% | 75.23% |
| Packaging valid | YOLO26x-P2 | 62.13% | 85.39% | 71.66% | 84.51% |
On the packaging holdout, YOLO26x-P2 improves tiny-text recall by 17.11 percentage points and reduces false positives by 19.79% relative to the YOLO11n baseline.
Ultralytics validation for the selected checkpoint reported:
- Precision: 95.19%
- Recall: 92.89%
- mAP50: 97.63%
- mAP50-95: 79.17%
These Ultralytics metrics and the comparison table use different evaluation contracts and should not be compared directly.
Limitations
- Outputs axis-aligned boxes, not oriented polygons.
- Optimized for high recall; threshold calibration is application-specific.
- Logos and decorative lettering may still produce false positives.
- Text recognition requires a separate OCR model.
- Validate crop padding and tile-boundary merging on your own layouts.
License
The checkpoint is published under AGPL-3.0 because it was produced with the Ultralytics training stack. Commercial or closed-source deployment may require an Ultralytics Enterprise License.
- Downloads last month
- 57

# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("average23/yolo26x-p2-packaging-text-detection") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True)