Skip to content

動画アノテーション

動画内の時間セグメントのアノテーション、フレーム分類、キーフレームマーキング、オブジェクト追跡。

動画アノテーション

Potatoは、時間的セグメンテーション、フレーム分類、キーフレームマーキング、オブジェクト追跡を含む包括的な動画アノテーション機能を提供します。

アノテーションモード

モード説明ユースケース
segment時間範囲をマークシーン検出、話者交代
frame個々のフレームを分類フレームレベルラベリング
keyframe重要な瞬間をマークハイライト検出
trackingフレーム間でオブジェクトを追跡オブジェクト追跡
combinedすべてのモードを1つのインターフェースで複雑なアノテーションタスク

基本設定

yaml
annotation_schemes:
  - name: "video_segments"
    description: "Mark segments where the speaker changes"
    annotation_type: "video_annotation"
    labels:
      - name: "Speaker A"
        color: "#FF6B6B"
      - name: "Speaker B"
        color: "#4ECDC4"

設定オプション

フィールドタイプデフォルト説明
namestring必須アノテーションの一意識別子
descriptionstring必須アノテーターに表示される指示
annotation_typestring必須"video_annotation"でなければならない
labelslist必須利用可能なアノテーションラベル
modestring"segment"アノテーションモード
min_segmentsinteger0最小必須アノテーション数
max_segmentsintegernull最大許容アノテーション数
timeline_heightinteger70タイムラインの高さ(ピクセル)
overview_heightinteger40概要バーの高さ(ピクセル)
zoom_enabledbooleantrueタイムラインズームを有効化
playback_rate_controlbooleantrue再生速度セレクターを表示
frame_steppingbooleantrueフレーム単位ナビゲーションを有効化
show_timecodebooleantrueフレーム番号と時間を表示
video_fpsinteger30計算用の動画フレームレート

ラベル設定

ラベルはシンプルな文字列またはカラーとキーボードショートカット付きの詳細なオブジェクトとして定義できます:

yaml
labels:
  - name: "intro"
    color: "#4ECDC4"
    key_value: "1"
  - name: "content"
    color: "#3B82F6"
    key_value: "2"
  - name: "outro"
    color: "#8B5CF6"
    key_value: "3"

モード別の例

セグメントモード(デフォルト)

開始時間と終了時間で時間範囲をマーク:

yaml
annotation_schemes:
  - name: "scene_detection"
    description: "Mark each scene in the video"
    annotation_type: "video_annotation"
    mode: "segment"
    labels:
      - name: "indoor"
        color: "#3B82F6"
        key_value: "1"
      - name: "outdoor"
        color: "#22C55E"
        key_value: "2"
      - name: "transition"
        color: "#F59E0B"
        key_value: "3"
    zoom_enabled: true
    playback_rate_control: true

フレームモード

個々のフレームを分類:

yaml
annotation_schemes:
  - name: "frame_quality"
    description: "Classify each frame's quality"
    annotation_type: "video_annotation"
    mode: "frame"
    labels:
      - name: "good"
        color: "#22C55E"
      - name: "blurry"
        color: "#F59E0B"
      - name: "occluded"
        color: "#EF4444"
    frame_stepping: true
    show_timecode: true

キーフレームモード

重要な瞬間をマーク:

yaml
annotation_schemes:
  - name: "highlights"
    description: "Mark key moments in the video"
    annotation_type: "video_annotation"
    mode: "keyframe"
    labels:
      - name: "goal"
        color: "#22C55E"
      - name: "foul"
        color: "#EF4444"
      - name: "highlight"
        color: "#F59E0B"
    frame_stepping: true

トラッキングモード

バウンディングボックスでフレーム間のオブジェクトを追跡:

yaml
annotation_schemes:
  - name: "object_tracking"
    description: "Track the ball throughout the video"
    annotation_type: "video_annotation"
    mode: "tracking"
    labels:
      - name: "ball"
        color: "#3B82F6"
      - name: "player"
        color: "#22C55E"
    frame_stepping: true
    video_fps: 30

コンバインドモード

1つのインターフェースで複数のアノテーションタイプを使用:

yaml
annotation_schemes:
  - name: "comprehensive"
    description: "Full video annotation"
    annotation_type: "video_annotation"
    mode: "combined"
    labels:
      - name: "action"
        color: "#3B82F6"
      - name: "dialogue"
        color: "#22C55E"
      - name: "transition"
        color: "#F59E0B"
    zoom_enabled: true
    playback_rate_control: true
    frame_stepping: true
    show_timecode: true

