Intrusion object detection method and device, equipment, storage medium and program product

By using the intrusion object detection model of multi-scale feature extraction layer, feature enhancement layer and detection layer in intrusion object detection, the problems of high error detection rate and inaccurate category judgment of traditional methods are solved, and a more accurate detection of small-size intrusion object is achieved.

CN119559493APending Publication Date: 2025-03-04SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411321816.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

Traditional small animal invasion detection methods have high false detection rates, making it difficult to accurately determine the specific category of invasion objects, resulting in misjudgment.

Method used

An intrusion object detection method is adopted, and a trained intrusion object detection model is used, which includes a multi-scale feature extraction layer, a feature enhancement layer and a detection layer. The multi-scale feature extraction layer uses a hybrid attention mechanism to extract the image data, performs multi-scale feature expansion convolution processing through the feature enhancement layer, and finally performs feature fusion and invasion object detection through the detection layer.

Benefits of technology

The error detection rate of small-size intrusion objects is reduced, the accuracy of intrusion objects is improved, and the ability to extract and retain features of small-size intrusion objects is enhanced, and the problem of insufficient feature expression caused by background complexity and noise interference is overcome.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559493A_ABST
    Figure CN119559493A_ABST
Patent Text Reader

Abstract

The invention relates to an intrusion object detection method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring to-be-detected image data; performing multi-scale feature extraction on the to-be-detected image data by adopting a mixed attention mechanism through a multi-scale feature extraction layer to obtain a plurality of image data intermediate features of different scales; performing multi-direction expansion convolution processing on each image data intermediate feature through a feature enhancement layer to obtain a plurality of image data enhancement features of different scales; and through a detection layer, feature fusion is carried out on the image data enhancement features to obtain multi-scale fusion features, and intrusion object detection is carried out based on the multi-scale fusion features. By adopting the method, the false detection rate of intrusion detection of small-size intrusion objects can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electric power technology, and in particular to an intrusion object detection method, device, computer equipment, computer-readable storage medium and computer program product. Background Art

[0002] In the power system, the safe operation of key infrastructure such as transmission lines and substations is of vital importance. However, the invasion of small animals, such as squirrels and birds, often leads to problems such as short circuits, power outages and equipment damage in power equipment. Since these small animals have a wide range of activities and uncertain behavior, they pose a huge challenge to the continuous monitoring and security of the power system.

[0003] In traditional technology, small animal intrusion detection is often performed through thermal infrared cameras or infrared fences.

[0004] However, the traditional method has a high false detection rate. Infrared technology is easily affected by the ambient temperature or other high-temperature objects in the detection area, resulting in false detections. In addition, traditional methods usually find it difficult to accurately determine the specific category of the intrusion object. Therefore, even with manual review, misjudgments may still occur. Summary of the invention

[0005] Based on this, it is necessary to provide an intrusion object detection method, apparatus, computer device, computer-readable storage medium and computer program product that can reduce the false detection rate of intrusion detection of small-sized intrusion objects in order to address the above technical problems.

[0006] In a first aspect, the present application provides an intrusion object detection method, which is applied to an intrusion object detection device, on which a trained intrusion object detection model is deployed, and the intrusion object detection model includes a multi-scale feature extraction layer, a feature enhancement layer and a detection layer; the method includes:

[0007] Acquire image data to be detected;

[0008] Through the multi-scale feature extraction layer, a hybrid attention mechanism is used to extract multi-scale features of the image data to be detected, and intermediate features of image data of multiple different scales are obtained;

[0009] Through the feature enhancement layer, each intermediate feature of the image data is subjected to multi-directional dilated convolution processing to obtain multiple image data enhancement features of different scales;

[0010] Through the detection layer, the enhanced features of each image data are fused to obtain multi-scale fusion features, and intrusion object detection is performed based on the multi-scale fusion features.

[0011] In one embodiment, the multi-scale feature extraction layer includes a multi-layer feature extraction network; the hybrid attention mechanism includes a channel attention mechanism and a spatial attention mechanism;

[0012] Through the multi-scale feature extraction layer, a hybrid attention mechanism is used to extract multi-scale features of the image data to be detected, and intermediate features of image data of multiple different scales are obtained, including:

[0013] For any layer of feature extraction network, the feature extraction network uses a hybrid attention mechanism to extract features from the input data to obtain the intermediate features of the image data. The input data is the image data to be detected or the intermediate features of the image data output by the previous feature extraction network.

[0014] Among them, through the feature extraction network, the hybrid attention mechanism is used to extract features from the input data to obtain the intermediate features of the image data, including:

[0015] Perform convolution processing on the input data to obtain initial feature image data;

[0016] The channel attention mechanism is used to extract features from the initial feature image data to obtain the channel features of the image data. The spatial attention mechanism is used to extract features from the initial feature image data to obtain the spatial features of the image data. The initial feature image data is convoluted to obtain the deep semantic features of the image data.

[0017] The image data channel features, image data spatial features and image data deep semantic features are integrated to obtain the intermediate features of the image data.

[0018] In one embodiment, the feature enhancement layer includes multiple multi-directional dilated convolution networks; through the feature enhancement layer, each intermediate feature of the image data is subjected to multi-directional dilated convolution processing to obtain multiple image data enhancement features of different scales, including:

[0019] For the intermediate features of the image data at each scale, the multi-directional dilated convolutional networks are used to perform extended convolution processing on the intermediate features of the image data in multiple directions based on the dilation rates corresponding to the multi-directional dilated convolutional networks, so as to obtain multiple enhanced initial features of the image data;

[0020] The enhanced initial features of each image data are fused to obtain the image data enhanced features corresponding to the intermediate features of each image data.

[0021] In one embodiment, before acquiring the image data to be detected, the method further includes:

[0022] Acquire training sample image data, where the training sample image data includes training sample generated image data, where the training sample generated image data is generated by a trained cyclic generative adversarial network;

[0023] Based on the training sample image data, the intrusion object detection model to be trained is trained to obtain a trained intrusion object detection model.

[0024] In one embodiment, obtaining training sample image data includes:

[0025] Acquire object initial image data of the intrusion object;

[0026] Through the trained cyclic generative adversarial network, the intrusion scene image data of the intrusion object is generated based on the initial image data of the object, and the intrusion scene image data is used as the training sample image data.

