Perform convolutions and transposed convolutions, saving the output along the way. This will help develop a more intuitive understand of what's happening.
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.
Original image | 1 cycle | 3 cycles | 5 cycles |
---|---|---|---|
It can be seen that with more convolutions, it is harder to recover the original image directly.
Original image | 1 cycle | 3 cycles | 5 cycles |
---|---|---|---|
Once again, it is harder to recover the original image directly.
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 |
python convolutions.py --image <path to image> --num-convolutions <number of convolutions>
For example:
python convolutions.py --image images/python.png --num-convolutions 3