動画表示

アノテーションなしのシンプルな動画再生(他のアノテーションタイプとの併用など)には、videoタイプを使用:

yaml
annotation_schemes:
  - name: "video_player"
    description: "Watch the video clip"
    annotation_type: "video"
    video_path: "{{video_url}}"
    controls: true
    autoplay: false
    loop: false
    muted: false

キーボードショートカット

キーアクション
Space再生/一時停止
, / .前/次のフレーム
[セグメント開始をマーク
]セグメント終了をマーク
Enterセグメントを作成
Kキーフレームをマーク
C現在のフレームを分類
Delete選択したアノテーションを削除
1-9ラベルを選択
+ / -ズームイン/アウト

データ形式

入力データ

データファイルには動画パスまたはURLを含める必要があります:

json
[
  {
    "id": "video_1",
    "video_url": "https://example.com/videos/sample1.mp4",
    "description": "Meeting recording - identify speakers"
  },
  {
    "id": "video_2",
    "video_url": "/data/videos/sample2.mp4",
    "description": "Activity video - label actions"
  }
]

出力形式

出力はモードによって異なります:

セグメントモード:

json
{
  "id": "video_1",
  "annotations": {
    "scene_detection": [
      {
        "start": 0.0,
        "end": 5.2,
        "start_frame": 0,
        "end_frame": 156,
        "label": "indoor"
      }
    ]
  }
}

フレームモード:

json
{
  "id": "video_1",
  "annotations": {
    "frame_quality": [
      {
        "frame": 120,
        "time": 4.0,
        "label": "good"
      }
    ]
  }
}

キーフレームモード:

json
{
  "id": "video_1",
  "annotations": {
    "highlights": [
      {
        "frame": 450,
        "time": 15.0,
        "label": "goal",
        "note": "First goal of the match"
      }
    ]
  }
}

トラッキングモード:

json
{
  "id": "video_1",
  "annotations": {
    "object_tracking": [
      {
        "id": "track_1",
        "label": "ball",
        "frames": [
          {"frame": 0, "bbox": {"x": 100, "y": 200, "w": 30, "h": 30}},
          {"frame": 1, "bbox": {"x": 105, "y": 198, "w": 30, "h": 30}}
        ]
      }
    ]
  }
}

サポートされる動画形式

  • MP4(推奨)
  • WebM
  • MOV
  • OGG

キーフレーム補間によるオブジェクト追跡

v2.2.0の新機能

トラッキングモードでキーフレーム補間がサポートされ、アノテーターはキーフレームでオブジェクトの位置をマークし、中間フレームを自動的に補間できるようになりました。これによりオブジェクト追跡タスクが大幅に高速化されます。

yaml
annotation_schemes:
  - name: "tracking"
    description: "Track objects with keyframe interpolation"
    annotation_type: "video_annotation"
    mode: "tracking"
    labels:
      - name: "person"
        color: "#3B82F6"
      - name: "vehicle"
        color: "#22C55E"
    frame_stepping: true
    video_fps: 30

ワークフロー

  1. キーフレームに移動してオブジェクトの周りにバウンディングボックスを描画
  2. 数フレーム先にスキップしてバウンディングボックスを再配置
  3. システムが中間フレームの位置を自動的に補間
  4. 補間された位置を確認し、必要に応じて調整

有効なアノテーションモードの完全なセット:segmentframekeyframetrackingcombined

技術的な注記

  • タイムライン可視化にPeaks.jsを使用
  • 標準HTML5ビデオ要素(追加のサーバー依存関係なし)
  • タイムラインはドラッグで選択してセグメントを作成可能

ベストプラクティス

  1. 圧縮動画を使用 - 大きなファイルは読み込みを遅くする
  2. 適切なFPSを設定 - video_fpsを実際の動画フレームレートに合わせる
  3. フレームステッピングを有効化 - 正確なフレームレベルアノテーションに不可欠
  4. 再生速度コントロールを使用 - スローモーションで詳細な作業を支援
  5. 明確なセグメント定義を提供 - セグメント境界の構成要素を定義
  6. 区別しやすいカラーを使用 - ラベルを視覚的に区別できるようにする
  7. タイムラインの高さを考慮 - 複雑なセグメンテーションタスクでは高さを増やす