Railway foreign matter intrusion detection method and system based on video analysis and AI algorithm

By introducing a multi-scale difference aggregation module and a track surface segmentation model, the railway foreign object intrusion detection method solves the robustness and multi-class recognition problems of traditional video AI detection in railway environments, and achieves efficient and accurate foreign object detection.

CN120976816APending Publication Date: 2025-11-18SHANDONG ZHIYANG HUITONG DIGITAL TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510906527.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing video AI detection technologies are inadequate in the complex environment of railways and have poor robustness. Furthermore, traditional target detection algorithms can only identify a limited number of target objects, resulting in a high false alarm rate and limited coverage, making it impossible to effectively detect foreign object intrusions into railways.

Method used

A railway foreign object intrusion detection method based on video analysis and AI algorithms is adopted. By fusing multi-scale features through the difference aggregation module IFN-MSDAM, combined with change detection and target tracking technology, a target mask of suspected foreign objects is generated and its contour is detected. The track surface segmentation model is used to automatically monitor the protected area to ensure the accuracy and coverage of the detection.

Benefits of technology

It improves the accuracy and robustness of foreign object detection on railways, reduces the false alarm rate, can effectively identify multiple types of foreign objects, adapts to complex environmental changes, and reduces potential accident hazards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976816A_ABST
    Figure CN120976816A_ABST
Patent Text Reader

Abstract

The invention discloses a railway foreign matter intrusion detection method and system based on video analysis and an AI algorithm, and mainly relates to the technical field of railway intelligent operation and maintenance. Comprising the following steps: collecting video streams around a track, determining the position of a protection area and recording coordinate information; obtaining a background frame and a detection frame, and generating a target mask of the suspected foreign matter; calculating a minimum enclosing rectangular frame of the target and filtering a target frame outside the protection area; setting a background frame updating period, updating according to the period until no target exists in the protection area, and counting again; inputting the suspected foreign matter target frame into a target tracker, and matching the suspected foreign matter target frame with an existing track; when the track reaches a set tracking period threshold value, the track is regarded as an effective track and is output; and determining the specific category of the foreign matter, and pushing corresponding alarm information. The method has the advantages that the problem that traditional target detection is poor in robustness is solved, the safety of the railway environment is effectively guaranteed, and accident potential is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of railway intelligent operation and maintenance, and particularly relates to a railway foreign matter intrusion detection method and system based on video analysis and AI algorithms. BACKGROUND

[0002] In railway safety operation and maintenance, foreign matter intrusion is a common and serious safety hazard, which has strong randomness and suddenness, and is extremely easy to cause train damage and even personnel casualty accidents, and is one of the most serious threats faced by railway operation. The traditional foreign matter detection method mainly relies on manual patrol and fixed sensors, and these methods have problems of low efficiency, limited coverage and poor adaptability to complex environments. In recent years, with the development of video monitoring technology and artificial intelligence, the foreign matter detection method based on video AI has gradually become an important means to improve railway safety.

[0003] However, the existing video AI detection technology still faces many challenges. First, the equipment installed along the railway is mainly a pan-tilt camera, and the monitoring angle changes at any time, so it is difficult for manual labeling of the track monitoring area to meet the implementation requirements; second, the traditional target detection algorithm can usually only identify a limited number of predefined target objects, and it is difficult to cope with various types of foreign matters in the railway environment. In addition, the traditional background modeling method has poor robustness in the face of complex weather conditions and dynamic environmental changes, and is prone to false positives or false negatives.

[0004] Therefore, there is an urgent need for a railway foreign matter intrusion detection method and system based on video analysis and AI algorithms to solve the above problems. SUMMARY

[0005] The purpose of the present application is to provide a railway foreign matter intrusion detection method and system based on video analysis and AI algorithms, which overcomes the problems of traditional target detection that can only identify a limited number of target objects and poor robustness of differential background modeling in complex environments, effectively ensures the safety of the railway environment, and reduces accident hazards.