[0027] In one embodiment, a cyclic generative adversarial network includes a generator, the generator includes an encoder, a first coordinate attention layer, a dense convolution layer, a second coordinate attention layer and a decoder; generating intrusion scene image data of an intrusion object based on the object initial image data through the trained cyclic generative adversarial network, including:

[0028] Extracting features from the initial image data of the object through an encoder to obtain initial features of the object;

[0029] Performing spatial feature enhancement processing on the initial features of the object through the first coordinate attention layer to obtain the first object enhanced features;

[0030] Performing feature fusion processing on the first object enhancement feature through a dense convolution layer to obtain an object fusion feature;

[0031] Performing spatial feature enhancement processing on the object fusion feature through the second coordinate attention layer to obtain the second object enhanced feature;

[0032] The decoder performs spatial size restoration processing on the enhanced features of the second object to obtain intrusion scene image data.

[0033] In a second aspect, the present application further provides an intrusion object detection device, on which a trained intrusion object detection model is deployed, and the intrusion object detection model includes a multi-scale feature extraction layer, a feature enhancement layer and a detection layer; the device includes:

[0034] An acquisition module, used for acquiring image data to be detected;

[0035] A feature extraction module is used to extract multi-scale features from the image data to be detected through a multi-scale feature extraction layer and a hybrid attention mechanism to obtain intermediate features of image data of multiple different scales;

[0036] The feature enhancement module is used to perform multi-directional dilation convolution processing on each intermediate feature of the image data through the feature enhancement layer to obtain enhanced features of image data of multiple different scales;

[0037] The detection module is used to perform feature fusion on each image data enhancement feature through the detection layer to obtain multi-scale fusion features, and perform intrusion object detection based on the multi-scale fusion features.

[0038] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0039] Acquire image data to be detected;

[0040] Through the multi-scale feature extraction layer, a hybrid attention mechanism is used to extract multi-scale features of the image data to be detected, and intermediate features of image data of multiple different scales are obtained;

[0041] Through the feature enhancement layer, each intermediate feature of the image data is subjected to multi-directional dilated convolution processing to obtain multiple image data enhancement features of different scales;

[0042] Through the detection layer, the enhanced features of each image data are fused to obtain multi-scale fusion features, and intrusion object detection is performed based on the multi-scale fusion features.

[0043] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0044] Acquire image data to be detected;

[0045] Through the multi-scale feature extraction layer, a hybrid attention mechanism is used to extract multi-scale features of the image data to be detected, and intermediate features of image data of multiple different scales are obtained;

[0046] Through the feature enhancement layer, each intermediate feature of the image data is subjected to multi-directional dilated convolution processing to obtain multiple image data enhancement features of different scales;

[0047] Through the detection layer, the enhanced features of each image data are fused to obtain multi-scale fusion features, and intrusion object detection is performed based on the multi-scale fusion features.

[0048] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0049] Acquire image data to be detected;

[0050] Through the multi-scale feature extraction layer, a hybrid attention mechanism is used to extract multi-scale features of the image data to be detected, and intermediate features of image data of multiple different scales are obtained;

[0051] Through the feature enhancement layer, each intermediate feature of the image data is subjected to multi-directional dilated convolution processing to obtain multiple image data enhancement features of different scales;

[0052] Through the detection layer, the enhanced features of each image data are fused to obtain multi-scale fusion features, and intrusion object detection is performed based on the multi-scale fusion features.

[0053] The above-mentioned intrusion object detection method, device, computer equipment, computer-readable storage medium and computer program product first obtain the image data to be detected, and use the multi-scale feature extraction layer to extract multi-scale features of the image data to be detected by using the hybrid attention mechanism to obtain multiple intermediate features of image data of different scales. The hybrid attention mechanism can capture multi-dimensional information from the image, improve the richness and accuracy of feature representation, reduce the influence of noise information on small-sized intrusion objects, and thus improve the ability to distinguish between small-sized intrusion objects and backgrounds; then, through the feature enhancement layer, multi-directional dilated convolution processing is performed on each intermediate feature of the image data to obtain multiple enhanced features of image data of different scales. Through the multi-directional dilated convolution processing, the receptive field can be increased, more feature information of small-sized intrusion objects can be retained, and the semantic information of small-sized intrusion objects can be avoided from being lost in the subsequent feature fusion process; then, through the detection layer, feature fusion is performed on each enhanced feature of the image data to obtain multi-scale fusion features, and intrusion object detection is performed based on the multi-scale fusion features, thereby realizing accurate detection of small-sized intrusion objects based on image processing technology. Compared with infrared technology, image processing technology can more accurately determine the category of intrusion objects with a lower false detection rate. On the other hand, through the hybrid attention mechanism and multi-directional dilated convolution processing, the ability to extract and retain features of small-sized intrusion objects can be enhanced, and the defects of insufficient feature expression of small-sized intrusion objects caused by complex background and noise interference in intrusion detection of small-sized intrusion objects can be overcome, thereby improving detection accuracy, reducing missed detection rate, and further reducing false detection rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1A schematic diagram of a flow chart of an intrusion object detection method in an embodiment;

[0056] Figure 2 is a schematic diagram of the structure of a multi-scale feature extraction layer in one embodiment;

[0057] Figure 3 A schematic diagram of the structure of an intrusion object detection model in one embodiment;

[0058] Figure 4 is a flow chart of an intrusion object detection method in another embodiment;

[0059] Figure 5 A schematic diagram of the structure of a cyclic generative adversarial network in one embodiment;

[0060] Figure 6 is a structural block diagram of an intrusion object detection device in one embodiment;

[0061] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0063] In the power system, the safe operation of key infrastructure such as transmission lines and substations is of vital importance. However, the invasion of small animals, such as squirrels and birds, often leads to problems such as short circuits, power outages and equipment damage in power equipment. Since these small animals have a wide range of activities and uncertain behavior, they pose a huge challenge to the continuous monitoring and security of the power system.

[0064] In traditional technology, small animal intrusion detection is often performed through thermal infrared cameras or infrared fences. However, the false detection rate of traditional methods is high. Infrared technology is easily affected by the ambient temperature or other high-temperature objects in the detection area, resulting in false detection. In addition, traditional methods usually have difficulty in accurately determining the specific category of the intruder, so even if manual review is performed, misjudgment may still occur.

