Instructions to use Drew2456/MyanNet-V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Drew2456/MyanNet-V1 with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://Drew2456/MyanNet-V1") - Notebooks
- Google Colab
- Kaggle
MyanNet V1
A Lightweight CNN for Burmese Handwritten Digit Recognition
TensorFlow • Keras • TensorFlow Lite • Edge AI
Overview
MyanNet V1 is a lightweight convolutional neural network (CNN) developed for Burmese handwritten digit recognition. The model was designed to achieve an excellent balance between recognition accuracy and computational efficiency, making it suitable for deployment on mobile, embedded, and resource-constrained devices.
Instead of maximizing accuracy through increasingly deeper networks, MyanNet V1 focuses on reducing computational complexity while maintaining competitive performance. The architecture combines depthwise separable convolutions, batch normalization, global average pooling, and dropout regularization to produce a compact yet highly effective classifier.
The model was trained and evaluated on the Burmese Handwritten Digit Dataset (BHDD), containing 87,561 handwritten digit images across ten Burmese numeral classes.
Model Highlights
| Property | Value |
|---|---|
| Task | Burmese Handwritten Digit Recognition |
| Framework | TensorFlow / Keras |
| Input Size | 28 × 28 Grayscale |
| Classes | 10 (၀–၉) |
| Trainable Parameters | 10,634 |
| Test Accuracy | 99.49% |
| 5-Fold CV Accuracy | 99.46% ± 0.06% |
| Quantized Model Size | 24.18 KB |
| Average CPU Inference | 0.263 ms/image |
| License | Apache-2.0 |
Architecture
MyanNet V1 follows a compact two-stage convolutional architecture optimized for lightweight deployment.
Feature Extractor
- Standard Convolution
- Batch Normalization
- Max Pooling
- Depthwise Separable Convolution
- Batch Normalization
- Max Pooling
Classification Head
- Global Average Pooling
- Dropout
- Fully Connected Layer
- Softmax Output
The architecture significantly reduces parameter count while preserving classification accuracy.
Performance Comparison
MyanNet V1 achieves competitive accuracy while reducing the number of trainable parameters by approximately 69.5% compared to the baseline CNN.
| Model | Parameters | Accuracy |
|---|---|---|
| Baseline CNN | 34,826 | 99.58% |
| GAP-BN CNN | 21,418 | 99.51% |
| MyanNet V1 | 10,634 | 99.49% |
Training Curves
The training and validation curves demonstrate stable convergence with minimal overfitting.
Confusion Matrix
The confusion matrix shows strong classification performance across all Burmese digit classes.
5-Fold Cross Validation
The model was evaluated using stratified five-fold cross validation to assess robustness and generalization.
| Metric | Value |
|---|---|
| Mean Accuracy | 99.46% |
| Standard Deviation | 0.06% |
Sample Predictions
Example handwritten digit samples from the BHDD dataset.
Failure Cases
Representative misclassified samples produced by MyanNet V1.
Although misclassifications are rare, they primarily occur for ambiguous handwriting styles and visually similar digit shapes.
Dataset
The model was trained and evaluated on the Burmese Handwritten Digit Dataset (BHDD).
Dataset Summary:
- 87,561 handwritten digit images
- 10 Burmese digit classes (၀–၉)
- 28 × 28 grayscale images
- MNIST-compatible format
Training Split:
- 60,000 balanced training images
Testing Split:
- 27,561 naturally imbalanced testing images
Please obtain the dataset from the official BHDD repository.
Usage
TensorFlow / Keras
import tensorflow as tf
model = tf.keras.models.load_model("myannet_best.keras")
prediction = model.predict(image)
TensorFlow Lite
import tensorflow as tf
import numpy as np
interpreter = tf.lite.Interpreter(
model_path="myannet_quantized.tflite"
)
interpreter.allocate_tensors()
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()
image = np.expand_dims(image / 255.0, axis=(0, -1)).astype(np.float32)
interpreter.set_tensor(input_details[0]["index"], image)
interpreter.invoke()
prediction = interpreter.get_tensor(output_details[0]["index"])
Intended Applications
MyanNet V1 is suitable for:
- Burmese handwriting recognition
- Educational software
- Mobile OCR systems
- Embedded AI devices
- Edge computing
- Research benchmarking
Limitations
MyanNet V1 was trained exclusively on isolated handwritten Burmese digits contained in the BHDD dataset.
The model has not been evaluated on:
- Printed Burmese text
- Burmese characters
- Burmese words or sentences
- Historical manuscripts
- Camera-captured documents
- General OCR tasks
Performance outside the BHDD domain may differ significantly.
Version Information
This repository contains the original public release of MyanNet (Version 1).
Version 1 established the lightweight CNN architecture and serves as the baseline for future iterations.
Future versions aim to improve:
- Model compactness
- Computational efficiency
- Robustness
- Recognition performance
- Support for larger Burmese OCR tasks
Citation
If you use MyanNet V1 in your research, please cite:
@software{maung2026myannetv1,
author = {Ah Maung Oo},
title = {MyanNet V1: A Lightweight CNN for Burmese Handwritten Digit Recognition},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/Drew2456/MyanNet-V1}
}
Once the associated journal paper is published, this citation will be updated with the official publication.
Acknowledgements
- BHDD dataset by Swan Htet Aung et al.
- TensorFlow & Keras
- Optuna for hyperparameter optimization
- The open-source machine learning community
⭐ If you find MyanNet V1 useful, please consider starring the GitHub repository and citing this work in your research.
- Downloads last month
- 9