An intelligent detection and extraction method for railway external environment hidden dangers based on remote sensing data

By combining high-resolution remote sensing data and deep learning, a hidden danger extraction model for external environment of railways is designed, which solves the problems of low timeliness of remote sensing image information extraction and poor generalization performance in traditional methods, and achieves fast and accurate hidden danger detection and information statistics, improving railway safety.

CN115497004BActive Publication Date: 2025-08-22BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211054599.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2025-08-22
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

The existing technology is difficult to detect hidden dangers in the external environment of railways quickly and accurately. The traditional remote sensing image information extraction method has low timeliness, and the deep learning method has poor generalization performance in remote sensing data, so it is impossible to effectively identify hidden danger targets in complex environments around the railway.

Method used

Combining high-resolution remote sensing data and deep learning, a hidden danger extraction model for external environment of railways is designed, and a multi-scale feature enhancement module and feature weighted alignment and fusion module are used to enhance the integrity of hidden danger feature extraction, and the model volume is optimized using the knowledge distillation method to facilitate edge deployment.

Benefits of technology

It has achieved rapid, efficient and intelligent detection and statistics of external environmental hazards of railways, improved the safety of railway operations and the accuracy of detection, and reduced the impact of human resource consumption and geographical and climatic factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115497004B_ABST
    Figure CN115497004B_ABST
Patent Text Reader

Abstract

The present invention discloses an intelligent detection and extraction method for railway external environmental hidden dangers based on remote sensing data, which belongs to the field of railway safety and remote sensing image processing technology. The present invention utilizes the advantages of high-resolution remote sensing data, combines deep learning to design a railway external environmental hidden danger extraction model, combines a stage feature enhancement module to improve the integrity of hidden danger extraction; combines a feature weighted alignment and fusion module to align and adaptively weight the multi-level hidden danger features; in the extraction mask generation stage, a low-dimensional, high-resolution railway external environmental hidden danger feature map containing rich details is used as a guide image, and a guided filter is used to optimize the hidden danger mask edge; a knowledge distillation method is used to reduce the model volume; the railway external environmental hidden danger extraction results are combined with a geographic information system to obtain the external environmental hidden danger risk level and station section distribution information, realize railway external environmental hidden danger target detection and extraction and information statistics and tracking, reduce railway external environmental hidden dangers, and improve the safety of railway operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an intelligent detection and extraction method for railway external environment hidden dangers based on remote sensing data, belonging to the technical field of railway safety and remote sensing image processing. Background Art

[0002] A safe operating environment is crucial for train operations. During extreme weather conditions like heavy rain and strong winds, external destabilizing factors can easily enter the railway perimeter, disrupting normal train operations and even causing major accidents. Common external hazards include illegal construction, plastic greenhouses, dust screens, construction excavation, and natural disasters. In recent years, numerous railway accidents caused by external interference have occurred both domestically and internationally. The sudden, irregular, and unpredictable nature of these hazards has placed significant pressure on railway authorities.

[0003] Environmental management around railways has long been a key focus of railway operational environmental maintenance. This is typically accomplished through on-site inspections by professional management personnel in surrounding towns and villages. However, due to the large scope and lengthy inspection cycles, this approach places a significant workload on personnel and fails to yield objective, comprehensive, and accurate results. Finding rapid, efficient, and accurate methods for identifying safety hazards in the railway's external environment has become a crucial requirement for railway operational safety maintenance. With the widespread use of remote sensing satellites and drones in both commercial and civilian sectors, using airborne and space-based remote sensing to collect ground-based information has become a more efficient option.

[0004] Remote sensing technology utilizes sensors mounted on remote sensing platforms, using visible light, infrared, radar, hyperspectral, and multispectral electromagnetic waves, using imaging or non-imaging methods to detect ground objects and obtain ground information. It boasts a wide detection range and comprehensive information. Remote sensing technology overcomes the limitations of conventional ground-based detection, which consumes significant human resources, is constrained by geopolitical factors, and struggles to obtain objective and accurate results. It has become an important means of Earth observation and is widely used in fields such as meteorological monitoring, geological mapping, national defense, and resource exploration. High-resolution target extraction from remote sensing imagery along railways is crucial for maintaining the railway operating environment and ensuring operational safety. During extreme weather conditions such as heavy rain and strong winds, external instability can easily enter the railway perimeter, impacting the normal operation of trains and even causing major accidents. By integrating multi-source, multi-dimensional, and multi-period remote sensing imagery, researchers can conduct a comprehensive analysis of the external environment surrounding the railway.

[0005] With the advancement of remote sensing technology, the spatial resolution of remote sensing images continues to increase. When extracting information from remote sensing images, the higher the image resolution, the more complex the observable information, and the greater the difficulty in extracting information. Traditional remote sensing image information extraction methods, which rely on manual interpretation and visual interpretation by professionals, significantly reduce the timeliness of remote sensing data processing. Deep learning technology, by constructing deep neural networks to extract more abstract, high-dimensional features, demonstrates powerful information extraction capabilities. Therefore, deep learning and remote sensing technologies can be combined to detect and extract hidden dangers in the railway external environment.

[0006] However, compared with natural images, remote sensing data has the characteristics of a wide imaging band range, multiple data types, complex background information, large differences within the target class and small differences between classes, which reduces the generalization performance of deep learning methods. Therefore, it is necessary to propose an intelligent detection and extraction method with strong generalization and high accuracy for external hidden dangers of railways. Summary of the Invention

[0007] In response to the above technical deficiencies, the main purpose of the present invention is to provide an intelligent detection and extraction method for railway external environmental hazards based on remote sensing data. This method utilizes the advantages of high-resolution remote sensing data, which has a wide detection range and is not restricted by geographical and climatic factors, and combines deep learning to design a railway external environmental hazard extraction model to identify hazard targets. A stage feature enhancement module is combined to achieve multi-scale hazard feature enhancement and improve the integrity of railway external environmental hazard extraction. A feature weighted alignment and fusion module is combined to align and adaptively weight the multi-level hazard features, preserving edge details and avoiding the introduction of irrelevant background information. In the extraction mask generation stage, a low-dimensional, high-resolution railway external environmental hazard feature map containing rich details is used as a guide image, and guided filtering is used to optimize the hazard mask edge. A knowledge distillation method is used to reduce the model size and facilitate edge deployment and application. The railway external environmental hazard extraction results are combined with a geographic information system to obtain railway external environmental hazard risk levels and station distribution information. Remote sensing data is regularly updated, and changes in railway external environmental hazard information are statistically analyzed to achieve fast, efficient, and intelligent railway external environmental hazard target detection and extraction, information statistics, and tracking, thereby reducing railway external environmental hazards and improving railway operation safety.

[0008] The purpose of the present invention is achieved through the following technical solutions:

[0009] The present invention discloses a method for intelligently detecting and extracting hidden dangers in the railway external environment based on remote sensing data, comprising the following steps:

[0010] S1: Taking advantage of the characteristics of high-resolution remote sensing data, which has a wide detection range and is not restricted by geographical and climatic factors, obtain multi-dimensional, multi-source, and multi-period original high-resolution remote sensing data along the railway for training the railway external environment hidden danger extraction model, collect high-resolution remote sensing data for training the railway external environment hidden danger extraction model, preprocess the high-resolution remote sensing data, fuse multi-band remote sensing images and perform super-resolution reconstruction, improve the ground sampling rate of remote sensing images, and then realize multi-dimensional, multi-source, and multi-period high-resolution remote sensing data preprocessing and enhancement, and obtain preprocessed and enhanced high-resolution remote sensing data.

[0011] S11: Leveraging the advantages of high-resolution remote sensing data, which has a wide detection range and is not restricted by geographical and climatic factors, and based on railway operation safety requirements, select the detection range of external environmental hazards along the railway line, delineate the high-resolution remote sensing data area for railway external environmental hazard detection, and obtain multi-dimensional, multi-source, and multi-period original high-resolution remote sensing data along the railway line for training the railway external environmental hazard extraction model;

[0012] S12: Preprocess the multi-dimensional, multi-source, multi-period original high-resolution remote sensing data along the railway obtained in S11 for training the railway external environment hidden danger extraction model. Use remote sensing data processing software to perform atmospheric correction and orthorectification on the multispectral image after radiometric calibration; perform radiometric calibration and orthorectification on the panchromatic data to separate the reflection information of the ground objects from the information of the atmosphere and the sun to obtain the spectral properties of the object surface; set the projection system for the elevation data after splicing and cropping, and then choose whether to resample according to the data size and platform computing power. The preprocessed multi-dimensional, multi-source, multi-period original high-resolution remote sensing data along the railway is obtained.

[0013] S13: The pre-processed multi-dimensional, multi-source, multi-period original high-resolution remote sensing data along the railway obtained in S12 are aligned. To address the problem of different resolutions of remote sensing images along the railway in different band ranges, a method based on guided filtering and sparse representation is used to fuse the multi-band remote sensing images along the railway. The characteristics of the hidden dangers in the external environment of the railway are enhanced according to the spectral and geometric characteristics of the hidden dangers in the external environment of the railway. Deep neural networks are further used for super-resolution reconstruction to improve the ground sampling rate of remote sensing images, thereby realizing the preprocessing and enhancement of multi-dimensional, multi-source, multi-period high-resolution remote sensing data and obtaining the preprocessed and enhanced high-resolution remote sensing data.

[0014] S2: For the preprocessed and enhanced high-resolution remote sensing data obtained in S1, the railway external environment hidden danger targets in the remote sensing data are labeled according to the spectral characteristics, geometric characteristics, and distribution characteristics of the railway external environment hidden dangers. The labeled high-resolution remote sensing data is divided into training data and test data. To reduce the computational pressure of the railway external environment hidden danger extraction model deployment platform, the training data and test data are cropped into image blocks of uniform size. Each image block carries both geographic information and cropping coordinates. The training data is geometrically augmented to expand the data set to obtain the training set and test set for training and testing the railway external environment hidden danger extraction model.

[0015] S3: Based on the characteristics of railway external environmental hazards, a feature extraction backbone is selected. Based on the multi-level railway external environmental hazard features extracted by the feature extractor, a staged feature enhancement module is designed that incorporates deformable convolution to adaptively enhance different levels of railway external environmental hazard features. To avoid feature misalignment and irrelevant information noise introduced by direct fusion, a weighted feature alignment fusion module is designed to align feature maps at different levels. A gating mechanism is then used to filter and weightedly fuse effective hazard features from the multi-level railway external environmental hazard feature maps. A context-aware mask generation module generates masks for railway external environmental hazard extraction. Using the low-level railway external environmental hazard feature map as a guide image, the mask is refined to improve edge and detail information. A loss function is constructed, and the learning rate, batch size, weight initialization method, weight decay coefficient, optimization method, and number of iterations are set. The training set obtained in S2 is used to train the railway external environmental hazard extraction model, resulting in the trained railway external environmental hazard extraction model. This completes the construction and training of the railway external environmental hazard extraction model.

[0016] S31: According to the characteristics of the hidden dangers in the railway external environment, the backbone for extracting the hidden danger features of the railway external environment is selected, and a backbone network for extracting the multi-level features of the hidden dangers in the railway external environment is constructed. The backbone network includes m feature extraction stages. As the backbone network deepens, the resolution of the hidden danger feature map of the railway external environment gradually decreases. The feature extraction backbone is initialized using the weights trained on the public dataset. The training set data of the hidden dangers in the railway external environment obtained in S2 is input into the backbone network to extract the multi-level hidden danger feature map of the railway external environment. The backbone network outputs a first-level feature map at each stage. The set of multi-level hidden danger feature maps of the railway external environment output by the backbone network is [S0, S1, ..., S m-1 ].

[0017] S32: Based on the multi-level railway external environment hidden danger features extracted by the feature extraction backbone constructed by S31, a stage feature enhancement module with deformable convolution is designed to adaptively enhance the railway external environment hidden danger features at different levels. The stage feature enhancement module is constructed as shown in formula (1). This module takes the multi-level railway external environment hidden danger feature map obtained by S31 as input and includes two parallel branches. One branch uses global average pooling to spatially compress the railway external environment hidden danger feature map, and then obtains the weight vector of the railway external environment hidden danger feature in the channel dimension through the convolution layer, ReLU activation function and convolution layer in sequence. The sigmoid function compresses the weight vector value to the range of [0,1] and multiplies it with the input railway external environment hidden danger feature map to obtain the railway external environment hidden danger feature map F after channel feature enhancement. CA , expressed as:

[0018]

[0019] Where S represents the input railway external environment hidden danger characteristic map, G GAP (·) represents global average pooling, G conv (·) represents the convolutional layer, G ReLu (·) represents the ReLU activation function, δ(·) represents the sigmoid function, Indicates the multiplication of corresponding pixels;

[0020] The other branch reduces the channel dimension of the input railway external environment hidden danger feature map through convolution, obtains the weight vector of the railway external environment hidden danger feature in the spatial dimension through deformable convolution block and convolution, compresses the weight vector value to the range of [0,1] by sigmoid function, and multiplies it with the input railway external environment hidden danger feature map to obtain the railway external environment hidden danger feature map F after spatial feature enhancement. SA , expressed as:

[0021]

[0022] G deformblock =G ReLu (G BN (G deformconv (·))) (3)

[0023] Among them G deformblock (·) represents the deformable convolution block, as shown in formula (3), G BN (·) represents the batch normalization layer, G deformconv (·) denotes a deformable convolutional layer;

[0024] Railway external environment hidden danger feature map F after enhancing channel and space features CA With F SAAfter connecting along the channel dimension, the channel dimension is reduced by the convolution block, and then the deformable convolution block is passed to obtain the adaptively enhanced railway external environment hidden danger feature F enhance , expressed as:

[0025]

[0026] Among them G convblock (·) represents a convolutional block, Indicates channel dimension connection;

