jpskill.com
🛠️ 開発・MCP コミュニティ

fiftyone-dataset-inference

ローカルにある画像や動画などのファイルをFiftyOneに読み込み、必要に応じてラベルをインポートし、機械学習モデルによる物体検出や分類などの推論を実行して、その結果を保存することで、エンドツーエンドの推論パイプラインを構築するSkill。

📜 元の英語説明(参考)

Create a FiftyOne dataset from a directory of media files (images, videos, point clouds), optionally import labels in common formats (COCO, YOLO, VOC), run model inference, and store predictions. Use when users want to load local files into FiftyOne, apply ML models for detection, classification, or segmentation, or build end-to-end inference pipelines.

🇯🇵 日本人クリエイター向け解説

一言でいうと

ローカルにある画像や動画などのファイルをFiftyOneに読み込み、必要に応じてラベルをインポートし、機械学習モデルによる物体検出や分類などの推論を実行して、その結果を保存することで、エンドツーエンドの推論パイプラインを構築するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o fiftyone-dataset-inference.zip https://jpskill.com/download/17011.zip && unzip -o fiftyone-dataset-inference.zip && rm fiftyone-dataset-inference.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17011.zip -OutFile "$d\fiftyone-dataset-inference.zip"; Expand-Archive "$d\fiftyone-dataset-inference.zip" -DestinationPath $d -Force; ri "$d\fiftyone-dataset-inference.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して fiftyone-dataset-inference.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → fiftyone-dataset-inference フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

データセットの作成と推論の実行

概要

ローカルディレクトリから FiftyOne データセットを作成し、標準形式でラベルをインポートし、モデル推論を実行して予測を生成します。

このスキルは、次のような場合に利用します:

  • ディレクトリから画像、動画、または点群をロードする
  • ラベル付きデータセット(COCO、YOLO、VOC、CVATなど)をインポートする
  • メディアファイルに対してモデル推論を実行する
  • エンドツーエンドの ML パイプラインを構築する

前提条件

  • FiftyOne MCP サーバーがインストールされ、実行されていること
  • データをインポートするための @voxel51/io プラグイン
  • モデル推論のための @voxel51/zoo プラグイン
  • データセット管理のための @voxel51/utils プラグイン

主要な指示

常に以下のルールに従ってください:

1. 最初にディレクトリを探索する

インポートする前にユーザーのディレクトリをスキャンして、メディアタイプとラベル形式を検出します。

2. ユーザーに確認する

調査結果を提示し、データセットを作成したり推論を実行したりする前に確認を得ます。

3. 操作の前にコンテキストを設定する

set_context(dataset_name="my-dataset")

4. 推論のために App を起動する

launch_app(dataset_name="my-dataset")

5. ユーザーがフィールド名を指定する

常にユーザーに以下を尋ねてください:

  • データセット名
  • 予測のためのラベルフィールド

6. 完了したら App を閉じる

close_app()

ワークフロー

ステップ 1: ディレクトリの探索

Bash を使用してユーザーのディレクトリをスキャンします:

ls -la /path/to/directory
find /path/to/directory -type f | head -20

メディアファイルとラベルファイルを識別します。形式の検出については、サポートされているデータセットタイプのセクションを参照してください。

ステップ 2: ユーザーに調査結果を提示する

データセットを作成する前に、ユーザーに確認します:

/path/to/directory で以下が見つかりました:
- 150 個の画像ファイル (.jpg, .png)
- ラベル: COCO 形式 (annotations.json)

提案するデータセット名: "my-dataset"
ラベルフィールド: "ground_truth"

これらの設定で進めてよろしいですか?

ステップ 3: データセットの作成

execute_operator(
    operator_uri="@voxel51/utils/create_dataset",
    params={
        "name": "my-dataset",
        "persistent": true
    }
)

ステップ 4: コンテキストの設定

インポートする前に、新しく作成したデータセットにコンテキストを設定します:

set_context(dataset_name="my-dataset")

ステップ 5: サンプルのインポート

メディアのみの場合 (ラベルなし):

execute_operator(
    operator_uri="@voxel51/io/import_samples",
    params={
        "import_type": "MEDIA_ONLY",
        "style": "DIRECTORY",
        "directory": {"absolute_path": "/path/to/images"}
    }
)

ラベル付きメディアの場合:

