DonkeySmall/Yolo-Text-Detection
Updated โข 181 โข 5
Run RoyRud1902/yolo11n-text on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/RoyRud1902/yolo11n-text. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/RoyRud1902/yolo11n-text on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use RoyRud1902/yolo11n-text with ultralytics:
from huggingface_hub import hf_hub_download
from ultralytics import YOLO
# pick the weights file from this repo's "Files and versions" tab
weights = hf_hub_download("RoyRud1902/yolo11n-text", "<weights>.pt")
model = YOLO(weights)
source = 'http://images.cocodataset.org/val2017/000000039769.jpg'
model.predict(source=source, save=True)A fine-tuned YOLO11n model for detecting text regions in images. This model is optimized for detecting text bounding boxes in documents, screenshots, UI interfaces, and natural scene images.
This model is based on Ultralytics YOLO11n (nano variant) and has been fine-tuned specifically for text detection tasks. It detects text regions as bounding boxes, which can be used as input for OCR pipelines or UI automation tasks.
| Parameter | Value |
|---|---|
| Epochs | 50 |
| Batch Size | 16 |
| Image Size | 640 |
| Optimizer | SGD (auto) |
| Learning Rate | 0.01 โ 0.0003 |
| Momentum | 0.937 |
| Weight Decay | 0.0005 |
| Warmup Epochs | 3.0 |
| AMP | Enabled |
| Workers | 8 |
| Augmentation | Value |
|---|---|
| HSV Hue | 0.015 |
| HSV Saturation | 0.7 |
| HSV Value | 0.4 |
| Translation | 0.1 |
| Scale | 0.5 |
| Horizontal Flip | 0.5 |
| Mosaic | 1.0 |
| Erasing | 0.4 |
| Auto Augment | randaugment |
| Metric | Value |
|---|---|
| Precision | 95.7% |
| Recall | 93.6% |
| mAP@50 | 97.6% |
| mAP@50-95 | 81.8% |
| Box Loss | 0.619 |
| Class Loss | 0.376 |
| DFL Loss | 0.828 |
| Epoch | mAP@50 | mAP@50-95 | Precision | Recall |
|---|---|---|---|---|
| 1 | 89.1% | 64.3% | 86.0% | 82.7% |
| 10 | 95.9% | 76.8% | 93.5% | 90.7% |
| 20 | 96.9% | 79.5% | 94.8% | 92.0% |
| 30 | 97.3% | 80.8% | 95.1% | 93.1% |
| 40 | 97.6% | 81.5% | 95.6% | 93.5% |
| 50 | 97.6% | 81.8% | 95.7% | 93.6% |
pip install ultralytics
from ultralytics import YOLO
# Load the model
model = YOLO("best.pt")
# Run inference
results = model.predict(
source="image.jpg",
conf=0.25,
iou=0.7,
imgsz=640
)
# Process results
for result in results:
boxes = result.boxes
for box in boxes:
# Get bounding box coordinates (x1, y1, x2, y2)
xyxy = box.xyxy[0].tolist()
confidence = box.conf[0].item()
print(f"Text box: {xyxy}, confidence: {confidence:.2f}")
from ultralytics import YOLO
from pathlib import Path
model = YOLO("best.pt")
# Process folder of images
results = model.predict(
source="path/to/images/",
conf=0.25,
save=True, # Save annotated images
save_txt=True # Save YOLO format labels
)
from ultralytics import YOLO
model = YOLO("best.pt")
# Export to ONNX
model.export(format="onnx", imgsz=640, simplify=True)
# Export to TensorRT (for NVIDIA GPUs)
model.export(format="engine", imgsz=640, half=True)
# Export to CoreML (for Apple devices)
model.export(format="coreml", imgsz=640)
| File | Description |
|---|---|
best.pt |
Best checkpoint (highest mAP@50) |
args.yaml |
Training configuration |
results.csv |
Training metrics per epoch |
results.png |
Training curves visualization |
confusion_matrix.png |
Confusion matrix |
BoxPR_curve.png |
Precision-Recall curve |
| Parameter | Recommended | Description |
|---|---|---|
conf |
0.25 | Confidence threshold |
iou |
0.7 | NMS IoU threshold |
imgsz |
640-1024 | Input image size |
max_det |
300 | Maximum detections per image |
@software{yolo11n_text,
author = {Ultralytics},
title = {YOLO11n Text},
year = {2024},
publisher = {HuggingFace},
url = {https://huggingface.co/datasets/DonkeySmall/Yolo-Text-Detection}
}
@software{ultralytics_yolo,
author = {Jocher, Glenn and Chaurasia, Ayush and Qiu, Jing},
title = {Ultralytics YOLO},
year = {2023},
publisher = {GitHub},
url = {https://github.com/ultralytics/ultralytics}
}
This model is released under the Apache 2.0 License.