Image detection method and device

By using the depth separation convolutional module, convolutional neural network incentive module and bottleneck module in the image detection, the target object detection model of the bottleneck module is solved. The model complexity.

CN119339205APending Publication Date: 2025-01-21CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411376734.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The prior art detects misdetect or miss detection of smoke during fire, resulting in low accuracy of detection results.

Method used

An image detection method is adopted, using a target object detection model, which includes a depth separable convolution module, a convolutional neural network excitation module and a bottleneck module. Through these modules, the image is extracted, enhanced and optimized to detect features in the image. Whether the target object exists.

Benefits of technology

Reduce the amount of model parameters and calculation through the depth separation of convolution modules, enhance the characteristics of the characteristics through the convolutional neural network incentive module, improve the detection accuracy and reduce the complexity of the model through the bottleneck module, avoid misunderstanding and leakage detection, improve the detection results of the detection results Accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119339205A_ABST
    Figure CN119339205A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image detection method and device. The method comprises the following steps: acquiring a to-be-detected image; performing feature extraction on the image by adopting a depth separable convolution module to obtain a feature map; a convolutional neural network excitation module is adopted to process the feature map to obtain an enhanced feature map; processing the enhanced feature map by using a bottleneck module to obtain an optimized feature map; and detecting whether the target object exists in the image according to the optimized feature map. According to the embodiment of the invention, the model parameter quantity and the calculation quantity can be effectively reduced through the depth separable convolution module of the target object detection model, the feature representation capability of the feature map can be enhanced through the convolutional neural network excitation module, and the detection precision can be improved and the model complexity and the calculation quantity can be reduced through the bottleneck module. Through comprehensive application of multiple technical schemes in the target object detection model, the situation of false detection or missing detection of the target object in the image can be avoided, and the precision of the detection result of the target object is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of computer vision applications, and in particular to an image detection method, an image detection device, an electronic device, and a computer-readable storage medium. Background Art

[0002] Currently, computer vision technology is usually combined with target detection algorithms to detect target objects in images. For example, automatic detection of target objects such as smoke in the event of a fire.

[0003] However, since the situations of some target objects are relatively complicated, for example, the situation of smoke generated during a fire is relatively complicated, it is easy to have false detection or missed detection, which leads to low accuracy of the detection results of the target objects. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide an image detection method and device to solve the problem that there is currently a situation where there is misdetection or missed detection of a target object in an image, resulting in a low accuracy of the detection result of the target object. The specific technical solution is as follows:

[0005] In a first aspect of the implementation of the present invention, an image detection method is first provided, involving a target object detection model, wherein the target object detection model includes a depth separable convolution module, a convolutional neural network excitation module and a bottleneck module, and the method includes:

[0006] Acquire an image to be detected;

[0007] Using the depthwise separable convolution module to extract features from the image to obtain a feature map;

[0008] Processing the feature map using the convolutional neural network excitation module to obtain an enhanced feature map;

[0009] Processing the enhanced feature map using the bottleneck module to obtain an optimized feature map;

[0010] Detect whether a target object exists in the image according to the optimized feature map.

[0011] Optionally, after acquiring the image to be detected, the method further includes:

[0012] The image to be detected is preprocessed; wherein the preprocessing at least includes resizing and normalization.

[0013] Optionally, using the depthwise separable convolution module to extract features from the image to obtain a feature map includes:

[0014] According to the pixel position of each channel of the image and the depth convolution kernel corresponding to the pixel position of each channel, performing depth convolution on the image to obtain a depth feature map;

[0015] The depth feature map is convolved point by point into a feature map according to a point by point convolution kernel.

[0016] Optionally, using the convolutional neural network excitation module to process the feature map to obtain an enhanced feature map includes:

[0017] Calculating a channel descriptor for each channel according to feature map information of the feature map by global average pooling; wherein the feature map information includes a height, a width, and a number of channels of the feature map;

[0018] Calculating the channel descriptor of each channel through a first fully connected layer and a first activation function to obtain compressed channel information of each channel;

[0019] Calculate the compressed channel information of each channel through a second fully connected layer and a second activation function to obtain a channel weight of each channel;

[0020] An enhanced feature map is obtained according to the channel weight of each channel and the feature map.

[0021] Optionally, using the bottleneck module to process the enhanced feature map to obtain an optimized feature map includes:

[0022] Performing a first ghost convolution on the enhanced feature map to obtain a first intermediate feature map;

[0023] Performing depth convolution on the first intermediate feature map to obtain a second intermediate feature map;

[0024] Performing a second ghost convolution on the second intermediate feature map to obtain a third intermediate feature map;

[0025] The enhanced feature map and the third intermediate feature map are skip-connected to obtain an optimized feature map.

[0026] Optionally, the target object includes at least smoke, and detecting whether the target object exists in the image according to the optimized feature map includes:

[0027] Matching the optimized feature graph with features of a target object in a feature library;

[0028] If the optimized feature map matches the features of the target object in the feature library, it is determined that the target object exists in the image;

[0029] The area where the optimized feature map matches the features of the target object in the feature library is taken as a candidate area;

[0030] Classification and bounding box regression are performed on the candidate area including the target object, and a bounding box is generated for the target object in the candidate area and displayed.

[0031] Optionally, after classifying and regressing the candidate region including the target object, the method further includes:

[0032] Post-processing is performed on the candidate region; wherein the post-processing at least includes non-maximum suppression processing and bounding box adjustment.

[0033] In a second aspect of the present invention, an image detection device is provided, which relates to a target object detection model, wherein the target object detection model includes a depthwise separable convolution module, a convolutional neural network excitation module and a bottleneck module, and the device includes:

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

[0035] A feature map obtaining module, used for extracting features from the image using the depthwise separable convolution module to obtain a feature map;

[0036] An enhanced feature map obtaining module, used for processing the feature map using the convolutional neural network excitation module to obtain an enhanced feature map;

