Skip to content

Commit

Permalink
postprocess: hailo: Update for Tappas v3.31.0 API changes.
Browse files Browse the repository at this point in the history
The postprocessing libraries have an updated API for init/filter,
switch to the new API. Required Hailo Tappas v3.31.0 or later to be
installed.

Signed-off-by: Naushir Patuck <[email protected]>
  • Loading branch information
naushir committed Jan 23, 2025
1 parent e821e4a commit 20193db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions post_processing_stages/hailo/hailo_yolo_inference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
#include "core/rpicam_app.hpp"
#include "post_processing_stages/object_detect.hpp"

#include "detection/yolo_postprocess.hpp"
#include "detection/yolo_hailortpp.hpp"

#include "hailo_postprocessing_stage.hpp"

using Size = libcamera::Size;
using PostProcFuncPtrNms = void (*)(HailoROIPtr, YoloParams *);
using InitFuncPtr = YoloParams *(*)(std::string, std::string);
using PostProcFuncPtrNms = void (*)(HailoROIPtr, YoloParamsNMS *);
using InitFuncPtr = YoloParamsNMS *(*)(std::string, std::string);
using FreeFuncPtr = void (*)(void *);

using Rectangle = libcamera::Rectangle;
Expand Down Expand Up @@ -64,7 +64,7 @@ class YoloInference : public HailoPostProcessingStage
std::vector<LtObject> lt_objects_;
std::mutex lock_;
PostProcessingLib postproc_nms_;
YoloParams *yolo_params_ = nullptr;
YoloParamsNMS *yolo_params_ = nullptr;

// Config params
std::string config_path_;
Expand Down
3 changes: 2 additions & 1 deletion post_processing_stages/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ endif
enable_hailo = false
hailort_dep = dependency('HailoRT', modules : ['HailoRT::libhailort'], version: '>=4.18.0',
required : get_option('enable_hailo'))
hailo_tappas_dep = dependency('hailo-tappas-core', required : get_option('enable_hailo'))
hailo_tappas_dep = dependency('hailo-tappas-core', version: '>=3.31.0',
required : get_option('enable_hailo'))
if hailort_dep.found() and hailo_tappas_dep.found() and opencv_dep.found()
subdir('hailo')
enable_hailo = true
Expand Down

0 comments on commit 20193db

Please sign in to comment.