Hi, my name is Rémi LUX. Currently engineer at Niryo, I code this sudoku solver during my free time. My algorithm is able to detect and to directly solve sudokus in VR as shown on the video below
The Application is based on KivyMD. It currently has 2 screens :
- One for Live Solving which allows you to chose between full solving and hint mode
- One which Solve image from gallery
Live Solving | Gallery Solving |
---|---|
For a single image process, my algorithm is using working as following :
Firstly, the algorithm have to find where the grids are !
The pipeline is :
- Preprocess image to enhance high frequencies
- Find lines thanks to Hough Space
- Analyse lines to know which can correspond to a grid
Once grids are extracted, for each grid we do :
- Detect shape which can be digits
- Use my CNN do identify digits
- Create a numeric grid in a table & solve it
- Create a virtual image to fill the initial image
- Add the 2 images together to create the final result
When user chose to use video as input, the algorithm will act quite differently :
- For grids extraction, we use position of last grids to deduce if 2 grids in 2 pictures are actually the same
- For grids solving, we wait to have meet the same extracted numeric grid twice, to be confident on digits extraction
- It do not resolve a grid if it a grid is detected as same as an already solved grid
You will need some libraries before running it
- Numpy
- OpenCV
- Tensorflow
- KivyMD >= 1.11.1 (as this version isn't publish on Pypi yet, you should install it form the KivyMD repo)
The best way to use my algorithm is to firstly clone the git
repo where you want to.
Then, open a terminal & go in the repository
cd /path/to/the/repo/
Then, simply use the command
python3 kivy_md.py
Version | Visu |
---|---|
2.0 |
Version | Source | Algorithm Output |
---|---|---|
1.5 | Video | |
1.3 | ||
1.2 | ||
1.1 | ||
1.0 |
I trained mine personally with on a dataset of 10k numeric digits with data augmentation. It gave me a precision of 99.5+ %
- Create App
- Adapt App for phone !
-
v2.0 : Creating the first App' version | 13/09/20
- Clean old code
- Use of Kivy
-
v1.7 : Multiple performance improvement | 17/12/19
- New training method
- Improve Reconstruction
-
v1.6 : Multiple performance improvement | 19/05/19
- Optimize method for solving
- Optimize method for grid detection
- Improve Robustness It is now able do deal with Real-Time
-
v1.5 : Stabilizing video resolution | 12/05/19
- Multiple checking if the grid is well detect
- Jump solving step if seems to be already solved !
-
v1.4 : Video Handling | 08/05/19
-
v1.3 : More flexible / New training, better CNN ! | 05/05/19
-
v1.2 : Multiple grids baby ! | 02/05/19
-
v1.1 : Use probabilistic Hough & detect grid better | 01/05/19
-
v1.0 : First version | 28/04/19