Surface defect detection method and system thereof
Patent Information
- Application Number
- TW114133933
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2045-09-03
Smart Images

Figure TWG2TB001909025_001 
Figure TWG2TB001909025_002 
Figure TWG2TB001909025_003
Abstract
Claims
1. A surface defect detection method, executed by a computer device, comprising: An object detection model is used to find at least one region of interest (ROI) in an image corresponding to a defect, thereby cropping the image to obtain a partial image corresponding to the at least one ROI, wherein the image is obtained by a camera device capturing an image of a surface of an object under test; an anomaly detection model is used to score each pixel of the partial image to generate a visualization image, wherein the visualization image includes the partial image and an anomaly score for each pixel of the partial image; and a classifier is used to score the visualization image to generate a defect score; The object detection model is obtained through a pre-training phase. During the training phase, the input of the object detection model is a plurality of historical defective images, and the output of the object detection model is a coordinate corresponding to each of the at least one region of interest of each of the historical defective images and its corresponding confidence index. After receiving the historical defective images, the object detection model first performs an image preprocessing on each of the historical defective images. The image preprocessing includes at least one of the following: image rotation, image contrast adjustment, image scaling, and image stitching.
2. The surface defect detection method as described in claim 1, wherein the visualized image is a heat map.
3. The surface defect detection method as described in claim 1, wherein the visualized image is a histogram.
4. The surface defect detection method as described in claim 1 further includes: The defect score is compared with a threshold to determine whether the test item is a qualified product, wherein the defect includes at least one of the following: scratch, abrasion, dent, stain.
5. The surface defect detection method as described in claim 1, wherein the anomaly detection model is trained using an autoencoder implemented with an unsupervised learning algorithm.
6. The surface defect detection method as claimed in claim 5, wherein in a training phase of the anomaly detection model, the input of the anomaly detection model is a plurality of historical normal images, and the output of the anomaly detection model is a plurality of visualization training images, the visualization training images including the historical normal images and the anomaly score for each pixel of each of the historical normal images.
7. The surface defect detection method as claimed in claim 1, wherein the classifier is obtained by a training phase in advance, and in the training phase of the classifier, the input of the classifier is the historical defect images and a plurality of historical normal images, and the output of the classifier is the defect score of each of the historical defect images and the historical normal images.
8. A surface defect detection system, comprising: A camera device for capturing an image of a surface of an object to be measured; The system also includes a computer device communicatively connected to the camera device and configured to: use an object detection model to locate at least one region of interest (ROI) in the image corresponding to a defect, thereby cropping the image to obtain a partial image corresponding to the at least one ROI; use an anomaly detection model to score each pixel of the partial image to generate a visualization image, the visualization image including the partial image and an anomaly score for each pixel of the partial image; and use a classifier to score the visualization image to generate a defect score. The object detection model is obtained through a pre-training phase. During the training phase, the input of the object detection model is a plurality of historical defective images, and the output of the object detection model is a coordinate corresponding to each of the at least one region of interest of each of the historical defective images and its corresponding confidence index. After receiving the historical defective images, the object detection model first performs an image preprocessing on each of the historical defective images. The image preprocessing includes at least one of the following: image rotation, image contrast adjustment, image scaling, and image stitching.
9. The surface defect detection system as described in claim 8, wherein the visualization image is a heat map or a histogram.
Citation Information
Patent Citations
Industrial part surface defect detection method and system based on anomaly detection algorithm
CN113902710A
Plastic package food package multi-area defect detection method based on U-net network and improved DRA model
CN117635555A
Semi-supervised cell defect segmentation method and device
CN118365655A
Defect detecting apparatus and method
TW202349331A
Defect detection method and apparatus
US20240005469A1