Long Dang commited on
Commit
91a6671
·
verified ·
1 Parent(s): 1d4273b

Update result

Browse files
README.md CHANGED
@@ -1,3 +1,40 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MNIST Pattern Recognition with Convolutional Neural Network (CNN)
2
+
3
+ This project implements a Convolutional Neural Network (CNN) for recognizing handwritten digits from the MNIST dataset. The model is built using TensorFlow and Keras, and it supports both single-GPU and multi-GPU training. The project includes training, testing, and a user-friendly GUI for inference.
4
+
5
+ ## Features
6
+ - **Customizable CNN Architecture**: Includes convolutional, pooling, normalization, and dense layers.
7
+ - **Multi-GPU Support**: Leverages TensorFlow's `MirroredStrategy` for distributed training.
8
+ - **Training Visualization**: Generates plots for training/validation accuracy and loss.
9
+ - **Evaluation Metrics**: Outputs confusion matrix, classification report, and precision/recall/F1 scores.
10
+ - **Interactive GUI**: Built with Streamlit for real-time image recognition.
11
+ - **Docker Support**: Easily deployable using Docker.
12
+
13
+ ## Model Architecture
14
+ ![image](model.png) <br>
15
+ The CNN model consists of:
16
+ 1. Two convolutional layers with ReLU activation and max-pooling.
17
+ 2. Layer normalization for improved convergence.
18
+ 3. Fully connected dense layers with dropout for regularization.
19
+ 4. Softmax output layer for classification into 10 digit classes.
20
+
21
+ ## Training
22
+ The model is trained on the MNIST dataset, which contains 60,000 training images and 10,000 test images of handwritten digits (28x28 grayscale). The training process includes:
23
+ - Data normalization to scale pixel values to the range [0, 1].
24
+ - Categorical cross-entropy loss and accuracy as the evaluation metric.
25
+ - Model checkpointing to save the best-performing model based on validation accuracy.
26
+
27
+ ## Final result
28
+ **Training history**
29
+ ![image](training_history.png) <br>
30
+
31
+ **Confusion matrix**
32
+ ![image](confusion_matrix.png) <br>
33
+
34
+ **Classification report**
35
+ ![image](classification_report_image.png) <br>
36
+
37
+ **Test result**
38
+ ![image](test_result.png) <br>
39
+
40
+ Full code at [Github](https://github.com/longdnk/Pattern-Recognition/tree/main/MNIST)
classification_report_image.png ADDED
confusion_matrix.png ADDED
model.png ADDED
test_result.png ADDED
training_history.png ADDED