Skip to content

Prasad998/HandwrittenDigitsRecognition_DL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

HandwrittenDigitsRecognition_DL

Deep Learning based project with Simple Feed Forward Neural Network for recognition of handwritten digits.

🖊️ Handwritten Digits Recognition (MNIST)

Python TensorFlow Keras License

A simple deep learning project for recognizing handwritten digits (0–9) from the MNIST dataset. Built using TensorFlow/Keras, the model achieves high accuracy (>97%) on the test dataset.


📊 Dataset

  • MNIST: 70,000 grayscale images of handwritten digits.

    • Training: 60,000 images
    • Testing: 10,000 images
  • Each image is 28×28 pixels.


🧠 Model Architectures

This project explores multiple Keras Sequential Models:

1️⃣ Single Dense Layer

model = keras.Sequential([
    keras.layers.Dense(10, input_shape=(784,), activation='sigmoid')
])

2️⃣ Two-Layer Dense Network

model = keras.Sequential([
    keras.layers.Dense(100, input_shape=(784,), activation='relu'),
    keras.layers.Dense(10, activation='sigmoid')
])

3️⃣ Flatten + Dense (Best Performing)

model = keras.Sequential([
    keras.layers.Flatten(input_shape=(28, 28)),
    keras.layers.Dense(100, activation='relu'),
    keras.layers.Dense(10, activation='sigmoid')
])

⚙️ Installation

Clone this repository and install dependencies:

git clone https://github.com/yourusername/HandwrittenDigitsRecognition.git
cd HandwrittenDigitsRecognition
pip install -r requirements.txt

Or install manually:

pip install tensorflow matplotlib seaborn numpy

▶️ Usage

Run the Jupyter notebook:

jupyter notebook HandwrittenDigitsRecognition.ipynb

📈 Results

  • Achieved 97%+ accuracy on the MNIST test dataset.
  • Below is the confusion matrix visualization:

Confusion Matrix

---

🔮 Future Work

  • Use Softmax instead of Sigmoid for multi-class classification.
  • Implement Convolutional Neural Networks (CNNs) for higher accuracy.
  • Add Dropout/BatchNorm for better generalization.

🙌 Acknowledgements


📜 License

This project is licensed under the MIT License.


About

Deep Learning based project with Simple Feed Forward Neural Network for recognition of handwritten digits.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors