Skip to content

ビジュアルAIサポート

ビジョンモデルを使用した画像・動画アノテーションのためのAI支援。

ビジュアルAIサポート

v2.1.0で新規追加

Potatoは、YOLO(オブジェクト検出用)やGPT-4o、Claude、Ollamaビジョンモデルなどのビジョン言語モデル(VLLM)を含むさまざまなビジョンモデルを使用して、画像・動画アノテーションタスクのためのAI支援を提供します。

概要

ビジュアルAIサポートにより以下が可能になります:

  • オブジェクト検出:YOLOまたはVLLMを使用して画像内のオブジェクトを自動検出・位置特定
  • 事前アノテーション:人間のレビュー用にすべてのオブジェクトを自動検出
  • 分類:画像全体または画像内の領域を分類
  • ヒント:正確な位置を明かさずにガイダンスを提供
  • シーン検出:動画内の時間的セグメントを特定
  • キーフレーム検出:動画内の重要な瞬間を発見
  • オブジェクトトラッキング:動画フレーム間でオブジェクトを追跡

サポートされるエンドポイント

YOLOエンドポイント

ローカル推論を使用した高速で正確なオブジェクト検出に最適です。

yaml
ai_support:
  enabled: true
  endpoint_type: "yolo"
  ai_config:
    model: "yolov8m.pt"  # or yolov8n, yolov8l, yolov8x, yolo-world
    confidence_threshold: 0.5
    iou_threshold: 0.45

サポートされるモデル:

  • YOLOv8(n/s/m/l/xバリアント)
  • YOLO-World(オープンボキャブラリ検出)
  • カスタムトレーニングモデル

Ollamaビジョンエンドポイント

ローカルビジョン言語モデル推論用です。

yaml
ai_support:
  enabled: true
  endpoint_type: "ollama_vision"
  ai_config:
    model: "llava:latest"  # or llava-llama3, bakllava, llama3.2-vision, qwen2.5-vl
    base_url: "http://localhost:11434"
    max_tokens: 500
    temperature: 0.1

サポートされるモデル:

  • LLaVA(7B、13B、34B)
  • LLaVA-LLaMA3
  • BakLLaVA
  • Llama 3.2 Vision(11B、90B)
  • Qwen2.5-VL
  • Moondream

OpenAIビジョンエンドポイント

GPT-4oを使用したクラウドベースのビジョン分析用です。

yaml
ai_support:
  enabled: true
  endpoint_type: "openai_vision"
  ai_config:
    api_key: "${OPENAI_API_KEY}"
    model: "gpt-4o"  # or gpt-4o-mini
    max_tokens: 1000
    detail: "auto"  # low, high, or auto

Anthropicビジョンエンドポイント

ビジョン機能を持つClaude用です。

yaml
ai_support:
  enabled: true
  endpoint_type: "anthropic_vision"
  ai_config:
    api_key: "${ANTHROPIC_API_KEY}"
    model: "claude-sonnet-4-20250514"
    max_tokens: 1024

エンドポイントの機能

各エンドポイントには異なる強みがあります:

エンドポイントテキスト生成ビジョンBbox出力キーワード根拠
ollama_visionはいはいいいえいいえはい
openai_visionはいはいいいえいいえはい
anthropic_visionはいはいいいえいいえはい
yoloいいえはいはいいいえいいえ

ベストプラクティス:

  • 精密なオブジェクト検出にはyoloエンドポイントを使用
  • 説明付き画像分類にはQwen-VLやLLaVAなどのollama_visionのVLLMを使用
  • 複合ワークフローにはテキストエンドポイントとビジュアルエンドポイントの両方を設定

AIを使った画像アノテーション

検出、事前アノテーション、分類、ヒント機能を備えたAI支援画像アノテーションを設定します:

yaml
annotation_schemes:
  - annotation_type: image_annotation
    name: object_detection
    description: "Detect and label objects in the image"
    tools:
      - bbox
      - polygon
    labels:
      - name: "person"
        color: "#FF6B6B"
      - name: "car"
        color: "#4ECDC4"
      - name: "dog"
        color: "#45B7D1"
 
    ai_support:
      enabled: true
      features:
        detection: true      # "Detect" button - find objects
        pre_annotate: true   # "Auto" button - detect all
        classification: false # "Classify" button - classify region
        hint: true           # "Hint" button - get guidance
 
ai_support:
  enabled: true
  endpoint_type: "yolo"
  ai_config:
    model: "yolov8m.pt"
    confidence_threshold: 0.5

AIを使った動画アノテーション

yaml
annotation_schemes:
  - annotation_type: video_annotation
    name: scene_segmentation
    description: "Segment video into scenes"
    mode: segment
    labels:
      - name: "intro"
        color: "#4ECDC4"
      - name: "action"
        color: "#FF6B6B"
      - name: "outro"
        color: "#45B7D1"
 
    ai_support:
      enabled: true
      features:
        scene_detection: true     # Detect scene boundaries
        keyframe_detection: false
        tracking: false
        pre_annotate: true        # Auto-segment entire video
        hint: true
 
ai_support:
  enabled: true
  endpoint_type: "ollama_vision"
  ai_config:
    model: "llava:latest"
    max_frames: 10  # Frames to sample for video analysis

ビジュアルとテキストの個別エンドポイント

各コンテンツタイプに最適なモデルを使用して、ビジュアルタスク用に個別のエンドポイントを設定できます:

yaml
ai_support:
  enabled: true
  endpoint_type: "openai"  # For text annotations
  ai_config:
    api_key: "${OPENAI_API_KEY}"
    model: "gpt-4o-mini"
 
  # Separate visual endpoint
  visual_endpoint_type: "yolo"
  visual_ai_config:
    model: "yolov8m.pt"
    confidence_threshold: 0.5

またはビジョン言語モデルとテキストモデルを併用:

yaml
ai_support:
  enabled: true
  endpoint_type: "ollama"  # Main endpoint for text
  visual_endpoint_type: "ollama_vision"  # Visual endpoint for images
  ai_config:
    model: "llama3.2"
    include:
      all: true
  visual_ai_config:
    model: "qwen2.5-vl:7b"

AI機能

検出

設定されたラベルに一致するオブジェクトを見つけ、提案バウンディングボックスを描画します。提案は破線のオーバーレイとして表示され、承認または拒否できます。

事前アノテーション(自動)

画像/動画内のすべてのオブジェクトを自動的に検出し、人間のレビュー用の提案を作成します。大規模データセットのアノテーション高速化に有用です。

分類

選択された領域または画像全体を分類します。信頼度スコアと理由とともに提案ラベルを返します。

ヒント

正確な回答を明かさずにガイダンスを提供します。アノテーターのトレーニングや、AI支援を受けながら人間の判断を求める場合に適しています。

シーン検出(動画)

動画フレームを分析してシーン境界を特定し、ラベル付きの時間的セグメントを提案します。

キーフレーム検出(動画)

動画内のアノテーションに適した重要な瞬間を特定します。

オブジェクトトラッキング(動画)

一貫したトラッキングアノテーションのために、フレーム間のオブジェクト位置を提案します。

AI提案の使用

  1. AI支援ボタン(検出、自動、ヒントなど)をクリックする
  2. 破線オーバーレイとして提案が表示されるのを待つ
  3. 提案を承認:提案オーバーレイをダブルクリック
  4. 提案を拒否:提案オーバーレイを右クリック
  5. すべて承認:ツールバーの「すべて承認」をクリック
  6. すべてクリア:「クリア」をクリックしてすべての提案を削除

検出APIレスポンス形式

json
{
  "detections": [
    {
      "label": "person",
      "bbox": {"x": 0.1, "y": 0.2, "width": 0.3, "height": 0.5},
      "confidence": 0.95
    }
  ]
}

ヒントの場合:

json
{
  "hint": "Look for objects in the lower right corner",
  "suggestive_choice": "Focus on overlapping regions"
}

動画セグメントの場合:

json
{
  "segments": [
    {
      "start_time": 0.0,
      "end_time": 5.5,
      "suggested_label": "intro",
      "confidence": 0.85
    }
  ]
}

要件

YOLOエンドポイント用

bash
pip install ultralytics opencv-python

Ollamaビジョン用

  1. ollama.aiからOllamaをインストール
  2. ビジョンモデルをプル:ollama pull llava
  3. Ollamaサーバーを起動(デフォルトでhttp://localhost:11434で実行)

OpenAI/Anthropicビジョン用

  • 環境変数または設定でAPIキーを設定
  • ビジョン対応モデルへのアクセスがあることを確認

トラブルシューティング

「ビジュアルAIエンドポイントが設定されていません」

以下を確認してください:

  1. ai_support.enabled: trueが設定されている
  2. ビジョンをサポートする有効なendpoint_typeが設定されている(yoloollama_visionopenai_visionanthropic_vision
  3. 選択したエンドポイントに必要な依存関係がインストールされている

YOLOが期待するオブジェクトを検出しない

  • confidence_thresholdを下げてみる
  • ラベルがYOLOのクラス名と一致していることを確認する(またはカスタムボキャブラリにはYOLO-Worldを使用)
  • モデルファイルが存在し有効であることを確認する

Ollamaビジョンのエラー

  • Ollamaが実行中であることを確認:curl http://localhost:11434/api/tags
  • ビジョンモデルがプルされていることを確認:ollama list
  • モデルがビジョンをサポートしていることを確認(llava、bakllava、llama3.2-visionなど)

関連情報

実装の詳細については、ソースドキュメントを参照してください。