🇪🇬 Egyptian Banknote Detector
Overview
An object detection model built using YOLO11 to detect and recognize Egyptian banknotes in images.
The model can detect multiple banknotes in a single image, identify their denominations, and provide bounding boxes around detected notes.
Supported Denominations
| Class | Value |
|---|---|
| 0.5_EGP | 0.5 EGP |
| 1_EGP | 1 EGP |
| 5_EGP | 5 EGP |
| 10_EGP | 10 EGP |
| 20_EGP | 20 EGP |
| 50_EGP | 50 EGP |
| 100_EGP | 100 EGP |
| 200_EGP | 200 EGP |
Model Information
- Architecture: YOLO11
- Model variant: YOLO11n
- Task: Object Detection
- Framework: Ultralytics
- Input: Images
- Output: Bounding boxes, class labels, confidence scores
Installation
pip install ultralytics huggingface_hub
Usage
from ultralytics import YOLO
from huggingface_hub import hf_hub_download
# Download model weights
model_path = hf_hub_download(
repo_id="Gemy1/egyptian-banknote-detector",
filename="best.pt"
)
# Load model
model = YOLO(model_path)
# Detect banknotes
results = model.predict(
source="banknotes.jpg",
conf=0.25
)
# Display predictions
results[0].show()
Money Counting
The model predictions can be used to count each denomination and calculate the total amount.
denominations = {
"0.5_EGP": 0.5,
"1_EGP": 1,
"5_EGP": 5,
"10_EGP": 10,
"20_EGP": 20,
"50_EGP": 50,
"100_EGP": 100,
"200_EGP": 200
}
counts = {name: 0 for name in denominations}
for box in results[0].boxes:
class_id = int(box.cls[0])
class_name = model.names[class_id]
if class_name in counts:
counts[class_name] += 1
total = sum(
counts[name] * denominations[name]
for name in counts
)
print("Banknote counts:", counts)
print("Total:", total, "EGP")
Dataset
The model was trained using an Egyptian currency image dataset.
Synthetic images containing multiple banknotes were generated to create object detection training examples and YOLO bounding-box annotations.
Limitations
- Performance may vary with lighting, image quality, and banknote orientation.
- Overlapping banknotes may be difficult to detect.
- The model should be evaluated on real-world photographs before practical use.
- This is an experimental computer vision project, not a certified currency verification system.
License
Apache-2.0 (subject to the licensing rights of the training data and pretrained weights).
Author
Developed as an Egyptian currency detection and money counting computer vision project.