Performance Evaluation of Advanced Machine Learning Algorithms for Surface Defect Detection
摘要
Surface defects in metal or plastic products not only affect aesthetics but also threaten their functionality and durability. To address this challenge, automated detection of surface anomalies has become a prominent and influential area of academic research, particularly impacting applications in visual inspection. This study utilises a dataset of defective product images from the Kolektor Group, where the images were first read using a Python script and then uniformly scaled to 1000×500 using OpenCV. the images were also converted to greyscale for ease of image processing. Given the limited number of images in the dataset, Gaussian noise and Laplace noise are introduced to improve the image quality. Feature extraction was performed using the Histogram Gradient (HOG) algorithm followed by dimensionality reduction by Principal Component Analysis (PCA) to encode each image into a feature vector of length 30. Subsequently, ensemble learning models including Random Forest, ExtraTrees, GBDT, LightGBM and CatBoost were trained. The models were evaluated based on accuracy, precision, recall, F1 score, runtime, and memory usage. lightGBM proved to be highly accurate with millisecond runtimes, and its memory footprint of about 8000B makes it ideal for deployment on mobile devices.