[0006] To achieve the above purpose, the present application realizes the following technical solutions: On the one hand, a railway foreign matter intrusion detection method based on video analysis and AI algorithms is provided, comprising the following steps: Step S1: Collecting video streams around the track, and detecting railway target areas in the collected video images to determine the position of the protection area and record the coordinate information; Step S2: Obtaining background frames and detection frames, and performing change detection through the IFN-MSDAM algorithm of the difference aggregation module to generate a target mask of suspected foreign matters; Step S3: Perform contour detection based on the target mask generated in step S2, extract the contour information of each suspected foreign object target, calculate the minimum bounding rectangle of the target, and filter the target boxes outside the protection area according to the protection area coordinate information obtained in step S1. Step S4: Set the background frame update period to If continuous If there is no suspected target within the protected area of ​​a frame, the current frame is updated to a new background frame; if a suspected target is detected, the background frame update is paused until there is no target within the protected area and the count is restarted. Step S5: Input the suspected foreign object target box obtained in step S3 into the target tracker and match it with the existing trajectory. If the match is successful, update the trajectory; otherwise, create a new trajectory and assign it a number, and wait for the next match of the suspected foreign object target box. Step S6: Set the trajectory tracking period When the trajectory in step S5 reaches the set tracking cycle threshold, the trajectory is considered a valid trajectory and is output. Step S7: Crop the last added target box of the valid trajectory output in step S6, and input it into the foreign object classification model for identification, determine the specific category of the foreign object, and push the corresponding alarm information.

[0007] Preferably, step S1 includes: Step S11: Capture images of the railway line under various extreme weather and environmental conditions using a front-end camera, covering various scene sections, and label the railway areas in the images using the LabelMe tool to construct a track segmentation dataset. ,in Number of images; Step S12: Calculate the constructed track segmentation dataset The input is fed into the BiSeNetV2 semantic segmentation network for training to obtain a railway region segmentation model. ; Step S13: Capture the image Input into railway area segmentation model In the middle, output a mask image based on the track surface region. :

[0008] Mask image of the rail surface area Contour extraction is performed to obtain the track surface detection area. , is represented as: ; Step S14: When the rail surface detection area When the monitoring device is not present, it is considered that the monitoring device is deflected, and the device deflection information is transmitted to the platform side.

[0009] Preferably, the step S2 comprises the following steps: Step S21: Collecting a plurality of foreign object intrusion events, the foreign object intrusion events including but not limited to: landslide, rockfall, branches, people, animals, vehicles, generating a dual-time image pair , the image pair including a background frame and a detection frame , labeling according to the relative change area between the image pair, generating a mask graph based on the change area as a label, and constructing a change detection training set ; Step S22: Based on the change detection IFN network of the twin structure, a multi-scale feature learning mechanism is combined, and a multi-scale difference aggregation module is introduced to fuse the dual-time features; Step S23: Inputting the constructed foreign object detection data set into the IFN-MSDAM network for training, and obtaining a change detection model based on the input dual-time image pair , the change detection model extracting the pixel-level mask of the change area in the image: .

[0010] Preferably, the step S22 comprises: extracting intermediate features and from the dual-time image, and performing a pixel-level subtraction operation on the features and to obtain the absolute value, and performing a deep processing on the result of the absolute value through a convolution operation to obtain a difference feature , denoted as: ; Using a multi-scale feature learning mechanism to realize multi-scale fusion of the intermediate features and , including three branch convolution operations, and the convolution kernels are 3, 5 and 7 respectively, and specific convolution fusion operations are performed, specifically:

[0011]

[0012]

[0013]

[0014] wherein, is a double-time image, , , is a feature spliced by features extracted at different scales respectively .

[0015] Preferably, in step S3, the minimum circumscribed rectangle of the target is calculated, in particular: contour detection is performed using to extract the contour information of each suspected foreign object target, to obtain all target in the current image, wherein is the number of suspected foreign object targets in the image, for a suspected foreign object target is represented by its minimum circumscribed rectangle, that is, .

