• Stars
    star
    119
  • Rank 297,930 (Top 6 %)
  • Language
    Jupyter Notebook
  • License
    Creative Commons ...
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Solving Sudoku Puzzles in the Browser Using Augmented Reality

ko-fi

Augmented Reality Sudoku Solver

You can find details on how this project works in the video. You can also try it out here:

https://sudoku.cmgresearch.com

Demo Video

This project will let you use your phone (or your computers webcam) as an Augmented Reality camera for solving Sudoku puzzles.

It's an interesting proof of concept to see how powerful browsers on phone are now.

To perform the OCR we use tensorflowjs. The image processing is all carried out in customer code.

Hopefully after watching the video it should be mostly self explanatory...

A good place to start is the code in app/src/augmentedReality/Processor.ts as this steps through the processing pipeline described in the video.

This project consists of two folders:

  • app - the JavaScript application that runs in the browser using a phone's camera or webcam
  • tensorflow - the training and test code for the neural network used for the OCR

Building the App

To build the application you will need to have node and yarn installed.

Setup

cd app
yarn
yarn start

If you want to run the app locally then you will need to use something like ngrok to proxy https connections from your phone to your local server (most phones will not allow access to the camera unless the page is served over https).

Running in your desktop browser should work so long as you use the localhost connection as this bypasses the https requirement.

Building

yarn build

Training the neural network

The application invluces a pretrained network so you only need to do this if you want to train the network on new images.

Setup

cd tensorflow
python3 -m venv venv
. ./venv/bin/activate
pip install -r requirements.txt

You may need to upgrade pip to the latest version if you have errors during the pip install phase.

pip install --upgrade pip

You will need to go into the tensorflow/fonts folder and unzip the fonts files. You'll then need to run the list.sh script to update the list of fonts.

sh list.sh

Running the notebooks

jupyter notebook .

There are three notebooks - train.ipynb, test-model.ipynb and generate_training_data.ipynb

train.ipynb containts the training code. This is a very simple model so should be trainable on a CPU.

test-model.ipynb contains some code for showing which images the network is failing on.

generate_training_data.ipynb contains code for creating the training and test set data.

More Repositories

1

VisionCoreMLSample

Sample application using Vision Framework and Core ML
Swift
597
star
2

esp32-walkie-talkie

A Walkie-Talkie based around the ESP32 using UDP broadcast or ESP-NOW
C++
424
star
3

diy-alexa

DIY Alexa
Jupyter Notebook
387
star
4

diy-esp32-epub-reader

An ESP32 e-reader
C
323
star
5

esp32_audio

Sample code for reading audio samples from the ESP32 ADC using I2S
C++
322
star
6

self-organising-leds

Using an ESP32 Camera board to create self organising LEDs
C++
148
star
7

voice-controlled-robot

A voice-controlled robot using the ESP32 and TensorFlow Lite
Jupyter Notebook
108
star
8

tensorflow-lite-esp32

SImple example getting TensorFlow Lite up and running on the ESP32 with Platform.io
C++
103
star
9

command_line_chatgpt

A command line chat bot using the ChatGPT API from OpenAI
Python
95
star
10

kicad-coil-plugins

Some simple plugins for generating stator coils in kicad
Jupyter Notebook
88
star
11

esp32_sdcard_audio

A simple example that shows how to record a WAV file to an SD Card on the ESP32
C++
72
star
12

esp32-play-mp3-demo

A very simple example showing how to play mp3 files on the ESP32
C
72
star
13

m5stack-core2-audio-monitor

A fun little project to test out the mic on the M5Stack CORE2
C
66
star
14

esp32-i2s-mic-test

The Simplest Test Code for an I2S Microphone on the ESP32 I can Imagine
C++
52
star
15

esp32-tft-audio-monitor

Port of my M5Stack Core 2 audio monitor project to generic ESP32s with TFT screens
C
52
star
16

esp32-laser-show

C
50
star
17

esp32_wireless_microphone

Wireless microphone using websockets or TCP sockets
C++
49
star
18

esp-asteroids

Asteroids and lasers - what could possibly go wrong...
C
48
star
19

ESPNowSimpleSample

A simple example of using ESP-NOW for broadcast and peer to peer messaging
C++
32
star
20

platformio-tensorflow-lite

Easily extract the tfmicro framework for use in platform.io
Dockerfile
28
star
21

wordle_robot

A robot to solve wordle puzzles
Python
23
star
22

esp32-hsp-hf

ESP32 hsp_hf bluetooth profile using the bluekitchen/btstack
C
21
star
23

ICS-43434-breakout-board

Sample code for the ICS-43434 breakout board and the ESP32
C++
15
star
24

esp-now-range-test

Some simple code for testing esp now range
C++
14
star
25

ESP32RemoteLogging

This repository shows you how to log messages from your Arduino/ESP device to a remote logging system
C++
12
star
26

micropython-i2s-esp32-test

A simple example showing how to use MicroPython with I2S on the ESP32
C++
10
star
27

esp32_deep_sleep

Examples for ESP32 deep sleep
C++
10
star
28

ChessGPT

A Simple Plugin For ChatGPT to help it play chess
Python
10
star
29

ESP32-E-Paper-Weather

ESP32 E-Paper Weather Display using the LILYGO® TTGO T5s V2.8 ESP32 2.7" EPaper Plus Module
C++
9
star
30

chatgpt-memory

A simple experiment adding memory to ChatGPT
Python
8
star
31

esp32-ulp

A couple of demos showing how to use the Ultra Low Power coprocessor on the ESP32
C++
8
star
32

tensorflow-tutorial

A collection of simple tensorflow tutorials
Jupyter Notebook
8
star
33

ESP32Ota

Simple demonstration of updating the ESP32 Over The Air.
C++
6
star
34

stereo-i2s-amp-board

MAX98357 Stereo Amplifier Breakout Board
6
star
35

ESP32WebSPIFFS

Demonstration project serving html from SPIFFS on the ESP32
C++
5
star
36

as5048a-demo

Sample code for the AS5048A Magnetic Rotary Encoder
C++
4
star
37

supersise-seven-segment

C++
4
star
38

gpt-chess

Play chess against ChatGPT
TypeScript
3
star
39

esp32-gps

A simple example of connecting a GPS module to the ESP32
C++
2
star
40

wio-terminal-audio-monitor

A nice little audio visualiser for the Wio terminal using the built in microphone
C++
1
star
41

esp32-s3-pinouts

ESP32-S3 Pinout Quick Guide
1
star
42

esp32-jpeg-perf-tests

C
1
star
43

crypto-totals

Totals up all your crypto coins and tells you the total value
JavaScript
1
star
44

chatgpt-hangman

A plugin to play hangman with ChatGPT
Python
1
star
45

react-native-web-view

This repository demonstrates how to expose a native Swift view to React Native.
Java
1
star