Downloads · 30 days
7
15% of all-time downloads
Raihanx09/efficientnetb0-bangladeshi-currency
efficientnetb0-bangladeshi-currency is a machine learning model from Raihanx09. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as mit.
This is a fine-tuned EfficientNetB0 model trained for classifying Bangladeshi paper currency denominations. The model achieves 100% accuracy on the validation set.
Downloads · 30 days
7
15% of all-time downloads
All-time downloads
46
Public
Repo size
32.8 MB
Likes
0
Public
Click a slice to open those files.
.pth16.4 MB · 50%
From the Hugging Face model README
This is a fine-tuned EfficientNetB0 model trained for classifying Bangladeshi paper currency denominations. The model achieves 100% accuracy on the validation set.
The model can classify the following Bangladeshi Taka denominations:
| Class ID | Denomination |
|---|---|
| 0 | 10 Taka |
| 1 | 100 Taka |
| 2 | 1000 Taka |
| 3 | 2 Taka |
| 4 | 20 Taka |
| 5 | 200 Taka |
| 6 | 5 Taka |
| 7 | 50 Taka |
| 8 | 500 Taka |
pip install torch torchvision pillow
import torch
from torchvision import transforms
from PIL import Image
# Load the model
model = torch.load('model.pth')
model.eval()
# Prepare the image
transform = transforms.Compose([
transforms.Resize((256, 256)),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225])
])
# Load and preprocess image
image = Image.open('currency.jpg').convert('RGB')
image_tensor = transform(image).unsqueeze(0)
# Make prediction
with torch.no_grad():
outputs = model(image_tensor)
probabilities = torch.softmax(outputs, dim=1)
predicted_class = torch.argmax(probabilities, dim=1).item()
confidence = probabilities[0, predicted_class].item()
# Currency mapping
currencies = {
0: '10 Taka',
1: '100 Taka',
2: '1000 Taka',
3: '2 Taka',
4: '20 Taka',
5: '200 Taka',
6: '5 Taka',
7: '50 Taka',
8: '500 Taka'
}
print(f"Predicted: {currencies[predicted_class]}")
print(f"Confidence: {confidence:.4f}")
import torch
from transformers import AutoModel, AutoImageProcessor
# Load model and processor
model = AutoModel.from_pretrained("your-username/efficientnetb0-bangladeshi-currency")
processor = AutoImageProcessor.from_pretrained("your-username/efficientnetb0-bangladeshi-currency")
from PIL import Image
image = Image.open('currency.jpg')
# Process and predict
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
predicted_label = logits.argmax(-1).item()
The model was trained on a dataset of naturally photographed Bangladeshi paper currency images, providing robust real-world performance.
Potential enhancements could include:
If you use this model, please cite:
@misc{efficientnetb0_bangladeshi_currency,
title={EfficientNetB0 Bangladeshi Currency Classifier},
author={Your Name},
year={2026},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/your-username/efficientnetb0-bangladeshi-currency}}
}
MIT License
Created for currency classification system (IOT Model Training Project)
Note: This model was trained using PyTorch and is compatible with PyTorch-based inference systems. For production deployment, consider using ONNX export for better cross-platform compatibility.