[0016] Preferably, in step S3, the target frame outside the guard area is filtered, including the following steps: Step S31: traverse the target set to determine whether the target is inside the area ; Step S32: for each rectangular frame , uniformly select sampling points inside it, and the selected point set is:

[0017] wherein is the number of sampling points, is the coordinate of the th sampling point; S33: for each sampling point , determine whether it is inside the guard area by the ray method, let represent the function of determining whether the point is inside the guard area , then: ; S34: for each target rectangular frame , calculate the proportion of the sampling points inside it that are inside the guard area:

[0018] If the proportion exceeds the threshold value, it is considered that the target rectangular frame is inside the guard area, and the target is retained, otherwise, the target is deleted.

[0019] Preferably, the step S4 is specifically: set the current background frame as , No. Frame as , No. Frame detection results are The background frame update period is If continuous There are no suspected targets within the intra-frame protection zone, i.e., for the time period. Within, the detection results for each frame If all frames are empty, update the current frame to the background frame:

[0020] If a suspected target is detected, background frame updates are paused until no target is found in the protected area and the count is restarted.

[0021] Preferably, step S5 specifically includes: The obtained bounding boxes of suspected foreign objects within the protected area are input into the target tracker and matched with the existing trajectory. The specific logic rules are as follows: set up The first result in the current frame A suspected foreign object target, For the th in the existing trajectory set The trajectory, if suspected to be a foreign object target With trajectory If a match is successful, the trajectory will be updated. Otherwise, create a new trajectory and assign it a number. Waiting for the next matching of the suspected foreign object bounding box.

[0022] On the other hand, a system is provided based on the above-mentioned method for detecting foreign objects intrusion into railways using video analysis and AI algorithms, comprising: The data acquisition and preprocessing module is used to: acquire video streams around the track, detect railway target areas in the acquired video images, determine the location of the protected area, and record coordinate information; The target mask generation module is used to: acquire background frames and detection frames, perform change detection through the IFN-MSDAM algorithm of the difference aggregation module, and generate a target mask for suspected foreign objects; The foreign object target determination module is used to: perform contour detection based on the generated target mask, extract the contour information of each suspected foreign object target, calculate the minimum bounding rectangle of the target, and filter the target boxes outside the protection area according to the protection area coordinate information obtained in step S1. The background frame update module is used to: set the background frame update period as... If continuous If there is no suspected target within the protected area of ​​a frame, the current frame is updated to a new background frame; if a suspected target is detected, the background frame update is paused until there is no target within the protected area and the count is restarted. The foreign object target matching module is used to: input the obtained suspected foreign object target box into the target tracker, match it with the existing trajectory, update the trajectory if the match is successful, otherwise create a new trajectory and assign it a number, and wait for the next suspected foreign object target box to be matched; The trajectory threshold comparison module is used to: set the trajectory tracking period. When the trajectory reaches the set tracking cycle threshold, the trajectory is considered a valid trajectory and is output. The warning push module is used to: crop the last added target box of the output valid trajectory, input it into the foreign object classification model for identification, determine the specific category of the foreign object, and push the corresponding alarm information.

[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) The present invention provides a railway foreign object intrusion detection method and system based on video analysis and AI algorithm. In view of the problems that feature fusion is limited to local, simple operation is often used and multi-scale learning mechanism is not fully utilized in the existing change detection model, a multi-scale difference aggregation module (MSDAM) is introduced to fuse the difference features of dual-temporal images, which further enhances the integrity of the boundary of the change map and the internal density and the ability to capture small targets. (2) This invention integrates change detection and target tracking technologies, correlates multi-frame analysis results, and performs secondary confirmation of suspected targets, transforming single identification into multi-frame analysis. This solves the problem that traditional target detection algorithms can only identify a limited number of predefined target categories, and reduces the false alarm rate while ensuring target identification capability. (3) The present invention introduces a track surface segmentation model before analysis and automatically monitors the protected area, which solves the problem that the original manually marked area becomes invalid when the monitoring angle changes. Attached Figure Description

