Custom Learning model in Edge Impulse

I have trained PyTorch Yolo5 model and converted to .tflite. Now, how can I add this to EdgeImpulse. There is a document but I don’t understand. Please give me steps to add this .tflite file for the custom learning block. Thanks.

Hello @timothy.malche,

Have you checked this Github repository in addition to the documentation web page?

To push your custom learning block you will need to use the edge-impulse-blocks push command.

Let me know if that helps.

Regards,

Louis

Yes @louis I did check github link. This is what i have completed

  1. Acquired images and labelled them and converted to YOLOv5 format.
  2. Trained model in colab nootbook.
  3. Convert the YOLOv5 model into TFLite format in colab nootbook.
  4. downloaded the .tffile
  5. created a project (object detection) in EI.
  6. uploaded few images and labelled them
  7. Now I am in Create Impulse tab

from here I don’t know what to do. How can I push the .tflite file which I have created from YOLOv5 model?

On the github page under heading “Pushing the block back to Edge Impulse” it is not clear how to push custom model, what will be the directory structure etc.

Thanks

@timothy.malche You need to push the training pipeline into EI, see e.g. GitHub - edgeimpulse/yolov5: YOLOv5 transfer learning model for Edge Impulse for an end-to-end example for YOLOv5. You can’t just upload the TFLite file.

Hi @janjongboom do you have an example to do it from colab nootbook?

@timothy.malche Not at the moment. I assume you can invoke the notebook with some parameters from a bash file? All the magic is in run.sh, just swap out the invocation of train.py in yolov5 with invoking your notebook?