Instructions to use Shadowzer0/Jawi_YOLO_Line_Detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use Shadowzer0/Jawi_YOLO_Line_Detector with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("Shadowzer0/Jawi_YOLO_Line_Detector", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
File size: 1,564 Bytes
79814f1 | 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 | ---
license: apache-2.0
tags:
- object-detection
- yolo
- ultralytics
- manuscript
- jawi
- arabic-script
- text-line-segmentation
- document-ai
pipeline_tag: object-detection
---
# Jawi Manuscript YOLO Text Line Detector
This model is a specialized **YOLO-based Text Line Detector** fine-tuned for high-precision bounding box extraction from historical and verified **Jawi (Arabic script)** manuscripts and document folios.
## Model Highlights
- **Architecture**: Ultralytics YOLO trained with document layout inductive biases.
- **Task**: Single-class dense text line detection and bounding box localization (`line`).
- **Target Script**: Jawi (Malay written in Arabic script).
- **Post-Processing Support**: Compatible with Right-to-Left (RTL) baseline reading order sorting and Horizontal Projection Profile (HPP) line splitting.
## Usage with Ultralytics
```python
from ultralytics import YOLO
from huggingface_hub import hf_hub_download
# Download best weights from Hugging Face Hub
weights_path = hf_hub_download(
repo_id="Shadowzer0/Jawi_YOLO_Line_Detector",
filename="best.pt"
)
# Load model and run inference
model = YOLO(weights_path)
results = model.predict("path/to/manuscript_page.jpg", conf=0.25, iou=0.45)
for box in results[0].boxes.xyxy:
x1, y1, x2, y2 = box.tolist()
print(f"Detected line: ({x1}, {y1}) -> ({x2}, {y2})")
```
## Integration with Karya Agung Pipeline
This model serves as the primary line segmenter for the **Karya Agung Jawi OCR & Transliteration Studio**.
|