essentials_for_CIL icon indicating copy to clipboard operation
essentials_for_CIL copied to clipboard

About the way you read image

Open haoweiz23 opened this issue 3 years ago • 0 comments

In 'main_imagenet.py' , line 321:

x = Variable(transform(Image.fromarray(img))).cuda()

You use Image.fromarray(img) to load a array type image object. However, channel order in img is BGR (opencv) while the channel order in Image is RGB, which means this operation will confuse the channel order.

haoweiz23 avatar Jun 20 '21 09:06 haoweiz23