비디오 어노테이션
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"구성 옵션
| 필드 | 유형 | 기본값 | 설명 |
|---|---|---|---|
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결합 모드
하나의 인터페이스에서 여러 어노테이션 유형을 사용합니다:
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를 실제 비디오 프레임률에 맞추세요 - 프레임 단위 이동을 활성화하세요 - 정밀한 프레임 단위 어노테이션에 필수입니다
- 재생 속도 제어를 사용하세요 - 슬로 모션은 세밀한 작업에 도움이 됩니다
- 명확한 세그먼트 정의를 제공하세요 - 세그먼트 경계의 기준을 정의하세요
- 뚜렷한 색상을 사용하세요 - 레이블을 시각적으로 구분되게 만드세요
- 타임라인 높이를 고려하세요 - 복잡한 분할 작업에서는 높이를 늘리세요