visualization-and-serving
Guides the historical SECOND KITTI web viewer, its Flask API, browser configuration, visualization payloads, and guarded checkpoint inference routes.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- visualization-and-serving
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Guides the historical SECOND KITTI web viewer, its Flask API, browser configuration, visualization payloads, and guarded checkpoint inference routes.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md8.1 KB
- 参考文档references/troubleshooting.md10.2 KB
- 参考文档references/web-viewer.md9.0 KB
- 脚本scripts/check_viewer_deps.py6.7 KB
03 SKILL.md 正文
Visualization and serving
Use this route for requests such as start the KITTI viewer web backend, serve the browser UI, load point clouds or detections, configure Flask/CORS, buildNet, run viewer inference, or use the PyQt viewer. The supported route here is the old repository's web KITTI lidar viewer; the desktop Qt viewer is historical and deprecated.
Safety and support boundary
-
This is a source-distilled protocol, not a replacement server. A server is started only when the user explicitly asks for it, with user-owned paths and ports. No server, browser, GUI, dataset, or detector execution is part of skill verification.
-
The checkout has no setup metadata. Do not assume
pip install -e .works. First run the safe dependency probe:python sub-skills/visualization-and-serving/scripts/check_viewer_deps.py --jsonMissing components are reported without launching Flask.
--helpis also safe. A passing import probe does not prove detector compatibility. -
The historical model path uses legacy spconv/Numba APIs. Current spconv 2.x is not proven compatible: in the inspected environment the legacy
spconv.utils.VoxelGeneratorV2andnon_max_suppressionsymbols are absent. Do not claim thatbuildNetor inference works, even if CUDA and PyTorch import successfully. Route compatibility and checkpoints to training-and-inference. -
The backend binds to
127.0.0.1and enables permissive Flask-CORS. CORS does not make a loopback server remotely reachable, and the API has no authentication. Keep it local or use an explicitly user-controlled secure tunnel; never expose arbitrary host paths or a public service by default.
Web workflow
-
Prepare a local KITTI-style dataset and generated info pickle. Use data-preparation for layout and info validation; the browser sends filesystem paths to the backend host, not to the browser machine.
-
In a caller-managed environment where the
secondpackage and web dependencies are importable, start the backend only on request:python -m second.kittiviewer.backend.main main --port=<BACKEND_PORT>The source default is
16666; the command is a long-running foreground service. Stop it with the terminal's normal interrupt. A safe import/help diagnostic is:python -m second.kittiviewer.backend.main --helpIf import fails before help, stop and use troubleshooting; do not silently substitute modern detector APIs.
-
Serve the supplied web frontend assets separately, from the directory that contains
index.html, without exposing a broad parent directory:python -m http.server <FRONTEND_PORT> --directory <frontend-assets-directory>The README's example uses port
8000. Openhttp://127.0.0.1:<FRONTEND_PORT>/in a browser and set the UI's backend field tohttp://127.0.0.1:<BACKEND_PORT>(the UI addshttp://when a scheme is omitted). Verify browser developer tools show POSTs to the same backend origin and no CORS error. -
Set datasetClassName to the registered class, normally
KittiDataset, and setrootPathandinfoPathto paths readable by the backend. Click load. Expectstatus: normaland animage_indexeslist. Enter an index shown by that list in the bottom control and press Enter; previous/next only works after a successful load. -
Optionally set detPath and click loadDet. The backend accepts either a pickled detection result file or a directory in the historical KITTI label format. Treat this as best-effort legacy state: the current endpoint stores
dt_annos, but the point-cloud response does not consistently merge those annotations into its payload. Check the actual response before relying ondrawDet. -
For checkpoint inference, first complete load, then set checkpointPath and configPath, click buildNet, and only then click inference. This route is guarded and unverified for modern spconv; use training-and-inference for checkpoint/config compatibility and api-reference for exact request fields.
Routes and handoffs
- Read web-viewer.md for the browser/backend state sequence, payload encodings, and visualization behavior.
- Read api-reference.md before constructing a direct HTTP request or diagnosing a response shape.
- Read troubleshooting.md for missing imports, CORS/URL mismatches, invalid info or detection inputs, API ordering errors, and legacy checkpoint failures.
- Route dataset directories, info generation, and dataset class registration to data-preparation. Route box coordinate conventions and evaluation-format conversion to geometry-and-evaluation.
Explicit non-goals
Do not copy, wrap, or launch the deprecated viewer.py, glwidget.py, or
control_panel.py desktop application. Those Qt/OpenGL modules require a
separate GUI stack and are retained only as deprecation evidence. Prefer the
web lidar path, and recommend a maintained successor such as OpenPCDet or
MMDetection3D for new work.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).