A vision-based intelligent early warning method for foreign object detection on airport runways
Through visual detection methods, using technologies such as interference removal modules and visual backbone networks, the problems of weather interference and high cost in foreign object detection on airport runways are solved, and efficient and accurate foreign object detection and early warning are achieved.
Patent Information
- Application Number
- CN202311527852.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-11-16
AI Technical Summary
The existing airport runway foreign object detection technology has problems such as poor interference from weather factors, high cost, and complicated deployment.
A vision-based intelligent early warning method for airport runway foreign object detection is adopted to remove weather interference through the interference removal module. It combines the visual backbone network, regional learning network and detection network to extract multi-scale features and predict the foreign object boundary box and category to achieve accurate detection of foreign objects on the runway. detection.
It improves the robustness and accuracy of detection, reduces interference from weather factors, avoids missed detection of unobvious foreign objects, and achieves efficient foreign object detection and early warning.
Smart Images

Figure CN117576658B
Abstract
Description
Technical Field
[0001] The invention relates to a method for realizing intelligent early warning of foreign body detection on an airport runway, in particular to a method for realizing intelligent early warning of foreign body detection on an airport runway based on vision. Background Art
[0002] Airport runway foreign object detection is a very important application technology, which usually refers to the detection and warning of various objects that do not belong to the runway working area but appear on the runway for various reasons. Foreign objects on the airport runway will affect the normal take-off, landing and movement of aircraft, causing serious safety hazards and economic losses. Therefore, how to achieve a set of accurate and reliable airport runway foreign object detection methods is of great research significance. However, the diversity of foreign object types and irregular shapes, as well as the impact of various severe weather conditions, have brought considerable challenges to the detection of foreign objects on airport runways.
[0003] In the past, this kind of inspection work was mainly done manually. Staff members need to visit the runway regularly and find and remove foreign objects on the runway through visual inspection. However, this method is time-consuming and laborious, and its dependence on the human eye also makes the inspection results likely to be missed. In order to solve this problem, scientific researchers have developed a series of runway foreign object detection technologies. These technologies mainly include radar technology, machine vision technology, artificial intelligence technology, etc. For example, by installing radars on both sides of the runway, the runway can be continuously scanned, and once foreign objects are found, a warning will be issued immediately. At the same time, machine vision technology can automatically identify foreign objects on the runway by analyzing the images captured by the camera. Artificial intelligence technology can improve the accuracy and efficiency of foreign object detection by learning and analyzing large amounts of data.
[0004] The mainstream method currently used is a hybrid tower radar and optoelectronic method, which uses multiple towers to deploy millimeter-wave radars and infrared cameras, and uses both methods to scan and detect foreign objects at the same time. This method has high reliability, but its disadvantages are that it is expensive and complex to deploy. Summary of the invention
[0005] Purpose of the invention: The technical problem to be solved by the present invention is to provide a vision-based intelligent warning method for detecting foreign objects on airport runways in view of the deficiencies in the prior art.
[0006] In order to solve the above technical problems, the present invention discloses a vision-based intelligent early warning method for detecting foreign objects on an airport runway, comprising:
[0007] Step 1: Collect images of foreign objects on the airport runway;
[0008] Step 2: Label the collected airport runway foreign object images and divide the labeled data into a training set and a test set; the labeling includes: manually labeling the bounding box of the foreign object, the type of foreign object and the image information; for the airport runway foreign object images containing weather factors, an additional corresponding clear weather image is labeled;
[0009] Step 3: Use the training set to train an airport runway foreign object detection model, wherein the airport runway foreign object detection model includes: a de-interference module and a visual module, wherein the de-interference module is used to remove visual interference caused by weather factors in the airport runway foreign object image to obtain a restored image; and the visual module is used to determine the bounding box and category of the foreign object;
[0010] Step 4: Use the test set to test the airport runway foreign object detection model, adjust the hyperparameters of the airport runway foreign object detection model according to the test results, and repeat step 3 until the final airport runway foreign object detection model is obtained;
[0011] Step 5: Detect the airport runway through the final airport runway foreign object detection model, obtain foreign object information, and feed back the detection results to complete the vision-based airport runway foreign object detection intelligent warning.
[0012] Furthermore, the annotated data described in step 2 specifically includes: an RGB image of the airport runway foreign object image, foreign object bounding box coordinates, foreign object category label, and a corresponding RGB image under clear weather.
[0013] Furthermore, the interference removal module described in step 3 includes: an encoder and a decoder;
[0014] Among them, the encoder is used to extract multi-scale features of the input image, the decoder is used to restore the image based on the multi-scale features, and a learnable weather type query is introduced in the decoding stage to distinguish weather types and remove different types of weather interference.
[0015] Furthermore, the visual module described in step 3 includes: a visual backbone network, a region learning network and a detection network;
[0016] Among them, the visual backbone network is used to extract visual features of different dimensions of the input image, the regional learning network is used to predict the coordinates of key areas in the image (such as the edge of the runway, the shadow under the aircraft, etc.), and the detection network is used to determine the location and classification information of foreign objects in the input image based on the visual features, and obtain the bounding box and category of the foreign objects in the input image.
[0017] Furthermore, the use of the training set in step 3 to train the airport runway foreign object detection model specifically includes:
[0018] Step 3-1, input the airport runway foreign object image from a set of labeled data in the training set into the interference removal module, and the input image is represented as:
[0019]
[0020] in, Represents the image pixel value range, H represents the height of the input image x, and W represents the width of the input image x;
[0021] In the interference removal module, an encoder is used to extract multi-scale visual features, which is expressed as:
[0022]
[0023] in, represents the i-th multi-scale visual feature, C i Representation characteristics The number of channels;
[0024] The decoder is the inverse process of the encoder. And learnable weather type query Q w Restore Image Obtain the interference-free image x′ by removing the weather factors from the input image x;
[0025] Step 3-2: Input the de-interference image x′ into the visual module:
[0026] Extracting multi-scale visual features of the de-interfered image x′ through a visual backbone network as follows:
[0027]
[0028] The region learning network learns the possible key regions in the image based on the features extracted by the visual backbone, and cuts out the key regions from the visual features, so that the detection network can strengthen the features of the key regions.
[0029] The detection network regresses the bounding box and category of the foreign object in the image based on the extracted multi-scale visual features, that is, the predicted bounding box and category of the foreign object;
[0030] Step 3-3: Calculate the loss function of the runway foreign object detection model The details are as follows:
[0031]
[0032] in, is the smooth L1 loss of the restored image x′ output by the de-interference module and the corresponding image y under clear weather conditions; The smooth L1 loss of the predicted foreign object bounding box coordinates and the manually annotated foreign object bounding box coordinates; is the cross entropy loss between the predicted foreign body category and the manually labeled foreign body category;
[0033] Step 3-4: Back propagation, use the optimizer to optimize the parameters Θ of the airport runway foreign object detection model;
[0034] Step 3-5: Read the next set of labeled data in the training set, return and execute step 3-1 again until all labeled data in the training set is completed.
[0035] Furthermore, the encoder is used to extract multi-scale visual features as described in step 3-1, that is, the multi-scale features of the input image are extracted through the attention mechanism. The calculation method is as follows:
[0036]
[0037]
[0038] Among them, f i,j represents the jth self-attention layer in stage i of the encoder, n i is a hyperparameter, indicating the number of self-attention layers in stage i, and ° indicates compound operation;
[0039] The encoder consists of four stages, i∈{1,2,3,4}, each of which consists of several self-attention layers. A 1 / 2 downsampling is performed between each stage to obtain features of different scales or resolutions. The self-attention layer flattens the image features and uses them as query Q, key K, and key value V for attention calculation. The specific calculation method is:
[0040]
[0041]
[0042] in and Represent the input and output features respectively; Flatten represents the flattening operation, that is, the image features are transformed from pixel space to pixel space. Mapping to embedding space C represents the embedding dimension, that is, the number of channels in the image features; Represents matrix multiplication.
[0043] Furthermore, the image is restored based on the visual features extracted by the encoder and the learnable weather type query described in step 3-1, that is, the weather type query and the visual features are stacked, and the weather type query is allowed to learn the weather features through the self-attention mechanism, and each visual feature is restored at the same time. Finally, all features are fused through a feature fusion network to obtain the interference-free image x′ without weather factors. The calculation method is as follows:
[0044]
[0045]
[0046]
[0047] Among them, Q w represents a learnable weather query, which will automatically learn weather features during the decoding process; Concat represents a stacking operation, which flattens the weather query and visual features and concatenates them together; ε i represents the intermediate value after combining the weather query and the visual features; f j ′ represents the jth cross attention layer in the decoder; n is a hyperparameter representing the number of decoder layers; represents the feature fusion network;
[0048] The decoder is not divided into stages, and self-attention calculations are performed on the four multi-scale features respectively. The calculation method is consistent with that in the encoder. The feature fusion network generates the final restored image by upsampling and fusing the decoder output features. The calculation method is:
[0049]
[0050]
[0051] in, Represents the transition features in the feature fusion process, Conv 3×3 represents a 3×3 convolutional layer, UpSample represents a 2x upsampling operation; finally Continue upsampling to the resolution of the original image to obtain the output image x′.
[0052] Furthermore, the step 3-2 of extracting the multi-scale visual features of the interference-free image through the visual backbone network specifically includes:
[0053] The visual backbone uses the ResNet structure to calculate the multi-scale visual features of the de-interference image x′. The specific method is as follows:
[0054]
[0055]
[0056] in represents the i-th visual feature, represents the jth residual block in stage i of the ResNet structure, c i is a hyperparameter, indicating the number of residual blocks contained in stage i.
[0057] Furthermore, the residual block described in step 3-2 is composed of a convolutional layer, which adds the input features to the original features after convolution operation, thereby reducing the degradation phenomenon during training. The calculation method is:
[0058]
[0059] in, and Represents input and output features respectively; Conv 1×1 With Conv 3×3 They represent 1×1 and 3×3 convolutional layers respectively.
[0060] Furthermore, the possible key areas in the image are learned based on the features extracted from the visual backbone in step 3-2, and the key areas are cut out from the visual features, specifically including:
[0061] The region learning network presupposes a learnable region query Q r , learn the coordinates of the key areas of the image from the visual features, and the calculation method is as follows:
[0062] Q0=Q r
[0063]
[0064] in represents the preset learnable region query, which is used to learn regional features. K and D are hyperparameters. i It is an intermediate variable in the regional learning network process; represents a linear layer, which unifies the query dimension to the dimension of the visual feature (i.e., the number of channels) C i Consistent; superscript T indicates matrix transpose; Represents matrix multiplication.
[0065] The region prediction process uses a fully connected layer to predict the coordinates of the key areas. The calculation process is as follows:
[0066] y reg =FC reg (Q4)
[0067] Among them, FC regrepresents the fully connected layer, which consists of two 3×3 convolutions; Represents the predicted bounding box coordinates of the K key areas, and applies them to the feature clipping process to clip these key areas from the original visual features and merge them with the original visual features. The process is as follows:
[0068]
[0069] in It represents the mixed features that are finally sent to the detection network after feature clipping and splicing; Indicates that according to the i-th coordinate y reg [i] From visual features The predicted i-th key area feature is cropped out; Concat represents a stacking operation, that is, multiple features are flattened and spliced together.
[0070] Furthermore, the regression described in step 3-2 obtains the bounding box and foreign object category of the foreign object in the image, specifically including:
[0071] The detection network uses a cross-attention mechanism to regress the detection target based on the multi-scale features extracted by the visual backbone, and predicts its bounding box coordinates and category probability respectively. The calculation method is as follows:
[0072]
[0073]
[0074] Among them, f j represents the jth cross attention layer; n is a hyperparameter representing the number of cross attention layers; is a preset learnable query that updates its own parameters after the cross-attention layer. Both N and d are hyperparameters. bbox and FC cls There are two fully connected layers, each consisting of two linear transformations, respectively, through the final query Get the coordinate position of the bounding box of the foreign object Probability of foreign body category Where N represents the number of foreign objects detected, and the coordinate dimension of each foreign object is 4, expressed as (x1, y1, x2, y2), representing the coordinate position of the upper left corner and the lower right corner of the foreign object; n cls Represents the number of foreign body categories, and the predicted result y cls Represents the probability that each foreign object belongs to the corresponding foreign object category, and the category with the highest probability is the prediction result, that is, the category to which the foreign object is predicted to belong;
[0075] Among them, the cross attention layer uses a preset learnable query Q l As query Q, the mixed features after feature clipping and splicing are As key K and key value V, attention calculation is performed to learn foreign features from features. The calculation method is as follows:
[0076]
[0077]
[0078] Among them, Q′ l It indicates the query that has learned some foreign object features after cross-attention calculation; d indicates the dimension of the query, which is consistent with the number of channels of the visual feature; Represents matrix multiplication.
[0079] Beneficial effects:
[0080] (1) In view of the problem that the existing airport runway foreign object detection model based on computer vision methods has poor resistance to interference from weather factors, the present invention proposes a new dual network structure method, designs a de-interference module to remove the influence of weather factors, and improves the robustness and accuracy of the visual model.
[0081] (2) The present invention designs an auxiliary regional learning network in the detection network, which can combine visual features to learn the locations of key areas in the image where inconspicuous foreign objects may exist, and crop and enhance the features of the relevant areas to achieve accurate detection of inconspicuous foreign objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.
[0083] Figure 1 It is the overall architecture diagram of the present invention.
[0084] Figure 2 The diagram is a schematic diagram of a set of labeled data in an embodiment.
[0085] Figure 3 FIG. 1 is a clear image output by a de-interference module in one embodiment.
[0086] Figure 4 The figure is a schematic diagram of the difference between the predicted foreign body border and the marked actual border in an embodiment.
[0087] Figure 5 Schematic diagram of probability distribution of foreign body prediction categories in an embodiment. DETAILED DESCRIPTION
[0088] The present invention detects and warns foreign objects on airport runways through visual detection methods. First, the image affected by bad weather is restored through an image generation model to avoid interference from related factors to the visual model; then the multi-scale features of the foreign object image are extracted through a visual detection model, and the bounding box and classification of the target are regressed to finally achieve detection and warning of foreign objects on the airport runway. The present invention adopts a vision-based method to detect foreign objects on the runway. It mainly models target analysis as a target detection task through a visual model, and extracts features through a top-down method to complete the detection and classification of target objects. In addition, the present invention designs a de-interference module to reduce the visual interference caused by bad weather such as rain, snow and fog; at the same time, the present invention designs an auxiliary regional learning network that can adaptively learn the positions of areas such as runway edges and aircraft shadows in images, avoiding the missed detection of inconspicuous foreign objects in such areas.
[0089] In summary, the present invention proposes a vision-based intelligent early warning method for detecting foreign objects on airport runways. Figure 1 As shown, the specific technical solution is as follows:
[0090] Step 1: Collect images of foreign objects on the airport runway;
[0091] Step 2: Label the collected airport runway foreign object images and divide the labeled data into a training set and a test set; the labeling includes: manually labeling the bounding box of the foreign object, the type of foreign object and the image information; for the airport runway foreign object images containing weather factors, an additional corresponding clear weather image is labeled;
[0092] Step 3: Use the training set to train the airport runway foreign object detection model, including the interference removal module and the visual module; the interference removal module is used to remove the visual interference caused by weather factors in the image to obtain the restored image; the visual module is used to determine the bounding box and category of the foreign object;
[0093] Step 4: Use the test set to test the airport runway foreign object detection model, adjust the hyperparameters of the airport runway foreign object detection model according to the test results, and repeat step 3 until the final airport runway foreign object detection model is obtained;
[0094] Step 5: Detect the airport runway through the final airport runway foreign object detection model, obtain foreign object information, and feed back the detection results to complete the vision-based airport runway foreign object detection intelligent warning.
[0095] Preferably, the foreign object information annotation in step 2 includes an RGB image of the foreign object on the airport runway, the coordinates of the foreign object boundary box, the category label of the foreign object, and the corresponding RGB image under clear weather.
[0096] Preferably, the content of step 3 is as follows:
[0097] Step 3-1: Input the airport runway foreign object images from a set of labeled data in the training set into the interference removal module. The input image is represented as: in, represents the image pixel value range, H represents the height of the input image x, and W represents the width of the input image x; the interference removal module consists of an encoder and a decoder, where the encoder is responsible for extracting multi-scale features, which are expressed as Where i represents the i-th multi-scale feature, H represents the input image x height, W represents the input image x width, C i Representation characteristics The number of channels; the decoder is the inverse process of the encoder, based on the visual features extracted by the encoder And learnable weather type query Q w Restore Image Remove the weather interference factors in the original image x;
[0098] Step 3-2: The visual module takes the output x′ of the de-interference module as input, and includes three parts: the visual backbone network, the region learning network, and the detection network; the visual backbone network is responsible for extracting multi-scale visual features The dimension is similar to the multi-scale features in the interference removal module; the region learning network learns the key areas in the image based on the features extracted by the visual backbone, and cuts out the key areas from the visual features, so that the detection network can enhance the features of the key areas; the detection network regresses the bounding box and category of the foreign object in the image based on the extracted visual features;
[0099] Step 3-3: Calculate the loss function in is the smooth L1 loss between the restored image x′ output by the de-interference module and the real clear weather image y; is the smooth L1 loss between the predicted foreign object bounding box coordinates and the true bounding box coordinates; is the cross entropy loss between the predicted foreign object category and the true category.
[0100] Step 3-4: Back propagation, use the optimizer to optimize the model parameters Θ;
[0101] Step 3-5: Read the next set of images and annotation information in the data set, and return to step 3-1 until all the data in the training set has been read;
[0102] Step 3-6: Repeat steps 3-1 to 3-5 and continue to optimize the model parameters θ until the performance of the model on the test set reaches the set indicator.
[0103] Further preferably, the step 3-1 comprises:
[0104] The encoder part extracts multi-scale features of the image through the attention mechanism The calculation is as follows:
[0105]
[0106]
[0107] where f i,j represents the jth self-attention layer in stage i of the encoder, n i is a hyperparameter, which indicates the number of self-attention layers in stage i.
[0108] The encoder consists of four stages, each of which consists of several self-attention layers. A 1 / 2 downsampling is performed between each stage to obtain features of different scales (i.e. different resolutions). The self-attention layer flattens the image features and uses them as both the query (Q) and the key value (K, V) for attention calculation. The specific calculation method is:
[0109]
[0110]
[0111] in Represents input and output features respectively; Flatten represents the flattening operation, that is, the image features are transformed from pixel space to pixel space. Mapping to embedding space C represents the embedding dimension, that is, the number of channels in the image features; Represents matrix multiplication.
[0112] The decoder process is opposite to the encoder process. First, the weather type query is used to learn weather features through the self-attention mechanism, and each visual feature is restored at the same time. Finally, all features are fused through a feature fusion network to obtain the image x′ without weather interference factors. The calculation method is:
[0113]
[0114]
[0115]
[0116] Among them, Q w represents a learnable weather query, which will automatically learn weather features during the decoding process; Concat represents a stacking operation, which flattens the weather query and visual features and concatenates them together; ε i represents the intermediate value after combining the weather query and the visual features; fj ′ represents the jth cross attention layer in the decoder; n is a hyperparameter representing the number of decoder layers; represents the feature fusion network;
[0117] The decoder is no longer divided into stages, but performs self-attention calculations for the four multi-scale features separately. The calculation formula is consistent with that of the encoder. The feature fusion network generates the final restored image by upsampling and fusing the decoder output features. The calculation formula is:
[0118]
[0119]
[0120] Among them, Conv 3×3 represents a 3×3 convolutional layer, UpSample represents a 2x upsampling operation; finally Continue upsampling to the resolution of the original image to obtain the output image x′.
[0121] Further preferably, the step 3-2 comprises:
[0122] The visual backbone adopts the ResNet structure. According to the restored image x′ after interference removal, its visual features are calculated. The calculation formula is as follows:
[0123]
[0124]
[0125] in represents the i-th multi-scale visual feature, represents the jth residual block in stage i of ResNet, c i is a hyperparameter, which indicates the number of residual blocks contained in stage i. The residual block is mainly composed of convolutional layers, which add the input features to the original features after convolution operation, thereby reducing the degradation phenomenon in the training process. The calculation method is:
[0126]
[0127] in Represents input and output features respectively; Conv 1×1 With Conv 3×3 They represent 1×1 and 3×3 convolutional layers respectively.
[0128] The region learning network presupposes a learnable region query Q r , learn the coordinates of the key areas of the image from the visual features, and the calculation method is as follows:
[0129] Q0=Qr
[0130]
[0131] in represents the preset learnable region query, which is used to learn regional features. K and D are hyperparameters. i It is an intermediate variable in the regional learning network process; represents a linear layer, which unifies the query dimension to the dimension of the visual feature (i.e., the number of channels) C i Consistent; superscript T indicates matrix transpose; Represents matrix multiplication.
[0132] The region prediction process uses a fully connected layer to predict the coordinates of the key areas. The calculation process is as follows:
[0133] y reg =FC reg (Q4)
[0134] Among them, FC reg represents the fully connected layer, which consists of two 3×3 convolutions; Represents the predicted bounding box coordinates of the K key areas, and applies them to the feature clipping process to clip these key areas from the original visual features and merge them with the original visual features. The process is as follows:
[0135]
[0136] in It represents the mixed features that are finally sent to the detection network after feature clipping and splicing; Indicates that according to the i-th coordinate y reg [i] From visual features The predicted i-th key area feature is cropped out; Concat represents a stacking operation, that is, multiple features are flattened and spliced together.
[0137] The detection network uses a cross-attention mechanism to regress the detection target based on the multi-scale features extracted by the visual backbone, and predicts its bounding box coordinates and category probability respectively. The calculation method is as follows:
[0138]
[0139] y bbox =FC bbox (D′),y cls =FC cls (D′)
[0140] where f j represents the jth cross attention layer; n is a hyperparameter representing the number of cross attention layers; For pre-set learnable queries, the cross-attention layer will continuously update its own parameters; FC bbox and FC cls There are two fully connected layers, respectively through the final query Predict the final coordinates of the foreign body With target category Where N represents the number of foreign objects detected, and the coordinate dimension of each foreign object is 4, expressed as (x1, y1, x2, y2), representing the coordinate position of the upper left corner and the lower right corner; n cls Represents the total category of foreign objects, and the prediction result y cls Represents the probability of each foreign object corresponding to the category, where the category with the highest probability is the category to which the foreign object is predicted to belong.
[0141] The criss-cross attention layer uses a pre-set learnable query Q l As the query (Q), the fused features after feature clipping and splicing are As key values (K, V) for attention calculation, the foreign body features are learned from the features. The calculation method is as follows:
[0142]
[0143]
[0144] where Q′ l It indicates the query that has learned some foreign object features after cross-attention calculation; d indicates the dimension of the query, which is consistent with the number of channels of the visual feature; Represents matrix multiplication.
[0145] Further preferably, the loss function in step 3-3 consists of three parts of loss The calculation formula is as follows:
[0146]
[0147] The de-interference module uses the cross entropy loss between the generated restored image and the real clear weather image. For training, the visual module is trained based on the classification cross entropy loss Smooth L1 loss with object bounding box Conduct training.
[0148] Example:
[0149] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0150] This embodiment provides a method for realizing intelligent early warning of foreign object detection on airport runways based on vision. Figure 1 The prediction model shown is used to make predictions, and the steps of the prediction method include:
[0151] Step 1: Collect images of foreign objects on the airport runway;
[0152] Step 2: Label the collected airport runway foreign object images and divide the labeled data into a training set and a test set; the labeling includes: manually labeling the bounding box of the foreign object, the type of foreign object and the image information; for the airport runway foreign object images containing weather factors, an additional corresponding clear weather image is labeled;
[0153] Step 3: Use the training set to train an airport runway foreign object detection model, wherein the airport runway foreign object detection model includes: a de-interference module and a visual module; wherein the de-interference module is used to remove visual interference caused by weather factors in the image to obtain a restored image; and the visual module is used to determine the bounding box and category of the foreign object;
[0154] Step 4: Use the test set to test the airport runway foreign object detection model, adjust the hyperparameters of the airport runway foreign object detection model according to the test results, and repeat step 3 until the final airport runway foreign object detection model is obtained;
[0155] Step 5: Detect the airport runway through the final airport runway foreign object detection model, obtain foreign object information, and feed back the detection results to complete the vision-based airport runway foreign object detection intelligent warning.
[0156] For ease of understanding, the technical solution of the present invention is described in detail below through a preferred embodiment in conjunction with the accompanying drawings.
[0157] In step 1, a scanner or camera is used to collect an image of foreign objects on the airport runway; the data format of the image of foreign objects on the airport runway can be png, jpg, etc., so that foreign objects on the airport runway can be seen more clearly.
[0158] In step 2, the collected airport runway foreign object images are annotated using labelme (for details, see: https: / / github.com / wkentaro / labelme), and the data is divided into a training set and a test set; one set of data includes airport runway foreign object images, foreign object bounding boxes, foreign object types, etc.; for images affected by weather, an additional set of corresponding images under clear weather is annotated. Figure 2 A set of labeled data is shown. The left picture is the original image, and the right picture is the labeled image, in which the labeled foreign object is a roadblock.
[0159] First, we use labelme to obtain the target positioning frame and its corresponding category annotation in the COCO dataset format for the collected airport runway foreign object images. For images affected by weather, we use PS and other photo editing tools to generate corresponding images in clear weather and perform the above annotations.
[0160] Secondly, count the number of entries and divide the dataset into training set and test set in a ratio of 8:2.
[0161] Finally, the RGB information of the overall image of foreign objects on the airport runway is obtained, which can be converted into grayscale values for subsequent training.
[0162] In step 3, the training set data is used to train and optimize the airport runway foreign object detection model. The airport runway foreign object image is first input into the de-interference module, which restores the image through the encoder and decoder, eliminates the weather interference factors, and outputs a clear and bright image; then it is input into the visual module, which uses different scale convolutional neural network (CNN) backbones to extract high and low dimensional visual features, and predicts the border and category of the foreign object through the detection network. The specific training steps of the model are as follows:
[0163] Step 3-1: The interference removal module uses an encoder-decoder structure to restore the image, eliminate the impact of weather factors, and generate a clear image.
[0164] Input: images of foreign objects on airport runways in the training set
[0165] Processing: The encoder extracts multi-scale features of the image, and the decoder generates a new image based on the features.
[0166] Output: A clear image after removing interference factors
[0167] Where H represents the height of the input image x, and W represents the width of the input image x;
[0168] The encoder part extracts multi-scale features of the image through the self-attention mechanism The calculation formula is as follows:
[0169]
[0170]
[0171] where f i,j represents the jth self-attention layer in stage i of the encoder, n iis a hyperparameter, which indicates the number of self-attention layers in stage i. The encoder consists of four stages, each of which consists of several self-attention layers. A 1 / 2 downsampling is performed between each stage to obtain features of different scales (i.e., different resolutions). The self-attention layer flattens the image features and uses them as query (Q) and key value (K, V) for attention calculation. The specific calculation method is:
[0172]
[0173]
[0174] in Represents input and output features respectively; Flatten represents the flattening operation, that is, the image features are transformed from pixel space to pixel space. Mapping to embedding space C represents the embedding dimension, that is, the number of channels in the image features; Represents matrix multiplication.
[0175] The decoder process is opposite to the encoder process. First, the weather type query is used to learn weather features through the self-attention mechanism, and each visual feature is restored at the same time. Finally, all features are fused through a feature fusion network to obtain the image x′ without weather interference factors. The calculation formula is as follows:
[0176]
[0177]
[0178]
[0179] Among them, Q w represents a learnable weather query, which will automatically learn weather features during the decoding process; Concat represents a stacking operation, which flattens the weather query and visual features and concatenates them together; ε i represents the intermediate value after combining the weather query and the visual features; f j ′ represents the jth cross attention layer in the decoder; n is a hyperparameter representing the number of decoder layers; represents the feature fusion network;
[0180] The decoder is no longer divided into stages, but performs self-attention calculations for the four multi-scale features separately. The calculation formula is consistent with that of the encoder. The feature fusion network generates the final restored image by upsampling and fusing the decoder output features. The calculation formula is:
[0181]
[0182]
[0183] Among them, Conv 3×3 represents a 3×3 convolutional layer, UpSample represents a 2x upsampling operation; finally Continue upsampling to the resolution of the original image to obtain the output image x′. Figure 3 Shown is the clear image x′ output by the de-interference module.
[0184] Step 3-2: The visual module uses convolutional neural networks (CNNs) of different scales to extract multi-dimensional visual features of the airport runway foreign object images in the training set, and uses the regional learning network to learn the areas in the image where there may be inconspicuous foreign objects, and cuts out relevant features for enhancement. Finally, the detection network predicts the bounding box and category of the foreign object.
[0185] Input: The clear image output by the interference removal module
[0186] Processing: The visual backbone extracts the multi-dimensional visual features of the image; the region learning network combines the visual features to learn the coordinates of the regions where there may be inconspicuous foreign objects; the detection network predicts the bounding box coordinates and category of the foreign object based on the features;
[0187] Output: Predicted foreign object bounding box coordinates And the corresponding category probability
[0188] Among them, N represents the number of foreign objects finally predicted, and the frame coordinate format is (x1, y1, x2, y2) represents the coordinates of the upper left corner and lower right corner of the frame, n cls Represents the total number of categories. In particular, the predicted category y cls represents the probability that the foreign body belongs to each category, so there is The category with the highest probability is the category to which the foreign body prediction belongs.
[0189] The visual backbone adopts the classic ResNet structure. According to the restored image x′ after interference removal, its visual features are calculated. The calculation formula is as follows:
[0190]
[0191]
[0192] in represents the i-th multi-scale visual feature, represents the jth residual block in stage i of ResNet, c iis a hyperparameter, which indicates the number of residual blocks contained in stage i. The residual block is mainly composed of convolutional layers, which add the input features to the original features after convolution operation, thereby reducing the degradation phenomenon in the training process. The calculation method is:
[0193]
[0194] in Represents input and output features respectively; Conv 1×1 With Conv 3×3 They represent 1×1 and 3×3 convolutional layers respectively.
[0195] The region learning network presupposes a learnable region query Q r , learn the coordinates of the key areas of the image from the visual features, and the calculation method is as follows:
[0196] Q0=Q r
[0197]
[0198] in represents the preset learnable region query, which is used to learn regional features. K and D are hyperparameters. i It is an intermediate variable in the regional learning network process; represents a linear layer, which unifies the query dimension to the dimension of the visual feature (i.e., the number of channels) C i Consistent; superscript T indicates matrix transpose; Represents matrix multiplication.
[0199] The region prediction process uses a fully connected layer to predict the coordinates of the key areas. The calculation process is as follows:
[0200] y reg =FC reg (Q4)
[0201] Among them, FC reg represents the fully connected layer, which consists of two 3×3 convolutions; Represents the predicted bounding box coordinates of the K key areas, and applies them to the feature clipping process to clip these key areas from the original visual features and merge them with the original visual features. The process is as follows:
[0202]
[0203] in It represents the mixed features that are finally sent to the detection network after feature clipping and splicing; Indicates that according to the i-th coordinate y reg [i] From visual features The predicted i-th key area feature is cropped out; Concat represents a stacking operation, that is, multiple features are flattened and spliced together.
[0204] The detection network uses a cross-attention mechanism to regress the detection target based on the multi-scale features extracted by the visual backbone, and predicts its bounding box coordinates and category probability respectively. The calculation method is as follows:
[0205]
[0206]
[0207] where f j represents the jth cross attention layer; n is a hyperparameter representing the number of cross attention layers; For pre-set learnable queries, the cross-attention layer will continuously update its own parameters; FC bbox and FC cls There are two fully connected layers, respectively through the final query Get the coordinate position of the foreign body bounding box With target category Where N represents the number of foreign objects detected, and the coordinate dimension of each foreign object is 4, expressed as (x1, y1, x2, y2), representing the coordinate position of the upper left corner and the lower right corner; n cls Represents the number of foreign body categories, and the predicted result y cls It represents the probability that each foreign object belongs to the corresponding foreign object category, where the category with the highest probability is the category to which the foreign object is predicted to belong. Figure 4 The gap between the predicted foreign body border and the annotated actual border is shown, with the red color representing the predicted border and the green color representing the annotated border. Figure 5 The probability distribution of the foreign object prediction category is shown, with the vertical axis representing the probability. The roadblock category has the highest probability, indicating that the foreign object category prediction is correct.
[0208] The criss-cross attention layer uses a pre-set learnable query Q l As the query (Q), the fused features after feature clipping and splicing are As key values (K, V) for attention calculation, the foreign body features are learned from the features. The calculation method is as follows:
[0209]
[0210]
[0211] where Q′ l It indicates the query that has learned some foreign object features after cross-attention calculation; d indicates the dimension of the query, which is consistent with the number of channels of the visual feature; Represents matrix multiplication.
[0212] Step 3-3: Calculate the loss function consisting of three parts of loss The calculation formula is as follows:
[0213]
[0214] The de-interference module uses the cross entropy loss between the generated restored image and the real clear weather image. For training, the visual module is trained based on the classification cross entropy loss Smooth L1 loss with object bounding box Conduct training.
[0215] Step 3-4: Back propagation, use AdamW optimizer to optimize the model parameter Θ, the calculation formula is as follows:
[0216]
[0217] Where t represents the training round; f represents the entire model; η t Represents the learning rate at the tth round.
[0218] Step 3-5: Read the next set of airport runway foreign body images and their data information, and jump to step 3-1 until all the data in the training set are read;
[0219] Step 3-7: Repeat steps 3-1 to 3-5 and continue to optimize the model parameters θ until down to a reasonable level.
[0220] Step 4: Use the test set of airport runway foreign body data to test the effect of the model, adjust the model's hyperparameters based on the test results, and repeat step 3 until the ideal model is obtained;
[0221] The test set is deployed on the airport runway foreign object detection model for testing, the effect of the model is detected, and the hyperparameter information is adjusted according to the effect of the model, such as: learning rate η, the number of layers of the encoder and decoder in the interference removal module, and c in step 3-2 i And so on. Then jump to step 3 to retrain until the model can achieve satisfactory results on the test set. Through this step, the final airport runway foreign object detection model can be obtained.
[0222] Step 5: Use the final adjusted model to detect foreign objects on the airport runway and obtain their location and category information.
[0223] After obtaining the prediction result, intelligent early warning can be issued for the relevant foreign objects.
[0224] This embodiment provides a complete set of program codes for the intelligent early warning solution for foreign object detection on airport runways, including the model structure and implementation logic of two core modules: the interference removal module and the visual module.
[0225] In a specific implementation, the present application provides a computer storage medium and a corresponding data processing unit, wherein the computer storage medium can store a computer program, and when the computer program is executed by the data processing unit, the invention content of the method for realizing intelligent early warning of foreign body detection on airport runways based on vision provided by the present invention and some or all steps in each embodiment can be run. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0226] Those skilled in the art can clearly understand that the technical solutions in the embodiments of the present invention can be implemented by means of computer programs and their corresponding general hardware platforms. Based on such an understanding, the technical solutions in the embodiments of the present invention are essentially or partly contributed to the prior art can be embodied in the form of a computer program, i.e., a software product, which can be stored in a storage medium and includes several instructions for enabling a device including a data processing unit (which can be a personal computer, a server, a single-chip microcomputer, a MUU or a network device, etc.) to execute the methods described in various embodiments of the present invention or certain parts of the embodiments.
[0227] The present invention provides a method and idea for realizing the intelligent early warning method of foreign body detection on airport runways based on vision. There are many methods and ways to realize the technical solution. The above is only the preferred implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be realized by existing technologies.
Claims
1. A vision-based intelligent early warning method for detecting foreign objects on airport runways, characterized in that: include: Step 1: Collect images of foreign objects on the airport runway; Step 2: Label the collected airport runway foreign object images and divide the labeled data into a training set and a test set; the labeling includes: manually labeling the bounding box of the foreign object, the type of foreign object and the image information; for the airport runway foreign object images containing weather factors, an additional corresponding clear weather image is labeled; Step 3: Use the training set to train an airport runway foreign object detection model, wherein the airport runway foreign object detection model includes: a de-interference module and a visual module, wherein the de-interference module is used to remove visual interference caused by weather factors in the airport runway foreign object image to obtain a restored image; and the visual module is used to determine the bounding box and category of the foreign object; Step 4: Use the test set to test the airport runway foreign object detection model, adjust the hyperparameters of the airport runway foreign object detection model according to the test results, and repeat step 3 until the final airport runway foreign object detection model is obtained; Step 5: Detect the airport runway through the final airport runway foreign object detection model, obtain foreign object information, and feed back the detection results to complete the vision-based airport runway foreign object detection intelligent warning.
2. The method for realizing intelligent early warning of foreign object detection on airport runways based on vision according to claim 1 is characterized in that: The labeled data described in step 2 specifically includes: an RGB image of the airport runway foreign object image, foreign object bounding box coordinates, foreign object category label, and a corresponding RGB image under clear weather.
3. The method for realizing intelligent early warning of foreign object detection on airport runways based on vision according to claim 1 is characterized in that: The interference removal module described in step 3 includes: an encoder and a decoder; Among them, the encoder is used to extract multi-scale features of the input image, the decoder is used to restore the image based on the multi-scale features, and a learnable weather type query is introduced in the decoding stage to distinguish weather types and remove different types of weather interference.
4. The method for realizing intelligent early warning of foreign object detection on airport runways based on vision according to claim 1 is characterized in that: The visual module described in step 3 includes: a visual backbone network, a region learning network and a detection network; Among them, the visual backbone network is used to extract visual features of different dimensions of the input image, the regional learning network is used to predict the coordinates of important areas in the image, and the detection network is used to determine the location and classification information of foreign objects in the input image based on the visual features and the features of important areas, and obtain the bounding box and category of the foreign objects in the input image.
5. The method for realizing intelligent early warning of foreign object detection on airport runways based on vision according to claim 1 is characterized in that: The use of the training set to train the airport runway foreign object detection model described in step 3 specifically includes: Step 3-1, input the airport runway foreign object image from a set of labeled data in the training set into the interference removal module, and the input image is represented as: in, Represents the image pixel value range, H represents the height of the input image x, and W represents the width of the input image x; In the interference removal module, an encoder is used to extract multi-scale visual features, which is expressed as: in, represents the i-th multi-scale visual feature, C i Representation characteristics The number of channels; The decoder is the inverse process of the encoder. And learnable weather type query Qw restore image The interference-free image x′ is obtained by removing the weather factors in the input image x, as follows: The weather type query is stacked with the visual features, and the weather type query is made to learn the weather features through the self-attention mechanism. At the same time, each visual feature is restored. Finally, all the features are fused through a feature fusion network to obtain the de-interference image x′ without weather factors. The calculation method is as follows: Among them, Q w represents a learnable weather query, which will automatically learn weather features during the decoding process; Concat represents a stacking operation, which flattens the weather type query and visual features and concatenates them together; ε i represents the intermediate value after combining the weather query and the visual features; f′ j represents the jth cross attention layer in the decoder; n is a hyperparameter representing the number of decoder layers; represents the feature fusion network; The decoder is not divided into stages, and self-attention calculations are performed on the four multi-scale features respectively. The calculation method is consistent with that in the encoder. The feature fusion network generates the final restored image by upsampling and fusing the decoder output features. The calculation method is: in, Represents the transition features in the feature fusion process, Conv 3×3 represents a 3×3 convolutional layer, UpSample represents a 2x upsampling operation; finally Continue upsampling to the resolution of the original image to obtain the output image x′; Step 3-2: Input the de-interference image x′ into the visual module: Step 3-2-1: Extract the multi-scale visual features of the interference-free image x′ through the visual backbone network as follows: in, represents the i-th multi-scale visual feature, C i Representation characteristics The number of channels; Step 3-2-2, the region learning network learns the key areas in the image based on the features extracted by the visual backbone, and cuts out the key areas from the visual features, so that the detection network can strengthen the features of the key areas; Step 3-2-3, the detection network regresses the bounding box and foreign object category of the foreign object in the image based on the extracted multi-scale visual features, that is, the predicted foreign object bounding box and foreign object category; Step 3-3: Calculate the loss function of the runway foreign object detection model The details are as follows: in, is the smooth L1 loss of the restored image x′ output by the de-interference module and the corresponding image y under clear weather conditions; The smooth L1 loss of the predicted foreign object bounding box coordinates and the manually annotated foreign object bounding box coordinates; is the cross entropy loss between the predicted foreign body category and the manually labeled foreign body category; Step 3-4: Back propagation, use the optimizer to optimize the parameters Θ of the airport runway foreign object detection model; Step 3-5: Read the next set of labeled data in the training set, return and execute step 3-1 again until all labeled data in the training set is completed.
6. The method for realizing intelligent early warning of foreign object detection on airport runways based on vision according to claim 5 is characterized in that: Use the encoder to extract multi-scale visual features as described in step 3-1, that is, extract multi-scale features of the input image through the attention mechanism The calculation method is as follows: Among them, f i,j represents the jth self-attention layer in stage i of the encoder, n i is a hyperparameter, indicating the number of self-attention layers in stage i, and ο indicates a compound operation; The encoder consists of four stages, i∈{1, 2, 3, 4}, each of which consists of several self-attention layers. A 1 / 2 downsampling is performed between each stage to obtain features of different scales or resolutions. The self-attention layer flattens the image features and uses them as query Q, key K, and key value V for attention calculation. The specific calculation method is: in and Represent the input and output features respectively; Flatten represents the flattening operation, that is, the image features are transformed from pixel space to pixel space. Mapping to embedding space C represents the embedding dimension, that is, the number of channels in the image features; Represents matrix multiplication.
7. The method for realizing intelligent early warning of foreign object detection on airport runways based on vision according to claim 5 is characterized in that: The multi-scale visual features of the de-interfered image are extracted through the visual backbone network in step 3-2-1, specifically including: The visual backbone uses the ResNet structure to calculate the multi-scale visual features of the de-interference image x′. The specific method is as follows: in represents the k-th multi-scale visual feature, represents the lth residual block (Residual Block) of stage k in the ResNet structure, c k is a hyperparameter, indicating the number of residual blocks contained in stage k.
8. The method for realizing intelligent early warning of foreign object detection on airport runways based on vision according to claim 7 is characterized in that: The residual block described in step 3-2-1 is composed of convolutional layers, which adds the input features to the original features after convolution operation, thereby reducing the degradation phenomenon during training. The calculation method is: in, and Represents input and output features respectively; Conv 1×1 With Conv 3×3 They represent 1×1 and 3×3 convolutional layers respectively.
9. The method for realizing intelligent early warning of foreign object detection on airport runways based on vision according to claim 8 is characterized in that: The regression described in step 3-2-3 obtains the bounding box and foreign object category of the foreign object in the image, specifically including: The detection network uses a cross-attention mechanism to regress the detection target based on the multi-scale features extracted by the visual backbone, and predicts its bounding box coordinates and category probability respectively. The calculation method is as follows: Among them, f j represents the jth cross attention layer; m is a hyperparameter representing the number of cross attention layers; Q learnable ∈ is a preset learnable query that updates its own parameters after the cross-attention layer. Both N and d are hyperparameters. bbox and FC cls There are two fully connected layers, each consisting of two linear transformations, respectively, through the final query Get the coordinate position of the bounding box of the foreign object and foreign body category probability Where N represents the number of foreign objects detected, and the coordinate dimension of each foreign object is 4, expressed as (x1, y1, x2, y2), representing the coordinate position of the upper left corner and the lower right corner of the foreign object; n cls Represents the number of foreign body categories, and the predicted result y cls Represents the probability that each foreign object belongs to the corresponding foreign object category, and the category with the highest probability is the prediction result, that is, the category to which the foreign object is predicted to belong; Among them, the cross attention layer uses a preset learnable query Q l As query Q, the mixed features after feature clipping and splicing are As key K and key value V, attention calculation is performed to learn foreign features from features. The calculation method is as follows: Among them, Q′ l It indicates the query that has learned some foreign object features after cross-attention calculation; d indicates the dimension of the query, which is consistent with the number of channels of the visual feature; Represents matrix multiplication.
