A method for detecting bird nests along railway catenary based on an improved RT-DETR

By using an improved RT-DETR network, employing multi-branch deep convolution and multi-scale feature weighted fusion mechanisms, and combining a multi-path spatial decoupling structure with StarBlock's second-order semantic interaction mechanism, the problem of insufficient accuracy and generalization ability in bird nest detection along railway catenary was solved, achieving efficient and accurate detection of bird nests.

CN121725360BActive Publication Date: 2026-04-17EAST CHINA JIAOTONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
EAST CHINA JIAOTONG UNIVERSITY
Filing Date
2026-02-13
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies for detecting bird nests along railway catenary systems suffer from problems such as the significant impact of complex scenarios, insufficient detection accuracy, and limited generalization ability, making it difficult to achieve real-time, rapid early detection and accurate differentiation of bird nests from the background.

Method used

An improved RT-DETR network is adopted, which uses multi-branch deep convolution and multi-scale feature weighted fusion mechanism, combined with multi-path spatial decoupling structure and StarBlock second-order semantic interaction mechanism to adaptively select receptive field, realize unified modeling of different scales and textures, improve the fineness and robustness of feature expression, and capture the combination relationship between bird nest and background.

Benefits of technology

It improves the accuracy and generalization ability of bird nest detection along railway catenary, reduces the false detection and false negative rates, and enables effective detection in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121725360B_ABST
    Figure CN121725360B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image recognition and proposes a method for detecting bird nests along railway catenary networks based on an improved RT-DETR. Through multi-branch deep convolution and multi-scale feature weighted fusion mechanisms, it adaptively selects responses from different receptive fields to achieve unified modeling of small-scale bird nests, fine twig textures, and large-scale structures such as towers and beams. This improves the precision and robustness of feature representation without significantly increasing the number of parameters and computational load, reducing the loss of small targets and insufficient feature representation. Furthermore, through a multi-path spatial decoupling structure and a second-order semantic interaction mechanism using StarBlock, it models tower geometry, conductor texture, and background information at near and far scales, enabling the network to capture the combined relationships between "branches—supporting components—background regions," thereby more accurately distinguishing bird nests from similar textures such as rust, stains, and shadows, significantly reducing false positives and false negatives. This invention improves the accuracy and generalization ability of bird nest detection along railway catenary networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition, and in particular to a method for detecting bird nests along railway catenary based on an improved RT-DETR. Background Technology

[0002] As my country's high-speed railway network continues to expand, the safety and stability of the traction power supply system are becoming increasingly important. Among these issues, bird damage along the overhead contact line has become one of the main external hazards to power supply equipment. Because birds have the habit of perching and nesting at high altitudes, they often choose to build nests at locations such as overhead contact line supports, beams, disconnector bases, and compensation devices. The branches and wires they carry can easily cause short circuits or flashovers in live parts, leading to power outages. In severe cases, it can even cause contact wire breakage, equipment burnout, and even endanger train operation safety. Therefore, taking effective measures for prevention and control is crucial.

[0003] In existing technologies, traditional bird control methods are mainly divided into two categories: physical bird deterrence and manual patrols. Physical measures involve installing bird spikes, bird shields, bird nets, light-screen bird deterrent windmills, sonic bird deterrents, or ABS large umbrella skirt devices in areas where birds are likely to land and nest. These measures prevent birds from stopping or nesting by altering the environment or increasing disturbance. Some lines also have artificial bird-attracting facilities to lure birds away from electrical equipment, reducing the risk of nesting in critical areas. Manual patrols rely on off-line patrol personnel and the 2C contact network inspection system for regular checks. Bird nests are identified and removed by manually viewing images to control the risk of bird damage. However, with the increase in line mileage and the concentration of bird nests, the limitations of these measures have become increasingly apparent. Physical bird deterrence is a passive form of protection, and its effectiveness is easily affected by seasonal changes. Factors such as season, wind direction, sunlight, and material aging can influence bird activity, causing birds to gradually adapt to disturbances and continue nesting in nearby areas. Manual inspections rely on personnel experience and inspection frequency. During peak bird damage periods, the number of newly added nests is large and their locations are scattered, limiting the efficiency of manual identification and leading to missed, delayed, or even misjudged nests. Furthermore, the sheer volume of 2C image and video data makes manual analysis insufficient to meet the demands of high-frequency inspections and hinders real-time, rapid early detection. These traditional methods are largely reactive, failing to provide early warnings and proactive intervention. Existing deep learning detection models also exhibit shortcomings in overhead contact line scenarios. Because bird nests vary in shape and scale across different equipment structures, have complex backgrounds, and are highly camouflaged, traditional CNNs... The backbone network uses a fixed convolutional kernel structure, resulting in insufficient feature extraction capabilities and an inability to adaptively perceive different scales and complex texture details. This easily leads to problems such as small target loss and insufficient feature representation. In addition, traditional feature fusion structures rely on linear stacking for cross-scale feature fusion, lacking the ability to model higher-order semantic interactions. In real-world catenary scenarios, bird nests are often obscured by complex backgrounds, such as being camouflaged in the shadows of supports, behind wire clamps, or at the edges of insulators. Structures lacking higher-order channel relationship modeling struggle to distinguish subtle differences between bird nests and the background, leading to false positives and false negatives. Moreover, the multi-branch feature interaction efficiency of such structures is low, making it difficult to effectively integrate multi-path spatial features and limiting the model's expressive ability in complex scenarios. Furthermore, existing detection models mostly rely on fixed convolutional structures and static feature extraction strategies, which makes the model's generalization ability insufficient when faced with input distribution changes caused by different shooting devices (mobile phones, 2C systems, surveillance cameras), different lighting, and different viewing angles, easily leading to performance instability.

