A method and device for online detection of rail fracture

Through the use of rail fracture detection, rail inspection vehicles collect images, screen operations, and detection models based on the YOLO model, solve the problem of insufficient detection efficiency and accuracy in existing technologies, and achieve more efficient and accurate rail fracture detection.

CN118941880BActive Publication Date: 2025-01-28NANJING GONGCUN INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411388530.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-28
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

The prior art is not efficient and has insufficient accuracy in rail break detection, which affects the timeliness of maintenance work and requires manual re-inspection, which increases the workload and cost.

Method used

Use rail inspection vehicles to collect rail images. By screening operations to eliminate images that obviously do not have fracture problems, build a YOLO -based rail fracture detection model, use the characteristics of the neck network to integrate the characteristics of different layers, improve the detection accuracy, and design the target function to improve Model accuracy and convergence speed.

Benefits of technology

The efficiency and accuracy of steel rail fracture detection have been improved, the demand for artificial re -examination has been reduced, the workload and cost are reduced, and a faster and accurate rail state detection has been achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941880B_ABST
    Figure CN118941880B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method and device for online detection of rail fracture, the method comprising: collecting rail images, the rail images being taken by a track inspection vehicle using a CCD industrial camera; screening the rail images to determine rail images that may have cracks; building a rail fracture detection model based on a YOLO model, the rail fracture detection model comprising a backbone network, a neck network and a head network; inputting the rail images that may have cracks into the trained rail fracture detection model, and outputting rail fracture detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image detection, and in particular to an online detection method and device for rail fracture. Background Art

[0002] Rails are a key component of the railway transportation system. Their stability and safety are directly related to the safety of train operation and the safety of passengers' lives and property. With the rapid development of railway transportation, the problem of rail breakage has become increasingly prominent. Rail breakage can cause train derailment and even cause serious traffic accidents, resulting in huge economic losses and casualties.

[0003] Rail fracture is usually caused by factors such as fatigue, corrosion, and overload, which are difficult to completely avoid during railway transportation. Moreover, rail fracture often occurs gradually. Tiny cracks will appear on the surface of the rail in the early stage. As time goes by, these cracks will gradually develop and eventually lead to rail fracture. Track inspection vehicles, as mobile devices specially used to detect the status of rails, provide great convenience for rail fracture detection. However, due to the high speed of track inspection vehicles, the amount of image data generated is huge, and the low efficiency of image analysis will affect the timeliness of maintenance work. In addition, in some cases, due to the low detection accuracy, manual re-inspection is still required to confirm the suspected broken rails, which increases the workload and cost.

[0004] In view of the above problems, designing an efficient and highly accurate on-line detection method and device for rail fracture is an urgent problem to be solved by technical personnel in this field. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a method and device for online detection of rail fracture, which detects cracks on the surface of the rail and improves the efficiency and accuracy of rail fracture detection.

[0006] In order to achieve the purpose of the invention, the present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides a method for online detection of rail fracture, the method comprising:

[0008] Collecting rail images, where the rail images are taken by a track inspection vehicle using a CCD industrial camera;

[0009] Performing a screening operation on the rail image, wherein the screening operation determines the rail image that may have cracks according to the relationship between the maximum grayscale value, the minimum grayscale value, the average grayscale value, and the global average grayscale value of each row of pixels in the rail image;

[0010] A rail fracture detection model is constructed based on the YOLO model, wherein the rail fracture detection model includes a backbone network, a neck network and a head network, wherein the backbone network provides multiple layers of input features to the neck network, and the neck network fuses the input features of each layer, the input features of the adjacent next layer and the intermediate features of the adjacent previous layer to obtain the intermediate features of the layer, and then fuses the input features of each layer, the intermediate features of the same layer and the output features of the adjacent next layer to obtain the output features of the layer; the loss function of the rail fracture detection model introduces the intersection area of ​​the prediction box and the real box, the minimum circumscribed rectangle area and the center point position;

[0011] The rail image that may have cracks is input into the trained rail fracture detection model, and the rail fracture detection result is output.

[0012] Furthermore, the screening operation includes converting the rail image into a grayscale image, calculating the maximum grayscale value, the minimum grayscale value, the average grayscale value of each row of pixels in the grayscale image, and the global average grayscale value of the grayscale image, and determining the rail image that may have cracks based on the difference between the maximum grayscale value and the minimum grayscale value and the relationship between the average grayscale value and a preset range.

