Building a DiscoGAN model
The base datasets in this problem are obtained from the edges2handbags
(https://people.eecs.berkeley.edu/~tinghuiz/projects/pix2pix/datasets/edges2handbags.tar.gz) and edges2shoes
(https://people.eecs.berkeley.edu/~tinghuiz/projects/pix2pix/datasets/edges2shoes.tar.gz) datasets. Each image that's present in these datasets contain two sub-images. One is the colored image of the object, while the other is the image of the edges of the corresponding color image.
Follow the steps to build a DiscoGAN model:
- First, resize and crop the images in this dataset to obtain the handbag and shoe images:
defextract_files(data_dir,type = 'bags'): ''' :param data_dir: Input directory :param type: bags or shoes :return: saves the cropped files to the bags to shoes directory ''' input_file_dir = os.path.join(os.getcwd(),data_dir, "train") result_dir = os.path.join(os.getcwd(),type) if not os.path.exists(result_dir): os.makedirs(result_dir) file_names= os...