conda env create -f environment.yml
Galaxy Zoo dataset is used
To run the training of the classifier, first fill the config file. Example of the detailed config is available configs/classifier.yaml
Then run:
python train_classifier.py --config=<path to config>
If you want to automatically select the batch size, add --auto_bs
flag. If you want to automatically select learning rate, add --auto_lr
flag.
To run the training of the classifier, first fill the config file. Example of the detailed config is available configs/generator.yaml
Then run
python train_generator.py --config=<path to config>
If you want to automatically select the batch size, add --auto_bs
flag. If you want to automatically select learning rate, add --auto_lr
flag.
Run
python classifier_sample.py --config_gen=<generator config> \
--config_clas=<classifier config> \
--ckpt_gen=<generator ckpt> \
--ckpt_clas=<classifier ckpt> \
--classifier_scale=3 \
--batch_size=16 \
--output=<output path> \
--timestep_respacing=250
Run
python classifier_free_samlpe.py --config=<generator config> \
--ckpt=<generator ckpt> \
--output=<path where to save generated images> \
--batch_size=16 \
--guidance_scale=3 \
--timestep_respacing=250
To run the generated images evaluation
python evaluate.py --path_data=<path to real images directory> \
--path_labels=<path to csv with labels> \
--path_gen_images=<path to .npy file with generated images> \
--path_gen_labels=<path to .npy file with labels used to generate images>