[0037] An optimized feature map obtaining module, used for using the bottleneck module to process the enhanced feature map to obtain an optimized feature map;

[0038] A target object detection module is used to detect whether a target object exists in the image according to the optimized feature map.

[0039] Optionally, the device further comprises: a preprocessing module, configured to:

[0040] The image to be detected is preprocessed; wherein the preprocessing at least includes resizing and normalization.

[0041] Optionally, the feature map obtaining module is used to:

[0042] According to the pixel position of each channel of the image and the depth convolution kernel corresponding to the pixel position of each channel, performing depth convolution on the image to obtain a depth feature map;

[0043] The depth feature map is convolved point by point into a feature map according to a point by point convolution kernel.

[0044] Optionally, the enhanced feature map obtaining module is used to:

[0045] Calculating a channel descriptor for each channel according to feature map information of the feature map by global average pooling; wherein the feature map information includes a height, a width, and a number of channels of the feature map;

[0046] Calculating the channel descriptor of each channel through a first fully connected layer and a first activation function to obtain compressed channel information of each channel;

[0047] Calculate the compressed channel information of each channel through a second fully connected layer and a second activation function to obtain a channel weight of each channel;

[0048] An enhanced feature map is obtained according to the channel weight of each channel and the feature map.

[0049] Optionally, the optimized feature map obtaining module is used to:

[0050] Performing a first ghost convolution on the enhanced feature map to obtain a first intermediate feature map;

[0051] Performing depth convolution on the first intermediate feature map to obtain a second intermediate feature map;

[0052] Performing a second ghost convolution on the second intermediate feature map to obtain a third intermediate feature map;

[0053] The enhanced feature map and the third intermediate feature map are skip-connected to obtain an optimized feature map.

[0054] Optionally, the target object includes at least smoke, and the target object detection module is used to:

[0055] Matching the optimized feature graph with features of a target object in a feature library;

[0056] If the optimized feature map matches the features of the target object in the feature library, it is determined that the target object exists in the image;

[0057] The area where the optimized feature map matches the features of the target object in the feature library is taken as a candidate area;

[0058] Classification and bounding box regression are performed on the candidate area including the target object, and a bounding box is generated for the target object in the candidate area and displayed.

[0059] Optionally, the device further comprises: a post-processing module, configured to:

[0060] Post-processing is performed on the candidate region; wherein the post-processing at least includes non-maximum suppression processing and bounding box adjustment.

[0061] In another aspect of the present invention, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes any of the above-mentioned image detection methods.

[0062] In yet another aspect of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned image detection methods.

[0063] Compared with the related art, the embodiments of the present invention have at least the following advantages:

[0064] In an embodiment of the present invention, an image to be detected is obtained, a deep separable convolution module of a target object detection model is used to extract features from the image to obtain a feature map, a convolutional neural network excitation module of the target object detection model is used to process the feature map to obtain an enhanced feature map, and a bottleneck module of the target object detection model is used to process the enhanced feature map to obtain an optimized feature map. Finally, whether a target object exists in the image can be detected according to the optimized feature map, and then corresponding processing is performed when the target object is detected in the image. The embodiment of the present invention can effectively reduce the amount of model parameters and the amount of calculation through the deep separable convolution module of the target object detection model, enhance the feature representation capability of the feature map through the convolutional neural network excitation module, improve the detection accuracy and reduce the model complexity and the amount of calculation through the bottleneck module, and avoid the situation of false detection or missed detection of the target object in the image through the comprehensive application of multiple technical solutions in the target object detection model, thereby improving the accuracy of the detection result of the target object. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.

[0066] Figure 1 A flowchart of an image detection method provided in an embodiment of the present invention;

[0067] Figure 2 A schematic diagram of an improved module in a model provided in an embodiment of the present invention;

[0068] Figure 3 is a structural block diagram of an image detection device provided in an embodiment of the present invention;

[0069] Figure 4 The present invention is a block diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0070] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0071] In order to enable those skilled in the art to better understand the embodiments of the present invention, some terms or nouns involved in the embodiments of the present invention are explained below.

[0072] YOLO: YOLO (You Only Look Once) is an object detection algorithm that is characterized by its ability to predict bounding boxes and class probabilities directly from images in a single forward pass. YOLO achieves real-time object detection by dividing the entire image into a grid and predicting a bounding box within each grid cell.

[0073] Feature pyramid: Feature pyramid is a multi-scale representation method used to process objects of different scales in deep learning. Feature pyramid constructs feature maps of different resolutions and fuses them at different levels, allowing the model to detect or recognize objects at different scales.

[0074] Convolution: Convolution is a common operation in deep learning, which extracts features by sliding a filter (or convolution kernel) on the input data. Convolution operations are widely used in fields such as image processing and natural language processing, and can effectively capture local features of input data.

[0075] Standard separable convolution: Standard separable convolution is a convolution operation that separates spatial convolution and channel convolution. It first performs independent spatial convolution on each channel of the input, and then performs channel-by-channel convolution on the feature maps of each channel. This separation method can reduce the number of parameters and the amount of calculation, thereby improving the efficiency of the model.

[0076] Squeeze-and-Excitation (SE) module: The Squeeze-and-Excitation module (SE module) is a module used to enhance the feature representation capability of convolutional neural networks. The SE module learns the importance weights of each channel in the feature map and then dynamically scales the feature map according to these weights to enhance meaningful features and suppress useless features, thereby improving the performance of the model.

[0077] At present, existing technical solutions usually use computer vision technology combined with target detection algorithms to realize automatic monitoring of smoke when a fire occurs. A common existing technology is a target detection algorithm based on deep learning, such as the YOLO (You Only Look Once) series, SSD (Single Shot Multi Box Detector), Faster R-CNN (Faster Region Convolutional Neural Network), etc. These algorithms usually use convolutional neural networks (CNN) as the backbone network, and combine different feature extraction and region proposal technologies to realize the detection and positioning of target objects.

