The rgb order of the forward function
Hi, I want to do the prediction using the pre-trained model, which trained by .rec file generated by the im2rec tool. When to predict, I load the image data using cv2.imread method, and I want to usemodel.predict to do the prediction. And OpenCV stores image data as order bgr, Need I change the image data order to rgb to pass to model.predict to do the prediction? thanks!
by default mxnet uses rgb.
@piiswrong , Does .rec file(using im2rec to generate) use rgb order? it looks like opencv store image as bgr order, when I pass the data which loaded by cv2.imread , is it necessary to swap its order first?
@pinglforever ImgRecIter will swap the channels by itself. You don't need to worry about it if you use ImgRecIter. But if you feed in your own data by imread, you need to swap the channels by yourself.
ok, @windywinter thanks a lot