System and method for automatically detecting surface defects of hot rolled steel based on improved YOLOv8m

By improving the automatic detection system of hot-rolled steel surface defects combined with FasterNet and DLAK attention mechanisms, the problem of low manual detection efficiency is solved, efficient and accurate defect detection is achieved, and detection accuracy and adaptability are improved.

CN119310086APending Publication Date: 2025-01-14JIANGSU SHAGANG STEEL CO LTD +2
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411372514.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The surface defect detection of existing hot-rolled steel mainly relies on manual detection, and there are problems of slow detection speed and low accuracy.

Method used

Using an automatic detection system for surface defects of hot-rolled steel based on improved YOLOv8m, combined with FasterNet structure and DLAK attention mechanism, the image is collected in real time through line scanning cameras for detection, and the defect position is automatically identified by PLC controller and sprayer to reduce the subjectiveness of the human eye. improves detection efficiency and accuracy.

Benefits of technology

It realizes efficient and accurate detection of surface defects of hot-rolled steel, improves detection efficiency and accuracy, especially the adaptability to diversified small-target modes, and improves the detection accuracy of cracking defects, from 72.5% to 77.6% , basically meets practical application needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119310086A_ABST
    Figure CN119310086A_ABST
Patent Text Reader

Abstract

The invention discloses a hot rolled steel surface defect automatic detection system based on improved YOLOv8m. The system comprises an industrial personal computer, a PLC, a first sliding rail, a second sliding rail, a hot rolled steel detection table, a line scanning camera and a spraying machine. The line scanning camera moves forwards along with the first sliding rail, and meanwhile an image collected by the line scanning camera in real time is detected by calling a hot rolled steel surface defect detection algorithm through the industrial personal computer; if defects are detected, defect images and data are displayed in hot rolled steel surface defect detection software, meanwhile, defect position information is sent to a lower computer PLC through network communication, at the moment, the PLC recognizes the data, then a second sliding rail and an automatic spraying machine switch are controlled to conduct defect identification spraying, and then round-trip circulation detection is conducted. According to the detection system and the detection method, hot rolled steel defect detection and automatic mark spraying auxiliary work can be achieved, subjectivity of human eye detection is reduced, and detection efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hot-rolled steel surface defect detection, and in particular to an automatic hot-rolled steel surface defect detection system and a detection method based on improved YOLOv8m. Background Art

[0002] Hot-rolled steel is a commonly used metal material with high strength and good plasticity. It is widely used in the fields of automobiles, construction, ships, machinery manufacturing, etc. However, due to the influence of factors such as manufacturing equipment and processes, production environment, and materials, defects of different characteristics will form on the surface of hot-rolled steel, reducing the quality of steel and steel derivatives. At present, the surface defect detection of hot-rolled steel is mainly based on manual detection, which has problems such as slow detection speed and low accuracy. Summary of the invention

[0003] Purpose of the invention: The purpose of the present invention is to provide an automatic detection system and method for hot-rolled steel surface defects based on improved YOLOv8m, to realize hot-rolled steel defect detection and automatic spray marking auxiliary work, to reduce the subjectivity of human eye detection, and to increase detection efficiency and accuracy.

[0004] Technical solution: An automatic detection system for hot-rolled steel surface defects based on improved YOLOv8m, including:

[0005] Industrial computer: used to support image processing and algorithm operation;

[0006] PLC controller: real-time control of the rotation of the first and second slide rails to ensure that the relative position of the line scan camera and the automatic spraying machine remains correct;

[0007] The first slide rail and the second slide rail are used to support the line scan camera and the sprayer respectively, and ensure the stable movement of the line scan camera and the sprayer;

[0008] Hot-rolled steel testing table: used to place the steel to be tested;

[0009] Line scan camera: used to capture images of the steel surface;

[0010] Sprayer: After the defect is detected, it is used to spray and mark the defect location;

[0011] The line scan camera moves forward with the first slide rail, and the image collected in real time by the line scan camera is detected by the industrial computer calling the hot-rolled steel surface defect detection algorithm; if a defect is detected, the defect image and data are displayed in the hot-rolled steel surface defect detection software, and the defect position information is sent to the lower computer PLC controller through network communication. At this time, the PLC controller recognizes the data, and then controls the second slide rail and the automatic spray machine switch to spray the defect identification, and then performs a round-trip cycle detection.

[0012] Furthermore, the hot-rolled steel surface defect detection algorithm realizes real-time detection of hot-rolled steel surface defects by building a YOLOv8-C2f_Faster_DLKA detection model. The industrial computer can display the detection screen and defect results in real time, and add the detection results to the database table.