[0078] In these existing technical solutions, labeled data sets are usually used for training so that the model can recognize the situation during a fire. During the training process, a large amount of labeled data and computing resources are required to train the deep learning model to improve the accuracy and robustness of the model. After the training is completed, the model can monitor smoke during a fire in a real-time video stream or static image and output the monitoring results.

[0079] The technical problems existing in the existing technical solutions mainly include:

[0080] 1. Insufficient accuracy: Since the smoke generated during a fire may be complicated, the existing technical solutions may have false detection or missed detection during detection, resulting in low accuracy of the monitoring results.

[0081] 2. High real-time requirements: In the process of fire and smoke generation, timely and accurate monitoring is required to provide timely warnings and interventions. However, existing technical solutions may have certain deficiencies in speed and real-time performance and cannot meet the needs of real-time monitoring.

[0082] 3. High resource consumption: Training deep learning models requires a large amount of labeled data and computing resources. In the actual deployment process, the reasoning of the model may also require high computing resources and memory consumption, which will cause a certain burden on mobile embedded systems.

[0083] In response to the above problems, for the real-time detection of target objects, for example, for the real-time detection of smoke during a fire, an image detection method based on the improved YOLO algorithm is proposed, which aims to improve monitoring accuracy, realize real-time monitoring and reduce resource consumption, thereby effectively solving the problems existing in the existing technical solutions such as false detection or missed detection, which leads to low accuracy of the detection results of the target objects.

[0084] Reference Figure 1 , is a flowchart of a method for image detection provided in an embodiment of the present invention, such as Figure 1 As shown, it involves a target object detection model, which includes a depth separable convolution module, a convolutional neural network excitation module and a bottleneck module. The method may specifically include the following steps:

[0085] Step 101: Acquire an image to be detected.

[0086] Step 102: Use the depthwise separable convolution module to extract features from the image to obtain a feature map.

[0087] Step 103: Use the convolutional neural network excitation module to process the feature map to obtain an enhanced feature map.

[0088] Step 104: Use the bottleneck module to process the enhanced feature map to obtain an optimized feature map.

[0089] Step 105: Detect whether a target object exists in the image according to the optimized feature map.

[0090] In a specific implementation, the network element devices involved in the embodiments of the present invention may include but are not limited to embedded smart cameras, mobile embedded systems, communication modules, etc., and connections can be established between various network element devices through the communication modules to achieve data transmission and interaction. Specifically, the smart camera can be used to obtain images to be detected, the mobile embedded system is used to run algorithms to achieve target detection and prediction, and the communication module is used to transmit monitoring results. The algorithm models such as the target object detection model involved in the embodiments of the present invention can be deployed on the mobile embedded system, and image processing, target object detection and communication functions can be realized through software.

[0091] In a specific embodiment, an image to be identified (detected) can be obtained through a smart camera, and the system captures a real-time video stream from the smart camera through the OpenCV (an open source computer vision and machine learning software library) library, and uses the video frames in the real-time video stream as the image to be detected in the embodiment of the present invention. For the sake of convenience of explanation, the following mainly uses smoke in a fire as an example as the target object.

[0092] In an embodiment of the present invention, the target object detection model (model) is a model of a convolutional neural network structure, which may include multiple modules such as a deep separable convolution module, a convolutional neural network excitation module (such as an SE module) and a bottleneck module (such as a lightweight GhostBottleneck), and different modules may provide different technical solutions. Specifically, a deep separable convolution module may be used to extract and represent features of an image to be detected, a convolutional neural network excitation module may be used to enhance the ability of image feature representation, and a bottleneck module may be used to optimize the feature pyramid of an image, thereby improving the detection accuracy of the image while reducing the model complexity and computational complexity.

[0093] In an embodiment of the present invention, an image to be detected is obtained, a deep separable convolution module of a target object detection model is used to extract features from the image to obtain a feature map, a convolutional neural network excitation module of the target object detection model is used to process the feature map to obtain an enhanced feature map, and a bottleneck module of the target object detection model is used to process the enhanced feature map to obtain an optimized feature map. Finally, whether a target object exists in the image can be detected according to the optimized feature map, and then corresponding processing is performed when the target object is detected in the image. The embodiment of the present invention can effectively reduce the amount of model parameters and the amount of calculation through the deep separable convolution module of the target object detection model, enhance the feature representation capability of the feature map through the convolutional neural network excitation module, improve the detection accuracy and reduce the model complexity and the amount of calculation through the bottleneck module, and avoid the situation of false detection or missed detection of the target object in the image through the comprehensive application of multiple technical solutions in the target object detection model, thereby improving the accuracy of the detection result of the target object.

[0094] In one embodiment of the present invention, after step 101, obtaining the image to be detected, the method may further include:

[0095] The image to be detected is preprocessed; wherein the preprocessing at least includes resizing and normalization.

[0096] In an embodiment of the present invention, the image to be detected is preprocessed, wherein the preprocessing may at least include resizing and normalization. Specifically, in the preprocessing stage of the image to be detected, the image is adjusted to a size acceptable to the model, usually a size of 640*640 pixels. Next, the resized image is normalized to scale the pixel values ​​of the image to between 0 and 1 for ease of model processing.

[0097] In the above embodiment, before the image to be detected is detected by the target object detection model, the preprocessing of the image to be detected can ensure the consistency and standardization of the image, so that the backbone network and feature pyramid of the improved target object detection model in the embodiment of the present invention can better extract feature maps.

[0098] In one embodiment of the present invention, step 102, using the depthwise separable convolution module to extract features from the image to obtain a feature map, includes:

[0099] According to the pixel position of each channel of the image and the depth convolution kernel corresponding to the pixel position of each channel, performing depth convolution on the image to obtain a depth feature map;

[0100] The depth feature map is convolved point by point into a feature map according to a point by point convolution kernel.

[0101] The preprocessed image is input into the improved backbone network for feature extraction. The standard convolution layer in the backbone network is improved to a depth-wise separable convolution layer, and separable convolution is used to extract features from the backbone network.

