esp-nn icon indicating copy to clipboard operation
esp-nn copied to clipboard

Ocr model that trained by yolov5

Open WrinkLeeTR opened this issue 1 year ago • 4 comments

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?

WrinkLeeTR avatar Apr 18 '24 06:04 WrinkLeeTR

@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.

vikramdattu avatar Apr 18 '24 08:04 vikramdattu

@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

WrinkLeeTR avatar Apr 18 '24 08:04 WrinkLeeTR

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

vikramdattu avatar Apr 18 '24 08:04 vikramdattu

@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.

nicklasb avatar Aug 25 '24 21:08 nicklasb