Wrong Prediction When Inferencing with Converted Keras* Model
Content Type: Troubleshooting | Article ID: 000089134 | Last Reviewed: 05/20/2022
Most TensorFlow models are trained with images in RGB order.
By default, Inference Engine samples and demos expect input with BGR channels order.
Method 1:
Convert the model using the Model Optimizer tool with --reverse_input_channels argument.
Method 2:
Change from RGB to BGR:
im_cv = cv.imread('test2.jpg')
frame = cv.cvtColor(im_cv, cv.COLOR_RGB2BGR)
Refer to When to Reverse Input Channels