[0024] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a schematic diagram of the system structure of the present invention. Detailed Implementation

[0025] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined in this application.

[0026] In this invention, terms such as "upper," "lower," "left," "right," "front," "back," "vertical," "horizontal," "side," and "bottom" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used only to facilitate the description of the structural relationships of the various components or elements of this invention and do not specifically refer to any component or element in this invention. They should not be construed as limiting the invention.

[0027] In this invention, terms such as "fixed connection," "connected," and "linked" should be interpreted broadly, indicating a fixed connection, an integral connection, or a detachable connection; a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can determine the specific meaning of these terms in this invention based on the specific circumstances, and they should not be construed as limitations on the invention.

[0028] Example: like Figure 1 As shown, this embodiment provides a method for detecting foreign object intrusion on railways based on video analysis and AI algorithms, including the following steps: S1. Images of railway lines under various extreme weather and environmental conditions were captured using front-end cameras, covering diverse scene sections to ensure the diversity and comprehensiveness of the dataset. A total of 10,000 railway scene images were collected, and the railway regions in the images were labeled using the LabelMe tool to construct a track segmentation dataset. ,in This provides data support for subsequent railway segmentation models.

[0029] S2, the constructed track segmentation dataset The data is input into the BiSeNetV2 semantic segmentation network for training. The network continuously learns the features and patterns in the dataset to obtain a railway area segmentation model. .

[0030] S3, When the device captures an image Input into railway area segmentation model In the middle, the model processes the image Perform calculations and output a mask image based on the track surface region. ;

[0031] Track surface mask Contour extraction is performed to obtain the track surface detection area. It consists of a set of contour points, represented as follows: .

[0032] S4, when the rail surface detection area If the device does not exist, it is assumed that the monitoring equipment has deflected, and the equipment deflection information is transmitted to the platform side for staff to confirm and adjust. S5. Simulate and collect various possible foreign object intrusion events, including but not limited to landslides, falling rocks, tree branches, people, animals, vehicles, etc., and generate large-scale dual-temporal image pairs. The image pair contains a background frame. and detection frames Based on the relative change regions between image pairs, a mask map based on the change regions is generated as a label, and a training set of 5000 change detection pairs is constructed. ; S4. The Siamese twin-structure-based change detection IFN network introduces a multi-scale difference aggregation module (MSDAM) to fuse dual-temporal features and uses a multi-scale feature learning mechanism to enhance the feature fusion effect. Multi-scale fusion is achieved based on convolutions with different kernel sizes, replacing the original network structure that uses the attention module to fuse the original image depth features and image difference features by simply stitching feature maps based on the channel dimension.

[0033] Specifically, intermediate features are first extracted from the two-phase images. and The two features are subtracted at the pixel level, and their absolute values ​​are taken. To further optimize the processing results, a... The convolution operation performs depth processing on the above absolute value results to obtain differential features. Specifically, it is expressed as:

[0034] This mechanism enhances feature fusion by employing a multi-scale feature learning mechanism, which is based on convolutions with different kernel sizes for intermediate features. and To achieve multi-scale fusion, a three-branch convolutional operation is implemented with kernels of 3, 5, and 7, each performing a specific convolutional fusion operation:

[0035]

[0036]

[0037]

[0038] in It is a dual-temporal image. , , The feature maps extracted at different scales are concatenated to obtain .

[0039] Multi-scale depth features and image difference features By effectively integrating attention mechanisms, the change graph can be reconstructed and generated.

[0040] S5. Input the constructed foreign object detection dataset into the IFN-MSDAM network for training. Through multiple iterations and optimizations, a high-performance change detection model is finally obtained. Based on the input dual-temporal image pair This model can accurately identify and extract pixel-level masks of areas of change in an image; .

