dhruvsheth-ai
erik
I wasn't really able to get 8084 to work. I do see POST request going out in web dev tools, but nothing informative gets back.
I used 8083, and at first it complained that my model doesn't contain a frozen TensorFlow graph in the text or binary format. I then used this code to freeze it and use the resulting .pb file in 8083. It worked, but upon plugging to "08 - RGB & MobilenetSSD" example and populating labelMap with relevant entries, the script crashes and burns immediately with the following:
Traceback (most recent call last):
File "08.py", line 106, in <module>
displayFrame("rgb", frame)
File "08.py", line 80, in displayFrame
cv2.putText(frame, labelMap[detection.label], (bbox[0] + 10, bbox[1] + 20), cv2.FONT_HERSHEY_TRIPLEX, 0.5, 255)
IndexError: list index out of range
I tried just commenting line 80 out. Then it runs and draws a lot of "detection" rectangles on the video, none of which seem plausible. So something is very wrong with the model or conversion. But the damn thing works perfectly fine on the PC....
Additionally, when I run inference on PC, I scale the colours (dividing by 255). Should I do something like this in the camera script? I can't find anything resebmbling colour scaling in the Python API.
Additionally, I use --input_shape=[1,224,224,3] argument when running mo.py... Maybe it needs to be taken into account in camera script as well, I don't know.
Need some guidance here... Any help will be much appreciated.