This project aims to recognize handwritten digits and alphabets using a graphical user interface (GUI) built with Tkinter. The application utilizes the Keras library to obtain the EMNIST dataset and create a machine learning model for recognition.
- Prerequisites
- Installation
- Usage
- Dataset
- Model Training
- GUI
- License
To use this project, you need to have the Conda installed.
Refer to the Conda documentation for instructions on installing Conda.
To run this project locally, follow these steps:
- Clone the repository:
git clone https://github.com/Devansh-Vaidya/digit-alphabet-recognition.git- Navigate to the project directory:
cd digit-alphabet-recognition- Install the required dependencies mentioned in
requirements.txt.
conda install --file requirements.txt- Install
customtkinterandextra-keras-datasetspackages using PyPI in Conda.
pip install extra-keras-datasets
pip install customtkinterTo start the application, run the following command:
python main.pyThe EMNIST dataset is used for training and testing the recognition model. It consists of handwritten digits and alphabets.
The dataset can be obtained using the keras library. The emnist module from keras.datasets provides convenient functions to load and preprocess the dataset.
The machine learning model for digit and alphabet recognition is built using the Keras library. The model is trained on the EMNIST dataset and optimized using gradient descent.
The ml.py file contains the code for model training. It loads the EMNIST dataset, preprocesses the data, defines the model architecture, trains the model, and saves the trained model weights to a file.
To train the model, run the following command:
python ml.pyThe graphical user interface (GUI) is implemented using the Tkinter library. It provides a user-friendly interface for drawing digits or alphabets and obtaining predictions from the trained model.
The main.py file contains the code for the GUI. It loads the trained model for predictions, sets up the GUI window, and handles user interactions.
This project is licensed under the MIT License. Feel free to modify and distribute it as per the terms of the license.
