EfficientNetB0 Bangladeshi Currency Classifier

Model Description

This is a fine-tuned EfficientNetB0 model trained for classifying Bangladeshi paper currency denominations. The model achieves 100% accuracy on the validation set.

Model Details

  • Model Type: EfficientNetB0
  • Task: Image Classification
  • Training Data: 3,278 images of Bangladeshi currency
  • Validation Data: 934 images
  • Test Data: 478 images
  • Number of Classes: 9
  • Training Epochs: 50
  • Device: CUDA (GPU)
  • Final Accuracy: 100%

Supported Currency Denominations

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

Training Details

  • Model Base: EfficientNetB0 (pretrained on ImageNet)
  • Optimizer: Adam
  • Learning Rate: 0.001
  • Batch Size: 32
  • Loss Function: CrossEntropyLoss
  • Data Augmentation: None
  • Early Stopping: Disabled
  • Convergence: Epoch 2 (achieved 100% accuracy)

Performance Metrics

Final Results

  • Train Loss: 4.63 × 10⁻⁷
  • Train Accuracy: 100.0%
  • Validation Loss: 3.98 × 10⁻⁷
  • Validation Accuracy: 100.0%

How to Use

Installation

pip install torch torchvision pillow

Basic Usage

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}")

Using from Hugging Face Hub

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()

Input Format

  • Image Size: 224 × 224 pixels (resized from variable sizes)
  • Color Channels: RGB (3 channels)
  • Normalization: ImageNet normalization
    • Mean: [0.485, 0.456, 0.406]
    • Std: [0.229, 0.224, 0.225]

Limitations

  • The model is trained specifically on Bangladeshi currency images
  • It may not perform well on:
    • Heavily damaged or worn currency
    • Non-standard lighting conditions
    • Currency images at extreme angles
    • Other countries' currency

Training Data

The model was trained on a dataset of naturally photographed Bangladeshi paper currency images, providing robust real-world performance.

Future Improvements

Potential enhancements could include:

  • Data augmentation for better robustness
  • Multi-angle and multi-lighting condition samples
  • Damaged currency detection
  • Real-time video stream processing

Citation

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}}
}

License

MIT License

Author

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.

Downloads last month
3
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support