From 74540e411a760a54e97c4491517799b8b92e7fe3 Mon Sep 17 00:00:00 2001 From: sladro Date: Thu, 8 Jan 2026 14:01:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=B5=8B=E8=AF=95=E4=BA=BA?= =?UTF-8?q?=E8=84=B8=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test_cam1_face_det_recog_rtsp_server.json | 114 ++++++++++++++++++ models/face_gallery.db | Bin 0 -> 20480 bytes 2 files changed, 114 insertions(+) create mode 100644 configs/test_cam1_face_det_recog_rtsp_server.json create mode 100644 models/face_gallery.db diff --git a/configs/test_cam1_face_det_recog_rtsp_server.json b/configs/test_cam1_face_det_recog_rtsp_server.json new file mode 100644 index 0000000..80d29a6 --- /dev/null +++ b/configs/test_cam1_face_det_recog_rtsp_server.json @@ -0,0 +1,114 @@ +{ + "queue": { "size": 8, "strategy": "drop_oldest" }, + "graphs": [ + { + "name": "cam1_face_det_recog_test", + "nodes": [ + { + "id": "in_cam1", + "type": "input_rtsp", + "role": "source", + "enable": true, + "url": "rtsp://10.0.0.5:8554/cam", + "fps": 30, + "width": 1280, + "height": 720, + "use_mpp": true, + "use_ffmpeg": false, + "force_tcp": true, + "reconnect_sec": 5, + "reconnect_backoff_max_sec": 30 + }, + { + "id": "pre_cam1", + "type": "preprocess", + "role": "filter", + "enable": true, + "dst_w": 320, + "dst_h": 320, + "dst_format": "rgb", + "keep_ratio": false, + "use_rga": true + }, + { + "id": "face_det_cam1", + "type": "ai_face_det", + "role": "filter", + "enable": true, + "model_path": "./models/RetinaFace_mobile320.rknn", + "conf": 0.6, + "nms": 0.4, + "max_faces": 10, + "output_landmarks": true, + "input_format": "rgb" + }, + { + "id": "face_recog_cam1", + "type": "ai_face_recog", + "role": "filter", + "enable": true, + "model_path": "./models/mobilefacenet_arcface.rknn", + "align": true, + "emit_embedding": false, + "max_faces": 10, + "input_format": "rgb", + "input_dtype": "uint8", + "threshold": { "accept": 0.45, "margin": 0.05 }, + "gallery": { + "backend": "sqlite", + "path": "./models/face_gallery.db", + "load_on_start": true, + "expected_dim": 512, + "dtype": "auto" + } + }, + { + "id": "osd_cam1", + "type": "osd", + "role": "filter", + "enable": true, + "draw_bbox": true, + "draw_text": true, + "line_width": 2, + "font_scale": 1, + "labels": [] + }, + { + "id": "post_cam1", + "type": "preprocess", + "role": "filter", + "enable": true, + "dst_w": 1280, + "dst_h": 720, + "dst_format": "nv12", + "keep_ratio": false, + "use_rga": true + }, + { + "id": "pub_cam1", + "type": "publish", + "role": "filter", + "enable": true, + "codec": "h264", + "fps": 30, + "gop": 60, + "bitrate_kbps": 2000, + "use_mpp": true, + "use_ffmpeg_mux": true, + "outputs": [ + { "proto": "rtsp_server", "port": 8555, "path": "/live/cam1_face_det_recog" }, + { "proto": "hls", "path": "./web/hls/cam1_face_det_recog/index.m3u8", "segment_sec": 2 } + ] + } + ], + "edges": [ + ["in_cam1", "pre_cam1"], + ["pre_cam1", "face_det_cam1"], + ["face_det_cam1", "face_recog_cam1"], + ["face_recog_cam1", "osd_cam1"], + ["osd_cam1", "post_cam1"], + ["post_cam1", "pub_cam1"] + ] + } + ] +} diff --git a/models/face_gallery.db b/models/face_gallery.db new file mode 100644 index 0000000000000000000000000000000000000000..1f199482f3a635b78f6aa771fd245404d36f2027 GIT binary patch literal 20480 zcmeI%`(KUO8UXOUwUg4WXp-F8UNW~b5fkY~m*eetgiA1LEn(F>OG}MDPbMHg?e(*m&Ws(t_+vWN% zB{DrPiGG0o1wB#^cyIwOzy-Jf7vKV1fD3Q|F2Du2z(*huBGWP!Or^1!A>pc^l_9E? z{y|~$f>f%I@cI6WgO)Cf2=@#wI4x zSgW@szFYL&vCChIdpGyCvJjPe<@ZHR^Kx-_@bY`J+MBw<1Hyt7-pZNkO8=}@;p5@r z>7&%KwCd8;c!G&k^45LXl11u$y??+Lkr8jdzo)l;x6Yfre7840Ho3Y>^`A@B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