A Comparison of Supervised Machine Learning Algorithms for Defective Pixel Detection
Detecting defective pixels in CMOS Image Sensors is a critical task for ensuring high-quality image acquisition, as even minor defects can significantly degrade performance in vision systems and downstream processing. This study evaluates the performance of several supervised machine learning algorithms for defective pixel detection using 300 grayscale images of 512×512 pixels from the publicly available TAMPERE17 dataset, in which dead and hot pixels were randomly introduced. The evaluated algorithms include k-Nearest Neighbors (kNN), Naïve Bayes, Decision Tree, Random Forest, Support Vector Machine (SVM), and Multilayer Perceptron. Performance was assessed using specificity, recall, precision, and the phi coefficient. A sensitivity analysis was additionally performed using neighborhood windows of 3×3, 5×5, and 7×7 pixels during feature extraction. The results showed that the neighborhood size has a noticeable impact on classification performance, with the best overall results obtained using an SVM classifier with an RBF kernel and a 3×3 feature extraction window. This configuration achieved a phi coefficient of 98.08%, together with a specificity of 99.00%, a recall of 99.00%, and a precision of 99.02%. Statistical analysis further indicated that SVM (RBF) and Multilayer Perceptron exhibited statistically comparable performance under the evaluated experimental conditions. The analysis further revealed that defective pixels are primarily characterized by highly local intensity variations, while larger neighborhoods do not necessarily improve classification performance. Compared with previously reported defective pixel detection methods, the proposed approach achieved highly competitive results and the highest phi coefficient among the evaluated methods. Additionally, the impact of defective pixel detection on image quality was assessed using a simple median filter correction stage and evaluated through Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index Measure (SSIM). The best-performing configuration achieved a PSNR of 40.96 dB and an SSIM of 98.68% after median filter correction, demonstrating substantial improvement over median filtering alone, although the resulting image quality remains below that of the best-performing state-of-the-art correction methods. The proposed framework provides reproducible reference results for evaluating supervised machine learning approaches to defective pixel detection while analyzing the influence of feature extraction window size on classification performance and reconstructed image quality.