Infrared small target detection method and device based on Sobel operator
By using an improved YOLOv8 model based on the Sobel operator, edge extraction and attention mechanisms are employed to enhance the accuracy and robustness of infrared small target detection, thus addressing the issues of insufficient detection accuracy and real-time performance in existing technologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGFENG OFF ROAD VEHICLE CO LTD
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-12
AI Technical Summary
Existing infrared small target detection methods are prone to false detections or missed detections in complex backgrounds, have weak model generalization ability, insufficient real-time processing capability, and require large amounts of computing resources and time.
An improved YOLOv8 model based on the Sobel operator is adopted. The gradients in the x and y directions are extracted by two fixed convolution kernels. Combined with the edge extraction module and attention mechanism, feature map stitching and convolution recovery are performed to improve the model's ability to pay attention to infrared edge information.
It improves the accuracy and robustness of infrared small target detection, reduces information loss in feature image fusion, and lowers resource consumption and processing time.
Smart Images

Figure CN122199997A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of target detection technology, and in particular relates to an infrared small target detection method and device based on the Sobel operator. Background Technology
[0002] With the rapid development of infrared imaging technology, the application value of infrared small target detection in military reconnaissance, security monitoring, aerospace and other fields is becoming increasingly prominent. This technology not only enables early perception and continuous tracking of small, distant targets, but also provides crucial information support for target identification and early warning decision-making in complex environments, which is of great significance for improving system situational awareness and autonomous response capabilities. However, limited by factors such as small target size, low signal-to-noise ratio, and complex and variable backgrounds, existing detection methods still face challenges in dynamic scenarios, including high rates of missed and false detections, weak model generalization ability, and insufficient real-time processing capabilities. Therefore, developing efficient and robust infrared small target detection methods has become a critical issue that urgently needs to be addressed.
[0003] Existing infrared small target extraction methods can be divided into traditional methods and deep learning-based methods. Traditional methods include: (1) filtering-based methods: converting the image from the spatial domain to the frequency domain, using the different characteristics of the target and background in the frequency domain for filtering, thereby highlighting the target or simple spatial filtering algorithms such as mean filtering and median filtering; (2) background suppression-based methods: calculating the average background of the image, and then subtracting the average background from the current image to highlight the target; (3) using handcrafted features combined with a classifier for target detection. Deep learning-based methods include using convolutional networks or GAN networks, attention mechanisms, etc.
[0004] Existing technologies are not effective for detecting small infrared targets against complex backgrounds. When the background is dynamically changing or uneven, false positives or false negatives are likely to occur. Furthermore, they require significant computational resources and time, and are prone to overfitting to small datasets, resulting in insufficient feature extraction, high false negative rates for small targets, poor real-time performance, and low accuracy. Summary of the Invention
[0005] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes an infrared small target detection method and apparatus based on the Sobel operator. It extracts gradients in the x and y directions using two fixed convolutional kernels, and then obtains the edge feature map by taking the square root of the sum of squares. Based on this, a new module is designed: the original image and the result after the Sobel operator are concatenated along the channel dimension, and after restoring the dimension through convolution, an attention module is followed by another convolutional module. Using the Sobel operator for edge extraction and the structural design of the edge extraction module allow the model to better focus on infrared edge information, thereby improving the detection capability and accuracy of small targets.
[0006] To address the aforementioned problems, according to a first aspect of the present invention, an infrared small target detection method based on the Sobel operator is provided, the method comprising: Acquire target data collected by the acquisition device, wherein the target data includes at least one of image data or video data; The target data is input into the trained target detection model to obtain the target detection result; The target detection model is an improved YOLOv8 model based on the Sobel operator. The target detection model includes a backbone network, a head network, and a detection network. The backbone network includes a first edge extraction module, a second edge extraction module, and a third edge extraction module.
[0007] According to one embodiment of this application, the step of inputting the target data into a trained target detection model to obtain the target detection result includes: The target data is input into the backbone network to perform feature extraction, resulting in the first feature map, the second feature map, and the third feature map. The first feature map, the second feature map, and the third feature map are input into the head network for feature fusion to obtain the fused feature map. The fused feature map is input into the detection network for detection, and the target detection result is obtained.
[0008] According to one embodiment of this application, the step of inputting the target data into the backbone network for feature extraction to obtain a first feature map includes: The target data is input into the first edge extraction module for edge extraction to obtain the first feature sub-image; The first feature sub-image is input into the second edge extraction module for edge extraction to obtain the second feature sub-image; The second feature sub-map is input into the first C2f_3 module for feature enhancement to obtain the third feature sub-map; The third feature sub-image is input into the third edge extraction module for edge extraction to obtain the fourth feature sub-image; The fourth feature sub-map is input into the first C2f_6 module for feature enhancement to obtain the first feature map.
[0009] According to one embodiment of this application, the first edge extraction module includes a Sobel operator module, an attention mechanism module, a first stitching module, a second stitching module, and a convolution module.
[0010] According to one embodiment of this application, the step of inputting the target data into a first edge extraction module for edge extraction to obtain a first feature sub-image includes: The target data is input into the Sobel operator module for edge detection to obtain the edge intensity. The edge intensity and target data are input into the first stitching module for channel-dimensional stitching to obtain the first stitching feature map; The spliced feature map and the target data are input into the second splicing module for splicing along the channel dimension to obtain the second spliced feature map; The second concatenated feature map is input into the attention mechanism module to obtain the attention feature map; The attention feature map is input into the convolution module for convolution to obtain the first feature sub-map.
[0011] According to one embodiment of this application, the calculation formula of the Sobel operator is as follows: in, For pixels gradient magnitude, For pixels Horizontal gradient magnitude, For pixels vertical gradient magnitude According to one embodiment of this application, the training process of the target detection model includes: Construct a pre-defined target detection model; Multiple infrared images were collected using the acquisition device to form a dataset; The target detection model is obtained by training the preset target detection model based on the WloU-v3 bounding box loss function and the dataset.
[0012] According to a second aspect of the present invention, an infrared small target detection device based on the Sobel operator is provided, the device comprising: The acquisition module is used to acquire target data collected by the acquisition device, wherein the target data includes at least one of image data or video data; The detection module is used to input the target data into the trained target detection model to obtain the target detection result; The target detection model is an improved YOLOv8 model based on the Sobel operator. The target detection model includes a backbone network, a head network, and a detection network. The backbone network includes a first edge extraction module, a second edge extraction module, and a third edge extraction module.
[0013] According to a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the infrared small target detection method based on the Sobel operator as described in the first aspect above.
[0014] According to a fourth aspect of the present invention, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the infrared small target detection method based on the Sobel operator as described in the first aspect above.
[0015] According to a fifth aspect of the present invention, a chip is provided, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run a program or instructions to implement the infrared small target detection method based on the Sobel operator as described in the first aspect.
[0016] According to a sixth aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the infrared small target detection method based on the Sobel operator as described in the first aspect above.
[0017] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application.
[0018] The present invention provides an infrared small target detection method based on the Sobel operator, which has the following advantages over the prior art: (1) This invention designs the Sobel operator, which uses two fixed convolutional kernels to extract gradients in the x and y directions, and then obtains the edge feature map by taking the square root of the sum of squares. Based on this, a new module is designed: the original image and the result after the Sobel operator are concatenated along the channel dimension, and after restoring the dimension through convolution, an attention module is passed through the image and then a convolutional module is added. Using the Sobel operator for edge extraction and the structural design of the edge extraction module allow the model to better focus on infrared edge information, thereby improving the detection capability of small targets and increasing the accuracy of target detection.
[0019] (2) This invention uses the Sobel operator to extract edges from the infrared feature map and concatenates them with the original feature map by channel. Furthermore, it passes through an attention module, allowing the model to focus more on the edge information of the image. This fully preserves the original visible light and infrared images, reducing the loss of image information in feature-level image fusion. It also enables parallel feature extraction and matching of visible light and infrared images, reducing resource consumption and time consumption in pixel-level image fusion. Attached Figure Description
[0020] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a schematic flowchart of the infrared small target detection method based on the Sobel operator provided in the embodiments of this application; Figure 2 This is a schematic diagram of the target detection model provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the first edge extraction module provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of the infrared small target detection device based on the Sobel operator provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0022] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0023] The following description, in conjunction with the accompanying drawings, details the infrared small target detection method, the infrared small target detection device, the electronic device, and the readable storage medium based on the Sobel operator provided in this application, through specific embodiments and application scenarios.
[0024] Among them, the infrared small target detection method based on the Sobel operator can be applied to the terminal, specifically executed by the hardware or software in the terminal.
[0025] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablets with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads). It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but rather a desktop computer with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads).
[0026] The following embodiments describe a terminal including a display and a touch-sensitive surface. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and joystick.
[0027] The infrared small target detection method based on the Sobel operator provided in this application embodiment can be executed by an electronic device or a functional module or entity in an electronic device that can implement the infrared small target detection method based on the Sobel operator. The electronic devices mentioned in this application embodiment include, but are not limited to, mobile phones, tablets, computers, cameras and wearable devices. The infrared small target detection method based on the Sobel operator provided in this application embodiment will be described below using an electronic device as the execution subject.
[0028] Figure 1 This is a flowchart illustrating the infrared small target detection method based on the Sobel operator provided in the embodiments of this application, as follows: Figure 1 As shown, the infrared small target detection method based on the Sobel operator includes steps 110 and 120.
[0029] Step 110: Acquire target data collected by the acquisition device, wherein the target data includes at least one of image data or video data; In some embodiments, the acquisition device is a camera, which is used to capture infrared image data or infrared video data.
[0030] Step 120: Input the target data into the trained target detection model to obtain the target detection result; The target detection model is an improved YOLOv8 model based on the Sobel operator. The target detection model includes a backbone network, a head network, and a detection network. The backbone network includes a first edge extraction module, a second edge extraction module, and a third edge extraction module.
[0031] Figure 2 This is a schematic diagram of the target detection model provided in the embodiments of this application, as shown below. Figure 2 As shown, the object detection model includes a backbone network, a head network, and a detection network. The object detection model replaces the convolutional module with an edge extraction module on the basis of the original YOLOv8 model.
[0032] In some embodiments, inputting the target data into a trained target detection model to obtain target detection results includes: The target data is input into the backbone network to perform feature extraction, resulting in the first feature map, the second feature map, and the third feature map. In some embodiments, inputting the target data into the backbone network for feature extraction to obtain a first feature map includes: The target data is input into the first edge extraction module for edge extraction to obtain the first feature sub-image; In some embodiments, the first edge extraction module includes a Sobel operator module, an attention mechanism module, a first stitching module, a second stitching module, and a convolution module.
[0033] Figure 3 This is a schematic diagram of the structure of the first edge extraction module provided in an embodiment of this application, as shown below. Figure 3 As shown, the first edge extraction module SobelConv includes a Sobel operator module, an attention mechanism module ATB, a first stitching module, a second stitching module, and a convolution module CONV.
[0034] The Sobel operator is a discrete differential operator that detects edges by calculating the gradient of each pixel in an image. Edges in an image are typically characterized by abrupt changes in pixel values, and the gradient measures the degree of such changes. The Sobel operator primarily uses horizontal and vertical convolution kernels to perform convolution operations with the image, thereby approximating the partial derivatives of the image in these two directions and determining the location and intensity of the edges.
[0035] The expression for the Sobel operator convolution kernel in the horizontal direction (x-direction) is: For a certain pixel in the image Its gradient approximation in the horizontal direction It is obtained by convolution with the horizontal direction.
[0036] The expression for the Sobel operator convolution kernel in the vertical direction (y-direction) is: Similarly, the gradient approximation in the vertical direction It is obtained by convolution in the vertical direction.
[0037] pixel gradient magnitude It can be obtained through gradients in the horizontal and vertical directions.
[0038] In some embodiments, the step of inputting the target data into a first edge extraction module for edge extraction to obtain a first feature sub-map includes: The target data is input into the Sobel operator module for edge detection to obtain the edge intensity. Edge detection is performed using the Sobel operator by convolving the input feature map X with the filter, as shown in the following formula: in, For the input feature map, The edge strength in the horizontal direction. This represents the edge strength in the vertical direction.
[0039] The formula for calculating edge strength is as follows: in, This represents the edge strength.
[0040] In some embodiments, the Sobel operator is calculated as follows: in, For pixels gradient magnitude, For pixels Horizontal gradient magnitude, For pixels The vertical gradient magnitude.
[0041] The edge intensity and target data are input into the first stitching module for channel-level stitching to obtain the first stitched feature map. The calculation formula is as follows: in, This is the first spliced feature map.
[0042] The spliced feature map and the target data are input into the second splicing module for splicing along the channel dimension to obtain the second spliced feature map; Furthermore, the first stitched feature map is reduced in dimensionality by a 1×1 convolution, and then two 3×3 depthwise convolutions are performed to obtain the second stitched feature map. The calculation formula is as follows: in, This is the first convolutional graph. As the first weight, As the second weight, This is the second splicing feature map.
[0043] The second concatenated feature map is input into the attention mechanism module to obtain the attention feature map; Will The input is fed into the attention mechanism module. The attention mechanism module consists of a convolutional network and a sigmoid activation function. After inputting into a convolutional network, it is activated using a sigmoid function and scaled to the range of 0-1. The result is then compared with... Element-wise multiplication is performed to obtain the attention feature map. The calculation formula is as follows: in, It refers to the Sigmoid function. This indicates element-wise multiplication. Attention feature map The attention feature map is input into the convolution module for convolution to obtain the first feature sub-map.
[0044] To maintain the invariance of size and dimension, the CONV module in the YOLOv8 backbone network was replaced by adding a convolutional Conv module after the attention mechanism module to obtain the first feature sub-map. .
[0045] The first feature sub-image is input into the second edge extraction module for edge extraction to obtain the second feature sub-image.
[0046] The second feature sub-map is input into the first C2f_3 module for feature enhancement to obtain the third feature sub-map. The calculation formula is as follows: in, This is the third feature sub-graph. This is the first convolutional graph. This is the second convolutional graph.
[0047] The third feature sub-image is input into the third edge extraction module for edge extraction to obtain the fourth feature sub-image; The fourth feature sub-map is input into the first C2f_6 module for feature enhancement to obtain the first feature map.
[0048] The first feature map, the second feature map, and the third feature map are input into the head network for feature fusion to obtain the fused feature map. The fused feature map is input into the detection network for detection, and the target detection result is obtained.
[0049] In some embodiments, the training process of the target detection model includes: Construct a pre-defined target detection model; Multiple infrared images were collected using the acquisition device to form a dataset; The target detection model is obtained by training the preset target detection model based on the WloU-v3 bounding box loss function and the dataset.
[0050] The formula for calculating the bounding box loss function is as follows: in, The difference between the predicted bounding box and the resulting bounding box in the infrared image. To accurately predict the parameters of the overlapping portion of the anchor point boxes, The parameter representing the difference between the predicted bounding box center coordinates and the correct bounding box center coordinates is r, which is a non-monotonic dynamic focusing coefficient.
[0051] It should be noted that, Its function is to amplify the quality of ordinary mass anchor frames. , Its function is to reduce the quality of anchor frames. Furthermore, when the anchor box and the target box overlap well, the model reduces its focus on the distance to the center point. The non-monotonic dynamic focusing coefficient can reduce the contribution of easily distinguishable samples to the loss value during training, thereby enabling the model to focus on difficult-to-distinguish samples. At the same time, it dynamically applies gradient gain to the bounding box, reducing the harmful gradients generated by low-quality anchor boxes in the later stages of training, focusing more on ordinary quality anchor boxes, and improving the model's localization performance.
[0052] The calculation formula is as follows: in, The width of the overlap area between the target box and the predicted box. The height of the overlap area between the target box and the predicted box. This is the area of the union of the predicted bounding box and the ground truth bounding box. The width of the prediction box, For the height of the predicted bounding box, The width of the actual bounding box. The height of the actual bounding box.
[0053] The calculation formula is as follows: in,( , ) represents the center coordinates of the prediction box. , () represents the coordinates of the center of the true bounding box. The width of the smallest outer bounding box that simultaneously contains both the predicted and ground truth boxes. It is the height of the smallest outermost box that contains both the predicted box and the ground truth box.
[0054] It is worth noting that the superscript * indicates separation from the computation graph, meaning that its gradient does not need to be calculated. The purpose is to eliminate factors that hinder convergence.
[0055] In this embodiment, by constructing a preset target detection model and training the model using the WloU-v3 bounding box loss function, the accuracy and robustness of the target detection model are improved, enabling better identification of small infrared targets and enhancing the accuracy of target detection.
[0056] The infrared small target detection method based on the Sobel operator provided in this application can be executed by an infrared small target detection device based on the Sobel operator. This application uses an infrared small target detection device based on the Sobel operator executing the infrared small target detection method based on the Sobel operator as an example to illustrate the infrared small target detection device based on the Sobel operator provided in this application.
[0057] This application also provides an infrared small target detection device based on the Sobel operator, such as... Figure 4 As shown, the infrared small target detection device based on the Sobel operator includes: a data acquisition module 410 and a detection module 420.
[0058] The acquisition module 410 is used to acquire target data collected by the acquisition device, wherein the target data includes at least one of image data or video data; Detection module 420 is used to input the target data into the trained target detection model to obtain the target detection result; The target detection model is an improved YOLOv8 model based on the Sobel operator. The target detection model includes a backbone network, a head network, and a detection network. The backbone network includes a first edge extraction module, a second edge extraction module, and a third edge extraction module.
[0059] The infrared small target detection method based on the Sobel operator provided in this application involves designing a Sobel operator to extract gradients in the x and y directions using two fixed convolutional kernels. The edge feature map is then obtained by taking the square root of the sum of squares. A new module is designed based on this: the original image and the result processed by the Sobel operator are concatenated along their channel dimensions, and after restoring the dimensions through convolution, an attention module is followed by another convolutional module. Using the Sobel operator for edge extraction and the structural design of the edge extraction module allow the model to better focus on infrared edge information, thereby improving the detection capability of small targets and increasing the accuracy of target detection.
[0060] The infrared small target detection device based on the Sobel operator provided in this application embodiment can achieve… Figures 1 to 3 The various processes implemented in the Sobel operator-based infrared small target detection method embodiment will not be described again here to avoid repetition.
[0061] In some embodiments, such as Figure 5 As shown, this application embodiment also provides an electronic device 500, including a processor 501, a memory 502, and a computer program stored in the memory 502 and executable on the processor 501. When the program is executed by the processor 501, it implements the various processes of the above-described infrared small target detection method embodiment based on the Sobel operator and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0062] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0063] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described embodiments of the infrared small target detection method based on the Sobel operator and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0064] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0065] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described infrared small target detection method based on the Sobel operator.
[0066] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0067] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described embodiments of the infrared small target detection method based on the Sobel operator, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0068] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a device-level chip, device chip, chip device, or on-chip device chip, etc.
[0069] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0070] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the infrared small target detection method based on the Sobel operator of the various embodiments of this application.
[0071] In the description of this application, "first feature" and "second feature" may include one or more of the features.
[0072] In the description of this application, "multiple" means two or more.
[0073] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0074] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0075] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for detecting small infrared targets based on the Sobel operator, characterized in that, The method includes: Acquire target data collected by the acquisition device, wherein the target data includes at least one of image data or video data; The target data is input into the trained target detection model to obtain the target detection result; The target detection model is an improved YOLOv8 model based on the Sobel operator. The target detection model includes a backbone network, a head network, and a detection network. The backbone network includes a first edge extraction module, a second edge extraction module, and a third edge extraction module.
2. The infrared small target detection method based on the Sobel operator according to claim 1, characterized in that, The step of inputting the target data into the trained target detection model to obtain the target detection result includes: The target data is input into the backbone network to perform feature extraction, resulting in the first feature map, the second feature map, and the third feature map. The first feature map, the second feature map, and the third feature map are input into the head network for feature fusion to obtain the fused feature map. The fused feature map is input into the detection network for detection, and the target detection result is obtained.
3. The infrared small target detection method based on the Sobel operator according to claim 2, characterized in that, The step of inputting the target data into the backbone network for feature extraction to obtain the first feature map includes: The target data is input into the first edge extraction module for edge extraction to obtain the first feature sub-image; The first feature sub-image is input into the second edge extraction module for edge extraction to obtain the second feature sub-image; The second feature sub-map is input into the first C2f_3 module for feature enhancement to obtain the third feature sub-map; The third feature sub-image is input into the third edge extraction module for edge extraction to obtain the fourth feature sub-image; The fourth feature sub-map is input into the first C2f_6 module for feature enhancement to obtain the first feature map.
4. The infrared small target detection method based on the Sobel operator according to claim 3, characterized in that, The first edge extraction module includes a Sobel operator module, an attention mechanism module, a first splicing module, a second splicing module, and a convolution module.
5. The infrared small target detection method based on the Sobel operator according to claim 4, characterized in that, The step of inputting the target data into the first edge extraction module for edge extraction to obtain the first feature sub-image includes: The target data is input into the Sobel operator module for edge detection to obtain the edge intensity. The edge intensity and target data are input into the first stitching module for channel-dimensional stitching to obtain the first stitching feature map; The spliced feature map and the target data are input into the second splicing module for splicing along the channel dimension to obtain the second spliced feature map; The second concatenated feature map is input into the attention mechanism module to obtain the attention feature map; The attention feature map is input into the convolution module for convolution to obtain the first feature sub-map.
6. The infrared small target detection method based on the Sobel operator according to claim 5, characterized in that, The calculation formula for the Sobel operator is as follows: in, For pixels gradient magnitude, For pixels Horizontal gradient magnitude, For pixels The vertical gradient magnitude.
7. The infrared small target detection method based on the Sobel operator according to any one of claims 1-6, characterized in that, The training process of the target detection model includes: Construct a pre-defined target detection model; Multiple infrared images were collected using the acquisition device to form a dataset; The target detection model is obtained by training the preset target detection model based on the WloU-v3 bounding box loss function and the dataset.
8. An infrared small target detection device based on the Sobel operator, implemented using the infrared small target detection method based on the Sobel operator as described in any one of claims 1 to 7, characterized in that, The device includes: The acquisition module is used to acquire target data collected by the acquisition device, wherein the target data includes at least one of image data or video data; The detection module is used to input the target data into the trained target detection model to obtain the target detection result; The target detection model is an improved YOLOv8 model based on the Sobel operator. The target detection model includes a backbone network, a head network, and a detection network. The backbone network includes a first edge extraction module, a second edge extraction module, and a third edge extraction module.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the infrared small target detection method based on the Sobel operator as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the infrared small target detection method based on the Sobel operator as described in any one of claims 1 to 7.