動画アノテーション
動画内の時間セグメントのアノテーション、フレーム分類、キーフレームマーキング、オブジェクト追跡。
動画アノテーション
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"設定オプション
| フィールド | タイプ | デフォルト | 説明 |
|---|---|---|---|
name | string | 必須 | アノテーションの一意識別子 |
description | string | 必須 | アノテーターに表示される指示 |
annotation_type | string | 必須 | "video_annotation"でなければならない |
labels | list | 必須 | 利用可能なアノテーションラベル |
mode | string | "segment" | アノテーションモード |
min_segments | integer | 0 | 最小必須アノテーション数 |
max_segments | integer | null | 最大許容アノテーション数 |
timeline_height | integer | 70 | タイムラインの高さ(ピクセル) |
overview_height | integer | 40 | 概要バーの高さ(ピクセル) |
zoom_enabled | boolean | true | タイムラインズームを有効化 |
playback_rate_control | boolean | true | 再生速度セレクターを表示 |
frame_stepping | boolean | true | フレーム単位ナビゲーションを有効化 |
show_timecode | boolean | true | フレーム番号と時間を表示 |
video_fps | integer | 30 | 計算用の動画フレームレート |
ラベル設定
ラベルはシンプルな文字列またはカラーとキーボードショートカット付きの詳細なオブジェクトとして定義できます:
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ワークフロー
- キーフレームに移動してオブジェクトの周りにバウンディングボックスを描画
- 数フレーム先にスキップしてバウンディングボックスを再配置
- システムが中間フレームの位置を自動的に補間
- 補間された位置を確認し、必要に応じて調整
有効なアノテーションモードの完全なセット:segment、frame、keyframe、tracking、combined。
技術的な注記
- タイムライン可視化にPeaks.jsを使用
- 標準HTML5ビデオ要素(追加のサーバー依存関係なし)
- タイムラインはドラッグで選択してセグメントを作成可能
ベストプラクティス
- 圧縮動画を使用 - 大きなファイルは読み込みを遅くする
- 適切なFPSを設定 -
video_fpsを実際の動画フレームレートに合わせる - フレームステッピングを有効化 - 正確なフレームレベルアノテーションに不可欠
- 再生速度コントロールを使用 - スローモーションで詳細な作業を支援
- 明確なセグメント定義を提供 - セグメント境界の構成要素を定義
- 区別しやすいカラーを使用 - ラベルを視覚的に区別できるようにする
- タイムラインの高さを考慮 - 複雑なセグメンテーションタスクでは高さを増やす