weiliu89 / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
4.77k stars 1.67k forks source link

hue shift #721

Open sfraczek opened 7 years ago

sfraczek commented 7 years ago

Hey, In your implementation of hue shift using convertTo method there is a problem with overflow saturation. Since hue is coded in range 0-179 on uchar, if you want to shift it by value which will cause it to exceed 255 it gets saturated at 255 (opencv docs) and the adjustment is invalid. This way shifting hue by 360 degrees does not produce exact same image as input. It is negligible for hue value of beta <= 76 which is 152 degrees so it shouldn't affect current SSD networks. Are you aware of this?

sfraczek commented 7 years ago

I ran a simple test with a simple reference implementation and it empirically starts diverging at shift of 69