[0013] Further, determining a rail image that may have cracks according to the difference between the maximum grayscale value and the minimum grayscale value and the relationship between the average grayscale value and a preset range includes:

[0014] If the difference between the maximum grayscale value and the minimum grayscale value is not within the preset range, it is determined that no cracks occur in the row of pixels;

[0015] If the difference between the maximum grayscale value and the minimum grayscale value is within the preset range, and the average grayscale value is not within the preset range, it is determined that no cracks occur in the row of pixels;

[0016] If the difference between the maximum grayscale value and the minimum grayscale value and the average grayscale value are both within the preset range, it is determined that cracks occur in the row of pixels;

[0017] If cracks appear in any row of pixels, the rail image is determined to be an image that may have cracks.

[0018] Furthermore, the preset range is [(1-k)G g , (1+k)G g ], where G g is the global average gray value, and k is the threshold coefficient.

[0019] Furthermore, the neck network is an improved feature pyramid network, comprising:

[0020] The neck network has three layers of input features P from low to high i3 , P i4 , P i5 ;

[0021] Input feature P i3 And the upsampled intermediate feature P m4 Through the splicing operation, the intermediate feature P is obtained. m3 ;

[0022] Input feature P i3 After downsampling by 3×3 convolution with a step size of 2, it is combined with the input feature P i4 And the upsampled intermediate feature P m5 Through the splicing operation, the intermediate feature P is obtained. m4 ;

[0023] Input feature P i4 After downsampling by 3×3 convolution with a step size of 2, it is combined with the input feature P i5 Through the splicing operation, the intermediate feature P is obtained. m5 ;

[0024] Input feature P i3 With the intermediate feature P m3 Through the concatenation operation, the output feature P is obtained. o3 ;

[0025] Input feature P i4 , intermediate feature P m4 And the downsampled output feature P o3 Through the concatenation operation, the output feature P is obtained. o4 ;

[0026] Input feature P i5 , intermediate feature P m5 And the downsampled output feature P o4 Through the concatenation operation, the output feature P is obtained. o5 .

[0027] Furthermore, the loss function is:

[0028]

[0029] Among them, L is the loss function, A is the predicted box, B is the real box, and C is the circumscribed rectangular area of ​​the predicted box and the real box. is the intersection area of ​​the predicted box and the true box, is the center point of the prediction box, is the center point of the real frame, is the preset coefficient.

[0030] In a second aspect, the present invention provides an on-line detection device for rail fracture, the device comprising:

[0031] An acquisition module is used to acquire rail images, where the rail images are taken by a track inspection vehicle using a CCD industrial camera;

[0032] A screening module, used for performing a screening operation on the rail image, wherein the screening operation determines the rail image that may have cracks according to the relationship between the maximum grayscale value, the minimum grayscale value, the average grayscale value of each row of pixels in the rail image, and the global average grayscale value;

[0033] An input module is used to input the rail image with possible cracks into a trained rail fracture detection model; the rail fracture detection model includes a backbone network, a neck network and a head network, wherein the backbone network provides multiple layers of input features to the neck network, and the neck network fuses the input features of each layer, the input features of the adjacent next layer and the intermediate features of the adjacent previous layer to obtain the intermediate features of the layer, and then fuses the input features of each layer, the intermediate features of the same layer and the output features of the adjacent next layer to obtain the output features of the layer; the loss function of the rail fracture detection model introduces the intersection area of ​​the predicted box and the real box, the minimum circumscribed rectangle area and the center point position;

[0034] The output module is used to obtain the rail fracture detection result output by the rail fracture detection model.

[0035] In a third aspect, the present invention provides an electronic device, the electronic device comprising:

[0036] at least one processor; and

[0037] a memory communicatively connected to the at least one processor; wherein,

[0038] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the online detection method for rail fracture described in the first aspect.

[0039] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a processor to implement the on-line detection method for rail fracture described in the first aspect when executed.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The rail fracture online detection method, device, electronic device and readable storage medium provided by the present invention aim at the problem of rail fracture detection. A track inspection vehicle is used to collect rail images, so a large amount of image data can be quickly obtained, thereby improving the timeliness and efficiency of data collection. The rail images are screened to exclude images that obviously do not have fracture problems, thereby improving the efficiency and speed of data processing. A rail fracture detection model is constructed, and the neck network better identifies cracks of different sizes by fusing features of different layers, thereby improving the detection accuracy of the model. An objective function is designed to improve the accuracy of the model and accelerate the convergence speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0043] Figure 1 is a flow chart of the rail fracture online detection method provided in Example 1;

