average23's picture
Mirror fork of Daniil-Domino/yolo11x-text-detection
2e4b4f4 verified
|
Raw
History Blame Contribute Delete
1.83 kB
---
license: agpl-3.0
datasets:
- ai-forever/school_notebooks_RU
language:
- ru
base_model:
- Ultralytics/YOLO11
library_name: ultralytics
library_version: 8.3.155
pipeline_tag: object-detection
tags:
- yolo
- yolo11
- yolo11x
- htr
- text-detection
---
# Handwritten Russian Text Detection using YOLO11
YOLO11x was fine-tuned on the [School Notebooks Dataset](https://huggingface.co/datasets/ai-forever/school_notebooks_RU) and an additional dataset of over 30 images containing printed text.
For more information, check out the [GitHub repository](https://github.com/DialecticalHTR/RuDialect-HTR).
## Model description
YOLO11x was fine-tuned for Handwritten Russian Text Detection in school notebooks.
The model was trained for 100 epochs with a batch size of 16 using dual NVIDIA T4 GPUs. The fine-tuning process took approximately 93 minutes.
# Example Usage
```python
# Load libraries
import cv2
from ultralytics import YOLO
from pathlib import Path
import matplotlib.pyplot as plt
from huggingface_hub import hf_hub_download
# Download model
model_path = hf_hub_download(repo_id="Daniil-Domino/yolo11x-text-detection", filename="model.pt")
# Load model
model = YOLO(model_path)
# Inference
image_path = "/path/to/image"
image = cv2.imread(image_path).copy()
output = model.predict(image, conf=0.3)
# Draw bounding boxes
out_image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
for data in output[0].boxes.data.tolist():
xmin, ymin, xmax, ymax, _, _ = map(int, data)
cv2.rectangle(out_image, (xmin, ymin), (xmax, ymax), color=(0, 0, 255), thickness=3)
# Display result
plt.figure(figsize=(15, 10))
plt.imshow(out_image)
plt.axis('off')
plt.show()
```
# Metrics
Below are the key evaluation metrics on the validation set:
- **Precision**: 0.929
- **Recall**: 0.937
- **mAP50**: 0.966
- **mAP50-95**: 0.725