Skip to content

Commit 75995ce

Browse files
qutaiba-salehravi-rahulabhaychirania2411junechulshyam-j
authored
90sdk (#2)
* scripts/perf_stats: Remove support for dumping log files Also remove printing loads for MCU cores Signed-off-by: Rahul T R <r-ravikumar@ti.com> * test: gen_performance_data: Bug fix Number of C7x available for all SOC except j784s4 is 1 Signed-off-by: Abhay Chirania <a-chirania@ti.com> * edgeai-gst-apps: Increase tiovxmemalloc pool-size .avi video requires increased tiovxmemalloc pool-size with dmabuf import Signed-off-by: Abhay Chirania <a-chirania@ti.com> * scripts: perf_stats: Add support for Non TIOVX Signed-off-by: Rahul T R <r-ravikumar@ti.com> * scripts: optiflow: Add support for user configured encoder and payloader Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: Add option to enable/disable tiperfoverlay Signed-off-by: Abhay Chirania <a-chirania@ti.com> * scripts: optiflow: Add a script to run optiflow Add a script which starts optiflow pipeline and also prints inference time using gst tracer logs Signed-off-by: Rahul T R <r-ravikumar@ti.com> * scripts: detect_soc: Set DEVICE_NAME env with part numbers Signed-off-by: Rahul T R <r-ravikumar@ti.com> * apps_cpp/apps_python/optiflow: Align with tensor details parsing Align with tensor details parsing in edgeai-dl-inferer Signed-off-by: Abhay Chirania <a-chirania@ti.com> * apps_python: Create model runtime explicitly edgeai-dl-inferer python api changed and requires runtime to be created explicitly since it is not created during the class initialization Signed-off-by: Abhay Chirania <a-chirania@ti.com> * download_models: Update download links to use internal server Signed-off-by: Abhay Chirania <a-chirania@ti.com> * scripts: Add script to install edgeai-apps-utils Also update all repo command to pull from develop Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: Add support for non-tiovx plugins Add support for arm only mode with new plugins Signed-off-by: Abhay Chirania <a-chirania@ti.com> * apps_cpp/apps_python: Add support for non-tiovx plugins Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: Move to top level Move optiflow directory to top level. Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: Make as standalone application Make as standalone python application, just like apps_python Signed-off-by: Abhay Chirania <a-chirania@ti.com> * cmake: common: Add another possible glib-2.0 include path Signed-off-by: Rahul T R <r-ravikumar@ti.com> * apps_cpp: cmake: common: Add app_utils include path Signed-off-by: Rahul T R <r-ravikumar@ti.com> * tests: Add support to test optiflow using test_script Signed-off-by: Abhay Chirania <a-chirania@ti.com> * tests: Simplify test_all_models script Simplyfy test all models script. Also added arguments and support for optiflow. Signed-off-by: Abhay Chirania <a-chirania@ti.com> * setup_camera: Create readable softlink for camera device and subdev Create softlink for camera device and subdev. Example: /dev/video-rpi-cam0 -> /dev/video2 /dev/v4l-rpi-subdev0 -> /dev/v4l-subdev2 Signed-off-by: Abhay Chirania <a-chirania@ti.com> * edgeai-gst-apps: Modify apps to take full subdev path Signed-off-by: Abhay Chirania <a-chirania@ti.com> * setup_camera: Support hetrogeneous camera setup Support hetrogeneous camera setup for imx390 and ov2312 together. Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: Use roi property for tiovxmultiscaler/tiscaler Use roi property for tiovxmultiscaler/tiscaler instead of using videobox Signed-off-by: Abhay Chirania <a-chirania@ti.com> * configs: face_detection: Bug fix EDGEAI_ROBOTICS-866 Bug fix EDGEAI_ROBOTICS-866, making default input for face detection usb webcam. Signed-off-by: Abhay Chirania <a-chirania@ti.com> * download_models: Add option to download ARM only models tests: Fix optiflow test parsing in arm mode Signed-off-by: Abhay Chirania <a-chirania@ti.com> * cmake: Add support to configure output dir Signed-off-by: Rahul T R <r-ravikumar@ti.com> * Fixes 9c552ce download_models: Add option to download ARM only models Signed-off-by: Rahul T R <r-ravikumar@ti.com> * encoder: Change the way bitrate and gop-size is set gstreamer 1.20 changes the way bitrate and gop-size is set for v4l2h264enc. Align with same. Signed-off-by: Abhay Chirania <a-chirania@ti.com> * post_process: classify: Add background to the text Add background to text for better visibility Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: gst_wrapper: Add zpos property to kmssink In gstreamer 1.20 by default kmssink plane is placed behind fbdev Signed-off-by: Rahul T R <r-ravikumar@ti.com> * init_script: Set display primary plane zpos to 0 Also revert commit f6b7a8e Signed-off-by: Abhay Chirania <a-chirania@ti.com> * Update am62 soc name to am62x Signed-off-by: Abhay Chirania <a-chirania@ti.com> * Update model_zoo link and config files. Update model_zoo to include public link for am62x.Also update config files to work across all soc including am62x. Also update sample video names. Signed-off-by: Abhay Chirania <a-chirania@ti.com> * apps_python: Fix issue closing with Ctrl+C Python KeyboardInterrupt bug fix. thread.join blocks the main thread hence could not trigger KeyboardInterrupt Signed-off-by: Abhay Chirania <a-chirania@ti.com> * setup_camera: Add cdns routing Add cdns routing required with latest TI-linux-6.1.y Signed-off-by: Abhay Chirania <a-chirania@ti.com> * perf_stats: Updated CMakeLists.txt with header file location changes install_robotics_sdk.sh: GIT_TAG now sets to REL.09.00.00 * [CONFIG] Updated links to python 3.10 site-packages Signed-off-by: Shyam Jagannathan <shyam.jagannathan@ti.com> * [CONFIG] Updated more links to python 3.10 version Signed-off-by: Shyam Jagannathan <shyam.jagannathan@ti.com> * Add support for node.js based remote streaming Add support for node.js based remote streaming of jpegencoded images. Signed-off-by: Abhay Chirania <a-chirania@ti.com> * [gpio libs] Updated the tags to 'release-1.1.0' for ti-gpio-py and ti-gpio-cpp. * edgeai_perfstats: Remove temperature reading for j721e Reverting because sysfs entries are not available in 6.1 kernels Signed-off-by: Abhay Chirania <a-chirania@ti.com> * Change the way remote streaming config is written. Change the way remote output config is written. Instead of encoder and payloader, mention just encoding type. Also add jpegenc to gst_plugins_map to use diff jpegencoders across SOC. Also set bitrate and gop-size property for v4l2h264enc in apps_python and apps_cpp properly. Signed-off-by: Abhay Chirania <a-chirania@ti.com> * Use 64 byte aligned default video Use 64 byte height aligned default video since imagination ip expects 64 byte aligned videos Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: Add support for load balancing MSC Signed-off-by: Abhay Chirania <a-chirania@ti.com> * Add option to define overlay-performance type Signed-off-by: Abhay Chirania <a-chirania@ti.com> * configs: gst_plugins_map: Enable dmabuf-import in h264enc Set dmabuf-import for v4l2h264enc as default in AM68,AM69,AM62A. Also set hardware jpeg encoder for AM62A. Signed-off-by: Abhay Chirania <a-chirania@ti.com> * docker: Docker changes with respect to 9.0 SDK Also remove dlpack as it is now present in dlr wheel. Also remove installing of streamlit Signed-off-by: Abhay Chirania <a-chirania@ti.com> * config: Align with latest models Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: Add force-modesetting as workaruound for AM62A flicker Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: Add c7x core id balancing Signed-off-by: Abhay Chirania <a-chirania@ti.com> * init_script: Increase ulimits for open files This is required to support multichannle demo Signed-off-by: Rahul T R <r-ravikumar@ti.com> * Update download models path to pull from internal server Signed-off-by: Abhay Chirania <a-chirania@ti.com> * Remove streamlit based perf stats viewer. Remote streaming using native node server is implemented. Remove streamlit based remote streaming Signed-off-by: Abhay Chirania <a-chirania@ti.com> * Setup wallpaper Signed-off-by: Abhay Chirania <a-chirania@ti.com> * Revert "init_script: Set display primary plane zpos to 0" This reverts commit ebaa20c. * Revert "edgeai_perfstats: Remove temperature reading for j721e" This reverts commit 5da05b1. This got fixed in linux Signed-off-by: Rahul T R <r-ravikumar@ti.com> * Fix download model script Signed-off-by: Abhay Chirania <a-chirania@ti.com> * pref_stats: Read temp for j721e only if file exists Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: Add forcemodesetting only for am62a Signed-off-by: Abhay Chirania <a-chirania@ti.com> * docker: Update DOckerfile to pull ubuntu22.04 Also set some environment necessary variables Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: Bug fix Bug fix where two msc is used in case model dim is < 1/4 of original input size Signed-off-by: Abhay Chirania <a-chirania@ti.com> * apps: Update tiovxdlcolorconvert combination map Signed-off-by: Abhay Chirania <a-chirania@ti.com> * models: Update links for 9.0 Signed-off-by: Rahul T R <r-ravikumar@ti.com> * setup: Update tags for install scripts to 9.0 Signed-off-by: Rahul T R <r-ravikumar@ti.com> * Update dcc files path Signed-off-by: Abhay Chirania <a-chirania@ti.com> * optiflow: Bug fix related to roi src pad Signed-off-by: Abhay Chirania <a-chirania@ti.com> * Update config file Signed-off-by: Abhay Chirania <a-chirania@ti.com> * apps_cpp: Fix static analysis issues Signed-off-by: Abhay Chirania <a-chirania@ti.com> * apps_cpp/post_process/objdet: Fix bug if label offset is a scaler Signed-off-by: Abhay Chirania <a-chirania@ti.com> * apps_python/post_process/object: Add additional check for classname Signed-off-by: Abhay Chirania <a-chirania@ti.com> * scripts: Add option to specify branch to clone Signed-off-by: Abhay Chirania <a-chirania@ti.com> * scripts: setup_cameras: Do not use src1 of ticsi2rx src pad 1 will be used to dump any data not consumed by downstream Signed-off-by: Rahul T R <r-ravikumar@ti.com> * test: Add preserve status Add preserver status to timeout so that it returns the actual exit code of command running Signed-off-by: Abhay Chirania <a-chirania@ti.com> * init_script: Change SDK Version for 9.1 Also update git tag in install scripts Signed-off-by: Abhay Chirania <a-chirania@ti.com> * init_script: Add primary plane zpos to 0 Signed-off-by: Abhay Chirania <a-chirania@ti.com> * Align with change in Dataset Info in edgeai_dl_inferer Signed-off-by: Abhay Chirania <a-chirania@ti.com> * Add support for keypoint detection Signed-off-by: Abhay Chirania <a-chirania@ti.com> * scripts: updated the tags install_ti_gpio_libs.sh: release-1.1.0 install_robotics_sdk.sh: REL.08.06.01 * Defect detection Is ready to merge. (#1) * Initial defect detection push * fix unsaved README * code cleanup * Update README and add more figures * code cleanup * correct typos on README * update to mathc 9.0 SDK * update yaml files * update setup secript to download model compatable with SDK 9.0 * add manafist data * update configs .yaml to fit model names on SDK 9.0 --------- Signed-off-by: Rahul T R <r-ravikumar@ti.com> Signed-off-by: Abhay Chirania <a-chirania@ti.com> Signed-off-by: Shyam Jagannathan <shyam.jagannathan@ti.com> Co-authored-by: Rahul T R <r-ravikumar@ti.com> Co-authored-by: Abhay Chirania <a-chirania@ti.com> Co-authored-by: JuneChul Roh <jroh@ti.com> Co-authored-by: Shyam Jagannathan <shyam.jagannathan@ti.com>
1 parent c305f67 commit 75995ce

File tree

82 files changed

+2991
-1793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2991
-1793
lines changed

apps_cpp/app_config_checker/src/app_config_checker_main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ int32_t Demo::setupFlows()
167167

168168
/* Update the output set. */
169169
auto const &outputIds = flow->m_outputIds;
170-
outputSet.insert(outputIds.begin(), outputIds.end());
170+
auto const begin = outputIds.begin();
171+
auto const end = outputIds.end();
172+
outputSet.insert(begin, end);
171173
}
172174

173175
/* Collect the sink pipeline. */

apps_cpp/app_edgeai/src/app_edgeai_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static void sigHandler(int32_t sig)
5454
}
5555
}
5656

