Track foreign matter dark light detection method and device based on change detection
Through the improved DSIFN change detection algorithm, combined with edge information enhancement structure and adaptive weight pooling operator, the problem of insufficient recognition ability of traditional orbit intrusion detection under low illumination conditions is solved, and efficient detection of orbital foreign objects in dark light conditions is achieved.
Patent Information
- Application Number
- CN202510270479.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-06-27
AI Technical Summary
In existing rail transit, traditional rail intrusion detection relies on manual monitoring and deep learning object detection algorithms, which have problems such as high false alarm rate, poor real-time performance, high data dependence, and difficult to identify targets in dark light areas under low illumination conditions.
The orbital foreign object dark light detection method is adopted based on change detection. Through the improved DSIFN change detection algorithm, edge information enhancement structure and adaptive weight pooling operator are added to optimize the detection model to improve the detection capability under dark light conditions.
It realizes efficient and accurate detection of orbital foreign objects, enhances the recognition ability under dark light conditions, and has good adaptability and detailed information feature expression ability.
Smart Images

Figure CN120220018A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of rail transit safety monitoring, and more specifically, relates to a method and device for detecting foreign objects in the dark on rails based on change detection. Background Art
[0002] With the rapid development of rail transit, rail transit safety monitoring has become an important link to ensure the safe operation of rail transit. The detection of foreign object intrusion on rails is an important part of the railway safety guarantee system, mainly used to detect foreign objects on railway tracks to prevent foreign objects from damaging trains and railway facilities.
[0003] Currently, traditional rail intrusion detection mainly relies on manual monitoring and object detection algorithms based on deep learning, which have problems such as high false alarm rates, poor real-time performance, and high data dependence. Existing closed-set object detection algorithms require a large amount of data for training to obtain a detection algorithm for a specific category, and in low-light conditions, it is more difficult to identify objects in dark areas, especially the problem of missed alarms at night is more prominent.
[0004] Therefore, developing an efficient and accurate rail foreign object intrusion detection algorithm is of great significance for improving rail transit safety. Summary of the Invention
[0005] The present invention aims to overcome at least one defect of the above-mentioned existing technologies, and provides a method for detecting foreign objects in the dark on rails based on change detection to make up for the deficiencies of rail foreign object intrusion detection. For business scenario requirements where the types of foreign objects cannot be exhausted and a certain generalization is required, traditional object detection algorithms can no longer meet this recognition requirement, and the recognition ability of objects in low-light conditions is weaker. Therefore, the rail foreign object intrusion event is captured through change detection, and an edge information enhancement structure and an adaptive weight pooling operator are added to the basic change detection algorithm DSIFN for optimization to improve the detection ability in low-light conditions.
[0006] The present invention also discloses a device loaded with the method for detecting foreign objects in the dark on rails based on change detection.
[0007] The detailed technical solution of the present invention is as follows:
[0008] A method for detecting foreign objects in the dark on rails based on change detection, the method comprising:
[0009] S1. Obtain an image frame set of the rail site and its corresponding alarm area information, where the image frame set includes a background frame and a plurality of analysis frames;
[0010] S2. Input the background frame and the analysis frames into an improved DSIFN change detection algorithm for comparative analysis to obtain the changed areas on the analysis frames;
[0011] S3. Filter the changed areas on the analysis frame based on the alarm area information in S1, retain the changed areas corresponding to the track plane in the analysis frame, obtain their coordinate information and output an alarm.
[0012] Preferably according to the present invention, in S1, obtaining the image frame set of the track site specifically includes:
[0013] Obtain the video stream data captured by the camera device at the track site;
[0014] Decode the video stream data into an image frame set;
[0015] Obtain the first frame of the video as the background frame and obtain the analysis frame at an interval of 1 s.
[0016] Preferably according to the present invention, in S2, the improved DSIFN change detection algorithm specifically modifies the model structure of the DSIFN change detection algorithm, including: adding an edge information enhancement structure, which uses the Sobel operator to calculate the image gradient to obtain edge information and enhance the detailed texture information, and transmits rich low-frequency information through skip connections on the residual module to capture the global information of the business scenario.
[0017] Preferably according to the present invention, in S2, the improved DSIFN change detection algorithm specifically modifies the model structure of the DSIFN change detection algorithm, and further includes: introducing adaptive weight pooling in the upsampling stage to improve the capture ability of the target under low-light conditions, and the adaptive weight pooling assigns weights w to the pixels in each pooling window ij , which is expressed as follows:
[0018]
[0019] where w ij represents the learnable weight of the (i, j)th pixel in the pooling window, H×W represents the pooling window size, and y represents the pooling result.
[0020] Preferably according to the present invention, S2 further includes: obtaining the on-site track scene data as a training data set, selecting paired data with change information in the same scene to construct a training sample set, and dividing the training and test sets in a ratio of 9:1 for training and testing the improved DSIFN change detection algorithm.
[0021] In another aspect of the present invention, there is provided a device for implementing the method for detecting foreign objects on a track in low light based on change detection, and the device includes:
[0022] A data acquisition module, configured to acquire an image frame set of the track site and its corresponding warning area information, where the image frame set includes a background frame and a plurality of analysis frames;
[0023] A change detection module, configured to input the background frame and the analysis frames into an improved DSIFN change detection algorithm for comparative analysis to obtain the changed areas on the analysis frames;
[0024] An alarm analysis module, configured to filter the changed areas on the analysis frames based on the warning area information, retain the changed areas corresponding to the track surface in the analysis frames, obtain their coordinate information and output an alarm.
[0025] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0026] A method for detecting foreign objects in the dark on tracks based on change detection provided by the present invention, based on an optimized DSIFN change detection algorithm, can perform open-set detection of foreign objects on tracks and has a certain adaptability to different service scenarios. For dark targets, it still has a good recognition effect, enhancing the feature expression ability of detailed information and the capture strength of change information. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a comparison diagram of the optimized structure of the model described in the present invention.
[0028] Figure 2 It is a schematic diagram of the recognition scenarios at different time points in Embodiment 1 of the present invention.
[0029] Figure 3 It is a mask schematic diagram of change detection in Embodiment 1 of the present invention.
[0030] Figure 4 It is a recognition result diagram after filtering the warning areas in Embodiment 1 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] The present invention will be further described below in conjunction with the drawings and embodiments.
[0032] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0033] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they specify the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0034] Without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0035] The following further describes the method and device for detecting foreign objects in the dark on the track based on change detection of the present invention in combination with specific embodiments.
[0036] Embodiment 1
[0037] This embodiment provides a method for detecting foreign objects in the dark on the track based on change detection. The method includes:
[0038] S1. Obtain an image frame set of the track site and its corresponding alarm area information. The image frame set includes a background frame and a number of analysis frames.
[0039] In this embodiment, the obtaining of the image frame set of the track site specifically includes:
[0040] Obtain the video stream data V_data captured by the camera device at the track site;
[0041] Decode the video stream data V_data into an image frame set I_data;
[0042] Obtain the first frame of the video as the background frame, and obtain a number of analysis frames at a time interval of 1 s.
[0043] That is, obtain paired images at different time points according to time points, as Figure 2 shown. The paired images are composed of the background frame of the first frame and the analysis frames of each subsequent frame.
[0044] In this embodiment, the alarm area information refers to the contour coordinates P(X, Y) of the alarm area corresponding to the shooting point of the camera device at the track site. For example, in an actual scenario, the alarm area coordinates are actually [(30, 125), (92, 122), (35, 980), (95, 988)].
[0045] S2. Input the background frame and the analysis frames into an improved DSIFN change detection algorithm for comparative analysis to obtain the changed areas on the analysis frames.
[0046] In this embodiment, the improved DSIFN change detection algorithm can specifically modify the model structure of the DSIFN change detection algorithm, which specifically includes: adding an edge information enhancement structure to enhance the detailed texture information, and introducing an adaptive weight pooling to reduce the loss of key region information. The optimized network structure is as follows Figure 1 shown. The optimized model structure includes a convolutional layer (Conv), a short connection layer (Concat), an edge extraction layer based on the image height and width (Sobel_h, Sobel_w), a residual structure (ResBlock), and activation layers (Relu, Softmax). After being processed by the model, a feature map is output.
[0047] Specifically, the edge information enhancement structure uses the Sobel discrete operator to calculate the image gradient to obtain edge information and enhance the detailed texture information, and performs Sobel calculations in both the horizontal and vertical directions; then uses convolution to re-extract the edge information and adds a residual structure to enhance the information flow, and transmits rich low-frequency information through skip connections on the residual module to capture the global information of the business scenario.
[0048] Adaptive weight pooling is introduced in the upsampling stage to improve the capture ability of the target under low-light conditions, that is, the traditional pooling layer is improved by introducing learnable weights, and the conventional pooling operator is replaced by the way of learnable weights, so that the model dynamically adjusts the weight of each pixel in the pooling process, so as to retain more critical region information (such as small target features) in the captured global information, which is equivalent to amplifying the amplitude of the specific change information and enhancing the detail capture ability.
[0049] Adaptive weight pooling assigns a weight w ij to each pixel in the pooling window, dynamically adjusting the proportion of each pixel in the pooling output, which is expressed as follows:
[0050]
[0051] where w ij represents the learnable weight of the (i, j)th pixel in the pooling window, H×W represents the pooling window size, and y represents the pooling result.
[0052] By learning the weight w ij , the model can dynamically focus on the important features in the window while weakening the unimportant features.
[0053] After the model structure of the DSIFN change detection algorithm is adjusted, model training is carried out.
[0054] Obtain on-site track scene data as the training data set, select paired data with changing information in the same scene to construct the training sample set, divide the training and test sets in a ratio of 9:1 for training and testing the improved DSIFN change detection algorithm. During the model training process, set the learning rate to 0.01 and train for 300 rounds to obtain the optimized DSIFN change detection model, and then deploy it to the actual application of track foreign object low-light detection.
[0055] Input both the background frame and each analysis frame into the improved DSIFN change detection algorithm, compare and analyze the changing areas of the background frame and each analysis frame, count the closeness of pixels, determine the intrusion target from nothing to something, and obtain the mask result of the changing area on the analysis frame, as Figure 3 shown.
[0056] S3. Filter the changing area on the analysis frame based on the alarm area information in S1, retain the changing area corresponding to the track surface in the analysis frame, obtain its coordinate information and output an alarm.
[0057] That is, after obtaining the mask result of the changing area on the analysis frame, calculate the overlap degree according to the contour coordinates of the mask result and the contour coordinates of the alarm area. If the overlap degree of the two contours is greater than 0.2, it is considered that the target is within the alarm area, otherwise it is considered not within the alarm area and the result is filtered. Obtain the mask coordinates within the alarm area, map the external contour of the mask to a rectangular box, obtain the coordinate information according to the four vertex coordinates of the rectangular box, and output an alarm. As Figure 4 shown.
[0058] The track foreign object low-light detection method based on change detection of the present invention has a good recognition effect on track intrusion targets without relying on a large amount of supervised data and when the recognition types are inexhaustible. It enhances the feature information expression of key areas through the edge information enhancement structure and adaptive weight pooling, and has a better capture ability for weak changes under low-light conditions.
[0059] Embodiment 2
[0060] This embodiment provides a device for implementing the track foreign object low-light detection method based on change detection. The device includes:
[0061] A data acquisition module for acquiring a set of image frames of the track site and its corresponding alarm area information, where the set of image frames includes a background frame and several analysis frames;
[0062] A change detection module for inputting the background frame and the analysis frame into the improved DSIFN change detection algorithm for comparative analysis to obtain the changing area on the analysis frame;
[0063] An alarm analysis module is used to filter the changed areas on the analysis frame based on the alarm area information, retain the changed areas corresponding to the orbit plane in the analysis frame, obtain their coordinate information and output an alarm.
[0064] Obviously, the above-mentioned embodiments of the present invention are merely examples for clearly explaining the technical solutions of the present invention, rather than limitations on the specific implementation manners of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the claims of the present invention shall be included within the protection scope of the claims of the present invention.
Claims
1. A method for detecting foreign objects in track in dark light based on change detection, characterized in that: The method comprises: S1. Acquire a set of image frames at a track site and corresponding warning area information, wherein the set of image frames includes a background frame and a plurality of analysis frames; S2, inputting the background frame and the analysis frame into the improved DSIFN change detection algorithm for comparative analysis, and obtaining the change area on the analysis frame; S3. Filter the changed area on the analysis frame based on the warning area information in S1, retain the changed area on the corresponding track surface in the analysis frame, obtain its coordinate information and output an alarm.
2. The track foreign body dark light detection method based on change detection according to claim 1 is characterized in that: In S1, obtaining a set of image frames of the track site specifically includes: Obtain video stream data captured by the on-site camera device on the track; Decoding the video stream data into a set of image frames; The first frame of the video is obtained as the background frame, and analysis frames are obtained at intervals of 1 s.
3. The track foreign body dark light detection method based on change detection according to claim 1, characterized in that: In S2, the improved DSIFN change detection algorithm specifically modifies the model structure of the DSIFN change detection algorithm, including: adding an edge information enhancement structure, which uses the Sobel operator to calculate the image gradient to obtain edge information and enhance detail texture information, and transmits rich low-frequency information through jump connections on the residual module to capture the global information of the business scenario.
4. The track foreign body dark light detection method based on change detection according to claim 3 is characterized in that: In S2, the improved DSIFN change detection algorithm specifically modifies the model structure of the DSIFN change detection algorithm, and also includes: introducing adaptive weight pooling in the upsampling stage to improve the target capture capability under dark light conditions, wherein the adaptive weight pooling assigns a weight w to each pixel in the pooling window. ij , which is expressed as follows: Among them, w ij represents the learnable weight of the (i, j)th pixel in the pooling window, H×W represents the size of the pooling window, and y represents the pooling result.
5. The track foreign body dark light detection method based on change detection according to claim 4 is characterized in that: The S2 also includes: obtaining on-site track scene data as a training data set, selecting paired data with change information in the same scene to construct a training sample set, and dividing the training and test sets in a ratio of 9:1 to train and test the improved DSIFN change detection algorithm.
6. A device for implementing a track foreign body dark light detection method based on change detection, characterized in that: The device comprises: A data acquisition module, used to acquire a set of image frames at the track site and corresponding warning area information, wherein the set of image frames includes a background frame and a plurality of analysis frames; A change detection module, used for inputting the background frame and the analysis frame into the improved DSIFN change detection algorithm for comparative analysis, and obtaining a change area on the analysis frame; The alarm analysis module is used to filter the changed area on the analysis frame based on the alarm area information, retain the changed area on the corresponding track surface in the analysis frame, obtain its coordinate information and output an alarm.