[0044] Figure 2 A schematic diagram of the structure of the neck network of the rail fracture detection model provided in Example 1;

[0045] Figure 3 This is a schematic diagram of the structure of the online detection device for rail fracture provided in Example 2. DETAILED DESCRIPTION

[0046] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, some specific details are described in detail. It is possible for those skilled in the art to fully understand the present application without the description of these details. In order to avoid confusing the essence of the present application, known methods, processes, flows, components and circuits are not described in detail.

[0047] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.

[0048] Unless the context clearly requires otherwise, the words "include", "comprising" and similar words throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is "including but not limited to".

[0049] In the description of this application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.

[0050] Example 1

[0051] This embodiment provides a rail fracture online detection method, which is suitable for detecting the fracture condition of a rail image based on a rail fracture detection model constructed based on YOLOv5, so as to determine whether there is a crack in the rail. The method can be executed by an online rail fracture detection device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device with the capability of an online rail fracture detection method.

[0052] like Figure 1 As shown, the method provided in this embodiment includes the following steps:

[0053] S110, collecting rail images, where the rail images are taken by a track inspection vehicle using a CCD industrial camera;

[0054] Among them, the track inspection vehicle is a device specially used to detect the track status. It can detect the surface condition of the track. The maximum speed of the track inspection vehicle can reach more than 20km / h, which can greatly improve the work efficiency and save labor costs. The track inspection vehicle can quickly obtain a large amount of image data, improving the timeliness and efficiency of data collection.

[0055] S120, performing a screening operation on the rail image, wherein the screening operation determines the rail image that may have cracks according to the relationship between the maximum grayscale value, the minimum grayscale value, the average grayscale value, and the global average grayscale value of each row of pixels in the rail image;

[0056] During the rail inspection process, the speed of the track inspection vehicle is very high, but the cracks on the rails are small, and most of the rail sections do not have cracks. Therefore, in order to improve the efficiency and speed of data processing, it is necessary to pre-screen the image to detect whether the image contains possible cracks, and then input the image with possible defects into the subsequent detection model. The screening operation can improve the efficiency and accuracy of the detection. Considering that the cracks on the rails are almost all perpendicular to the extension direction of the rails, that is, transverse cracks, the situation of each row of pixels is detected during the screening process.

[0057] In step S120, the screening operation includes converting the rail image into a grayscale image, calculating the maximum grayscale value, the minimum grayscale value, the average grayscale value of each row of pixels in the grayscale image, and the global average grayscale value of the grayscale image, and determining the rail image that may have cracks according to the difference between the maximum grayscale value and the minimum grayscale value and the relationship between the average grayscale value and a preset range, including:

[0058] If the difference between the maximum grayscale value and the minimum grayscale value is not within the preset range, it is determined that no cracks occur in the row of pixels;

[0059] If the difference between the maximum grayscale value and the minimum grayscale value is within the preset range, and the average grayscale value is not within the preset range, it is determined that no cracks occur in the row of pixels;

[0060] If the difference between the maximum grayscale value and the minimum grayscale value and the average grayscale value are both within the preset range, it is determined that cracks occur in the row of pixels;

[0061] If cracks appear in any row of pixels, the rail image is determined to be an image that may have cracks.

[0062] The preset range is [(1-k)G g , (1+k)G g ], where G g is the global average gray value, and k is the threshold coefficient.

[0063] S130, constructing a rail fracture detection model based on the YOLO model, the rail fracture detection model includes a backbone network, a neck network and a head network, wherein the backbone network provides multiple layers of input features to the neck network, the neck network fuses the input features of each layer, the input features of the adjacent next layer and the intermediate features of the adjacent previous layer to obtain the intermediate features of the layer, and then fuses the input features of each layer, the intermediate features of the same layer and the output features of the adjacent next layer to obtain the output features of the layer; the loss function of the rail fracture detection model introduces the intersection area of ​​the prediction box and the real box, the minimum circumscribed rectangle area and the center point position;