[0027] The multi-level railway external environment hidden danger feature maps output by the backbone network are input into the stage feature enhancement module respectively to obtain the enhanced feature set [F0, F1, ..., F m-1 ];

[0028] S33: For the railway external environment hidden danger feature map after feature enhancement obtained in S32, it is necessary to fuse features at different levels to achieve effective extraction of railway external environment hidden danger targets at different scales. In order to avoid feature dislocation and irrelevant information noise caused by direct fusion, a feature weighted alignment fusion module is designed to align feature maps of different levels from top to bottom, and adopt a gating mechanism to screen effective hidden danger features in multi-level railway external hidden danger feature maps and weightedly fuse them. The feature weighted alignment fusion module starts from the highest-level railway external hidden danger feature map, takes the two adjacent levels of railway external hidden danger feature maps as input, outputs an aggregated feature map, and then takes the aggregated features and the next-level feature map as input to obtain a new aggregated feature map. In this way, aggregation is carried out step by step, and finally a feature map that aggregates all multi-level railway external hidden danger feature maps and fuses the multi-scale railway external environment hidden danger target features is obtained.

[0029] Specifically, for the two-level railway external environment hidden danger feature map of the input feature weighted alignment fusion module, the low-resolution high-level feature F L Upsample to low-level features F with high resolution H After the features are of the same size, they are connected along the channel dimension. The connected feature maps are reduced in dimension through the convolution layer and the BN layer, and then the convolution layer outputs two bias maps. and a weight graph △ m ,As shown in formula (5), each bias map contains two channels, representing the bias along the x and y directions respectively;

[0030]

[0031] G gen =G conv (G BN (G conv (·))) (6)

[0032] Among them, G Upsample (·) indicates upsampling, Ggen (·) represents the bias and weight generation operation;

[0033] Use the grid_sample function to align the input two-level railway external environment hidden danger feature maps according to the generated bias map. Specifically, according to Align F L ,according to Align F H In order to avoid the direct fusion of irrelevant background information, a gating mechanism is used to filter effective railway external hidden danger features through the weight map for fusion. Specifically, the aligned feature map F L With F H According to △ m and 1-△ m The weights of are added to get the aggregated feature A, which is expressed as:

[0034]

[0035] For the railway external environment hidden danger feature map [F0,F1,...,F m-1 ], from top to bottom from F m-1 Aggregate multi-level features according to formula (7):

[0036] A m-2 =G gate_align (F m-2 ,F m-1 )

[0037] A m-3 =G gate_align (F m-3 ,A m-2 )

[0038]

[0039] A1=G align (F1,A2)

[0040] A0=G align (F0,A1)

[0041] After alignment and gated weighted aggregation of multi-level railway external environment hidden danger feature maps, a feature map A0 that integrates multi-scale railway external environment hidden danger target features is obtained;

[0042] S34: Based on the feature map A0 obtained by S33 that integrates the multi-scale railway external environment hidden danger target features, a context-aware mask generation module is constructed to generate a mask for railway external environment hidden danger extraction. The low-level railway external environment hidden danger feature map is used as a guide image to guide the refinement of the mask edge of the railway external environment hidden danger extraction and improve the edge and detail information features. The feature map A0 obtained by S33 that integrates the multi-scale railway external environment hidden danger target features is used as input. After two convolutions and upsampling, the resolution is increased to the same as the input image of the railway external environment hidden danger extraction model. Finally, the convolution block outputs the railway external environment hidden danger detection extraction mask P∈R with the same channel dimension and number of categories. N×H×W , as shown in formula (8), N is the number of hidden danger categories, each channel represents a type of hidden danger target, and the hidden danger target is reflected in the output result in the form of pixel-level labeling;

[0043] P=G convblock (G Upsample (G convblock (G Upsample (G convblock (A0))))) (8)

[0044] The low-level railway external environment hidden danger feature map S0 obtained in S31 is convoluted and reduced in dimension. The convolution operation is used as a guide image. The railway external environment hidden danger detection and extraction mask P is refined using a guided filter to improve the edge and detail information features, thereby obtaining the railway external environment hidden danger extraction result E after edge refinement.

[0045] S35: Construct a loss function and use the training set obtained in S2 to train the railway external environment hidden danger extraction model. During the training process, the output results and label maps use focal cross-entropy loss as the loss function, which is specifically expressed as:

[0046] L=-α(1-p t ) γ log(p t ) (9)

[0047] where p t is the sample prediction probability, α is the category weight used to solve the category imbalance problem, and γ is the focus factor used to adjust the model's focus on difficult samples.

[0048] Set the learning rate, batch size, weight initialization method, weight decay coefficient, optimization method, and number of iterations. Use stochastic gradient descent to update the model parameters. Iterate until the loss value no longer decreases. This will yield the trained railway external environment hidden danger extraction model, thus completing the construction and training of the railway external environment hidden danger extraction model.

[0049] S4: Use the knowledge distillation method to compress the trained railway external environment hidden danger extraction model obtained by S3. Use the railway external environment hidden danger extraction model designed by S3 as the teacher model to train a student model with the same railway external environment hidden danger extraction capability to reduce the model size, facilitate edge deployment and application, and improve the efficiency of railway external environment hidden danger detection.

[0050] S5: Use the compressed railway external environment hidden danger extraction model obtained in S4 to generate a railway external environment hidden danger mask for the test data in the test set obtained in S2, and obtain a railway external environment hidden danger extraction result mask.

[0051] S6: Post-process the railway external environment hidden danger target mask obtained in S5 according to the railway external environment hidden danger, splice the mask and remove the mask connected domain with an area smaller than a predetermined threshold, and then combine the railway external environment hidden danger target mask with the geographic information of the remote sensing data to generate a railway external environment hidden danger target vector mask file with geographic information.

[0052] S7: Combine the extraction results of railway external environmental hazards with the geographic information system to count the type, quantity, area, and location information of the hazard targets; combine the geographical location information of the railway tracks, divide the risk levels of the hazard targets according to the distance between the hazard targets and the tracks, and count the hazard target information by station section based on the station section geographical information to obtain the railway external environmental hazard risk level and station section distribution information, and combine the multi-dimensional, multi-source, and multi-period original high-resolution remote sensing data along the railway obtained in S1 to visualize the hazards.

[0053] S8: Update remote sensing data regularly and repeat S5-S7 to collect statistics on changes in railway external environmental hazards, so as to achieve fast, efficient and intelligent detection and extraction of railway external environmental hazard targets and information statistics and tracking.

[0054] It also includes S9: Based on the railway external environment hidden danger target detection extraction results and information statistics and tracking results achieved by S8, safety hazards can be eliminated quickly, efficiently and intelligently to improve the safety of railway operations.

[0055] Preferably, in S7, the vector mask file of hidden danger targets in the external environment of the railway is imported into the GIS software to count the type, quantity, area and location information of the hidden danger targets; combined with the geographical location information of the railway track, the hidden danger targets are divided into risk levels according to the distance between the hidden danger targets and the track, with those within 100m from the guardrail being a major risk and those between 100m and 500m being a general risk; and the hidden danger target information is counted by station section based on the geographical information of the station section.

