LaMOP commited on
Commit
ccd9a70
·
verified ·
1 Parent(s): 2d532b4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +128 -1
README.md CHANGED
@@ -1,3 +1,130 @@
 
 
 
 
1
  ---
2
- license: cc0-1.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # **Fiche Technique : Modèle YOLOv26n,x (Ultralytics)**
2
+
3
+ *Version : 1.0 | Date : 22/05/2026*
4
+
5
  ---
6
+
7
+ ## ** Informations générales**
8
+
9
+ Modèles **YOLOv8** spécialisés pour la **segmentation de régions de texte (TextRegion) et de lignes de texte (TextLine)** dans des documents.
10
+
11
+ **Cas d'usage** : OCR, transcription automatique, analyse de documents patrimoniaux.
12
+
13
+ | **Champ** | **SegN** | **SegX**
14
+ |-------------------------|-----------------------------------|-----------------------------------
15
+ | **Nom du modèle** | `Yolo-Seg-TextRegion-TextLine-Typed-SegN.pt` | `Yolo-Seg-TextRegion-TextLine-Typed-SegX.pt`
16
+ | **Librairie** | Ultralytics YOLOv8.4.49 | Ultralytics YOLOv8.4.49
17
+ | **Type** | Segmentation d’instances | Segmentation d’instances
18
+ | **Architecture** | YOLOv8n (nano) | YOLOv8x (extra-large)
19
+ | **Taille des poids** | ~3.2 Mo | ~168 Mo
20
+ | **Résolution d’entrée** | 640x640 (par défaut) | 640x640 (par défaut)
21
+ | **Classes** | 2 (TextRegion, TextLine) | 2 (TextRegion, TextLine)
22
+ | **Framework** | PyTorch ≥ 2.0 | PyTorch ≥ 2.0
23
+ | **Licence** | CC-Zero | CC-Zero
24
+
25
  ---
26
+
27
+ ## ** Performances**
28
+
29
+
30
+ | **Métrique** | **Valeur SegN** | **Valeur SegX** |
31
+ | -------------- | ---------- | ---------- |
32
+ | mAP50-95 (val) | 73.62% | 76.97% |
33
+ | mAP50 (val) | 94.37% | 95.30% |
34
+ | Précision (P) | 0.930 | 0.95383 |
35
+ | Rappel (R) | 0.912 | 0.93317 |
36
+ | F1-Score | 0.921 | 0.943 |
37
+ ---
38
+
39
+
40
+ ## ** Dataset**
41
+
42
+ ### ** Composition**
43
+
44
+ - **Taille totale** : **4 956 images** (4 460 train / 496 val).
45
+ - **Sources** : **16 datasets publics** (voir [liste complète](#-sources-des-datasets)).
46
+ - **Langues couvertes** : Français, Anglais, Espagnol, Italien, Allemand, Latin, Corse, etc.
47
+ - **Périodes** : XVIe–XXe siècles (majorité : XVIIIe–XIXe).
48
+ - **Format d’annotation** : YOLO (fichiers `.txt` avec masques de segmentation).
49
+ - **Répartition des classes** :
50
+ - TextRegion : 9% (23195)
51
+ - TextLine : 91% (234634)
52
+
53
+ ---
54
+
55
+ ### ** Sources des Datasets**
56
+
57
+ [Ehri-dataset](https://github.com/FloChiff/ehri-dataset)
58
+ [CORDEL-CA-PRINT-19](https://github.com/FoNDUE-HTR/CORDEL-CA-PRINT-19/)
59
+ [CORDEL-ES-PRINT-19](https://github.com/FoNDUE-HTR/CORDEL-ES-PRINT-19)
60
+ [FONDUE-EN-PRINT-20](https://github.com/FoNDUE-HTR/FONDUE-EN-PRINT-20)
61
+ [FONDUE-ES-PRINT-19](https://github.com/FoNDUE-HTR/FONDUE-ES-PRINT-19)
62
+ [FONDUE-FR-PRINT-20](https://github.com/FoNDUE-HTR/FONDUE-FR-PRINT-20)
63
+ [FONDUE-IT-PRINT-20](https://github.com/FoNDUE-HTR/FONDUE-IT-PRINT-20)
64
+ [FONDUE-MLT-ART](https://github.com/FoNDUE-HTR/FONDUE-MLT-ART)
65
+ [FONDUE-MLT-CAT](https://github.com/FoNDUE-HTR/FONDUE-MLT-CAT/)
66
+ [Kat_57-SE-MSS-20](https://github.com/FoNDUE-HTR/Kat_57-SE-MSS-20)
67
+ [HTR-imprime-18e-siecle](https://github.com/Gallicorpora/HTR-imprime-18e-siecle)
68
+ [Cremma-16-17-print](https://github.com/HTR-United/cremma-16-17-print)
69
+ [Dahncorpus](https://github.com/HTR-United/dahncorpus)
70
+ [Tapuscorpus](https://github.com/HTR-United/tapuscorpus)
71
+ [NuBIS-OCR](https://github.com/ksefil/NuBIS-OCR)
72
+ [HN2021-OCR-Poesie-Corse](https://github.com/PSL-Chartes-HTR-Students/HN2021-OCR-Poesie-Corse)
73
+ [TNAH-2021-ArgusDesBrevets](https://github.com/PSL-Chartes-HTR-Students/TNAH-2021-ArgusDesBrevets)
74
+
75
+ ---
76
+
77
+ ## **📈 Courbes et visualisations**
78
+
79
+ - **Courbe PR (Precision-Recall)** :
80
+
81
+ Courbe PR pour le modèle SegN
82
+
83
+ ![Courbe PR SegN](Yolo-Seg-TextRegion-TextLine-Typed-SegN/BoxPR_curve.png)
84
+
85
+ Courbe PR pour le modèle SegX
86
+
87
+ ![Courbe PR SegX](Yolo-Seg-TextRegion-TextLine-Typed-SegX/BoxPR_curve.png)
88
+
89
+ - **Matrice de confusion** :
90
+
91
+ Confusion Matrix pour le modèle SegN
92
+
93
+ ![Confusion Matrix SegN](Yolo-Seg-TextRegion-TextLine-Typed-SegN/confusion_matrix_normalized.png)
94
+
95
+ Confusion Matrix pour le modèle SegX
96
+
97
+ ![Confusion Matrix SegN](Yolo-Seg-TextRegion-TextLine-Typed-SegX/confusion_matrix_normalized.png)
98
+
99
+
100
+ - **Exemple de détection** :
101
+
102
+ 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)
103
+
104
+ ![Exemple](ark_15733_nt07_BIS_00_01362_V03_0007.jpg)
105
+
106
+ ---
107
+
108
+ ## **🚀 **Utilisation****
109
+
110
+ ### ** Installation**
111
+
112
+ ```bash
113
+ pip install ultralytics==8.4.49 torch torchvision
114
+ ```
115
+
116
+ ### ** Inférence**
117
+
118
+ ```python
119
+ from ultralytics import YOLO
120
+
121
+ # Charger le modèle
122
+ model = YOLO("Yolo-Seg-TextRegion-TextLine-Typed-SegX.pt")
123
+
124
+ # Prédiction sur une image
125
+ results = model.predict("document.jpg", conf=0.5, show=True)
126
+
127
+ # Accéder aux masques de segmentation
128
+ for result in results:
129
+ masks = result.masks.data # Tensor des masques
130
+ boxes = result.boxes.data # Boîtes englobantes