[0013] Furthermore, the FasterNet structure and DLAK attention mechanism module are introduced into the YOLOv8-C2f_Faster_DLKA detection model; the FasterNet structure includes 4 layers, each of which is preceded by an embedding layer or a merging layer, wherein the PConv layer and two 1×1 convolutional layers form a residual block, the middle layer expands the number of channels, and contains Shorcut to reuse input features;

[0014] The DLAK attention mechanism module adopts deformable convolution, adjusts the sampling grid integer offset and creates an offset field, and learns adaptive convolution kernels based on features.

[0015] An automatic detection method for hot-rolled steel surface defects based on improved YOLOv8m, applied to any of the above-mentioned hot-rolled steel surface defect detection systems, comprises the following steps:

[0016] S1, the line scan camera moves along the first slide rail to capture the image of the hot-rolled steel surface;

[0017] S2, the industrial computer performs defect detection on the image;

[0018] S3, if a defect is detected, the industrial computer displays the defect image and data, and sends the defect location information to the PLC controller;

[0019] S4, after receiving the defect position information, the PLC controller controls the second slide rail and the sprayer to move to the defect position for spraying;

[0020] S5, repeat steps S1 to S4 until all detection tasks are completed.

[0021] Compared with the prior art, the present invention has the following significant effects:

[0022] 1. The detection system of the present invention adopts PLC to control the double slide rails (camera and automatic sprayer) and cooperates with the detection software on the industrial computer to realize the hot-rolled steel defect detection and automatic spraying mark auxiliary work, so as to reduce the subjectivity of human eye detection and increase the detection efficiency and accuracy;

[0023] 2. The present invention is based on the improved YOLOv8m target detection model (i.e., the YOLOv8-C2f_Faster_DLKA detection model), by introducing the FasterBlock structure of FasterNet to replace the Bottleneck module of C2f in YOLOv8m, so that PConv (Partial Convolution) is simpler, and computational redundancy and memory access are reduced; the DLAK attention module is introduced, which relies on large convolution kernels to fully understand the context and operates within the receptive field of self-attention, so that the model can be more adaptable to diverse and small-target data patterns. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a schematic diagram of the structure of the detection system of the present invention;

[0025] Figure 2 Schematic diagram of different types of surface defects of hot rolled steel;

[0026] Figure 3 This is a PR diagram based on YOLOv8m training results;

[0027] Figure 4 This is a schematic diagram of the FasterNet network structure;

[0028] Figure 5 This is a schematic diagram of the DLAK attention mechanism structure;

[0029] Figure 6 This is a schematic diagram of the YOLOv8-C2f_Faster_DLKA network model structure;

[0030] Figure 7 This is a PR diagram based on the improved YOLOv8-C2f_Faster_DLKA network training results;

[0031] Figure 8 This is a schematic diagram of the Hikvision single camera detection display interface;

[0032] Fig. 9 This is a schematic diagram of the Hikvision dual-camera detection display interface;

[0033] Fig.10 This is a schematic diagram of the data set processing and model training interface;

[0034] Fig.11 This is a schematic diagram of the hot-rolled steel defect detection test interface;

[0035] Fig.12 Change the login interface diagram for administrators;

[0036] Fig.13This is a schematic diagram of the debugging assistant interface for network communication with the lower computer;

[0037] Fig.14 This is a schematic diagram of the interface displaying real-time detection results. DETAILED DESCRIPTION

[0038] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0039] like Figure 1 As shown, the detection system of the present invention includes three parts: overall hardware structure, industrial computer software and PLC end control software.

[0040] The overall hardware architecture mainly includes an industrial computer 1, a PLC controller 2, a first slide rail 3, a second slide rail 4, a hot-rolled steel inspection table 5, a line scan camera 6 and a sprayer 7. Among them, the industrial computer 1 can be configured with an optional GPU3060, 16G video memory, and 32G running memory; the line scan camera can be a Hikvision industrial camera (with a clear SDK development process); the slide rails can bear the loads of the line scan camera 5 and the automatic sprayer 7.

[0041] Industrial computer software: It is installed in the industrial computer 1, including the application development of line scan industrial cameras, using Hikvision's official SDK for image acquisition, parameter setting and other functions; designing the hot-rolled steel surface defect detection algorithm, integrating the detection method based on the improved YOLOv8 target detection algorithm into the software; communicating with the lower computer PLC controller 2 through the network to enable the line scan camera and spray machine to work together; displaying the real-time detection screen and defect results, adding the detection results to the database table, etc.

[0042] PLC control software: It is set in PLC controller 2 and communicates with the host computer through the network. It can control the rotation of the two slide rails in real time to ensure that the relative position of the line scan camera and the automatic sprayer remains correct. In addition, it can control the automatic sprayer to move to the defect position for spraying and marking.

