# Steel Surface Defect Detection Algorithm Based on Improved YOLOv8n
## 1 Introduction  
Nowadays, our country vigorously develops new industries, vigorously promotes industry, and its information business is a very important asset. In steel production processes, the detection of surface defects is a very critical part, as it is related to the quality of the entire industrial products and production safety aspects. Steel is extensively employed in many fields, including, in the past few years in our country, the rapidly developing aerospace and aviation industry, the oil industry, the automobile industry, the shipbuilding industry, the large-scale equipment industry, and other important industrial areas. Steel surface defects in these important industry areas are very important and have an immediate impact on the caliber of the industrial goods we produce and manufacture out of the finished product quality. If the quality of the finished product is poor, the economy will suffer. Therefore, it is urgent to improve the accuracy of steel surface defect detection. Current surface defect detection methods fall into one of three categories: deep-learning-based, traditional-technology-based, and machine vision methods. These include manual inspections using magnetic particles, eddy currents, vision, and visible light inspection. Artificial visual inspection consists of checking the appearance or performance defects of the product by visual or tactile means, and the shortcomings of artificial visual inspection are also very obvious, e.g., too subjective, low efficiency, and the influence of external factors. The eddy-current-based inspection method is a non-destructive surface defect detection method. If there are some common defects on the steel surface, these defects will change the distribution of eddy currents and the characteristics of the magnetic field, so that the defects can be identified and localized by detecting changes in the magneticfield. However, when it comes to the detection of more complex defects, eddy current detection has relatively low sensitivity and also needs experienced technicians to interpret and analyze the data; therefore, from another economic point of view, the labor cost is relatively high. Magnetic particle inspection is widely used in welding, manufacturing, foundry, aerospace, and other fields relying on steel production. It can be used to detect cracks, inclusions, porosity, fatigue cracks, and other defects on the steel surface. It has the advantage of being fast, economical, easy to operate, and able to identify items of various sizes and shapes. The disadvantage of magnetic particle inspection is that it is only applicable to materials with magnetic properties, and it does not work for the defect detection of non-magnetic materials. It may be difficult to implement with respect to parts characterized by complex surface shapes. Machine vision surface defect detection is a method that combines algorithms and vision techniques. The input image is processed by a computer to achieve fast and accurate recognition and localization of defects. The visual light inspection method is a commonly used method for detecting surface defects on steel, such as dents, blemishes, and scratches. It usually involves the use of a light source and optical equipment to observe and record an image of the surface of the material being inspected. The advantage is that it is relatively fast, especially for single-object detection. The disadvantage is that it mainly depends on the subjective judgment and experience of the observer when detecting the surface defects of steel which will be greatly affected by human factors, and the detection accuracy is low for tiny objective or hidden defects. Machine vision defect detection is frequently used to identify and detect defects on the surface of objects. It processes and analyzes the image by computer to achieve fast and accurate recognition and localization of defects. Compared with the traditional manual visualization technology, defect detection by machine vision includes the advantages of quick speed and good versatility.