[0056] Beneficial effects:

[0057] 1. The present invention discloses an intelligent detection and extraction method for railway external environment hidden dangers based on remote sensing data. The method utilizes the advantages of high-resolution remote sensing data, which has a wide detection range and is not restricted by geographical and climatic factors, and combines deep learning to design a railway external environment hidden danger extraction model to identify hidden danger targets. In the stage of fusing multi-level railway external environment hidden danger features, a feature weighted alignment and fusion module is designed to align adjacent levels of railway external environment features to compensate for the spatial dislocation and information loss problems introduced by the downsampling operation in the feature extraction stage. Gating weights are introduced into the aligned railway external environment hidden danger features during fusion, and weighted fusion is performed on railway external environment hidden danger feature maps of different levels to selectively fuse features according to the characteristics of multi-level railway external environment hidden danger features to avoid introducing irrelevant information.

[0058] 2. The present invention discloses an intelligent detection and extraction method for railway external environment hidden dangers based on remote sensing data. It utilizes the advantages of high-resolution remote sensing data, which has a wide detection range and is not restricted by geographical and climatic factors, and combines deep learning to design a railway external environment hidden danger extraction model to identify hidden danger targets. It designs a stage feature enhancement module based on the multi-level features extracted by the feature extractor, enhances the railway external environment hidden danger features from two dimensions: space and channel, and adopts deformable convolution to adaptively extract the railway external environment hidden danger features according to the feature shape, thereby improving the integrity of the railway external environment hidden danger extraction.

[0059] 3. The present invention discloses an intelligent detection and extraction method for railway external environment hidden dangers based on remote sensing data. It uses the knowledge distillation method to use the designed railway external environment hidden danger extraction model as the teacher model to train a student model with the same railway external environment hidden danger extraction capability, so as to reduce the model size and facilitate edge deployment and application.

[0060] 4. The present invention discloses an intelligent detection and extraction method for railway external environment hidden dangers based on remote sensing data. In the stage of generating a mask for extracting hidden dangers in the railway external environment, the low-dimensional railway external environment hidden danger features are used as a guiding image, and guided filtering is used to optimize the mask edge of the railway external environment hidden danger, thereby improving the edge and detail information.

[0061] 5. The present invention discloses an intelligent detection and extraction method for railway external environment hidden dangers based on remote sensing data. The method combines the extraction results of railway external environment hidden dangers with the geographic information system to obtain the risk level of railway external environment hidden dangers and station section distribution information, and regularly updates the remote sensing data to compile statistics on changes in railway external environment hidden dangers.

[0062] 6. The present invention discloses an intelligent detection and extraction method for railway external environment hidden dangers based on remote sensing data. On the basis of achieving the above-mentioned beneficial effects 1, 2, 3, and 4, it realizes rapid, efficient, and intelligent detection and extraction of railway external environment hidden danger targets and information statistics and tracking, thereby reducing railway external environment hidden dangers and improving the safety of railway operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 This is a flow chart of the intelligent detection and extraction method for railway external environment hidden dangers based on remote sensing data provided by the present invention.

[0064] Figure 2 This is a flowchart of remote sensing image preprocessing provided by the present invention.

[0065] Figure 3 This is an embodiment of the railway external environment hidden danger extraction model provided by the present invention.

[0066] Figure 4 This is a structural diagram of the stage feature enhancement module in the embodiment provided by the present invention.

[0067] Figure 5 This is a structural diagram of the weighted alignment fusion module in the embodiment provided by the present invention.

[0068] Figure 6 This is the railway external environment hidden danger detection and extraction result provided by the present invention. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be noted that the examples described are for the purpose of facilitating the understanding of the present invention and do not have any limiting effect on it.

[0070] Example:

[0071] like Figure 1 As shown, this embodiment discloses a method for intelligent detection and extraction of railway external environment hidden dangers based on remote sensing data, which specifically includes the following steps:

[0072] S1: Taking advantage of the characteristics of high-resolution remote sensing data, which has a wide detection range and is not restricted by geographical and climatic factors, obtain multi-dimensional, multi-source, and multi-period original high-resolution remote sensing data along the railway for training the railway external environment hidden danger extraction model, collect high-resolution remote sensing data for training the railway external environment hidden danger extraction model, preprocess the high-resolution remote sensing data, fuse multi-band remote sensing images and perform super-resolution reconstruction, improve the ground sampling rate of remote sensing images, and then realize multi-dimensional, multi-source, and multi-period high-resolution remote sensing data preprocessing and enhancement, and obtain preprocessed and enhanced high-resolution remote sensing data.

[0073] S11: Leveraging the advantages of high-resolution remote sensing data, which has a wide detection range and is not restricted by geographical and climatic factors, and based on railway operation safety requirements, select the detection range of external environmental hazards along the railway line, delineate the high-resolution remote sensing data area for railway external environmental hazard detection, and obtain multi-dimensional, multi-source, and multi-period original high-resolution remote sensing data along the railway line for training the railway external environmental hazard extraction model;

[0074] S12: Preprocess the original high-resolution remote sensing data along the railway obtained in S11 for training the railway external environment hidden danger extraction model, such as Figure 2 As shown. ENVI and ArcGIS processing software were selected to perform FLAASH atmospheric correction and orthorectification on the multispectral images after radiometric calibration; radiometric calibration and orthorectification were performed on the panchromatic data to separate the reflection information of the ground objects from the information of the atmosphere and the sun to obtain the spectral properties of the object surface; after splicing and cropping the elevation data, the projection system was set, and then resampling was selected based on the data size and platform computing power. The pre-processed multi-dimensional, multi-source, multi-period original high-resolution remote sensing data along the railway was obtained.

[0075] S13: The pre-processed multi-dimensional, multi-source, multi-period original high-resolution remote sensing data along the railway obtained in S12 are aligned. To address the problem of different resolutions of remote sensing images along the railway in different band ranges, a method based on guided filtering and sparse representation is used to fuse the multi-band remote sensing images along the railway. The characteristics of the hidden dangers in the external environment of the railway are enhanced according to the spectral and geometric characteristics of the hidden dangers in the external environment of the railway. Deep neural networks are further used for super-resolution reconstruction to improve the ground sampling rate of remote sensing images, thereby realizing the preprocessing and enhancement of multi-dimensional, multi-source, multi-period high-resolution remote sensing data and obtaining the preprocessed and enhanced high-resolution remote sensing data.

[0076] S2: For the preprocessed and enhanced high-resolution remote sensing data obtained in S1, the railway external environment hidden danger targets in the remote sensing data are labeled according to the spectral characteristics, geometric characteristics, and distribution characteristics of the railway external environment hidden dangers. The labeled high-resolution remote sensing data is divided into training data and test data. To reduce the computational pressure of the railway external environment hidden danger extraction model deployment platform, the training data and test data are cropped into image blocks of uniform size. Each image block carries both geographic information and cropping coordinates. The training data is geometrically augmented to expand the data set to obtain the training set and test set for training and testing the railway external environment hidden danger extraction model.

