Download the OpenCV image with imread, then convert it to a numpy array.
To submit to the v3 source file, you need to use the Mult: 0 tensor as an entry point, this assumes a four-dimensional tensor that has a layout: [Batch index, width, height, channel] The last three combine perfectly with cv :: Mat, the first should be 0 , since you do not want to submit a batch of images, but one image. The code looks like this:
Yours faithfully,
Chris
Edit: I just noticed that the initial network wants the intensity values ββto be normalized as floats to [-0.5,0.5], so please use this code to convert them before creating the RGB image:
np_image_data=cv2.normalize(np_image_data.astype('float'), None, -0.5, .5, cv2.NORM_MINMAX)
source share