iOS Application that solves Sudoku using computer vision and a home cooked solving algorithm.
CoreML object detection is used to identify a Sudoku in frame Roboflow Training Data
After Sudoku has been detected with adequate confidence, the puzzle is captured and the cells parsed. Roboflow Training Data
The cell is classified as either filled or empty along with it's location on the page.
"Filled" cells are assumed to hold starting digits. The cell is passed through a shader to convert to the MNIST expected format of black background with white lettering. After shading, the digit is isolated and a slight margin is added back to ensure cell boundaries are not interpeted as puzzle values. Once the cell has been formatted, it is passed to CoreMLs MNIST Classifier Model and classified as a digit 1-9. Pretrained models are available in Apple's Model Garden.
After classifying the filled cells, values are put into a 9x9 [[Int]] and passed to the solving engine.
The solving engine returns the solution or throws an error and the user is prompted to try again.
The solving engine uses a home made elimination based strategy to solve Sudokus in fractions of a second. Local benchmarks have shown solutions being produced for expert level Sudoku in as little as 100ms
Here's an step by step demo of the computer vision

