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.
1from ultralytics import YOLO
2
3# Load the model
4model = YOLO("best.pt")
5
6# Run inference
7results = model.predict(
8 source="image.jpg",
9 conf=0.25,
10 iou=0.7,
11 imgsz=640
12)
13
14# Process results
15for result in results:
16 boxes = result.boxes
17 for box in boxes:
18 # Get bounding box coordinates (x1, y1, x2, y2)
19 xyxy = box.xyxy[0].tolist()
20 confidence = box.conf[0].item()
21 print(f"Text box: {xyxy}, confidence: {confidence:.2f}")
1from ultralytics import YOLO
2from pathlib import Path
3
4model = YOLO("best.pt")
5
6# Process folder of images
7results = model.predict(
8 source="path/to/images/",
9 conf=0.25,
10 save=True, # Save annotated images
11 save_txt=True # Save YOLO format labels
12)
1from ultralytics import YOLO
2
3model = YOLO("best.pt")
4
5# Export to ONNX
6model.export(format="onnx", imgsz=640, simplify=True)
7
8# Export to TensorRT (for NVIDIA GPUs)
9model.export(format="engine", imgsz=640, half=True)
10
11# Export to CoreML (for Apple devices)
12model.export(format="coreml", imgsz=640)
1@software{yolo11n_text,
2 author = {Ultralytics},
3 title = {YOLO11n Text},
4 year = {2024},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/datasets/DonkeySmall/Yolo-Text-Detection}
7}
8
9@software{ultralytics_yolo,
10 author = {Jocher, Glenn and Chaurasia, Ayush and Qiu, Jing},
11 title = {Ultralytics YOLO},
12 year = {2023},
13 publisher = {GitHub},
14 url = {https://github.com/ultralytics/ultralytics}
15}
This model is released under the
Apache 2.0 License.