cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement YOLO on STM32 H7

CRAHI.1
Associate

Hello,

I'm sorry that these are in fact many questions but I'm wondering why I can't analyse any of the ONNX models that I've downloaded. I tryied YOLOv8n (12MB), YOLOv6n (18MB), YOLOv5su (36MB), YOLOv4tiny (24MB) and YOLOv2 (62 MB) and none of these ONNX models can pass the analysis step except YOLOv2 (but it is oviously too big for the MCU).

I have two main questions.

  1. I'm focusing on YOLOv8 since it's the one that I'm fine tuning and I don't understand why I'm getting "INTERNAL ERROR: list index out of range".
  2. Vincent Richard from Product Marketing at ST told us that some STM32 users have been able to successfully implement YOLOv2 on STM32. Is it "ST Yolo LC" from model zoo? Otherwise, how can it fit on an STM32?

I'm attaching a zip containing all ONNX files and the associated txt files with the errors.

Thanks a lot,

Camille RAHI

Data Scientist @ ALTEN

5 REPLIES 5

Several of the H7 platforms can have external OSPI/QSPI NOR flash in the 64 or 128MB (256MB Max)

Similar amounts of SDRAM can also be available externally.

I'm not sure Vincent has a presence here, would suggest you contact directly, or get a referral to the users in question.

https://www.linkedin.com/in/vincent-richard-0bb17217/?originalSubdomain=fr

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
fauvarque.daniel
ST Employee

Yes you're right the Yolo model is the one from the model zoo at https://github.com/STMicroelectronics/stm32ai-modelzoo, please contact Vincent if you want to reuse it with another dataset.

If you are looking for a full example of object detection running on stm32 you can also use the ssd_mobilenetv1 models https://github.com/STMicroelectronics/stm32ai-modelzoo/blob/main/object_detection/models/ssd_mobilenetv1/README.md

As a side note, recent versions of Yolo are with a GPL license that potentially contaminate the rest of your application (you'll have to distribute also your application under GPL)


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
fauvarque.daniel
ST Employee

YoloV5 (and I guess above) contains a 5D initializer that is not currently supported in stm32ai

Regards

Daniel


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
CRAHI.1
Associate

Hi,

Thanks a lot for your quick answers, that has been really helpful for the past weeks, it's clearer now.

For now we are going to fine-tune your mobilenet model until we get an MP1 board for bigger models.

Any planned release for improved support of ONNX models?

Thanks,

Camille

Darshan_123
Associate

Hi @fauvarque.daniel,

Is it possible to add the custom post-processing function in the middleware of the object detection application https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/stm32ai_application_code/object_detection?