[0065] In traditional technology, small animal intrusion detection is also performed through image processing technology. However, small animals are small in size and often only occupy a very small pixel area in surveillance videos or images, which makes their feature representation very weak after operations such as convolution. In multi-scale feature fusion, these weak features may be masked by stronger features, resulting in the loss of information about small-sized intrusion objects during the fusion process. In complex backgrounds, such as lush vegetation or dense power equipment, detection is more difficult and the false alarm and missed alarm rates are higher.

[0066] In an exemplary embodiment, Figure 1 As shown, a method for detecting an intrusion object is provided. This embodiment uses the method applied to a terminal as an example for illustration, wherein the terminal may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The terminal includes an intrusion object detection device, on which a trained intrusion object detection model is deployed, and the intrusion object detection model includes a multi-scale feature extraction layer, a feature enhancement layer, and a detection layer.

[0067] It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and can be implemented through the interaction between the terminal and the server.

[0068] In this embodiment, the method includes the following steps S10-S30. Among them:

[0069] Step S10, obtaining image data to be detected.

[0070] The intrusion object detection model refers to an artificial intelligence model used to detect intrusion objects in the power system. The intrusion object detection model includes at least a multi-scale feature extraction layer, a feature enhancement layer, and a detection layer, and may also include one or more of a normalization layer, a pooling layer, a residual connection module, an activation function layer, etc., which can be deployed according to actual needs, and this embodiment does not limit this.

[0071] Exemplarily, during the operation of the power system, image data can be collected by image acquisition devices deployed in various areas of the power system. The collected image data can be stored in a designated memory, and the terminal then obtains the collected image data from the memory as image data to be detected; alternatively, the terminal can directly communicate with the image acquisition device, and the image data collected by the image acquisition device can be directly transmitted to the terminal as image data to be detected.

[0072] As an example, after acquiring the image data collected by the image acquisition device, the terminal may also perform preprocessing such as resizing, normalization, and histogram equalization, and use the preprocessed image data as the image data to be detected.

[0073] Step S20, through the multi-scale feature extraction layer, a hybrid attention mechanism is used to perform multi-scale feature extraction on the image data to be detected, and intermediate features of image data of multiple different scales are obtained.

[0074] Among them, the multi-scale feature extraction layer is used to extract features of different scales from the input image data, so that the model can capture and represent features at different scales, thereby improving the performance and robustness of the model. The different scales include at least one of different resolutions, different receptive fields, and different frequencies. The multi-scale feature extraction layer in this embodiment can be based on a model structure of at least one of a feature pyramid network, Darknet53 (a convolutional neural network), etc. After extracting the features of each scale, before inputting the feature enhancement layer, a hybrid attention mechanism is used to process the features of each scale, so that the model can more accurately find intrusion objects located at different locations, especially intrusion objects located in complex backgrounds or crowded scenes, reduce the impact of noise information on the detection of small-sized intrusion objects, and strengthen information extraction and transmission. That is, the multi-scale feature extraction layer includes at least a hybrid attention layer, and can also include one or more of other feature extraction layers, normalization layers, etc., which can be determined according to actual conditions, and this embodiment does not limit this. The hybrid attention mechanism can be combined with a variety of different attention mechanisms, such as a spatial attention mechanism, a channel attention mechanism, a temporal attention mechanism, etc.

[0075] Exemplarily, after acquiring the image data to be detected, the image data to be detected can be input into the intrusion object detection model to perform intrusion object detection. After being input into the intrusion object detection model, it can be first input into the multi-scale feature extraction layer for multi-scale feature extraction. The multi-scale feature extraction layer is composed of multiple feature extraction layers connected in series or in parallel. Different feature extraction layers are used to extract intermediate features of image data of different scales. Among them, each feature extraction layer includes at least a hybrid attention layer, and can also include one or more of other feature extraction layers, normalization layers, etc. Other feature extraction layers include at least one of a convolutional layer, a fully connected network, a filter, etc.

[0076] As an example, each feature extraction layer can first extract features from the input data through a convolutional layer, a fully connected network, a filter, etc., and the obtained features are then used as the input of the hybrid attention layer, and multi-dimensional information is captured through the hybrid attention layer to obtain intermediate features of the image data; or, each feature extraction layer can first capture multi-dimensional information through a hybrid attention layer, and the obtained features are then used as the input data of feature extraction layers such as convolutional layers, fully connected networks, filters, etc., and feature extraction is performed through feature extraction layers such as convolutional layers, fully connected networks, filters, etc. to obtain intermediate features of the image data; or, each feature extraction layer can first extract features from the input data through a convolutional layer, a fully connected network, a filter, etc., and the obtained features are then used as the input of the hybrid attention layer, and multi-dimensional information is captured through the hybrid attention layer, and the obtained features are then used as the input data of feature extraction layers such as convolutional layers, fully connected networks, filters, etc., and feature extraction is performed through feature extraction layers such as convolutional layers, fully connected networks, filters, etc. to obtain intermediate features of the image data.

[0077] As an example, see Figure 2The multi-scale feature extraction layer includes two layers of conv (convolutional neural network), C3 (Cross Stage Partial Connections), SCA (Spatial and Channel-wise Attention), C3, SCA, C3, SCA, C3 and SPPF (Spatial Pyramid Pooling - Fast) connected in series. The image data to be detected is first extracted through two layers of convolution layers, and the obtained features are partially connected through C3 to enhance the feature fusion ability of the model. The feature data output by C3 is captured through the spatial-channel mixed attention layer for cross-spatial dependency and cross-channel dependency. The obtained features are partially connected through C3 again to obtain the intermediate features of the image data of the first scale. The intermediate features of the image data are used as both the output results of the corresponding scale and the input of the next spatial-channel mixed attention layer. The image data intermediate features input to the next layer of space-channel hybrid attention layer are captured and partially connected through cross-space dependency and cross-channel dependency to obtain the image data intermediate features of the second scale, which are both the output results of the corresponding scale and the input of the next layer of space-channel hybrid attention layer. By stacking multiple groups of space-channel hybrid attention layers and C3 in this way, multi-scale image data intermediate features can be obtained. The specific number of stacking can be set according to actual needs, and this embodiment is not limited to this. After the last group of C3, a fast spatial pyramid pooling layer can also be connected, and the output of the fast spatial pyramid pooling layer is used as the image data intermediate feature of the last scale. Among them, convolutional neural network, C3, space-channel hybrid attention layer and fast spatial pyramid pooling layer are all close to the prior art, and this embodiment is not repeated here.