[0041] S6. Using target mask Contour detection is performed to extract the contour information of each suspected foreign object, thus obtaining all targets in the current image. , This represents the number of suspected foreign objects in the image. It is represented by its smallest bounding rectangle, that is .

[0042] S7. Based on the calculated track surface detection area in the image. All suspected targets in the image Process and filter out areas For targets outside the designated area, retain valid targets within the designated area, as follows: S71: Traverse the target set Determine the target Is it in the region? Inside; S72: For each rectangle Nine points are evenly selected within it, and the set of selected points is as follows:

[0043] in This is the number of sampling points, set to... , It is the first The coordinates of each sampling point; S73: For each sampling point The method of using rays is used to determine whether it is located in the defense zone. Inside, set Indicates the decision point Is it in the defense zone? The internal functions are: ; S74: For each target rectangle Calculate the proportion of its internal sampling points located within the defense zone:

[0044] If the proportion If the value exceeds the threshold of 0.8, the target rectangle is considered valid. If the target is within the defense zone, it is retained; otherwise, the target is deleted.

[0045] S8. Set the current background frame to... , No. Frame as , No. Frame detection results are The background frame update period is If continuous There are no suspected targets within the intra-frame protection zone, i.e., for the time period. Within, the detection results for each frame If all frames are empty, update the current frame to the background frame:

[0046] If a suspected target is detected, background frame updates are paused until no target is found in the protected area and the count is restarted.

[0047] S9. Input the obtained suspected foreign object target bounding box within the defense zone into the target tracker and match it with the existing trajectory. The specific logic rules are as follows: set up The first result in the current frame A suspected foreign object target, For the th in the existing trajectory set The trajectory, if suspected to be a foreign object target With trajectory If a match is successful, the trajectory will be updated. Otherwise, create a new trajectory and assign it a number. Waiting for the next matching of the suspected foreign object target bounding box to ensure continuous tracking and trajectory management of the target; S10, Set the trajectory tracking cycle When the existing set of trajectories Target reached tracking period At that time, the trajectory is considered to be If it is a valid trajectory, retain it and output it.

[0048] S11. Obtain the valid trajectory The last added target is cropped from the original image based on its coordinates to obtain a local sub-image of the foreign object. The data is then input into a foreign object classification model for identification to determine the specific category of the foreign object, and the system pushes corresponding alarm information.

[0049] like Figure 2 As shown, this embodiment also provides a system based on the above-mentioned railway foreign object intrusion detection method based on video analysis and AI algorithms, including: The data acquisition and preprocessing module is used to: acquire video streams around the track, detect railway target areas in the acquired video images, determine the location of the protected area, and record coordinate information; The target mask generation module is used to: acquire background frames and detection frames, perform change detection through the IFN-MSDAM algorithm of the difference aggregation module, and generate a target mask for suspected foreign objects; The foreign object target determination module is used to: perform contour detection based on the generated target mask, extract the contour information of each suspected foreign object target, calculate the minimum bounding rectangle of the target, and filter the target boxes outside the protection area according to the protection area coordinate information obtained in step S1. The background frame update module is used to: set the background frame update period as... If continuous If there is no suspected target within the protected area of ​​a frame, the current frame is updated to a new background frame; if a suspected target is detected, the background frame update is paused until there is no target within the protected area and the count is restarted. The foreign object target matching module is used to: input the obtained suspected foreign object target box into the target tracker, match it with the existing trajectory, update the trajectory if the match is successful, otherwise create a new trajectory and assign it a number, and wait for the next suspected foreign object target box to be matched; The trajectory threshold comparison module is used to: set the trajectory tracking period. When the trajectory reaches the set tracking cycle threshold, the trajectory is considered a valid trajectory and is output. The warning push module is used to: crop the last added target box of the output valid trajectory, input it into the foreign object classification model for identification, determine the specific category of the foreign object, and push the corresponding alarm information.

