Drew2456 commited on
Commit
b41e94c
·
verified ·
1 Parent(s): 85ac030

Update README.md

Browse files

update model card
![banner](https://cdn-uploads.huggingface.co/production/uploads/6a13f39ca70acf0fc1409b77/3gzxpOoMdheYZT7jkWKP7.png)
![misclassified_samples](https://cdn-uploads.huggingface.co/production/uploads/6a13f39ca70acf0fc1409b77/cf_6vEUczHqkqXmG4U3mA.png)
![sample_images](https://cdn-uploads.huggingface.co/production/uploads/6a13f39ca70acf0fc1409b77/PyjWDtAfwle0Yp0yXcCWA.png)
![kfold_results](https://cdn-uploads.huggingface.co/production/uploads/6a13f39ca70acf0fc1409b77/_JvbRDn8lDo1kLGwEXeBX.png)
![confusion_matrix](https://cdn-uploads.huggingface.co/production/uploads/6a13f39ca70acf0fc1409b77/E5mFsT_zBCNLsYdNMAMEv.png)
![training_curves](https://cdn-uploads.huggingface.co/production/uploads/6a13f39ca70acf0fc1409b77/3EmATv9s1IHIdXx1yz36h.png)
![model_comparison](https://cdn-uploads.huggingface.co/production/uploads/6a13f39ca70acf0fc1409b77/Ty_94ZFPgX3DKi188yGIr.png)

Files changed (1) hide show
  1. README.md +301 -0
README.md CHANGED
@@ -1,3 +1,304 @@
1
  ---
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - my
4
+
5
  license: apache-2.0
6
+
7
+ library_name: tensorflow
8
+
9
+ pipeline_tag: image-classification
10
+
11
+ tags:
12
+ - burmese
13
+ - myanmar
14
+ - handwritten
15
+ - digit-recognition
16
+ - computer-vision
17
+ - cnn
18
+ - tensorflow
19
+ - keras
20
+ - tflite
21
+ - lightweight
22
+ - edge-ai
23
+
24
+ datasets:
25
+ - expa-ai/BHDD
26
  ---
27
+
28
+ # MyanNet V1
29
+
30
+ <p align="center">
31
+ <img src="figures/banner.png" width="100%">
32
+ </p>
33
+
34
+ <p align="center">
35
+
36
+ **A Lightweight CNN for Burmese Handwritten Digit Recognition**
37
+
38
+ TensorFlow • Keras • TensorFlow Lite • Edge AI
39
+
40
+ </p>
41
+
42
+ ---
43
+
44
+ ## Overview
45
+
46
+ **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.
47
+
48
+ 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.
49
+
50
+ The model was trained and evaluated on the **Burmese Handwritten Digit Dataset (BHDD)**, containing **87,561 handwritten digit images** across ten Burmese numeral classes.
51
+
52
+ ---
53
+
54
+ # Model Highlights
55
+
56
+ | Property | Value |
57
+ |-----------|-------|
58
+ | **Task** | Burmese Handwritten Digit Recognition |
59
+ | **Framework** | TensorFlow / Keras |
60
+ | **Input Size** | 28 × 28 Grayscale |
61
+ | **Classes** | 10 (၀–၉) |
62
+ | **Trainable Parameters** | **10,634** |
63
+ | **Test Accuracy** | **99.49%** |
64
+ | **5-Fold CV Accuracy** | **99.46% ± 0.06%** |
65
+ | **Quantized Model Size** | **24.18 KB** |
66
+ | **Average CPU Inference** | **0.263 ms/image** |
67
+ | **License** | Apache-2.0 |
68
+
69
+ ---
70
+
71
+ # Architecture
72
+
73
+ MyanNet V1 follows a compact two-stage convolutional architecture optimized for lightweight deployment.
74
+
75
+ ### Feature Extractor
76
+
77
+ - Standard Convolution
78
+ - Batch Normalization
79
+ - Max Pooling
80
+ - Depthwise Separable Convolution
81
+ - Batch Normalization
82
+ - Max Pooling
83
+
84
+ ### Classification Head
85
+
86
+ - Global Average Pooling
87
+ - Dropout
88
+ - Fully Connected Layer
89
+ - Softmax Output
90
+
91
+ The architecture significantly reduces parameter count while preserving classification accuracy.
92
+
93
+ ---
94
+
95
+ # Performance Comparison
96
+
97
+ MyanNet V1 achieves competitive accuracy while reducing the number of trainable parameters by approximately **69.5%** compared to the baseline CNN.
98
+
99
+ <p align="center">
100
+ <img src="figures/model_comparison.png" width="800">
101
+ </p>
102
+
103
+ | Model | Parameters | Accuracy |
104
+ |---------|-----------:|----------:|
105
+ | Baseline CNN | 34,826 | 99.58% |
106
+ | GAP-BN CNN | 21,418 | 99.51% |
107
+ | **MyanNet V1** | **10,634** | **99.49%** |
108
+
109
+ ---
110
+
111
+ # Training Curves
112
+
113
+ The training and validation curves demonstrate stable convergence with minimal overfitting.
114
+
115
+ <p align="center">
116
+ <img src="figures/training_curves.png" width="800">
117
+ </p>
118
+
119
+ ---
120
+
121
+ # Confusion Matrix
122
+
123
+ The confusion matrix shows strong classification performance across all Burmese digit classes.
124
+
125
+ <p align="center">
126
+ <img src="figures/confusion_matrix.png" width="700">
127
+ </p>
128
+
129
+ ---
130
+
131
+ # 5-Fold Cross Validation
132
+
133
+ The model was evaluated using stratified five-fold cross validation to assess robustness and generalization.
134
+
135
+ <p align="center">
136
+ <img src="figures/kfold_results.png" width="700">
137
+ </p>
138
+
139
+ | Metric | Value |
140
+ |---------|------|
141
+ | Mean Accuracy | **99.46%** |
142
+ | Standard Deviation | **0.06%** |
143
+
144
+ ---
145
+
146
+ # Sample Predictions
147
+
148
+ Example handwritten digit samples from the BHDD dataset.
149
+
150
+ <p align="center">
151
+ <img src="figures/sample_images.png" width="800">
152
+ </p>
153
+
154
+ ---
155
+
156
+ # Failure Cases
157
+
158
+ Representative misclassified samples produced by MyanNet V1.
159
+
160
+ <p align="center">
161
+ <img src="figures/misclassified_samples.png" width="800">
162
+ </p>
163
+
164
+ Although misclassifications are rare, they primarily occur for ambiguous handwriting styles and visually similar digit shapes.
165
+
166
+ ---
167
+
168
+ # Dataset
169
+
170
+ The model was trained and evaluated on the **Burmese Handwritten Digit Dataset (BHDD)**.
171
+
172
+ Dataset Summary:
173
+
174
+ - **87,561** handwritten digit images
175
+ - **10 Burmese digit classes (၀–၉)**
176
+ - **28 × 28 grayscale images**
177
+ - MNIST-compatible format
178
+
179
+ Training Split:
180
+
181
+ - 60,000 balanced training images
182
+
183
+ Testing Split:
184
+
185
+ - 27,561 naturally imbalanced testing images
186
+
187
+ Please obtain the dataset from the official BHDD repository.
188
+
189
+ ---
190
+
191
+ # Usage
192
+
193
+ ## TensorFlow / Keras
194
+
195
+ ```python
196
+ import tensorflow as tf
197
+
198
+ model = tf.keras.models.load_model("myannet_best.keras")
199
+
200
+ prediction = model.predict(image)
201
+ ```
202
+
203
+ ---
204
+
205
+ ## TensorFlow Lite
206
+
207
+ ```python
208
+ import tensorflow as tf
209
+ import numpy as np
210
+
211
+ interpreter = tf.lite.Interpreter(
212
+ model_path="myannet_quantized.tflite"
213
+ )
214
+
215
+ interpreter.allocate_tensors()
216
+
217
+ input_details = interpreter.get_input_details()
218
+ output_details = interpreter.get_output_details()
219
+
220
+ image = np.expand_dims(image / 255.0, axis=(0, -1)).astype(np.float32)
221
+
222
+ interpreter.set_tensor(input_details[0]["index"], image)
223
+
224
+ interpreter.invoke()
225
+
226
+ prediction = interpreter.get_tensor(output_details[0]["index"])
227
+ ```
228
+
229
+ ---
230
+
231
+ # Intended Applications
232
+
233
+ MyanNet V1 is suitable for:
234
+
235
+ - Burmese handwriting recognition
236
+ - Educational software
237
+ - Mobile OCR systems
238
+ - Embedded AI devices
239
+ - Edge computing
240
+ - Research benchmarking
241
+
242
+ ---
243
+
244
+ # Limitations
245
+
246
+ MyanNet V1 was trained exclusively on isolated handwritten Burmese digits contained in the BHDD dataset.
247
+
248
+ The model has **not** been evaluated on:
249
+
250
+ - Printed Burmese text
251
+ - Burmese characters
252
+ - Burmese words or sentences
253
+ - Historical manuscripts
254
+ - Camera-captured documents
255
+ - General OCR tasks
256
+
257
+ Performance outside the BHDD domain may differ significantly.
258
+
259
+ ---
260
+
261
+ # Version Information
262
+
263
+ This repository contains the **original public release of MyanNet (Version 1).**
264
+
265
+ Version 1 established the lightweight CNN architecture and serves as the baseline for future iterations.
266
+
267
+ Future versions aim to improve:
268
+
269
+ - Model compactness
270
+ - Computational efficiency
271
+ - Robustness
272
+ - Recognition performance
273
+ - Support for larger Burmese OCR tasks
274
+
275
+ ---
276
+
277
+ # Citation
278
+
279
+ If you use MyanNet V1 in your research, please cite:
280
+
281
+ ```bibtex
282
+ @software{maung2026myannetv1,
283
+ author = {Ah Maung Oo},
284
+ title = {MyanNet V1: A Lightweight CNN for Burmese Handwritten Digit Recognition},
285
+ year = {2026},
286
+ publisher = {Hugging Face},
287
+ url = {https://huggingface.co/AndrewMaung/MyanNet-V1}
288
+ }
289
+ ```
290
+
291
+ Once the associated journal paper is published, this citation will be updated with the official publication.
292
+
293
+ ---
294
+
295
+ # Acknowledgements
296
+
297
+ - **BHDD** dataset by Swan Htet Aung *et al.*
298
+ - TensorFlow & Keras
299
+ - Optuna for hyperparameter optimization
300
+ - The open-source machine learning community
301
+
302
+ ---
303
+
304
+ ⭐ If you find MyanNet V1 useful, please consider starring the GitHub repository and citing this work in your research.