Quick Model Card
Browse files
README.md
CHANGED
@@ -5,4 +5,131 @@ datasets:
|
|
5 |
metrics:
|
6 |
- accuracy
|
7 |
library_name: keras
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
metrics:
|
6 |
- accuracy
|
7 |
library_name: keras
|
8 |
+
license: gpl-3.0
|
9 |
+
---
|
10 |
+
# Model Card for Model ID
|
11 |
+
|
12 |
+
This model is a deep neural network for classifying handwritten digits (0-9) from images.
|
13 |
+
It was a submission for a coursework assignment and is built using Keras.
|
14 |
+
|
15 |
+
## Model Details
|
16 |
+
|
17 |
+
### Model Description
|
18 |
+
|
19 |
+
This model is designed to classify handwritten digits from the MNIST dataset.
|
20 |
+
It is a basic implementation and can be a starting point for further exploration and improvement.
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
- **Developed by:** Paul J. Aru
|
25 |
+
- **Model type:** Convolutional Neural Network (CNN)
|
26 |
+
- **License:** GNU GPLv3
|
27 |
+
|
28 |
+
<!--### Model Sources [optional]
|
29 |
+
|
30 |
+
Provide the basic links for the model.
|
31 |
+
|
32 |
+
- **Repository:** [More Information Needed]
|
33 |
+
- **Paper [optional]:** [More Information Needed]
|
34 |
+
- **Demo [optional]:** [More Information Needed] -->
|
35 |
+
|
36 |
+
## Uses
|
37 |
+
|
38 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
+
|
40 |
+
### Direct Use
|
41 |
+
|
42 |
+
|
43 |
+
This model can be used to classify handwritten digits from images.
|
44 |
+
However, it is important to note that its performance may not be optimal and can be further improved.
|
45 |
+
|
46 |
+
### Out-of-Scope Use
|
47 |
+
|
48 |
+
This model is not intended for real-world applications where high accuracy and robustness are critical.
|
49 |
+
It is for learning purposes and serves as an example for my portfolio.
|
50 |
+
|
51 |
+
## Bias, Risks, and Limitations
|
52 |
+
|
53 |
+
The model may exhibit bias depending on the training data used.
|
54 |
+
The MNIST and EMNIST dataset might contain inherent biases, and the model might learn these biases.
|
55 |
+
The model might not perform well on unseen data, especially if the handwriting styles differ significantly from the training data.
|
56 |
+
This is a basic implementation and likely has limitations in accuracy and generalizability.
|
57 |
+
It serves as a starting point for further exploration and can be improved by experimenting with different architectures, hyperparameters, and data augmentation techniques.
|
58 |
+
|
59 |
+
### Recommendations
|
60 |
+
|
61 |
+
Users should be aware of the limitations of this model and not rely on it for critical tasks.
|
62 |
+
The model can be a good foundation for further development and experimentation in deep learning for handwritten digit classification.
|
63 |
+
|
64 |
+
## How to Get Started with the Model
|
65 |
+
|
66 |
+
```
|
67 |
+
from tensorflow.keras.models import load_model
|
68 |
+
import os
|
69 |
+
|
70 |
+
model=load_model("Best_Model.h5")
|
71 |
+
```
|
72 |
+
|
73 |
+
## Training Details
|
74 |
+
|
75 |
+
### Training Data
|
76 |
+
|
77 |
+
The model is trained on the MNIST and EMNIST dataset, a standard dataset for handwritten digit classification.
|
78 |
+
|
79 |
+
### Training Procedure
|
80 |
+
|
81 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
82 |
+
|
83 |
+
#### Preprocessing
|
84 |
+
|
85 |
+
The images were preprocessed using data augmentation techniques such as shifting, rotation, resizing and introducing noise.
|
86 |
+
|
87 |
+
#### Training Hyperparameters
|
88 |
+
|
89 |
+
- Epoch: 50
|
90 |
+
- Batch Size: 32
|
91 |
+
|
92 |
+
#### Speeds, Sizes, Times
|
93 |
+
|
94 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/65f32a02b3338b9643e7eece/cgfXMmfcm14Ccgr4lH_wR.png)
|
95 |
+
|
96 |
+
## Evaluation
|
97 |
+
|
98 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
99 |
+
|
100 |
+
### Testing Data, Factors & Metrics
|
101 |
+
|
102 |
+
#### Testing Data
|
103 |
+
|
104 |
+
The datasets used for testing include:
|
105 |
+
- the MNIST dataset
|
106 |
+
- the EMNIST dataset
|
107 |
+
- a combined dataset of MNIST and EMNIST
|
108 |
+
- an augmented combined dataset of MNIST and EMNIST
|
109 |
+
|
110 |
+
#### Factors
|
111 |
+
|
112 |
+
The factors considered in the testing process are the misclassification errors, which indicate the percentage of incorrectly classified samples in each dataset.
|
113 |
+
The metrics used to measure the performance of the models are the percentage of misclassifications for each dataset.
|
114 |
+
|
115 |
+
#### Metrics
|
116 |
+
|
117 |
+
After testing all the models, the misclassification errors for each model are plotted using a bar chart.
|
118 |
+
The range between the best and worst errors is calculated, and the model with the lowest maximum error is identified as the best model.
|
119 |
+
|
120 |
+
### Results
|
121 |
+
|
122 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/65f32a02b3338b9643e7eece/aMGA_CaHmP9J39nCssvLS.png)
|
123 |
+
|
124 |
+
#### Summary
|
125 |
+
|
126 |
+
In summary, my testing approach involves evaluating the models on different datasets, considering misclassification errors as the primary metric, and comparing the performance of the models to determine the best model.
|
127 |
+
|
128 |
+
## Environmental Impact
|
129 |
+
|
130 |
+
- **Hardware Type:** Apple M2 Max
|
131 |
+
- **Hours used:** 93min (*last Model*)
|
132 |
+
|
133 |
+
## Model Card Authors
|
134 |
+
|
135 |
+
Paul J. Aru
|