- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have OpenVino python code as below and I am converting to c++.
exec_net, plugin, input_blob, out_blob, shape = load_ir_model(args.model, args.device,
args.plugin_dir, args.cpu_extension)
n_batch, channels, height, width = shape
image = cv2.imread(args.input_image)
img_to_display = image.copy()
in_frame = cv2.resize(image, (width, height))
in_frame = in_frame.transpose((2, 0, 1)) # Change data layout from HWC to CHW
in_frame = in_frame.reshape((n_batch, channels, height, width))
result = exec_net.infer(inputs={input_blob: in_frame})
lp_code = result[out_blob][0]
The rest of the code are Ok to convert to C++ except these two lines
result = exec_net.infer(inputs={input_blob: in_frame})
lp_code = result[out_blob][0]
What are c++ api equivalent for two python codes.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
Please note that the "exec_net.infer()" and "result()" are functions created based on Python.
You need to go to these functions source and ensure it is compatible to be used with C++.
Compatible means, you probably have to convert these parts too.
Hope my answer helps!
Sincerely,
Iffa
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page