diff --git a/sscma/core/engine/ma_engine_halio.cpp b/sscma/core/engine/ma_engine_halio.cpp index 52f6a920..3a2bbb38 100644 --- a/sscma/core/engine/ma_engine_halio.cpp +++ b/sscma/core/engine/ma_engine_halio.cpp @@ -48,13 +48,20 @@ ma_err_t EngineHalio::run() { return MA_FAILED; } - auto job = _configured_model->run_async(*_bindings, [](const AsyncInferCompletionInfo& info) {}); + auto job = _configured_model->run_async(*_bindings, [&](const AsyncInferCompletionInfo& info) { sta = info.status; }); do { this_thread::yield(); - } while (job->wait(1000ms) != HAILO_SUCCESS); + } while (job->wait(50ms) != HAILO_SUCCESS); - return MA_OK; + switch (sta) { + case HAILO_SUCCESS: + return MA_OK; + case HAILO_TIMEOUT: + return MA_ETIMEOUT; + default: + return MA_FAILED; + } } #if MA_USE_FILESYSTEM diff --git a/sscma/core/model/ma_model_classifier.cpp b/sscma/core/model/ma_model_classifier.cpp index a64447d0..9b51db1e 100644 --- a/sscma/core/model/ma_model_classifier.cpp +++ b/sscma/core/model/ma_model_classifier.cpp @@ -59,7 +59,7 @@ bool Classifier::isValid(Engine* engine) { return false; } - if (output_shape.size == 4 && (output_shape.dims[2] != 1 || output_shape.dims[3] != 1)) { + if (output_shape.size >= 3) { return false; } diff --git a/sscma/core/model/ma_model_segmenter.cpp b/sscma/core/model/ma_model_segmenter.cpp index af873e0b..e6c54ef5 100644 --- a/sscma/core/model/ma_model_segmenter.cpp +++ b/sscma/core/model/ma_model_segmenter.cpp @@ -1,6 +1,6 @@ #include "ma_model_segmenter.h" -#include "core/cv/ma_cv.h" +#include "../cv/ma_cv.h" namespace ma::model { diff --git a/sscma/core/model/ma_model_yolo11_pose.cpp b/sscma/core/model/ma_model_yolo11_pose.cpp index 8c4c926e..e0045256 100644 --- a/sscma/core/model/ma_model_yolo11_pose.cpp +++ b/sscma/core/model/ma_model_yolo11_pose.cpp @@ -8,9 +8,9 @@ #include #include -#include "core/math/ma_math.h" -#include "core/utils/ma_anchors.h" -#include "core/utils/ma_nms.h" +#include "../math/ma_math.h" +#include "../utils/ma_anchors.h" +#include "../utils/ma_nms.h" namespace ma::model { diff --git a/sscma/core/model/ma_model_yolo11_seg.cpp b/sscma/core/model/ma_model_yolo11_seg.cpp index 4e9220a0..a9ccfe8d 100644 --- a/sscma/core/model/ma_model_yolo11_seg.cpp +++ b/sscma/core/model/ma_model_yolo11_seg.cpp @@ -8,8 +8,8 @@ #include #include -#include "core/math/ma_math.h" -#include "core/utils/ma_nms.h" +#include "../math/ma_math.h" +#include "../utils/ma_nms.h" constexpr char TAG[] = "ma::model::yolo11_seg"; diff --git a/sscma/core/model/ma_model_yolov5.cpp b/sscma/core/model/ma_model_yolov5.cpp index a4169f06..07619f26 100644 --- a/sscma/core/model/ma_model_yolov5.cpp +++ b/sscma/core/model/ma_model_yolov5.cpp @@ -332,6 +332,7 @@ ma_err_t YoloV5::postprocess() { switch (output_.type) { case MA_TENSOR_TYPE_NMS_BBOX_U16: case MA_TENSOR_TYPE_NMS_BBOX_F32: { +#if MA_USE_ENGINE_HALIO // TODO: can be optimized by whihout calling this handler for each frame if (output.external_handler) { auto ph = reinterpret_cast(output.external_handler); @@ -346,6 +347,7 @@ ma_err_t YoloV5::postprocess() { threshold_nms_ = thr; } } +#endif return nmsPostProcess(); } diff --git a/sscma/core/pipeline/ma_executor.hpp b/sscma/core/pipeline/ma_executor.hpp index 3eab123d..1fe75334 100644 --- a/sscma/core/pipeline/ma_executor.hpp +++ b/sscma/core/pipeline/ma_executor.hpp @@ -7,7 +7,7 @@ #include #include -#include "core/ma_common.h" +#include "../ma_common.h" #include "porting/ma_osal.h" namespace ma {