Skip to content
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"

创建片段

  1. 导航到事件的起始位置
  2. [ 或点击"标记起点"
  3. 导航到事件的结束位置
  4. ] 或点击"标记终点"
  5. 选择事件标签
  6. 对所有事件重复此过程

视频分类

用标签对视频内容进行分类:

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/"
output_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"]
  }
}

视频标注技巧

  1. 第一遍概览:先以正常速度观看
  2. 慢动作求精确:使用 0.25 倍速获取精确时间戳
  3. 键盘快捷键:比鼠标快得多
  4. 适当休息:视频标注对视觉要求很高
  5. 一致的标准:清楚地记录边缘案例

下一步


完整文档请见 /docs/features/image-annotation(视频部分)。