[0078] Step S30, through the feature enhancement layer, multi-directional dilated convolution processing is performed on each intermediate feature of the image data to obtain image data enhanced features of multiple different scales.

[0079] It should be noted that in multi-scale feature fusion, feature maps of different scales may contain contextual information related to small-sized intrusive objects. However, this information may compete with the information in feature maps of other scales, causing the key features of small-sized intrusive objects to be incorrectly suppressed or distorted by noise or other information.

[0080] Among them, the feature enhancement layer is used to improve the feature extraction capability of the model. In this embodiment, it is mainly used to improve the model's ability to identify small-sized intrusion objects. By adding multi-directional dilated convolution processing between feature extraction and feature fusion, the receptive field can be increased, more feature information of small-sized intrusion objects can be retained, and the semantic information of small-sized intrusion objects can be avoided from being lost in the subsequent feature fusion process.

[0081] Exemplarily, for each scale of the intermediate features of the image data, multi-directional dilated convolution processing can be performed separately to obtain the image data enhancement features corresponding to each scale. Among them, multi-directional dilated convolution processing refers to the use of dilated convolution in multiple different directions for the intermediate features of the image data. For example, dilated convolution can be applied separately in multiple directions such as horizontal direction, vertical direction, left diagonal direction and right diagonal direction, so that the information correlation and dependency in different directions can be more comprehensively captured, and the robustness and accuracy of the model can be improved; the feature maps obtained in different directions are then fused together to form a multi-scale, multi-directional image data enhancement feature.

[0082] Step S40: performing feature fusion on each image data enhancement feature through the detection layer to obtain a multi-scale fusion feature, and performing intrusion object detection based on the multi-scale fusion feature.

[0083] Exemplarily, after obtaining image data enhancement features of multiple scales, the image data enhancement features can be fused to obtain multi-scale fused features. As an example, feature maps of different scales can be fused through a path aggregation network according to top-down paths and lateral connections to enhance the multi-scale representation capability of the features; the multi-scale fused features are then converted into at least one intrusion object detection result such as a bounding box and a category probability, wherein the bounding box is used to indicate the location of the intrusion object, and the category probability refers to the probability that the intrusion object detected in the image data to be detected belongs to a certain object category.

[0084] As an example, see Figure 3 The intermediate features of the image data output by the multi-scale feature extraction layer are respectively subjected to MD (Multi-directional Dilated Convolution) to enlarge the receptive field to obtain image data enhancement features of multiple scales, and then feature fusion is performed through PAN (Path Aggregation Network) to obtain multi-scale fusion features. The multi-scale fusion features are used for intrusion object detection through the Head.

[0085] In the above-mentioned intrusion object detection method, first, the image data to be detected is obtained, and the multi-scale feature extraction layer is used to extract multi-scale features of the image data to be detected by using a hybrid attention mechanism to obtain multiple intermediate features of image data of different scales. The hybrid attention mechanism can capture multi-dimensional information from the image, improve the richness and accuracy of feature representation, reduce the influence of noise information on small-sized intrusion objects, and thus improve the ability to distinguish between small-sized intrusion objects and backgrounds; then, through the feature enhancement layer, each intermediate feature of the image data is respectively subjected to multi-directional dilated convolution processing to obtain multiple enhanced features of image data of different scales. Through the multi-directional dilated convolution processing, the receptive field can be increased, more feature information of small-sized intrusion objects can be retained, and the semantic information of small-sized intrusion objects can be avoided from being lost in the subsequent feature fusion process; then, through the detection layer, the enhanced features of each image data are subjected to feature fusion to obtain multi-scale fusion features, and intrusion object detection is performed based on the multi-scale fusion features, thereby realizing accurate detection of small-sized intrusion objects based on image processing technology. Compared with infrared technology, image processing technology can more accurately determine the category of intrusion objects, and the false detection rate is lower. On the other hand, through the hybrid attention mechanism and multi-directional dilated convolution processing, the ability to extract and retain features of small-sized intrusion objects can be enhanced, and the defects of insufficient feature expression of small-sized intrusion objects caused by complex background and noise interference in intrusion detection of small-sized intrusion objects can be overcome, thereby improving detection accuracy, reducing missed detection rate, and further reducing false detection rate.

[0086] In an exemplary embodiment, the multi-scale feature extraction layer includes a multi-layer feature extraction network; the hybrid attention mechanism includes a channel attention mechanism and a spatial attention mechanism;

[0087] Through the multi-scale feature extraction layer, a hybrid attention mechanism is used to extract multi-scale features of the image data to be detected, and intermediate features of image data of multiple different scales are obtained, including:

[0088] For any layer of feature extraction network, the feature extraction network uses a hybrid attention mechanism to extract features from the input data to obtain intermediate features of the image data. The input data is the image data to be detected or the intermediate features of the image data output by the previous feature extraction network.

[0089] Among them, the multi-scale feature extraction layer includes multiple layers of feature extraction networks connected in series, that is, the input data of the feature extraction network of the top layer is the image data to be detected, and the feature extraction networks of other layers are the intermediate features of the image data output by the previous feature extraction network. The intermediate features of the image data extracted by the feature extraction network of the upper layer are the input data of the feature extraction network of the lower layer connected thereto. Different feature extraction networks are used to extract intermediate features of image data of different scales. Each feature extraction network includes at least a mixed attention layer, and may also include one or more of other feature extraction networks, normalization layers, etc. Other feature extraction networks include at least one of convolutional neural networks, fully connected networks, filters, etc.

[0090] Exemplarily, each feature extraction network receives the image data to be detected or the intermediate features of the image data output by the previous feature extraction network as input data, and then performs feature extraction through a hybrid attention mechanism and one or more of other feature extraction networks, normalization layers, etc. to obtain the intermediate features of the image data. The obtained intermediate features of the image data can be output as the intermediate features of the image data of the current scale to the feature enhancement layer, and can also be used as input data for the next layer of feature extraction network to continue deeper feature extraction.

[0091] Among them, through the feature extraction network, the hybrid attention mechanism is used to extract features from the input data to obtain the intermediate features of the image data, including steps S21 to S23. Among them,

[0092] Step S21, performing convolution processing on the input data to obtain initial feature image data.

[0093] Among them, the feature extraction network may include a convolutional layer, a mixed attention layer and a feature fusion layer connected in sequence.

[0094] Exemplarily, first, the input data is convolved through a convolution layer to extract deeper semantic information and obtain initial feature image data.

