Update README.md
Browse files
README.md
CHANGED
|
@@ -24,9 +24,9 @@ A Convolutional Neural Network (CNN) trained on the MNIST dataset to classify ha
|
|
| 24 |
|
| 25 |
### Model Description
|
| 26 |
|
| 27 |
-
This model is a CNN trained from scratch on the MNIST benchmark dataset. It accepts 28×28 grayscale images of handwritten digits and outputs a probability distribution over 10 classes (digits 0–9). It is the backbone of the [Digit Classifier web app](
|
| 28 |
|
| 29 |
-
- **Developed by:** [
|
| 30 |
- **Model type:** Convolutional Neural Network (CNN)
|
| 31 |
- **Language(s):** N/A (Computer Vision — image input only)
|
| 32 |
- **License:** MIT
|
|
@@ -34,9 +34,7 @@ This model is a CNN trained from scratch on the MNIST benchmark dataset. It acce
|
|
| 34 |
- **Finetuned from:** Trained from scratch (no pretrained base)
|
| 35 |
|
| 36 |
### Model Sources
|
| 37 |
-
|
| 38 |
-
- **Repository:** [https://github.com/your-username/digit-classifier](https://github.com/your-username/digit-classifier)
|
| 39 |
-
- **Demo:** [Hugging Face Space](https://huggingface.co/spaces/your-username/digit-classifier)
|
| 40 |
|
| 41 |
---
|
| 42 |
|
|
@@ -124,8 +122,7 @@ print(f"Predicted digit: {prediction}")
|
|
| 124 |
- **Dataset:** [MNIST](https://huggingface.co/datasets/mnist) — 70,000 grayscale images (60,000 train / 10,000 test)
|
| 125 |
- **Input size:** 28×28 pixels, single channel
|
| 126 |
- **Classes:** 10 (digits 0–9)
|
| 127 |
-
-
|
| 128 |
-
|
| 129 |
### Training Procedure
|
| 130 |
|
| 131 |
#### Preprocessing
|
|
@@ -141,7 +138,7 @@ print(f"Predicted digit: {prediction}")
|
|
| 141 |
| Optimizer | Adam |
|
| 142 |
| Learning Rate | 1e-3 |
|
| 143 |
| Batch Size | 64 |
|
| 144 |
-
| Epochs |
|
| 145 |
| Loss Function | CrossEntropyLoss |
|
| 146 |
| Dropout | 0.5 |
|
| 147 |
| Training regime | fp32 |
|
|
@@ -149,8 +146,8 @@ print(f"Predicted digit: {prediction}")
|
|
| 149 |
#### Speeds, Sizes, Times
|
| 150 |
|
| 151 |
- **Training time:** ~10 minutes on a single GPU (NVIDIA T4)
|
| 152 |
-
- **Model size:** ~1.
|
| 153 |
-
- **Inference speed:** <
|
| 154 |
|
| 155 |
---
|
| 156 |
|
|
@@ -175,12 +172,11 @@ Evaluation was performed across all 10 digit classes equally. No disaggregation
|
|
| 175 |
|
| 176 |
| Metric | Value |
|
| 177 |
|---------------|---------|
|
| 178 |
-
| Test Accuracy | 99.
|
| 179 |
-
| Test Loss | 0.027 |
|
| 180 |
|
| 181 |
#### Summary
|
| 182 |
|
| 183 |
-
The model achieves **99.
|
| 184 |
|
| 185 |
---
|
| 186 |
|
|
@@ -199,7 +195,7 @@ Carbon emissions estimated using the [ML Impact Calculator](https://mlco2.github
|
|
| 199 |
| Hardware Type | NVIDIA T4 GPU |
|
| 200 |
| Hours Used | ~0.17 hrs (10 min) |
|
| 201 |
| Cloud Provider | Google Colab / Local |
|
| 202 |
-
| Compute Region |
|
| 203 |
| Carbon Emitted | ~0.01 kg CO₂eq (est.) |
|
| 204 |
|
| 205 |
---
|
|
@@ -234,17 +230,17 @@ If you use this model in your work, please cite:
|
|
| 234 |
|
| 235 |
**BibTeX:**
|
| 236 |
```bibtex
|
| 237 |
-
@misc{digit-classifier-
|
| 238 |
-
author =
|
| 239 |
title = {Handwritten Digit Classifier (CNN on MNIST)},
|
| 240 |
-
year = {
|
| 241 |
publisher = {Hugging Face},
|
| 242 |
-
url = {https://huggingface.co/
|
| 243 |
}
|
| 244 |
```
|
| 245 |
|
| 246 |
**APA:**
|
| 247 |
-
>
|
| 248 |
|
| 249 |
---
|
| 250 |
|
|
@@ -262,8 +258,8 @@ If you use this model in your work, please cite:
|
|
| 262 |
|
| 263 |
## Model Card Authors
|
| 264 |
|
| 265 |
-
|
| 266 |
|
| 267 |
## Model Card Contact
|
| 268 |
|
| 269 |
-
For questions or issues, open a GitHub issue at [github.com/
|
|
|
|
| 24 |
|
| 25 |
### Model Description
|
| 26 |
|
| 27 |
+
This model is a CNN trained from scratch on the MNIST benchmark dataset. It accepts 28×28 grayscale images of handwritten digits and outputs a probability distribution over 10 classes (digits 0–9). It is the backbone of the [Digit Classifier web app](https://huggingface.co/spaces/abdurafay19/Digit-Classifier).
|
| 28 |
|
| 29 |
+
- **Developed by:** [Abdul Rafay](www.linkedin.com/in/abdurafay19)
|
| 30 |
- **Model type:** Convolutional Neural Network (CNN)
|
| 31 |
- **Language(s):** N/A (Computer Vision — image input only)
|
| 32 |
- **License:** MIT
|
|
|
|
| 34 |
- **Finetuned from:** Trained from scratch (no pretrained base)
|
| 35 |
|
| 36 |
### Model Sources
|
| 37 |
+
- **Demo:** [Hugging Face Space](https://huggingface.co/spaces/abdurafay19/Digit-Classifier)
|
|
|
|
|
|
|
| 38 |
|
| 39 |
---
|
| 40 |
|
|
|
|
| 122 |
- **Dataset:** [MNIST](https://huggingface.co/datasets/mnist) — 70,000 grayscale images (60,000 train / 10,000 test)
|
| 123 |
- **Input size:** 28×28 pixels, single channel
|
| 124 |
- **Classes:** 10 (digits 0–9)
|
| 125 |
+
-
|
|
|
|
| 126 |
### Training Procedure
|
| 127 |
|
| 128 |
#### Preprocessing
|
|
|
|
| 138 |
| Optimizer | Adam |
|
| 139 |
| Learning Rate | 1e-3 |
|
| 140 |
| Batch Size | 64 |
|
| 141 |
+
| Epochs | 10 |
|
| 142 |
| Loss Function | CrossEntropyLoss |
|
| 143 |
| Dropout | 0.5 |
|
| 144 |
| Training regime | fp32 |
|
|
|
|
| 146 |
#### Speeds, Sizes, Times
|
| 147 |
|
| 148 |
- **Training time:** ~10 minutes on a single GPU (NVIDIA T4)
|
| 149 |
+
- **Model size:** ~1.9 MB (`.pth` file)
|
| 150 |
+
- **Inference speed:** <50ms per image (CPU)
|
| 151 |
|
| 152 |
---
|
| 153 |
|
|
|
|
| 172 |
|
| 173 |
| Metric | Value |
|
| 174 |
|---------------|---------|
|
| 175 |
+
| Test Accuracy | 99.1% |
|
|
|
|
| 176 |
|
| 177 |
#### Summary
|
| 178 |
|
| 179 |
+
The model achieves **99.1% accuracy** on the MNIST test set, consistent with state-of-the-art results for CNN-based approaches on this benchmark.
|
| 180 |
|
| 181 |
---
|
| 182 |
|
|
|
|
| 195 |
| Hardware Type | NVIDIA T4 GPU |
|
| 196 |
| Hours Used | ~0.17 hrs (10 min) |
|
| 197 |
| Cloud Provider | Google Colab / Local |
|
| 198 |
+
| Compute Region | Singapore |
|
| 199 |
| Carbon Emitted | ~0.01 kg CO₂eq (est.) |
|
| 200 |
|
| 201 |
---
|
|
|
|
| 230 |
|
| 231 |
**BibTeX:**
|
| 232 |
```bibtex
|
| 233 |
+
@misc{digit-classifier-2026,
|
| 234 |
+
author = Abdul Rafay,
|
| 235 |
title = {Handwritten Digit Classifier (CNN on MNIST)},
|
| 236 |
+
year = {2026},
|
| 237 |
publisher = {Hugging Face},
|
| 238 |
+
url = {https://huggingface.co/abdurafay19/Digit-Classifier}
|
| 239 |
}
|
| 240 |
```
|
| 241 |
|
| 242 |
**APA:**
|
| 243 |
+
> Abdul Rafay. (2026). *Handwritten Digit Classifier (CNN on MNIST)*. Hugging Face. https://huggingface.co/abdurafay19/Digit-Classifier
|
| 244 |
|
| 245 |
---
|
| 246 |
|
|
|
|
| 258 |
|
| 259 |
## Model Card Authors
|
| 260 |
|
| 261 |
+
Abdul Rafay — abdulrafay17wolf@gmail.com
|
| 262 |
|
| 263 |
## Model Card Contact
|
| 264 |
|
| 265 |
+
For questions or issues, open a GitHub issue at [github.com/abdurafay19/Digit-Classifier](https://github.com/abdurafay19/Digit-Classifier) or reach out via Hugging Face.
|