Skip to content

Passing a drawn image to a neural network and watching the neural net reproduce it frame by frame.

Notifications You must be signed in to change notification settings

MohamadPublic/DNN-Image-Learner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Drawing Neural Network

This is a very simple project that allows you to train neural networks on any image you decide to draw. Each coordinate in the image corresponds to some pixel intensity, this is the target to be learned. The neural network uses skip connections to perserve the structure of the image as well as size preservation in aim to reproduce the image as accurately as it can.

Captures of the learned image are taken sequentially and once all epochs finish, the user gets a .mp4 file which shows a timelapse of the learning of the image.

Requirements

  • python3
  • pip3

Setup

Install dependencies with:

pip install -r requirements.txt

Note that this build is stable on python 3.9.18. Other versions of python may require different versions of the packages specified in requirements.txt.

After setup, run python main.py. This will prompt you to draw an image and then you can sit back and enjoy. To monitor the frame-by-frame progress, head to the frames folder. At the end, watch video.mp4!

Example Run [1]

The following showcases an example run where a 1000x800px image is drawn by the user and passed into the neural network as input. An example frame is shown during the training process. Finally, the video timelapse of 40 epochs worth of training is shown. input download

train_40_epochs.mp4

Example Run [2]

input_kitty learning_kitty

video_kitty.mp4

Credits

This code is modified and forked from MaxRobinsonTheGreat. For more viewing material, watch his spectacular video: https://www.youtube.com/watch?v=TkwXa7Cvfr8

About

Passing a drawn image to a neural network and watching the neural net reproduce it frame by frame.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%