annotators
Operate supervision high-level visual annotators for images and videos.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- annotators
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Operate supervision high-level visual annotators for images and videos.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/annotator-catalog.md6.6 KB
- 参考文档references/troubleshooting.md9.4 KB
- 参考文档references/workflows.md7.8 KB
03 SKILL.md 正文
Annotators
Use this sub-skill when a task asks to visualize supervision detections, masks,
tracks, heatmaps, labels, icons, zone overlays, or side-by-side detection
comparisons with high-level annotator classes.
Route here for
BoxAnnotator,MaskAnnotator,LabelAnnotator,RichLabelAnnotator,TraceAnnotator,HeatMapAnnotator,ComparisonAnnotator,PercentageBarAnnotator,IconAnnotator,CropAnnotator, and otherscene+Detectionsannotators.PolygonZoneAnnotator,LineZoneAnnotator, andLineZoneAnnotatorMulticlasswhen the question is about drawing zone or line overlays after zone state has been computed.- Label construction,
custom_color_lookup, annotator color strategy,scene.copy()versus in-place mutation, and combining multiple annotators on an image or video frame.
Route away
- Build, filter, convert, save, or adapt
Detections: use detection-and-zones. - Low-level drawing primitives,
Color,ColorPalette, image/video I/O, Pillow/OpenCV conversion, and backend diagnostics: use media-utils. KeyPoints, keypoint-specific annotators (VertexAnnotator,EdgeAnnotator,VertexLabelAnnotator, vertex ellipse annotators), tracker IDs, and deprecated keypoint/tracker paths: use tracking-keypoints. Keypoint annotators use the same.annotate(scene, key_points)shape, so cross-reference this skill for general composition style only.- Metric interpretation or evaluation: use metrics.
Operating checklist
- Verify the user already has a
sceneand the right container:Detectionsfor detection annotators,KeyPointsfor keypoint annotators, or zone objects for zone annotators. If not, route to the owner above. - Treat NumPy scenes as OpenCV-style images:
uint8, shape(H, W, 3), BGR channel order. PIL images are supported by most detection annotators and are converted internally, but zone annotators take NumPy arrays. - Preserve the input only when needed by passing
scene.copy(). Annotators are designed to draw on the supplied scene and return the annotated result. - Pick an annotator family from annotator-catalog.md, then apply a recipe from workflows.md.
- For visual/no-op/errors, consult troubleshooting.md before changing the data pipeline.
Required context to keep in answers
supervisionversion target is0.31.0.dev0on Python>=3.10; base install ispip install supervision.- Native OpenCV is optional. The documented fallback backend can render slightly different text, antialiasing, masks, or video behavior; use media-utils for backend-specific diagnosis.
- Do not recommend original repository docs, examples, tests, scripts, local checkout paths, or generated skill import steps as runtime dependencies.
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).