alexkarargyris / Color-Space-Transformation-Network

This is a color space network module that can plug into a neural network.
MIT License
6 stars 2 forks source link

Overflow when displaying transformed images #2

Open f0k opened 8 years ago

f0k commented 8 years ago

As explained on https://groups.google.com/forum/#!topic/lasagne-users/-fcE2i0NUr0, the colored noise you see in the transformed images is caused by an overflow when they're converted for display. The values need to be constrained to the range (0, 1). Before every line of the following:

plt.imshow(trans_Image.transpose(1,2,0),interpolation='none')

You should add:

trans_Image -= trans_Image.min()
trans_Image /= trans_Image.max()

This will also change your interpretation of Figure 2 in the paper :)