The learning based method given in this blog and the non-learning based method that I tried here were not very accurate. This project uses the LeNet Convolutional Neural Network for digit recognition to extract the digits from the grid of the sudoku puzzle.
This project uses the Caffe framework to run the CNN.
- Download the latest Caffe version here.
- Copy the contents of
models/
folder into thecaffe/models/
folder. - Copy the contents of
examples/
folder into thecaffe/examples/
folder. - Build Caffe according to the instructions given on their website.
- From the
caffe/
folder, run the following command
./build/examples/sudoku/sudoku.bin
The image file is set in caffe/examples/sudoku/sudoku.cpp
in line number 570
.
Edit the line, build caffe again and run the command.
You can read more about the implementation in my blog here.
- Improve the accuracy by finetuning with more data.