Search

CN-122023306-A - Rail surface defect detection system based on improved YOLOv s and RK3588

CN122023306ACN 122023306 ACN122023306 ACN 122023306ACN-122023306-A

Abstract

The invention discloses a rail surface defect detection system based on improved YOLOv s and RK3588, which relates to the technical field of rail defect detection, firstly, a visual acquisition module acquires rail video streams in real time through a camera arranged on mobile inspection equipment, and transmitting the rail video stream to a defect processing module, identifying and positioning defect information of the rail surface after the defect processing module receives the rail video stream, and finally visualizing the identified defect information of the rail surface through a visualization module so as to take corresponding maintenance measures. The intelligent rail defect detection system based on the orange pie integrates an RK3588 AI chip, an improved YOLOv s algorithm, a ATGM336H GPS module and a TCP communication mechanism, can acquire track images in real time, identify defects and record positions in train running and upload data to a central control room, and forms a full-flow intelligent detection system integrating acquisition, processing, transmission and display.

Inventors

  • CHEN ZIWEI
  • XU JINYAN
  • WANG YIFAN
  • LI ZEPEI
  • Mao Rugao
  • LONG HUAN

Assignees

  • 成都信息工程大学

Dates

Publication Date
20260512
Application Date
20260123

Claims (10)

  1. 1. A rail surface defect detection system based on the modifications YOLOv s and RK3588, characterized by comprising the following modules: the visual acquisition module is used for acquiring the rail video stream in real time through a camera arranged on the mobile inspection equipment and transmitting the rail video stream to the defect processing module; The defect processing module is used for identifying and positioning defect information on the surface of the rail after receiving the rail video stream; and the visualization module is used for visualizing the defect information of the rail surface identified by the defect processing module, and further adopting corresponding maintenance measures.
  2. 2. The improved YOLOv s and RK3588 based rail surface defect detection system of claim 1 wherein said identifying and locating of rail surface defect information upon receiving a rail video stream is performed as follows: Inputting the rail video into a pre-optimized YOLOv s model, further carrying out defect identification on the rail video frame by frame through the pre-optimized YOLOv s model, and when the rail is identified to have defects, combining rail positioning identification to obtain the defect positioning in the rail.
  3. 3. The improved YOLOv s and RK3588 based rail surface defect detection system of claim 2 wherein the rail video is defect identified frame by pre-optimized YOLOv s model, wherein the pre-optimized YOLOv s model comprises a backbone network, neck layers and a detector head Detect layer, feature extraction is performed through the backbone network, feature enhancement is performed through Neck layers, and target prediction is performed on the multi-scale feature map output by Neck layers by the detector head Detect layer.
  4. 4. The improved YOLOv s and RK3588 based rail surface defect detection system of claim 3 wherein the feature extraction through the backbone network is performed as follows: The method comprises the steps of carrying out format conversion on an input rail surface image through convolution on a layer 0 of a backbone network, extracting defect characteristics of the rail surface image through layer 1 convolution and layer 2C 3K2, repeating working contents of layer 1 convolution and layer 2C 3K2 through layer 3, layer 4, layer 5, layer 6, layer 7 and layer 8, and finally carrying out multi-scale characteristic fusion and position sensitive attention characteristic fusion through layer 9 SPPF and layer 10C 2 PSA.
  5. 5. The improved YOLOv s and RK3588 based rail surface defect detection system of claim 4 wherein the feature enhancement by Neck layers is as follows: The Neck layer establishes a channel-level attention mechanism between sequence features extracted in different directions through an SSA module, and the formula is expressed as follows: wherein And Respectively representing the input characteristic diagram and the characteristic diagram which is output after attention enhancement, Representing an attention enhancing calculation.
  6. 6. The improved YOLOv s and RK3588 based rail surface defect detection system of claim 5 wherein the Neck layer establishes channel-level attention mechanisms between sequence features extracted in different directions by SSA modules as follows: In ShuffleAttn attention enhancement process, the channel dimension is divided into 4 groups, which is recorded as group=4, and the group=4 is split to obtain And (2) and Where i denotes the packet number of the channel dimension, i=1, 2,3,4, And (3) representing a feature map of the ith channel dimension, wherein R represents a real number set, C represents the number of feature channels, H and W respectively represent the height and the width of the feature map, and then according to a calculation formula: performing a packet convolution, wherein Representation of The characteristics obtained after the convolution are used, Representing 3*3 convolution calculations, and according to the calculation formula: Performing an averaging pooling in which And h and w represent pixel indexes in corresponding dimensions of H, W, and finally according to a calculation formula: Pool stitching is performed in which The characteristics after the splicing are represented by the features, Representing channel splicing calculation; simultaneously, the sequence number of the defect characteristics is recorded as k, and k=1, 2,3 and 4, and the sequence number is calculated through space average pooling Splicing the sequences: by the calculation formula: Randomly combining the spliced features, wherein And Respectively represents the spliced characteristic after being unfolded and the sequence characteristic after being disturbed, And Represented as a splice calculation and a shuffle calculation respectively, Pooling eigenvalues representing the D-th channel of the k-th sequence, where D is the total number of channels, D is the index of the channel, 1 , Representing 4 groups of sequence feature sets, and finally according to a calculation formula: performing feature recombination, wherein W represents the final feature weight set, And Respectively representing a sequence recovery calculation and a packet convolution weight generation calculation, The attention weight value of the d-th channel of the kth sequence is represented.
  7. 7. The improved YOLOv s and RK3588 based rail surface defect detection system of claim 6 wherein Neck layers further comprise a neck Neck layer for enhancing fusion of scale features and feature expression of rail surface defects of textures and structures as follows: the method comprises the steps of enhancing a 12 th layer through C3K2_ ShuffleAtt, up-sampling to obtain a 14 th layer characteristic, splicing a 4 th layer characteristic and a 14 th layer characteristic, splicing a 6 th layer characteristic and a 11 th layer characteristic to obtain the 12 th layer, performing C3K2_ ShuffleAtt operation on the 16 th layer, fusing the 13 th layer and the 17 th layer to obtain an input of the 19 th layer, and finally fusing the 10 th layer and the 20 th layer to obtain the 22 th layer.
  8. 8. The improved YOLOv s and RK3588 based rail surface defect detection system of claim 7 wherein said multi-scale feature map output by layer Neck is targeted by the detection head Detect layer as follows: For a large-scale feature map output by the Neck layers, the detection head Detect layer is used for detecting a small target, and meanwhile, NWDloss loss function is introduced to improve the detection capability of the small target; For the Neck-layer output mesoscale feature map, the detection head Detect layer is used for balancing semantics and details and detecting a mesoscale target; for small scale feature maps output by Neck layers, the detection head Detect layer is used to Detect large targets.
  9. 9. The improved YOLOv s and RK3588 based rail surface defect detection system of claim 8 wherein said introducing NWDloss loss function promotes small target detection capability by: In rail defect detection, NWDloss loss functions model the prediction and real frames as two-dimensional gaussian distributions, first the bounding box is noted as The corresponding two-dimensional Gaussian distribution is that Wherein And Representing the central abscissa and the central ordinate of the prediction block respectively, In the form of a covariance matrix, The mean value vector is used to determine, Wherein x and y represent the central abscissa and central ordinate of the bounding box, And Representing the width and height of the prediction frame, respectively; Prediction frame And a real frame The corresponding two-dimensional Gaussian distribution is noted as The Wasserstein distance is introduced here To measure Of the degree of similarity of (1), wherein Wherein And Representing the center abscissa and center ordinate of the real frame respectively, And The width and the height of the real frame are respectively represented; Then pass through Will be Normalization is performed in which From this, the bounding box regression loss can be obtained: Finally, the total loss of YOLOv s is obtained as Wherein And Representing a classification loss term and a confidence loss, 、 And The weight coefficient corresponding to the classification loss item, the weight coefficient corresponding to the bounding box regression loss and the weight coefficient corresponding to the confidence loss are respectively represented.
  10. 10. The improved YOLOv s and RK3588 based rail surface defect detection system of claim 9 wherein the defect information of the rail surface identified by the defect handling module is visualized, in particular as a visual presentation of the rail surface defect information in the form of location values and high definition images at the screen terminal.

