Collect the Training Data

Check the Data Collection Environment

Please see Collect the Training Data for details about setting up the image data collection environment.

Attention

Image classification model is susceptible to changes in lighting conditions. When collecting data, please keep the lighting conditions consistent throughout the process. If the on-site lighting conditions change over the day, image data should be collected respectively under different conditions.

Quantity of Data to Collect

  • The recommended quantity is 20 images for each class.

Object Placing for Data Collection

All different placing conditions should be included in the dataset, and the number of images for each placing condition should be reasonably allocated based on the actual project conditions.

For example, if the objects come in horizontal and vertical poses in the actual application, but only images of horizontal incoming objects are collected and used for training, then the resulting model’s performance on the vertical objects cannot be guaranteed.

Therefore, when collecting data, please take all circumstances in the actual application into consideration as much as possible. Factors include the following:

  • All object orientations that may appear in the actual application;

  • All object positions that may appear in the actual application.

  1. Orientations

    ../../../_images/collection_method_1.png
    ../../../_images/collection_method_2.png
    ../../../_images/collection_method_3.png

    Figure 1. Different orientations

  2. Positions

    ../../../_images/collection_method_4.png
    ../../../_images/collection_method_5.png

    Figure 2. Different positions

Use Mech-Vision to Collect Data

After checking the data collection environment, determining the data quantity to collect, and listing all the possible ways of object placing, please collect the data following the instructions in Use Mech-Vision to Collect Data.

Data Collection Examples from Past Projects

Valve, single class

  • The front and back faces of the valve need to be distinguished.

  • Valves’ positions vary relatively slightly.

  • 10 images for the front face and 10 for the back collected.

    ../../../_images/project_case.png

    Figure 3. Front and back faces of the valve

Engine valve, single class

  • Need to determine whether an engine valve is correctly placed in a slot.

  • If not in a slot, an engine valve may be in a variety of poses, so different positions and orientations need to be considered for data collection. Therefore, about 20 images need to be collected for this case.

  • If in a slot, an engine valve may be in different positions, but can only be in one of two orientations (as shown in Figure 4). Therefore, about 10 images need to be collected for this case.

    ../../../_images/project_case_2.png

    Figure 4. Engine valve in a slot and not in a slot

Sheet metal parts, two classes

  • Object size needs to be distinguished.

  • Objects may be in different positions and orientations.

  • 20 images collected for the front face and 20 for the back.

    ../../../_images/project_case_3A.png
    ../../../_images/project_case_3B.png

    Figure 5. Front & back faces of sheet metal parts