[0077] S21: Use ArcGIS software to perform semantic-level annotation of railway external environmental hazard targets in remote sensing data. Specifically, import the data to be annotated, create shapefiles for different railway external environmental hazard categories, and draw the railway external environmental hazard target features of each category. Then, convert the shapefiles into raster images, sharing the geographic coordinates and projection system with the original data. The background pixels are set to 0. Finally, the raster images generated by all categories of hazard targets are merged into a single-channel label image, with different categories of railway external environmental hazard labeled with different pixel values.

[0078] S22: Divide the training data and the test data according to a certain ratio. In this embodiment, the training data and the test data are divided in a ratio of 4:1.

[0079] S23: To reduce the computational pressure on the deployment platform of the railway external environment hidden danger extraction model, the original data and the annotated label map are cropped into 512×512 image blocks with an overlap rate of 0.5. Each image block also carries geographic information and is annotated with cropping coordinate information for subsequent splicing. The dataset consisting of the cropped image blocks of the training data is expanded using random brightness, random scale, and random horizontal flipping. The images and labels are randomly resized with a scale factor of 0.5 to 1.25, and each slice has a probability of 0.5 to be horizontally flipped. This is used as the training set, thus obtaining the training set and test set for training and testing the railway external environment hidden danger extraction model.

[0080] S3: According to the characteristics of hidden dangers in the railway external environment, the feature extraction backbone is selected, and the multi-level railway external environment hidden danger features extracted by the feature extractor are extracted; a stage feature enhancement module with deformable convolution is designed to adaptively enhance the characteristics of hidden dangers in the railway external environment at different levels; in order to avoid feature dislocation and irrelevant information noise introduced by direct fusion, a feature weighted alignment fusion module is designed to align feature maps of different levels, and a gating mechanism is used to screen effective hidden danger features in multi-level railway external hidden danger feature maps and weightedly fuse them; the context-aware mask generation module generates a mask for extracting hidden dangers in the railway external environment, and uses the low-level railway external environment hidden danger feature map as a guide image to guide the refinement of the mask edge for extracting hidden dangers in the railway external environment, improve the edge and detail information, and construct a railway external environment hidden danger extraction model, such as Figure 3 As shown in the figure, a loss function is constructed, and the learning rate, batch size, weight initialization method, weight decay coefficient, optimization method, and number of iterations are set. The railway external environment hidden danger extraction model is trained using the training set obtained from S2. This results in the trained railway external environment hidden danger extraction model, thus completing the construction and training of the railway external environment hidden danger extraction model.

[0081] S31: According to the characteristics of railway external environment hidden dangers, the backbone for extracting railway external environment hidden danger features is selected, and a backbone network based on ResNet50 is built to extract multi-level features of railway external environment hidden dangers. The backbone network includes 5 feature extraction stages. As the backbone network deepens, the resolution of the railway external environment hidden danger feature map gradually decreases. The ResNet50 feature extraction backbone is initialized using weights trained on a public dataset. The 512×512 size railway external environment hidden danger training set data obtained in S2 is input into the backbone network to extract multi-level railway external environment hidden danger feature maps. The backbone network outputs a first-level feature map at each stage. The set of multi-level railway external environment hidden danger feature maps output by the backbone network is [S0, S1, S2, S3, S4], where the sizes of the feature maps at each level are: S0∈R 64×256×256 , S1∈R 256×128×128 , S2∈R 512×64×64 , S3∈R 1024×32×32 , S4∈R 2048 ×16×16 .

[0082] S32: Based on the multi-level railway external environment hidden danger features extracted by the feature extraction backbone constructed in S31, a stage feature enhancement module with deformable convolution is designed, such as Figure 4 As shown, the characteristics of hidden dangers in the external environment of railways at different levels are adaptively enhanced. The construction stage feature enhancement module is shown in formula (1). This module takes the multi-level railway external environment hidden danger feature map obtained by S31 as input and includes two parallel branches. One branch uses global average pooling to spatially compress the railway external environment hidden danger feature map, and then sequentially passes through a 1×1 convolution layer, a ReLU activation function, and a 1×1 convolution layer to obtain the weight vector of the railway external environment hidden danger feature in the channel dimension. The sigmoid function compresses the weight vector value to the range of [0,1] and multiplies it with the input railway external environment hidden danger feature map to obtain the railway external environment hidden danger feature map F after channel feature enhancement. CA , expressed as:

[0083]

[0084] Where S represents the input railway external environment hidden danger characteristic map, G GAP (·) represents global average pooling, G conv1×1 (·) represents 1×1 convolution, G ReLu (·) represents the ReLU activation function, δ(·) represents the sigmoid function, Indicates the multiplication of corresponding pixels;

[0085] The other branch uses 1×1 convolution to reduce the channel dimension of the input railway external environment hidden danger feature map, and obtains the weight vector of the railway external environment hidden danger feature in the spatial dimension through a deformable convolution block with a 3×3 convolution kernel and a 1×1 convolution. The weight vector value is compressed to the range of [0,1] by the sigmoid function and multiplied with the input railway external environment hidden danger feature map to obtain the railway external environment hidden danger feature map F after spatial feature enhancement. SA , expressed as:

[0086]

[0087] G deformblock3×3 =G ReLu (G BN (G deformconv3×3 (·))) (3)

[0088] Among them G deformblock3×3 Denotes a deformable convolution block with a 3×3 convolution kernel, G BN (·) represents the batch normalization layer, G deformconv3×3 (·) represents a deformable convolution layer with a 3×3 convolution kernel;

[0089] Railway external environment hidden danger feature map F after enhancing channel and space features CA With F SA After connecting along the channel dimension, the channel dimension is reduced by a 1×1 convolution block, and then a deformable convolution block with a convolution kernel size of 3×3 is passed to obtain the adaptively enhanced railway external environment hidden danger feature F enhance , expressed as:

[0090]

[0091] Among them G convblock1×1 (·) represents a 1×1 convolutional block, Indicates channel dimension connection;

[0092] The 1st to 4th level railway external environment hidden danger feature maps output by the backbone network are input into the stage feature enhancement module respectively to obtain the enhanced feature set [F1, F2, F3, F4], whose sizes are: F1∈R 256×128×128 , F2∈R 256×64×64 , F3∈R 256 ×32×32 , F4∈R 256×16×16 ;

[0093] S33: For the railway external environment hidden danger feature map after feature enhancement obtained in S32, it is necessary to fuse different levels of features to achieve effective extraction of railway external environment hidden danger targets at different scales. In order to avoid feature dislocation and irrelevant information noise caused by direct fusion, a feature weighted alignment fusion module is designed, such as Figure 5 As shown in the figure, feature maps of different levels are aligned step by step from top to bottom, and a gating mechanism is used to screen effective hidden danger features in multi-level railway external hidden danger feature maps and weightedly fuse them. The feature weighted alignment fusion module starts from the highest-level railway external hidden danger feature map, takes the two adjacent levels of railway external hidden danger feature maps as input, outputs an aggregated feature map, and then takes the aggregated features and the next-level feature map as input to obtain a new aggregated feature map. In this way, aggregation is carried out step by step, and finally a feature map that aggregates all multi-level railway external hidden danger feature maps and integrates the multi-scale railway external environment hidden danger target features is obtained.

