공통 어노테이터 스키마
Raw공통 어노테이터 스키마
Section titled “공통 어노테이터 스키마”본 문서는 Datamaker의 모든 어노테이터(이미지, 비디오, 텍스트, 프롬프트, PCD 등)가 공통적으로 따라야 하는 데이터 모델을 정의합니다.
각 어노테이터별 스펙은 이 스키마를 상속하고, 도구별(툴별) 고유 필드를 추가로 확장합니다.
-
classification 구조는 tool(도구)와 무관하며, 관리자(운영자) 페이지에서 직접 정의한 class, attributes, options로 구성됩니다.
-
attributes, options 등 모든 하위 구조 역시 사용자가 직접 정의합니다.
-
실제 어노테이션 데이터의 classification 필드는 트리 구조를 flatten(평탄화)한 key-value 쌍으로 저장됩니다.
-
특정 class가 선택된 경우, 필수 하위 속성(종속성)은 프로젝트별 dm-schema 확장 JSON Schema로 관리됩니다.
전체 구조 개요 (Mermaid)
Section titled “전체 구조 개요 (Mermaid)”flowchart TD
Schema["관리자 정의 분류 스키마 (트리)"]
Data["실제 어노테이션 데이터 (Flatten)"]
Schema -->|Flatten 규칙| Data
Schema -->|종속성 규칙| JSONSchema["dm-schema 확장 JSON Schema"]
Data -->|유효성 검증| JSONSchema
데이터 흐름
Section titled “데이터 흐름”공통 데이터 모델
Section titled “공통 데이터 모델”1. 최상위 구조
Section titled “1. 최상위 구조”모든 어노테이션 작업은 하나의 JSON 객체로 저장되며, 최상위 키는 어노테이터 종류와 관계없이 동일합니다.
| 키 | 타입 | 설명 |
|---|---|---|
extra | Record<string, unknown> | 에셋별 메타데이터 |
relations | Record<string, RelationItem[]> | 어노테이션 간 관계 |
annotations | Record<string, AnnotationBase[]> | 에셋 단위의 어노테이션 목록 |
annotationsData | Record<string, AnnotationDataItem[]> | 어노테이션 실제 좌표/데이터 |
annotationGroups | Record<string, AnnotationGroupItem[]> | 어노테이션 그룹화 |
assignmentId | string | 작업 식별자 |
2. 공통 스키마 구조
Section titled “2. 공통 스키마 구조”2.1 최상위 구조
Section titled “2.1 최상위 구조”2.2 AnnotationBase (공통 메타 정보)
Section titled “2.2 AnnotationBase (공통 메타 정보)”소스코드 src/app/core/lib/data.js에서 확인된 구조:
2.3 RelationItem (관계 객체)
Section titled “2.3 RelationItem (관계 객체)”2.4 AnnotationGroupItem (그룹 객체)
Section titled “2.4 AnnotationGroupItem (그룹 객체)”2.5 AnnotationDataBase (공통 데이터 필드)
Section titled “2.5 AnnotationDataBase (공통 데이터 필드)”annotationsData 배열 내 각 항목이 가질 수 있는 공통 필드입니다:
2.6 데이터 압축 공통 규격
Section titled “2.6 데이터 압축 공통 규격”⚠️ 적용 범위: 현재 Image Annotator의
segmentation도구에서 사용 중이며, 향후 모든 어노테이터에서 공통적으로 적용될 예정입니다.
압축 필드 명세
Section titled “압축 필드 명세”| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
isCompressed | boolean | 조건부 | 데이터 압축 여부. true일 경우 compressionFormat 필수 |
compressionFormat | string | 조건부 | 압축 알고리즘 식별자. isCompressed: true일 때 필수 |
압축 포맷 종류
Section titled “압축 포맷 종류”| 포맷 | 상태 | 설명 | 적용 대상 |
|---|---|---|---|
rle | ✅ 사용 중 | Run-Length Encoding | 연속된 인덱스/픽셀 데이터 |
압축 데이터 처리 흐름
Section titled “압축 데이터 처리 흐름”압축 적용 예시
Section titled “압축 적용 예시”압축 전 (Raw):
압축 후 (RLE):
RLE 형식:
[시작인덱스, 연속개수, 시작인덱스, 연속개수, ...]
Classification 및 Label 처리
Section titled “Classification 및 Label 처리”Classification 구조
Section titled “Classification 구조”관리자가 정의한 트리 구조의 분류 스키마는 1-depth key-value 쌍으로 평탄화됩니다:
Label 자동 생성
Section titled “Label 자동 생성”classification 기반으로 label 배열이 자동 생성됩니다:
데이터 전처리 및 후처리
Section titled “데이터 전처리 및 후처리”beforeAction Hook
Section titled “beforeAction Hook”모든 어노테이터는 definedHooks.beforeAction을 통해 저장 전 데이터 정리를 수행합니다:
어노테이터별 특수 처리
Section titled “어노테이터별 특수 처리”| 어노테이터 | 전처리 내용 |
|---|---|
| Image | dataGrooming 실행 |
| Video | bakeInterpolatedFrames (bounding_box 키프레임 보간) + dataGrooming |
| Text | dataGrooming 실행 |
| PCD | 빈 points 배열 가진 3d_segmentation 삭제 + dataGrooming |
| Prompt | dataGrooming 실행 |
| Audio | dataGrooming 실행 |