SegNet-Tutorial icon indicating copy to clipboard operation
SegNet-Tutorial copied to clipboard

Saving SegNet test results under SegNet/Models/predictions

Open pooyan1982 opened this issue 8 years ago • 2 comments

Hi all,

The following code snippet is by default commented out in test_segmentation_camvid.py:

scipy.misc.toimage(rgb, cmin=0.0, cmax=255).save(IMAGE_FILE+'_segnet.png')

I believe the author meant to have the following instead (Note the difference in the params passed into the function):

scipy.misc.toimage(rgb, high=255, low=0.0).save(IMAGE_FILE+'_segnet.png')

When I used the default code, all the images (rgb, rgb_gt and image) would be saved as an entirely black image. When I changed it to high rather than cmax and low rather than cmin, it stored all the images as expected :)

@alexgkendall Alex, please confirm the above if you get a chance and if so, please change it in the repo so everyone can get the update. Thanks in advance for your contribution.

pooyan1982 avatar Nov 02 '17 18:11 pooyan1982

Hi Do you know how to define the IMAGE_FILE and save the results? thank you

HaoWumarz avatar Mar 06 '18 02:03 HaoWumarz

@HaoWumarz you can just put the absolute path that you want to save the image and + str(i) to substitute the "IMAGE_FILE" there

JessieFeng97 avatar May 13 '19 04:05 JessieFeng97