[0064] In this embodiment, the rail fracture detection model is built based on YOLOv5. In the feature pyramid network, high-level features are rich in semantic information, conducive to classification, and have low resolution, while low-level features are rich in spatial details and have less semantic information. Therefore, by fusing high-level features with low-level features, effective detection of targets of different scales can be achieved.

[0065] Considering that the rail fracture problem includes large-scale cracks that have completely broken and tiny cracks that appear in the early stage, the scale of the cracks varies greatly. Therefore, in order to further improve the complementarity of high-level features and low-level features, the present invention improves the feature pyramid network, increases the number of fusion times of input features, and sets the input features to be fused once in the process of obtaining intermediate features and output features, respectively, thereby reducing the imbalance of features and improving the detection accuracy of the model.

[0066] In step S130, Figure 2 As shown, the neck network has three layers of input features P from low to high i3 , P i4 , P i5 ;

[0067] Input feature P i3 And the upsampled intermediate feature P m4 Through the splicing operation, the intermediate feature P is obtained. m3 , which can be expressed as:

[0068]

[0069] Among them, C2f represents C2f module processing, Cat represents splicing operation, and up represents upsampling;

[0070] Input feature P i3 After downsampling by 3×3 convolution with a step size of 2, it is combined with the input feature P i4 And the upsampled intermediate feature P m5 Through the splicing operation, the intermediate feature P is obtained. m4 , which can be expressed as:

[0071]

[0072] Among them, C2f represents C2f module processing, Cat represents splicing operation, up represents upsampling, and dw represents downsampling;

[0073] Input feature P i4 After downsampling by 3×3 convolution with a step size of 2, it is combined with the input feature P i5 Through the splicing operation, the intermediate feature P is obtained. m5 , which can be expressed as:

[0074]

[0075] Among them, C2f represents C2f module processing, Cat represents splicing operation, and dw represents downsampling;

[0076] Input feature P i3 With the intermediate feature P m3 Through the concatenation operation, the output feature P is obtained. o3 , which can be expressed as:

[0077]

[0078] Among them, C2f represents C2f module processing, and Cat represents splicing operation;

[0079] Input feature P i4 , intermediate feature P m4 And the downsampled output feature P o3 Through the concatenation operation, the output feature P is obtained. o4 , which can be expressed as:

[0080]

[0081] Among them, C2f represents C2f module processing, Cat represents splicing operation, and dw represents downsampling;

[0082] Input feature P i5 , intermediate feature P m5 And the downsampled output feature P o4 Through the concatenation operation, the output feature P is obtained. o5 .

[0083]

[0084] Among them, C2f represents C2f module processing, Cat represents splicing operation, and dw represents downsampling.

[0085] In this embodiment, the loss function introduces the minimum enclosing rectangle of the predicted box and the true box with reference to GIoU to reflect the proportion of the true box and the predicted box in the closure area. At the same time, the center point position of the true box and the predicted box is introduced to reflect the overlap degree of the predicted box and the true box, thereby improving the model accuracy and accelerating the convergence speed.

[0086] In step S130, the loss function is:

[0087]

[0088] Among them, L is the loss function, A is the predicted box, B is the real box, and C is the circumscribed rectangular area of ​​the predicted box and the real box. is the intersection area of ​​the predicted box and the true box, is the center point of the prediction box, is the center point of the real frame, is the preset coefficient, Can be set according to the degree of overlap.

[0089] S140, inputting the rail image that may have cracks into the trained rail fracture detection model, and outputting the rail fracture detection result.

[0090] In this embodiment, the rail fracture detection model can detect cracks in the rail image and find rails that have already fractured or have a potential for fracture.

[0091] In this embodiment, in order to solve the problem of rail fracture detection, a track inspection vehicle is used to collect rail images, which can quickly obtain a large amount of image data and improve the timeliness and efficiency of data collection; the rail images are screened to exclude images that obviously do not have fracture problems, thereby improving the efficiency and speed of data processing; a rail fracture detection model is constructed, and the neck network better identifies cracks of different sizes by fusing features of different layers, thereby improving the detection accuracy of the model; and an objective function is designed to improve the accuracy of the model and accelerate the convergence speed.

[0092] Example 2

[0093] This embodiment provides an on-line detection device for rail fracture, such as Figure 3 As shown, the device comprises:

[0094] The acquisition module 110 is used to acquire rail images, where the rail images are taken by a track inspection vehicle using a CCD industrial camera;