[0043] Working process: the line scan camera 6 moves forward along with the first slide rail 3 controlled by the PLC. The image collected in real time by the line scan camera 6 is detected by the hot-rolled steel surface defect detection software of the industrial computer. If a defect is detected, the defect image and data are displayed in the software. At the same time, the defect position information is sent to the lower computer PLC controller 2 through network communication. At this time, the PLC controller 2 recognizes the data, and then controls the second slide rail 4 and the sprayer 7 switch to spray the defect identification, and then performs a round-trip cycle detection.

[0044] With the rapid development of artificial intelligence technology, in the field of computer vision, the YOLO series is widely used in industrial defect detection with its advantages of end-to-end training, strong real-time performance and high precision. Its latest version, YOLOv8, has better performance in multi-scale and multi-category detection of small targets.

[0045] Table 1 Comparison of model detection results of various versions of YOLOv8

[0046] Model Size(pixels) Map50-95(val) Params(M) FLOPs(B) YOLOv8n 640 37.3 3.2 8.7 YOLOv8s 640 44.9 11.2 28.6 YOLOv8m 640 50.2 25.9 78.9 YOLOv8l 640 52.9 43.7 165.2 YOLOv8x 640 53.9 68.2 237.8

[0047] As can be seen from Table 1, the YOLOv8m version is more balanced in terms of Map50-95, Params and FLOPs indicators. Therefore, in this embodiment, the m version is first selected for model training. The dataset selects the Northeastern University hot-rolled steel surface defect dataset, which includes 6 common surface defects of hot-rolled steel strips: crazing, inclusion, patches, pitted surface, rolled oxide scale and scratches. An automatic detection system based on the improved YOLOv8 algorithm is designed; Figure 2 The following are some defects, which are divided into training set, validation set and test set in a ratio of 7:2:1.

[0048] From above Figure 3 It can be seen that the detection accuracy of pitted_surface defects on the hot-rolled steel surface is the highest at 95.9%, and the detection accuracy of crazing defects is the lowest at only 35.4%. The comprehensive average accuracy is 72.5%, which has not yet met the requirements of practical applications, especially because the accuracy of craizing defects is less than 50%. Therefore, the present invention proposes a hot-rolled steel defect detection method based on improved YOLOv8. The network structure is as follows:

[0049] 1) FasterNet structure

[0050] FaterNet is a new neural network proposed at CVPR 2023, combined with PConv to form the FasterNet series. The network performs well in classification and detection tasks, has low latency and high throughput, and runs fast when tested on various devices. The FasterNet structure consists of 4 layers, each of which is preceded by an embedding layer or a merging layer for spatial downsampling and channel development. The PConv layer and 2 1×1 convolutional layers form a residual block, and the intermediate layer expands the number of channels and contains Shorcut to reuse input features, such as Figure 4 This architecture can make full use of the computing power of the device and play an important role in spatial feature extraction.

[0051] 2) DLAK attention mechanism module

[0052] Deformable Large Kernel Attention (DLAK) is a new attention mechanism proposed by CVPR in 2023 and used for medical image segmentation during testing. Figure 5 As shown in the figure, the DLAK attention mechanism module adopts deformable convolution, adjusts the sampling grid integer offset and creates an offset field, and learns adaptive convolution kernels based on features to enhance the effect of hot-rolled steel surface defects.

[0053] 3) YOLOv8-C2f_Faster_DLKA detection model construction

[0054] The original YOLOv8m algorithm has low accuracy in detecting surface defects of hot-rolled steel, and its auxiliary function in operation is not obvious. In the YOLOv8m model structure, the Bottleneck module of C2f is a residual block variant. In the feature map before and after the Bottleneck module, there are n Bottleneck modules in series, and each Bottleneck module is fused with the last Bottleneck module, that is, multi-scale feature fusion is realized, which effectively improves the efficiency and expression ability of the network. The present invention replaces the Bottleneck module of C2f in YOLOv8m by introducing the FasterBlock structure of FasterNet, making PConv simpler and reducing computational redundancy and memory access. Therefore, the C2f module is fused with the FasterBlock module of Faster to form a new structure C2f_Faster, and applied to the YOLOv8m network structure. In addition, in order to prevent the lightweight model from further increasing the improved detection accuracy, the DLAK attention module introduced above is introduced. In theory, this module relies on large convolution kernels to fully understand the context and operates within the receptive field of self-attention, which can make the model more adaptable to diverse and small target data patterns. Figure 6 As shown, the improved YOLOv8-C2f_Faster_DLKA network model structure.

[0055] 4) Model training and detection based on improved YOLOv8-C2f_Faster_DLKA network

