Skip to main content
Log in

A fast button surface defect detection method based on Siamese network with imbalanced samples

  • Published:
Multimedia Tools and Applications Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Similar content being viewed by others

References

  1. Cao J, Zhang J, Wen Z (2017) Fabric defect inspection using prior knowledge guided least squares regression. Multimed Tools Appl 76(3):4141–4157

    Article  Google Scholar 

  2. 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

  3. Ç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

    Article  Google Scholar 

  4. 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

    Article  Google Scholar 

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

    Article  Google Scholar 

  10. 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

  11. 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

    Article  Google Scholar 

  12. 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

    Article  Google Scholar 

  13. 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

    Article  Google Scholar 

  14. 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

  15. 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

    Article  Google Scholar 

  16. 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

  17. 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

  18. Park Y, Kweon IS (2016) Ambiguous surface defect image classification of AMOLED displays in smartphones. IEEE Transactions on Industrial Informatics 12(2):597–607

    Article  Google Scholar 

  19. 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

    Article  Google Scholar 

  20. 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

    Article  Google Scholar 

  21. 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

  22. 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

    Article  Google Scholar 

  23. Tajeripour F, Kabir E, Sheikhi A Fabric defect detection using modified local binary patterns. EURASIP Journal on Advances in Signal Processing 2008, 2008:60

  24. Tax DM, Duin RP (1999) Data domain description using support vectors. In: ESANN. pp 251–256

  25. 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

    Article  Google Scholar 

  26. 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

  27. 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

  28. 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

    Article  Google Scholar 

  29. 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

    Article  Google Scholar 

  30. 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

  31. 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

    Article  Google Scholar 

  32. 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

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Danhua Cao.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11042-019-08042-w

Keywords

Navigation