[0095] Step S22, using a channel attention mechanism to extract features from the initial feature image data to obtain channel features of the image data, using a spatial attention mechanism to extract features from the initial feature image data to obtain spatial features of the image data, and performing convolution processing on the initial feature image data to obtain deep semantic features of the image data.

[0096] Among them, the hybrid attention mechanism includes the channel attention mechanism and the spatial attention mechanism. The channel attention mechanism calculates the attention weight of each channel to generate a channel attention map, and then multiplies it with the original feature map to adjust the importance of different channels, learn the dependencies between different channels, and focus on strengthening the channels that make significant contributions to target recognition. The spatial attention mechanism calculates the attention weight of each spatial position to generate a spatial attention map, and then multiplies it with the original feature map to highlight the important areas in the image and suppress the unimportant areas, thereby improving the ability to distinguish small-sized intrusion objects from the background.

[0097] Exemplarily, the extracted initial feature image data uses a channel attention mechanism to extract channel features of the image data, uses a spatial attention mechanism to extract spatial features of the image data, and obtains deep semantic features of the image data through convolution processing.

[0098] Step S23, fusing the image data channel features, image data spatial features and image data deep semantic features to obtain the image data intermediate features.

[0099] Exemplarily, the extracted image data channel features, image data spatial features, and image data deep semantic features are subjected to feature fusion processing such as splicing and weighted summation to obtain intermediate features of the image data.

[0100] In this embodiment, by combining the channel attention mechanism and the spatial attention mechanism, intrusion objects located at different positions can be found more accurately, especially intrusion objects located in complex backgrounds or crowded scenes, reducing the impact of noise information on the detection of small-sized intrusion objects, and enhancing information extraction and transmission.

[0101] In an exemplary embodiment, the feature enhancement layer includes multiple multi-directional dilated convolution networks; through the feature enhancement layer, each intermediate feature of the image data is subjected to multi-directional dilated convolution processing to obtain multiple image data enhancement features of different scales, from step S31 to step S32.

[0102] Step S31, for the intermediate features of the image data at each scale, the intermediate features of the image data are expanded and convolved in multiple directions based on the expansion rates corresponding to each multi-directional dilated convolutional network, so as to obtain multiple enhanced initial features of the image data.

[0103] The expansion rate is used to determine the distance between the sampling points inside the dilated convolution kernel. By increasing the interval between the sampling points inside the dilated convolution kernel, the receptive field of the convolution operation can be increased, thereby capturing more small and medium-sized defect information. The direction and expansion rate of the dilated convolution can be determined according to actual conditions, and this embodiment does not limit this.

[0104] Exemplarily, before feature fusion, more dilated convolution processing is performed on the intermediate features of the image data at each scale to increase the receptive field of the intermediate features of the image data at each scale. For the intermediate features of the image data at each scale, dilated convolution kernels with different dilation rates can be obtained first, and then the dilated convolution kernels are used to perform extended convolution processing on the intermediate features of the image data in multiple directions, respectively, and at least one image data enhanced initial feature can be obtained in each direction.

[0105] Step S32, fusing the enhanced initial features of each image data to obtain the image data enhanced features corresponding to the intermediate features of each image data.

[0106] Exemplarily, by splicing the image data enhanced initial features corresponding to each intermediate feature of the image data, a multi-scale and multi-directional image data enhanced feature corresponding to each intermediate feature of the image data can be formed.

[0107] In this embodiment, by adding multi-directional dilated convolution processing between feature extraction and feature fusion, the receptive field can be increased, multi-directional information can be captured, the detection capability of small targets in different directions and postures can be improved, more feature information of small-sized intrusive objects can be retained, and the semantic information of small-sized intrusive objects can be avoided from being lost in the subsequent feature fusion process, thereby improving the feature validity after feature fusion.

[0108] In an exemplary embodiment, referring to Figure 4 Before acquiring the image data to be detected, the method includes steps S01 to S02.

[0109] Step S01, obtaining training sample image data, where the training sample image data includes training sample generated image data, where the training sample generated image data is generated by a trained cyclic generative adversarial network.

[0110] It should be noted that small animal intrusion incidents are relatively rare, and even if they occur, they may not be captured and recorded in time, resulting in a very limited number of data samples for model training. This data scarcity makes it difficult for traditional machine learning methods to learn and generalize effectively, resulting in low accuracy in intrusion object detection based on artificial intelligence models.

[0111] Among them, the Cyclic Generative Adversarial Network is a deep learning model for unsupervised image conversion that can learn the mapping relationship between two different domains without paired training data. For example, it can convert a photo of a horse into a photo of a zebra, or a photo of a summer landscape into a photo of a winter landscape.

[0112] For example, in the process of training the intrusion object detection model, the trained cyclic generative adversarial network can be used to generate a scene graph of small animals invading the power system, and then the scene graph is used as a training sample to generate image data, which is applied to the intrusion object detection model for model training. It is understandable that in the case of being able to collect a real scene graph of small animals invading the power system, the real scene graph and the generated scene graph can be used to train the model. Figure 1 The two images are used as training sample image data and applied to the intrusion object detection model for model training.

[0113] Step S02: Based on the training sample image data, the intrusion object detection model to be trained is trained to obtain a trained intrusion object detection model.

[0114] Exemplarily, the training sample image data is input into the intrusion object detection model to be trained, and the intrusion object detection model to be trained includes a multi-scale feature extraction layer, a feature enhancement layer and a detection layer. Through the multi-scale feature extraction layer, a hybrid attention mechanism is used to perform multi-scale feature extraction on the training sample image data to obtain intermediate features of multiple training samples of different scales; then, through the feature enhancement layer, multi-directional dilated convolution processing is performed on each intermediate feature of the training sample to obtain enhanced features of multiple training samples of different scales; then, through the detection layer, feature fusion is performed on the enhanced features of each training sample to obtain multi-scale fused features of the training sample, and intrusion object detection is performed based on the multi-scale fused features of the training sample to obtain the intrusion object detection training results. Furthermore, the intrusion object label information of the training sample image data is obtained, the loss is calculated according to the difference between the intrusion object detection training result and the intrusion object label information, and the gradient is calculated based on the loss. The intrusion object detection model is reversely updated based on the gradient, and the training sample image data is re-acquired and input into the updated intrusion object detection model. This iterative cycle is repeated until the intrusion object detection model converges, or the number of iterations reaches a preset number of iterations, or the training time reaches a preset training time threshold, and a trained intrusion object detection model is obtained.

