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:
- Navigate to the Projects section
- Click Create Project
- Enter a descriptive name (e.g., "Product Defect Detector")
- Add an optional description explaining the purpose
- Click Create to generate your 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:
- Inside your new project, go to the Datasets tab
- Click the Create Dataset button
- 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"
- Click Create to create the dataset
Creating the training dataset for defect detection
Step 3: Create Validation Dataset
Similarly, create a validation dataset to evaluate your model during training:
- Still in the Datasets tab, click Create Dataset again
- Enter these details:
- Name: "Product_Defects_Validation"
- Type: "Object Detection" (same as training dataset)
- Description: "Validation images for testing defect detection accuracy"
- 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
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:
- Open your "Product_Defects_Training" dataset
- Click the Add Images button
- Upload images from your computer showing:
- Products with scratches
- Products with dents or deformations
- Products with discoloration
- Products without defects (for negative examples)
- Aim for at least 50 images total, with examples of each defect type
- 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:
- In each dataset, click the Import Sample Data option (if available)
- Choose the "Manufacturing Defects" sample collection
- The system will import pre-labeled images of products with various defects
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:
- Within your training dataset, go to the Labels tab
- Click the Create Label button
- 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
- Name: "Scratch"
- Add additional defect types specific to your products if needed
- Apply the same label configuration to your validation dataset
Configuring labels for different defect types
Step 6: Label Your Product Images
Now you'll identify and mark defects in your product images:
- Open your training dataset
- Click on an image to enter the labeling interface
- Click Start Labeling
- 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
- 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 defects on product images
Step 7: Review Your Defect Datasets
Before proceeding to model creation, review both datasets to ensure quality:
- Check that all images are properly labeled
- Verify that you have sufficient examples of each defect type
- Make sure your validation set represents the same types of defects as your training set
- 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
Reviewing the labeled defect dataset