LaMOP's picture
Update README.md
dfe88d3 verified
---
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