Skip to content

RyanZotti/convolutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Convolutions and Transposed Convolutions

Perform convolutions and transposed convolutions, saving the output along the way. This will help develop a more intuitive understand of what's happening.

Convolution Examples

As you perform more convolutions, the equivalent transposed convolution will result in an image of lower fidelity than the original image. This is due to the upsampling being performed. This can be seen using the images in the examples directory. Consider the following examples of images and various numbers of convolutions followed by an equivalient number of transposed convolutions.

Python logo

Python logo

Original image 1 cycle 3 cycles 5 cycles
Original image One cycle Three cycles Five cycles

It can be seen that with more convolutions, it is harder to recover the original image directly.

BMW logo

BMW logo

Original image 1 cycle 3 cycles 5 cycles
Original image One cycle Three cycles Five cycles

Once again, it is harder to recover the original image directly.

Using the script

CLI Inputs

Args Description Default
--image The path to the image file images/python.png
--num-convolutions The number of convolutions (and transposed convolutions) to perform 3

Command

python convolutions.py --image <path to image> --num-convolutions <number of convolutions>

For example:

python convolutions.py --image images/python.png --num-convolutions 3

About

Convolutions and transposed convolutions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages