imx-machine-learning: use local ssd_mobilenet_v1 model

after commit 8ad093c37b we are detecting
if a model conversion fails.
Currently the mode ssd_mobilenet_v1 fails and cannot be converted by
vela.
This is reported to NXP and will be fixed in next releases.
Meanwhile, for the current version, use a local copy.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
This commit is contained in:
Isaac Hermida 2025-02-25 13:51:50 +01:00
parent 45d4f56ff1
commit 36ba80b3ea
4 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From: Isaac Hermida <isaac.hermida@digi.com>
Date: Tue, 25 Feb 2025 12:32:45 +0000
Subject: [PATCH] use local copy of ssd_mobilenet_v1_quant model
This model is broken, and the Vela conversion is failing.
Until it is fixed, use a locally working copy.
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
---
download_models.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/download_models.py b/download_models.py
index ba1cce726e25..411538a19662 100644
--- a/download_models.py
+++ b/download_models.py
@@ -67,9 +67,9 @@ def download_all_models(model_dir, vela_dir):
#Download object detection model
#https://www.tensorflow.org/
- url = 'https://storage.googleapis.com/tfhub-lite-models/tensorflow/lite-model/ssd_mobilenet_v1/1/metadata/2.tflite'
- path = os.path.join(model_dir, 'ssd_mobilenet_v1_quant.tflite')
- download_file('object detection', url, path)
+ # url = 'https://storage.googleapis.com/tfhub-lite-models/tensorflow/lite-model/ssd_mobilenet_v1/1/metadata/2.tflite'
+ # path = os.path.join(model_dir, 'ssd_mobilenet_v1_quant.tflite')
+ # download_file('object detection', url, path)
#Download image classification model
#https://www.tensorflow.org/

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024, Digi International Inc.
# Copyright (C) 2024,2025, Digi International Inc.
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
@ -12,6 +12,9 @@ SRC_URI += " \
file://0001-Customize-EiQ-demos.patch \
file://0002-improvements-capture-x-windows-and-increase-resoluti.patch \
file://0003-check-vela-return-code.patch \
file://0004-use-local-copy-of-ssd_mobilenet_v1_quant-model.patch \
file://ssd_mobilenet_v1_quant.tflite \
file://ssd_mobilenet_v1_quant_vela.tflite \
file://scripts/launch_eiq_demo.sh \
file://service/eiqdemo.service \
"
@ -43,12 +46,14 @@ do_install () {
for archive in "${S}/${MODELS_DIR}"/*.tflite; do
cp "${archive}" "${D}${bindir}/${PN}-${PV}/${MODELS_DIR}"
done
cp ${WORKDIR}/ssd_mobilenet_v1_quant.tflite "${D}${bindir}/${PN}-${PV}/${MODELS_DIR}"
# Install the transformed Vela models.
install -d "${D}${bindir}/${PN}-${PV}/${VELA_MODELS_DIR}"
for archive in "${S}/${VELA_MODELS_DIR}"/*.tflite; do
cp "${archive}" "${D}${bindir}/${PN}-${PV}/${VELA_MODELS_DIR}"
done
cp ${WORKDIR}/ssd_mobilenet_v1_quant_vela.tflite "${D}${bindir}/${PN}-${PV}/${VELA_MODELS_DIR}"
# Install the launch script.
install -d ${D}${sysconfdir}/demos/scripts