This project is a simple, yet effective Artificial Neural Network (ANN) built using TensorFlow for digit recognition. It comes with an interactive interface that allows you to draw a digit, save it as a 50x50 BMP file, and predict the digit using the trained ANN model. The project also includes a Python script for extracting feature vectors from the drawn image and a script to find the smallest match vectorSource 0.
- Custom dataset for training and testing.
- Digit drawing interface that saves images in BMP format.
- Python script to extract feature vectors by dividing the image array by 25 and calculating black pixels in each sub-matrix.
- ANN model built with TensorFlow.
- Python script for predicting digit from a given vector and finding the smallest match vector.
- Tkinter-based interface for drawing a digit and getting the prediction from the AI and the smallest match vector.
To install and run this project, you will need Python and TensorFlow installed on your machine. Follow the steps below:
- Clone the repository:
git clone https://github.com/rabah01abellache/AI-digit-recognizer-with-custom-data-set-and-an-interface-in-python-tkinter.git
- Navigate to the project directory:
cd AI-digit-recognizer-with-custom-data-set-and-an-interface-in-python-tkinter
- Install the necessary packages
- Run file to make the data set :
python createNumber.py
- Run file to extract the futuers vector :
python cara.py
- train the ai :
python tensorflow_train.py
- compare a vector to other vectors : python Comapre.py
- Interface to drow and get predictions :
python interface.py
After running the interface.py, you will see an interface where you can draw a digit. After drawing, click on "Predict" to get the prediction from the AI and the smallest match vector (K=1).
This project is licensed under the terms of the MIT license.