[0102] In some related schemes, some standard convolution operations can be expressed as:

[0103]

[0104] Among them, Output(i,j) is the feature map at position (i,j); K(m,n,c) is the convolution kernel at position (m,n)(m,n), and the corresponding channel is c; I(i+m,j+n,c) is the pixel value of the image at pixel position (i+m,j+n), and the corresponding channel is c; M×N is the size of the convolution kernel; C is the number of channels of the image.

[0105] In an embodiment of the present invention, a feature map is obtained by performing a depthwise separable convolution on the image through a depthwise separable convolution module. Depthwise separable convolution is a lightweight convolution operation that can effectively reduce the amount of model parameters and computation, thereby achieving lightweight and speed-up of the network model. Compared with traditional standard convolution, depthwise separable convolution has the following advantages: Fewer parameters: Depthwise separable convolution decomposes the standard convolution into two steps: depthwise convolution and pointwise convolution, which can significantly reduce the amount of model parameters. Lower computational complexity: Depthwise separable convolution reduces redundant computations between convolution kernels, which can significantly reduce the amount of model computation. Specifically, depthwise separable convolution can be divided into two steps: depthwise convolution and pointwise convolution:

[0106] Steps of depth convolution: Depth convolution performs convolution operation separately on each channel of the image:

[0107]

[0108] Among them, DepthwiseOutputcc(i,j) is the output feature map at pixel position (i,j) on channel c; K c (m,n) is the depth convolution kernel at the display position (m,n) on channel c; I c (i+m,j+n) is the pixel value of the input image at pixel position (i+m,j+n) on channel c;

[0109] Steps of point-by-point convolution: Point-by-point convolution uses 1×1 convolution to mix channels at each position:

[0110]

[0111] Among them, W(k,c) is a point-by-point convolution kernel that connects the kth channel of the output feature and the cth channel of the input feature.

[0112] It can be seen that the depthwise separable convolution module of the embodiment of the present invention combines the operations of depthwise convolution and pointwise convolution, so the depthwise separable convolution can be expressed as:

[0113]

[0114] Among them, Output represents the feature map; Output(i,j,k) is the value of the kth channel of the output feature map at position (i,j); W(k,c) is the weight of the point-by-point convolution kernel; K c (m,n) is the weight of the depthwise convolution kernel at channel c; I c (i+m,j+n) is the value of the input image at position (i+m,j+n) in channel c.

[0115] Image features are extracted through depthwise separable convolution, and then the SE module is introduced after the backbone network to enhance the feature representation capability.

[0116] In the above embodiment, deep separable convolution is used in the backbone network of the target object detection model, which greatly reduces the number of model parameters and calculations, and significantly improves the model operation speed. Therefore, the target object detection model of the embodiment of the present invention can be used in application scenarios that require real-time monitoring of target objects, such as real-time monitoring of smoke generated when a fire occurs.

[0117] In one embodiment of the present invention, step 103, using the convolutional neural network excitation module to process the feature map to obtain an enhanced feature map, includes:

[0118] Calculating a channel descriptor for each channel according to feature map information of the feature map by global average pooling; wherein the feature map information includes a height, a width, and a number of channels of the feature map;

[0119] Calculating the channel descriptor of each channel through a first fully connected layer and a first activation function to obtain compressed channel information of each channel;

[0120] Calculate the compressed channel information of each channel through a second fully connected layer and a second activation function to obtain a channel weight of each channel;

[0121] An enhanced feature map is obtained according to the channel weight of each channel and the feature map.

[0122] Among them, the convolutional neural network excitation module can be an SE module. Specifically, the SE module is a channel attention mechanism that can dynamically adjust the weights of each channel in the feature map, thereby enhancing the feature representation capability. The SE module can have at least the following advantages: Improve feature discrimination: The SE module can focus on important feature channels and suppress unimportant feature channels, thereby improving the feature discrimination; Enhance feature expression capability: The SE module can better extract the correlation between features and generate a more discriminative feature map, thereby enhancing feature expression capability.

[0123] Among them, the SE module can mainly perform three steps: Squeeze (global average pooling), Excitation (calibration) and Recalibration. Squeeze is to compress the information of each channel of the feature map into a single scalar through global average pooling, so as to obtain global channel-level features; Excitation is to re-weight each channel according to the global information (channel descriptor) obtained by Squeeze through an adaptive weight mechanism, so as to enhance the expression of important features and suppress the expression of unimportant features. In the SE module, Squeeze is a key step, which compresses the feature map of each channel through the global average pooling operation, and converts the two-dimensional feature map (H×W) into a scalar z c , this scalar represents the global information of the channel.

[0124] Assume that the feature map is X∈R H×W×C , where H is the height of the feature map, W is the width of the feature map, and C is the number of channels. The SE module needs to perform the following steps:

[0125] 1.Squeeze:

[0126] First, the feature map X is compressed into a channel descriptor z∈R by global average pooling. C :

[0127]

[0128] Among them, zc is the descriptor of the c-th channel.

[0129] 2.Excitation:

[0130] Then, the channel weight s∈R of each channel is recalculated through two fully connected layers (the first fully connected layer and the second fully connected layer) and activation functions (the first activation function and the second activation function) C :

[0131] s=σ(W 2 δ(W1z))

[0132] Among them, W1 and W2 are the weight matrices corresponding to the first fully connected layer and the second fully connected layer respectively; σ is the output activation function, usually using the sigmoid function, σ compresses the weight of each channel to the range of [0,1], indicating that the importance of each channel is re-weighted. δ is the intermediate activation function, usually using the ReLU function to add nonlinear expression capabilities to the features after dimensionality reduction, δ(x) = max(0,x).

[0133] 3. Recalibration:

[0134] Finally, the channel weight s is applied to each channel of the feature map X to obtain the reweighted output feature map Y, that is, the enhanced feature map:

[0135] Y i,j,c =s c *X i,j,c

