Abstract
Surface defect detection for button is a tough task because of complex surface texture, variety of defects, and limited defect samples which often leads to an imbalanced issue. Aiming at solving these problems, a similarity metric method based on Siamese network is proposed for detecting defects of button and applied in a practical machine-vision-based system. In our system, the Siamese network with a specifically designed loss function is used for automatic feature extraction and similarity metric of samples. The learning process minimizes the specific loss function, which drives intra-class distance among positives to be smaller and inter-class distance to be larger in the feature space, so that after training, defect-free samples are clustered while defect samples are mapped to outliers. The proposed method is evaluated on button datasets of multiple kinds of defects including dent, crack, stain, hole, uneven etc. Experimental results show 98% detection precision for the proposed method, and 95% detection precision when dealing with imbalance issue, indicating its advantage over conventional methods. Comparison experiments show that for our task, the proposed loss function outperforms other recent published loss functions in face recognition or ReID field. Moreover, we optimize our method with different strategies. Our method reaches 6 fps detection speed on an embedded DSP platform, indicating its potential in providing an effective approach for online detection on production.













Similar content being viewed by others
References
Cao J, Zhang J, Wen Z (2017) Fabric defect inspection using prior knowledge guided least squares regression. Multimed Tools Appl 76(3):4141–4157
Capizzi G, Sciuto GL, Napoli C, Tramontana E, Woźniak M (2015) Automatic classification of fruit defects based on co-occurrence matrix and neural networks. In: Computer science and information systems (FedCSIS), 2015 federated conference on. IEEE, pp 861–867
Çelik H, Dülger L, Topalbekiroğlu M (2014) Development of a machine vision system: real-time fabric defect detection and classification with neural networks. The Journal of The Textile Institute 105(6):575–585
Cen Y-G, Zhao R-Z, Cen L-H, Cui L-H, Miao Z-J, Wei Z (2015) Defect inspection for TFT-LCD images based on the low-rank matrix reconstruction. Neurocomputing 149:1206–1215
Chauhan APS, Bhardwaj SC (2011) Detection of bare PCB defects by image subtraction method using machine vision. In: Proceedings of the world congress on engineering. pp 6–8
Chellapilla K, Puri S, Simard P (2006) High performance convolutional neural networks for document processing. In: Tenth International Workshop on Frontiers in Handwriting Recognition. Suvisoft
Chopra S, Hadsell R, LeCun Y (2005) Learning a similarity metric discriminatively, with application to face verification. In: computer vision and pattern recognition. CVPR 2005. IEEE computer society conference on, 2005. IEEE, pp 539–546
Glorot X, Bordes A, Bengio Y (2011) Deep sparse rectifier neural networks. In: Proceedings of the fourteenth international conference on artificial intelligence and statistics. pp 315–323
Han Y, Wu Y, Cao D, Yun P (2017) Defect detection on button surfaces with the weighted least-squares model. Frontiers of Optoelectronics 10(2):151–159
Hermans A, Beyer L, Leibe B (2017) In defense of the triplet loss for person re-identification. In: Proceedings of the IEEE conference on computer vision and pattern recognition
Jian C, Gao J, Ao Y (2017) Imbalanced defect classification for mobile phone screen glass using multifractal features and a new sampling method. Multimed Tools Appl 76(22):24413–24434
Jiang C, Quan Y, Lin X (2016) Defect detection of capacitive touch panel using a nonnegative matrix factorization and tolerance model. Appl Opt 55:2331–2338
Li W-b, Lu C-h, J-c Z (2013) A lower envelope weber contrast detection algorithm for steel bar surface pit defects. Opt Laser Technol 45:654–659
Lin J, Yao Y, Ma L, Wang Y (2018) Detection of a casting defect tracked by deep convolution neural network. Int J Adv Manuf Technol:1–9
Liu Y, Yu F (2014) Automatic inspection system of surface defects on optical IR-CUT filter based on machine vision. Opt Lasers Eng 55:243–257
Liu L, Cao D, Wu S, Wu Y, Wei T (2018) A fast button surface defects detection method based on convolutional neural network. In: 2017 international conference on optical instruments and technology: optoelectronic measurement technology and systems. International Society for Optics and Photonics, p 1062107
Natarajan V, Hung T-Y, Vaikundam S, Chia L-T (2017) Convolutional networks for vot-ing-based anomaly classification in metal surface inspection. In: Industrial Technology (ICIT), 2017 IEEE International Conference on IEEE, pp 986–991
Park Y, Kweon IS (2016) Ambiguous surface defect image classification of AMOLED displays in smartphones. IEEE Transactions on Industrial Informatics 12(2):597–607
Ren R, Hung T, Tan KC (2018) A generic deep-learning-based approach for automated surface inspection. IEEE transactions on cybernetics 48(3):929–940
Saimurugan M, Ramachandran K, Sugumaran V, Sakthivel N (2011) Multi component fault diagnosis of rotational mechanical system based on decision tree and support vector machine. Expert Syst Appl 38(4):3819–3826
Schroff F, Kalenichenko D, Philbin J (2015) Facenet: a unified embedding for face recognition and clustering. In: Proc IEEE Conf Comput Vis Pattern Recognit pp 815–823
Shanmugamani R, Sadique M, Ramamoorthy B (2015) Detection and classification of surface defects of gun barrels using computer vision and machine learning. Measurement 60:222–230
Tajeripour F, Kabir E, Sheikhi A Fabric defect detection using modified local binary patterns. EURASIP Journal on Advances in Signal Processing 2008, 2008:60
Tax DM, Duin RP (1999) Data domain description using support vectors. In: ESANN. pp 251–256
Wang T, Chen Y, Qiao M, Snoussi H (2018) A fast and robust convolutional neural network-based defect detection model in product quality control. Int J Adv Manuf Technol 94(9–12):3465–3471
Wen Y, Zhang K, Li Z, Qiao Y (2016) A discriminative feature learning approach for deep face recognition. In: European conference on computer vision. Springer, pp 499–515
Xiao Q, Luo H, Zhang C (2017) Margin sample mining loss: a deep learning based method for person re-identification. In: Proceedings of the IEEE conference on computer vision and pattern recognition
Xue-Wu Z, Yan-Qiong D, Yan-Yun L, Ai-Ye S, Rui-Yu L (2011) A vision inspection system for the surface defects of strongly reflected metal based on multi-class SVM. Expert Syst Appl 38(5):5930–5939
Yang Y, Zha Z-J, Gao M, He Z (2016) A robust vision inspection system for detecting surface defects of film capacitors. Signal Process 124:54–62
Ye D, Hong GS, Zhang Y, Zhu K, Fuh JYH (2018) Defect detection in selective laser melting technology by acoustic signals with deep belief networks. Int J Adv Manuf Technol:1–11
Yi L, Li G, Jiang M (2017) An end-to-end steel strip surface defects recognition system based on convolutional neural networks. steel research international 88(2):1600068
Zhou W, Fei M, Zhou H, Li K (2014) A sparse representation based fast detection method for surface defect detection of bottle caps. Neurocomputing 123:406–414
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Wu, S., Wu, Y., Cao, D. et al. A fast button surface defect detection method based on Siamese network with imbalanced samples. Multimed Tools Appl 78, 34627–34648 (2019). https://doi.org/10.1007/s11042-019-08042-w
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11042-019-08042-w