Skip to content
Tutorials4 min read

객체 탐지를 위한 바운딩 박스 그리기

Potato에서 컴퓨터 비전을 위한 바운딩 박스 어노테이션을 설정하고, 레이블 색상, 최소 박스 크기, 다중 클래스 지원, 검증 규칙, COCO/YOLO 내보내기를 구성합니다.

Potato Team

객체 탐지기를 학습한다면 바운딩 박스가 필요합니다. 이 튜토리얼은 최소한의 설정으로 시작하여 속성, 검증 규칙, 그리고 완전한 프로덕션 구성까지 단계적으로 만들어 갑니다. 그 배경이 되는 이미지 옵션에 대해서는 이미지 어노테이션 문서를 참조하십시오.

기본 바운딩 박스 설정

최소 구성

yaml
annotation_task_name: "Object Detection Annotation"
 
data_files:
  - "data/images.json"
 
annotation_schemes:
  - annotation_type: image_annotation
    name: objects
    description: "Draw boxes around all objects"
    tools:
      - bbox
    labels:
      - name: car
        color: "#FF6B6B"
      - name: person
        color: "#4ECDC4"
      - name: bicycle
        color: "#45B7D1"

작동 방식

  1. 도구 모음에서 레이블을 선택합니다
  2. 클릭하고 드래그하여 박스를 그립니다
  3. 모서리를 조정하여 박스를 다듬습니다
  4. 필요에 따라 박스를 추가합니다
  5. 완료되면 제출합니다

어노테이터는 클릭 앤 드래그 인터페이스를 사용하여 이미지 위에 직접 바운딩 박스를 그립니다:

객체 탐지를 위한 바운딩 박스 어노테이션 인터페이스바운딩 박스 도구를 사용하면 어노테이터가 이미지에서 직사각형 영역을 그리고 레이블을 지정할 수 있습니다

상세 레이블 구성

yaml
annotation_schemes:
  - annotation_type: image_annotation
    name: objects
    description: "Annotate all visible objects"
    tools:
      - bbox
    labels:
      - name: person
        color: "#FF6B6B"
        description: "Any human, partial or full"
        keyboard_shortcut: "p"
 
      - name: car
        color: "#4ECDC4"
        description: "Cars, trucks, SUVs"
        keyboard_shortcut: "c"
 
      - name: motorcycle
        color: "#45B7D1"
        description: "Motorcycles and scooters"
        keyboard_shortcut: "m"
 
      - name: bicycle
        color: "#96CEB4"
        description: "Bicycles of all types"
        keyboard_shortcut: "b"
 
      - name: traffic_light
        color: "#FFEAA7"
        description: "Traffic signals"
        keyboard_shortcut: "t"
 
      - name: stop_sign
        color: "#DDA0DD"
        description: "Stop signs"
        keyboard_shortcut: "s"

객체 속성 추가하기

각 박스에 대한 추가 정보를 수집합니다:

yaml
annotation_schemes:
  - annotation_type: image_annotation
    name: objects
    tools:
      - bbox
    labels:
      - name: person
        color: "#FF6B6B"
        attributes:
          - name: occlusion
            type: radio
            options: [none, partial, heavy]
          - name: truncated
            type: checkbox
            description: "Object extends beyond image"
          - name: difficult
            type: checkbox
            description: "Hard to identify"

어노테이터가 박스를 그리면 이러한 속성을 입력하라는 안내를 받게 됩니다.

검증 규칙

검증을 통해 어노테이션 품질을 보장합니다:

yaml
annotation_schemes:
  - annotation_type: image_annotation
    name: objects
    tools:
      - bbox
    labels: [...]
    min_annotations: 1

키보드 단축키

Potato에는 효율적인 어노테이션을 위한 기본 키보드 단축키가 포함되어 있습니다:

  • 숫자 키로 레이블을 선택합니다
  • Delete 키로 선택한 어노테이션을 제거합니다
  • 화살표 키로 항목 사이를 이동합니다

표시 옵션

이미지 표시 설정을 구성합니다:

yaml
image_display:
  width: 800
  height: 600

완전한 프로덕션 구성

yaml
annotation_task_name: "Autonomous Driving - Object Detection"
 
data_files:
  - "data/driving_frames.json"
 
annotation_schemes:
  - annotation_type: image_annotation
    name: objects
    description: "Annotate all traffic participants and objects"
    tools:
      - bbox
    min_annotations: 1
    labels:
      - name: vehicle
        color: "#FF6B6B"
        keyboard_shortcut: "v"
        attributes:
          - name: type
            type: radio
            options: [car, truck, bus, motorcycle, bicycle]
          - name: occlusion
            type: radio
            options: [0%, 1-25%, 26-50%, 51-75%, 76-99%]
 
      - name: pedestrian
        color: "#4ECDC4"
        keyboard_shortcut: "p"
        attributes:
          - name: pose
            type: radio
            options: [standing, walking, sitting, lying]
          - name: age_group
            type: radio
            options: [child, adult, elderly]
 
      - name: cyclist
        color: "#45B7D1"
        keyboard_shortcut: "c"
 
      - name: traffic_sign
        color: "#FFEAA7"
        keyboard_shortcut: "t"
        attributes:
          - name: sign_type
            type: radio
            options: [stop, yield, speed_limit, warning, other]
 
      - name: traffic_light
        color: "#DDA0DD"
        keyboard_shortcut: "l"
        attributes:
          - name: state
            type: radio
            options: [red, yellow, green, off, unknown]

출력 형식

json
{
  "frame_id": "frame_0001",
  "frame_path": "/images/frame_0001.jpg",
  "image_dimensions": {"width": 1920, "height": 1080},
  "annotations": {
    "objects": [
      {
        "label": "vehicle",
        "bbox": [450, 380, 680, 520],
        "attributes": {
          "type": "car",
          "occlusion": "0%"
        }
      },
      {
        "label": "pedestrian",
        "bbox": [820, 400, 870, 550],
        "attributes": {
          "pose": "walking",
          "age_group": "adult"
        }
      }
    ]
  }
}

품질 좋은 바운딩 박스를 위한 팁

박스를 객체에 딱 맞게 그려서 모델에 배경이 많이 들어가지 않도록 하십시오. 까다로운 경우(가림, 가장자리에서 잘린 객체)를 어떻게 처리할지 기록해 두고, 초기에 예시 한 묶음을 함께 검토하여 모두가 같은 방식으로 그리도록 하십시오. 박스 개수와 크기 분포를 주시하십시오. 갑작스러운 변화는 보통 누군가가 규칙을 다르게 해석하고 있다는 뜻입니다.

다음 단계


전체 문서는 /docs/features/image-annotation에서 확인하십시오.