[0004] Therefore, it is necessary to design a method for detecting bird nests along railway catenary lines that avoids the influence of complex scenarios in order to improve the accuracy and generalization ability of the detection. Summary of the Invention

[0005] Based on this, this invention proposes a method for detecting bird nests along railway catenary networks based on an improved RT-DETR. A backbone network is designed, which adaptively selects responses from different receptive fields through multi-branch deep convolution and multi-scale feature weighted fusion mechanisms. This achieves unified modeling of small-scale bird nests, fine twig textures, and large-scale structures such as towers and beams. Without significantly increasing the number of parameters and computation, the method improves the precision and robustness of feature representation, reduces the loss of small targets and insufficient feature representation, and avoids the problem of difficulty adapting to large variations in bird nest scale and fragmented textures. Furthermore, a neck feature fusion network is designed, which models tower geometry, conductor texture, and near-far scale background information through a multi-path spatial decoupling structure and a second-order semantic interaction mechanism with StarBlock. This enables the network to capture the combination relationship between "branches—supporting components—background areas," thereby more accurately distinguishing bird nests from similar textures such as rust, stains, and shadows, significantly reducing false detections and missed detections. This invention improves the accuracy and generalization ability of bird nest detection along railway catenary networks.

[0006] This invention proposes a method for detecting bird nests along railway catenary based on an improved RT-DETR, comprising:

[0007] Collect and preprocess the inspection images to be detected, and input the preprocessed inspection images to the backbone feature extraction network;

[0008] The backbone feature extraction network extracts features to obtain backbone features, and inputs the backbone features into the neck feature fusion network. The backbone feature extraction network is based on the RT-DETR framework and includes a dynamic multi-scale convolution module. The dynamic multi-scale convolution module is based on multi-branch depthwise convolution and multi-scale feature weighted fusion mechanism.

[0009] The neck feature fusion network performs feature semantic enhancement fusion to obtain neck fusion features, decodes and outputs the neck fusion features to obtain the final detection result. The neck feature fusion network includes a multi-path high-order semantic interaction module, which is based on a multi-path spatial decoupling structure and a second-order semantic interaction mechanism of StarBlock.

