Convolutional Autoencoder
A convolutional autoencoder made in TFLearn.
Examples
I trained this "architecture" on selfies (256*256 RGB) and the encoded representation is 4% the size of the original image and terminated the training procedure after only one epoch.
Here are the results (selfies are taken from google image search https://www.google.com/search?as_st=y&tbm=isch&as_q=selfie&as_epq=&as_oq=&as_eq=&cr=&as_sitesearch=&safe=images&tbs=itp:face,sur:fmc):
Image 1:
Image 2:
Image 3:
Image 4:
Requirements
- Python 3.*
- TFlearn
- Keras, for evaluation script
Usage
Training and dataset preparation:
-
Create a folder with the name "images", without quotation marks.
-
Inside the "images" folder, create a folder called "0".
-
Put all the images you want to train on there.
-
Create a folder called "checkpoints".
-
Done.
Training:
Run this command to train the convolutional autoencoder on the images in the images folder.
python3 train_autoencoder.py
All checkpoints will be stored in the checkpoints folder.
Evaluation
To evaluate a checkpoint on an image you can run.
python3 evaluate_autoencoder.py <checkpoints/checkpointname> <path_to_image>
The output will be saved as "output.jpg".
Other
Made by Oliver Edholm, 14 years old.