[0095] A screening module 120 is used to perform a screening operation on the rail image, wherein the screening operation determines the rail image that may have cracks according to the relationship between the maximum grayscale value, the minimum grayscale value, the average grayscale value, and the global average grayscale value of each row of pixels in the rail image;

[0096] The input module 130 is used to input the rail image with possible cracks into the trained rail fracture detection model; the rail fracture detection model includes a backbone network, a neck network and a head network, wherein the backbone network provides multiple layers of input features to the neck network, and the neck network fuses the input features of each layer, the input features of the next layer and the intermediate features of the previous layer to obtain the intermediate features of the layer, and then fuses the input features of each layer, the intermediate features of the same layer and the output features of the next layer to obtain the output features of the layer; the loss function of the rail fracture detection model introduces the intersection area of ​​the predicted box and the real box, the minimum circumscribed rectangle area and the center point position;

[0097] The output module 140 is used to obtain the rail fracture detection result output by the rail fracture detection model.

[0098] The device provided in this embodiment can execute the online rail fracture detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0099] Example 3

[0100] This embodiment provides an electronic device for implementing an online detection method for rail fracture, including: at least one processor, and a memory connected to the at least one processor, such as a read-only memory (ROM), a random access memory (RAM), etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) or the computer program loaded from the storage unit to the random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device can also be stored. The processor, ROM and RAM are connected to each other through a bus. The input / output (I / O) interface is also connected to the bus.

[0101] A number of components in an electronic device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as second storage areas, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0102] The processor may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of processors include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor executes the various methods and processes described above, such as the online detection method for rail fracture.

[0103] In some embodiments, the rail fracture online detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via a ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the rail fracture online detection method described above may be performed. Alternatively, in other embodiments, the processor may be configured to perform the rail fracture online detection optimization method in any other appropriate manner (e.g., by means of firmware).

[0104] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A rail fracture online detection method, characterized in that: The method comprises: Collecting rail images, where the rail images are taken by a track inspection vehicle using a CCD industrial camera; Performing a screening operation on the rail image, wherein the screening operation determines the rail image that may have cracks according to the relationship between the maximum grayscale value, the minimum grayscale value, the average grayscale value, and the global average grayscale value of each row of pixels in the rail image; A rail fracture detection model is constructed based on the YOLO model. The rail fracture detection model includes a backbone network, a neck network and a head network. The backbone network provides multiple layers of input features to the neck network. The neck network fuses the input features of each layer, the input features of the adjacent next layer and the intermediate features of the adjacent previous layer to obtain the intermediate features of the layer. Then, the input features of each layer, the intermediate features of the same layer and the output features of the adjacent next layer are fused to obtain the output features of the layer. The loss function of the rail fracture detection model introduces the intersection area of ​​the prediction box and the real box, the minimum circumscribed rectangle area and the center point position. Inputting the rail image with possible cracks into the trained rail fracture detection model, and outputting the rail fracture detection result; The neck network is an improved feature pyramid network, comprising: The neck network has three layers of input features Pi3, Pi4, and Pi5 from low to high; The input feature Pi3 is fused with the upsampled intermediate feature Pm4 through a splicing operation to obtain the intermediate feature Pm3; After the input feature Pi3 is downsampled by a 3×3 convolution with a stride of 2, it is fused with the input feature Pi4 and the upsampled intermediate feature Pm5 through a splicing operation to obtain the intermediate feature Pm4; After the input feature Pi4 is downsampled by a 3×3 convolution with a stride of 2, it is fused with the input feature Pi5 through a splicing operation to obtain the intermediate feature Pm5; The screening operation includes converting the rail image into a grayscale image, calculating the maximum grayscale value, the minimum grayscale value, the average grayscale value of each row of pixels in the grayscale image, and the global average grayscale value of the grayscale image, and determining the rail image that may have cracks according to the difference between the maximum grayscale value and the minimum grayscale value and the relationship between the average grayscale value and a preset range; Wherein, determining a rail image that may have cracks according to the difference between the maximum grayscale value and the minimum grayscale value and the relationship between the average grayscale value and a preset range includes: If the difference between the maximum grayscale value and the minimum grayscale value is not within the preset range, it is determined that no cracks occur in the row of pixels; If the difference between the maximum grayscale value and the minimum grayscale value is within the preset range, and the average grayscale value is not within the preset range, it is determined that no cracks occur in the row of pixels; If the difference between the maximum grayscale value and the minimum grayscale value and the average grayscale value are both within the preset range, it is determined that cracks occur in the row of pixels; If cracks appear in any row of pixels, the rail image is determined to be an image that may have cracks; The preset range is [(1-k)Gg, (1+k)Gg], where Gg is the global average grayscale value and k is the threshold coefficient.

