- 21 Jan 2025
- 2 Minutes to read
- Print
- DarkLight
- PDF
Create an anomaly model
- Updated on 21 Jan 2025
- 2 Minutes to read
- Print
- DarkLight
- PDF
This article describes the process for detecting anomalies by using non-anomalous good image samples. In this process, the model is trained using good images, eliminating the need to collect and label rare defect data before training. The output includes segmented regions that help to accurately identify and differentiate anomalies from other parts of the image.
Refer to the following video to create an anomaly segmentation model.
In the left navigation panel, navigate to Model Copilot > Anomaly Segmentation.
In the Anomaly Models screen, click New at the top-right corner to create a model project.
In the Create Anomaly Model window:
Enter Name and Description.
Under Clone from, you can select an existing model to clone the images and edit as needed.
Click Submit.
In the model project window, provide the Object name to identify the object in the images on which the anomalies will be detected. For example, if cracks and smudges on glass are the anomalies of interest, the object name must be specified as ‘glass’.
Upload good non-anomalous images and test images for the model training.
You can upload images from your local system or import images from the catalog.
Under the Spec tab, click the + (plus) icon against Good Images, and click Upload Images.
Click OK to get the good images.
Draw the Region of Interest (ROI) in the images where anomalies must be detected.
Click the rectangular icon adjacent to the pen icon on the top-left corner.
In the Draw region of interest screen, draw a polygon representing the area of interest that should be considered for anomaly detection.
Click a point on the image to start marking the box.
Click at different points on the image to form the polygon as the area of interest, as shown below.
Double-click to stop and close the polygon.
The same bounding box will be applied to all the images, indicating that the anomaly detection will now occur within the bounding box area, i.e., the region of interest.
Click SAVE > CONTINUE.
Under the Data tab, click the + (plus) icon against Test Images, and click Upload Images.
The anomaly model will be run on the test images to provide sample results to review and proceed.
Once the images are uploaded, click the Verbose icon to view details of the uploaded image files.
Click Continue.
The project screen displays both the good images and the test images.Review the images, and click SUBMIT.
In the Submit session window, specify the model parameters if needed.
Apply local constraints: Enable this if the anomaly is expected at the same location in every image.
For example, if all good images have a spot on the top left corner of the image and the test image has a spot on the bottom right corner of the image, then with location constraint applied, this will be flagged as an anomaly since the top left corner of good images is different from the top left corner in the test image.
Use visual features only: Enable this option to ignore any textual information, such as Object name, in the image during detection.
Click Submit..
This initiates an anomaly segmentation model training session, followed by generating inference results on the test images. It may take a few minutes up to hours to display the anomaly results, depending on the size of the test image set.