Skip to content

Commit

Permalink
add overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
dwSun authored and dwSun committed Jan 10, 2018
1 parent 2e4c27c commit 101a5be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ def perform_crf(image, probabilities):
crf_ed = perform_crf(val_orig_image, val_poss)
cv2.imwrite(os.path.join(FLAGS.output_dir, 'eval', 'val_{0}_prediction_crfed.jpg'.format(gs)), cv2.cvtColor(grayscale_to_voc_impl(np.squeeze(crf_ed)), cv2.COLOR_RGB2BGR))

overlay = cv2.addWeighted(cv2.cvtColor(np.squeeze(val_orig_image), cv2.COLOR_RGB2BGR), 1, cv2.cvtColor(grayscale_to_voc_impl(np.squeeze(crf_ed)), cv2.COLOR_RGB2BGR), 0.8, 0)
cv2.imwrite(os.path.join(FLAGS.output_dir, 'eval', 'val_{0}_overlay.jpg'.format(gs)), overlay)

coord.request_stop()
coord.join(threads)

Expand Down

0 comments on commit 101a5be

Please sign in to comment.