Skip to content
Tutorials4 min read

프레임 단위 컨트롤을 활용한 영상 주석

프레임 단위 탐색, 타임스탬프 마커, 시간 기반 이벤트 레이블링, radio 또는 span 스키마를 활용한 구간별 분류 기능으로 Potato에서 영상 주석을 설정합니다.

Potato Team

영상 주석은 동작 인식, 객체 추적, 시간 기반 이벤트 감지와 같은 작업을 위한 학습 데이터를 만드는 방법입니다. 이 튜토리얼에서는 프레임 탐색, 클립을 시간 단위로 구간 나누기, 그리고 레이블링을 빠르게 유지하는 방법을 다룹니다. 전체 영상 스키마 참조는 원본 문서를 확인하십시오.

영상 주석으로 할 수 있는 것

Potato는 레이블링 작업과 분류 작업 모두에서 영상을 처리합니다.

  • 영상 분류: 전체 영상 클립에 레이블을 답니다
  • 다중 레이블 태깅: 영상에 여러 태그를 적용합니다
  • 시간 기반 주석: 영상 속 이벤트를 표시합니다

기본 영상 설정

yaml
annotation_task_name: "Video Action Recognition"
task_dir: "."
 
data_files:
  - "data/videos.json"
 
item_properties:
  id_key: id
  text_key: video_url
 
output_annotation_dir: "annotation_output/"
export_annotation_format: "jsonl"
 
annotation_schemes:
  - annotation_type: video_annotation
    name: action
    description: "Mark each stretch of video where one action is happening"
    mode: segment
    labels:
      - name: walking
        color: "#4ECDC4"
        key_value: "1"
      - name: running
        color: "#FF6B6B"
        key_value: "2"
      - name: jumping
        color: "#45B7D1"
        key_value: "3"
      - name: sitting
        color: "#FFEAA7"
        key_value: "4"
 
user_config:
  allow_all_users: true

프레임 단위 탐색

yaml
    min_segments: 1
    label_requirement:
      required: true

시간 구간 주석

이벤트를 시작 시간과 종료 시간으로 표시합니다.

yaml
annotation_schemes:
  - annotation_type: video_annotation
    name: frame_label
    description: "Classify the current frame"
    mode: frame
    frame_stepping: true
    show_timecode: true
    video_fps: 30
    labels:
      - name: action
        color: "#FF6B6B"
        key_value: "1"
      - name: no_action
        color: "#9CA3AF"
        key_value: "2"

구간 만들기

  1. 이벤트의 시작 지점으로 이동합니다
  2. [를 누르거나 "Mark Start"를 클릭합니다
  3. 이벤트의 끝 지점으로 이동합니다
  4. ]를 누르거나 "Mark End"를 클릭합니다
  5. 이벤트 레이블을 선택합니다
  6. 모든 이벤트에 대해 반복합니다

핵심 순간 표시하기

클립 내의 특정 순간에 태그를 답니다.

yaml
annotation_schemes:
  - annotation_type: video_annotation
    name: key_moments
    description: "Mark the moment each action begins, peaks, and ends"
    mode: keyframe
    labels:
      - name: action_start
        color: "#22C55E"
        key_value: "1"
      - name: action_peak
        color: "#EF4444"
        key_value: "2"
      - name: action_end
        color: "#3B82F6"
        key_value: "3"

영상별 분류

표준 주석 유형으로 영상 전체를 분류합니다.

yaml
annotation_schemes:
  - annotation_type: video_annotation
    name: plays
    description: "Mark each play and describe it"
    mode: segment
    labels:
      - name: attack
        color: "#EF4444"
      - name: defense
        color: "#3B82F6"
    segment_schemes:
      - annotation_type: radio
        name: outcome
        description: "How did this play end?"
        labels: ["scored", "turnover", "out of play"]

카테고리 레이블이 있는 영상

카테고리 레이블로 영상에 주석을 답니다.

yaml
annotation_schemes:
  - annotation_type: multiselect
    name: clip_tags
    description: "Tags that apply to this clip as a whole"
    labels:
      - Highlight worthy
      - Good camera angle
      - Multiple players
      - Close-up
      - Wide shot
      - Slow motion available

완전한 구성 예시

yaml
annotation_task_name: "Sports Video Analysis"
task_dir: "."
 
data_files:
  - "data/sports_clips.json"
 
item_properties:
  id_key: id
  text_key: video_url
 
output_annotation_dir: "annotations/"
export_annotation_format: "jsonl"
 
annotation_instructions: |
  ## Event marking
 
  - Mark an event from the frame it **starts**, not from the frame it becomes obvious.
  - Include the full play sequence in the segment.
  - For a goal, run the segment from the shot to the ball crossing the line.
 
  ## Navigation
 
  - `Space` plays and pauses, `,` and `.` step one frame.
  - `[` and `]` set the segment boundaries, `Enter` creates the segment.
 
annotation_schemes:
  - annotation_type: video_annotation
    name: game_events
    description: "Mark every game event and its duration"
    mode: segment
    frame_stepping: true
    show_timecode: true
    playback_rate_control: true
    video_fps: 30
    min_segments: 1
    label_requirement:
      required: true
    labels:
      - name: goal
        color: "#22C55E"
        key_value: "1"
      - name: foul
        color: "#EF4444"
        key_value: "2"
      - name: corner_kick
        color: "#3B82F6"
        key_value: "3"
      - name: free_kick
        color: "#F59E0B"
        key_value: "4"
      - name: penalty
        color: "#EC4899"
        key_value: "5"
      - name: offside
        color: "#8B5CF6"
        key_value: "6"
 
  - annotation_type: multiselect
    name: clip_tags
    description: "Tags that apply to this clip as a whole"
    labels:
      - Highlight worthy
      - Good camera angle
      - Multiple players
      - Close-up
      - Wide shot
      - Slow motion available
 
user_config:
  allow_all_users: true

출력 형식

json
{
    "video_metadata": {
        "duration": 120.5,
        "fps": 30,
        "width": 1920,
        "height": 1080
    },
    "segments": [
        {
            "id": "segment_1",
            "start_time": 0.0,
            "end_time": 10.5,
            "start_frame": 0,
            "end_frame": 315,
            "label": "goal"
        }
    ],
    "frame_annotations": {
        "450": {
            "frame": 450,
            "time": 15.0,
            "label": "scene_change"
        }
    },
    "keyframes": [
        {
            "id": "kf_1",
            "frame": 900,
            "time": 30.0,
            "label": "important_moment",
            "note": "Key dialogue"
        }
    ],
    "tracking": {}
}

영상 주석을 위한 팁

  1. 첫 번째 훑어보기: 먼저 일반 속도로 시청하십시오
  2. 정밀도를 위한 슬로모션: 정확한 타임스탬프에는 0.25배속을 사용하십시오
  3. 키보드 단축키: 마우스보다 훨씬 빠릅니다
  4. 휴식 취하기: 영상 주석은 시각적으로 부담이 큽니다
  5. 일관된 기준: 경계 사례를 명확히 문서화하십시오

다음 단계


전체 문서는 이미지 주석(영상 섹션)에 있습니다.