Skip to content

models: CenterPoint + calibration_status onboarding (stage graph, deploy, INT8) - #20

Draft
vividf wants to merge 1 commit into
pr9-cli-family-dispatchfrom
pr10-centerpoint-onboarding
Draft

models: CenterPoint + calibration_status onboarding (stage graph, deploy, INT8)#20
vividf wants to merge 1 commit into
pr9-cli-family-dispatchfrom
pr10-centerpoint-onboarding

Conversation

@vividf

@vividf vividf commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Stacked PR 10/15 — ⬅ #19 | #21

Stack(base pr-stack-base = 7e35d97):#11#12#13#14#15#16#17#18#19#20(CenterPoint 全功能點)→ #21#25#22#23#24(= 開發 branch HEAD,逐位元一致)。合併由下而上,每合一層把下一層 base retarget。

這個 PR 是什麼

CenterPoint(+ calibration_status)全功能上線點——合入當下 train / quantize / deploy / test 全部可用(CLI、quantization、編排都在其之前;此順序經 import audit 驗證)。這是 stage-graph + 宣告式量化的第一個完整應用,pattern 在 #22(BEVFusion)、#23(PTv3)重複;review 這個 PR = 建立三分之一的 onboarding 心智。

實測數字

形態 mAP 鏈 latency backbone
FP16 0.4551 6.3 ms
INT8 PTQ 0.4538 4.43 ms 3.55 ms

verification 兩 gate(pytorch↔onnx、onnx↔tensorrt)PASS;QAT 與 PTQ 持平(0.8128 vs 0.8132 @1000 frames,50 校準樣本另一 config 系)→ 正式路徑 = PTQ,QAT recipe(freeze + cosine 1e-5)保留可用。

逐檔導覽

  • main_modules/centerpoint/stages.py:TorchStage(voxelize/scatter)+ GraphStage(pts_backbone_neck_head 一張圖)的切界;output_fields 映射 head 輸出。
  • main_modules/centerpoint/quantization.py:QuantRules(quantize_submodules={"backbone": ("conv",), ...})
  • main_modules/centerpoint/model.py(R050 自舊路徑):模型類。
  • heads/centerhead.py:head_conv_kernel 參數——唯一理由是 AWML/mmdet3d ckpt 相容(kernel 1;native=3),docstring 載明;velocity loss 的 non-finite masking。
  • models/common/layers/conv.py:ConvModule 增 kernel_size(上項的支撐)。
  • preprocessing/detection3d/point_pillar*.py + 測試:pillar 前處理。
  • configs:centerpoint base 更新 + _int8 / _int8_qat experiment(skip_quantize 的 stage-0 是 release recipe:輸入端量化掉 ~1.2 mAP,實測記錄在 config 註解;verification tolerance 帶 observed 值)。
  • calibration_status:同 pattern 的第二個(小)模型,stages + config。
  • 測試:test_centerpoint_stagestest_calibration_status_stagestest_tree_parity(量化重建與原模型樹一致)。
  • legacy models/detection3d/centerpoint.py 整檔 TODO 待刪(experiments 已全指向 main_modules 版)。
檔案清單(點開)
.../experiments/detection3d/centerpoint/base.yaml 49 ++++-
..._secfpn_b16_30e_t4dataset_120m_j6gen2_base.yaml 13 +-
...pn_b16_30e_t4dataset_120m_j6gen2_base_int8.yaml 64 ++++++
...16_30e_t4dataset_120m_j6gen2_base_int8_qat.yaml 37 ++++
.../calibration_status/calibration_status.py 1 +
.../calibration_status/main_modules/__init__.py 0 
.../main_modules/calibration_status/__init__.py 0 
.../main_modules/calibration_status/stages.py 108 +++++++++
autoware_ml/models/common/layers/conv.py 8 +-
autoware_ml/models/detection3d/centerpoint.py 1 +
autoware_ml/models/detection3d/heads/centerhead.py 7 +-
.../main_modules/centerpoint/__init__.py 22 ++
.../{centerpoint.py centerpoint/model.py} |
.../main_modules/centerpoint/quantization.py 65 ++++++
.../detection3d/main_modules/centerpoint/stages.py 187 ++++++++++++++++
.../preprocessing/detection3d/point_pillar.py 157 +++++++++++++
.../detection3d/point_pillar_preprocessor.py 16 +-
.../detection3d/tests/test_point_pillar.py 167 ++++++++++++++
.../tests/test_point_pillar_preprocessor.py 64 ++++++
.../deployment/test_calibration_status_stages.py 110 ++++++++++
.../tests/deployment/test_centerpoint_stages.py 244 +++++++++++++++++++++
autoware_ml/tests/quantization/test_tree_parity.py 176 +++++++++++++++
docs/models/centerpoint.md 6 +-

Review checklist

  • stages.py 的 Torch/Graph 切界理由(voxelize 為何不進圖)。
  • _int8.yaml 的 skip_quantize 與 tolerance 註解(observed 值在不在)。
  • calibration_status 同 PR 的取捨(同 pattern 一次講完 vs PR 大小)。

🤖 Generated with Claude Code

…loy, INT8)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant