Skip to content
Tutorials4 min read

Potato로 이미지 분류하기

썸네일 미리보기, 줌 컨트롤, 다중 라벨 체크박스 스키마, 키보드 단축키를 활용해 Potato에서 높은 처리량의 시각 주석을 위한 이미지 분류를 설정합니다.

Potato Team

대부분의 컴퓨터 비전 프로젝트는 머지않아 라벨이 붙은 이미지 더미가 필요하고, 누군가는 그 라벨링을 해야 합니다. 제품 사진을 분류하든, 콘텐츠를 검수하든, 의료 영상을 분류하든, Potato가 인터페이스를 맡아 주므로 여러분은 라벨에 집중할 수 있습니다. 이 튜토리얼에서는 실제로 쓰게 될 설정들을 다룹니다. 단일 라벨 분류와 다중 라벨 분류, 중첩된 카테고리 구조, 그리고 이미지 작업의 신뢰성을 지켜 주는 품질 검사입니다.

기본 이미지 분류

단일 라벨 작업부터 시작하겠습니다.

설정

yaml
annotation_task_name: "Product Image Classification"
 
# Image data
data_files:
  - data/products.json
 
item_properties:
  id_key: product_id
  text_key: image_url
 
# Classification labels
annotation_schemes:
  - annotation_type: image_annotation
    name: category
    description: "What type of product is shown?"
    labels:
      - Electronics
      - Clothing
      - Home & Garden
      - Sports & Outdoors
      - Books & Media
      - Other
    keyboard_shortcuts:
      Electronics: "1"
      Clothing: "2"
      "Home & Garden": "3"
      "Sports & Outdoors": "4"
      "Books & Media": "5"
      Other: "6"

이미지 분류 인터페이스는 카테고리 라벨과 함께 이미지를 표시합니다:

카테고리 라벨과 키보드 단축키가 있는 이미지 분류 인터페이스분류 라벨과 키보드 단축키가 함께 표시된 제품 이미지를 보여 주는 이미지 주석 인터페이스

데이터 형식

data/products.json을 만듭니다:

json
{"product_id": "P001", "image_url": "/images/products/laptop.jpg"}
{"product_id": "P002", "image_url": "/images/products/tshirt.jpg"}
{"product_id": "P003", "image_url": "/images/products/garden_tools.jpg"}
{"product_id": "P004", "image_url": "https://example.com/images/basketball.jpg"}

이미지는 로컬 경로 또는 URL일 수 있습니다.

다중 라벨 분류

여러 카테고리에 속하는 이미지의 경우:

yaml
annotation_schemes:
  - annotation_type: multiselect
    name: attributes
    description: "Select all attributes that apply to this image"
    labels:
      - Contains people
      - Outdoor scene
      - Indoor scene
      - Contains text
      - Product photo
      - Lifestyle photo
      - Close-up shot
      - Wide angle
    min_selections: 1
    max_selections: 5

계층형 카테고리

복잡한 분류 체계에는 중첩 라벨을 사용합니다:

yaml
annotation_schemes:
  - annotation_type: radio
    name: main_category
    description: "Primary category"
    labels:
      - Apparel
      - Electronics
      - Home
 
  - annotation_type: radio
    name: subcategory
    description: "Subcategory"
    conditional:
      depends_on: main_category
      options:
        Apparel:
          - Tops
          - Bottoms
          - Footwear
          - Accessories
        Electronics:
          - Phones
          - Computers
          - Audio
          - Cameras
        Home:
          - Furniture
          - Decor
          - Kitchen
          - Bedding

이미지 품질 평가

분류와 함께 품질 검사를 추가합니다:

yaml
annotation_schemes:
  - annotation_type: radio
    name: category
    description: "Product category"
    labels: [Electronics, Clothing, Home, Other]
 
  - annotation_type: radio
    name: image_quality
    description: "Is this image suitable for the product catalog?"
    labels:
      - name: Approved
        description: "Clear, well-lit, product is visible"
      - name: Needs review
        description: "Minor issues but potentially usable"
      - name: Rejected
        description: "Poor quality, wrong product, or inappropriate"
 
  - annotation_type: multiselect
    name: quality_issues
    description: "If not approved, what issues are present?"
    labels:
      - Blurry or out of focus
      - Poor lighting
      - Wrong product shown
      - Watermark or text overlay
      - Inappropriate content
      - Multiple products in frame
    conditional:
      depends_on: image_quality
      show_when: ["Needs review", "Rejected"]

고급 이미지 설정

고급 이미지 표시 커스터마이징을 하려면 주석 스키마에서 image_annotation 타입을 설정하고 필요에 따라 CSS나 사용자 정의 스타일을 사용하십시오.

전체 예시

프로덕션에 바로 쓸 수 있는 설정입니다:

yaml
annotation_task_name: "E-commerce Image Classification"
 
data_files:
  - data/images.json
 
item_properties:
  id_key: sku
  text_key: image_path
 
annotation_schemes:
  - annotation_type: image_annotation
    name: primary_category
    description: "Select the main product category"
    labels:
      - Electronics
      - Clothing & Accessories
      - Home & Living
      - Beauty & Personal Care
      - Sports & Fitness
      - Toys & Games
      - Other
    required: true
    keyboard_shortcuts:
      Electronics: "1"
      "Clothing & Accessories": "2"
      "Home & Living": "3"
      "Beauty & Personal Care": "4"
      "Sports & Fitness": "5"
      "Toys & Games": "6"
      Other: "7"
 
  - annotation_type: multiselect
    name: image_attributes
    description: "Select all that apply"
    labels:
      - White background
      - Lifestyle shot
      - Multiple angles
      - Model wearing/using
      - Size reference included
      - Brand visible
    required: false
 
  - annotation_type: radio
    name: listing_ready
    description: "Is this image ready for product listing?"
    labels:
      - Yes - Ready to publish
      - No - Needs editing
      - No - Reshoot required
    required: true
 
annotation_guidelines:
  title: "Image Classification Guidelines"
  content: |
    ## Category Selection
    Choose the most specific category that fits the product.
 
    ## Image Quality
    - "Ready to publish": Clear, professional, meets standards
    - "Needs editing": Good photo but needs cropping/color correction
    - "Reshoot required": Fundamentally unsuitable

이미지 주석을 위한 팁

색과 밝기는 모니터마다 다르므로, 그것이 중요한 작업이라면 주석자들이 어느 정도 보정된 디스플레이를 쓰고 있는지 확인하십시오. 카테고리를 말로 설명하기보다 가이드라인에 예시 이미지를 넣으십시오. 그림 한 장이 한 문단보다 더 많은 논쟁을 정리합니다. 애매한 이미지를 어떻게 처리할지 적어 두십시오. 애매한 이미지는 반드시 나오기 때문입니다. 그리고 가끔씩 팀이 같은 묶음을 라벨링하고 비교하게 하여, 편차가 일찍 잡히도록 하십시오.

구현 세부 사항은 이미지 주석 문서를 참고하십시오.

다음 단계


전체 이미지 주석 문서는 /docs/features/image-annotation에서 확인하십시오.