# Metal Surface Defect Detection Using Modified YOLO
## 4 Experiments and Results
### Hardware Using for Detection  
The experimental platform of this paper uses Ubuntu 20.04 operating system, equipped with CPU [EMAIL_ADDRESS] Ghz, GPU NVIDIA RTX3090 and 64 GB running memory, installed CUDA 10.0 and CUDNN 8.0.5 to speed up the GPU computing.  
**Camera Selection**. The defect detection based on machine vision has a high requirement on image quality. Generally, the image quality collected by a common camera is poor, the detection effect may not be very ideal. A series of issues such as resolution, frame rate, transmission speed, and economic cost should be taken into consideration in the selection of the camera used in this experimental platform.  
Compared with complementary metal oxide semiconductor (CMOS) cameras of the same size, charge coupled device (CCD) cameras have higher resolution and much less noise. Based on the above factors, this paper finally chooses MV-EM series CCD industrial cameras. The highest pixel of this series camera can reach 14 million. The image information is transmitted by stable gigabit Ethernet, and the transmission function is not affected even if the network is disconnected. In addition, MV-EM series CCD industrial cameras are widely used in industrial manufacturing, workpiece measurement, target detection, agricultural machine vision detection, medical imaging, scientific research, and many other machine vision applications. They all have good performance.  
Two CCD industrial cameras, MV-EM120C and MV-EM200C, are preselected in the experiment. The specific parameters are shown in Table 1.  
The choice of CCD camera should be based on the accuracy of the object, which needs to be observed, to determine the resolution. In a dynamic capturing detection target, the field of vision in one direction should be slightly larger than the size of the detection target, to avoid incomplete image information. In static target acquisition, the  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & **MV-EM120C** & **MV-EM200C** \\ \hline Highest Resolution & \(1280\times 960\) & \(1600\times 1200\) \\ Pixel Size & \(3.75\times 3.75\) & \(4.4\times 4.4\) \\ Sensor Type & CCD & CCD \\ Frame Rate & 30 FPS & 20 FPS \\ Memory & 128 M & 128 M \\ Time of Exposure & 10 us–0.2 s & 10 us–0.2 s \\ Output Color & Color & Color \\ Data Bits & 12 & 14 \\ Exposure Method & Frame Exposure & Frame Exposure \\ Weight & 65 g & 65 g \\ \hline \hline \end{tabular}
\end{table}
Table 1: Compared with MV-EM120C and MV-EM200C.  
Figure 3: The process of the defect detection.  
closer to the detection target size is better under the condition that the light source is adjusted. In this way, the image acquired has higher accuracy and less postprocessing. The real object of defect detection is 80 mm and the maximum width is 50 mm, which requires us to put forward requirements in the selection of industrial cameras. To achieve a better detection effect, the detection accuracy is considered to be 0.5 mm. In addition, MV-EM200C CCD industrial camera adopts the mode of frame exposure and belongs to the plane array camera. Its frame rate, pixel size, optical size, and other performances can meet the requirements of target detection on the general industry 4.0 assembly line. Finally, this paper selects the MV-EM200C camera, as shown in Figure 4.  
**Light Source Selection**. The choice of the light source is also very important in defect detection based on machine vision. Table 2 shows the characteristics of various common light sources.  
Among them, in addition to the advantages described in Table 2, LED lights can also be combined into various shapes. Through the comparison test of the actual light source, the image acquisition effect is better when the LED ring light is used to illuminate the front side. The LED ring light source is shown in Figure 4.  
Through the overall design of the system described above and the selection and analysis of related equipment used in the image acquisition module, this paper deploys the whole system and carries out experiments on the system.