Python Sudoku Solver using Yolo v8 Object Detection, it uses Ultralytics object detection for number recognition then brute forces the puzzle to print a result.
Uses Ultralytics & Pytorch
Via pip:
pip install ultralytics
Via Conda:
conda install -c conda-forge ultralytics
You will want to follow the instructions on the website: pytorch.org for installation.
Download the repository and extract into your directory. Run solver.py in terminal or IDE. Input file path of the (Cropped) image of the Sudoku puzzle; Ex. Examples/Hard-Puzzle-1.jpg
There are different sizes of pretrained models from s to x. The Smallest one is nano (n) and the largest is xl. The pretrained model load currently is medium. (Pretrained-M.pt)