[0136] Among them, Y i,j,c is the value of the cth channel of the feature map X at position (i, j); s c Represents the channel weight of the c-th channel.

[0137] In summary, the overall process of the SE module in the embodiment of the present invention is: input: feature map X; global average pooling: obtain the channel descriptor z of the feature map; first fully connected layer + ReLU function activation: compressed channel descriptor z obtains compressed channel information; second fully connected layer + Sigmoid activation: expands the compressed channel information and generates channel weight s; channel recalibration: applies the channel weight to each channel of the feature map X by multiplication to obtain the output feature map Y, that is, the enhanced feature map.

[0138] In the above embodiment, the SE module is introduced into the backbone network of the target object detection model, so that the feature representation ability of the model is significantly improved, so that the model can better identify target objects such as smoke generated in a fire, thereby improving the detection accuracy.

[0139] In one embodiment of the present invention, step 104, using the bottleneck module to process the enhanced feature map to obtain an optimized feature map, includes:

[0140] Performing a first ghost convolution on the enhanced feature map to obtain a first intermediate feature map;

[0141] Performing depth convolution on the first intermediate feature map to obtain a second intermediate feature map;

[0142] Performing a second ghost convolution on the second intermediate feature map to obtain a third intermediate feature map;

[0143] The enhanced feature map and the third intermediate feature map are skip-connected to obtain an optimized feature map.

[0144] The present invention has made improvements in the feature pyramid of the target object detection model. Different from the introduction of the attention mechanism, the bottleneck module of the embodiment of the present invention introduces the GhostBottleneck lightweight bottleneck structure (GhostBottleneck structure) to replace part of the Neck module, thereby optimizing the feature pyramid, significantly improving the detection accuracy, and reducing the model complexity and calculation amount. Specifically, GhostBottleneck is a lightweight convolution operation that can effectively reduce the model parameter amount and calculation amount while maintaining a high feature representation capability. Specifically, the GhostBottleneck structure has at least the following advantages: Improve detection accuracy: The GhostBottleneck lightweight bottleneck structure can effectively extract the correlation between features, enhance the feature representation capability, and thus improve detection accuracy. Reduce model complexity: The parameter amount and calculation amount of the GhostBottleneck lightweight bottleneck structure are much lower than those of the standard convolution, which can significantly reduce the model complexity and make it easier to deploy on embedded devices. Improve model speed: The GhostBottleneck lightweight bottleneck structure has high computational efficiency and will not significantly reduce the model running speed.

[0145] In a specific embodiment, the GhostBottleneck structure is as follows:

[0146] The first layer of Ghost convolution (first ghost convolution): The input feature map X (enhanced feature map) first passes through a Ghost convolution to generate the first intermediate feature map Y1.

[0147] Deep convolution: The first intermediate feature map Y1 undergoes a deep convolution operation to extract spatial information and generate the second intermediate feature map Y2.

[0148] Second layer of Ghost convolution (second ghost convolution): The second intermediate feature map Y2 generates the final output feature map Y through the second Ghost convolution, that is, the third intermediate feature map. At this time, the third intermediate feature map can be directly used as the optimized feature map output by the GhostBottleneck structure.

[0149] In an optional embodiment, a skip connection may be performed based on the third intermediate feature map to obtain an optimized feature map. Specifically:

[0150] Skip connection: The input feature map X is directly added to the output feature map Y to form an optimized feature map Y of the skip connection (e.g., residual connection) out :

[0151] Y out =X+Y

[0152] Compared with the traditional feature pyramid method, the introduction of the GhostBottleneck structure has the following advantages: Stronger feature representation capability: The GhostBottleneck structure can better extract the correlation between features and generate more discriminative feature maps, thereby improving detection accuracy; Lower computational complexity: The parameter amount and computational complexity of the GhostBottleneck lightweight bottleneck structure are much lower than those of the standard convolution, which can significantly reduce the complexity of the model and make it easier to deploy on embedded devices; Higher running speed: The GhostBottleneck lightweight bottleneck structure has high computational efficiency and will not significantly reduce the model running speed, meeting the needs of real-time monitoring.

[0153] It should be noted that, in addition to the GhostBottleneck structure, other lightweight bottleneck structures may also be used in the bottleneck structure to further improve the detection accuracy, and the embodiments of the present invention do not need to be limited to this.

[0154] In the above embodiment, the GhostBottleneck structure is used to perform Ghost convolution in the bottleneck module of the target object detection model. Ghost convolution achieves a significant reduction in parameters and computational complexity by decomposing complex convolution operations into a small number of standard convolutions and a large number of linear operations. It can be seen that the GhostBottleneck structure effectively reduces the complexity of the model and is suitable for lightweight model design.

[0155] In an embodiment of the present invention, the target object includes at least smoke, and step 105, detecting whether the target object exists in the image according to the optimized feature map, may include:

[0156] Matching the optimized feature graph with features of a target object in a feature library;

[0157] If the optimized feature map matches the features of the target object in the feature library, it is determined that the target object exists in the image;

[0158] The area where the optimized feature map matches the features of the target object in the feature library is taken as a candidate area;

[0159] Classification and bounding box regression are performed on the candidate area including the target object, and a bounding box is generated for the target object in the candidate area and displayed.

[0160] In an embodiment of the present invention, the target object detection model is an improved YOLO model. After obtaining the optimized feature map, target detection of the target object can be performed. Specifically, the purpose of target detection is to identify whether the target object exists in the image and locate the bounding box of the target object. Exemplarily, when the target object is smoke in a fire, the target object detection model performs real-time detection on whether smoke is generated in the image. Specifically, the optimized feature map is processed using the target object detection model, and the features of smoke are detected by matching the optimized feature map with the features in the feature library. Then, the feature map is classified and bounding box regressed to determine whether smoke exists in the image.

