AGENT SKILL

dataset-labeling

Guides Autodistill dataset auto-labeling workflows, output layouts, and safe dummy verification for detection and classification base models.

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

01 前言 Front Matter

name
dataset-labeling
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Guides Autodistill dataset auto-labeling workflows, output layouts, and safe dummy verification for detection and classification base models.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Autodistill Dataset Labeling

Use this sub-skill when a task asks how to auto-label image folders, inspect or validate Autodistill dataset output, choose CaptionOntology prompts/classes for labeling, use SAHI/NMS during labeling, or debug core .label() behavior without running a real foundation model.

Autodistill's core package supplies base-model interfaces and dataset writers. Real foundation models such as Grounding DINO, Grounded SAM, CLIP, YOLOv8, or cloud plugins live in separate autodistill-* packages and may require downloads, credentials, GPU, or long training. For plugin aliases and CLI orchestration, read the CLI and model registry sub-skill. For implementing a custom model class, read ontologies and model interfaces.

Quick Route

  • Programmatic image auto-labeling: read workflows for .label() patterns, ontology setup, SAHI/NMS switches, and Roboflow upload boundaries.
  • Detection/classification output layout: read data formats before validating data.yaml, YOLO labels, train/valid splits, or classification folders.
  • Signatures and defaults: read API reference for source-verified method names, parameters, return types, and enum values.
  • Problems while labeling: read troubleshooting for empty inputs, extension mismatches, missing confidence values, memory pressure, plugin/backend failures, and credentialed Roboflow paths.
  • Safe local proof of core dataset writing: run scripts/create_tiny_detection_dataset.py to create a tiny deterministic YOLO-style detection dataset without any model plugin.

Core Concepts

  1. Build an ontology, usually CaptionOntology({"prompt sent to base model": "saved class name"}).
  2. Instantiate a base model plugin or a custom subclass whose task matches the dataset you want.
  3. Call base_model.label(input_folder=..., extension=".jpg", output_folder=...).
  4. Validate the generated dataset layout before handing it to a target model plugin.

In this source snapshot the verified source method is label(). Some public docs mention label_folder(); treat that as a stale alias unless a concrete plugin adds it. The verified SAHI method on DetectionBaseModel is sahi_predict(), while .label(..., sahi=True) uses supervision.InferenceSlicer internally.

Minimal Programmatic Pattern

from autodistill.detection import CaptionOntology
from autodistill_grounding_dino import GroundingDINO

ontology = CaptionOntology({"milk bottle": "bottle", "bottle cap": "cap"})
base_model = GroundingDINO(ontology=ontology)
base_model.label(input_folder="images", extension=".jpg", output_folder="dataset")

This pattern proves the core call shape. The plugin package, model weights, hardware, and optional training target must be selected and verified separately.

Validation Checklist

  • ontology.classes() contains exactly the labels expected by the target model.
  • The input_folder contains files matching extension; default is .jpg only.
  • Detection outputs contain confidence if record_confidence=True.
  • The generated detection dataset has data.yaml, train/valid image folders, and train/valid label folders.
  • Any full model run has explicit approval for downloads, credentials, GPU, or long training.

Safe Smoke Script

Run the bundled dummy script after installing autodistill and supervision:

python scripts/create_tiny_detection_dataset.py --keep

It uses a deterministic in-process DetectionBaseModel subclass, creates two tiny images, calls the inherited label() implementation, and checks the output layout. Passing this script means the core dataset writer works; it does not verify any external base-model plugin.

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