execute_operator(
    operator_uri="@voxel51/io/import_samples",
    params={
        "import_type": "MEDIA_AND_LABELS",
        "dataset_type": "COCO",
        "data_path": {"absolute_path": "/path/to/images"},
        "labels_path": {"absolute_path": "/path/to/annotations.json"},
        "label_field": "ground_truth"
    }
)

ステップ 6: インポートの検証

ソースと比較して、サンプルが正しくインポートされたことを確認します:

load_dataset(name="my-dataset")

num_samples をステップ 1 のファイル数と比較します。不一致があればユーザーに報告します。

ステップ 7: App の起動

launch_app(dataset_name="my-dataset")

ステップ 8: モデル推論の適用

モデル名と予測のためのラベルフィールドをユーザーに尋ねます。

execute_operator(
    operator_uri="@voxel51/zoo/apply_zoo_model",
    params={
        "tab": "BUILTIN",
        "model": "yolov8n-coco-torch",
        "label_field": "predictions"
    }
)

ステップ 9: 結果の表示

set_view(exists=["predictions"])

ステップ 10: クリーンアップ

close_app()

サポートされているメディアタイプ

拡張子 メディアタイプ
.jpg, .jpeg, .png, .gif, .bmp, .webp image
.mp4, .avi, .mov, .mkv, .webm video
.pcd point-cloud
.fo3d 3d

サポートされているデータセットタイプ