[0161] In the above embodiment, the detection result (e.g., the bounding box of the target object) output by the target object detection model will be drawn on the monitoring interface, and the smoke area in the image will be displayed. The detection result output by the improved model is drawn on the monitoring interface and displayed in real time. In addition, if the target object detection model detects that smoke is generated, an alarm can be immediately issued to remind relevant personnel to take action. Through the real-time alarm system, potential safety hazards can be discovered in time, and effective measures can be taken to solve them. Optionally, the embodiment of the present invention can also optimize the transmission protocol and rate of the communication module to achieve faster transmission of detection results and meet the needs of real-time monitoring.

[0162] In one embodiment of the present invention, after classifying and regressing the candidate region including the target object, the method further includes:

[0163] Post-processing is performed on the candidate region; wherein the post-processing at least includes non-maximum suppression processing and bounding box adjustment.

[0164] In the embodiment of the present invention, after the detection of the target object is completed, some post-processing operations may be performed, such as non-maximum suppression (NMS) and bounding box adjustment. NMS is used to remove overlapping bounding boxes and retain only one optimal bounding box for each target object. Bounding box adjustment: fine-tune the bounding box to improve its accuracy.

[0165] Reference Figure 2 , is a schematic diagram of an improved module in a model provided in an embodiment of the present invention. Specifically, the main improvements in the target object detection model (model) may include:

[0166] 1. Backbone network improvement:

[0167] Advantages: Use deep separable convolution and SE modules to improve detection performance

[0168] The embodiment of the present invention adopts deep separable convolution and SE modules in the backbone network and feature pyramid, which significantly improves the detection performance.

[0169] 1. Use depth-wise separable convolution to achieve lightweight

[0170] Depthwise separable convolution is a lightweight convolution operation that can effectively reduce the number of model parameters and the amount of computation, thereby achieving lightweight and speed-up of the network model. Compared with traditional standard convolution, depthwise separable convolution has the following advantages:

[0171] Fewer parameters: Depthwise separable convolution decomposes the standard convolution into two steps: depthwise convolution and pointwise convolution, which can significantly reduce the number of model parameters.

[0172] Lower computational complexity: Depthwise separable convolution reduces redundant computations between convolution kernels, which can significantly reduce the computational complexity of the model.

[0173] The present invention uses deep separable convolution in the backbone network, which greatly reduces the number of model parameters and calculations, and significantly improves the model running speed. This is particularly important for real-time monitoring of smoke generated during a fire, because real-time performance is one of the key requirements of this scenario.

[0174] 2. Introducing SE module to enhance feature representation

[0175] The SE module is a channel attention mechanism that can dynamically adjust the weights of each channel in the feature map to enhance the feature representation capability. The SE module has the following advantages:

[0176] Improve feature discrimination: The SE module can focus on important feature channels and suppress unimportant feature channels, thereby improving feature discrimination.

[0177] Enhanced feature expression capability: The SE module can better extract the correlation between features and generate more discriminative feature maps, thereby enhancing feature expression capability.

[0178] The present invention introduces the SE module into the backbone network and feature pyramid, which significantly improves the feature representation capability of the model, thus enabling the model to better identify smoke and improve detection accuracy.

[0179] Beneficial effects:

[0180] Improved target detection accuracy and speed: Thanks to the application of deep separable convolution and SE modules, the target detection accuracy and speed of the present invention are significantly improved. This makes the detection results more reliable and practical, and can meet the needs of real-time monitoring scenarios.

[0181] Reduced model complexity: Since the depthwise separable convolution has lower parameters and computational complexity, the model complexity of the present invention is also reduced. This makes the model easier to deploy on embedded devices, such as surveillance cameras or smart access control systems.

[0182] Expanded application scenarios: Due to the reduced model complexity, the present invention can be deployed on more devices, expanding the application scenarios. For example, it can be applied to the fields of autonomous driving, smart home, etc.

[0183] 3. Feature pyramid improvements:

[0184] Advantages: The present invention has made improvements in the feature pyramid, introducing the GhostBottleneck lightweight bottleneck structure to replace part of the Neck module, which significantly improves the detection accuracy while reducing the model complexity and calculation amount.

[0185] Improved advantages:

[0186] Improve detection accuracy: GhostBottleneck's lightweight bottleneck structure can effectively extract the correlation between features, enhance feature representation capabilities, and thus improve detection accuracy.

[0187] Reduce model complexity: The number of parameters and computational complexity of GhostBottleneck's lightweight bottleneck structure are much lower than standard convolution, which can significantly reduce model complexity and make it easier to deploy on embedded devices.

[0188] Improve model speed: GhostBottleneck's lightweight bottleneck structure has high computational efficiency and will not significantly slow down the model.

[0189] Compared with the traditional feature pyramid method, the introduction of GhostBottleneck lightweight bottleneck structure has the following advantages:

[0190] Stronger feature representation capability: GhostBottleneck’s lightweight bottleneck structure can better extract the correlation between features and generate more discriminative feature maps, thereby improving detection accuracy.

[0191] Lower computational complexity: The number of parameters and computational complexity of GhostBottleneck's lightweight bottleneck structure are much lower than those of standard convolution, which can significantly reduce the complexity of the model and make it easier to deploy on embedded devices.

[0192] Higher operating speed: GhostBottleneck's lightweight bottleneck structure has high computational efficiency and will not significantly reduce the model's operating speed, meeting the needs of real-time monitoring.

[0193] Beneficial effects: Improved detection accuracy, reduced false detection and missed detection, and enhanced system stability and robustness. Thanks to higher detection accuracy, the present invention can more effectively identify smoke generated during a fire, reduce false detection and missed detection, and improve system stability and robustness.

[0194] The model complexity and computational complexity are reduced, making it easier to deploy on embedded devices. Due to the reduction in model parameters and computational complexity, the present invention can be more easily deployed on embedded devices, such as surveillance cameras or smart access control systems, to expand application scenarios.

[0195] It meets the needs of real-time monitoring. The efficient Ghost convolution operation ensures the rapid operation of the model and can meet the needs of real-time monitoring of smoke generated during fire.

