shuffle = True ssd_train = False validation_batch_size = 32 patience=30 # In[8]: train_generator = train_dataset.generate(batch_size=train_batch_size, shuffle=shuffle, ssd_train=ssd_train, random_rotation=20, translate=(0.2, 0.2), scale=(0.8, 1.2), flip=0.5, divide_by_stddev=255, equalize=True, returns={'processed_labels'}, resize=(img_height, img_width)) validation_generator = validation_dataset.generate(batch_size=validation_batch_size, shuffle=shuffle, ssd_train=ssd_train, divide_by_stddev=255, equalize=True, returns={'processed_labels'}, resize=(img_height, img_width)) print("Number of images in the dataset:", train_dataset.get_n_samples())
epochs = 100 train_batch_size = 64 shuffle = True ssd_train = False validation_batch_size = 32 # In[11]: train_generator = train_dataset.generate( batch_size=train_batch_size, shuffle=shuffle, ssd_train=ssd_train, #flip=0.5, equalize=True, divide_by_stddev=255, returns={'processed_labels'}, resize=(img_height, img_width)) validation_generator = validation_dataset.generate( batch_size=validation_batch_size, shuffle=shuffle, ssd_train=ssd_train, #flip=0.5, equalize=True, divide_by_stddev=255, returns={'processed_labels'}, resize=(img_height, img_width))
print("Size of validation dataset: ", num_val_images, " images") # ----------------------------------------------------------------------------- # Dataset Generator # ----------------------------------------------------------------------------- # Setting same batch size for both generators here. train_generator = train_dataset.generate(batch_size=train_batch_size, convert_colors_to_ids=False, convert_ids_to_ids=False, convert_to_one_hot=True, void_class_id=None, random_crop=False, crop=False, resize=False, brightness=False, flip=0.5, translate=False, scale=False, gray=False, to_disk=False, shuffle=True) val_generator = val_dataset.generate(batch_size=val_batch_size, convert_colors_to_ids=False, convert_ids_to_ids=False, convert_to_one_hot=True, void_class_id=None, random_crop=False, crop=False,
epochs = 90 train_batch_size = 64 shuffle = True ssd_train = False validation_batch_size = 32 # In[15]: test_generator = test_dataset.generate(batch_size=train_batch_size, shuffle=shuffle, ssd_train=ssd_train, divide_by_stddev = 225, #equalize=True, returns={'processed_labels'}, resize=(img_height, img_width)) # In[5]: print("Number of images in the dataset:", test_dataset.get_n_samples()) # In[6]: steps = test_dataset.get_n_samples()/train_batch_size