diff --git a/meta-digi-arm/conf/machine/include/imx-digi-base.inc b/meta-digi-arm/conf/machine/include/imx-digi-base.inc index b3946d897..d04222f3c 100644 --- a/meta-digi-arm/conf/machine/include/imx-digi-base.inc +++ b/meta-digi-arm/conf/machine/include/imx-digi-base.inc @@ -278,22 +278,23 @@ PREFERRED_VERSION_optee-client:mx9-nxp-bsp ??= "4.0.0.imx" PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.19.0.imx" PREFERRED_VERSION_optee-test:mx9-nxp-bsp ??= "4.0.0.imx" -# Machine learning backports from NXP's lf-6.1.36-2.1.0 release -PREFERRED_VERSION_ethos-u-vela:ccimx93 = "3.8.0" +# Machine learning backports from NXP's lf-6.1.55-2.2.0 release +PREFERRED_VERSION_ethos-u-driver-stack:ccimx93 = "23.08" +PREFERRED_VERSION_ethos-u-firmware:ccimx93 = "23.08" +PREFERRED_VERSION_ethos-u-vela:ccimx93 = "3.9.0" PREFERRED_VERSION_flatbuffers:ccimx93 = "2.0.7" PREFERRED_VERSION_flatbuffers-native:ccimx93 = "2.0.7" -PREFERRED_VERSION_onnxruntime:ccimx93 = "1.13.1" -PREFERRED_VERSION_onnxruntime-native:ccimx93 = "1.13.1" -PREFERRED_VERSION_tensorflow-lite:ccimx93 = "2.11.1" -PREFERRED_VERSION_tensorflow-lite-host-tools:ccimx93 = "2.11.1" -PREFERRED_VERSION_tensorflow-lite-host-tools-native:ccimx93 = "2.11.1" +PREFERRED_VERSION_onnxruntime:ccimx93 = "1.16.1" +PREFERRED_VERSION_tensorflow-lite:ccimx93 = "2.12.1" +PREFERRED_VERSION_tensorflow-lite-host-tools:ccimx93 = "2.12.1" +PREFERRED_VERSION_tensorflow-lite-host-tools-native:ccimx93 = "2.12.1" # Optee runtime packages to install OPTEE_PKGS ??= "optee-client optee-os" # Use i.MX opencv Version PREFERRED_VERSION_opencv:mx8-nxp-bsp ??= "4.6.0.imx" -PREFERRED_VERSION_opencv:mx9-nxp-bsp ??= "4.6.0.imx" +PREFERRED_VERSION_opencv:mx9-nxp-bsp ??= "4.7.0.imx" EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch new file mode 100644 index 000000000..9e6a61371 --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch @@ -0,0 +1,36 @@ +From 9b4959b97d2e95d4b49cf6ca2a3fce3cdb484f2d Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda Delgado +Date: Thu, 31 Mar 2016 00:20:15 +0200 +Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp + +Signed-off-by: Ricardo Ribalda Delgado +Signed-off-by: Ismo Puustinen + +--- + 3rdparty/ippicv/ippicv.cmake | 15 +-------------- + 1 file changed, 1 insertion(+), 14 deletions(-) + +diff --git a/3rdparty/ippicv/ippicv.cmake b/3rdparty/ippicv/ippicv.cmake +index 257af6fcc6..f88460450f 100644 +--- a/3rdparty/ippicv/ippicv.cmake ++++ b/3rdparty/ippicv/ippicv.cmake +@@ -34,18 +34,5 @@ function(download_ippicv root_var) + endif() + + set(THE_ROOT "${OpenCV_BINARY_DIR}/3rdparty/ippicv") +- ocv_download(FILENAME ${OPENCV_ICV_NAME} +- HASH ${OPENCV_ICV_HASH} +- URL +- "${OPENCV_IPPICV_URL}" +- "$ENV{OPENCV_IPPICV_URL}" +- "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/" +- DESTINATION_DIR "${THE_ROOT}" +- ID IPPICV +- STATUS res +- UNPACK RELATIVE_URL) +- +- if(res) +- set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE) +- endif() ++ set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE) + endfunction() diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch new file mode 100644 index 000000000..0aabee29f --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch @@ -0,0 +1,179 @@ +From fca4d9eec289f22c081daa2c61a1110e3f268f92 Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Tue, 1 Sep 2020 14:57:07 -0500 +Subject: [PATCH] Add smaller version of download_models.py + +Signed-off-by: Tom Hochstein +--- + testdata/dnn/download_models_basic.py | 159 ++++++++++++++++++++++++++ + 1 file changed, 159 insertions(+) + create mode 100644 testdata/dnn/download_models_basic.py + +diff --git a/testdata/dnn/download_models_basic.py b/testdata/dnn/download_models_basic.py +new file mode 100644 +index 0000000..5c8a616 +--- /dev/null ++++ b/testdata/dnn/download_models_basic.py +@@ -0,0 +1,159 @@ ++#!/usr/bin/env python ++ ++from __future__ import print_function ++import hashlib ++import sys ++import tarfile ++if sys.version_info[0] < 3: ++ from urllib2 import urlopen ++else: ++ from urllib.request import urlopen ++ ++ ++class Model: ++ MB = 1024*1024 ++ BUFSIZE = 10*MB ++ ++ def __init__(self, **kwargs): ++ self.name = kwargs.pop('name') ++ self.url = kwargs.pop('url', None) ++ self.filename = kwargs.pop('filename') ++ self.sha = kwargs.pop('sha', None) ++ self.archive = kwargs.pop('archive', None) ++ self.member = kwargs.pop('member', None) ++ ++ def __str__(self): ++ return 'Model <{}>'.format(self.name) ++ ++ def printRequest(self, r): ++ def getMB(r): ++ d = dict(r.info()) ++ for c in ['content-length', 'Content-Length']: ++ if c in d: ++ return int(d[c]) / self.MB ++ return '' ++ print(' {} {} [{} Mb]'.format(r.getcode(), r.msg, getMB(r))) ++ ++ def verify(self): ++ if not self.sha: ++ return False ++ print(' expect {}'.format(self.sha)) ++ sha = hashlib.sha1() ++ try: ++ with open(self.filename, 'rb') as f: ++ while True: ++ buf = f.read(self.BUFSIZE) ++ if not buf: ++ break ++ sha.update(buf) ++ print(' actual {}'.format(sha.hexdigest())) ++ return self.sha == sha.hexdigest() ++ except Exception as e: ++ print(' catch {}'.format(e)) ++ ++ def get(self): ++ if self.verify(): ++ print(' hash match - skipping') ++ return True ++ ++ if self.archive or self.member: ++ assert(self.archive and self.member) ++ print(' hash check failed - extracting') ++ print(' get {}'.format(self.member)) ++ self.extract() ++ else: ++ assert(self.url) ++ print(' hash check failed - downloading') ++ print(' get {}'.format(self.url)) ++ self.download() ++ ++ print(' done') ++ print(' file {}'.format(self.filename)) ++ return self.verify() ++ ++ def download(self): ++ try: ++ r = urlopen(self.url, timeout=60) ++ self.printRequest(r) ++ self.save(r) ++ except Exception as e: ++ print(' catch {}'.format(e)) ++ ++ def extract(self): ++ try: ++ with tarfile.open(self.archive) as f: ++ assert self.member in f.getnames() ++ self.save(f.extractfile(self.member)) ++ except Exception as e: ++ print(' catch {}'.format(e)) ++ ++ def save(self, r): ++ with open(self.filename, 'wb') as f: ++ print(' progress ', end='') ++ sys.stdout.flush() ++ while True: ++ buf = r.read(self.BUFSIZE) ++ if not buf: ++ break ++ f.write(buf) ++ print('>', end='') ++ sys.stdout.flush() ++ ++models = [ ++ Model( ++ name='Fcn', ++ url='http://dl.caffe.berkeleyvision.org/fcn8s-heavy-pascal.caffemodel', ++ sha='c449ea74dd7d83751d1357d6a8c323fcf4038962', ++ filename='fcn8s-heavy-pascal.caffemodel'), ++ Model( ++ name='SqueezeNet_v1.1', ++ url='https://raw.githubusercontent.com/DeepScale/SqueezeNet/b5c3f1a23713c8b3fd7b801d229f6b04c64374a5/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel', ++ sha='3397f026368a45ae236403ccc81cfcbe8ebe1bd0', ++ filename='squeezenet_v1.1.caffemodel'), ++ Model( ++ name='Colorization', ++ url='https://raw.githubusercontent.com/richzhang/colorization/master/models/colorization_deploy_v2.prototxt', ++ sha='f528334e386a69cbaaf237a7611d833bef8e5219', ++ filename='colorization_deploy_v2.prototxt'), ++ Model( ++ name='Colorization', ++ url='http://eecs.berkeley.edu/~rich.zhang/projects/2016_colorization/files/demo_v2/colorization_release_v2.caffemodel', ++ sha='21e61293a3fa6747308171c11b6dd18a68a26e7f', ++ filename='colorization_release_v2.caffemodel'), ++ Model( ++ name='OpenPose/pose/coco', # https://github.com/CMU-Perceptual-Computing-Lab/openpose ++ url='http://posefs1.perception.cs.cmu.edu/OpenPose/models/pose/coco/pose_iter_440000.caffemodel', ++ sha='ac7e97da66f3ab8169af2e601384c144e23a95c1', ++ filename='openpose_pose_coco.caffemodel'), ++ Model( ++ name='YOLOv3', # https://pjreddie.com/darknet/yolo/ ++ url='https://pjreddie.com/media/files/yolov3.weights', ++ sha='520878f12e97cf820529daea502acca380f1cb8e', ++ filename='yolov3.weights'), ++ Model( ++ name='EAST', # https://github.com/argman/EAST (a TensorFlow model), https://arxiv.org/abs/1704.03155v2 (a paper) ++ url='https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1', ++ sha='3ca8233d6edd748f7ed23246c8ca24cbf696bb94', ++ filename='frozen_east_text_detection.tar.gz'), ++ Model( ++ name='EAST', ++ archive='frozen_east_text_detection.tar.gz', ++ member='frozen_east_text_detection.pb', ++ sha='fffabf5ac36f37bddf68e34e84b45f5c4247ed06', ++ filename='frozen_east_text_detection.pb'), ++] ++ ++# Note: models will be downloaded to current working directory ++# expected working directory is opencv_extra/testdata/dnn ++if __name__ == '__main__': ++ failedModels = [] ++ for m in models: ++ print(m) ++ if not m.get(): ++ failedModels.append(m.filename) ++ ++ if failedModels: ++ print("Following models have not been downloaded:") ++ for f in failedModels: ++ print("* {}".format(f)) ++ exit(15) +-- +2.17.1 + diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch new file mode 100644 index 000000000..948a80faf --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch @@ -0,0 +1,28 @@ +From 66e50ee69fa9ee2469d349100e70d8b296c4b4dc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 11 Sep 2018 00:21:18 -0700 +Subject: [PATCH] Dont use isystem + +clang really does not like it + +Upstream-Status: Pending + +Signed-off-by: Khem Raj + +--- + cmake/OpenCVPCHSupport.cmake | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake +index 08cd06def4..46c9c02da3 100644 +--- a/cmake/OpenCVPCHSupport.cmake ++++ b/cmake/OpenCVPCHSupport.cmake +@@ -18,6 +18,8 @@ IF(CV_GCC) + SET(PCHSupport_FOUND TRUE) + ENDIF() + ++ SET(CMAKE_INCLUDE_SYSTEM_FLAG_C "-I") ++ SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-I") + SET(_PCH_include_prefix "-I") + SET(_PCH_isystem_prefix "-isystem") + SET(_PCH_define_prefix "-D") diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Make-ts-module-external.patch b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Make-ts-module-external.patch new file mode 100644 index 000000000..d56b8ae67 --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Make-ts-module-external.patch @@ -0,0 +1,42 @@ +From 11bbf909e08594628bd757d989ae34cf1bfe200b Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Thu, 18 Jun 2020 05:51:38 +0000 +Subject: [PATCH] Make ts module external + +Make ts module external + +Reference: https://github.com/qbonnard/opencv/commit/6b229c5834cb9a0930425e762a6c7b03244d7abb + +Upstream-Status: Submitted [https://github.com/opencv/opencv/issues/8408] + +Signed-off-by: Mingli Yu +--- + modules/ts/CMakeLists.txt | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt +index f95bed0793..66f315bcca 100644 +--- a/modules/ts/CMakeLists.txt ++++ b/modules/ts/CMakeLists.txt +@@ -4,9 +4,6 @@ if(NOT BUILD_opencv_ts AND NOT BUILD_TESTS AND NOT BUILD_PERF_TESTS) + ocv_module_disable(ts) + endif() + +-set(OPENCV_MODULE_TYPE STATIC) +-set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE) +- + if(WINRT) + # WINRT doesn't have access to environment variables + # so adding corresponding macros during CMake run +@@ -16,7 +13,7 @@ endif() + + ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef) + +-ocv_add_module(ts INTERNAL opencv_core opencv_imgproc opencv_imgcodecs opencv_videoio opencv_highgui) ++ocv_add_module(ts opencv_core opencv_imgproc opencv_imgcodecs opencv_videoio opencv_highgui) + + ocv_glob_module_sources() + ocv_module_include_directories() +-- +2.24.1 + diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch new file mode 100644 index 000000000..1e47f8b16 --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch @@ -0,0 +1,31 @@ +From e4ec6cea72da9e9ae5ba57140fa2f5c63f1f8295 Mon Sep 17 00:00:00 2001 +From: Jason Wessel +Date: Wed, 9 May 2018 13:33:59 -0700 +Subject: [PATCH] Temporarliy work around deprecated ffmpeg RAW function + compile failure until next uprev + +Signed-off-by: Jason Wessel + +--- + modules/videoio/src/cap_ffmpeg_impl.hpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp +index 6dca724a89..ae55dd4555 100644 +--- a/modules/videoio/src/cap_ffmpeg_impl.hpp ++++ b/modules/videoio/src/cap_ffmpeg_impl.hpp +@@ -774,6 +774,14 @@ struct ImplMutex::Impl + + #endif + ++/* NOTE This is deprecated in ffmpeg and the code should be removed */ ++#ifndef AVFMT_RAWPICTURE ++#define AVFMT_RAWPICTURE 0x0020 ++#endif /* AVFMT_RAWPICTURE */ ++#ifndef CODEC_FLAG_GLOBAL_HEADER ++#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++#endif ++ + void ImplMutex::init() + { + impl = new Impl(); diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch new file mode 100644 index 000000000..bb47ef2ba --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch @@ -0,0 +1,70 @@ +From f42c9b8c7bafcadc7e95fb25a391707f970eb426 Mon Sep 17 00:00:00 2001 +From: Huang Qiyu +Date: Fri, 19 May 2017 04:27:50 +0900 +Subject: [PATCH] To fix errors as following: + +"test_main.cpp:45: undefined reference to `parseCustomOptions(int, char**)'" +"perf_abs.cpp:13: undefined reference to `cvtest::param_seed'" +"test_superres.cpp:270: undefined reference to `checkIppStatus()'" + +Signed-off-by: Huang Qiyu + +Also add the visibility changes for certain OpenCL-related functions in +ts module. + +Signed-off-by: Ismo Puustinen + +--- + modules/ts/include/opencv2/ts.hpp | 4 ++-- + modules/ts/include/opencv2/ts/ocl_test.hpp | 2 +- + modules/ts/include/opencv2/ts/ts_ext.hpp | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/modules/ts/include/opencv2/ts.hpp b/modules/ts/include/opencv2/ts.hpp +index ed7491a89a..80919d13ee 100644 +--- a/modules/ts/include/opencv2/ts.hpp ++++ b/modules/ts/include/opencv2/ts.hpp +@@ -728,7 +728,7 @@ protected: + } + }; + +-extern uint64 param_seed; ++CV_EXPORTS extern uint64 param_seed; + + struct DefaultRngAuto + { +@@ -791,7 +791,7 @@ private: + #endif + #endif + +-void parseCustomOptions(int argc, char **argv); ++CV_EXPORTS void parseCustomOptions(int argc, char **argv); + + #define CV_TEST_INIT0_NOOP (void)0 + +diff --git a/modules/ts/include/opencv2/ts/ocl_test.hpp b/modules/ts/include/opencv2/ts/ocl_test.hpp +index 11572e9f48..438112e2aa 100644 +--- a/modules/ts/include/opencv2/ts/ocl_test.hpp ++++ b/modules/ts/include/opencv2/ts/ocl_test.hpp +@@ -82,7 +82,7 @@ inline UMat ToUMat(InputArray src) + return dst; + } + +-extern int test_loop_times; ++CV_EXPORTS extern int test_loop_times; + + #define MAX_VALUE 357 + +diff --git a/modules/ts/include/opencv2/ts/ts_ext.hpp b/modules/ts/include/opencv2/ts/ts_ext.hpp +index b2a4cac241..b94c681c0c 100644 +--- a/modules/ts/include/opencv2/ts/ts_ext.hpp ++++ b/modules/ts/include/opencv2/ts/ts_ext.hpp +@@ -9,7 +9,7 @@ + #define OPENCV_TS_EXT_HPP + + namespace cvtest { +-void checkIppStatus(); ++CV_EXPORTS void checkIppStatus(); + extern bool skipUnstableTests; + extern bool runBigDataTests; + extern int testThreads; diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/OpenCV_DNN_examples.patch b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/OpenCV_DNN_examples.patch new file mode 100644 index 000000000..ef7831a5f --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/OpenCV_DNN_examples.patch @@ -0,0 +1,141 @@ +From 3c4daafb54f961e376104a461ca7ec114ff0331a Mon Sep 17 00:00:00 2001 +From: Ludek Slosarcik +Date: Fri, 14 Feb 2020 15:46:50 +0100 +Subject: [PATCH] opencv_dnn: added video device for 2 examples, and change text labels + +Signed-off-by: Ludek Slosarcik + +Upstream-Status: Pending +--- + samples/cpp/logistic_regression.cpp | 2 +- + samples/dnn/classification.cpp | 7 ++++--- + samples/dnn/object_detection.cpp | 10 +++++----- + samples/dnn/segmentation.cpp | 2 +- + samples/dnn/text_detection.cpp | 5 +++-- + 5 files changed, 14 insertions(+), 12 deletions(-) + +Index: git/samples/cpp/logistic_regression.cpp +=================================================================== +--- git.orig/samples/cpp/logistic_regression.cpp ++++ git/samples/cpp/logistic_regression.cpp +@@ -28,7 +28,7 @@ static float calculateAccuracyPercent(co + + int main() + { +- const String filename = samples::findFile("data01.xml"); ++ const String filename = samples::findFile("../data/data01.xml"); + cout << "**********************************************************************" << endl; + cout << filename + << " contains digits 0 and 1 of 20 samples each, collected on an Android device" << endl; +Index: git/samples/dnn/classification.cpp +=================================================================== +--- git.orig/samples/dnn/classification.cpp ++++ git/samples/dnn/classification.cpp +@@ -12,6 +12,7 @@ std::string keys = + "{ help h | | Print help message. }" + "{ @alias | | An alias name of model to extract preprocessing parameters from models.yml file. }" + "{ zoo | models.yml | An optional path to file with preprocessing parameters }" ++ "{ device | 0 | camera device number. }" + "{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera.}" + "{ initial_width | 0 | Preprocess input image by initial resizing to a specific width.}" + "{ initial_height | 0 | Preprocess input image by initial resizing to a specific height.}" +@@ -113,7 +114,7 @@ int main(int argc, char** argv) + if (parser.has("input")) + cap.open(parser.get("input")); + else +- cap.open(0); ++ cap.open(parser.get("device")); + //! [Open a video file or an image file or a camera stream] + + // Process frames. +@@ -195,14 +196,14 @@ int main(int argc, char** argv) + } + std::string label = format("Inference time of 1 round: %.2f ms", t1); + std::string label2 = format("Average time of 200 rounds: %.2f ms", timeRecorder.getTimeMilli()/200); +- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); +- putText(frame, label2, Point(0, 35), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); ++ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false); ++ putText(frame, label2, Point(0, 45), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false); + + // Print predicted class. + label = format("%s: %.4f", (classes.empty() ? format("Class #%d", classId).c_str() : + classes[classId].c_str()), + confidence); +- putText(frame, label, Point(0, 55), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); ++ putText(frame, label, Point(0, 70), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false); + + imshow(kWinName, frame); + } +Index: git/samples/dnn/object_detection.cpp +=================================================================== +--- git.orig/samples/dnn/object_detection.cpp ++++ git/samples/dnn/object_detection.cpp +@@ -260,13 +260,13 @@ int main(int argc, char** argv) + if (predictionsQueue.counter > 1) + { + std::string label = format("Camera: %.2f FPS", framesQueue.getFPS()); +- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); ++ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false); + + label = format("Network: %.2f FPS", predictionsQueue.getFPS()); +- putText(frame, label, Point(0, 30), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); ++ putText(frame, label, Point(0, 45), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false); + + label = format("Skipped frames: %d", framesQueue.counter - predictionsQueue.counter); +- putText(frame, label, Point(0, 45), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); ++ putText(frame, label, Point(0, 70), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false); + } + imshow(kWinName, frame); + } +@@ -302,7 +302,7 @@ int main(int argc, char** argv) + double freq = getTickFrequency() / 1000; + double t = net.getPerfProfile(layersTimes) / freq; + std::string label = format("Inference time: %.2f ms", t); +- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); ++ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false); + + imshow(kWinName, frame); + } +@@ -471,7 +471,7 @@ void drawPred(int classId, float conf, i + top = max(top, labelSize.height); + rectangle(frame, Point(left, top - labelSize.height), + Point(left + labelSize.width, top + baseLine), Scalar::all(255), FILLED); +- putText(frame, label, Point(left, top), FONT_HERSHEY_SIMPLEX, 0.5, Scalar()); ++ putText(frame, label, Point(left, top), FONT_HERSHEY_SIMPLEX, 0.8, Scalar()); + } + + void callback(int pos, void*) +Index: git/samples/dnn/segmentation.cpp +=================================================================== +--- git.orig/samples/dnn/segmentation.cpp ++++ git/samples/dnn/segmentation.cpp +@@ -162,7 +162,7 @@ int main(int argc, char** argv) + double freq = getTickFrequency() / 1000; + double t = net.getPerfProfile(layersTimes) / freq; + std::string label = format("Inference time: %.2f ms", t); +- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); ++ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false); + + imshow(kWinName, frame); + if (!classes.empty()) +Index: git/samples/dnn/text_detection.cpp +=================================================================== +--- git.orig/samples/dnn/text_detection.cpp ++++ git/samples/dnn/text_detection.cpp +@@ -30,6 +30,7 @@ using namespace cv::dnn; + const char* keys = + "{ help h | | Print help message. }" + "{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera.}" ++ "{ device | 0 | camera device number. }" + "{ detModel dmp | | Path to a binary .pb file contains trained detector network.}" + "{ width | 320 | Preprocess input image by resizing to a specific width. It should be multiple by 32. }" + "{ height | 320 | Preprocess input image by resizing to a specific height. It should be multiple by 32. }" +@@ -106,7 +107,7 @@ int main(int argc, char** argv) + + // Open a video file or an image file or a camera stream. + VideoCapture cap; +- bool openSuccess = parser.has("input") ? cap.open(parser.get("input")) : cap.open(0); ++ bool openSuccess = parser.has("input") ? cap.open(parser.get("input")) : cap.open(parser.get("device")); + CV_Assert(openSuccess); + + static const std::string kWinName = "EAST: An Efficient and Accurate Scene Text Detector"; diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/download.patch b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/download.patch new file mode 100644 index 000000000..33ac48312 --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv/download.patch @@ -0,0 +1,41 @@ +From b18a280fab06a680d9f831bf8b462647f3cb6214 Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Thu, 9 Jan 2020 16:24:24 +0000 +Subject: [PATCH] opencv: abort configure if we need to download + +This CMake module will download files during do_configure. This is bad as it +means we can't do offline builds. + +Add an option to disallow downloads by emitting a fatal error. + +Upstream-Status: Pending +Signed-off-by: Ross Burton + +--- + cmake/OpenCVDownload.cmake | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake +index 63cf6d3238..4acf477f70 100644 +--- a/cmake/OpenCVDownload.cmake ++++ b/cmake/OpenCVDownload.cmake +@@ -14,6 +14,7 @@ + # RELATIVE_URL - if set, then URL is treated as a base, and FILENAME will be appended to it + # Note: uses OPENCV_DOWNLOAD_PATH folder as cache, default is /.cache + ++set(OPENCV_ALLOW_DOWNLOADS ON CACHE BOOL "Allow downloads") + set(HELP_OPENCV_DOWNLOAD_PATH "Cache directory for downloaded files") + if(DEFINED ENV{OPENCV_DOWNLOAD_PATH}) + set(OPENCV_DOWNLOAD_PATH "$ENV{OPENCV_DOWNLOAD_PATH}" CACHE PATH "${HELP_OPENCV_DOWNLOAD_PATH}") +@@ -156,6 +157,11 @@ function(ocv_download) + + # Download + if(NOT EXISTS "${CACHE_CANDIDATE}") ++ if(NOT OPENCV_ALLOW_DOWNLOADS) ++ message(FATAL_ERROR "Not going to download ${DL_FILENAME}") ++ return() ++ endif() ++ + ocv_download_log("#cmake_download \"${CACHE_CANDIDATE}\" \"${DL_URL}\"") + foreach(try ${OPENCV_DOWNLOAD_TRIES_LIST}) + ocv_download_log("#try ${try}") diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv_4.7.0.imx.bb b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv_4.7.0.imx.bb new file mode 100644 index 000000000..7f95691a1 --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-support/opencv/opencv_4.7.0.imx.bb @@ -0,0 +1,23 @@ +# Copyright 2024 Digi International Inc. + +# +# Reuse meta-freescale's opencv_4.6.0.imx.bb +# +require recipes-support/opencv/opencv_4.6.0.imx.bb + +SRC_URI:remove = "file://0001-Add-missing-header-for-LIBAVCODEC_VERSION_INT.patch" + +SRCBRANCH = "4.7.0_imx" +SRCREV_opencv = "3acf6a50fcb4f774728d2338553ad646ccc14b14" + +# Update opencv_contrib +SRC_URI:remove = "git://github.com/opencv/opencv_contrib.git;destsuffix=git/contrib;name=contrib;branch=master;protocol=https" +SRC_URI += "git://github.com/opencv/opencv_contrib.git;destsuffix=git/contrib;name=contrib;branch=4.x;protocol=https" +SRCREV_contrib = "e247b680a6bd396f110274b6c214406a93171350" + +SRC_URI:remove = "git://github.com/opencv/opencv_extra.git;destsuffix=extra;name=extra;branch=master;protocol=https" +SRC_URI =+ "git://github.com/opencv/opencv_extra.git;destsuffix=extra;name=extra;branch=4.x;protocol=https" + +SRCREV_extra = "5abbd7e0546bbb34ae7487170383d3e571fb1dd1" + +COMPATIBLE_MACHINE = "(mx9-nxp-bsp)" diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-fsl/packagegroup/packagegroup-imx-ml.bbappend b/meta-digi-dey/dynamic-layers/meta-ml/recipes-fsl/packagegroup/packagegroup-imx-ml.bbappend index fdb3bab58..b9b63a1e7 100644 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-fsl/packagegroup/packagegroup-imx-ml.bbappend +++ b/meta-digi-dey/dynamic-layers/meta-ml/recipes-fsl/packagegroup/packagegroup-imx-ml.bbappend @@ -1,9 +1,8 @@ -# Copyright 2023 Digi International Inc. +# Copyright 2023,2024 Digi International Inc. ML_NNSTREAMER_PKGS_LIST:remove = "nnstreamer-deepview-rt" ML_PKGS:mx9-nxp-bsp:remove = "deepview-rt-examples" -ML_PKGS:mx9-nxp-bsp:append = " modelrunner" # ARM ethos-u package ETHOS_U_PKGS:append:mx93-nxp-bsp = " \ diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/arm-compute-library/arm-compute-library_22.05.bbappend b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/arm-compute-library/arm-compute-library_22.05.bbappend index 33acf4538..f816bd719 100644 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/arm-compute-library/arm-compute-library_22.05.bbappend +++ b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/arm-compute-library/arm-compute-library_22.05.bbappend @@ -1,6 +1,6 @@ -# Copyright 2023 Digi International Inc. +# Copyright 2023,2024 Digi International Inc. -SRCBRANCH = "lf-6.1.36_2.1.0" -SRCREV = "b956e65221fca7dadfd8bdfd13279beacce17bc9" +SRCBRANCH:ccimx93 = "imx_22.05" +SRCREV:ccimx93 = "37fc035060646db5048648da01db3738f08e3bfa" SCONS_MAXLINELENGTH = "" diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/eiq-examples/eiq-examples_git.bb b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/eiq-examples/eiq-examples_git.bb index fd523e780..43ad704a4 100644 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/eiq-examples/eiq-examples_git.bb +++ b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/eiq-examples/eiq-examples_git.bb @@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRC_URI = "${EIQ_EXAMPLES_SRC};branch=${SRCBRANCH}" EIQ_EXAMPLES_SRC ?= "git://github.com/nxp-imx/eiq-example.git;protocol=https" -SRCBRANCH = "lf-6.1.36_2.1.0" -SRCREV = "47da4f9c4d568704f8835dde62cfc61f16e89ba6" +SRCBRANCH = "lf-6.1.55_2.2.0" +SRCREV = "4a21f2919e7e16ca1847672b6ed1ecfa60f1a86f" S = "${WORKDIR}/git" diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_22.08.bbappend b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_22.08.bbappend deleted file mode 100644 index dacfab396..000000000 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_22.08.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (C) 2023 Digi International - -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" - -SRCBRANCH = "lf-6.1.36_2.1.0" -SRCREV = "98759f579297726474d6b32927694502c66ce15a" diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_23.08.bb b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_23.08.bb new file mode 100644 index 000000000..3696f747f --- /dev/null +++ b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_23.08.bb @@ -0,0 +1,11 @@ +# Copyright 2024 Digi International Inc. + +# +# Reuse meta-imx/meta-ml ethos-u-driver-stack_22.08.bb +# +require recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_22.08.bb + +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" + +SRCBRANCH = "lf-6.1.55_2.2.0" +SRCREV = "f8975c4d44e7893dcf106d4afaff55e30470b463" diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware/ccimx93/ethosu_firmware b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware/ccimx93/ethosu_firmware index 46306553d..6299689f8 100755 Binary files a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware/ccimx93/ethosu_firmware and b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware/ccimx93/ethosu_firmware differ diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_22.08.bbappend b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_22.08.bbappend deleted file mode 100644 index ae7f26df2..000000000 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_22.08.bbappend +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2023 Digi International Inc. - -FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" - -LIC_FILES_CHKSUM = "\ - file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e \ - file://LICENSE-GPL-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LICENSE-BSD-3.txt;md5=0858ec9c7a80c4a2cf16e4f825a2cc91 \ -" - -SRCBRANCH = "lf-6.1.36_2.1.0" -SRCREV = "5fff874731d02bb232159108ccfa6833e92b6942" -SRC_URI:append:ccimx93 = " file://ethosu_firmware" - -do_install:append:ccimx93 () { - install -m 0644 ${WORKDIR}/ethosu_firmware ${D}${nonarch_base_libdir}/firmware -} diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_23.08.bb b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_23.08.bb new file mode 100644 index 000000000..97a5e7eb3 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_23.08.bb @@ -0,0 +1,21 @@ +# Copyright 2024 Digi International Inc. + +# +# Reuse meta-imx/meta-ml ethos-u-firmware_22.08.bb +# +require recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_22.08.bb + +LIC_FILES_CHKSUM = "\ + file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e \ + file://LICENSE-GPL-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSE-BSD-3.txt;md5=0858ec9c7a80c4a2cf16e4f825a2cc91 \ +" + +SRCBRANCH = "lf-6.1.55_2.2.0" +SRCREV = "7639c9a8ded082c642ff86e55ca053950e6b2486" +SRC_URI:append:ccimx93 = " file://ethosu_firmware" + +do_install:ccimx93 () { + install -d ${D}${nonarch_base_libdir}/firmware + install -m 0644 ${WORKDIR}/ethosu_firmware ${D}${nonarch_base_libdir}/firmware/ethosu_firmware +} diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-vela/ethos-u-vela_3.8.0.bb b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-vela/ethos-u-vela_3.9.0.bb similarity index 91% rename from meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-vela/ethos-u-vela_3.8.0.bb rename to meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-vela/ethos-u-vela_3.9.0.bb index 7879999e6..b145d47a0 100644 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-vela/ethos-u-vela_3.8.0.bb +++ b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/ethos-u-vela/ethos-u-vela_3.9.0.bb @@ -8,8 +8,8 @@ DEPENDS = "python3-pip-native python3-wheel-native flatbuffers python3-numpy pyt SRC_URI = "${VELA_SRC};branch=${SRCBRANCH}" VELA_SRC ?= "git://github.com/nxp-imx/ethos-u-vela.git;protocol=https" -SRCBRANCH = "lf-6.1.36_2.1.0" -SRCREV = "2647a977643907b2cf2249b917549133302aaa8e" +SRCBRANCH = "lf-6.1.55_2.2.0" +SRCREV = "b8f74c2fcdce8ceb0fe5e2401ae10359a12224e4" S = "${WORKDIR}/git" diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/modelrunner/modelrunner_2.3.0.bb b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/modelrunner/modelrunner_2.3.0.bb deleted file mode 100644 index 498e3a30c..000000000 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/modelrunner/modelrunner_2.3.0.bb +++ /dev/null @@ -1,44 +0,0 @@ -DESCRIPTION = "This package includes the updated and experimental ModelRunner for TensorFlow Lite and ARM NN" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=db4762b09b6bda63da103963e6e081de" - -SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" -SRC_URI[md5sum] = "c1e293af3bcb44925bff11fbd63cb1bd" -SRC_URI[sha256sum] = "a7008d3d3ecd09fe2450ef8ed721ecde07ebf04dfff714f59424625a3cb5ba0d" -S = "${WORKDIR}/${BPN}-${PV}" - -inherit fsl-eula-unpack python3native - -PACKAGECONFIG ?= "${PACKAGECONFIG_OPENVX}" -PACKAGECONFIG_OPENVX = "" -PACKAGECONFIG_OPENVX:mx8-nxp-bsp:imxgpu = "openvx" -PACKAGECONFIG_OPENVX:mx8mm-nxp-bsp = "" -# The tensorflow-lite implementation for 8ULP uses CPU, and so doesn't -# support OpenVX -PACKAGECONFIG_OPENVX:mx8ulp-nxp-bsp = "" - -PACKAGECONFIG[openvx] = ",,,libopenvx-imx" - -do_install () { - install -d ${D}${bindir} - install -d ${D}${libdir} - - cp -r ${S}/modelrunner/bin/* ${D}${bindir} - cp -rP ${S}/modelrunner/lib/* ${D}${libdir} - - chown -R root:root "${D}" -} - -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INHIBIT_SYSROOT_STRIP = "1" - -FILES_SOLIBSDEV = "" - -FILES:${PN} += "${libdir}/*" -RDEPENDS:${PN} = "onnxruntime tensorflow-lite" -INSANE_SKIP:${PN} += "dev-so dev-deps ldflags" - -BBCLASSEXTEND = "nativesdk" - -COMPATIBLE_MACHINE = "(mx8-nxp-bsp|mx9-nxp-bsp)" diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/onnxruntime/onnxruntime-native_1.13.1.bb b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/onnxruntime/onnxruntime-native_1.13.1.bb deleted file mode 100644 index 075e6dfea..000000000 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/onnxruntime/onnxruntime-native_1.13.1.bb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2023 NXP -DESCRIPTION = "Parts of ONNX Runtime that needs to be compiled for native system" -SECTION = "devel" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" - -# For ONNX Runtime v0.3.0 we need only 'protoc' to be compiled for native system -# 3.18.3 -GIT_protobuf = "git://github.com/google/protobuf.git;nobranch=1;name=protobuf;protocol=https" -SRCREV_protobuf = "a902b39270841beafc307dfa709610aa1cac2f06" - -SRC_URI = "\ - ${GIT_protobuf} \ -" - -SRCREV_FORMAT = "protobuf" - -S = "${WORKDIR}/git" - -inherit cmake -inherit native - -OECMAKE_SOURCEPATH = "${S}/cmake" - -EXTRA_OECMAKE += "\ - -Dprotobuf_BUILD_TESTS=OFF \ - -Dprotobuf_BUILD_EXAMPLES=OFF \ - -Dprotobuf_BUILD_SHARED_LIBS=OFF \ -" - -do_install() { - install -d ${D}/${bindir}/${PN} - install -m 0755 ${B}/protoc ${D}/${bindir}/${PN} -} diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/onnxruntime/onnxruntime_1.13.1.bb b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/onnxruntime/onnxruntime_1.16.1.bb similarity index 89% rename from meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/onnxruntime/onnxruntime_1.13.1.bb rename to meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/onnxruntime/onnxruntime_1.16.1.bb index 76e74fedf..5151c79b7 100644 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/onnxruntime/onnxruntime_1.13.1.bb +++ b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/onnxruntime/onnxruntime_1.16.1.bb @@ -6,16 +6,14 @@ LIC_FILES_CHKSUM_runtime = "file://LICENSE;md5=0f7e3b1308cb5c00b372a6e78835732d" LIC_FILES_CHKSUM_model = "file://${S}/example-models/squeezenet/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" LIC_FILES_CHKSUM = "${LIC_FILES_CHKSUM_runtime} ${LIC_FILES_CHKSUM_model}" -DEPENDS = "libpng zlib ${BPN}-native" +DEPENDS = "libpng zlib" inherit setuptools3 +SRC_URI = "${ONNXRUNTIME_SRC};branch=${SRCBRANCH}" ONNXRUNTIME_SRC ?= "gitsm://github.com/nxp-imx/onnxruntime-imx.git;protocol=https" -SRCBRANCH_runtime = "lf-6.1.36_2.1.0" -SRC_URI = "${ONNXRUNTIME_SRC};branch=${SRCBRANCH_runtime};name=runtime" - -SRCREV_runtime = "0f642b5e71e6e9c9681b90b2844176ab7eacf6eb" -SRCREV_FORMAT = "runtime_model" +SRCBRANCH = "lf-6.1.55_2.2.0" +SRCREV = "1582e774d7c120a5dfbdbf6e11c8788e710ab93f" S = "${WORKDIR}/git" @@ -25,19 +23,11 @@ OECMAKE_SOURCEPATH = "${S}/cmake" OECMAKE_GENERATOR = "Unix Makefiles" # Notes: -# Protobuff/Protoc: -# - protobuf is essetially built twice for native and target system -# - DONNX_CUSTOM_PROTOC_EXECUTABLE - use native protoc -# - onnxruntime_USE_PREBUILT_PB=OFF - we still need protobuf compiled from target system; although we already have native version -# Eigen: -# - the git operation within CMake fails, so we treat it as 'pre-installed' although it's fetched during fetch phase -# - the eigen_SOURCE_PATH needs to match 'destsuffix' in SRC_URI for eigen # Abseil: # - FETCHCONTENT_FULLY_DISCONNECTED=OFF and do_configure:prepend() added to allow # abseil build process (the issue was related to CMake not fetching sources) EXTRA_OECMAKE += "\ - -DONNX_CUSTOM_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/${PN}-native/protoc \ -DFETCHCONTENT_FULLY_DISCONNECTED=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -Donnxruntime_BUILD_UNIT_TESTS=ON \ @@ -61,7 +51,7 @@ PYTHON_RDEPENDS = "\ ${PYTHON_PN}-sympy \ " -PACKAGECONFIG ?= "crosscompiling sharedlib nnapi python" +PACKAGECONFIG ?= "crosscompiling sharedlib python" PACKAGECONFIG[nsync] = "-Donnxruntime_USE_NSYNC=ON, -Donnxruntime_USE_NSYNC=OFF" PACKAGECONFIG[prebuilt] = "-Donnxruntime_USE_PREBUILT_PB=ON, -Donnxruntime_USE_PREBUILT_PB=OFF" @@ -163,7 +153,6 @@ do_install:append() { # Install test binaries and data in test package install -d ${D}${bindir}/${BP}/tests install -m 0744 ${B}/libcustom_op_library.so ${D}${bindir}/${BP}/tests - install -m 0744 ${B}/onnxruntime_api_tests_without_env ${D}${bindir}/${BP}/tests install -m 0744 ${B}/onnxruntime_global_thread_pools_test ${D}${bindir}/${BP}/tests install -m 0744 ${B}/onnxruntime_mlas_test ${D}${bindir}/${BP}/tests install -m 0744 ${B}/onnxruntime_shared_lib_test ${D}${bindir}/${BP}/tests @@ -193,5 +182,3 @@ FILES:${PN}-tests = "${bindir}/${BP}/tests/*" # onnxruntime_shared_lib_test requires the shlib to be in the same directory as testdata to run properly INSANE_SKIP:${PN}-tests += "libdir" INSANE_SKIP:${PN}-dbg += "libdir" - -RDEPENDS:${PN}-tests += "arm-compute-library" diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-2.11.1.inc b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-2.12.1.inc similarity index 55% rename from meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-2.11.1.inc rename to meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-2.12.1.inc index 419c39474..ae33fc4c9 100644 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-2.11.1.inc +++ b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-2.12.1.inc @@ -1,5 +1,5 @@ # Copyright 2020-2021 NXP TENSORFLOW_LITE_SRC ?= "git://github.com/nxp-imx/tensorflow-imx.git;protocol=https" -SRCBRANCH_tf = "lf-6.1.36_2.1.0" -SRCREV_tf = "11e92c028eceff5b5835d15e3666a4d3d7ef1088" +SRCBRANCH_tf = "lf-6.1.55_2.2.0" +SRCREV_tf = "22641785b73a34cc88d8d5276bc7697013510a16" diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.11.1.bb b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.12.1.bb similarity index 94% rename from meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.11.1.bb rename to meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.12.1.bb index 68f7ed3e2..44a7208db 100644 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.11.1.bb +++ b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.12.1.bb @@ -8,8 +8,8 @@ DEPENDS = "tensorflow-lite ethos-u-driver-stack" require tensorflow-lite-${PV}.inc TENSORFLOW_LITE_ETHOSU_DELEGATE_SRC ?= "git://github.com/nxp-imx/tflite-ethosu-delegate-imx.git;protocol=https" -SRCBRANCH_ethosu = "lf-6.1.36_2.1.0" -SRCREV_ethosu = "0f8670a7c25ee2b2022a471ee50d394429ecf716" +SRCBRANCH_ethosu = "lf-6.1.55_2.2.0" +SRCREV_ethosu = "8f4df6a8bed86feb699f77a84e5f5b02839db53f" SRCREV_FORMAT = "ethosu_tf" diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.11.1.bb b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.12.1.bb similarity index 100% rename from meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.11.1.bb rename to meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.12.1.bb diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.%.bbappend b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.%.bbappend deleted file mode 100644 index 13b6d3f84..000000000 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.%.bbappend +++ /dev/null @@ -1,12 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" - -SRC_URI:append = " file://tensorflow-lite.pc.in" - -do_install:append() { - install -d ${D}${libdir}/pkgconfig - install -m 0644 ${WORKDIR}/tensorflow-lite.pc.in ${D}${libdir}/pkgconfig/tensorflow2-lite.pc - - sed -i 's:@version@:${PV}:g - s:@libdir@:${libdir}:g - s:@includedir@:${includedir}:g' ${D}${libdir}/pkgconfig/tensorflow2-lite.pc -} diff --git a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.11.1.bb b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.12.1.bb similarity index 95% rename from meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.11.1.bb rename to meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.12.1.bb index a72ac949f..49b260040 100644 --- a/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.11.1.bb +++ b/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.12.1.bb @@ -18,12 +18,6 @@ S = "${WORKDIR}/git" inherit python3native cmake -PACKAGECONFIG ??= "${PACKAGECONFIG_ETHOSU}" -PACKAGECONFIG_ETHOSU = "" -PACKAGECONFIG_ETHOSU:mx93-nxp-bsp = "ethosu" - -PACKAGECONFIG[ethosu] = "-DTFLITE_ENABLE_ETHOSU=on,-DTFLITE_ENABLE_ETHOSU=off,ethos-u-driver-stack" - EXTRA_OECMAKE = " \ -DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR} \ -DFETCHCONTENT_FULLY_DISCONNECTED=OFF \