修复人脸检测,o4.5 8
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-08 09:18:07 +08:00
parent b0957e52a1
commit 8bc8c3ac13
2 changed files with 14 additions and 5 deletions

View File

@ -40,11 +40,7 @@
"nms": 0.4,
"max_faces": 10,
"output_landmarks": true,
"input_format": "bgr",
"input_dtype": "float32",
"normalize": {
"scale": 0.00392156862
}
"input_format": "rgb"
},
{
"id": "osd_cam1",

View File

@ -5,6 +5,7 @@
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <fstream>
#include <iostream>
#include <memory>
#include <numeric>
@ -548,6 +549,18 @@ private:
input_ptr = input_buf_.data();
}
// Debug: save first frame to file for inspection
static bool dbg_saved_input = false;
if (!dbg_saved_input) {
dbg_saved_input = true;
std::ofstream ofs("/tmp/face_det_input.rgb", std::ios::binary);
if (ofs) {
ofs.write(reinterpret_cast<const char*>(input_ptr), static_cast<std::streamsize>(in_size));
LogInfo("[ai_face_det] saved input to /tmp/face_det_input.rgb (" +
std::to_string(in_w) + "x" + std::to_string(in_h) + " RGB)");
}
}
InferInput input;
input.width = in_w;
input.height = in_h;