[0010] In summary, based on the aforementioned improved RT-DETR-based method for detecting bird nests along railway catenary networks, a backbone network was designed. Through multi-branch deep convolution and multi-scale feature weighted fusion mechanisms, it adaptively selects responses from different receptive fields, achieving unified modeling of small-scale bird nests, fine twig textures, and large-scale structures such as towers and beams. This improves the precision and robustness of feature representation without significantly increasing the number of parameters and computational load, reducing the loss of small targets and insufficient feature representation. It also avoids the problem of difficulty adapting to large variations in bird nest scale and fragmented textures. Furthermore, a neck feature fusion network was designed, using a multi-path spatial decoupling structure and a second-order semantic interaction mechanism with StarBlock to model tower geometry, conductor texture, and background information at near and far scales. This enables the network to capture the combination relationship between "branches—supporting components—background areas," thereby more accurately distinguishing bird nests from similar textures such as rust, stains, and shadows, significantly reducing false detections and missed detections. This invention improves the accuracy and generalization ability of bird nest detection along railway catenary networks. Specifically, the process involves acquiring and preprocessing inspection images, then inputting the preprocessed images into a backbone feature extraction network. This network extracts backbone features, which are then input into a neck feature fusion network. The backbone feature extraction network, based on the RT-DETR framework, includes a dynamic multi-scale convolution module. This module utilizes multi-branch depthwise convolution and a multi-scale feature weighted fusion mechanism to adaptively select responses from different receptive fields. This enables unified modeling of small-scale bird nests and fine twig textures, as well as large-scale structures like towers and beams. This improves the precision and robustness of feature representation without significantly increasing the number of parameters and computational load, and reduces the loss of small targets and insufficient feature representation. To address the challenges of adapting to varying bird nest sizes and intricate textures, the neck feature fusion network employs semantic enhancement fusion to acquire neck fusion features. These features are then decoded and output to obtain the final detection result. The neck feature fusion network includes a multi-path high-order semantic interaction module. This module, based on a multi-path spatial decoupling structure and StarBlock's second-order semantic interaction mechanism, models tower geometry, conductor texture, and background information at varying distances. This allows the network to capture the combined relationships between branches, supporting components, and background areas, thereby more accurately distinguishing bird nests from similar textures such as rust, stains, and shadows. This significantly reduces false positives and false negatives. This invention improves the accuracy and generalization ability of bird nest detection along railway catenary lines.

[0011] Furthermore, the step of the backbone feature extraction network extracting features to obtain backbone features specifically includes:

[0012] The backbone feature extraction network is based on the RT-DETR framework and includes a dynamic multi-scale convolution module. The dynamic multi-scale convolution module is based on residual connections and a multi-branch depthwise convolution and multi-scale feature weighted fusion mechanism.

[0013] The multi-branch depthwise convolution extracts multi-scale features based on convolutional branches with different kernel sizes, and extracts global semantic vectors based on global average pooling.

[0014] The multi-scale feature weighted fusion mechanism includes generating multi-scale branch fusion weights based on a lightweight multilayer perceptron and performing dynamic weighted fusion to obtain weighted fusion features.

[0015] Scaling is performed based on a learnable scaling factor to obtain the backbone features. The specific algorithm for obtaining the backbone features is as follows:

[0016] ,

[0017] in, Indicates the main characteristics, Indicates input features, This represents the learnable scaling factor. This indicates the weighted fusion feature.

[0018] Furthermore, the steps of extracting multi-scale features based on convolutional branches with different kernel sizes and extracting global semantic vectors based on global average pooling specifically include:

[0019] The input features are passed through convolutional branches with different kernel sizes to obtain multi-scale features. The specific algorithm for obtaining multi-scale features is as follows:

[0020] ,

[0021] in, Representing multi-scale features, Represents depthwise convolution. Indicates the kernel size. Indicates any branch size. Indicates the largest branch size. Represents input features;

[0022] Global average pooling is performed on the input features to obtain the spatial average value of each channel, which is then used to construct a global semantic vector. The specific algorithm for constructing the global semantic vector is as follows:

[0023] ,

[0024] ,

[0025] in, Indicates the spatial average value. and These represent the height and width of the feature, respectively. and These represent the ordinal numbers of the feature's height and width, respectively. Indicates the channel ordinal number. Indicates the number of channels. Represents the global semantic vector. This indicates transpose.

[0026] Furthermore, the step of generating multi-scale branch fusion weights based on a lightweight multilayer perceptron and performing dynamic weighted fusion to obtain weighted fusion features specifically includes:

[0027] The global semantic vector is input into a lightweight multilayer perceptron, which consists of two layers. The process first performs channel compression and then expansion, and then obtains high-level semantic features through nonlinear activation to generate fusion weights for branches of different sizes.

[0028] The specific algorithm for generating the fusion weights is as follows:

[0029] ,

[0030] ,

[0031] ,

[0032] in, Represents high-level semantic features. This represents the activation function. Indicates the weights of the first layer. , Representing dimension, Indicates the number of channels. Indicates the fusion weight. express function, This indicates the weights of the second layer. Indicates the branch fusion weight. Indicates any branch size. Indicates the largest branch size;

[0033] The multi-scale features are linearly weighted and summed channel-wise and spatially according to the corresponding branch fusion weights to obtain the weighted fusion features. The specific algorithm for obtaining the weighted fusion features is as follows:

[0034] ,

[0035] in, Indicates the weighted fusion characteristics, It represents multi-scale features.

[0036] Furthermore, the step of the neck feature fusion network performing feature semantic enhancement fusion to obtain neck fusion features specifically includes:

[0037] The neck feature fusion network includes a multi-path high-order semantic interaction module, which is based on a multi-path spatial decoupling structure and a second-order semantic interaction mechanism of StarBlock.

[0038] The backbone features are rearranged and compressed using lightweight 1×1 convolutions. Based on the multi-path structure, the backbone features are split into four subspaces to extract intermediate features separately. The specific algorithm for extracting the intermediate features is as follows:

[0039] ,

[0040] in, Indicates intermediate features. This represents the convolution operator corresponding to the multipath structure. Representing subspace, Indicates the subspace ordinal number;

[0041] The intermediate features of each path are input into StarBlock to perform explicit second-order semantic interactions to obtain explicit second-order features.

[0042] Explicit second-order features are aggregated to obtain neck fusion features.

[0043] Furthermore, the step of inputting the intermediate features of each path into StarBlock for explicit second-order semantic interaction to obtain explicit second-order features specifically includes:

[0044] The specific algorithm for obtaining explicit second-order features by performing explicit second-order semantic interactions on intermediate features of a single path is as follows:

[0045] ,

[0046] ,

[0047] in, and These represent two different linear projections within the same path. and These represent different learnable linear transformations. Indicates intermediate features. This indicates an explicit second-order feature. Represents a non-linear activation function. This represents the Hadamard product.

[0048] Furthermore, the step of aggregating explicit second-order features to obtain neck fusion features specifically includes:

[0049] The explicit second-order features of each path are concatenated along the channel dimension to obtain semantically enhanced features. The specific algorithm for obtaining semantically enhanced features is as follows:

[0050] ,

[0051] in, This represents semantic enhancement features. Indicates splicing, These represent the explicit second-order features of different paths;

[0052] The semantic enhancement features are aggregated to obtain neck fusion features. The specific algorithm for obtaining the neck fusion features is as follows:

[0053] ,

[0054] in, Indicates neck fusion features. It indicates a lightweight focus of attention.

[0055] This invention proposes a bird nest detection system along railway catenary based on an improved RT-DETR, comprising:

[0056] The acquisition module is used to acquire inspection images and perform preprocessing, and then input the preprocessed inspection images into the backbone feature extraction network.

[0057] The feature extraction module is used to extract features from the backbone feature extraction network to obtain backbone features. The backbone features are then input into the neck feature fusion network. The backbone feature extraction network is based on the RT-DETR framework and includes a dynamic multi-scale convolution module. The dynamic multi-scale convolution module is based on a multi-branch depthwise convolution and a multi-scale feature weighted fusion mechanism.

[0058] The feature fusion module is used to perform feature semantic enhancement fusion on the neck feature fusion network to obtain neck fusion features, decode the neck fusion features and output them to obtain the final detection result. The neck feature fusion network includes a multi-path high-order semantic interaction module, which is based on a multi-path spatial decoupling structure and a second-order semantic interaction mechanism of StarBlock.

[0059] The present invention also provides a storage medium storing one or more programs that, when executed by a processor, implement the above-described method for detecting bird nests along railway catenary based on improved RT-DETR.

[0060] The present invention also provides a computer device, the computer device including a memory and a processor, wherein:

[0061] The memory is used to store computer programs;

[0062] When the processor executes the computer program stored in the memory, it implements the above-described method for detecting bird nests along railway catenary based on the improved RT-DETR. Attached Figure Description

[0063] Figure 1 This is a flowchart of the method for detecting bird nests along railway catenary based on improved RT-DETR proposed in the first embodiment of the present invention;

[0064] Figure 2 This is a schematic diagram of the structure of the improved RT-DETR-based bird nest detection system along the railway catenary proposed in the second embodiment of the present invention;

[0065] Figure 3 This is a schematic diagram of the backbone feature extraction network proposed in this invention;

[0066] Figure 4 This is a schematic diagram of the neck feature fusion network proposed in this invention;

[0067] Figure 5 This is a flowchart of the logic of StarBlock proposed in this invention.

[0068] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0069] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0070] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.

[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0072] Please see Figure 1 The diagram shows a flowchart of a method for detecting bird nests along railway catenary based on an improved RT-DETR, as proposed in the first embodiment of the present invention. This method includes steps S01 to S03, wherein:

[0073] Step S01: Collect the inspection image to be detected and preprocess it, then input the preprocessed inspection image to be detected into the backbone feature extraction network;

[0074] Step S02: The backbone feature extraction network extracts features to obtain backbone features, and inputs the backbone features into the neck feature fusion network;

