2024-11-19 04:09 AM - last edited on 2024-11-20 03:34 AM by SofLit
Hi,
I have successfully ran and trained the models in modelzoo but I would like to use a larger model with yolov8 for higher resolution.
It was mentioned in another post that yolov5 and above is not compatible with ST chips at the moment.
In any case can how can I use a previous model let's say v4? The available models seem to be:
2024-11-20 06:26 AM
Thanks for your answer.
The logic we put in place supposes that the maximum input size for a tiny yolov2 is 608, else the model will be too big to fit in the target Ram and flash.
So try to not use a resolution bigger than 608.
By the way in the next release of the model zoo there will be support for yolov8 deployment.
Best Regards.
2024-11-21 01:07 AM
Ok, when I use 608 trained tiny yolo model I get this error while deploying the model:
File "C:\Users\Haris\Desktop\stm32ai-modelzoo\object_detection\src\../../common/deployment\external_memory_mgt.py", line 88, in update_activation_c_code
line = "#define CAMERA_RESOLUTION (" + cam_res + ")\n"
UnboundLocalError: local variable 'cam_res' referenced before assignment
Which does not happen when I use a 416 trained model.
thanks
2024-11-21 01:42 AM - edited 2024-11-21 01:52 AM
Hello @dogg,
It seems that the model cannot be superior to VGA (640x480) and it doesn't seem to be upscaling on H7.
You could try with an input size of 480x480 (I don't think 640x480 will pass for the model input)
If you want to go further, you need to modify the C code yourself to allow for bigger image acquisition (camera drivers + buffers):
Normally the code is quite readable, there are patterns in the READMEs
The limitation for the model to be trained and to be embedded are different.
I contacted the dev team to add better errors.
Anyways, it may be better for you to wait a little bit for the next model zoo release and yolov8
Julian
2024-11-21 06:22 AM - edited 2024-11-21 06:22 AM
Additionally, if you want to try, I got the information that if you do as follow, it should let you deploy your model (but it was not tested).
Before the deployment, try to replace the value of "AXIRAM", "size" and "value" in stm32ai_application_code/object_detection/mempools_STM32H747I-DISCO.json by 0.
In theory, this should put all the buffer is SDRAM which should not saturate.
Julian