Train an autoencoder able to encode and decode images
Example results of model encoding and decoding:

$image_autoencoder
|──models
|──*.pth # model weights
|──model.py # structure of the model
|──download_data.py # get dataset
|──train.py # train model
|──gen_reconstruction.py # use model to encode and decode examples images to see the difference
|──requirements.txt
|──README.md
- Clone the project
git clone https://github.com/filippodz/image_autoencoder.git
cd image_autoencoder- Install dependencies
pip install -r requirements.txtpython3 download_data.pyBy running the download_data.py script you will obtain a dataset that will look like:
$dataset
|──train
|──class1
|──xxxx.jpg
|──...
|──class2
|──xxxx.jpg
|──...
|──...
|──classN
|──xxxx.jpg
|──...
|──val
|──class1
|──xxxx.jpg
|──...
|──class2
|──xxxx.jpg
|──...
|──...
|──classN
|──xxxx.jpg
|──...
For training just run the train.py script, the evolution of the train losses will show up in console and at the end into the train_losses.png plot.
python3 train.pyFor evaluating the capabilities of the model run the gen_reconstruction.py script and see the results in the reconstruction.jpg image.
python3 gen_reconstruction.py