Enhanced fabric stain detection via gabor-optimized saliency fusion and stability-driven thresholding
摘要
Fabric stain detection is crucial in the textile industry, yet challenging due to heterogeneous textures and low-contrast features. This study introduces a Gabor-optimized hybrid saliency and stability-driven thresholding method for automatic fabric stain detection. The Ivy optimization algorithm is employed to efficiently determine optimal Gabor filter parameters tailored to diverse fabric textures, thereby enhancing texture-aware feature extraction. Inspired by the human visual system’s sensitivity to contrast, a hybrid contrast enhancement mechanism integrating global and local contrast cues effectively highlights stain regions against complex fabric backgrounds. An automatic thresholding strategy, based on segmentation stability, ensures robust and adaptive stain detection. Evaluations on a pixel-level annotated dataset demonstrate superior performance across both pixel-level and image-level metrics, achieving balanced precision (95.14%), recall (81.22%), and accuracy (99.5%), and outperforming both traditional visual algorithms and deep learning models. The proposed method has been successfully deployed in an industrial laundry production line, validating its practical effectiveness and robustness. The code will be released at https://github.com/SwaggyPinqi12/HSSTalgorithm.