diff --git a/configs/test_cam1_face_det_rtsp_server.json b/configs/test_cam1_face_det_rtsp_server.json index ce823ec..d4d7522 100644 --- a/configs/test_cam1_face_det_rtsp_server.json +++ b/configs/test_cam1_face_det_rtsp_server.json @@ -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", diff --git a/plugins/ai_face_det/ai_face_det_node.cpp b/plugins/ai_face_det/ai_face_det_node.cpp index b32ab7a..385a36e 100644 --- a/plugins/ai_face_det/ai_face_det_node.cpp +++ b/plugins/ai_face_det/ai_face_det_node.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -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(input_ptr), static_cast(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;