[0075] It should be noted that in this embodiment, the backbone feature extraction network is based on the RT-DETR framework. The backbone feature extraction network includes a dynamic multi-scale convolution module, which is based on a multi-branch depthwise convolution and a multi-scale feature weighted fusion mechanism. For the specific structure of the backbone feature extraction network, please refer to [link to documentation]. Figure 3 ;

[0076] Specifically, it includes: the backbone feature extraction network is based on the RT-DETR framework, including a dynamic multi-scale convolution module, which is based on residual connections and a multi-branch deep convolution and multi-scale feature weighted fusion mechanism;

[0077] The multi-branch depthwise convolution extracts multi-scale features based on convolutional branches with different kernel sizes, and extracts global semantic vectors based on global average pooling.

[0078] The multi-scale feature weighted fusion mechanism includes generating multi-scale branch fusion weights based on a lightweight multilayer perceptron and performing dynamic weighted fusion to obtain weighted fusion features.

[0079] Scaling is performed based on a learnable scaling factor to obtain the backbone features. The specific algorithm for obtaining the backbone features is as follows:

[0080] ,

[0081] in, Indicates the main characteristics, Indicates input features, This represents the learnable scaling factor. This indicates the weighted fusion feature.

[0082] The input features are passed through convolutional branches with different kernel sizes to obtain multi-scale features. The specific algorithm for obtaining multi-scale features is as follows:

[0083] ,

[0084] in, Representing multi-scale features, Represents depthwise convolution. Indicates the kernel size. Indicates any branch size. Indicates the largest branch size. Represents input features;

[0085] Global average pooling is performed on the input features to obtain the spatial average value of each channel, which is then used to construct a global semantic vector. The specific algorithm for constructing the global semantic vector is as follows:

[0086] ,

[0087] ,

[0088] in, Indicates the spatial average value. and These represent the height and width of the feature, respectively. and These represent the ordinal numbers of the feature's height and width, respectively. Indicates the channel ordinal number. Indicates the number of channels. Represents the global semantic vector. This indicates transpose.

[0089] The global semantic vector is input into a lightweight multilayer perceptron, which consists of two layers. The process first performs channel compression and then expansion, and then obtains high-level semantic features through nonlinear activation to generate fusion weights for branches of different sizes.

[0090] The specific algorithm for generating the fusion weights is as follows:

[0091] ,

[0092] ,

[0093] ,

[0094] in, Represents high-level semantic features. This represents the activation function. Indicates the weights of the first layer. , Representing dimension, Indicates the number of channels. Indicates the fusion weight. express function, This indicates the weights of the second layer. Indicates the branch fusion weight. Indicates any branch size. Indicates the largest branch size;

[0095] The multi-scale features are linearly weighted and summed channel-wise and spatially according to the corresponding branch fusion weights to obtain the weighted fusion features. The specific algorithm for obtaining the weighted fusion features is as follows:

[0096] ,

[0097] in, Indicates the weighted fusion characteristics, It represents multi-scale features.

[0098] Step S03: The neck feature fusion network performs feature semantic enhancement fusion to obtain neck fusion features, decodes and outputs the neck fusion features to obtain the final detection result;

[0099] It should be noted that in this embodiment, the neck feature fusion network includes a multi-path high-order semantic interaction module. This module is based on a multi-path spatial decoupling structure and StarBlock's second-order semantic interaction mechanism. For the specific structure of the neck feature fusion network, please refer to [link to documentation]. Figure 4 ;

[0100] The neck feature fusion network includes a multi-path high-order semantic interaction module. This module is based on a multi-path spatial decoupling structure and a second-order semantic interaction mechanism of StarBlock. For the specific logic flow of StarBlock, please refer to [link / reference needed]. Figure 5 ;

[0101] The backbone features are rearranged and compressed using lightweight 1×1 convolutions. Based on the multi-path structure, the backbone features are split into four subspaces to extract intermediate features separately. The specific algorithm for extracting the intermediate features is as follows:

[0102] ,

[0103] in, Indicates intermediate features. This represents the convolution operator corresponding to the multipath structure. Representing subspace, Indicates the subspace ordinal number;

[0104] The intermediate features of each path are input into StarBlock to perform explicit second-order semantic interactions to obtain explicit second-order features.

[0105] Explicit second-order features are aggregated to obtain neck fusion features.

[0106] The specific algorithm for obtaining explicit second-order features by performing explicit second-order semantic interactions on intermediate features of a single path is as follows:

[0107] ,

[0108] ,

