修复人脸检测,o4.5 8
This commit is contained in:
parent
b0957e52a1
commit
8bc8c3ac13
@ -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",
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user