File size: 3,480 Bytes
6ffb3dd
 
dfe88d3
 
 
 
 
 
 
6ffb3dd
dfe88d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
license: cc0-1.0
base_model:
- Ultralytics/YOLO26
pipeline_tag: image-segmentation
tags:
- document-layout
- yolo
- document-layout-analysis
---
# **Fiche Technique : Modèles YOLOv26n,x (Ultralytics)**

*Version : 1.0 | Date : 22/05/2026*

---

## **Informations générales**

Modèles **YOLOv26** spécialisés pour la **segmentation de régions de texte (TextRegion) et de lignes de texte (TextLine)** dans des manuscrits médievaux.

**Cas d'usage** : HTR.

| **Champ**               | **SegN**                          | **SegX**                          
|-------------------------|-----------------------------------|-----------------------------------
| **Nom du modèle**       | `Yolo-Seg-TextRegion-TextLine-Manuscript-SegN.pt` | `Yolo-Seg-TextRegion-TextLine-Manuscript-SegX.pt` 
| **Librairie**           | Ultralytics YOLOv8.4.49           | Ultralytics YOLOv8.4.49           
| **Type**                | Segmentation d’instances         | Segmentation d’instances         
| **Architecture**        | YOLOv26n (nano)                    | YOLOv26x (extra-large)             
| **Taille des poids**    | ~6.6 Mo                           | ~141 Mo                           
| **Résolution d’entrée** | 640x640 (par défaut)              | 640x640 (par défaut)              
| **Classes**             | 2 (TextRegion, TextLine)          | 2 (TextRegion, TextLine)          
| **Framework**           | PyTorch ≥ 2.0                     | PyTorch ≥ 2.0                     
| **Licence**             | CC-Zero              | CC-Zero              

---

## **Performances**


| **Métrique**   | **Valeur SegN** | **Valeur SegX** |
| -------------- | ---------- | ---------- |
| mAP50-95 (val) | 63.98%     | 68.73%    |
| mAP50 (val)    | 82.25%     | 84.92%    |
| Précision (P)  | 0.88186      | 0.90743   |
| Rappel (R)     | 0.76673      | 0.80739   |

---


## **Dataset**

### **Composition**

- **Taille totale** : **6599 images** (5279 train / 1320 val).
- **Format d’annotation** : YOLO (fichiers `.txt` avec masques de segmentation).

---



---

## **Courbes et visualisations**

- **Courbe PR (Precision-Recall)** :  

Courbe PR pour le modèle SegN

![Courbe PR SegN](Yolo-Seg-TextRegion-TextLine-Manuscript-SegN/BoxPR_curve.png)

Courbe PR pour le modèle SegX

![Courbe PR SegX](Yolo-Seg-TextRegion-TextLine-Manuscript-SegX/BoxPR_curve.png)

- **Matrice de confusion** :  

Confusion Matrix pour le modèle SegN

![Confusion Matrix SegN](Yolo-Seg-TextRegion-TextLine-Manuscript-SegN/confusion_matrix_normalized.png)

Confusion Matrix pour le modèle SegX

![Confusion Matrix SegN](Yolo-Seg-TextRegion-TextLine-Manuscript-SegX/confusion_matrix_normalized.png)


- **Exemple de détection** :  

Exemple sur le manuscrit "FRAD052_8H033_0043, Arch. dép. Haute-Marne, 8 H 33, Vrécourt n°7", disponible sur l'entrepôt de données [Nakala](https://nakala.fr/10.34847/nkl.b6ca1k68)

![Exemple](FRAD052_8H033_0043.jpg)

---

## **Utilisation****

### **Installation**

```bash
pip install ultralytics==8.4.49 torch torchvision
```

### **Inférence**

```python
from ultralytics import YOLO

# Charger le modèle
model = YOLO("Yolo-Seg-TextRegion-TextLine-Manuscript-SegX.pt")

# Prédiction sur une image
results = model.predict("document.jpg", conf=0.5, show=True)

# Accéder aux masques de segmentation
for result in results:
    masks = result.masks.data  # Tensor des masques
    boxes = result.boxes.data   # Boîtes englobantes