[0109] in, and These represent two different linear projections within the same path. and These represent different learnable linear transformations. Indicates intermediate features. This indicates an explicit second-order feature. Represents a non-linear activation function. This represents the Hadamard product.

[0110] The explicit second-order features of each path are concatenated along the channel dimension to obtain semantically enhanced features. The specific algorithm for obtaining semantically enhanced features is as follows:

[0111] ,

[0112] in, This represents semantic enhancement features. Indicates splicing, These represent the explicit second-order features of different paths;

[0113] The semantic enhancement features are aggregated to obtain neck fusion features. The specific algorithm for obtaining the neck fusion features is as follows:

[0114] ,

[0115] in, Indicates neck fusion features. It indicates a lightweight focus of attention.

[0116] In summary, based on the aforementioned improved RT-DETR-based method for detecting bird nests along railway catenary networks, a backbone network was designed. Through multi-branch deep convolution and multi-scale feature weighted fusion mechanisms, it adaptively selects responses from different receptive fields, achieving unified modeling of small-scale bird nests, fine twig textures, and large-scale structures such as towers and beams. This improves the precision and robustness of feature representation without significantly increasing the number of parameters and computational load, reducing the loss of small targets and insufficient feature representation. It also avoids the problem of difficulty adapting to large variations in bird nest scale and fragmented textures. Furthermore, a neck feature fusion network was designed, using a multi-path spatial decoupling structure and a second-order semantic interaction mechanism with StarBlock to model tower geometry, conductor texture, and background information at near and far scales. This enables the network to capture the combination relationship between "branches—supporting components—background areas," thereby more accurately distinguishing bird nests from similar textures such as rust, stains, and shadows, significantly reducing false detections and missed detections. This invention improves the accuracy and generalization ability of bird nest detection along railway catenary networks. Specifically, the process involves acquiring and preprocessing inspection images, then inputting the preprocessed images into a backbone feature extraction network. This network extracts backbone features, which are then input into a neck feature fusion network. The backbone feature extraction network, based on the RT-DETR framework, includes a dynamic multi-scale convolution module. This module utilizes multi-branch depthwise convolution and a multi-scale feature weighted fusion mechanism to adaptively select responses from different receptive fields. This enables unified modeling of small-scale bird nests and fine twig textures, as well as large-scale structures like towers and beams. This improves the precision and robustness of feature representation without significantly increasing the number of parameters and computational load, and reduces the loss of small targets and insufficient feature representation. To address the challenges of adapting to varying bird nest sizes and intricate textures, the neck feature fusion network employs semantic enhancement fusion to acquire neck fusion features. These features are then decoded and output to obtain the final detection result. The neck feature fusion network includes a multi-path high-order semantic interaction module. This module, based on a multi-path spatial decoupling structure and StarBlock's second-order semantic interaction mechanism, models tower geometry, conductor texture, and background information at varying distances. This allows the network to capture the combined relationships between branches, supporting components, and background areas, thereby more accurately distinguishing bird nests from similar textures such as rust, stains, and shadows. This significantly reduces false positives and false negatives. This invention improves the accuracy and generalization ability of bird nest detection along railway catenary lines.

[0117] Please see Figure 2 The diagram shows a schematic representation of a railway catenary bird nest detection system based on an improved RT-DETR, as proposed in the second embodiment of the present invention. The system includes:

[0118] A bird nest detection system along railway catenary based on an improved RT-DETR, characterized in that it includes:

[0119] The acquisition module 10 is used to acquire the inspection image to be detected and perform preprocessing, and input the preprocessed inspection image to be detected into the backbone feature extraction network.

[0120] Feature extraction module 20 is used to extract features from the backbone feature extraction network to obtain backbone features, and input the backbone features into the neck feature fusion network. The backbone feature extraction network is based on the RT-DETR framework. The backbone feature extraction network includes a dynamic multi-scale convolution module, which is based on a multi-branch depthwise convolution and a multi-scale feature weighted fusion mechanism.

[0121] The feature fusion module 30 is used to perform feature semantic enhancement fusion on the neck feature fusion network to obtain neck fusion features, decode and output the neck fusion features to obtain the final detection result. The neck feature fusion network includes a multi-path high-order semantic interaction module, which is based on a multi-path spatial decoupling structure and a second-order semantic interaction mechanism of StarBlock.

[0122] The present invention also proposes a computer storage medium storing one or more programs that, when executed by a processor, implement the above-described method for detecting bird nests along railway catenary based on improved RT-DETR.

[0123] The present invention also proposes a computer device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the above-mentioned method for detecting bird nests along railway catenary based on improved RT-DETR.

