Show HN: Visual Sudoku Solver in the Browser (With OpenCV and TensorFlow)

Hello!

I recently wanted to learn a bit about computer vision. Initially, I wanted to build something which could solve a jigsaw puzzle, but figured I should start with something (much) simpler, so I've built this instead.

This is a visual Sudoku solver which runs in the browser. It works by using OpenCV to identify and process the Sudoku grid, passing this to a simple ML model to identify the digits, and then solving the puzzle with a backtracking algorithm. The ML model was trained on the TMNIST data set using a model built with Keras, also a completely new area to me.

It's far from perfect, and doesn't like non perfectly lit or overly warped puzzles, but the main goal here was learning, which I did, a lot.

As this was primarily a learning project, I've tried to document my approach as much as possible, which can be found in this Python notebook:

https://github.com/Taiters/sudoku-solver/blob/main/notebooks...

I used Python while exploring OpenCV and training the models etc, and eventually ported this over to web (OpenCV.js + Tensorflow.js) to get something I could actually share with people.

Feel free to have a dig around the source or play around with the solver!

Github: https://github.com/Taiters/sudoku-solver


Comments URL: https://news.ycombinator.com/item?id=41299594

Points: 18

# Comments: 7

https://sudoku.dotslashdan.com/

Creato 6mo | 20 ago 2024, 15:10:08


Accedi per aggiungere un commento

Altri post in questo gruppo

Launch HN: Massdriver (YC W22) – Self-serve cloud infra without the red tape

Hi HN! We’re Cory, Dave, and Chris, the founders of Massdriver (https://www.massdriver.cloud/), an infrastructure automation platform. Massdriver enforc

21 feb 2025, 18:30:38 | Hacker news
Show HN: Txeo – A Modern C++ Wrapper for TensorFlow

Txeo is a lightweight and intuitive C++ wrapper for TensorFlow, designed to simplify TensorFlow C++ development while preserving high performance and flexibility. Built entirely with Modern C++, T

21 feb 2025, 18:30:35 | Hacker news