AGENT SKILL

geometry-and-evaluation

Use for CPU-safe SECOND box geometry, coordinate conversion, encoding and target assignment, IoU/NMS decisions, KITTI or NuScenes evaluation, result conversion, and tiny-fixture validation.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
geometry-and-evaluation
license
MIT
metadata
{ "disco-role": "operating" }
description
Use for CPU-safe SECOND box geometry, coordinate conversion, encoding and target assignment, IoU/NMS decisions, KITTI or NuScenes evaluation, result conversion, and tiny-fixture validation.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Geometry and evaluation

Use this route when a task mentions lidar or camera boxes, corners, yaw, encode/decode, anchors, target assignment, IoU, NMS, KITTI labels/AP, NuScenes result JSON, or coordinate transforms. This is a static/CPU-safe operating route. It does not prove detector execution.

Operating boundary

  • Prefer NumPy-only geometry and fixture checks. Read api-reference.md for signatures, shapes, and source-faithful dimension order.

  • Read coordinate-systems.md before converting KITTI camera boxes, internal lidar boxes, or NuScenes boxes.

  • Read evaluation.md before building annotations, interpreting AP, or writing NuScenes submissions.

  • Run the bundled helper before changing box conventions:

    python skills/disco/second-pytorch/sub-skills/geometry-and-evaluation/scripts/geometry_smoke.py --help
    python skills/disco/second-pytorch/sub-skills/geometry-and-evaluation/scripts/geometry_smoke.py
    

    Expected output contains four [PASS] checks and geometry smoke: PASS; the helper imports only NumPy and never imports the detector, spconv, Numba CUDA, or Torch.

Safe workflow

  1. Normalize every box array to an explicit shape and convention. Internal lidar boxes are normally [N, 7] = [x, y, z, w, l, h, rz]; preserve any velocity or custom values only after documenting their trailing columns.
  2. Check dimensions are positive, row counts agree, calibration matrices are homogeneous-compatible, and labels/scores have the same first dimension.
  3. For corners, use center_to_corner_box3d with lidar axis=2 and the correct origin; use center_to_corner_box2d for [x, y, w, l, rz]. Never silently swap w,l,h with KITTI l,h,w.
  4. For regression, pair each target with its anchor ([N,7]), select linear dimensions or log dimensions consistently, and compare decoded centers, dimensions, and angle modulo the selected period. Vector-angle coding has code size 8 rather than 7.
  5. For assignment, inspect feature-map order [D,H,W], class-specific anchor ranges, thresholds, and label semantics (1+ positive, 0 negative, -1 ignore). Use a tiny overlap matrix before sampling positives.
  6. Treat NMS as a separate backend decision. The axis-aligned nms_jit algorithm is CPU NumPy/Numba math, but its historical module may import legacy spconv transitively; rotated CPU NMS depends on the same helpers. GPU NMS and rotated IoU use legacy Numba CUDA/spconv interfaces and are not verified.
  7. For KITTI, validate annotation keys, class spelling, dimensions, camera/lidar convention, and z_axis/z_center before calling evaluation. For NuScenes, validate sample tokens, class mapping, quaternion and wlh order, range filtering, and required devkit availability before invoking the evaluator.

API and failure routing

  • Use api-reference.md for box math, anchors, target assignment, similarity, point-in-box, and NMS signatures.
  • Use coordinate-systems.md for axes, origins, angle periods, calibration direction, and visualization conventions.
  • Use evaluation.md for KITTI schemas, metric output shapes, NuScenes JSON fields, and minimal perfect-match fixtures.
  • Use troubleshooting.md when imports, optional dependencies, malformed arrays/configs, CLI/API calls, or evaluator output fail.

Verification status and historical caveats

This checkout has no setup metadata. The model path uses legacy spconv and Numba APIs; modern spconv 2.x is not proven compatible. The inspection environment had NumPy, Numba, Torch, spconv, Fire, tensorboardX, nuscenes-devkit, and related packages, and an A100 CUDA smoke was available, but detector execution was not accepted as verified. In particular, the installed spconv did not expose the legacy non_max_suppression/VoxelGeneratorV2 interfaces. Do not claim that GPU NMS kernels, modern spconv NMS, or the full detector runtime executed successfully. For new detector work, treat this route as historical guidance and prefer a maintained SECOND implementation rather than extending the deprecated runtime.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351