[0124] Those skilled in the art will understand that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain stored, communicated, propagated, or transmitted programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0125] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0126] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0127] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0128] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for detecting bird nests along railway catenary based on an improved RT-DETR, characterized in that, include: Collect and preprocess the inspection images to be detected, and input the preprocessed inspection images to the backbone feature extraction network; The backbone feature extraction network extracts features to obtain backbone features, and inputs the backbone features into the neck feature fusion network. The backbone feature extraction network is based on the RT-DETR framework and includes a dynamic multi-scale convolution module. The dynamic multi-scale convolution module is based on multi-branch depthwise convolution and multi-scale feature weighted fusion mechanism. The process of extracting features from the backbone feature extraction network to obtain backbone features specifically includes: The backbone feature extraction network is based on the RT-DETR framework and includes a dynamic multi-scale convolution module. The dynamic multi-scale convolution module is based on residual connections and a multi-branch depthwise convolution and multi-scale feature weighted fusion mechanism. The multi-branch depthwise convolution extracts multi-scale features based on convolutional branches with different kernel sizes, and extracts global semantic vectors based on global average pooling. The multi-scale feature weighted fusion mechanism includes generating multi-scale branch fusion weights based on a lightweight multilayer perceptron and performing dynamic weighted fusion to obtain weighted fusion features. Scaling is performed based on a learnable scaling factor to obtain the backbone features. The specific algorithm for obtaining the backbone features is as follows: , in, Indicates the main characteristics, Indicates input features, This represents the learnable scaling factor. Indicates the weighted fusion feature; The neck feature fusion network performs feature semantic enhancement fusion to obtain neck fusion features, decodes and outputs the neck fusion features to obtain the final detection result. The neck feature fusion network includes a multi-path high-order semantic interaction module, which is based on a multi-path spatial decoupling structure and a second-order semantic interaction mechanism of StarBlock. The step of performing feature semantic enhancement fusion on the neck feature fusion network to obtain neck fusion features specifically includes: The neck feature fusion network includes a multi-path high-order semantic interaction module, which is based on a multi-path spatial decoupling structure and a second-order semantic interaction mechanism of StarBlock. The backbone features are rearranged and compressed using lightweight 1×1 convolutions. Based on the multi-path structure, the backbone features are split into four subspaces to extract intermediate features separately. The specific algorithm for extracting the intermediate features is as follows: , in, Indicates intermediate features, This represents the convolution operator corresponding to the multipath structure. Representing subspace, Indicates the subspace ordinal number; The intermediate features of each path are input into StarBlock to perform explicit second-order semantic interactions to obtain explicit second-order features. Explicit second-order features are aggregated to obtain neck fusion features.

2. The method for detecting bird nests along railway catenary based on improved RT-DETR according to claim 1, characterized in that, The steps of extracting multi-scale features based on convolutional branches with different kernel sizes and extracting global semantic vectors based on global average pooling specifically include: The input features are passed through convolutional branches with different kernel sizes to obtain multi-scale features. The specific algorithm for obtaining multi-scale features is as follows: , in, Representing multi-scale features, Represents depthwise convolution. Indicates the kernel size. Indicates any branch size. Indicates the largest branch size. Represents input features; Global average pooling is performed on the input features to obtain the spatial average value of each channel, which is then used to construct a global semantic vector. The specific algorithm for constructing the global semantic vector is as follows: , , in, Indicates the spatial average value. and These represent the height and width of the feature, respectively. and These represent the ordinal numbers of the feature's height and width, respectively. Indicates the channel ordinal number. Indicates the number of channels. Represents the global semantic vector. This indicates transpose.

3. The method for detecting bird nests along railway catenary based on improved RT-DETR according to claim 1, characterized in that, The step of generating multi-scale branch fusion weights based on a lightweight multilayer perceptron and performing dynamic weighted fusion to obtain weighted fusion features specifically includes: The global semantic vector is input into a lightweight multilayer perceptron, which consists of two layers. The process first performs channel compression and then expansion, and then obtains high-level semantic features through nonlinear activation to generate fusion weights for branches of different sizes. The specific algorithm for generating the fusion weights is as follows: , , , in, Represents high-level semantic features. This represents the activation function. Indicates the weights of the first layer. , Representing dimension, Indicates the number of channels. Indicates the fusion weight. express function, This indicates the weights of the second layer. Indicates the branch fusion weight, Indicates any branch size. Indicates the largest branch size; The multi-scale features are linearly weighted and summed channel-wise and spatially according to the corresponding branch fusion weights to obtain the weighted fusion features. The specific algorithm for obtaining the weighted fusion features is as follows: , in, Indicates the weighted fusion characteristics, It represents multi-scale features.