57-
int32_t main(int argc, char * argv[])
57+
int main(int argc, char * argv[])
5858
{
5959
CmdlineArgs cmdArgs;
6060

apps_cpp/cmake/common.cmake

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE} PROJECT_NAME = ${PROJECT_
2828
SET(CMAKE_FIND_LIBRARY_PREFIXES "" "lib")
2929
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ".lib" ".so")
3030

31-
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib/${CMAKE_BUILD_TYPE})
32-
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE})
33-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE})
31+
if(NOT CMAKE_OUTPUT_DIR)
32+
set(CMAKE_OUTPUT_DIR ${CMAKE_SOURCE_DIR})
33+
endif()
34+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_OUTPUT_DIR}/lib/${CMAKE_BUILD_TYPE})
35+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_OUTPUT_DIR}/lib/${CMAKE_BUILD_TYPE})
36+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_OUTPUT_DIR}/bin/${CMAKE_BUILD_TYPE})
3437

3538
if (NOT DEFINED ENV{SOC})
3639
message(FATAL_ERROR "SOC not defined.")
@@ -58,11 +61,11 @@ elseif ("${TARGET_SOC_LOWER}" STREQUAL "am62a")
5861
set(TARGET_CPU A53)
5962
set(TARGET_OS LINUX)
6063
set(TARGET_SOC AM62A)
61-
elseif ("${TARGET_SOC_LOWER}" STREQUAL "am62")
64+
elseif ("${TARGET_SOC_LOWER}" STREQUAL "am62x")
6265
set(TARGET_PLATFORM SITARA)
6366
set(TARGET_CPU A53)
6467
set(TARGET_OS LINUX)
65-
set(TARGET_SOC AM62)
68+
set(TARGET_SOC AM62X)
6669
else()
6770
message(FATAL_ERROR "SOC ${TARGET_SOC_LOWER} is not supported.")
6871
endif()
@@ -78,7 +81,6 @@ add_definitions(
7881

7982
set(TENSORFLOW_INSTALL_DIR ${TARGET_FS}/usr/include/tensorflow)
8083
set(ONNXRT_INSTALL_DIR ${TARGET_FS}/usr/include/onnxruntime)
81-
set(DLPACK_INSTALL_DIR ${TARGET_FS}/usr/include/dlpack)
8284
set(TFLITE_INSTALL_DIR ${TARGET_FS}/usr/lib/tflite_2.8)
8385

8486
if(USE_DLR_RT)
@@ -98,7 +100,7 @@ link_directories(${TARGET_FS}/usr/lib/aarch64-linux-gnu
98100
)
99101

100102
if(USE_DLR_RT)
101-
link_directories(${TARGET_FS}/usr/lib/python3.8/site-packages/dlr)
103+
link_directories(${TARGET_FS}/usr/lib/python3.10/site-packages/dlr)
102104
endif()
103105

104106
if(USE_TENSORFLOW_RT)
@@ -125,15 +127,16 @@ include_directories(${PROJECT_SOURCE_DIR}
125127
SYSTEM ${TARGET_FS}/usr/local/include
126128
SYSTEM ${TARGET_FS}/usr/include/gstreamer-1.0
127129
SYSTEM ${TARGET_FS}/usr/include/glib-2.0
130+
SYSTEM ${TARGET_FS}/usr/lib/glib-2.0/include
128131
SYSTEM ${TARGET_FS}/usr/lib/aarch64-linux-gnu/glib-2.0/include
129132
SYSTEM ${TARGET_FS}/usr/include/opencv4/
130133
SYSTEM ${TARGET_FS}/usr/include/processor_sdk/vision_apps
134+
SYSTEM ${TARGET_FS}/usr/include/processor_sdk/app_utils
131135
SYSTEM ${TARGET_FS}/usr/include/edgeai_dl_inferer
132-
SYSTEM ${DLPACK_INSTALL_DIR}/include
133136
)
134137

135138
if(USE_DLR_RT)
136-
include_directories(${TARGET_FS}/usr/lib/python3.8/site-packages/dlr/include/)
139+
include_directories(${TARGET_FS}/usr/lib/python3.10/site-packages/dlr/include/)
137140
endif()
138141

139142
if(USE_TENSORFLOW_RT)
@@ -170,7 +173,7 @@ set(SYSTEM_LINK_LIBS
170173
dl
171174
)
172175

173-
if(NOT ${TARGET_SOC} STREQUAL "AM62")
176+
if(NOT ${TARGET_SOC} STREQUAL "AM62X")
174177
set(SYSTEM_LINK_LIBS ${SYSTEM_LINK_LIBS} tivision_apps)
175178
endif()
176179

apps_cpp/cmake/cross_compile_aarch64.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ set(CMAKE_CXX_COMPILER_WORKS 1)
4848
# https://cmake.org/cmake/help/latest/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.html
4949
list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CROSS_COMPILER_PATH TARGET_FS TOOLCHAIN_PREFIX)
5050

