In order to conditionally generate images, we trained SAGAN to generate different type of pizza images in a small subset of our dataset.
Please download the dataframe containing the pizza images and their labels.
aws s3 cp s3://glovo-products-dataset-d1c9720d/pizza_subset.csv ENTER_DESTINATION_PATH --no-sign-request
aws s3 cp s3://glovo-products-dataset-d1c9720d/pizza_subset.zip ENTER_DESTINATION_PATH --no-sign-request
unzip pizza_subset.zip
By running this command we train SAGAN using the configuration specified in the config file SAGAN.json. Additionally, the fields listed below need to be modified as well in the SAGAN.json file.
"data_processing":{
"dataset_name": "foodi-ml",
"data_path": "DATASET_PATH",
To train the network, please run:
CUDA_VISIBLE_DEVICES=0 python3 src/main.py -t -e -s -iv -c src/configs/TINY_ILSVRC2012/SAGAN.json --save_every 200 --eval_type valid
To visualize the images generated by the best model, please run the following command with the correct path to the best model weights.
CUDA_VISIBLE_DEVICES=0 python3 src/main.py -iv -std_stat --standing_step 1 -c src/configs/TINY_ILSVRC2012/SAGAN.json --checkpoint_folder <ENTER_CHECKPOINTS_PATH> --log_output_path ./logs/