Description

Rail surface defect detection system based on improved YOLOv s and RK3588 Technical Field The invention relates to the technical field of rail defect detection, in particular to a rail surface defect detection system based on improved YOLOv s and RK 3588. Background The rail is used as a railway transportation core facility, and the surface of the rail is easy to generate defects such as cracks, abrasion, peeling and the like due to factors such as load, environment and the like, so that the running safety of a train is directly influenced, and the efficient defect detection is a key of railway operation and maintenance. The traditional rail defect detection relies on manual inspection and automatic means, has obvious limitations of low manual inspection efficiency, high cost, large influence by subjective factors and high risk of missed inspection erroneous judgment, and the traditional automatic technology such as a rail detection vehicle has high equipment deployment cost and is difficult to feed back in real time, and a computer vision system is difficult to deploy in a mobile scene in a lightweight way due to insufficient algorithm precision and dependence on a heavy computing platform, so that the real-time performance and the practicability of the traditional rail defect detection are limited. With the development of AI and embedded technology, edge computing and computer vision are fused to provide a new direction for detection, but how to consider detection accuracy and real-time under limited embedded resources, and meanwhile, to realize defect positioning and reliable data transmission is still a technical problem to be solved. The prior art has the defects in rail defect detection, and is characterized in that (1) the prior art has the defects of rail detection based on a YOLOv target detection model, but has limited perception capability on defect characteristics, especially defects in complex background and small target defect detection, meanwhile, the frame positioning accuracy is to be improved, the problems of defect missing detection and low detection accuracy exist, the requirements of rapid and accurate detection on rail surface defects are difficult to meet, meanwhile, the YOLOv target detection model is only improved in algorithm accuracy, but the YOLOv model is older, the model of YOLOv11 updated at present is required to be used for improvement, in addition, no actual systematic flow is realized, such as rail defect image real-time input, RK3588 or other chip acceleration processing is carried out on a development board, defect images are displayed in real time, so that the method cannot be applied in actual scenes, devices such as a central control room and front end software are not used, geographical information, images of the defect images read in real time cannot be stored and transmitted to a central room, and the front end software cannot be displayed in front end software. (2) In the prior art, a special image acquisition system is constructed by combining hardware such as a CCD linear camera, an LED strip light source, a fixed focal length lens, an image acquisition card and the like, then the acquired image is preprocessed by a software algorithm, edge detection is carried out by a Canny operator, meanwhile, the accuracy of rail surface defect detection is improved by improving a YOLOv8 model of a BiFPN network, although basic detection requirements can be met to a certain extent, the method has multiple limitations, namely, firstly, the detection accuracy and efficiency are difficult to meet actual scene requirements, the steps such as preprocessing and edge detection possibly cause defect missed detection or false detection due to image quality fluctuation, and particularly, the defect recognition effect of fine scratches, cracks and the like is poor, secondly, along with the rapid development of railway construction, the rail mileage is continuously increased, the defect types are increasingly complex, the technical scheme has difficulty in keeping up with the requirements of railway development on the detection speed and the adaptability, the traditional Canny operator cannot be used for high-efficient and high-precision rail surface defect detection tasks, and BiFPN-YOLOv model detection accuracy is not high, and thirdly, the method is not deployed and implemented at a hardware end, and integrated engineering is not formed. Disclosure of Invention In view of the above-mentioned existing technical shortcomings, it is an object of the present invention to provide a rail surface defect detection system based on the improvements YOLOv s and RK 3588. In order to solve the technical problems, the invention adopts the following technical scheme that the rail surface defect detection system based on the improved YOLOv s and RK3588 comprises a vision acquisition module, a defect processing module and a control module, wherein the vision acquisition module is used for acquiring