Skip to content

비디오 어노테이션

Potato에서 비디오에 어노테이션을 추가합니다 — 시간 구간을 분류하고, 키프레임을 표시하며, 타임라인 전반에 걸친 프레임 단위 탐색과 이벤트 레이블링으로 객체를 추적합니다.

Potato는 시간 구간 분할, 프레임 분류, 키프레임 표시, 객체 추적을 포함한 포괄적인 비디오 어노테이션 기능을 제공합니다.

어노테이션 모드

모드설명사용 사례
segment시간 구간을 표시장면 감지, 화자 전환
frame개별 프레임을 분류프레임 단위 레이블링
keyframe중요한 순간을 표시하이라이트 감지
tracking여러 프레임에 걸쳐 객체를 추적객체 추적
combined모든 모드를 하나의 인터페이스에서복잡한 어노테이션 작업

기본 구성

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

결합 모드

하나의 인터페이스에서 여러 어노테이션 유형을 사용합니다:

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. 보간된 위치를 검토하고 필요에 따라 조정합니다

유효한 어노테이션 모드의 전체 집합은 segment, frame, keyframe, tracking, combined입니다.

기술 참고 사항

  • 타임라인 시각화에 Peaks.js를 사용합니다
  • 표준 HTML5 비디오 요소를 사용합니다(추가 서버 의존성 없음)
  • 타임라인은 드래그로 선택하여 세그먼트를 생성하는 방식을 지원합니다

모범 사례

  1. 압축된 비디오를 사용하세요 - 큰 파일은 로딩을 느리게 합니다
  2. 적절한 FPS를 설정하세요 - video_fps를 실제 비디오 프레임률에 맞추세요
  3. 프레임 단위 이동을 활성화하세요 - 정밀한 프레임 단위 어노테이션에 필수입니다
  4. 재생 속도 제어를 사용하세요 - 슬로 모션은 세밀한 작업에 도움이 됩니다
  5. 명확한 세그먼트 정의를 제공하세요 - 세그먼트 경계의 기준을 정의하세요
  6. 뚜렷한 색상을 사용하세요 - 레이블을 시각적으로 구분되게 만드세요
  7. 타임라인 높이를 고려하세요 - 복잡한 분할 작업에서는 높이를 늘리세요