Skip to main content

Upload Datasets

Let's start by creating a project and setting up our datasets for identifying product defects.

Step 1: Create a New Project

First, let's create a dedicated project for our defect detection system:

  1. Navigate to the Projects section
  2. Click Create Project
  3. Enter a descriptive name (e.g., "Product Defect Detector")
  4. Add an optional description explaining the purpose
  5. Click Create to generate your project

Create Project Creating a new project for defect detection

Step 2: Create Training Dataset

Now, let's create a dataset for training our defect detection model:

  1. Inside your new project, go to the Datasets tab
  2. Click the Create Dataset button
  3. Fill in the following information:
    • Name: "Product_Defects_Training"
    • Type: "Object Detection" (since we want to locate defects within images)
    • Description: "Training images of products with labeled defects"
  4. Click Create to create the dataset

Create Training Dataset Creating the training dataset for defect detection

Step 3: Create Validation Dataset

Similarly, create a validation dataset to evaluate your model during training:

  1. Still in the Datasets tab, click Create Dataset again
  2. Enter these details:
    • Name: "Product_Defects_Validation"
    • Type: "Object Detection" (same as training dataset)
    • Description: "Validation images for testing defect detection accuracy"
  3. Click Create

Important: The validation dataset helps prevent overfitting. For defect detection, make sure your validation images:

  • Include different products than your training set
  • Represent approximately 20-30% of your total data
  • Include examples of all defect types you want to detect
  • Capture different lighting conditions and angles

Validation Dataset The validation dataset appears in your datasets list

Step 4: Add Images to Datasets

For defect detection training, you need images of products with and without various defect types:

Option 1: Use Your Own Product Images

If you have images of your products with defects:

  1. Open your "Product_Defects_Training" dataset
  2. Click the Add Images button
  3. Upload images from your computer showing:
    • Products with scratches
    • Products with dents or deformations
    • Products with discoloration
    • Products without defects (for negative examples)
  4. Aim for at least 50 images total, with examples of each defect type
  5. For your validation dataset, upload 15-20 different images with similar defect categories

Option 2: Use Sample Data

If you don't have suitable product images yet:

  1. In each dataset, click the Import Sample Data option (if available)
  2. Choose the "Manufacturing Defects" sample collection
  3. The system will import pre-labeled images of products with various defects

Adding Images Uploading product images with and without defects

Step 5: Configure Defect Labels

For our defect detection model, we need to define the types of defects we want to detect:

  1. Within your training dataset, go to the Labels tab
  2. Click the Create Label button
  3. Create the following defect categories:
    • Name: "Scratch"
      • Type: "Bounding Box"
      • Color: Red (or your preference)
    • Name: "Dent"
      • Type: "Bounding Box"
      • Color: Blue
    • Name: "Discoloration"
      • Type: "Bounding Box"
      • Color: Green
  4. Add additional defect types specific to your products if needed
  5. Apply the same label configuration to your validation dataset

Label Configuration Configuring labels for different defect types

Step 6: Label Your Product Images

Now you'll identify and mark defects in your product images:

  1. Open your training dataset
  2. Click on an image to enter the labeling interface
  3. Click Start Labeling
  4. For each defect in the image:
    • Select the appropriate defect type (e.g., "Scratch", "Dent")
    • Draw a bounding box around the defect:
      • Click and drag to create a rectangle that fully encloses the defect
      • Make the box as tight as possible while including the entire defect
    • If an image has multiple defects, label each one separately
    • If an image has no defects, you don't need to add any boxes
  5. Continue labeling all images in both training and validation datasets

Pro Tips for Defect Labeling:

  • Be consistent in how you draw bounding boxes
  • If a defect extends to the edge of the product, include the entire visible portion
  • Label even small or subtle defects - the model needs to learn these
  • Take breaks during labeling to maintain accuracy and attention to detail

Labeling Interface Labeling defects on product images

Step 7: Review Your Defect Datasets

Before proceeding to model creation, review both datasets to ensure quality:

  1. Check that all images are properly labeled
  2. Verify that you have sufficient examples of each defect type
  3. Make sure your validation set represents the same types of defects as your training set
  4. Look for any inconsistencies in labeling approach and correct them

For defect detection specifically, check if:

  • Defect categories are balanced (you have enough examples of each type)
  • A variety of defect sizes are represented (small, medium, large)
  • Both obvious and subtle defects are included
  • The boundaries of defects are accurately marked

Dataset Review Reviewing the labeled defect dataset