ファイルパターン ラベルタイプ
Image Classification Directory Tree クラスごとのフォルダ classification
Video Classification Directory Tree クラスごとのフォルダ classification
COCO *.json detections, segmentations, keypoints
VOC 画像ごとに *.xml detections
KITTI 画像ごとに *.txt detections
YOLOv4 *.txt + classes.txt detections
YOLOv5 data.yaml + labels/*.txt detections
CVAT Image 単一の *.xml ファイル classifications, detections, polylines, keypoints
CVAT Video XML ディレクトリ frame labels
TF Image Classification TFRecords classification
TF Object Detection TFRecords detections

一般的な Zoo モデル

apply_zoo_model で利用できる一般的なモデル。一部のモデルでは追加のパッケージが必要です。モデルが依存関係エラーで失敗した場合、レスポンスには install_command が含まれます。ユーザーに代わって実行することを提案してください。

Detection (PyTorch のみ):

  • faster-rcnn-resnet50-fpn-coco-torch - Faster R-CNN (追加の依存関係なし)
  • retinanet-resnet50-fpn-coco-torch - RetinaNet (追加の依存関係なし)

Detection (ultralytics が必要):

  • yolov8n-coco-torch - YOLOv8 nano (高速)
  • yolov8s-coco-torch - YOLOv8 small
  • yolov8m-coco-torch - YOLOv8 medium

Classification:

  • resnet50-imagenet-torch - ResNet-50
  • mobilenet-v2-imagenet-torch - MobileNet v2

Segmentation:

  • sam-vit-base-hq-torch - Segment Anything
  • deeplabv3-resnet101-coco-torch - DeepLabV3

Embeddings:

  • clip-vit-base32-torch - CLIP embeddings
  • dinov2-vits14-torch - DINOv2 embeddings

一般的なユースケース

ユースケース 1: 画像をロードして検出を実行する


execute_operator(
    operator_uri="@voxel51/utils/create_dataset",
    params={"name": "my-images", "persistent": true}
)

set_context(dataset_name="my-images")

execute_operator(
    operator_uri="@voxel51/io/import_samples",
    params={
        "import_type": "MEDIA_ONLY",
        "style": "DIRECTORY",
        "directory": {"absolute_path": "/path/to/images"}
    }
)

load_dataset(name="my-images")  # インポートの検証

launch_app(dataset_name="my-images")

execute_operator(
    operator_uri="@voxel51/zoo/apply_zoo_

(原文はここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Create Dataset and Run Inference

Overview

Create FiftyOne datasets from local directories, import labels in standard formats, and run model inference to generate predictions.

Use this skill when:

  • Loading images, videos, or point clouds from a directory
  • Importing labeled datasets (COCO, YOLO, VOC, CVAT, etc.)
  • Running model inference on media files
  • Building end-to-end ML pipelines

Prerequisites

  • FiftyOne MCP server installed and running
  • @voxel51/io plugin for importing data
  • @voxel51/zoo plugin for model inference
  • @voxel51/utils plugin for dataset management

Key Directives

ALWAYS follow these rules:

1. Explore directory first

Scan the user's directory before importing to detect media types and label formats.

2. Confirm with user

Present findings and get confirmation before creating datasets or running inference.

3. Set context before operations

set_context(dataset_name="my-dataset")

4. Launch App for inference

launch_app(dataset_name="my-dataset")

5. User specifies field names

Always ask the user for:

  • Dataset name
  • Label field for predictions

6. Close app when done

close_app()

Workflow

Step 1: Explore the Directory

Use Bash to scan the user's directory:

ls -la /path/to/directory
find /path/to/directory -type f | head -20

Identify media files and label files. See Supported Dataset Types section for format detection.

Step 2: Present Findings to User

Before creating the dataset, confirm with the user:

I found the following in /path/to/directory:
- 150 image files (.jpg, .png)
- Labels: COCO format (annotations.json)

Proposed dataset name: "my-dataset"
Label field: "ground_truth"

Should I proceed with these settings?

Step 3: Create Dataset

execute_operator(
    operator_uri="@voxel51/utils/create_dataset",
    params={
        "name": "my-dataset",
        "persistent": true
    }
)

Step 4: Set Context

Set context to the newly created dataset before importing:

set_context(dataset_name="my-dataset")

Step 5: Import Samples

For media only (no labels):

execute_operator(
    operator_uri="@voxel51/io/import_samples",
    params={
        "import_type": "MEDIA_ONLY",
        "style": "DIRECTORY",
        "directory": {"absolute_path": "/path/to/images"}
    }
)

For media with labels:

execute_operator(
    operator_uri="@voxel51/io/import_samples",
    params={
        "import_type": "MEDIA_AND_LABELS",
        "dataset_type": "COCO",
        "data_path": {"absolute_path": "/path/to/images"},
        "labels_path": {"absolute_path": "/path/to/annotations.json"},
        "label_field": "ground_truth"
    }
)

Step 6: Validate Import

Verify samples imported correctly by comparing with source:

load_dataset(name="my-dataset")

Compare num_samples with the file count from Step 1. Report any discrepancy to the user.

Step 7: Launch App

launch_app(dataset_name="my-dataset")

Step 8: Apply Model Inference

Ask user for model name and label field for predictions.

execute_operator(
    operator_uri="@voxel51/zoo/apply_zoo_model",
    params={
        "tab": "BUILTIN",
        "model": "yolov8n-coco-torch",
        "label_field": "predictions"
    }
)

Step 9: View Results

set_view(exists=["predictions"])

Step 10: Clean Up

close_app()

Supported Media Types

Extensions Media Type
.jpg, .jpeg, .png, .gif, .bmp, .webp image
.mp4, .avi, .mov, .mkv, .webm video
.pcd point-cloud
.fo3d 3d

Supported Dataset Types

Value File Pattern Label Types
Image Classification Directory Tree Folder per class classification
Video Classification Directory Tree Folder per class classification
COCO *.json detections, segmentations, keypoints
VOC *.xml per image detections
KITTI *.txt per image detections
YOLOv4 *.txt + classes.txt detections
YOLOv5 data.yaml + labels/*.txt detections
CVAT Image Single *.xml file classifications, detections, polylines, keypoints
CVAT Video XML directory frame labels
TF Image Classification TFRecords classification
TF Object Detection TFRecords detections

Common Zoo Models

Popular models for apply_zoo_model. Some models require additional packages - if a model fails with a dependency error, the response includes the install_command. Offer to run it for the user.

Detection (PyTorch only):

  • faster-rcnn-resnet50-fpn-coco-torch - Faster R-CNN (no extra deps)
  • retinanet-resnet50-fpn-coco-torch - RetinaNet (no extra deps)

Detection (requires ultralytics):

  • yolov8n-coco-torch - YOLOv8 nano (fast)
  • yolov8s-coco-torch - YOLOv8 small
  • yolov8m-coco-torch - YOLOv8 medium

Classification:

  • resnet50-imagenet-torch - ResNet-50
  • mobilenet-v2-imagenet-torch - MobileNet v2

Segmentation:

  • sam-vit-base-hq-torch - Segment Anything
  • deeplabv3-resnet101-coco-torch - DeepLabV3

Embeddings:

  • clip-vit-base32-torch - CLIP embeddings
  • dinov2-vits14-torch - DINOv2 embeddings

Common Use Cases

Use Case 1: Load Images and Run Detection

execute_operator(
    operator_uri="@voxel51/utils/create_dataset",
    params={"name": "my-images", "persistent": true}
)

set_context(dataset_name="my-images")

execute_operator(
    operator_uri="@voxel51/io/import_samples",
    params={
        "import_type": "MEDIA_ONLY",
        "style": "DIRECTORY",
        "directory": {"absolute_path": "/path/to/images"}
    }
)

load_dataset(name="my-images")  # Validate import

launch_app(dataset_name="my-images")

execute_operator(
    operator_uri="@voxel51/zoo/apply_zoo_model",
    params={
        "tab": "BUILTIN",
        "model": "faster-rcnn-resnet50-fpn-coco-torch",
        "label_field": "predictions"
    }
)

set_view(exists=["predictions"]) 

Use Case 2: Import COCO Dataset and Add Predictions

execute_operator(
    operator_uri="@voxel51/utils/create_dataset",
    params={"name": "coco-dataset", "persistent": true}
)

set_context(dataset_name="coco-dataset")

execute_operator(
    operator_uri="@voxel51/io/import_samples",
    params={
        "import_type": "MEDIA_AND_LABELS",
        "dataset_type": "COCO",
        "data_path": {"absolute_path": "/path/to/images"},
        "labels_path": {"absolute_path": "/path/to/annotations.json"},
        "label_field": "ground_truth"
    }
)

load_dataset(name="coco-dataset")  # Validate import

launch_app(dataset_name="coco-dataset")

execute_operator(
    operator_uri="@voxel51/zoo/apply_zoo_model",
    params={
        "tab": "BUILTIN",
        "model": "faster-rcnn-resnet50-fpn-coco-torch",
        "label_field": "predictions"
    }
)

set_view(exists=["predictions"]) 

Use Case 3: Import YOLO Dataset

execute_operator(
    operator_uri="@voxel51/utils/create_dataset",
    params={"name": "yolo-dataset", "persistent": true}
)

set_context(dataset_name="yolo-dataset")

execute_operator(
    operator_uri="@voxel51/io/import_samples",
    params={
        "import_type": "MEDIA_AND_LABELS",
        "dataset_type": "YOLOv5",
        "dataset_dir": {"absolute_path": "/path/to/yolo/dataset"},
        "label_field": "ground_truth"
    }
)

load_dataset(name="yolo-dataset")  

launch_app(dataset_name="yolo-dataset")

Use Case 4: Classification with Directory Tree

For a folder structure like:

/dataset/
  /cats/
    cat1.jpg
    cat2.jpg
  /dogs/
    dog1.jpg
    dog2.jpg
execute_operator(
    operator_uri="@voxel51/utils/create_dataset",
    params={"name": "classification-dataset", "persistent": true}
)

set_context(dataset_name="classification-dataset")

execute_operator(
    operator_uri="@voxel51/io/import_samples",
    params={
        "import_type": "MEDIA_AND_LABELS",
        "dataset_type": "Image Classification Directory Tree",
        "dataset_dir": {"absolute_path": "/path/to/dataset"},
        "label_field": "ground_truth"
    }
)

load_dataset(name="classification-dataset")  

launch_app(dataset_name="classification-dataset")

Troubleshooting

Error: "Dataset already exists"

  • Use a different dataset name
  • Or delete existing dataset first with @voxel51/utils/delete_dataset

Error: "No samples found"

  • Verify the directory path is correct
  • Check file extensions are supported
  • Ensure files are not in nested subdirectories (use recursive=true if needed)

Error: "Labels path not found"

  • Verify the labels file/directory exists
  • Check the path is absolute, not relative

Error: "Model not found"

  • Check model name spelling
  • Verify model exists in FiftyOne Zoo
  • Use list_operators() and get_operator_schema() to discover available models

Error: "Missing dependency" (e.g., torch, ultralytics)

  • The MCP server detects missing dependencies
  • Response includes missing_package and install_command
  • Install the required package and restart MCP server

Slow inference

  • Use smaller model variant (e.g., yolov8n instead of yolov8x)
  • Reduce batch size
  • Consider delegated execution for large datasets

Best Practices

  1. Explore before importing - Always scan the directory first to understand the data
  2. Confirm with user - Present findings and get confirmation before creating datasets
  3. Use descriptive names - Dataset names and label fields should be meaningful
  4. Separate ground truth from predictions - Use different field names (e.g., ground_truth vs predictions)
  5. Start with fast models - Use lightweight models first, then upgrade if needed
  6. Check operator schemas - Use get_operator_schema() to discover available parameters

Resources

License

Copyright 2017-2025, Voxel51, Inc. Apache 2.0 License