[0196] 3. Improvements to the dataset preprocessing module:

[0197] Advantages: By using data enhancement and finding the optimal data set division ratio, the data set preprocessing process is optimized and the performance and generalization ability of the network model are improved.

[0198] Beneficial effects: Reduces the risk of overfitting of the model, enhances the stability and generalization ability of the model, and makes the algorithm more suitable for different scenarios and data sets.

[0199] 4. Prediction module optimization:

[0200] Advantages: By optimizing the algorithm and parameter settings, the accuracy and speed of target detection are improved.

[0201] Beneficial effects: Real-time monitoring and data transmission are realized, so that the monitoring results can be transmitted to the monitoring center or related terminal equipment in time, providing timely protection for safety.

[0202] 5. Real-time monitoring of smoke generation during fire:

[0203] Advantages: The algorithm is deployed on a mobile embedded system, and real-time monitoring and data transmission are achieved through an optimized communication module.

[0204] Beneficial effects: The overall performance and efficiency of the system are improved, so that the monitoring results can be transmitted to the monitoring center or related terminal equipment in a timely manner, providing timely protection for safety.

[0205] The purpose of the embodiment of the present invention is to solve the problem of real-time monitoring of smoke when a fire occurs, and to propose a detection method for target objects based on yolo improvement, aiming to improve monitoring accuracy, achieve real-time monitoring and reduce resource consumption, thereby effectively solving the technical problems existing in the existing technical solutions. Specifically, the main process steps of the embodiment of the present invention for image detection may include:

[0206] 1. Image acquisition:

[0207] First, the image or video frame to be recognized is obtained through a camera or other image acquisition device. For videos, the video frames need to be converted into images one by one for processing.

[0208] 2. Image preprocessing:

[0209] Before target detection, images need to be preprocessed to enhance image quality and improve subsequent detection results.

[0210] 3. Feature extraction:

[0211] Feature extraction is one of the key steps in target detection. Its purpose is to extract feature information that can represent the target object from the image. Use deep convolutional neural network (CNN) to extract image features from the image.

[0212] 4. Object Detection:

[0213] After extracting image features, we can perform object detection. The purpose of object detection is to identify whether there is a target object in the image and locate the bounding box of the target object.

[0214] 5. Post-processing:

[0215] After completing the target detection, some post-processing operations are required, such as non-maximum suppression, which is used to remove overlapping detection frames and retain only one optimal detection frame for each target object; another example is bounding box adjustment: fine-tuning the detection frame to improve its accuracy.

[0216] One of the main improvements of the embodiment of the present invention is that it adopts depthwise separable convolution and SE module to enhance feature representation capability, and introduces Ghost convolution to reduce model complexity and computational complexity, thereby improving detection accuracy and speed.

[0217] The existing technical solutions have the following technical problems: low monitoring accuracy: the existing target detection methods are easily interfered in complex backgrounds, resulting in high false detection rate and high missed detection rate, and cannot effectively identify smoke; poor real-time performance: traditional target detection algorithms have large computational complexity and slow running speed, making it difficult to meet the requirements of real-time monitoring; high resource consumption: the existing target detection models have large parameters, require a lot of computing resources, and are difficult to deploy on embedded devices.

[0218] In view of the above problems, the embodiment of the present invention proposes a target detection method and system based on improved YOLO, which has the following advantages: Improve monitoring accuracy: By improving the backbone network and enhancing the feature representation capability, the recognition accuracy of smoke in the event of a fire is improved. Realize real-time monitoring: The GhostBottleneck lightweight bottleneck structure is adopted to replace the standard bottleneck block to further reduce the amount of calculation, reduce the model parameters and calculation amount, significantly improve the detection speed, and meet the real-time monitoring requirements; Reduce resource consumption: The model has fewer parameters and higher operating efficiency. It can be deployed on embedded devices, reducing deployment costs.

[0219] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0220] Reference Figure 3 , is a structural block diagram of an image detection device provided in an embodiment of the present invention, such as Figure 3 As shown, it involves a target object detection model, which includes a depth separable convolution module, a convolutional neural network excitation module and a bottleneck module. The device may specifically include the following modules:

[0221] An image acquisition module 301 is used to acquire an image to be detected;

[0222] A feature map obtaining module 302, configured to extract features from the image using the depthwise separable convolution module to obtain a feature map;

[0223] An enhanced feature map obtaining module 303, configured to process the feature map using the convolutional neural network excitation module to obtain an enhanced feature map;

[0224] An optimized feature map obtaining module 304 is used to process the enhanced feature map using the bottleneck module to obtain an optimized feature map;

[0225] The target object detection module 305 is used to detect whether a target object exists in the image according to the optimized feature map.

[0226] In one embodiment of the present invention, the device further comprises: a preprocessing module, configured to:

[0227] The image to be detected is preprocessed; wherein the preprocessing at least includes resizing and normalization.

[0228] In one embodiment of the present invention, the feature map obtaining module 302 is used to:

[0229] According to the pixel position of each channel of the image and the depth convolution kernel corresponding to the pixel position of each channel, performing depth convolution on the image to obtain a depth feature map;

[0230] The depth feature map is convolved point by point into a feature map according to a point by point convolution kernel.

[0231] In one embodiment of the present invention, the enhanced feature map obtaining module 303 is used to:

[0232] Calculating a channel descriptor for each channel according to feature map information of the feature map by global average pooling; wherein the feature map information includes a height, a width, and a number of channels of the feature map;

[0233] Calculating the channel descriptor of each channel through a first fully connected layer and a first activation function to obtain compressed channel information of each channel;

[0234] Calculate the compressed channel information of each channel through a second fully connected layer and a second activation function to obtain a channel weight of each channel;

[0235] An enhanced feature map is obtained according to the channel weight of each channel and the feature map.

[0236] In one embodiment of the present invention, the optimized feature map obtaining module 304 is used to:

[0237] Performing a first ghost convolution on the enhanced feature map to obtain a first intermediate feature map;

