A computer vision python program to resolve sudoku taken from a camera
MIT License
A computer vision python program to resolve sudoku taken from a camera.
SudokuResolver is live! Test it there
Under construction
The goal with this method is to reduce the amount of "manual" work that has to be done. By manual work, I mean image pre processing before trying to extract the numbers. With this method, from any image, the neural net is going to identify the location of the object (a digit) and classify it.
To achieve the end-to-end deep learning method, I chose to use Yolo v3 as my object detection model. I've retrained it on digits and then pruned and quantized to reduce its size and get better inference speed.
One could say that its a bit overkill for such a simple task, and it is! The idea here, is really to compare two methods. One could also try to use TinyYOLO instead of the full model. Performances should be more than enough but with much less computational power requirement.
See my github repo for more information about this model.
Using classic computer vision, we'll have to apply different preprocessing to identify the sudoku grid in the image, and then extract each cell to get the numbers. Once we have an image for each number, we can apply different techniques to identify it. I chose a simple CNN, which is not a really classic computer vision technique, but performs really well.
From left to right, top to bottom:
Simply type:
pip install -r requirements.txt
or see the following depency list:
Want to support me? Buy me a coffee!