i trained my custom model from scratch using yolov5n and i have the tflite model but i couldnt deploy it using esp32cam, is there away that i can upload my model to edge impulse and i can then deploy it from here?
You might want to have a look at Bring your own model - Edge Impulse Documentation
However, I am not sure that base model would fit on the ESP32-CAM.
hello @louis, thank you for your fast reply,
i tried to upload the model but tbh, i think im doing something wrong. is there like a video guide or anything to do so, it would help alot . and for my tflite model size is around 0.4mb, im not sure if it would fit using esp32cam.https://github.com/saeedadeeb103/fyp.git
No, we do not have a video tutorial yet.
However, I’d like to work on one soon.
Your project is a school project about detecting melanomes rights? (according to your other message):
Could you provide more details on how you trained your custom? Did you follow something like YOLOv5 Transfer Learning In Simple Steps Without Losing Your Mind - KiKaBeN
for my model I trained it from scratch by using yolov5n.yaml, but I edited the depth and width multipliers so the model size is reduced to less than 500kb so I can fit the model on ESP32cam.
Just to be sure, this model is the one you want to use on your ESP32 correct?
You don’t want to use this model’s weights to train a custom model on a custom dataset that is in your Edge Impulse project?
This example shows how to use yolov5 pretrained model and import your pipeline in Edge Impulse:
Also, @janjongboom is working on a easier way to just import your model (without having to replicate your entire pipeline). I’ll come back to you when it’ll be ready.
Hi @saeed101 Coincidentally we’re currently working on a flow to deploy pretrained models (like yours) through Edge Impulse. If you’d have an example picture with the associated labels that would help verify this.
There need to be some changes on our end in the SDK (like dealing with the
QUANTIZE layer, and dequantizing YOLOv5 output) but that’d be good to do on our end anyway (you’d run into the same issues through Louis’ link if you want to deploy on ESP32).
Hi @louis, yes, I want to use my model to deploy on esp32cam, I don’t have to retrain or use the weights to train again on my custom dataset on Edge Impulse. cuz tbh, I’m trying to run on ESP32CAM but there is no guide on how to deploy any detection model. so, I was thinking on uploading my model to Edge Impulse and then use the deployment feature to do so.
Hi @janjongboom,I apologize, I am not quite understanding what you mean by “example picture with associated labels.” Can you please provide more information on what you would like me to share, and I would be happy to do so.https://github.com/saeedadeeb103/fyp, i uploaded a picture on how my model is preforming , my data.yaml and the yolov5n.yaml that i used to train my model ( i changed the depth and width multiples to reduce the size of my model)
@saeed101 Thanks for this. I have this on my list. There’s a few things we need to fix here:
- Add dequantization of yolov5 final layer. We only have f32 parsing of this right now.
- Add some missing ops to our SDK.
So this’ll take a bit longer; but will make sure to address this as part of the pretrained model release somewhere this quarter.
@saeed101 I’ve sent you an email w/ the compiled model that should run on the ESP32!