Paperspace/DataAugmentationForObjectDetection

I encountered a problem about rgb

Opened this issue · 1 comments

hi, firstly, thanks for this fantastic repo!
In your code, when you use opencv to load image, you changed its color channel by [:,:,::-1], right?
when I run your code and use opencv' imwrite to save it, the output is just weird, I think its the channel's problem, Do I need to convert rgb back to bgr before I save my image?

and I have another issue and suggestion.
issue: In your RandomRotate() func in data_aug/data_aug.py:
you cliped the bounding box( if remaining box area less than a value, discard this box, this is a terrific idea!), but in the mean time you resized the img. I think these two operation should not take place in one image, since if you resize img, the bounding box could never get out of (w, h) limitation. I tried about 100 pics, all pics that have been remove box actually have quite obvious object.

suggestion:
you can add some code to deal with the situation that bounding box is np.array([]),(there is no object in the img) to make your code more robust.

anyway, thanks for ur fantastic code.