| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- {
- "_note": [
- "现场模板(**C++ 版专用**):二维边缘几何证据后端(docs/edge_evidence.md),不需要 NPU / OpenCV / 模型权重。",
- "用法:/opt/portcv/bin/portcv_run -c /opt/portcv/configs/edge-cpp.json",
- "先自检参数:portcv_run -c configs/edge-cpp.json --check-config(只打印生效参数后退出)",
- "键名与 Python 侧同名同义;本文件的 run.backend=edge 只有 C++ 版认识,Python 侧请继续用 configs/rk3588-rtsp.json。",
- "edge.* 分两组:§7 表(现场整定用,docs/edge_evidence.md §7)与实现级补充键(§8 采样回来后并入 §7)。",
- "edge.allow_state2 按 §11 第 10 条:首次上线先置 false(只输出 1 / 0 / 255),验收通过后再改 true。",
- "plc.modbus.port 要与 PLC 侧 MB_CLIENT 目标端口一致;标准 502 在 Linux 需要特权(见 deploy/README.md)。",
- "source.* 是取流开关(2026-10-10 落地):type=none 不取流(默认,Frame.gray=nullptr→输出 255 安全值);",
- " 真机把 type 改成 rtsp|usb|file(或 gst 自写管线)并填 uri,且构建要开 -DPORTCV_WITH_GSTREAMER=ON;",
- " 没有相机时用 type=synth(uri=gondola|flatbed|ground|empty,零依赖、同 seed 逐像素可复现)。",
- " 取流层的校验在启动时做:类型不认识/缺 uri/未编译进来 一律报错退出,不静默降级。",
- " 整定与回归:--dump-frames <jsonl> --dump-dir <dir> 出黄金语料,再用 scripts/replay_check.py 对拍(见 docs/runtime_route_decision.md §4)。"
- ],
- "source": {
- "type": "none",
- "uri": "",
- "_comment": "真机示例:type=rtsp + uri=rtsp://user:pass@192.168.1.64:554/Streaming/Channels/101(日志会掩掉口令)"
- },
- "run": {
- "backend": "edge",
- "max_fps": 15.0,
- "warmup_frames": 3
- },
- "plc": {
- "enabled": true,
- "modbus": {
- "host": "0.0.0.0",
- "port": 1502,
- "unit_id": 1,
- "input_addr": 0,
- "holding_addr": 0,
- "allow_unit_any": true
- }
- },
- "decision": {
- "window": 9,
- "window_s": 1.0,
- "min_votes": 4,
- "min_confidence": 0.45,
- "min_dwell_s": 0.2,
- "hold_s": 0.6,
- "lost_timeout_s": 1.5,
- "low_fps_threshold": 3.0
- },
- "calibration": {
- "_comment": "P0-5 标定记录:填 configs/calib/<站点>-<机位>.json;留空则不做判定。hold_on_stale=true 时标定不可信会清 RESULT_VALID/STABLE(PLC 不得据此自动动作)。",
- "stale": false,
- "record": "",
- "max_age_days": 180,
- "px_per_m_tolerance": 0.1,
- "box_height_tolerance_m": 0.02,
- "hold_on_stale": true
- },
- "scene": {
- "mode": "composed",
- "roi": [
- [0.03, 0.1],
- [0.97, 0.1],
- [0.97, 0.99],
- [0.03, 0.99]
- ]
- },
- "edge": {
- "box_height_m": 2.591,
- "band_high": [0.55, 0.85],
- "band_low": [0.0, 0.1],
- "gap_band": [0.1, 0.45],
- "cross_ratio": [0.1, 0.35],
- "line_angle_deg": 8.0,
- "min_len_track": 0.3,
- "min_len_cross_px": 20.0,
- "min_out_ratio": 0.3,
- "grad_pct": 0.9,
- "texture_period": [0.03, 0.2],
- "near_edge_px": 60.0,
- "motion_hold_s": 1.5,
- "allow_state2": false,
- "work_width": 960,
- "use_clahe": true,
- "clahe_tiles": 8,
- "clahe_clip": 3.0,
- "box_is_on_left": true,
- "motion_gate": true,
- "motion_shift_max_px": 6.0,
- "motion_blur_ratio": 0.75
- }
- }
|