edge-v2-front.json 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. "P0-Q3:平车 2 必须是『薄车面边梁 + 车面下方暗带』;地面/下层箱顶/月台的厚亮面不判 2(宁可 255)。",
  10. "P0-Q3:敞车 1 的门板阵列必须横跨 >=0.23×工作宽(B 的车轮/制动梁伪立柱只跨 ~20%);贴合形态还需斜撑。",
  11. "P0-Q4:天空电线用竖向梯度块覆盖率找车体顶,车体顶以上的亮/暗带剔除;空车歧义帧不判 2(255)。",
  12. "P0-Q4 空车兜底:车体全宽 + 低阈值 + 立柱 3~16 根;空 C70 判 1,平车 23 根瓦楞 >16 判 2。",
  13. "px_per_m=0 表示用箱体竖棱自标尺;现场若已标定可填固定值(A/B 实测约 115.6)。"
  14. ],
  15. "run": {
  16. "mode": "composed",
  17. "backend": "evidence-v2",
  18. "max_fps": 15.0,
  19. "warmup_frames": 3,
  20. "log_level": "INFO",
  21. "log_json": false,
  22. "save_on_change": true,
  23. "output_dir": "runs/edge_v2",
  24. "preview": false
  25. },
  26. "health": {
  27. "enabled": true,
  28. "work_width": 320,
  29. "blur_var_min": 18.0,
  30. "dark_clip_ratio_max": 0.97,
  31. "bright_clip_ratio_max": 0.55,
  32. "low_texture_ratio_max": 0.88,
  33. "degrade_persist_s": 0.8,
  34. "recover_persist_s": 1.5
  35. },
  36. "source": {
  37. "type": "images",
  38. "uri": "runs/frames_A1",
  39. "width": 0,
  40. "height": 0,
  41. "buffer_size": 2,
  42. "use_gst": false,
  43. "reconnect_s": 2.0,
  44. "stale_frame_s": 0.6
  45. },
  46. "calibration": {
  47. "_comment": "P0-5 标定记录:填 configs/calib/<站点>-<机位>.json;留空则不做判定(只受 stale 开关控制)。hold_on_stale=true 时标定不可信会清 RESULT_VALID/STABLE。",
  48. "stale": false,
  49. "record": "",
  50. "max_age_days": 180,
  51. "px_per_m_tolerance": 0.1,
  52. "box_height_tolerance_m": 0.02,
  53. "hold_on_stale": true
  54. },
  55. "scene": {
  56. "mode": "composed",
  57. "roi": [[0.03, 0.1], [0.97, 0.1], [0.97, 0.99], [0.03, 0.99]]
  58. },
  59. "evidence_v2": {
  60. "enabled": true,
  61. "view": "front",
  62. "work_width": 960,
  63. "window": [0.24, 0.02, 0.78, 0.95],
  64. "band_min_h": 3,
  65. "band_max_h_ratio": 0.15,
  66. "bed_search_ratio": 0.4,
  67. "box_bottom_max_ratio": 0.78,
  68. "below_start_ratio": 0.07,
  69. "below_height_ratio": 0.55,
  70. "below_min_height_px": 24,
  71. "min_door_posts": 5,
  72. "max_door_posts": 16,
  73. "max_bed_gap_px": 40.0,
  74. "flat_max_door_posts": 4,
  75. "max_post_spacing_cv": 6.0,
  76. "min_post_len_ratio": 0.3,
  77. "min_post_spacing_px": 24.0,
  78. "min_diagonal_braces": 1,
  79. "min_post_span_ratio": 0.23,
  80. "texture_top_enable": true,
  81. "texture_grad_th": 50.0,
  82. "texture_block_px": 16,
  83. "texture_block_hit_ratio": 0.03,
  84. "texture_coverage_min": 0.5,
  85. "texture_run_rows": 3,
  86. "texture_smooth_rows": 7,
  87. "texture_top_margin_ratio": 0.02,
  88. "body_fallback_enable": true,
  89. "body_bottom_ratio": 0.75,
  90. "body_min_opacity": 0.5,
  91. "body_min_roi_px": 90,
  92. "body_canny_lo_pct": 0.55,
  93. "body_canny_hi_pct": 0.75,
  94. "body_min_points": 4,
  95. "body_grad_pct": 0.6,
  96. "body_min_inlier_ratio": 0.5,
  97. "body_run_min_len_ratio": 0.2,
  98. "body_min_post_len_ratio": 0.15,
  99. "body_x_margin_ratio": 0.03,
  100. "body_min_posts": 3,
  101. "vehicle_min_span_ratio": 0.5,
  102. "vehicle_max_posts": 60,
  103. "empty_vehicle_enable": true,
  104. "empty_min_posts": 3,
  105. "empty_min_span_ratio": 0.6,
  106. "empty_min_opacity": 0.55,
  107. "empty_min_wall_h_ratio": 0.25,
  108. "empty_min_post_len_ratio": 0.3,
  109. "empty_fallback_max_posts": 4,
  110. "empty_min_diagonal_braces": 1,
  111. "empty_flatbed_enable": true,
  112. "empty_flatbed_min_gap_px": 16.0,
  113. "empty_flatbed_max_plane_edge": 0.12,
  114. "empty_flatbed_max_gray_drop": 80.0,
  115. "empty_top_margin_ratio": 0.0,
  116. "allow_state3": true,
  117. "min_wall_opacity": 0.35,
  118. "wall_edge_density_ref": 0.14,
  119. "wall_edge_density_span": 0.04,
  120. "ground_block_px": 32,
  121. "ground_density_lo": 0.02,
  122. "ground_density_hi": 0.35,
  123. "min_zero_ground_ratio": 0.65,
  124. "deck_min_len_ratio": 0.3,
  125. "contact_max_h_ratio": 0.12,
  126. "under_deck_dark_delta": 12.0,
  127. "under_deck_min_h_ratio": 0.01,
  128. "under_deck_search_h_ratio": 0.1,
  129. "max_flat_gap_px": 40.0,
  130. "box_height_m": 2.591,
  131. "px_per_m": 0.0,
  132. "min_scale_px": 60.0,
  133. "motion_diff_max": 12.0,
  134. "motion_grad_ratio_min": 0.72,
  135. "require_commit": true,
  136. "allow_state2": true,
  137. "structure_hits_min": 0.6,
  138. "min_bed_roi_px": 90,
  139. "reject_hoist_high": true,
  140. "hoist_dark_max": 75,
  141. "hoist_band_frac": 0.035,
  142. "hoist_line_ratio": 0.2,
  143. "hoist_dark_ratio": 0.55,
  144. "hoist_bright_delta": 12.0,
  145. "reject_spreader_contact": true,
  146. "spreader_dark_max": 110,
  147. "spreader_dark_ratio": 0.55,
  148. "commit": {
  149. "gap_m_max": 0.1,
  150. "gap_px_hard_max": 8.0,
  151. "stable_frames": 5,
  152. "structure_frames": 5,
  153. "min_structure_hits": 0.6,
  154. "max_gap_rise_m": 0.01,
  155. "allow_state1": true,
  156. "allow_state2": true,
  157. "allow_state3": true,
  158. "require_motion_ok": true,
  159. "require_view_known": true,
  160. "use_plc_arrival": true
  161. }
  162. },
  163. "decision": {
  164. "window": 9,
  165. "window_s": 1.0,
  166. "min_votes": 4,
  167. "min_confidence": 0.45,
  168. "min_dwell_s": 0.2,
  169. "hold_s": 0.6,
  170. "lost_timeout_s": 1.5,
  171. "low_fps_threshold": 3.0
  172. },
  173. "plc": {
  174. "enabled": true,
  175. "push": "modbus_server",
  176. "modbus": {
  177. "host": "0.0.0.0",
  178. "port": 1502,
  179. "unit_id": 1,
  180. "input_addr": 0,
  181. "holding_addr": 0,
  182. "allow_unit_any": true
  183. },
  184. "gating": false,
  185. "gating_timeout_ms": 800,
  186. "heartbeat_ms": 500,
  187. "confidence_scale": 1000,
  188. "min_publish_interval_ms": 50
  189. }
  190. }