[0115] In this embodiment, by cyclically generating an adversarial network, training sample image data can be generated when training samples are insufficient, thereby improving the model training effect.

[0116] In an exemplary embodiment, obtaining training sample image data includes steps S011 to S012.

[0117] Step S011, obtaining initial image data of the intruding object.

[0118] Among them, the object initial image data refers to image data containing an intrusion object. The intrusion object in the object initial image data may not be in the power system intrusion scene. For example, if the intrusion object is a cat, the object initial image data can be an image of a cat playing, an image of a cat eating and drinking, an image of a cat sleeping, or any other scene.

[0119] Exemplarily, when the training sample image data is insufficient, the object initial image data of the intruding object may be acquired.

[0120] Step S012, generating intrusion scene image data of the intrusion object based on the initial image data of the object through the trained cyclic generative adversarial network, and using the intrusion scene image data as training sample image data.

[0121] The intrusion scene image data refers to image data of scenes containing intrusion objects invading the power system. The trained recurrent generative adversarial network can transform the initial image data of the object into intrusion scene image data, for example, transforming an image of a cat playing into an image of a cat breaking into a substation.

[0122] Exemplarily, the object initial image data of the intrusion object is input into a trained recurrent generative adversarial network, the object initial image data of the intrusion object is converted into intrusion scene image data of the intrusion object, and then the generated intrusion scene image data is used as training sample image data.

[0123] As an example, a recurrent generative adversarial network includes a first generator, a second generator, a first discriminator, and a second discriminator. The training process of the recurrent generative adversarial network includes: obtaining first training sample image data of a first domain and second training sample image data of a second domain, wherein the first domain is different from the second domain; converting the first training sample image data into first generated image data of the second domain through the first generator, and converting the second training sample image data into second generated image data of the first domain through the second generator; and then determining whether the first generated image data and the second training sample image data belong to the second domain through the first discriminator, and determining whether the second generated image data and the first training sample image data belong to the second domain through the second discriminator. Whether it belongs to the first domain; then based on the discrimination result of the discriminator and the true result, the adversarial loss and the cycle consistency loss are calculated. The adversarial loss is used to train the generator to generate realistic images so that the discriminator cannot distinguish between the generated images and the real images. The cycle consistency loss is used to ensure that the generated image can return to the original image after two conversions to maintain the consistency of the image content; then based on the adversarial loss and the cycle consistency loss, the model parameters of the first generator, the second generator, the first discriminator and the second discriminator are iteratively updated until the cyclic generative adversarial network converges, or the number of iterations reaches the preset number of iterations, or the training time reaches the preset training time threshold, to obtain a trained cyclic generative adversarial network.

[0124] In this embodiment, by cyclically generating an adversarial network, training sample image data can be generated when training samples are insufficient, thereby improving the model training effect.

[0125] In an exemplary embodiment, the cyclic generative adversarial network includes a generator, which includes an encoder, a first coordinate attention layer, a dense convolution layer, a second coordinate attention layer, and a decoder; through the trained cyclic generative adversarial network, the intrusion scene image data of the intrusion object is generated based on the initial image data of the object, including steps S0121 to S0125. Among them,

[0126] Step S0121, extracting features from the initial image data of the object through an encoder to obtain initial features of the object.

[0127] Among them, the cyclic generative adversarial network includes a generator, which includes an encoder, a first coordinate attention layer, a dense convolution layer, a second coordinate attention layer and a decoder connected in sequence.

[0128] Exemplarily, the initial image data of the object is input into the cyclically generated adversarial network, and feature extraction is first performed through an encoder to obtain the initial features of the object.

[0129] Step S0122: perform spatial feature enhancement processing on the initial features of the object through the first coordinate attention layer to obtain the first object enhanced features.

[0130] Among them, the coordinate attention layer further refines the attention of the spatial dimension and can model the features in the width and height directions respectively. After the introduction of the coordinate attention mechanism, the generator will pay more attention to local features in feature learning and ignore irrelevant features, thereby extracting the target feature vector when a small-sized intrusion object invades and ignoring the feature vector of the background.

[0131] Exemplarily, the initial features of the input object are decomposed along the width and height directions to obtain two one-dimensional feature vectors, respectively. Attention calculation is then performed on the decomposed feature vectors to generate attention weights in the width and height directions. The calculated attention weights in the width and height directions are then applied to the original feature map to generate a new feature map. The new feature map is then multiplied with the original feature map to obtain the first object enhanced feature.

[0132] As an example, channel attention generally uses global pooling to encode global spatial information, which will be compressed into the channel descriptor, which is not conducive to capturing spatial structure in visual tasks. Decomposing global pooling into pairs of one-dimensional feature encodings allows the attention block to better capture long-range dependencies with spatial location information. Specifically, for a convolutional layer with a fixed kernel size as input, the two spatial ranges of the pooling kernel (H, 1) and (1, W) can be used to encode each channel in the horizontal and vertical directions respectively, and the height is the output Z of the cth channel of h C h (h) can be expressed as:

[0133]

[0134] The output Z of the cth channel with width w C w (w) can be expressed as:

[0135]

[0136] Among them, x c Represents the input of the cth channel of feature X. The above two transformations aggregate features along the horizontal and vertical spatial directions respectively, generating a pair of direction-aware features, which enables the generator to capture long-range dependencies along a single direction while accurately retaining the position information in another direction, thereby enabling the generator to locate the target of interest more accurately.

[0137] Coordinate attention generation can better use the precise location information encoded by the global receptive field. This conversion is simpler in mobile environment applications, and can also accurately highlight the area of ​​interest with the help of the captured location information. It can also successfully capture the relationship between channels. Specifically, first, the aggregate features generated by the above two formulas are mutually understood, and a shared 1×1 convolution transformation function F1 is used. The result is as follows:

[0138]

[0139] Among them, δ represents the nonlinear activation function, f∈R C / r×(H+W) , represents the intermediate feature containing spatial information in the horizontal and vertical directions. Then f is split into two independent features f along the spatial dimension h ∈R C / r×H and f w ∈R C / r×W , using two other 1×1 convolution transformation functions F h and F w f h and f wThey are transformed into features with the same number of channels as the input X, and the formula is as follows:

[0140]

[0141]

