Citation: Chen, X.; Lv, J.; Fang, Y.;
Du, S. Online Detection of Surface
Defects Based on Improved YOLOV3.
Sensors 2022, 22, 817. https://
doi.org/10.3390/s22030817
Academic Editor: Xinyu Li
Received: 31 December 2021
Accepted: 19 January 2022
Published: 21 January 2022
Publisher’s Note: MDPI stays neutral
with regard to jurisdictional claims in
published maps and institutional affil-
iations.
Copyright: © 2022 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).
Article
Online Detection of Surface Defects Based on Improved YOLOV3
Xuechun Chen
1
, Jun Lv
2
, Yulun Fang
1
and Shichang Du
1,
*
1
School of Mechanical Engineering, Shanghai Jiao Tong University, Shanghai 200240, China;
cxc1997@sjtu.edu.cn (X.C.); fyl1997@sjtu.edu.cn (Y.F.)
2
Faculty of Economics and Management, East China Normal University, Shanghai 200240, China;
jlv@dbm.ecnu.edu.cn
* Correspondence: lovbin@sjtu.edu.cn
Abstract:
Aiming at the problems of low efficiency and poor accuracy in the product surface defect
detection. In this paper, an online surface defects detection method based on YOLOV3 is proposed.
Firstly, using lightweight network MobileNetV2 to replace the original backbone as the feature
extractor to improve network speed. Then, we propose an extended feature pyramid network (EFPN)
to extend the detection layer for multi-size object detection and design a novel feature fusing module
(FFM) embedded in the extend layer to super-resolve features and capture more regional details. In
addition, we add an IoU loss function to solve the mismatch between classification and bounding box
regression. The proposed method is used to train and test on the hot rolled steel open dataset NEU-
DET, which contains six typical defects of a steel surface, namely rolled-in scale, patches, crazing,
pitted surface, inclusion and scratches. The experimental results show that our method achieves a
satisfactory balance between performance and consumption and reaches 86.96% mAP with a speed
of 80.96 FPS, which is more accurate and faster than many other algorithms and can realize real-time
and high-precision inspection of product surface defects.
Keywords: surface defect detection; YOLOV3; multi-scale detection
1. Introduction
In the process of industrial production, due to the influence of technological processes,
production equipment and site environment, there will be various defects on the product
surface. Surface defects not only affect the appearance quality and commercial value of the
product itself but also affect the performance of the product and also affect the safety and
stability of subsequent deep processing [
1
]. Therefore, surface defect detection has become
a crucial step in industrial production. At present, most detection tasks are completed
manually, which has disadvantages of high management difficulty, poor stability, high
cost, low efficiency, and low accuracy, and is difficult to meet the demands of automated
production of modern enterprises [2].
The defect detection based on machine vision has the advantages of high precision,
high efficiency, strong stability, and secondary damage prevention, which provides an
optimal scheme for online inspection. Therefore, replacing human eyes with machines
has become a trend in industrial surface defect inspection and has been applied in many
industrial fields (steel, road, wood, optical components). The existing research on surface
defect detection methods can be roughly divided into two categories: a traditional method
based on display feature extraction and a deep learning method based on automatic
feature extraction. The former is to identify defects by analyzing texture characteristics
and extracting features manually, which can be traced back to the 1980s and has rich
research achievements. The deep learning method was proposed by Hinton et al. [
3
],
which was successfully applied in the classical image classification task. In the case of
sufficient samples, the identification accuracy, robustness and anti-interference ability of
deep learning method are far superior to traditional algorithms. Compared with traditional
Sensors 2022, 22, 817. https://doi.org/10.3390/s22030817 https://www.mdpi.com/journal/sensors