Tutorials3 min read
逐幀影片標註
設定具有精確幀導航、時間戳標記和時序事件標註的影片標註任務。
Potato Team
影片標註可以為動作識別、目標跟蹤和時序事件檢測建立訓練資料。本教程涵蓋幀導航、時間分割和高效的影片標註工作流。
影片標註功能
Potato 支援用於標註和分類任務的影片標註:
- 影片分類:為整個影片片段新增標籤
- 多標籤標註:為影片應用多個標籤
- 時序標註:在影片中標記事件
基本影片設定
yaml
annotation_task_name: "Video Action Recognition"
data_files:
- "data/videos.json"
annotation_schemes:
- annotation_type: video_annotation
name: action
description: "What action is shown in this video?"
labels:
- Walking
- Running
- Jumping
- Sitting
- Standing
- Other逐幀導航
yaml
annotation_schemes:
- annotation_type: video_annotation
name: frame_label
description: "Annotate video frames"
labels:
- Action
- No action時間片段標註
用開始和結束時間標記事件:
yaml
annotation_task_name: "Video Event Detection"
data_files:
- "data/videos.json"
annotation_schemes:
- annotation_type: video_annotation
name: events
description: "Mark all events and their duration"
labels:
- name: conversation
color: "#4ECDC4"
- name: action_sequence
color: "#FF6B6B"
- name: transition
color: "#45B7D1"
- name: title_card
color: "#FFEAA7"建立片段
- 導航到事件的起始位置
- 按
[或點選"標記起點" - 導航到事件的結束位置
- 按
]或點選"標記終點" - 選擇事件標籤
- 對所有事件重複此過程
影片分類
用標籤對影片內容進行分類:
yaml
annotation_schemes:
- annotation_type: video_annotation
name: key_moments
description: "Mark important moments"
labels:
- name: action_start
description: "When the action begins"
color: "#22C55E"
- name: action_peak
description: "Most intense moment"
color: "#EF4444"
- name: action_end
description: "When the action completes"
color: "#3B82F6"影片級分類
使用標準標註類型對影片進行分類:
yaml
annotation_schemes:
- annotation_type: radio
name: video_label
description: "What is happening in this video?"
labels:
- Person visible
- No person
- Transition/blur帶標籤的影片標註
用類別標籤標註影片:
yaml
annotation_schemes:
- annotation_type: video_annotation
name: video_labels
description: "Label video content"
labels:
- name: person
color: "#FF6B6B"
- name: vehicle
color: "#4ECDC4"
- name: ball
color: "#FFEAA7"完整影片標註配置
yaml
annotation_task_name: "Sports Video Analysis"
data_files:
- "data/sports_clips.json"
output_annotation_dir: "annotations/"
export_annotation_format: "jsonl"
annotation_schemes:
# Game events
- annotation_type: video_annotation
name: game_events
description: "Mark game events"
labels:
- name: goal
color: "#22C55E"
- name: foul
color: "#EF4444"
- name: corner_kick
color: "#3B82F6"
- name: free_kick
color: "#F59E0B"
- name: penalty
color: "#EC4899"
- name: offside
color: "#8B5CF6"
# Clip-level annotation
- annotation_type: multiselect
name: clip_tags
description: "Tags for this clip"
labels:
- Highlight worthy
- Good camera angle
- Multiple players
- Close-up
- Wide shot
- Slow motion available
annotation_guidelines:
title: "Sports Video Annotation Guide"
content: |
## Event Marking
- Mark events from when they START
- Include the full play sequence
- Goal: From shot to ball crossing line
## Navigation
- Space: Play/Pause
- Arrow keys: Frame navigation輸出格式
json
{
"id": "clip_001",
"video_path": "/videos/match_highlight.mp4",
"annotations": {
"game_events": ["goal", "corner_kick"],
"clip_tags": ["Highlight worthy", "Good camera angle"]
}
}影片標註技巧
- 第一遍概覽:先以正常速度觀看
- 慢動作求精確:使用 0.25 倍速獲取精確時間戳
- 鍵盤快捷鍵:比滑鼠快得多
- 適當休息:影片標註對視覺要求很高
- 一致的標準:清楚地記錄邊緣案例
下一步
完整文件請見 影像標註(影片部分)。