benji990 LaMOP commited on
Commit
e99959c
·
0 Parent(s):

Duplicate from LaMOP/Yolo-Seg-TextRegion-TextLine-Typed

Browse files

Co-authored-by: LaMOP <LaMOP@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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
+ Yolo-Seg-TextRegion-TextLine-Typed-SegN/BoxPR_curve.png filter=lfs diff=lfs merge=lfs -text
37
+ Yolo-Seg-TextRegion-TextLine-Typed-SegN/confusion_matrix_normalized.png filter=lfs diff=lfs merge=lfs -text
38
+ Yolo-Seg-TextRegion-TextLine-Typed-SegX/BoxPR_curve.png filter=lfs diff=lfs merge=lfs -text
39
+ Yolo-Seg-TextRegion-TextLine-Typed-SegX/confusion_matrix_normalized.png filter=lfs diff=lfs merge=lfs -text
40
+ ark_15733_nt07_BIS_00_01362_V03_0007.jpg filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc0-1.0
3
+ base_model:
4
+ - Ultralytics/YOLO26
5
+ pipeline_tag: image-segmentation
6
+ tags:
7
+ - document-layout
8
+ - yolo
9
+ - document-layout-analysis
10
+ ---
11
+ # **Fiche Technique : Modèles YOLOv26n,x (Ultralytics)**
12
+
13
+ *Version : 1.0 | Date : 22/05/2026*
14
+
15
+ ---
16
+
17
+ ## **Informations générales**
18
+
19
+ Modèles **YOLOv26** spécialisés pour la **segmentation de régions de texte (TextRegion) et de lignes de texte (TextLine)** dans des documents.
20
+
21
+ **Cas d'usage** : OCR, transcription automatique, analyse de documents patrimoniaux.
22
+
23
+ | **Champ** | **SegN** | **SegX**
24
+ |-------------------------|-----------------------------------|-----------------------------------
25
+ | **Nom du modèle** | `Yolo-Seg-TextRegion-TextLine-Typed-SegN.pt` | `Yolo-Seg-TextRegion-TextLine-Typed-SegX.pt`
26
+ | **Librairie** | Ultralytics YOLOv8.4.49 | Ultralytics YOLOv8.4.49
27
+ | **Type** | Segmentation d’instances | Segmentation d’instances
28
+ | **Architecture** | YOLOv26n (nano) | YOLOv26x (extra-large)
29
+ | **Taille des poids** | ~6.6 Mo | ~141 Mo
30
+ | **Résolution d’entrée** | 640x640 (par défaut) | 640x640 (par défaut)
31
+ | **Classes** | 2 (TextRegion, TextLine) | 2 (TextRegion, TextLine)
32
+ | **Framework** | PyTorch ≥ 2.0 | PyTorch ≥ 2.0
33
+ | **Licence** | CC-Zero | CC-Zero
34
+
35
+ ---
36
+
37
+ ## **Performances**
38
+
39
+
40
+ | **Métrique** | **Valeur SegN** | **Valeur SegX** |
41
+ | -------------- | ---------- | ---------- |
42
+ | mAP50-95 (val) | 73.62% | 76.97% |
43
+ | mAP50 (val) | 94.37% | 95.30% |
44
+ | Précision (P) | 0.930 | 0.95383 |
45
+ | Rappel (R) | 0.912 | 0.93317 |
46
+ | F1-Score | 0.921 | 0.943 |
47
+ ---
48
+
49
+
50
+ ## **Dataset**
51
+
52
+ ### **Composition**
53
+
54
+ - **Taille totale** : **4 956 images** (4 460 train / 496 val).
55
+ - **Sources** : **16 datasets publics** (voir [liste complète](#-sources-des-datasets)).
56
+ - **Langues couvertes** : Français, Anglais, Espagnol, Italien, Allemand, Latin, Corse, etc.
57
+ - **Périodes** : XVIe–XXe siècles (majorité : XVIIIe–XIXe).
58
+ - **Format d’annotation** : YOLO (fichiers `.txt` avec masques de segmentation).
59
+ - **Répartition des classes** :
60
+ - TextRegion : 9% (23195)
61
+ - TextLine : 91% (234634)
62
+
63
+ ---
64
+
65
+ ### **Sources des Datasets**
66
+
67
+ [Ehri-dataset](https://github.com/FloChiff/ehri-dataset)
68
+
69
+ [CORDEL-CA-PRINT-19](https://github.com/FoNDUE-HTR/CORDEL-CA-PRINT-19/)
70
+
71
+ [CORDEL-ES-PRINT-19](https://github.com/FoNDUE-HTR/CORDEL-ES-PRINT-19)
72
+
73
+ [FONDUE-EN-PRINT-20](https://github.com/FoNDUE-HTR/FONDUE-EN-PRINT-20)
74
+
75
+ [FONDUE-ES-PRINT-19](https://github.com/FoNDUE-HTR/FONDUE-ES-PRINT-19)
76
+
77
+ [FONDUE-FR-PRINT-20](https://github.com/FoNDUE-HTR/FONDUE-FR-PRINT-20)
78
+
79
+ [FONDUE-IT-PRINT-20](https://github.com/FoNDUE-HTR/FONDUE-IT-PRINT-20)
80
+
81
+ [FONDUE-MLT-ART](https://github.com/FoNDUE-HTR/FONDUE-MLT-ART)
82
+
83
+ [FONDUE-MLT-CAT](https://github.com/FoNDUE-HTR/FONDUE-MLT-CAT/)
84
+
85
+ [Kat_57-SE-MSS-20](https://github.com/FoNDUE-HTR/Kat_57-SE-MSS-20)
86
+
87
+ [HTR-imprime-18e-siecle](https://github.com/Gallicorpora/HTR-imprime-18e-siecle)
88
+
89
+ [Cremma-16-17-print](https://github.com/HTR-United/cremma-16-17-print)
90
+
91
+ [Dahncorpus](https://github.com/HTR-United/dahncorpus)
92
+
93
+ [Tapuscorpus](https://github.com/HTR-United/tapuscorpus)
94
+
95
+ [NuBIS-OCR](https://github.com/ksefil/NuBIS-OCR)
96
+
97
+ [HN2021-OCR-Poesie-Corse](https://github.com/PSL-Chartes-HTR-Students/HN2021-OCR-Poesie-Corse)
98
+
99
+ [TNAH-2021-ArgusDesBrevets](https://github.com/PSL-Chartes-HTR-Students/TNAH-2021-ArgusDesBrevets)
100
+
101
+ ---
102
+
103
+ ## **Courbes et visualisations**
104
+
105
+ - **Courbe PR (Precision-Recall)** :
106
+
107
+ Courbe PR pour le modèle SegN
108
+
109
+ ![Courbe PR SegN](Yolo-Seg-TextRegion-TextLine-Typed-SegN/BoxPR_curve.png)
110
+
111
+ Courbe PR pour le modèle SegX
112
+
113
+ ![Courbe PR SegX](Yolo-Seg-TextRegion-TextLine-Typed-SegX/BoxPR_curve.png)
114
+
115
+ - **Matrice de confusion** :
116
+
117
+ Confusion Matrix pour le modèle SegN
118
+
119
+ ![Confusion Matrix SegN](Yolo-Seg-TextRegion-TextLine-Typed-SegN/confusion_matrix_normalized.png)
120
+
121
+ Confusion Matrix pour le modèle SegX
122
+
123
+ ![Confusion Matrix SegN](Yolo-Seg-TextRegion-TextLine-Typed-SegX/confusion_matrix_normalized.png)
124
+
125
+
126
+ - **Exemple de détection** :
127
+
128
+ Exemple sur la thèse **Relief, érosion différentielle et morphogenèse dans un bourrelet montagneux de haute latitude : Lofoten-vesteralen et Sogn-Jotun (Norvège)** de Jean-Pierre Peulvast disponible sur le site de la [Nubis](https://nubis.bis-sorbonne.fr/ark:/15733/nt07?view=full)
129
+
130
+ ![Exemple](ark_15733_nt07_BIS_00_01362_V03_0007.jpg)
131
+
132
+ ---
133
+
134
+ ## **Utilisation****
135
+
136
+ ### **Installation**
137
+
138
+ ```bash
139
+ pip install ultralytics==8.4.49 torch torchvision
140
+ ```
141
+
142
+ ### **Inférence**
143
+
144
+ ```python
145
+ from ultralytics import YOLO
146
+
147
+ # Charger le modèle
148
+ model = YOLO("Yolo-Seg-TextRegion-TextLine-Typed-SegX.pt")
149
+
150
+ # Prédiction sur une image
151
+ results = model.predict("document.jpg", conf=0.5, show=True)
152
+
153
+ # Accéder aux masques de segmentation
154
+ for result in results:
155
+ masks = result.masks.data # Tensor des masques
156
+ boxes = result.boxes.data # Boîtes englobantes
157
+
158
+ ```
159
+
160
+ ## Remerciements:
161
+
162
+ Nous remercions l’Institut Jacques Monod pour la fourniture des ressources informatiques et de traitement des données nécessaires à ce travail.
Yolo-Seg-TextRegion-TextLine-Typed-SegN.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5850b653a9e37295cc807416cdd2e78d9fe6b836d007224e2c9455b59505cdf0
3
+ size 6559453
Yolo-Seg-TextRegion-TextLine-Typed-SegN/.~lock.results.csv# ADDED
@@ -0,0 +1 @@
 
 
1
+ ,pierre,xxxxxxxxxx,22.05.2026 11:52,file:///home/pierre/.config/libreoffice/4;
Yolo-Seg-TextRegion-TextLine-Typed-SegN/BoxPR_curve.png ADDED

Git LFS Details

  • SHA256: 0f44b04bdb8026b361d485b4b06ede1637ccc6cccdd2df3253709bdd35200d35
  • Pointer size: 131 Bytes
  • Size of remote file: 120 kB
Yolo-Seg-TextRegion-TextLine-Typed-SegN/confusion_matrix_normalized.png ADDED

Git LFS Details

  • SHA256: e1d0d1f9f46cd27a0f416ebe65d599a07e00cf4a050fb20508c66522cf6e51fb
  • Pointer size: 131 Bytes
  • Size of remote file: 125 kB
Yolo-Seg-TextRegion-TextLine-Typed-SegX.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8347e4cd50f3aa9654d712f6928e68aad9bf0592b79d5f2b073d05331a9ae25
3
+ size 141742085
Yolo-Seg-TextRegion-TextLine-Typed-SegX/BoxPR_curve.png ADDED

Git LFS Details

  • SHA256: 8b3c3e76497a05836aabd4d6d91f11d0e41d2145f948f02a2b02ccf992074025
  • Pointer size: 131 Bytes
  • Size of remote file: 115 kB
Yolo-Seg-TextRegion-TextLine-Typed-SegX/confusion_matrix_normalized.png ADDED

Git LFS Details

  • SHA256: 1023488ac752436c01aa8580e32e040f21be2d2349d8ec083694922beba09817
  • Pointer size: 131 Bytes
  • Size of remote file: 124 kB
ark_15733_nt07_BIS_00_01362_V03_0007.jpg ADDED

Git LFS Details

  • SHA256: 48dadfaf216abe91963508f4aaf7f3307aab0ea38ac23b3c027f6231739b8e91
  • Pointer size: 132 Bytes
  • Size of remote file: 1.86 MB