[0094] Specifically, for the two-level railway external environment hidden danger feature map of the input feature weighted alignment fusion module, the low-resolution high-level feature F L Upsample to low-level features F with high resolution H After the feature maps are of the same size, they are connected along the channel dimension. The connected feature maps are reduced in dimension through a 1×1 convolution layer and a BN layer, and then output two bias maps through a 3×3 convolution layer. and a weight graph △ m ,Each bias map contains two channels, representing the bias along the x and y directions respectively;

[0095]

[0096] G gen =G conv3×3 (G BN (G conv1×1 (·))) (6)

[0097] Among them, G Upsample (·) indicates upsampling, G gen (·) represents the bias and weight generation operation;

[0098] Use the grid_sample function to align the input two-level railway external environment hidden danger feature maps according to the generated bias map. Specifically, according to Align F L ,according to Align F H In order to avoid the direct fusion of irrelevant background information, a gating mechanism is used to filter effective railway external hidden danger features through the weight map for fusion. Specifically, the aligned feature map F L With F H According to △ m and 1-△ m The weights of are added to get the aggregated feature A, which is expressed as:

[0099]

[0100] For the feature-enhanced railway external environment hidden danger feature map [F1, F2, F3, F4] obtained by S32, multi-level features are aggregated from top to bottom starting from F4 according to formula (7):

[0101] A3=G gate_align (F3,F4)

[0102] A2=G gate_align (F2,A3)

[0103] A1=G align (F1,A2)

[0104] A0=G align (F0,A1)

[0105] After alignment and gated weighted aggregation of multi-level railway external environment hidden danger feature maps, a feature map A0 that integrates multi-scale railway external environment hidden danger target features is obtained;

[0106] S34: Based on the feature map A0 obtained in S33 that integrates the multi-scale railway external environment hidden danger target features, a context-aware mask generation module is constructed to generate a mask for railway external environment hidden danger extraction. The low-level railway external environment hidden danger feature map is used as a guide image to guide the refinement of the mask edge of the railway external environment hidden danger extraction and improve the edge and detail information features. The feature map A0 obtained in S33 that integrates the multi-scale railway external environment hidden danger target features is used as input. After two 1×1 convolutions and 2x upsampling, the resolution is increased to the same as the input image of the railway external environment hidden danger extraction model. Finally, a 3×3 convolution block is used to output the railway external environment hidden danger detection extraction mask P∈R with the same channel dimension and number of categories. N×512×512 , N is the number of hidden danger categories, each channel represents a type of hidden danger target, and the hidden danger target is reflected in the output result in the form of pixel-level labeling;

[0107] P=G convblock1×1 (G Upsample (G convblock1×1 (G Upsample (G convblock1×1 (A0))))) (8)

[0108] The low-level railway external environment hidden danger feature map S0 obtained in S31 is subjected to 1×1 convolution dimensionality reduction and used as a guide image. The railway external environment hidden danger detection extraction mask P is refined using guided filtering to improve the edge and detail information features, and the railway external environment hidden danger extraction result E after edge refinement is obtained;

[0109] S35: Construct a loss function and use the training set obtained in S2 to train the railway external environment hidden danger extraction model. During the training process, the output results and label maps use focal cross-entropy loss as the loss function, which is specifically expressed as:

[0110] L=-α(1-p t ) γ log(p t )α=0.25γ=2 (9)

[0111] where p t is the sample prediction probability, α is the category weight used to solve the category imbalance problem, and γ is the focus factor used to adjust the model's focus on difficult samples.

[0112] The railway external environment hidden danger extraction model was implemented in the PyTorch framework. SGD was used as the optimizer, with an initial learning rate of 0.01, a momentum of 0.9, and a weight decay of 5e-4. The learning rate was adjusted using a poly strategy. The railway external environment hidden danger extraction model was trained on an NVIDIA GTX 3090 GPU for 100 training iterations. This completed the construction and training of the railway external environment hidden danger extraction model.

[0113] S4: Uses knowledge distillation to compress the trained railway external environment hazard extraction model obtained in S3. Using the railway external environment hazard extraction model designed in S3 as the teacher model, a student model with the same railway external environment hazard extraction capabilities is trained. The student model is constructed using an encoder-decoder structure. The features [F0, F1, F2, F3, F4] output by the stage feature enhancement module in the teacher model and the prediction result E output by the model are used as feature knowledge. Losses are calculated between the multi-level features output by the encoder and the prediction result output by the decoder of the student model, respectively. This reduces the model size, facilitates edge deployment, and improves the efficiency of railway external environment hazard detection.

[0114] S5: Use the compressed railway external environment hidden danger extraction model obtained by S4 to generate a railway external environment hidden danger mask for the test data in the test set obtained by S2, and obtain the railway external environment hidden danger extraction result mask. Input the test set into the student model to obtain the hidden danger target detection and extraction result map. The detection and extraction result is saved as a grayscale image, and different categories of hidden danger targets are marked with different pixel values. Specifically, the background pixel value is 0, and the hidden danger target pixels take values ​​1, 2, 3...N according to the category, where N is the total number of categories.

[0115] S6: Post-process the target mask of railway external environment hidden dangers obtained in S5 according to the railway external environment hidden dangers, splice the masks, and remove the mask connected domains with an area smaller than a predetermined threshold, so as to obtain the target mask of railway external environment hidden dangers without small connected domains, such as Figure 6 Then, the railway external environment hidden danger target mask is combined with the remote sensing data geographic information to generate a railway external environment hidden danger target mask file with geographic information.

[0116] First, the mask image blocks of the railway external environment hidden danger targets are spliced ​​according to the coordinate information recorded during cropping, and the overlapping areas are taken as the union to obtain the spliced ​​railway external environment hidden danger target prediction map;

[0117] Secondly, the railway external environment hidden danger target prediction map is split by category. Specifically, for the railway external environment hidden danger target with a value of i (i=1, 2, 3, ... N) in the railway external environment hidden danger target prediction map, a single-channel all-zero matrix with the same width and height as the railway external environment hidden danger target prediction map is created, and the position with a value of i in the railway external environment hidden danger target prediction map is screened out, and the pixel value of the corresponding position in the matrix is ​​set to 255;

[0118] Connected domains with too small an area in the railway external environmental hidden danger target prediction map are usually false positives. Therefore, the scikit-image library is used to count the areas of all connected domains in the matrix and remove those with an area smaller than a certain threshold. In this example, the threshold is 50.

[0119] Use the GDAL library to add the coordinate system and projection system of the original test data to the prediction result map after removing the false detection area, generate raster data, and convert the raster data into a shapefile file to generate a railway external environment hidden danger target shapefile file with geographic information;

