Woolv7007's picture
Update README.md
28623ed verified
---
title: Egyptian ID Factory Number Extractor
emoji: ๐Ÿ†”
colorFrom: indigo
colorTo: blue
sdk: gradio
sdk_version: 5.35.0
app_file: app.py
pinned: false
---
# Egyptian ID Factory Number Extractor
This Hugging Face Space allows you to upload an Egyptian national ID card image and extracts the factory number (ุฑู‚ู… ุงู„ู…ุตู†ุน) using OCR and post-processing techniques.
---
## How It Works
* Uses EasyOCR (Arabic + English) to extract text from the full image.
* Cleans and corrects OCR mistakes (e.g., confusing `0` with `O`, `5` with `S`, etc.).
* Searches for patterns resembling the factory number format.
* Returns a structured JSON containing:
* `verified`: whether a factory number was detected.
* `factory_number`: the extracted factory number (if found).
* `message`: additional feedback.
---
## Output Format
```json
{
"verified": true,
"factory_number": "SG1234567",
"message": "Factory number extracted successfully."
}
```
---
## Configuration
* No API keys or external services required.
* All settings and OCR logic are hardcoded and self-contained.
* Just upload the image; the system handles the rest.
---
## Usage
1. Upload a clear photo of the Egyptian ID card.
2. The system will process and extract the factory number.
3. JSON result will be shown in the output box.
---
## Limitations
* Works best with high-resolution, well-lit ID card images.
* Only extracts the **factory number**, **not** the national ID.
---
## Requirements
Installed automatically via `requirements.txt`:
* Gradio
* EasyOCR
* NumPy
* OpenCV (headless)
---
## ๐Ÿ‘ค Author
Developed by \[Wolv].