edgeimpulse / multi-impulse-deployment-block

Merge multiple impulses
Apache License 2.0
0 stars 1 forks source link

Add support for full tflite deployments #4

Closed faradayberry closed 6 days ago

faradayberry commented 1 month ago

Added support for full tflite deployments as tested with object detection and image classification models, as well as checking for YOLOV5 to add appropriate suffix in ei_fill_result_struct.h and fix issue #11167. This includes updates to:

EIDownload.py

generate.py

In main loop added check for tflite and made additional updates:

At the end added use of merge_tflite_full to merge all the #includes for _trained_model_opsdefine

luisomoreau commented 1 month ago

I saw plenty of issues, including the object detection support when it is not the first impulse to be downloaded and merged. I created this other PR from this one that uses a custom_display function to avoid the #if statement that are not available from the merged model_metadata.h. e.g #define EI_CLASSIFIER_OBJECT_DETECTION 0

https://github.com/edgeimpulse/multi-impulse-deployment-block/pull/5

AlessandroEdge commented 3 weeks ago

Is this ready to be merged and will it address https://github.com/edgeimpulse/edgeimpulse/issues/11167?

faradayberry commented 3 weeks ago

Is this ready to be merged and will it address edgeimpulse/edgeimpulse#11167?

I haven't made any changes to address @luisomoreau concerns from above, I can only confirm it works for the combination I needed it for, an object detector as the main project (with sometimes deploying YOLOV5, other times TAO) and an image classifier as the other project.

AlessandroEdge commented 3 weeks ago

Ok let's wait for Louis to be back

AIWintermuteAI commented 3 days ago

Okay, should have pushed my changes earlier... I started working on multi-impulse block fixes last week, as per internal repo issue #11564. Few comments:

Added --full-tflite argument to use tflite instead of default EON

Should just be --tflite or --non-eon.

Added a function check_for_yolov5 to return True if any model data indicates YOLOV5 and if so an additional modification is made in ei_fill_result_struct.h to append the project suffix to pattern ei_classifier_inferencing_categories

This needs to be fixed in SDK. When it is fixed we can remove YOLOv5 check.

I'll take a look at other changes.