I. Introduction
In the manufacturing industry, the products often suffer from a lot of surface defects, such as scratches, cracks, and pores, which may reduce their strength and hurt their quality. Therefore, detection of surface defects has become one of the most crucial processes in industry. However, it is a pity that at present, many factories still perform manual inspections, which are time-consuming, subjective, low-efficiency, and low-accuracy. Thence, it is necessary to develop an automatic detection system of surface defects to improve their efficiency and reliability.