2. The method according to claim 1, characterized in that The neck network also includes: The input feature Pi3 and the intermediate feature Pm3 are fused through a splicing operation to obtain the output feature Po3; The input feature Pi4, the intermediate feature Pm4 and the downsampled output feature Po3 are fused through a splicing operation to obtain the output feature Po4; The input feature Pi5, the intermediate feature Pm5 and the downsampled output feature Po4 are fused through a splicing operation to obtain the output feature Po5.

3. The method according to claim 1, characterized in that The loss function is: Among them, L is the loss function, A is the predicted box, B is the real box, and C is the circumscribed rectangular area of ​​the predicted box and the real box. is the intersection area of ​​the predicted box and the true box, is the center point of the prediction box, is the center point of the real frame, is the preset coefficient.

4. An on-line detection device for rail fracture, characterized in that: The device comprises: An acquisition module is used to acquire rail images, where the rail images are taken by a track inspection vehicle using a CCD industrial camera; A screening module, used for performing a screening operation on the rail image, wherein the screening operation determines the rail image that may have cracks according to the relationship between the maximum grayscale value, the minimum grayscale value, the average grayscale value of each row of pixels in the rail image, and the global average grayscale value; An input module is used to input the rail image with possible cracks into a trained rail fracture detection model; the rail fracture detection model includes a backbone network, a neck network and a head network, wherein the backbone network provides multiple layers of input features to the neck network, and the neck network fuses the input features of each layer, the input features of the adjacent next layer and the intermediate features of the adjacent previous layer to obtain the intermediate features of the layer, and then fuses the input features of each layer, the intermediate features of the same layer and the output features of the adjacent next layer to obtain the output features of the layer; the loss function of the rail fracture detection model introduces the intersection area of ​​the predicted box and the real box, the minimum circumscribed rectangle area and the center point position; An output module, used to obtain the rail fracture detection result output by the rail fracture detection model; The neck network is an improved feature pyramid network, comprising: The neck network has three layers of input features Pi3, Pi4, and Pi5 from low to high; The input feature Pi3 is fused with the upsampled intermediate feature Pm4 through a splicing operation to obtain the intermediate feature Pm3; After the input feature Pi3 is downsampled by a 3×3 convolution with a stride of 2, it is fused with the input feature Pi4 and the upsampled intermediate feature Pm5 through a splicing operation to obtain the intermediate feature Pm4; After the input feature Pi4 is downsampled by a 3×3 convolution with a stride of 2, it is fused with the input feature Pi5 through a splicing operation to obtain the intermediate feature Pm5; The screening operation includes converting the rail image into a grayscale image, calculating the maximum grayscale value, the minimum grayscale value, the average grayscale value of each row of pixels in the grayscale image, and the global average grayscale value of the grayscale image, and determining the rail image that may have cracks according to the difference between the maximum grayscale value and the minimum grayscale value and the relationship between the average grayscale value and a preset range; Wherein, determining a rail image that may have cracks according to the difference between the maximum grayscale value and the minimum grayscale value and the relationship between the average grayscale value and a preset range includes: If the difference between the maximum grayscale value and the minimum grayscale value is not within the preset range, it is determined that no cracks occur in the row of pixels; If the difference between the maximum grayscale value and the minimum grayscale value is within the preset range, and the average grayscale value is not within the preset range, it is determined that no cracks occur in the row of pixels; If the difference between the maximum grayscale value and the minimum grayscale value and the average grayscale value are both within the preset range, it is determined that cracks occur in the row of pixels; If cracks appear in any row of pixels, the rail image is determined to be an image that may have cracks; The preset range is [(1-k)Gg, (1+k)Gg], where Gg is the global average grayscale value and k is the threshold coefficient.

5. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the on-line detection method for rail fracture according to any one of claims 1-3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the online rail fracture detection method according to any one of claims 1 to 3 when executed.

Citation Information

Patent Citations

  • Track surface defect detection method, electronic equipment and storage medium

    CN117495793A