[0142] Among them, σ represents the sigmoid function. At the same time, a suitable reduction rate r is used to reduce the number of channels of f, further reducing the complexity of the model. Finally, the feature x on one channel of the input feature X c (i,j) Output y after the coordinate attention module c (i,j), the formula is as follows:

[0143]

[0144] Among them, i, j are the height and width of channel xc. Different from other channel attention blocks, the elements in the attention block reflect whether the corresponding row and column contain the object of interest. Through the above operation, the position of the object of interest is accurately located. Step S0123, the first object enhancement feature is subjected to feature fusion processing through a dense convolution layer to obtain an object fusion feature.

[0145] Among them, the dense convolution layer includes multiple dense convolution blocks, and the dense convolution block contains multiple convolution layers. The convolution layers inside each dense convolution block are densely connected, that is, the output of each convolution layer will be used as the input of all subsequent layers. This helps to alleviate the gradient vanishing problem, enhance feature reuse, and improve the expressiveness of the model.

[0146] Exemplarily, the first object enhancement feature is input into a dense convolutional layer, and feature fusion processing is performed to obtain an object fusion feature.

[0147] Step S0124, performing spatial feature enhancement processing on the object fusion feature through the second coordinate attention layer to obtain a second object enhanced feature.

[0148] Exemplarily, the object fusion features obtained after dense convolution processing are again processed by the coordinate attention mechanism to perform spatial feature enhancement processing, and the object fusion features are decomposed along the width and height directions to obtain two one-dimensional feature vectors respectively. Then, attention calculation is performed on the decomposed feature vectors respectively to generate attention weights in the width and height directions, and then the calculated attention weights in the width and height directions are applied to the original feature map respectively to generate a new feature map, and then the new feature map is multiplied with the original feature map to obtain the second object enhanced feature.

[0149] Step S0125: Perform spatial dimension restoration processing on the second object enhancement feature through a decoder to obtain intrusion scene image data.

[0150] Exemplarily, the enhanced features of the second object after the second enhancement can be restored to the same spatial size as the initial image data of the object through a decoder to obtain the intrusion scene image data.

[0151] As an example, see Figure 5 The initial image data of the object is first input into the encoder, and then convolution is performed to obtain the initial features of the object. The initial features of the object are processed by using the coordinate attention mechanism to enhance the spatial features, and the first enhanced features of the object are obtained. The first enhanced features of the object are processed by feature fusion through dense convolution layers to obtain the fused features of the object. The fused features of the object are again processed by using the coordinate attention mechanism to enhance the spatial features, and the second enhanced features of the object are obtained. Finally, the decoder is used to restore the spatial size of the second enhanced features of the object to obtain the intrusion scene image data. Among them, the spatial feature enhancement processing using the coordinate attention mechanism includes: firstly, the initial features of the object are deepened through the residual structure network to reduce the gradient disappearance problem; then, average pooling is performed in the horizontal and vertical directions respectively to obtain two vectors, and then the two vectors are connected and convolved in the spatial dimension to compress the channel, and then the spatial information in the horizontal and vertical directions is encoded through batch normalization and nonlinear operations, and then divided into the spatial information in the horizontal and vertical directions, and the spatial information in the horizontal and vertical directions is convolved to obtain the same number of channels as the input initial features of the object, and then the multi-classification results are displayed in the form of probability through the activation function; finally, the weighted output is normalized and the first enhanced features of the object are obtained.

[0152] In this embodiment, by adding a coordinate attention layer after the encoding layer and dense convolution layer of the generator, the generator can more accurately locate the position of animal invasion, avoid focus errors, and generate clearer animal invasion samples.

[0153] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0154] Based on the same inventive concept, the embodiment of the present application also provides an intrusion object detection device for implementing the intrusion object detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more intrusion object detection device embodiments provided below can refer to the limitations of the intrusion object detection method above, and will not be repeated here.

[0155] In an exemplary embodiment, Figure 6 As shown, an intrusion object detection device is provided, including: an acquisition module 602, a feature extraction module 604, a feature enhancement module 606 and a detection module 608, wherein:

[0156] An acquisition module 602 is used to acquire image data to be detected;

[0157] A feature extraction module 604 is used to extract multi-scale features from the image data to be detected by using a hybrid attention mechanism through a multi-scale feature extraction layer to obtain intermediate features of image data of multiple different scales;

[0158] The feature enhancement module 606 is used to perform multi-directional dilated convolution processing on each intermediate feature of the image data through the feature enhancement layer to obtain enhanced features of the image data at multiple different scales;

[0159] The detection module 608 is used to perform feature fusion on each image data enhancement feature through the detection layer to obtain a multi-scale fusion feature, and perform intrusion object detection based on the multi-scale fusion feature.

[0160] In an exemplary embodiment, the multi-scale feature extraction layer includes a multi-layer feature extraction network; the hybrid attention mechanism includes a channel attention mechanism and a spatial attention mechanism; the feature extraction module 604 is further used to:

[0161] For any layer of feature extraction network, the feature extraction network uses a hybrid attention mechanism to extract features from the input data to obtain intermediate features of the image data. The input data is the image data to be detected or the intermediate features of the image data output by the previous feature extraction network.

[0162] In an exemplary embodiment, the feature extraction module 604 is further configured to:

[0163] Perform convolution processing on the input data to obtain initial feature image data;

[0164] The channel attention mechanism is used to extract features from the initial feature image data to obtain the channel features of the image data. The spatial attention mechanism is used to extract features from the initial feature image data to obtain the spatial features of the image data. The initial feature image data is convoluted to obtain the deep semantic features of the image data.

[0165] The image data channel features, image data spatial features and image data deep semantic features are integrated to obtain the intermediate features of the image data.

[0166] In an exemplary embodiment, the feature enhancement layer includes a plurality of multi-directional dilated convolutional networks; the feature enhancement module 606 is further used to:

[0167] For the intermediate features of the image data at each scale, the multi-directional dilated convolutional networks are used to perform extended convolution processing on the intermediate features of the image data in multiple directions based on the dilation rates corresponding to the multi-directional dilated convolutional networks, so as to obtain multiple enhanced initial features of the image data;

[0168] The enhanced initial features of each image data are fused to obtain the image data enhanced features corresponding to the intermediate features of each image data.

[0169] In an exemplary embodiment, the intrusion object detection device further includes a training module. Before acquiring the image data to be detected, the training module is further used to:

[0170] Acquire training sample image data, where the training sample image data includes training sample generated image data, where the training sample generated image data is generated by a trained cyclic generative adversarial network;

