weighted-boxes-fusion
Route Weighted-Boxes-Fusion tasks for 2D box ensembling, 1D span fusion, and 3D cuboid fusion with ensemble_boxes.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- weighted-boxes-fusion
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Route Weighted-Boxes-Fusion tasks for 2D box ensembling, 1D span fusion, and 3D cuboid fusion with ensemble_boxes.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/benchmark-notes.md2.4 KB
- 参考文档references/repo-provenance.md1.4 KB
- 参考文档references/repo-routing-metadata.json345 B
- 参考文档references/troubleshooting.md2.7 KB
- 脚本scripts/check_install.py4.9 KB
03 SKILL.md 正文
Weighted Boxes Fusion
Use this repo skill when a task asks you to merge predictions from multiple models with the ensemble_boxes package. The package covers three distinct geometry families:
- 2D detector boxes with WBF, NMS, Soft-NMS, and non-maximum weighted suppression.
- 1D spans or token intervals for NLP/NER-style fusion.
- 3D axis-aligned cuboids for volumetric or LiDAR-style detection.
The skill is split into focused sub-skills so future agents can route quickly by geometry and failure mode.
Install and verify
Install the public package from PyPI:
python -m pip install ensemble-boxes
The bundled smoke helper uses only the package's runtime dependencies; no benchmark data, GUI extras, or detector checkpoints are required.
Then run the root smoke helper:
python scripts/check_install.py --case all
That script imports ensemble_boxes and exercises tiny 2D, 1D, and 3D in-memory cases without downloading data or opening GUI windows.
Route map
sub-skills/box-ensembling/
Use this for 2D normalized boxes in [x1, y1, x2, y2] order.
Choose it for tasks like:
- merging YOLO, Faster R-CNN, DetectoRS, or other detector outputs;
- choosing between
weighted_boxes_fusion,weighted_boxes_fusion_experimental,non_maximum_weighted,nms,soft_nms, andnms_method; - tuning
iou_thr,skip_box_thr,weights,conf_type,allows_overflow,sigma, orthresh; - explaining clipped coordinates, swapped corners, zero-area boxes, or score inflation.
Read:
sub-skills/box-ensembling/references/api-reference.mdsub-skills/box-ensembling/references/workflows.mdsub-skills/box-ensembling/references/troubleshooting.mdsub-skills/box-ensembling/scripts/smoke_2d_ensembling.py
sub-skills/line-segment-fusion/
Use this for normalized 1D spans in [x1, x2] order.
Choose it for tasks like:
- fusing token spans or
predictionstringintervals from several NLP models; - mapping string classes to numeric labels before fusion and back afterward;
- tuning
iou_thr,skip_box_thr,weights,conf_type, orallows_overflowfor span ensembling.
Read:
sub-skills/line-segment-fusion/references/api-reference.mdsub-skills/line-segment-fusion/references/workflows.mdsub-skills/line-segment-fusion/references/troubleshooting.mdsub-skills/line-segment-fusion/scripts/smoke_1d_fusion.py
sub-skills/three-d-box-fusion/
Use this for normalized 3D cuboids in [x1, y1, z1, x2, y2, z2] order.
Choose it for tasks like:
- fusing LiDAR, medical, or other volumetric detector outputs;
- choosing between
conf_type='avg'andconf_type='max'; - diagnosing axis-order mistakes, zero-volume boxes, or normalization problems.
Read:
sub-skills/three-d-box-fusion/references/api-reference.mdsub-skills/three-d-box-fusion/references/workflows.mdsub-skills/three-d-box-fusion/references/troubleshooting.mdsub-skills/three-d-box-fusion/scripts/smoke_3d_fusion.py
Shared guidance
- Keep all geometry inputs normalized unless a sub-skill explicitly shows the normalization step.
- Keep one outer list entry per model, even when a model has no predictions.
- If the task asks about benchmark reproduction, read
references/benchmark-notes.mdfirst. Those scripts need external data and optional packages, so they are not part of the default smoke path. - If import or installation fails, start with
references/troubleshooting.mdbefore guessing at geometry bugs. - If the skill seems stale for the current checkout, read
references/repo-provenance.mdand refresh the skill instead of reusing it blindly. - For router integration metadata, consult
references/repo-routing-metadata.json.
Minimal runtime check
The fastest package check is:
python -c "from ensemble_boxes import weighted_boxes_fusion; print(weighted_boxes_fusion)"
For a broader smoke, use scripts/check_install.py --case all.
What not to expect
- No training loop, model zoo, or detector architecture guidance.
- No built-in GUI visualization requirement.
- No default benchmark downloads.
- No GPU dependency for the package APIs covered here.
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).