4. The method for detecting bird nests along railway catenary based on improved RT-DETR according to claim 1, characterized in that, The step of inputting the intermediate features of each path into StarBlock for explicit second-order semantic interaction to obtain explicit second-order features specifically includes: The specific algorithm for obtaining explicit second-order features by performing explicit second-order semantic interactions on intermediate features of a single path is as follows: , , in, and These represent two different linear projections within the same path. and These represent different learnable linear transformations. Indicates intermediate features, This indicates an explicit second-order feature. Represents a non-linear activation function. This represents the Hadamard product.

5. The method for detecting bird nests along railway catenary based on improved RT-DETR according to claim 1, characterized in that, The step of aggregating explicit second-order features to obtain neck fusion features specifically includes: The explicit second-order features of each path are concatenated along the channel dimension to obtain semantically enhanced features. The specific algorithm for obtaining semantically enhanced features is as follows: , in, This represents semantic enhancement features. Indicates splicing, These represent the explicit second-order features of different paths; The semantic enhancement features are aggregated to obtain neck fusion features. The specific algorithm for obtaining the neck fusion features is as follows: , in, Indicates neck fusion features. It indicates a lightweight focus of attention.

6. A bird nest detection system along railway catenary based on an improved RT-DETR, characterized in that, include: The acquisition module is used to acquire inspection images and perform preprocessing, and then input the preprocessed inspection images into the backbone feature extraction network. The feature extraction module is used to extract features from the backbone feature extraction network to obtain backbone features. The backbone features are then input into the neck feature fusion network. The backbone feature extraction network is based on the RT-DETR framework and includes a dynamic multi-scale convolution module. The dynamic multi-scale convolution module is based on a multi-branch depthwise convolution and a multi-scale feature weighted fusion mechanism. The process of extracting features from the backbone feature extraction network to obtain backbone features specifically includes: The backbone feature extraction network is based on the RT-DETR framework and includes a dynamic multi-scale convolution module. The dynamic multi-scale convolution module is based on residual connections and a multi-branch depthwise convolution and multi-scale feature weighted fusion mechanism. The multi-branch depthwise convolution extracts multi-scale features based on convolutional branches with different kernel sizes, and extracts global semantic vectors based on global average pooling. The multi-scale feature weighted fusion mechanism includes generating multi-scale branch fusion weights based on a lightweight multilayer perceptron and performing dynamic weighted fusion to obtain weighted fusion features. Scaling is performed based on a learnable scaling factor to obtain the backbone features. The specific algorithm for obtaining the backbone features is as follows: , in, Indicates the main characteristics, Indicates input features, This represents the learnable scaling factor. Indicates the weighted fusion feature; The feature fusion module is used to perform feature semantic enhancement fusion on the neck feature fusion network to obtain neck fusion features, decode the neck fusion features and output them to obtain the final detection result. The neck feature fusion network includes a multi-path high-order semantic interaction module, which is based on a multi-path spatial decoupling structure and a second-order semantic interaction mechanism of StarBlock. The step of performing feature semantic enhancement fusion on the neck feature fusion network to obtain neck fusion features specifically includes: The neck feature fusion network includes a multi-path high-order semantic interaction module, which is based on a multi-path spatial decoupling structure and a second-order semantic interaction mechanism of StarBlock. The backbone features are rearranged and compressed using lightweight 1×1 convolutions. Based on the multi-path structure, the backbone features are split into four subspaces to extract intermediate features separately. The specific algorithm for extracting the intermediate features is as follows: , in, Indicates intermediate features, This represents the convolution operator corresponding to the multipath structure. Representing subspace, Indicates the subspace ordinal number; The intermediate features of each path are input into StarBlock to perform explicit second-order semantic interactions to obtain explicit second-order features. Explicit second-order features are aggregated to obtain neck fusion features.

7. A storage medium, characterized in that, The storage medium stores one or more programs that, when executed by a processor, implement the method for detecting bird nests along railway catenary based on the improved RT-DETR as described in any one of claims 1-5.

8. A computer device, characterized in that, The computer device includes a memory and a processor, wherein: The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the method for detecting bird nests along railway catenary based on the improved RT-DETR as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Lightweight multi-receptive field feature interactive container door handle cover defect detection method

    CN121329870A

  • Road surface disease detection method, system and equipment based on hybrid architecture, and storage medium

    CN121353756A