Skip to content

Commit

Permalink
Changed level of brightness augmentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Subodh Malgonde authored and Subodh Malgonde committed Dec 20, 2017
1 parent 99c2bfc commit f3d6112
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def augment_brightness_camera_images(image):
image1 = cv2.cvtColor(image,cv2.COLOR_RGB2HSV)
# randomly generate the brightness reduction factor
# Add a constant so that it prevents the image from being completely dark
random_bright = .25+np.random.uniform()
random_bright = np.random.uniform(low=0.7, high=1.2)
# Apply the brightness reduction to the V channel
image1[:,:,2] = image1[:,:,2]*random_bright
# convert to RBG again
Expand Down Expand Up @@ -105,8 +105,7 @@ def get_batches_fn(batch_size):
gt_image = scipy.misc.imresize(scipy.misc.imread(gt_image_file), image_shape)

if augment:
# image = augment_brightness_camera_images(image)

image = augment_brightness_camera_images(image)
flip_prob = np.random.random()
if flip_prob > 0.5:
# flip the images
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def run():
print("learning rate:", LEARNING_RATE)
print("Keep prob:", KEEP_PROB)
print("Batch size:", batch_size)
print("Training mode:", "True" if testing_mode else "False")
print("Training mode:", "False" if testing_mode else "True")
print("Trasfer learning mode:", "True" if TRANSFER_LEARNING_MODE else "False")
print("Continue training?:", "True" if CONTINUE_TRAINING else "False")

Expand Down

0 comments on commit f3d6112

Please sign in to comment.