[0050] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions to the transaction features between nodes without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A method for detecting foreign object intrusion in railways based on video analysis and AI algorithms, characterized in that, Includes the following steps: Step S1: Acquire video streams around the track, detect railway target areas in the acquired video images, determine the location of the protected area, and record the coordinate information; Step S2: Obtain the background frame and the detection frame, perform change detection through the IFN-MSDAM algorithm of the difference aggregation module, and generate a target mask for suspected foreign objects; Step S3: Perform contour detection based on the target mask generated in step S2, extract the contour information of each suspected foreign object target, calculate the minimum bounding rectangle of the target, and filter the target boxes outside the protection area according to the protection area coordinate information obtained in step S1. Step S4: Set the background frame update period to If continuous If there is no suspected target within the protected area of ​​a frame, the current frame is updated to a new background frame; if a suspected target is detected, the background frame update is paused until there is no target within the protected area and the count is restarted. Step S5: Input the suspected foreign object target box obtained in step S3 into the target tracker and match it with the existing trajectory. If the match is successful, update the trajectory; otherwise, create a new trajectory and assign it a number, and wait for the next match of the suspected foreign object target box. Step S6: Set the trajectory tracking period When the trajectory in step S5 reaches the set tracking cycle threshold, the trajectory is considered a valid trajectory and is output. Step S7: Crop the last added target box of the valid trajectory output in step S6, and input it into the foreign object classification model for identification, determine the specific category of the foreign object, and push the corresponding alarm information.

2. The railway foreign object intrusion detection method based on video analysis and AI algorithm according to claim 1, characterized in that, Step S1 includes: Step S11: Capture images of the railway line under various extreme weather and environmental conditions using a front-end camera, covering various scene sections, and label the railway areas in the images using the LabelMe tool to construct a track segmentation dataset. ,in Number of images; Step S12: Calculate the constructed track segmentation dataset The input is fed into the BiSeNetV2 semantic segmentation network for training to obtain a railway region segmentation model. ; Step S13: Capture the image Input into railway area segmentation model In the middle, output a mask image based on the track surface region. : Mask image of the rail surface area Contour extraction is performed to obtain the track surface detection area. , represented as: ; Step S14: When the rail surface detection area If the device does not exist, it is assumed that the monitoring device has deflected, and the device deflection information is transmitted to the platform side.

3. The railway foreign object intrusion detection method based on video analysis and AI algorithm according to claim 1, characterized in that, Step S2 includes the following steps: Step S21: Collect several foreign object intrusion events, including but not limited to: landslides, falling rocks, tree branches, people, animals, and vehicles, and generate dual-temporal image pairs. The image pair includes the background frame. and detection frames The system labels the regions of relative change between image pairs, generates a mask map based on these regions as labels, and constructs a change detection training set. ; Step S22: The IFN network for change detection based on twin structure is combined with a multi-scale feature learning mechanism, and a multi-scale difference aggregation module is introduced to fuse dual-temporal features; Step S23: Input the constructed foreign object detection dataset into the IFN-MSDAM network for training. Through multiple iterations and optimizations, obtain the change detection model. Based on the input dual-temporal image pair Change detection model Extract pixel-level masks of regions of change in an image: 。 4. The railway foreign object intrusion detection method based on video analysis and AI algorithm according to claim 3, characterized in that, Step S22 includes: Extracting intermediate features from bi-temporal images and and features and Perform pixel-level subtraction and take the absolute value, through a... The convolution operation performs depth processing on the result of the absolute value to obtain differential features. , represented as: ; Utilizing multi-scale feature learning mechanisms for intermediate features and To achieve multi-scale fusion, three branches of convolutional operations are used, with kernels of 3, 5, and 7 respectively, each performing a specific convolutional fusion operation: in, It is a dual-temporal image. , , Features extracted at different scales were concatenated to obtain .