51-
link_directories(${TARGET_FS}/usr/local/lib/python3.8/dist-packages/dlr
51+
link_directories(${TARGET_FS}/usr/local/lib/python3.10/dist-packages/dlr
5252
)

apps_cpp/common/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set(EDGEAI_COMMON_SRCS
1010
src/post_process_image_classify.cpp
1111
src/post_process_image_object_detect.cpp
1212
src/post_process_image_segmentation.cpp
13+
src/post_process_image_keypoint_detect.cpp
1314
src/edgeai_inference_pipe.cpp
1415
src/edgeai_demo.cpp
1516
src/edgeai_cmd_line_parse.cpp

apps_cpp/common/include/edgeai_demo.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ namespace ti::edgeai::common
9393
~EdgeAIDemo();
9494

9595
private:
96+
/**
97+
* Copy Constructor.
98+
*
99+
* Copy Constructor is not required and allowed and hence prevent
100+
* the compiler from generating a default Copy Constructor.
101+
*/
102+
EdgeAIDemo(const EdgeAIDemo& ) = delete;
103+
96104
/**
97105
* Assignment operator.
98106
*

apps_cpp/common/include/edgeai_demo_config.h

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ namespace ti::edgeai::common
272272
string m_pattern{"ball"};
273273

274274
/** v4l subdev id of sensor. */
275-
int32_t m_subdev_id{2};
275+
string m_subdev_id{"/dev/v4l-subdev2"};
276276

277277
/** Frame rate. */
278278
string m_framerate{};
@@ -447,10 +447,10 @@ namespace ti::edgeai::common
447447
*/
448448
int32_t m_port{8081};
449449

450-
/** Payloader for remote sink.
450+
/** Encoding type for remote sink.
451451
* This field is ignored for sinks other than remote
452452
*/
453-
string m_payloader{"rtph264pay"};
453+
string m_encoding{"h264"};
454454

455455
/** gop size for encoder.
456456
*/
@@ -462,7 +462,7 @@ namespace ti::edgeai::common
462462

463463
/** Use tiperfoverlay.
464464
*/
465-
bool m_overlayPerformance{false};
465+
string m_overlayPerfType{""};
466466

467467
/** Output buffer. */
468468
GstWrapperBuffer m_outBuff;
@@ -565,6 +565,23 @@ namespace ti::edgeai::common
565565
*/
566566
void dumpInfo(const char *prefix="") const;
567567

568+
private:
569+
/**
570+
* Copy Constructor.
571+
*
572+
* Copy Constructor is not required and allowed and hence prevent
573+
* the compiler from generating a default Copy Constructor.
574+
*/
575+
ModelInfo(const ModelInfo& ) = delete;
576+
577+
/**
578+
* Assignment operator.
579+
*
580+
* Assignment is not required and allowed and hence prevent
581+
* the compiler from generating a default assignment operator.
582+
*/
583+
ModelInfo & operator=(const ModelInfo& rhs) = delete;
584+
568585
public:
569586
/** Inference context. */
570587
DLInferer *m_infererObj{nullptr};
@@ -636,6 +653,23 @@ namespace ti::edgeai::common
636653
*/
637654
void dumpInfo(const char *prefix="") const;
638655

656+
private:
657+
/**
658+
* Copy Constructor.
659+
*
660+
* Copy Constructor is not required and allowed and hence prevent
661+
* the compiler from generating a default Copy Constructor.
662+
*/
663+
SubFlowInfo(const SubFlowInfo& ) = delete;
664+
665+
/**
666+
* Assignment operator.
667+
*
668+
* Assignment is not required and allowed and hence prevent
669+
* the compiler from generating a default assignment operator.
670+
*/
671+
SubFlowInfo & operator=(const SubFlowInfo& rhs) = delete;
672+
639673
public:
640674
/** Pre-processing context. */
641675
PreprocessImage *m_preProcObj{nullptr};
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
/*
2+
* Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
3+
*
4+
* Redistribution and use in source and binary forms, with or without
5+
* modification, are permitted provided that the following conditions
6+
* are met:
7+
*
8+
* Redistributions of source code must retain the above copyright
9+
* notice, this list of conditions and the following disclaimer.
10+
*
11+
* Redistributions in binary form must reproduce the above copyright
12+
* notice, this list of conditions and the following disclaimer in the
13+
* documentation and/or other materials provided with the
14+
* distribution.
15+
*
16+
* Neither the name of Texas Instruments Incorporated nor the names of
17+
* its contributors may be used to endorse or promote products derived
18+
* from this software without specific prior written permission.
19+
*
20+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31+
*/
32+
33+
#ifndef _POST_PROCESS_IMAGE_KEYPOINT_DETECT_H_
34+
#define _POST_PROCESS_IMAGE_KEYPOINT_DETECT_H_
35+
36+
/* Module headers. */
37+
#include <common/include/post_process_image.h>
38+
39+
/**
40+
* \defgroup group_edgeai_cpp_apps_keypoint_detect Keypoint Detect post-processing
41+
*
42+
* \brief Class implementing the image based keypoint detect post-processing
43+
* logic.
44+
*
45+
* \ingroup group_edgeai_cpp_apps_post_proc
46+
*/
47+
48+
namespace ti::edgeai::common
49+
{
50+
/** Post-processing for image based keypoint detect.
51+
*
52+
* \ingroup group_edgeai_cpp_apps_keypoint_detect
53+
*/
54+
class PostprocessImageKeypointDetect : public PostprocessImage
55+
{
56+
public:
57+
/** Constructor.
58+
*
59+
* @param config Configuration information not present in YAML
60+
* @param debugConfig Debug Configuration for passing to post process class
61+
*/
62+
PostprocessImageKeypointDetect(const PostprocessImageConfig &config,
63+
const DebugDumpConfig &debugConfig);
64+
65+
/** Function operator
66+
*
67+
* This is the heart of the class. The application uses this
68+
* interface to execute the functionality provided by this class.
69+
*
70+
* @param frameData Input data frame on which results are overlaid
71+
* @param results Detect output results from the inference
72+
*/
73+
void *operator()(void *frameData,
74+
VecDlTensorPtr &results);
75+
76+
/** Destructor. */
77+
~PostprocessImageKeypointDetect();
78+
79+
private:
80+
/** Multiplicative factor to be applied to X co-ordinates. */
81+
float m_scaleX{1.0f};
82+
83+
/** Multiplicative factor to be applied to Y co-ordinates. */
84+
float m_scaleY{1.0f};
85+
86+
private:
87+
/**
88+
* Assignment operator.
89+
*
90+
* Assignment is not required and allowed and hence prevent
91+
* the compiler from generating a default assignment operator.
92+
*/
93+
PostprocessImageKeypointDetect &
94+
operator=(const PostprocessImageKeypointDetect& rhs) = delete;
95+
};
96+
97+
} // namespace ti::edgeai::common
98+
99+
#endif /* _POST_PROCESS_IMAGE_KEYPOINT_DETECT_H_ */
100+

apps_cpp/common/src/edgeai_demo.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ class EdgeAIDemoImpl
8686
/** Setup the data flows. */
8787
int32_t setupFlows();
8888

89+
/**
90+
* Copy Constructor.
91+
*
92+
* Copy Constructor is not required and allowed and hence prevent
93+
* the compiler from generating a default Copy Constructor.
94+
*/
95+
EdgeAIDemoImpl(const EdgeAIDemoImpl& ) = delete;
96+
8997
/**
9098
* Assignment operator.
9199
*
@@ -168,7 +176,10 @@ int32_t EdgeAIDemoImpl::setupFlows()
168176

169177
/* Update the output set. */
170178
auto const &outputIds = flow->m_outputIds;
171-
outputSet.insert(outputIds.begin(), outputIds.end());
179+
180+
auto const begin = outputIds.begin();
181+
auto const end = outputIds.end();
182+
outputSet.insert(begin, end);
172183
}
173184

174185
/* Collect the sink commands by scanning all the outputs. */

0 commit comments

Comments
 (0)