AGENT SKILL

annotations-and-results

Guide SAHI annotation, prediction result, mask, COCO export, optional conversion, visualization, and file helper objects.

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

01 前言 Front Matter

name
annotations-and-results
license
MIT
metadata
{ "disco-role": "operating" }
description
Guide SAHI annotation, prediction result, mask, COCO export, optional conversion, visualization, and file helper objects.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

annotations-and-results

Use this sub-skill when a task is about SAHI's low-level data objects and result conversions: BoundingBox, Category, Mask, ObjectAnnotation, PredictionScore, ObjectPrediction, PredictionResult, COCO annotation/prediction dictionaries, optional FiftyOne or imantics conversion, visualization helpers, mask/bbox helpers, and lightweight file/import utilities.

Route away when the task owner is not object/result plumbing:

  • Full prediction runs, detector setup, slicing parameters, batch prediction, CLI prediction, or video prediction: use ../sliced-inference/SKILL.md.
  • Full COCO dataset creation, slicing, remapping, evaluation, YOLO export, or dataset-scale FiftyOne workflows: use ../dataset-tools/SKILL.md.
  • NMS/NMM/GreedyNMM algorithm behavior or backend acceleration: use ../postprocess-backends/SKILL.md.

Start here

  1. Read objects and exports before constructing or serializing annotation/prediction objects. It records constructor shapes, coordinate conventions, image-id handling, mask behavior, COCO JSON shapes, and optional FiftyOne/imantics conversions.
  2. Read CV and file helpers when converting masks, drawing predictions, reading images, listing files, saving JSON, checking imports, or debugging OpenCV/Pillow color assumptions.
  3. Read troubleshooting when boxes are invalid, category types fail, masks need full_shape, COCO masks disappear, optional conversion packages are missing, images load with wrong colors, or output paths are surprising.
  4. For a dependency-light local sanity check, run python scripts/prediction_objects_smoke.py from this sub-skill directory. Add --visualize or --write-json only when you want temporary outputs.

Minimal decision checklist

  • Decide which coordinate format is entering SAHI: core objects use [minx, miny, maxx, maxy]; COCO bboxes use [x, y, width, height].
  • Keep image shapes as [height, width] for masks and full_shape; keep image IDs explicit when exporting per-image COCO predictions.
  • Treat fiftyone and imantics as optional packages. Guard those conversions or give a fallback COCO JSON path.
  • Use PredictionResult.export_visuals for simple PNG output; use lower-level visualization helpers when custom color or export format is required.
  • Never let helper scripts download data, train models, require credentials, or write outside a caller-chosen or temporary output directory.

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