You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been browsing the code, and it seems that you use opencv.imread() to read the images, which produces BGR output. But you still use the normalisation parameters for rgb: mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]. You can change BGR to RGB using the following: cv2.cvtColor(img, cv2.COLOR_BGR2RGB). Thanks for your work!
I've been browsing the code, and it seems that you use
opencv.imread()
to read the images, which produces BGR output. But you still use the normalisation parameters for rgb:mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]
. You can change BGR to RGB using the following:cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
. Thanks for your work!In PyTorch's examples, they read with PIL, which reads in RGB by default, but they use the same constants.
Reference: https://pytorch.org/hub/pytorch_vision_alexnet/
The text was updated successfully, but these errors were encountered: