修复人脸画框6
Some checks are pending
CI / host-build (push) Waiting to run
CI / rk3588-cross-build (push) Waiting to run

This commit is contained in:
sladro 2026-01-07 18:21:08 +08:00
parent 6334620969
commit 7a455b9d56
2 changed files with 6 additions and 2 deletions

View File

@ -36,11 +36,11 @@
"role": "filter",
"enable": true,
"model_path": "./models/RetinaFace_mobile320.rknn",
"conf": 0.02,
"conf": 0.002,
"nms": 0.4,
"max_faces": 10,
"output_landmarks": true,
"input_format": "rgb",
"input_format": "bgr",
"face_class_index": -1,
"letterbox": true
},

View File

@ -5,11 +5,13 @@
#pragma once
#include <cctype>
#include <cerrno>
#include <map>
#include <optional>
#include <cstdlib>
#include <string>
#include <string_view>
#include <type_traits>
#include <variant>
#include <vector>
@ -119,6 +121,8 @@ public:
return child->AsString(def);
} else if constexpr (std::is_same_v<T, double>) {
return child->AsNumber(def);
} else if constexpr (std::is_same_v<T, float>) {
return static_cast<float>(child->AsNumber(static_cast<double>(def)));
} else if constexpr (std::is_same_v<T, int>) {
return child->AsInt(def);
} else if constexpr (std::is_same_v<T, bool>) {