5. The railway foreign object intrusion detection method based on video analysis and AI algorithm according to claim 1, characterized in that, In step S3, calculating the minimum bounding rectangle of the target specifically involves: use Contour detection is performed to extract the contour information of each suspected foreign object, thus obtaining all targets in the current image. ,in This represents the number of suspected foreign objects in the image. It is represented by its smallest bounding rectangle, that is .

6. The railway foreign object intrusion detection method based on video analysis and AI algorithm according to claim 5, characterized in that, In step S3, the target box outside the filtering protection area includes the following steps: Step S31: Traverse the target set Determine the target Is it in the region? Inside; Step S32: For each rectangle Sampling points are selected uniformly within it, and the selected set of points is: in It is the number of sampling points. It is the first The coordinates of each sampling point; S33: For each sampling point The method of using rays is used to determine whether it is located in the defense zone. Inside, set Indicates the decision point Is it in the defense zone? The internal functions are: ; S34: For each target rectangle Calculate the proportion of its internal sampling points located within the defense zone: If the proportion If the threshold is exceeded, the target rectangle is considered to be... If the target is within the defense zone, it is retained; otherwise, the target is deleted.

7. The railway foreign object intrusion detection method based on video analysis and AI algorithm according to claim 1, characterized in that, Step S4 specifically includes: Set the current background frame as , No. Frame as , No. Frame detection results are The background frame update period is If continuous There are no suspected targets within the intra-frame protection zone, i.e., for the time period. Within, the detection results for each frame If all frames are empty, update the current frame to the background frame: If a suspected target is detected, background frame updates are paused until no target is found in the protected area and the count is restarted.

8. The railway foreign object intrusion detection method based on video analysis and AI algorithm according to claim 1, characterized in that, Step S5 specifically includes: The obtained bounding boxes of suspected foreign objects within the protected area are input into the target tracker and matched with the existing trajectory. The specific logic rules are as follows: set up The first result in the current frame A suspected foreign object target, For the th in the existing trajectory set The trajectory, if suspected to be a foreign object target With trajectory If a match is successful, the trajectory will be updated. Otherwise, create a new trajectory and assign it a number. Waiting for the next matching of the suspected foreign object bounding box.

9. A system based on the railway foreign object intrusion detection method based on video analysis and AI algorithms as described in claim 1, characterized in that, include: The data acquisition and preprocessing module is used to: acquire video streams around the track, detect railway target areas in the acquired video images, determine the location of the protected area, and record coordinate information; The target mask generation module is used to: acquire background frames and detection frames, perform change detection through the IFN-MSDAM algorithm of the difference aggregation module, and generate a target mask for suspected foreign objects; The foreign object target determination module is used to: perform contour detection based on the generated target mask, extract the contour information of each suspected foreign object target, calculate the minimum bounding rectangle of the target, and filter the target boxes outside the protection area according to the protection area coordinate information obtained in step S1. The background frame update module is used to: set the background frame update period as... If continuous If there is no suspected target within the protected area of ​​a frame, the current frame is updated to a new background frame; if a suspected target is detected, the background frame update is paused until there is no target within the protected area and the count is restarted. The foreign object target matching module is used to: input the obtained suspected foreign object target box into the target tracker, match it with the existing trajectory, update the trajectory if the match is successful, otherwise create a new trajectory and assign it a number, and wait for the next suspected foreign object target box to be matched; The trajectory threshold comparison module is used to: set the trajectory tracking period. When the trajectory reaches the set tracking cycle threshold, the trajectory is considered a valid trajectory and is output. The warning push module is used to: crop the last added target box of the output valid trajectory, input it into the foreign object classification model for identification, determine the specific category of the foreign object, and push the corresponding alarm information.

Citation Information

Cited By

  • Power transmission line foreign matter detection method and system based on OfficientNet-MemSeg

    CN121564510A

  • Railway multi-temporal change detection method and system based on cross-domain generated image

    CN121708515A