[0238] Performing depth convolution on the first intermediate feature map to obtain a second intermediate feature map;

[0239] Performing a second ghost convolution on the second intermediate feature map to obtain a third intermediate feature map;

[0240] The enhanced feature map and the third intermediate feature map are skip-connected to obtain an optimized feature map.

[0241] In an embodiment of the present invention, the target object at least includes smoke, and the target object detection module 305 is used to:

[0242] Matching the optimized feature graph with features of a target object in a feature library;

[0243] If the optimized feature map matches the features of the target object in the feature library, it is determined that the target object exists in the image;

[0244] The area where the optimized feature map matches the features of the target object in the feature library is taken as a candidate area;

[0245] Classification and bounding box regression are performed on the candidate area including the target object, and a bounding box is generated for the target object in the candidate area and displayed.

[0246] In one embodiment of the present invention, the device further comprises: a post-processing module, configured to:

[0247] Post-processing is performed on the candidate region; wherein the post-processing at least includes non-maximum suppression processing and bounding box adjustment.

[0248] In an embodiment of the present invention, an image to be detected is obtained, a deep separable convolution module of a target object detection model is used to extract features from the image to obtain a feature map, a convolutional neural network excitation module of the target object detection model is used to process the feature map to obtain an enhanced feature map, and a bottleneck module of the target object detection model is used to process the enhanced feature map to obtain an optimized feature map. Finally, whether a target object exists in the image can be detected according to the optimized feature map, and then corresponding processing is performed when the target object is detected in the image. The embodiment of the present invention can effectively reduce the amount of model parameters and the amount of calculation through the deep separable convolution module of the target object detection model, enhance the feature representation capability of the feature map through the convolutional neural network excitation module, improve the detection accuracy and reduce the model complexity and the amount of calculation through the bottleneck module, and avoid the situation of false detection or missed detection of the target object in the image through the comprehensive application of multiple technical solutions in the target object detection model, thereby improving the accuracy of the detection result of the target object.

[0249] As for the above-mentioned device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0250] The embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, it includes a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.

[0251] Memory 403, used for storing computer programs;

[0252] The processor 401 is used to implement any image detection method described in the above embodiments when executing the program stored in the memory 403.

[0253] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0254] The communication interface is used for communication between the above terminal and other devices.

[0255] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0256] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0257] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the image detection method described in any one of the above embodiments.

[0258] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the image detection method described in any one of the above embodiments.

[0259] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0260] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or still includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0261] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0262] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. An image detection method, characterized in that: The invention relates to a target object detection model, wherein the target object detection model comprises a depth separable convolution module, a convolutional neural network excitation module and a bottleneck module, and the method comprises: Acquire an image to be detected; Using the depthwise separable convolution module to extract features from the image to obtain a feature map; Processing the feature map using the convolutional neural network excitation module to obtain an enhanced feature map; Processing the enhanced feature map using the bottleneck module to obtain an optimized feature map; Detect whether a target object exists in the image according to the optimized feature map.

2. The method according to claim 1, characterized in that After acquiring the image to be detected, the method further includes: The image to be detected is preprocessed; wherein the preprocessing at least includes resizing and normalization.

3. The method according to claim 2, characterized in that The depthwise separable convolution module is used to extract features from the image to obtain a feature map, comprising: According to the pixel position of each channel of the image and the depth convolution kernel corresponding to the pixel position of each channel, performing depth convolution on the image to obtain a depth feature map; The depth feature map is convolved point by point into a feature map according to a point by point convolution kernel.

4. The method according to claim 1, characterized in that: The convolutional neural network excitation module is used to process the feature map to obtain an enhanced feature map, including: Calculating a channel descriptor for each channel according to feature map information of the feature map by global average pooling; wherein the feature map information includes a height, a width, and a number of channels of the feature map; Calculating the channel descriptor of each channel through a first fully connected layer and a first activation function to obtain compressed channel information of each channel; Calculate the compressed channel information of each channel through a second fully connected layer and a second activation function to obtain a channel weight of each channel; An enhanced feature map is obtained according to the channel weight of each channel and the feature map.

5. The method according to claim 1, characterized in that The bottleneck module is used to process the enhanced feature map to obtain an optimized feature map, comprising: Performing a first ghost convolution on the enhanced feature map to obtain a first intermediate feature map; Performing depth convolution on the first intermediate feature map to obtain a second intermediate feature map; Performing a second ghost convolution on the second intermediate feature map to obtain a third intermediate feature map; The enhanced feature map and the third intermediate feature map are skip-connected to obtain an optimized feature map.

6. The method according to claim 1, characterized in that The target object at least includes smoke, and detecting whether the target object exists in the image according to the optimized feature map includes: Matching the optimized feature graph with features of a target object in a feature library; If the optimized feature map matches the features of the target object in the feature library, it is determined that the target object exists in the image; The area where the optimized feature map matches the features of the target object in the feature library is taken as a candidate area; Classification and bounding box regression are performed on the candidate area including the target object, and a bounding box is generated for the target object in the candidate area and displayed.

7. The method according to claim 6, characterized in that After classifying and regressing the bounding box of the candidate region including the target object, the following steps are also included: Post-processing is performed on the candidate region; wherein the post-processing at least includes non-maximum suppression processing and bounding box adjustment.

8. An image detection device, characterized in that: A target object detection model is provided, wherein the target object detection model comprises a depth separable convolution module, a convolutional neural network excitation module and a bottleneck module, and the device comprises: An image acquisition module, used for acquiring an image to be detected; A feature map obtaining module, used for extracting features from the image using the depthwise separable convolution module to obtain a feature map; An enhanced feature map obtaining module, used for processing the feature map using the convolutional neural network excitation module to obtain an enhanced feature map; An optimized feature map obtaining module, used for using the bottleneck module to process the enhanced feature map to obtain an optimized feature map; A target object detection module is used to detect whether a target object exists in the image according to the optimized feature map.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.

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