AI Sudoku solver using CNN/KNN
This project uses convolutional neural networks to analyze a sudoku image and converts it to a digital format
- Download and install Python3 from this link
- Install venv to create a virtual environment for the project.
- You can do this using a terminal and type :
py -m pip install --user virtualenv
- For macOS and Linux:
python3 -m pip install --user virtualenv
- You can do this using a terminal and type :
- Now create and activate the virtual environment
venv Sudoku
- For Windows
cd Sudoku\Scripts activate
- For macOS and Linux
source Sudoku/bin/activate
- For Windows
- Clone the repo, install the required modules using requirements.txt
pip3 install -r requirements.txt
- For Apple Silicon/ M-series Mac users, please check out Apple's Tensorflow Metal installation guide
- Before running the App in itself, you can switch the model type between CNN and KNN.
from UI import UI from ConvNet import CNN from KNN import KNN import os # Change the model type variable value to "CNN" to use the Convolutional Neural Network # Change the model type variable value to "KNN" to use the K Nearest Neighbours Classifier modeltype = "CNN"
- Head Over and run Start.py in a python script. Ensure internet connectivity before the first run, as it downloads the MNIST dataset and saves the model as "knn.sav" or "cnn.hdf5" depending upon the modeltype variable.
python3 Start.py