[0120] S7: Combine the extraction results of railway external environmental hazards with the geographic information system, import the shapefile files of each type of hazard target into ArcGIS software, and count the type, quantity, area, and location information of the hazard targets; combine the geographical location information of the railway tracks, and divide the risk levels of the hazard targets according to the distance between the hazard targets and the tracks. In this example, within 100m from the guardrail is a major risk, and 100m-500m is a general risk. Based on the geographic information of the station section, the hazard target information is counted by station section to obtain the risk level of railway external environmental hazards and station section distribution information.

[0121] S8: Update remote sensing data regularly and repeat S5-S7 to collect statistics on changes in railway external environmental hazards, so as to achieve fast, efficient and intelligent detection and extraction of railway external environmental hazard targets and information statistics and tracking.

[0122] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for intelligent detection and extraction of railway external environmental hidden dangers based on remote sensing data, characterized by: The following steps are included: S1: Acquire multi-dimensional, multi-source, and multi-period original high-resolution remote sensing data along the railway for training the railway external environment hidden danger extraction model; collect high-resolution remote sensing data for training the railway external environment hidden danger extraction model; pre-process the high-resolution remote sensing data; fuse multi-band remote sensing images and perform super-resolution reconstruction to obtain pre-processed and enhanced high-resolution remote sensing data; S2: For the pre-processed and enhanced high-resolution remote sensing data obtained in S1, the railway external environment hidden danger targets in the remote sensing data are labeled according to the spectral characteristics, geometric characteristics, and distribution characteristics of the railway external environment hidden dangers. The labeled high-resolution remote sensing data is divided into training data and test data, and the training data and test data are cropped into image blocks of uniform size. Each image block carries both geographic information and cropping coordinates. The training data is geometrically augmented to expand the data set, thereby obtaining the training set and test set for training and testing the railway external environment hidden danger extraction model; S3: According to the characteristics of hidden dangers in the railway external environment, a feature extraction backbone is selected, and the multi-level railway external environment hidden danger features are extracted by the feature extractor; The design introduces a stage feature enhancement module with deformable convolution to adaptively enhance the characteristics of hidden dangers in the external environment of railways at different levels; A weighted feature alignment and fusion module is designed to align feature maps at different levels. A gating mechanism is used to screen and weightedly fuse effective hidden danger features from multi-level railway external hidden danger feature maps. A context-aware mask generation module generates masks for extracting hidden dangers from the railway external environment. Using low-level railway external hidden danger feature maps as guide images, the mask edges for extracting hidden dangers from the railway external environment are refined, improving edge and detail information. A railway external environment hidden danger extraction model is constructed, along with a loss function, setting the learning rate, batch size, weight initialization method, weight decay coefficient, optimization method, and number of iterations. The training set obtained by S2 is used to train the railway external environment hidden danger extraction model to obtain the trained railway external environment hidden danger extraction model, that is, the railway external environment hidden danger extraction model is constructed and trained; The implementation method of step S3 is: S31: According to the characteristics of railway external environment hidden dangers, a backbone for extracting railway external environment hidden danger features is selected, and a backbone network for extracting multi-level features of railway external environment hidden dangers is constructed. The backbone network includes m feature extraction stages. As the backbone network deepens, the resolution of the railway external environment hidden danger feature map gradually decreases. Initialize the feature extraction backbone using weights trained on a public dataset; The railway external environment hidden danger training set data obtained by S2 is input into the backbone network to extract the multi-level railway external environment hidden danger feature map. The backbone network outputs a first-level feature map at each stage. The set of multi-level railway external environment hidden danger feature maps output by the backbone network is [S0, S1, ..., S m-1 ]; S32: Based on the multi-level railway external environment hidden danger features extracted by the feature extraction backbone constructed in S31, a stage feature enhancement module is designed and introduced that uses deformable convolution to adaptively enhance the railway external environment hidden danger features at different levels, thus constructing a stage feature enhancement module; This module takes the multi-level railway external environment hidden danger feature map obtained by S31 as input and includes two parallel branches. One branch uses global average pooling to spatially compress the railway external environment hidden danger feature map, and then obtains the weight vector of the railway external environment hidden danger feature in the channel dimension through the convolution layer, ReLU activation function and convolution layer in sequence. The sigmoid function compresses the weight vector value to the range of [0,1] and multiplies it with the input railway external environment hidden danger feature map to obtain the railway external environment hidden danger feature map F after channel feature enhancement. CA , expressed as: Where S represents the input railway external environment hidden danger characteristic map, G GAP (·) represents global average pooling, G conv (·) represents the convolutional layer, G ReLu (·) represents the ReLU activation function, δ(·) represents the sigmoid function, Indicates the multiplication of corresponding pixels; The other branch reduces the channel dimension of the input railway external environment hidden danger feature map through convolution, obtains the weight vector of the railway external environment hidden danger feature in the spatial dimension through deformable convolution block and convolution, compresses the weight vector value to the range of [0,1] by sigmoid function, and multiplies it with the input railway external environment hidden danger feature map to obtain the railway external environment hidden danger feature map F after spatial feature enhancement. SA , expressed as: G deformblock =G ReLu (G BN (G deformconv (·))) (3) Among them G deformblock (·) represents a deformable convolution block, G BN (·) represents the batch normalization layer, G deformconv (·) denotes a deformable convolutional layer; Railway external environment hidden danger feature map F after enhancing channel and space features CA With F SA After connecting along the channel dimension, the channel dimension is reduced by the convolution block, and then the deformable convolution block is passed to obtain the adaptively enhanced railway external environment hidden danger feature F enhance , expressed as: Among them G convblock (·) represents a convolutional block, Indicates channel dimension connection; The multi-level railway external environment hidden danger feature maps output by the backbone network are input into the stage feature enhancement module respectively to obtain the enhanced feature set [F0, F1, ..., F m-1 ]; S33: For the railway external environment hidden danger feature map after feature enhancement obtained in S32, a feature weighted alignment and fusion module is designed to align the feature maps of different levels from top to bottom, and adopt a gating mechanism to screen the effective hidden danger features in the multi-level railway external hidden danger feature map and weightedly fuse them. The feature weighted alignment and fusion module starts from the highest level railway external hidden danger feature map, takes the two adjacent levels of railway external hidden danger feature maps as input, outputs an aggregated feature map, and then takes the aggregated features and the next level feature map as input to obtain a new aggregated feature map. In this way, aggregation is carried out step by step, and finally a feature map that aggregates all multi-level railway external hidden danger feature maps and fuses the multi-scale railway external environment hidden danger target features is obtained; S34: Based on the feature map A0 obtained by S33 that integrates the multi-scale railway external environment hidden danger target features, a context-aware mask generation module is constructed to generate a mask for railway external environment hidden danger extraction, and the low-level railway external environment hidden danger feature map is used as a guide image to guide the refinement of the mask edge of the railway external environment hidden danger extraction, and improve the edge and detail information features; using the feature map A0 that integrates the multi-scale railway external environment hidden danger target features obtained by S33 as input, after a combination of 2 convolutions and upsampling, the resolution is increased to the same as the input image of the railway external environment hidden danger extraction model, and finally a convolution block is used to output the railway external environment hidden danger detection extraction mask P∈R with the same channel dimension and number of categories. N ×H×W , N is the number of hidden danger categories, each channel represents a type of hidden danger target, and the hidden danger target is reflected in the output result in the form of pixel-level labeling; P=G convblock (G Upsample (G convblock (G Upsample (G convblock (A0))))) (8) The low-level railway external environment hidden danger feature map S0 obtained in S31 is convoluted and reduced in dimension. The convolution operation is used as a guide image. The railway external environment hidden danger detection and extraction mask P is refined using a guided filter to improve the edge and detail information features, thereby obtaining the railway external environment hidden danger extraction result E after edge refinement. S35: Construct a loss function and use the training set obtained in S2 to train the railway external environment hidden danger extraction model. During the training process, the output results and label maps use focal cross-entropy loss as the loss function, which is specifically expressed as: L=-α(1-p t ) γ log(p t ) (9) where p t is the sample prediction probability, α is the category weight used to solve the category imbalance problem, and γ is the focus factor used to adjust the model's focus on difficult samples; Set the learning rate, batch size, weight initialization method, weight decay coefficient, optimization method, and number of iterations; use stochastic gradient descent to update the model parameters, and iterate until the loss value no longer decreases to obtain the trained railway external environment hidden danger extraction model, thus completing the construction and training of the railway external environment hidden danger extraction model; S4: Use the knowledge distillation method to compress the trained railway external environment hidden danger extraction model obtained in S3. Use the railway external environment hidden danger extraction model designed in S3 as the teacher model to train a student model with the same railway external environment hidden danger extraction ability; S5: Use the compressed railway external environment hidden danger extraction model obtained in S4 to generate a railway external environment hidden danger mask for the test data in the test set obtained in S2, and obtain a railway external environment hidden danger extraction result mask; S6: Post-processing the railway external environment hidden danger target mask obtained in S5 according to the railway external environment hidden danger, splicing the masks, and removing the mask connected domains with an area smaller than a predetermined threshold, and then combining the railway external environment hidden danger target mask with the geographic information of the remote sensing data to generate a railway external environment hidden danger target vector mask file with geographic information; S7: Combine the extraction results of railway external environmental hazards with the geographic information system to count the type, quantity, area, and location information of the hazard targets; combine the geographical location information of the railway tracks and classify the risk levels of the hazard targets according to the distance between the hazard targets and the tracks; and count the hazard target information by station section based on the station section geographical information to obtain the railway external environmental hazard risk level and station section distribution information. Combined with the multi-dimensional, multi-source, and multi-period original high-resolution remote sensing data along the railway obtained in S1, the hazard visualization is carried out; S8: Update remote sensing data regularly and repeat S5-S7 to collect statistics on changes in hidden dangers in the railway's external environment.

