AlgerPlate is an open-source Algerian license plate recognition system that detects plates, extracts structured text, and serves the pipeline through a public demo and API
# AlgerPlate
**Live demo:**
tobni-algerplate.hf.space
---
## Architecture
Three-stage custom pipeline - no external OCR engine.
| Stage | Component | Detail | Latency |
|-------|-----------|--------|---------|
| Detection | YOLOv8s | mAP@50: 0.993 | ~150 ms |
| Segmentation | ensemble_voting_system() | 3 strategies + voting | ~30 ms |
| Classification | DigitClassifierTL CNN | 10-class digit classifier | ~50 ms |
| Repair | _apply_smart_repair() | Algerian plate domain rules | Accuracy measured with custom CNN digit classifier + ensemble
> segmentation. No external OCR engine used.
## API Quick Start
```bash
# Start the API
docker compose up
# Send a plate image
curl -X POST
localhost \
-F "file=@plate.jpg" | python3 -m json.tool
```
Expected response:
```json
{
"plates": [{
"wilaya": "16",
"serial": "123456",
"year": "2018",
"vehicule_type": "1",
"raw_text": "12345611816",
"seg_confidence": 0.89,
"det_conf": 0.97,
"confidence": 0.87,
"parse_success": true,
"error_msg": "",
"latency_ms": 420.5
}],
"total_latency_ms": 420.5,
"plate_count": 1
}
```