Skip to content
Tutorials4 min read

Potato से इमेज वर्गीकरण

Potato में इमेज वर्गीकरण सेट कीजिए: थंबनेल झलक, ज़ूम नियंत्रण, कई लेबल वाली checkbox स्कीमा, और तेज़ी से काम निपटाने के लिए कीबोर्ड शॉर्टकट।

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

इमेज वर्गीकरण का इंटरफ़ेस इमेज को श्रेणी के लेबल के साथ दिखाता है:

श्रेणी लेबल और कीबोर्ड शॉर्टकट वाला इमेज वर्गीकरण इंटरफ़ेसइमेज एनोटेशन इंटरफ़ेस, जिसमें उत्पाद की तस्वीर के साथ वर्गीकरण लेबल और कीबोर्ड शॉर्टकट दिख रहे हैं

डेटा प्रारूप

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

सीढ़ीदार श्रेणियाँ

उलझी हुई श्रेणी-व्यवस्था के लिए एक के अंदर एक लेबल इस्तेमाल कीजिए:

yaml
annotation_schemes:
  - annotation_type: radio
    name: main_category
    description: "Primary category"
    labels:
      - Apparel
      - Electronics
      - Home
 
  - annotation_type: radio
    name: subcategory
    description: "Subcategory"

इमेज की गुणवत्ता आँकना

वर्गीकरण के साथ-साथ गुणवत्ता की जाँच जोड़िए:

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

इमेज की आगे की सेटिंग

इमेज कैसे दिखे, इसे और बारीकी से बदलने के लिए अपनी annotation scheme में image_annotation प्रकार कॉन्फ़िगर कीजिए और ज़रूरत के मुताबिक़ CSS या अपनी styling इस्तेमाल कीजिए।

पूरा उदाहरण

यह रहा असल इस्तेमाल लायक कॉन्फ़िगरेशन:

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
 
  - 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
    label_requirement:
      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
    label_requirement:
      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

इमेज एनोटेशन के लिए सुझाव

रंग और चमक हर मॉनिटर पर अलग दिखते हैं, इसलिए जहाँ इनसे फ़र्क़ पड़ता हो वहाँ यह पक्का कीजिए कि एनोटेटर ठीक-ठाक कैलिब्रेट की गई स्क्रीन पर हैं। श्रेणियों को शब्दों में समझाने के बजाय दिशानिर्देशों में उदाहरण इमेज लगाइए; एक तस्वीर पूरे पैराग्राफ़ से ज़्यादा बहस निपटा देती है। दुविधा वाली इमेज का क्या करना है, यह लिखकर रखिए, क्योंकि दुविधा वाली इमेज आएँगी ज़रूर। और बीच-बीच में पूरी टीम से एक ही बैच पर लेबल लगवाकर मिलाइए, ताकि बहकाव जल्दी पकड़ में आ जाए।

लागू करने के ब्योरे के लिए इमेज एनोटेशन दस्तावेज़ देखें।

अगले क़दम


इमेज एनोटेशन के पूरे दस्तावेज़ छवि एनोटेशन पर हैं।