Skip to content

A program, built with PyQt6 and PyTorch, that lets you interact directly with LeNet through a simple GUI.

Notifications You must be signed in to change notification settings

earnesdm/Interactive-LeNet-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Interactive LeNet

Description

An interactive program that lets you draw digits (0-9) with your mouse and send them to a trained LeNet model, which predicts the digit given the raw pixels. It is an enjoyable way to interact with LeNet and a great tool for teaching CNNs.

The code is written in such a way that it is easy to try out new neural network architectures. The network architecture can be modified in "model.py" and retrained by running "train.py" which will save the new model parameters. Replace the old model parameters with the new ones and you can then rerun the GUI with "main.py."

To learn more about LeNet, read: http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf

Video Demo: https://youtube.com/shorts/avoPbmiHj-U?feature=share

Getting Started

To use this project, run main.py. This will open the GUI in a new window. The main window of the GUI is a canvas that you can use to draw a digit (0-9) with your mouse. Once you have drawn your digit, pressing "Guess" will send the digit to LeNet (a convolutional neural network) who will guess your digit, given the drawing. Pressing "Clear" will clear the canvas, allowing you to draw a new digit.

Requires Python 3.10, PyQt6 6.8.0, torch 2.5.1, torchvision 0.20.1, numpy 2.2.1, and matplotlib 3.10.0

About

A program, built with PyQt6 and PyTorch, that lets you interact directly with LeNet through a simple GUI.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages