auto-annotation
Implement CVAT local auto-annotation functions and reason about serverless native-function deployment, label matching, ROI, and tracking flows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- auto-annotation
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Implement CVAT local auto-annotation functions and reason about serverless native-function deployment, label matching, ROI, and tracking flows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/function-protocols.md3.3 KB
- 参考文档references/serverless-models.md2.6 KB
- 参考文档references/troubleshooting.md3.0 KB
- 脚本scripts/aa_detection_template.py2.5 KB
- 脚本scripts/cvat_serverless_deploy_notes.py2.1 KB
03 SKILL.md 正文
CVAT auto-annotation
Use this sub-skill when the user needs to automate annotation with a Python function or a CVAT native function: build detection/interaction/tracking/re-identification logic, run annotate_task, create native functions, run agents, or understand the CPU/GPU serverless deployment story for built-in Nuclio models.
Route first
- Read
references/function-protocols.mdfor the confirmed AA function protocols, helper factories, prompt/result constraints, and CLI/API mappings. - Read
references/serverless-models.mdfor CPU/GPU serverless deployment patterns, model categories, and deployment hazards. - Read
references/troubleshooting.mdfor label mapping, shape validation, backend, import, and deployment errors. - Use
scripts/aa_detection_template.pyfor a safe starter implementation andscripts/cvat_serverless_deploy_notes.pyfor a non-executing command checklist.
Choose the right mode
- Immediate mode: call
cvat_sdk.auto_annotation.annotate_task(client, task_id, function, ...)from Python or usecvat-cli task auto-annotate. - Native function mode: create a server-side function with
cvat-cli function create-nativeand run an agent process withcvat-cli function run-agent. - Serverless deployment mode: deploy built-in CVAT Nuclio functions when the user wants reusable server-side detectors/interactors.
If the task is primarily general SDK scripting, route to ../sdk-automation/SKILL.md. If it is primarily task/project shell automation, route to ../cli-automation/SKILL.md.
Protocols at a glance
Detection functions
Implement spec and detect.
specreturns aDetectionFunctionSpecwith label definitions.detect(context, image)returns a sequence of tags/shapes.- Helper factories such as
label_spec,skeleton_label_spec,keypoint_spec,attribute_spec,rectangle,mask,polygon,skeleton,keypoint, andtagmake valid objects easier to construct. frame_idmust be 0 andid/sourcemust not be set in returned annotations.
Interaction functions
Implement spec, detect, and optionally preprocess_image.
specis anInteractionFunctionSpecwith minimum positive points and optional negative points/bounding boxes.detect(context, pp_image, prompts)returnsInteractionResultShapeobjects.- CVAT UI currently only processes returned shapes of type
mask. InteractionResultAttributes.CONFIDENCEis the only supported result attribute spec id.
Tracking functions
Implement spec, init_tracking_state, track, and optionally preprocess_image.
spec.supported_shape_typesdeclares the trackable shapes.init_tracking_stateanalyzes the first image and shape.trackpredicts a later position or returnsNonewhen tracking fails.
CLI and API entry points
task auto-annotateuses a local function module or source file and can clear existing annotations, allow unmatched labels, set a confidence threshold, and convert masks to polygons.function create-nativeregisters a local function implementation with the server.function run-agentpolls the server for requests and executes them against the local function.
Safety defaults
- Keep model loading local and deterministic; avoid hidden downloads in the function path unless the user explicitly wants them.
- Put heavyweight model weights, checkpoints, or Nuclio build contexts outside the runtime skill and describe them as deployment inputs.
- Require the operator to match labels and shapes before running automatic annotation on real data.
- For GPU serverless functions, treat driver/runtime compatibility as a hard prerequisite and do not imply CPU validation covers GPU execution.
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).