[0171] Based on the training sample image data, the intrusion object detection model to be trained is trained to obtain a trained intrusion object detection model.

[0172] In an exemplary embodiment, the training module is further configured to:

[0173] Acquire object initial image data of the intrusion object;

[0174] Through the trained cyclic generative adversarial network, the intrusion scene image data of the intrusion object is generated based on the initial image data of the object, and the intrusion scene image data is used as the training sample image data.

[0175] In an exemplary embodiment, the cyclic generative adversarial network includes a generator, the generator includes an encoder, a first coordinate attention layer, a dense convolution layer, a second coordinate attention layer and a decoder; the training module is also used to:

[0176] Extracting features from the initial image data of the object through an encoder to obtain initial features of the object;

[0177] Performing spatial feature enhancement processing on the initial features of the object through the first coordinate attention layer to obtain the first object enhanced features;

[0178] Performing feature fusion processing on the first object enhancement feature through a dense convolution layer to obtain an object fusion feature;

[0179] Performing spatial feature enhancement processing on the object fusion feature through the second coordinate attention layer to obtain the second object enhanced feature;

[0180] The decoder performs spatial size restoration processing on the enhanced features of the second object to obtain intrusion scene image data.

[0181] Each module in the above-mentioned intrusion object detection device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0182] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, an intrusion object detection method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0183] Those skilled in the art will understand that Figure 7The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0184] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0185] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0186] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0187] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0188] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0189] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0190] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for detecting an intrusion object, characterized in that: The intrusion object detection method is applied to an intrusion object detection device, on which a trained intrusion object detection model is deployed, and the intrusion object detection model includes a multi-scale feature extraction layer, a feature enhancement layer and a detection layer; the method includes: Acquire image data to be detected; Through the multi-scale feature extraction layer, a hybrid attention mechanism is used to extract multi-scale features from the image data to be detected, so as to obtain intermediate features of image data of multiple different scales; Through the feature enhancement layer, each intermediate feature of the image data is subjected to multi-directional dilated convolution processing to obtain image data enhancement features of multiple different scales; Through the detection layer, feature fusion is performed on each of the image data enhancement features to obtain multi-scale fusion features, and intrusion object detection is performed based on the multi-scale fusion features.

2. The method according to claim 1, characterized in that The multi-scale feature extraction layer includes a multi-layer feature extraction network; the hybrid attention mechanism includes a channel attention mechanism and a spatial attention mechanism; The multi-scale feature extraction layer uses a hybrid attention mechanism to extract multi-scale features from the image data to be detected, and obtains intermediate features of image data of multiple different scales, including: For any layer of feature extraction network, the feature extraction network is used to extract features from input data using a hybrid attention mechanism to obtain intermediate features of image data, where the input data is the image data to be detected or the intermediate features of image data output by the previous feature extraction network; The feature extraction network uses a hybrid attention mechanism to extract features from the input data to obtain intermediate features of the image data, including: Perform convolution processing on the input data to obtain initial feature image data; Using a channel attention mechanism to extract features from the initial feature image data to obtain image data channel features, using a spatial attention mechanism to extract features from the initial feature image data to obtain image data spatial features, and performing convolution processing on the initial feature image data to obtain image data deep semantic features; The image data channel features, the image data spatial features and the image data deep semantic features are integrated to obtain the image data intermediate features.

3. The method according to claim 1, characterized in that The feature enhancement layer includes a plurality of multi-directional dilated convolution networks; through the feature enhancement layer, each of the intermediate features of the image data is subjected to multi-directional dilated convolution processing to obtain a plurality of image data enhancement features of different scales, including: For each scale of the intermediate features of the image data, the multi-directional dilated convolutional networks are used to perform dilated convolution processing on the intermediate features of the image data in multiple directions based on the dilation rates corresponding to the multi-directional dilated convolutional networks, so as to obtain multiple enhanced initial features of the image data; The enhanced initial features of each image data are fused to obtain the image data enhanced features corresponding to each intermediate feature of the image data.

4. The method according to any one of claims 1 to 3, characterized in that: Before acquiring the image data to be detected, the method further includes: Acquire training sample image data, wherein the training sample image data includes training sample generated image data, and the training sample generated image data is generated by a trained recurrent generative adversarial network; Based on the training sample image data, model training is performed on the intrusion object detection model to be trained to obtain a trained intrusion object detection model.

5. The method according to claim 4, characterized in that The step of acquiring training sample image data comprises: Acquire object initial image data of the intrusion object; Through the trained cyclic generative adversarial network, intrusion scene image data of the intrusion object is generated based on the initial image data of the object, and the intrusion scene image data is used as training sample image data.

6. The method according to claim 5, characterized in that The cyclic generative adversarial network includes a generator, wherein the generator includes an encoder, a first coordinate attention layer, a dense convolution layer, a second coordinate attention layer, and a decoder; The method of generating intrusion scene image data of an intrusion object based on the initial image data of the object by using a trained cyclic generative adversarial network comprises: Extracting features from the initial image data of the object by the encoder to obtain initial features of the object; Performing spatial feature enhancement processing on the initial feature of the object through the first coordinate attention layer to obtain a first object enhanced feature; Performing feature fusion processing on the first object enhancement feature through the dense convolution layer to obtain an object fusion feature; Performing spatial feature enhancement processing on the object fusion feature through the second coordinate attention layer to obtain a second object enhanced feature; The decoder performs spatial size restoration processing on the second object enhancement feature to obtain intrusion scene image data.

7. An intrusion object detection device, characterized in that: The device is deployed with a trained intrusion object detection model, which includes a multi-scale feature extraction layer, a feature enhancement layer and a detection layer; the device includes: An acquisition module, used for acquiring image data to be detected; A feature extraction module, used to perform multi-scale feature extraction on the image data to be detected by using the multi-scale feature extraction layer and a hybrid attention mechanism to obtain intermediate features of image data of multiple different scales; A feature enhancement module, used to perform multi-directional dilated convolution processing on each intermediate feature of the image data through the feature enhancement layer to obtain image data enhancement features of multiple different scales; The detection module is used to perform feature fusion on each of the image data enhancement features through the detection layer to obtain multi-scale fusion features, and perform intrusion object detection based on the multi-scale fusion features.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Layout photoetching hot spot detection method and system based on multidirectional feature enhancement network

    CN120471922A