1111parser .add_argument ('--num_samples' , dest = 'num_samples' , required = False , type = int , default = 5000 , help = 'Number of images to generate.' )
1212parser .add_argument ('--batch_size' , dest = 'batch_size' , required = False , type = int , default = 50 , help = 'Batch size.' )
1313parser .add_argument ('--z_dim' , dest = 'z_dim' , required = True , type = int , default = 200 , help = 'Latent space size.' )
14+ parser .add_argument ('--dataset' , dest = 'dataset' , type = str , default = 'vgh_nki' , help = 'Dataset to use.' )
15+ parser .add_argument ('--marker' , dest = 'marker' , type = str , default = 'he' , help = 'Marker of dataset to use.' )
16+ parser .add_argument ('--img_size' , dest = 'img_size' , type = int , default = 224 , help = 'Image size for the model.' )
1417parser .add_argument ('--main_path' , dest = 'main_path' , default = None , type = str , help = 'Path for the output run.' )
1518parser .add_argument ('--dbs_path' , dest = 'dbs_path' , type = str , default = None , help = 'Directory with DBs to use.' )
19+ parser .add_argument ('--model' , dest = 'model' , type = str , default = 'PathologyGAN' , help = 'Model name.' )
1620args = parser .parse_args ()
1721checkpoint = args .checkpoint
1822num_samples = args .num_samples
1923batch_size = args .batch_size
2024z_dim = args .z_dim
25+ dataset = args .dataset
26+ marker = args .marker
27+ img_size = args .img_size
2128main_path = args .main_path
2229dbs_path = args .dbs_path
30+ model = args .model
2331
2432if main_path is None :
2533 main_path = os .path .dirname (os .path .realpath (__file__ ))
2836
2937# Dataset information.
3038data_out_path = os .path .join (main_path , 'data_model_output' )
31- data_out_path = os .path .join (data_out_path , 'PathologyGAN' )
32- image_width = 224
33- image_height = 224
39+ data_out_path = os .path .join (data_out_path , model )
40+ image_width = img_size
41+ image_height = img_size
3442image_channels = 3
35- dataset = 'vgh_nki'
36- marker = 'he'
3743offset = None
3844name_run = 'h%s_w%s_n%s' % (image_height , image_width , image_channels )
3945data_out_path = '%s/%s' % (data_out_path , name_run )
6167
6268# Generate Inception features from fake images.
6369with tf .Graph ().as_default ():
64- hdf5s_features = inception_tf_feature_activations (hdf5s = [gen_hdf5_path ], input_shape = data .training .shape [1 :], batch_size = batch_size )
70+ hdf5s_features = inception_tf_feature_activations (hdf5s = [gen_hdf5_path ], input_shape = data .training .shape [1 :], batch_size = batch_size )
0 commit comments