espressif / esp-nn

Optimised Neural Network functions for Espressif chipsets
Apache License 2.0
144 stars 24 forks source link

Ocr model that trained by yolov5 #12

Open WrinkLeeTR opened 7 months ago

WrinkLeeTR commented 7 months ago

Hi Everyone,

I have same models that trained with yolov5 but some parameters was changed. My question is can I include OCR model that was trained with yolov5?

vikramdattu commented 7 months ago

@WrinkLeeTR Currently, esp-nn can work only with tflite-micro model format. Convert your model to the tflite-micro format and fit it into a format: https://github.com/espressif/esp-tflite-micro esp-nn optimisations would then be automatically used there.

WrinkLeeTR commented 7 months ago

@vikramdattu thanks for your reply. I used tflite micro and I can include my model. But I got error with esp32s3 when the devices start to run. I always got memory error. The tflite file has 1mb size. How can I solve that problem

vikramdattu commented 7 months ago

In the main_functions.cc° file, you can increase TensorArena size and allocate the buffer on SPIRAM. s3-eye has 4MB of SPIRAM.

nicklasb commented 3 months ago

@WrinkLeeTR
I have it working (sloowly) with a 2 MB model, note that the for you, the tensor arena will probably take more like 2,5 MB in SPIRAM. i needed to allocate 5 MB and therefor needed to use the S3 as the others cannot allocate more than < 4Mb in one block.