edge-v2-front.json 4.6 KB

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