edge-v2-front.json 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. {
  2. "_note": [
  3. "P1b/P1c 前视 v2 模板:箱底以下结构证据 + commit 落位门。",
  4. "Python: python -m portcv run -c configs/edge-v2-front.json --no-plc",
  5. "C++ : portcv_run -c configs/edge-v2-front.json --backend edge-v2 --no-plc",
  6. "source.type=images 是 A/B 回放模板;真机改成 rtsp 并填 uri。",
  7. "require_commit=true:commit 不成立时内部输出 255,PublishGate 保持上一稳定值。",
  8. "allow_state2=true:平车 2 已打开提交;顶层与 commit 两个开关串联,任一 false 都会回退为只识别、不提交。",
  9. "px_per_m=0 表示用箱体竖棱自标尺;现场若已标定可填固定值(A/B 实测约 115.6)。"
  10. ],
  11. "run": {
  12. "mode": "composed",
  13. "backend": "evidence-v2",
  14. "max_fps": 15.0,
  15. "warmup_frames": 3,
  16. "log_level": "INFO",
  17. "log_json": false,
  18. "save_on_change": true,
  19. "output_dir": "runs/edge_v2",
  20. "preview": false
  21. },
  22. "health": {
  23. "enabled": true,
  24. "work_width": 320,
  25. "blur_var_min": 18.0,
  26. "dark_clip_ratio_max": 0.97,
  27. "bright_clip_ratio_max": 0.55,
  28. "low_texture_ratio_max": 0.88,
  29. "degrade_persist_s": 0.8,
  30. "recover_persist_s": 1.5
  31. },
  32. "source": {
  33. "type": "images",
  34. "uri": "runs/frames_A1",
  35. "width": 0,
  36. "height": 0,
  37. "buffer_size": 2,
  38. "use_gst": false,
  39. "reconnect_s": 2.0,
  40. "stale_frame_s": 0.6
  41. },
  42. "calibration": {
  43. "_comment": "P0-5 标定记录:填 configs/calib/<站点>-<机位>.json;留空则不做判定(只受 stale 开关控制)。hold_on_stale=true 时标定不可信会清 RESULT_VALID/STABLE。",
  44. "stale": false,
  45. "record": "",
  46. "max_age_days": 180,
  47. "px_per_m_tolerance": 0.1,
  48. "box_height_tolerance_m": 0.02,
  49. "hold_on_stale": true
  50. },
  51. "scene": {
  52. "mode": "composed",
  53. "roi": [[0.03, 0.1], [0.97, 0.1], [0.97, 0.99], [0.03, 0.99]]
  54. },
  55. "evidence_v2": {
  56. "enabled": true,
  57. "view": "front",
  58. "work_width": 960,
  59. "window": [0.24, 0.02, 0.78, 0.95],
  60. "band_min_h": 3,
  61. "band_max_h_ratio": 0.15,
  62. "bed_search_ratio": 0.4,
  63. "box_bottom_max_ratio": 0.78,
  64. "below_start_ratio": 0.07,
  65. "below_height_ratio": 0.55,
  66. "below_min_height_px": 24,
  67. "min_door_posts": 5,
  68. "max_door_posts": 16,
  69. "max_bed_gap_px": 40.0,
  70. "flat_max_door_posts": 4,
  71. "max_post_spacing_cv": 6.0,
  72. "min_post_len_ratio": 0.3,
  73. "min_wall_opacity": 0.35,
  74. "wall_edge_density_ref": 0.14,
  75. "wall_edge_density_span": 0.04,
  76. "ground_block_px": 32,
  77. "ground_density_lo": 0.02,
  78. "ground_density_hi": 0.35,
  79. "min_flat_ground_ratio": 0.4,
  80. "min_zero_ground_ratio": 0.65,
  81. "deck_min_len_ratio": 0.3,
  82. "max_flat_gap_px": 40.0,
  83. "box_height_m": 2.591,
  84. "px_per_m": 0.0,
  85. "min_scale_px": 60.0,
  86. "motion_diff_max": 12.0,
  87. "motion_grad_ratio_min": 0.72,
  88. "require_commit": true,
  89. "allow_state2": true,
  90. "structure_hits_min": 0.6,
  91. "min_bed_roi_px": 90,
  92. "reject_hoist_high": true,
  93. "hoist_dark_max": 75,
  94. "hoist_band_frac": 0.035,
  95. "hoist_line_ratio": 0.2,
  96. "hoist_dark_ratio": 0.55,
  97. "hoist_bright_delta": 12.0,
  98. "reject_spreader_contact": true,
  99. "spreader_dark_max": 110,
  100. "spreader_dark_ratio": 0.55,
  101. "commit": {
  102. "gap_m_max": 0.1,
  103. "gap_px_hard_max": 8.0,
  104. "stable_frames": 5,
  105. "structure_frames": 5,
  106. "min_structure_hits": 0.6,
  107. "max_gap_rise_m": 0.01,
  108. "allow_state1": true,
  109. "allow_state2": true,
  110. "require_motion_ok": true,
  111. "require_view_known": true,
  112. "use_plc_arrival": true
  113. }
  114. },
  115. "decision": {
  116. "window": 9,
  117. "window_s": 1.0,
  118. "min_votes": 4,
  119. "min_confidence": 0.45,
  120. "min_dwell_s": 0.2,
  121. "hold_s": 0.6,
  122. "lost_timeout_s": 1.5,
  123. "low_fps_threshold": 3.0
  124. },
  125. "plc": {
  126. "enabled": true,
  127. "push": "modbus_server",
  128. "modbus": {
  129. "host": "0.0.0.0",
  130. "port": 1502,
  131. "unit_id": 1,
  132. "input_addr": 0,
  133. "holding_addr": 0,
  134. "allow_unit_any": true
  135. },
  136. "gating": false,
  137. "gating_timeout_ms": 800,
  138. "heartbeat_ms": 500,
  139. "confidence_scale": 1000,
  140. "min_publish_interval_ms": 50
  141. }
  142. }