2. The method for intelligent detection and extraction of railway external environmental hidden dangers based on remote sensing data according to claim 1, characterized in that: It also includes S9, which extracts the target detection results of hidden dangers in the external environment of railways and the information statistics and tracking results achieved based on S8.

3. The method for intelligent detection and extraction of railway external environmental hidden dangers based on remote sensing data according to claim 1 or 2, characterized in that: The implementation method of step S1 is: S11: Based on the railway operation safety requirements, select the scope of external environmental hazard detection along the railway, delineate the high-resolution remote sensing data area for railway external environmental hazard detection, and obtain multi-dimensional, multi-source, and multi-period original high-resolution remote sensing data along the railway for training the railway external environmental hazard extraction model; S12: Preprocess the multi-dimensional, multi-source, and multi-period original high-resolution remote sensing data along the railway obtained in S11 for training the railway external environment hazard extraction model. Use remote sensing data processing software to perform atmospheric correction and orthorectification on the multispectral image after radiometric calibration. Perform radiometric calibration and orthorectification on the panchromatic data to separate the reflectance information of the ground objects from the atmospheric and solar information to obtain the spectral properties of the object surface. After splicing and cropping the elevation data, set the projection system, and then choose whether to resample based on the data size and platform computing power. Obtain pre-processed multi-dimensional, multi-source, multi-period original high-resolution remote sensing data along the railway; S13: The multi-dimensional, multi-source, and multi-period original high-resolution remote sensing data along the railway obtained in S12 are aligned, and the multi-band remote sensing images along the railway are fused using a method based on guided filtering and sparse representation. The characteristics of the hidden dangers in the external environment of the railway are enhanced according to the spectral and geometric characteristics of the hidden dangers in the external environment of the railway, and a deep neural network is further used for super-resolution reconstruction to obtain the preprocessed and enhanced high-resolution remote sensing data.

4. The method for intelligent detection and extraction of railway external environmental hidden dangers based on remote sensing data according to claim 1, characterized in that: For the two-level railway external environment hidden danger feature map of the input feature weighted alignment fusion module, the low-resolution high-level feature F L Upsample to low-level features F with high resolution H After the same size, they are connected along the channel dimension; the connected feature map is reduced in dimension through the convolution layer and the BN layer, and then two bias maps are output through the convolution layer and a weight graph Δ m ,Each bias map contains two channels, representing the bias along the x and y directions respectively; G gen =G conv (G BN (G conv (·))) (6) Among them, G U psample(·) represents upsampling, G gen (·) represents the bias and weight generation operation; Use the grid_sample function to align the input two-level railway external environment hidden danger feature maps according to the generated bias map. Specifically, according to Align F L ,according to Align F H , a gating mechanism is used to filter effective railway external hidden danger features through the weight map for fusion. Specifically, the aligned feature map F L With F H According to Δ m and 1-Δ m The weights of are added to get the aggregated feature A, which is expressed as: For the railway external environment hidden danger feature map [F0,F1,...,F m-1 ], from top to bottom from F m-1 Aggregate multi-level features according to formula (7): A m-2 =G gate_align (F m-2 ,F m-1 ) A m-3 =G gate_align (F m-3 ,A m-2 ) <h2 style=";text-align:left;direction:ltr">…A1=G<h2 style=";text-align:left;direction:ltr"> align <h2 style=";text-align:left;direction:ltr"> (F1,A2) A0=G align (F0,A1) After alignment and gated weighted aggregation of multi-level railway external environment hidden danger feature maps, a feature map A0 is obtained that integrates the multi-scale railway external environment hidden danger target features.

5. The method for intelligent detection and extraction of railway external environmental hidden dangers based on remote sensing data according to claim 4, characterized in that: In S7, the vector mask file of hidden danger targets in the railway external environment is imported into the GIS software to count the type, quantity, area, and location information of the hidden danger targets. Combined with the geographical location information of the railway track, the hidden danger targets are divided into risk levels according to the distance between the hidden danger targets and the track. The risk level is within 100m from the guardrail, and the risk level is between 100m and 500m. The hidden danger target information is counted by station section based on the station section geographical information.