[0056] We continue to use the Northeastern University hot-rolled steel surface defect dataset for model training. The training results are as follows: Figure 7 shown. Figure 7The data shows that the detection accuracy of all hot-rolled steel defects exceeds 50%, and the overall average accuracy is 77.6%, which is 5.1% higher than the original YOLOv8m algorithm. Among them, the crazing defect is improved from 35.4% to 52.1%, and the average accuracy of the other five defects reaches 80.1%, which can basically meet the needs of defect auxiliary detection and identification.

[0057] 5) Defect detection software based on improved YOLOv8-C2f_Faster_DLKA algorithm

[0058] The defect detection software based on the improved YOLOv8-C2f_Faster_DLKA algorithm is developed using Python language, Pycharm development tools, and the GUI design tool PYQT5. It includes Hikvision industrial single camera and dual camera interfaces, which can set the main parameters of the camera separately, and realize soft trigger and hard trigger image acquisition. Figure 8 and Fig. 9 As shown in the figure, network model training includes dataset image preprocessing and image downsampling. The dataset expansion includes random noise, random cropping, translation, rotation and other methods to meet the 15-fold expansion. The dataset is divided into training set: validation set: test set = 7:2:1 with one click. The pre-trained model can be selected, the number of network training rounds and batch image size can be set, and the breakpoint resume function is supported, such as Fig.10 As shown; the interface for defect detection is as follows Fig.11 As shown; it provides a network communication interface and communication assistant with the lower computer, such as Fig.13 As shown; it provides image detection, video detection, and camera real-time detection functions, and provides login administrator privileges to change weights, such as Fig.12 As shown; the test results can be checked at any time and saved as EXCEL tables, etc. Fig.14 shown.

Claims

1. An automatic detection system for hot-rolled steel surface defects based on improved YOLOv8m, characterized in that: include: Industrial computer: used to support image processing and algorithm operation; PLC controller: controls the rotation of the first and second slide rails in real time to ensure that the relative positions of the line scan camera and the automatic spraying machine remain correct; The first slide rail and the second slide rail are used to support the line scan camera and the sprayer respectively, and ensure the stable movement of the line scan camera and the sprayer; Hot-rolled steel testing table: used to place the steel to be tested; Line scan camera: used to capture images of the steel surface; Sprayer: After the defect is detected, it is used to spray and mark the defect location; The line scan camera moves forward with the first slide rail, and the image collected in real time by the line scan camera is detected by the industrial computer calling the hot-rolled steel surface defect detection algorithm; if a defect is detected, the defect image and data are displayed in the hot-rolled steel surface defect detection software, and the defect position information is sent to the lower computer PLC controller through network communication. At this time, the PLC controller recognizes the data, and then controls the second slide rail and the automatic spray machine switch to spray the defect identification, and then performs a round-trip cycle detection.

2. According to the hot-rolled steel surface defect automatic detection system based on improved YOLOv8m according to claim 1, it is characterized in that: The hot-rolled steel surface defect detection algorithm realizes real-time detection of hot-rolled steel surface defects by building a YOLOv8-C2f_Faster_DLKA detection model. The industrial computer can display the detection screen and defect results in real time, and add the detection results to the database table.

3. According to claim 2, the automatic detection system for hot-rolled steel surface defects based on improved YOLOv8m is characterized in that: The FasterNet structure and DLAK attention mechanism module are introduced into the YOLOv8-C2f_Faster_DLKA detection model; the FasterNet structure includes 4 layers, each of which is preceded by an embedding layer or a merging layer, in which the PConv layer and 2 1×1 convolutional layers form a residual block, the middle layer expands the number of channels, and contains Shorcut to reuse input features; The DLAK attention mechanism module adopts deformable convolution, adjusts the sampling grid integer offset and creates an offset field, and learns adaptive convolution kernels based on features.

4. A method for automatically detecting surface defects of hot-rolled steel based on improved YOLOv8m, applied to the hot-rolled steel surface defect detection system as claimed in any one of claims 1 to 3, characterized in that: The following steps are involved: S1, the line scan camera moves along the first slide rail to capture the image of the hot-rolled steel surface; S2, the industrial computer performs defect detection on the image; S3, if a defect is detected, the industrial computer displays the defect image and data, and sends the defect location information to the PLC controller; S4, after receiving the defect position information, the PLC controller controls the second slide rail and the sprayer to move to the defect position for spraying; S5, repeat steps S1 to S4 until all detection tasks are completed.

Citation Information

Patent Citations

  • Detection device and detection method for defect of hot rolling edge

    CN109540918A

  • Hot rolled steel strip surface defect detection method based on semi-supervised transfer learning

    CN115731237A

  • Steel surface defect detection method based on improved YOLOv5s

    CN115829991A

  • Method for detecting surface defects of hot rolled strip steel based on improved YOLOv5s

    CN116958091A

  • Light-weight hot-rolled strip steel surface defect detection method based on improved YOLOv7

    CN117274233A