Instructions to use average23/yolo11x-text-detection-fork with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use average23/yolo11x-text-detection-fork 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/yolo11x-text-detection-fork") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Mirror fork of Daniil-Domino/yolo11x-text-detection
Browse files- .gitattributes +1 -0
- README.md +71 -0
- model.pt +3 -0
- train/F1_curve.png +3 -0
- train/PR_curve.png +0 -0
- train/P_curve.png +0 -0
- train/R_curve.png +3 -0
- train/args.yaml +106 -0
- train/confusion_matrix.png +0 -0
- train/confusion_matrix_normalized.png +0 -0
- train/results.png +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: agpl-3.0
|
| 3 |
+
datasets:
|
| 4 |
+
- ai-forever/school_notebooks_RU
|
| 5 |
+
language:
|
| 6 |
+
- ru
|
| 7 |
+
base_model:
|
| 8 |
+
- Ultralytics/YOLO11
|
| 9 |
+
library_name: ultralytics
|
| 10 |
+
library_version: 8.3.155
|
| 11 |
+
pipeline_tag: object-detection
|
| 12 |
+
tags:
|
| 13 |
+
- yolo
|
| 14 |
+
- yolo11
|
| 15 |
+
- yolo11x
|
| 16 |
+
- htr
|
| 17 |
+
- text-detection
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# Handwritten Russian Text Detection using YOLO11
|
| 21 |
+
|
| 22 |
+
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.
|
| 23 |
+
|
| 24 |
+
For more information, check out the [GitHub repository](https://github.com/DialecticalHTR/RuDialect-HTR).
|
| 25 |
+
|
| 26 |
+
## Model description
|
| 27 |
+
|
| 28 |
+
YOLO11x was fine-tuned for Handwritten Russian Text Detection in school notebooks.
|
| 29 |
+
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.
|
| 30 |
+
|
| 31 |
+
# Example Usage
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
# Load libraries
|
| 35 |
+
import cv2
|
| 36 |
+
from ultralytics import YOLO
|
| 37 |
+
from pathlib import Path
|
| 38 |
+
import matplotlib.pyplot as plt
|
| 39 |
+
from huggingface_hub import hf_hub_download
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
# Download model
|
| 43 |
+
model_path = hf_hub_download(repo_id="Daniil-Domino/yolo11x-text-detection", filename="model.pt")
|
| 44 |
+
|
| 45 |
+
# Load model
|
| 46 |
+
model = YOLO(model_path)
|
| 47 |
+
|
| 48 |
+
# Inference
|
| 49 |
+
image_path = "/path/to/image"
|
| 50 |
+
image = cv2.imread(image_path).copy()
|
| 51 |
+
output = model.predict(image, conf=0.3)
|
| 52 |
+
|
| 53 |
+
# Draw bounding boxes
|
| 54 |
+
out_image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
| 55 |
+
for data in output[0].boxes.data.tolist():
|
| 56 |
+
xmin, ymin, xmax, ymax, _, _ = map(int, data)
|
| 57 |
+
cv2.rectangle(out_image, (xmin, ymin), (xmax, ymax), color=(0, 0, 255), thickness=3)
|
| 58 |
+
|
| 59 |
+
# Display result
|
| 60 |
+
plt.figure(figsize=(15, 10))
|
| 61 |
+
plt.imshow(out_image)
|
| 62 |
+
plt.axis('off')
|
| 63 |
+
plt.show()
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
# Metrics
|
| 67 |
+
Below are the key evaluation metrics on the validation set:
|
| 68 |
+
- **Precision**: 0.929
|
| 69 |
+
- **Recall**: 0.937
|
| 70 |
+
- **mAP50**: 0.966
|
| 71 |
+
- **mAP50-95**: 0.725
|
model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4438352648519db15e8e1c19660eee472be486f69532d07838c8cb85cfb4b0a7
|
| 3 |
+
size 114390674
|
train/F1_curve.png
ADDED
|
Git LFS Details
|
train/PR_curve.png
ADDED
|
train/P_curve.png
ADDED
|
train/R_curve.png
ADDED
|
Git LFS Details
|
train/args.yaml
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
task: detect
|
| 2 |
+
mode: train
|
| 3 |
+
model: yolo11x.pt
|
| 4 |
+
data: /kaggle/working/data.yaml
|
| 5 |
+
epochs: 100
|
| 6 |
+
time: null
|
| 7 |
+
patience: 20
|
| 8 |
+
batch: 16
|
| 9 |
+
imgsz: 640
|
| 10 |
+
save: true
|
| 11 |
+
save_period: -1
|
| 12 |
+
cache: false
|
| 13 |
+
device:
|
| 14 |
+
- 0
|
| 15 |
+
- 1
|
| 16 |
+
workers: 8
|
| 17 |
+
project: null
|
| 18 |
+
name: train
|
| 19 |
+
exist_ok: true
|
| 20 |
+
pretrained: true
|
| 21 |
+
optimizer: AdamW
|
| 22 |
+
verbose: true
|
| 23 |
+
seed: 0
|
| 24 |
+
deterministic: true
|
| 25 |
+
single_cls: false
|
| 26 |
+
rect: false
|
| 27 |
+
cos_lr: true
|
| 28 |
+
close_mosaic: 10
|
| 29 |
+
resume: false
|
| 30 |
+
amp: true
|
| 31 |
+
fraction: 1.0
|
| 32 |
+
profile: false
|
| 33 |
+
freeze: null
|
| 34 |
+
multi_scale: false
|
| 35 |
+
overlap_mask: true
|
| 36 |
+
mask_ratio: 4
|
| 37 |
+
dropout: 0.1
|
| 38 |
+
val: true
|
| 39 |
+
split: val
|
| 40 |
+
save_json: false
|
| 41 |
+
conf: null
|
| 42 |
+
iou: 0.7
|
| 43 |
+
max_det: 300
|
| 44 |
+
half: false
|
| 45 |
+
dnn: false
|
| 46 |
+
plots: true
|
| 47 |
+
source: null
|
| 48 |
+
vid_stride: 1
|
| 49 |
+
stream_buffer: false
|
| 50 |
+
visualize: false
|
| 51 |
+
augment: false
|
| 52 |
+
agnostic_nms: false
|
| 53 |
+
classes: null
|
| 54 |
+
retina_masks: false
|
| 55 |
+
embed: null
|
| 56 |
+
show: false
|
| 57 |
+
save_frames: false
|
| 58 |
+
save_txt: false
|
| 59 |
+
save_conf: false
|
| 60 |
+
save_crop: false
|
| 61 |
+
show_labels: true
|
| 62 |
+
show_conf: true
|
| 63 |
+
show_boxes: true
|
| 64 |
+
line_width: null
|
| 65 |
+
format: torchscript
|
| 66 |
+
keras: false
|
| 67 |
+
optimize: false
|
| 68 |
+
int8: false
|
| 69 |
+
dynamic: false
|
| 70 |
+
simplify: true
|
| 71 |
+
opset: null
|
| 72 |
+
workspace: null
|
| 73 |
+
nms: false
|
| 74 |
+
lr0: 1.0e-05
|
| 75 |
+
lrf: 0.01
|
| 76 |
+
momentum: 0.937
|
| 77 |
+
weight_decay: 0.0005
|
| 78 |
+
warmup_epochs: 3.0
|
| 79 |
+
warmup_momentum: 0.8
|
| 80 |
+
warmup_bias_lr: 0.1
|
| 81 |
+
box: 7.5
|
| 82 |
+
cls: 0.5
|
| 83 |
+
dfl: 1.5
|
| 84 |
+
pose: 12.0
|
| 85 |
+
kobj: 1.0
|
| 86 |
+
nbs: 64
|
| 87 |
+
hsv_h: 0.015
|
| 88 |
+
hsv_s: 0.7
|
| 89 |
+
hsv_v: 0.4
|
| 90 |
+
degrees: 0.0
|
| 91 |
+
translate: 0.1
|
| 92 |
+
scale: 0.5
|
| 93 |
+
shear: 0.0
|
| 94 |
+
perspective: 0.0
|
| 95 |
+
flipud: 0.0
|
| 96 |
+
fliplr: 0.5
|
| 97 |
+
bgr: 0.0
|
| 98 |
+
mosaic: 1.0
|
| 99 |
+
mixup: 0.0
|
| 100 |
+
copy_paste: 0.0
|
| 101 |
+
copy_paste_mode: flip
|
| 102 |
+
auto_augment: randaugment
|
| 103 |
+
erasing: 0.4
|
| 104 |
+
cfg: null
|
| 105 |
+
tracker: botsort.yaml
|
| 106 |
+
save_dir: runs/detect/train
|
train/confusion_matrix.png
ADDED
|
train/confusion_matrix_normalized.png
ADDED
|
train/results.png
ADDED
|
Git LFS Details
|