hityzy1122 / opencv_transforms_torchvision

opencv reimplement for transforms in torchvision
MIT License
193 stars 29 forks source link

to_cv_image does not work with mode=None #4

Open Domibor opened 5 years ago

Domibor commented 5 years ago

Problem: to_cv_image throws an error if mode=None, but it is marked as an optional argument.

What should happen: If mode=None the image should not be converted to any other color space (should return npimg directly)

hityzy1122 commented 5 years ago

Problem: to_cv_image throws an error if mode=None, but it is marked as an optional argument.

What should happen: If mode=None the image should not be converted to any other color space (should return npimg directly)

I have fixed some bugs as your suggestion. Thanks a lot!