Chapter 2. Creating a dataset for DML
Input the dataset name from “NEW DATASET”, and create a new dataset.
[Explanation of table]
|Dataset Name||Name of the dataset|
|Dataset ID||ID of the dataset|
|Owner Name||User name who created the dataset|
|Sample Image||Display of newest stored image of the dataset|
|Plan||Contract service plan for the dataset|
Free: No charge
Pay-per-use: 0.01 US$/time
Light: 400 US$/monoth
Standard: 1,200 US$/month
|Plan Setting User||User name who created the plan for the dataset|
|API Call Status||API call status for the dataset|
Available: API call available
Not available: API call not available
Restricted: API call not available (temporarily suspended)
|Training Data||Number of training image data items stored in the dataset|
|Test Data||Number of test image data items stored in the dataset|
|AI Model Status||Creation status of the AI model for the dataset|
・No AI model exists
・Learning in progress
・AI model creation complete
・Test in progress
2-1. Image storage for creating and checking an AI model
From the “AI MODEL” tab, store normal/anomalous images for use in training or testing.
[Explanation of image storage button]
|Normal Training image||Store normal image for training in the dataset|
|Anomalous Training image||Store anomalous image for training in the dataset|
|Normal Test image||Store normal image for testing in the dataset|
|Anomalous Test image||Store anomalous image for testing in the dataset|
|Delete ALL Data||Delete all stored images in the dataset|
[Prescribed number of images]
|Minimum number of images||Maximum number of images|
|Normal Train Image||20 images||Free：100 images
|Anomalous Train Image||5 images|
|Normal Test Image||Total: 1 images|
|Anomalous Test Image|
Note 1) High-resolution image data is resized automatically to a resolution of 800px or less because it takes time to create an AI model.
Note 2) Images cannot be uploaded in excess of the maximum number.
Note 3) More than 100 images cannot be uploaded at one time.
Stored images can be checked from the “Img” image icon.
When an anomalous image for training has been stored, select the cell with the anomalous part using the “Select” button for cellSelected.
Select the one cell thought to be most anomalous.
2-2. Setting inspection range
If image data contains regions unnecessary for inspection, or you want to perform partial inspection, there are two available methods: one where the user prepares and uploads processed images trimmed to the just the part for inspection, and another where the inspection range is set with the ADFI service.
The trouble of processing images beforehand can be eliminated by designating the inspection range with ADFI.
Select the “INSPECTION RANGE SETTING” tab, and select the inspection range from the displayed sample image. This inspection range is applied to all images uploaded in the same dataset.
|Clear Range||Resets the display to the inspection range saved for the dataset|
|Save Inspection Range||Saves the selected inspection range for the dataset|
Note 1) Coordinates of the inspection range are displayed as rates, with a minimum value of 0 and maximum value of 1.
Note 2) The inspection range can be set before creating an AI model. If you want to set the inspection range again, first delete the AI model.
2-3. AI model creation and re-learning
After storing image data for at least the prescribed minimum number of images, the next step is creation of an AI model.
Select the “Create AI Model” button at the “AI MODEL” tab.
|Create AI Model||Creates an AI model for the inspection range part of the images stored in the dataset|
|Delete AI Model||Deletes AI model created for the dataset|
|Re-training||Performs re-learning and testing of the AI model for the dataset|
|Test||Performs testing using the AI model created for the dataset|
The status of AI model creation at this time can be checked with AI Model Status under Dataset Detail.
Creation of the AI model takes about 10 minutes to 1 hour.
Also, if you want to change the image data for training after creating an AI model, and reflect that in learning results, perform re-learning of the AI model with “Re-Training”.
2-4. AI model testing and judgment threshold setting
AI model learning results are checked, and the threshold values for determining whether a product is good or defective are set, by using the normal/anomalous images for testing.
Select the “Test” button on the “AI MODEL” tab, or select the “Test” button on the “TEST” tab.
Test progress can be checked with “AI Model Status.”
|Number of images||Number of test images for the dataset|
|Correct Answers(main)||Correct answers of main threshold for the dataset (number of times normal/anomalous was correctly judged)|
|Accuracy(main)||Accuracy of main threshold for the dataset (rate at which normal/anomalous was correctly judged)|
|Recall(main)||Recall of main threshold for the dataset (rate at which anomaly was detected for anomalous images)|
|Precision(main)||Precision of main threshold for the dataset (rate at which images detected as anomalous were actually anomalous images)|
|Correct answers(sub)||Correct answers of sub threshold for the dataset (number of times normal/anomalous was correctly judged)|
|Accuracy(sub)||Accuracy of sub threshold for the dataset (rate at which normal/anomalous was correctly judged)|
|Recall(sub)||Recall of sub threshold for the dataset (rate at which anomaly was detected for anomalous images)|
|Precision(sub)||Precision of sub threshold for the dataset (rate at which images detected as anomalous were actually anomalous images)|
After testing the AI model, set the judgment thresholds.
When the “AI MODEL SETTING” tab is selected, an image of the designated inspection range is displayed.
Two judgment thresholds, TM and TS, can be selected.
* TM: Threshold (main), TS: Threshold (sub)
By setting the two thresholds to different values, they can be used as follows.
- The judgment is “Anomaly” if the judgment result exceeds the TM threshold.
- The judgment is “Not-clear” if the judgment result is between the TM and TS thresholds. (Re-inspection is done visually.)
- The judgment is “Normal” if the judgment is below the TS threshold.
Note 1) There is no problem even if the large-small relationship of the TM and TS values is reversed.
Note 2) The default values for TM and TS are set as follows. TM: 0.5, TS:0.4
Set TM and TS by referring to the histogram for “AI MODEL SETTING”.
If the “Set Auto Threshold” button is selected, the optimal threshold is set based on test results.
After setting thresholds, there is no need for re-learning the AI model.
Also, if a test image is opened from the “Img” icon on the “AI MODEL” tab, a heat map of the interesting area of AI will be displayed. If the anomalous part of the anomalous image can be detected correctly, the anomalous part will be the reddest. Check that it is red in the heat map.
Even in the heat map of the normal image, the red area is displayed in the place where the AI is paying attention, but if it does not exceed the judgment threshold, it is judged as normal, so there is no problem.
Left: Original image, Right: Heat map of test results