question

AmoghPalasamudram-0920 avatar image
2 Votes"
AmoghPalasamudram-0920 asked jack219 commented

How to use Custom Vision Model in the Raspberry Pi 4 for Object Detection

I have created a computer vision model using Azure Custom Vision. I exported it by selecting the Tensorflow Lite option. I then deployed the model onto a Raspberry Pi 4 and adapted this program from Edje Electronics so my model could take inputs from a webcam’s live stream.

https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi/blob/master/TFLite_detection_webcam.py

However, when I run the program, I get the following error message: “IndexError: list index out of range” from the line: “ classes = interpreter.get_tensor(output_details[1][‘index’])[0] # Class index of detected objects”.

I searched online and found that the author of the Edje Electronics program said that this error occurs when the model is an image classifier, while the program is built for objection detection models.

However, the model I created in Azure Custom Vision can be used for object detection (I boxed the training images). When I exported the model, I found that it also gave me 2 python programs along with the model files: one to run objection detection and the other to run image classification. When I opened the object detection program, it said that the code for detecting objects was not implemented.

Now, I do not know how to use my Azure model for object detection in the Raspberry Pi with the Edje Electronics program I mentioned above.

I would really appreciate it if anyone could help me out.

not-supportedazure-custom-vision
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi there,

I have had the exact same issues following the same steps. Have you managed to solve this?

Regards,
Jack

0 Votes 0 ·

1 Answer

YutongTie-MSFT avatar image
0 Votes"
YutongTie-MSFT answered

Hi Amogh,

Thanks for reaching out to us. I think SO "Raspberry-pi" forum will be a better place for this question: https://stackoverflow.com/questions/tagged/raspberry-pi

At the meantime, I am trying to reproduce your issue, will let you know.


Regards,
Yutong

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.