fiftyone-dataset-inference
Run ML model inference on FiftyOne datasets. Use when running models for detection, classification, segmentation, or embeddings. Discovers available models dynamically from the Zoo, plugin operators, or custom sources — never assumes a fixed model list.
What this skill does
# Run Model Inference on FiftyOne Datasets
## Key Directives
**ALWAYS follow these rules:**
### 1. Check if dataset exists first
```python
list_datasets()
```
If the dataset doesn't exist, use the **fiftyone-dataset-import** skill to load it first.
### 2. Set context before operations
```python
set_context(dataset_name="my-dataset")
```
### 3. Launch App for inference
The App must be running to execute inference operators:
```python
launch_app(dataset_name="my-dataset")
```
### 4. Ask user for field names
Always confirm with the user:
- Which model to use
- Label field name for predictions (e.g., `predictions`, `detections`, `embeddings`)
### 5. Close app when done
```python
close_app()
```
## Workflow
### Step 1: Verify Dataset Exists
```python
list_datasets()
```
If the dataset is not in the list:
- Ask the user for the data location
- **Use the fiftyone-dataset-import skill** to import the data first
- Return to this workflow after import completes
### Step 2: Load Dataset and Review
```python
set_context(dataset_name="my-dataset")
dataset_summary(name="my-dataset")
```
Review:
- Sample count
- Media type
- Existing label fields
### Step 3: Launch App
```python
launch_app(dataset_name="my-dataset")
```
### Step 4: Discover and Apply Model
Ask the user about the task, model, or type of data they're using (detection, classification, segmentation, embeddings, or a specific model name); note users may give a 'tool name' (see Path B). Then determine the path:
**Path A — Zoo model (most common)**
ALWAYS first fetch the live model list — never assume what's available:
```python
get_operator_schema(operator_uri="@voxel51/zoo/apply_zoo_model")
```
Pick the right model from the schema's model enum, then apply:
```python
execute_operator(
operator_uri="@voxel51/zoo/apply_zoo_model",
params={
"tab": "BUILTIN",
"model": "<model-name-from-schema>",
"label_field": "predictions"
}
)
```
**Path B — Plugin operator**
If the user mentions a specific tool (e.g. CLIP similarity, SAM, a third-party model), check installed operators first:
```python
list_operators(builtin_only=False)
```
Find the matching operator, inspect its schema, then execute it:
```python
get_operator_schema(operator_uri="@org/plugin/operator")
execute_operator(operator_uri="@org/plugin/operator", params={...})
```
**Path C — Remote / externally registered model**
Check registered remote sources first:
```python
import fiftyone.zoo as foz
foz.list_zoo_model_sources()
```
If the model comes from a registered remote source (GitHub repo registered via `foz.register_zoo_model_source()`):
```python
execute_operator(
operator_uri="@voxel51/zoo/apply_zoo_model",
params={
"tab": "REMOTE",
"source": "<github-repo-url>",
"label_field": "predictions"
}
)
```
### Step 5: View Results
```python
set_view(exists=["predictions"])
```
### Step 6: Clean Up
```python
close_app()
```
## Model Discovery
**ALWAYS fetch the live model list — never rely on a hardcoded list.**
```python
get_operator_schema(operator_uri="@voxel51/zoo/apply_zoo_model")
```
The schema returns the full set of available models at runtime. Use the model names from there directly.
For plugin-provided models or operators:
```python
list_operators(builtin_only=False)
```
> If a model fails with a dependency error, the response includes `install_command`. Offer to run it for the user.
## Common Use Cases
### Use Case 1: Run Object Detection
```python
# Verify dataset exists
list_datasets()
# Set context and launch
set_context(dataset_name="my-dataset")
launch_app(dataset_name="my-dataset")
# Apply detection model
execute_operator(
operator_uri="@voxel51/zoo/apply_zoo_model",
params={
"tab": "BUILTIN",
"model": "faster-rcnn-resnet50-fpn-coco-torch",
"label_field": "predictions"
}
)
# View results
set_view(exists=["predictions"])
```
### Use Case 2: Run Classification
```python
set_context(dataset_name="my-dataset")
launch_app(dataset_name="my-dataset")
execute_operator(
operator_uri="@voxel51/zoo/apply_zoo_model",
params={
"tab": "BUILTIN",
"model": "resnet50-imagenet-torch",
"label_field": "classification"
}
)
set_view(exists=["classification"])
```
### Use Case 3: Generate Embeddings
```python
set_context(dataset_name="my-dataset")
launch_app(dataset_name="my-dataset")
execute_operator(
operator_uri="@voxel51/zoo/apply_zoo_model",
params={
"tab": "BUILTIN",
"model": "clip-vit-base32-torch",
"label_field": "clip_embeddings"
}
)
```
### Use Case 4: Compare Ground Truth with Predictions
If dataset has existing labels:
```python
set_context(dataset_name="my-dataset")
dataset_summary(name="my-dataset") # Check existing fields
launch_app(dataset_name="my-dataset")
# Run inference with different field name
execute_operator(
operator_uri="@voxel51/zoo/apply_zoo_model",
params={
"tab": "BUILTIN",
"model": "yolov8m-coco-torch",
"label_field": "predictions" # Different from ground_truth
}
)
# View both fields to compare
set_view(exists=["ground_truth", "predictions"])
```
### Use Case 5: Run Multiple Models
```python
set_context(dataset_name="my-dataset")
launch_app(dataset_name="my-dataset")
# Run detection
execute_operator(
operator_uri="@voxel51/zoo/apply_zoo_model",
params={
"tab": "BUILTIN",
"model": "yolov8n-coco-torch",
"label_field": "detections"
}
)
# Run classification
execute_operator(
operator_uri="@voxel51/zoo/apply_zoo_model",
params={
"tab": "BUILTIN",
"model": "resnet50-imagenet-torch",
"label_field": "classification"
}
)
# Run embeddings
execute_operator(
operator_uri="@voxel51/zoo/apply_zoo_model",
params={
"tab": "BUILTIN",
"model": "clip-vit-base32-torch",
"label_field": "embeddings"
}
)
```
## Troubleshooting
**Error: "Dataset not found"**
- Use `list_datasets()` to see available datasets
- Use the **fiftyone-dataset-import** skill to import data first
**Error: "Model not found"**
- Run `get_operator_schema(operator_uri="@voxel51/zoo/apply_zoo_model")` to get the current live model list and pick the correct name
**Error: "Missing dependency" (e.g., ultralytics, segment-anything)**
- The MCP server detects missing dependencies
- Response includes `missing_package` and `install_command`
- Install the required package: `pip install <package>`
- Restart MCP server after installing
**Inference is slow**
- Use smaller model variant (e.g., `yolov8n` instead of `yolov8x`)
- Use delegated execution for large datasets
- Consider filtering to a view first
**Out of memory**
- Reduce batch size
- Use smaller model variant
- Process dataset in chunks using views
## Best Practices
1. **Use descriptive field names** - `predictions`, `yolo_detections`, `clip_embeddings`
2. **Don't overwrite ground truth** - Use different field names for predictions
3. **Start with fast models** - Use nano/small variants first, upgrade if needed
4. **Check existing fields** - Use `dataset_summary()` before running inference
5. **Filter first for testing** - Test on a small view before processing full dataset
## Resources
- [FiftyOne Model Zoo](https://docs.voxel51.com/model_zoo/index.html)
- [Applying Models Guide](https://docs.voxel51.com/user_guide/applying_models.html)
- [Zoo Models API](https://docs.voxel51.com/api/fiftyone.zoo.models.html)
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.