You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.
I have trained a custom 1 class mobile net ssd v2 network using Tensorflow Object Detection API and successfully converted to to IR model using OpenVino 2019 R1.1. Then I substituted the model files in the MultiStickWithPiCamera.py example with my custom model. The predict_async thread raises an error.
Error message:
line 174, in predict_async
cnt, dev = heapq.heappop(self.heap_request)
IndexError: index out of range
The text was updated successfully, but these errors were encountered:
Update:
I have resolved the problem. The reason is that, I am using a tensorflow implementation of Mobilenet SSDv2. Therefore after the conversion with the openvino model optimizer, the input layers and output layers are actually different from the model here.
In my case, I have changed the lines above in the MultiStickSSDwithUSBCamera_OpenVINO_NCS2.py
# Lines 147-154
def image_preprocessing(self, color_image):
prepimg = cv2.resize(color_image, (300, 300))
# Commented out the below lines to match the input format of my model. Edit yours accordingly.
# prepimg = prepimg - 127.5
# prepimg = prepimg * 0.007843
prepimg = prepimg[np.newaxis, :, :, :] # Batch size axis add
prepimg = prepimg.transpose((0, 3, 1, 2)) # NHWC to NCHW
return prepimg
and
# Line 179
# For my model, output dict returns with "DetectionOutput" key. You can find yours and replace accordingly.
out = self.exec_net.requests[dev].outputs["DetectionOutput"].flatten()
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Device: Raspberry Pi 3 B+
CPU Arch.: armv7l
OS: Raspbian
I have trained a custom 1 class mobile net ssd v2 network using Tensorflow Object Detection API and successfully converted to to IR model using OpenVino 2019 R1.1. Then I substituted the model files in the MultiStickWithPiCamera.py example with my custom model. The predict_async thread raises an error.
Error message:
line 174, in predict_async
cnt, dev = heapq.heappop(self.heap_request)
IndexError: index out of range
The text was updated successfully, but these errors were encountered: