A target detection method, device and computer storage medium

By combining the target detection network and the motion detection network, and using the attention module and the super-resolution module to extract features, we solve the problems of poor image quality and small target recognition accuracy in the existing technology, and achieve high accuracy for multiple targets in complex scenes. degree detection.

CN118279576BActive Publication Date: 2024-09-06ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410713699.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-09-06
Estimated Expiration
2044-06-04

AI Technical Summary

Technical Problem

Existing image target detection algorithms have poor recognition accuracy when the image quality is poor or the target occupies a small area in the image, making it difficult to achieve real-time processing and accurate extraction of multiple targets in complex scenes.

Method used

The target detection network and the motion detection network are combined to obtain the first and second target detection frames and fuse them to generate a foreground image, and use the attention module and the super-resolution module to extract high-level features and detailed features, output the target classification results, and combine The super-resolution module restores the details of the results to improve recognition accuracy.

Benefits of technology

It effectively extracts targets with smaller pixels and lower image contrast from the background, improves the accuracy and robustness of target detection, and significantly improves recognition accuracy compared to traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118279576B
    Figure CN118279576B
Patent Text Reader

Abstract

The present application discloses a target detection method, device and computer storage medium, the target detection method comprising: obtaining an image to be detected; obtaining a first target detection frame of the image to be detected through a target detection network; obtaining a second target detection frame of the image to be detected through a motion detection network; obtaining a foreground image of the image to be detected according to the first target detection frame and the second target detection frame; inputting the foreground image into a target classification network, and outputting a target classification result of the image to be detected. Through the above method, the foreground target is effectively extracted from the background. Compared with traditional target detection, the target detection method of the present application can detect targets with smaller target pixels and lower image contrast.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of target detection, and in particular to a target detection method, device and computer storage medium. Background Art

[0002] Image object detection, also known as object extraction, is a type of image segmentation based on the geometric and statistical features of the object. It combines the segmentation and recognition of the object into one, and its accuracy and real-time performance are important capabilities of the entire system. Automatic object extraction and recognition are particularly important in complex scenes when multiple objects need to be processed in real time.

[0003] Current image target detection algorithms mostly use deep neural network algorithms, which have high requirements for image quality. When the image quality is poor and the target occupies a small area in the image, the recognition accuracy is poor. Summary of the invention

[0004] The present application provides a target detection method, device and computer storage medium.

[0005] The present application provides a target detection method, which includes: acquiring an image to be detected; acquiring a first target detection frame of the image to be detected through a target detection network; acquiring a second target detection frame of the image to be detected through a motion detection network; acquiring a foreground image of the image to be detected based on the first target detection frame and the second target detection frame; inputting the foreground image into a target classification network, and outputting a target classification result of the image to be detected.

[0006] Among them, obtaining the foreground image of the image to be detected based on the first target detection frame and the second target detection frame includes: obtaining the first target detection frame and the second target detection frame of the image to be detected; judging whether the intersection and union ratio of the first target detection frame and the second target detection frame of the image to be detected is greater than or equal to a preset threshold; if so, fusing the first target detection frame and the second target detection frame to obtain a fused target detection frame of the image to be detected; and obtaining the foreground image of the image to be detected based on the fused target detection frame.

[0007] Among them, the image to be detected includes at least two frames of images to be detected; the obtaining of the second target detection frame of the image to be detected through the motion detection network includes: in response to the existence of a second target detection frame in the previous frame of the image to be detected, the second target detection frame of the previous frame of the image to be detected and the current frame of the image to be detected are input into the motion detection network to generate the second target detection frame of the current frame of the image to be detected.

[0008] The target classification network includes a super-resolution module; before outputting the target classification result of the image to be detected, the target detection method further includes: inputting the foreground image into the super-resolution module, interpolating the foreground image to a preset pixel area; extracting detail features of the interpolated foreground image through the residual convolution block in the super-resolution module;

[0009] Among them, the target detection network includes an attention module and a fusion module; the attention module is used to extract high-level features from the low-level features of the image to be detected, and the fusion module is used to fuse the low-level features with the high-level features to output the image features; the trunk network part of the attention module includes a residual convolution block, and the branch network part includes a downsampling module and an upsampling module; the attention module fuses the trunk features extracted by the trunk network part with the context features extracted by the branch network part to obtain attention weighted features, and fuses the attention weighted features with the trunk features to obtain the high-level features.

[0010] Among them, the target detection method also includes: inputting multiple consecutive frames of training images into the motion detection network to obtain the predicted target detection frame and predicted confidence of each training image; using the predicted target detection frame and the real target detection frame, calculating the position loss of each training image; using the predicted confidence and the real confidence, calculating the confidence loss of each training image; training the motion detection network according to the predicted confidence and the real confidence of the multiple consecutive frames of training images.

[0011] Among them, after outputting the target classification result of the current frame image, the target detection method also includes: in response to the target classification result being a preset target, setting a pre-reporting position according to the position of the preset target; acquiring a historical image group before the current frame image, and detecting target association information of the preset target based on the historical image group; detecting subsequent images after the current frame image, and outputting the target association information when the preset target is detected at the pre-reporting position of the subsequent image.

[0012] Among them, after detecting the subsequent image after the current frame image, the target detection method also includes: when the preset target is detected at the pre-reported position of the subsequent image, calculating the cosine similarity between the feature vector of the preset target of the subsequent image and the false alarm feature vector in the preset image database; when the cosine similarity is lower than a preset threshold, outputting the target association information; when the cosine similarity is higher than the preset threshold, deleting the target association information.

[0013] To solve the above technical problems, the present application proposes a target detection device, which includes a processor and a memory; a computer program is stored in the memory, and the processor is used to execute the computer program to implement the steps of the above target detection method.

[0014] In order to solve the above technical problem, the present application proposes a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed, the steps of the above target detection method are implemented.

[0015] Different from the prior art, the beneficial effects of the present application are: the target detection device obtains the image to be detected; obtains the first target detection frame of the image to be detected through the target detection network; obtains the second target detection frame of the image to be detected through the motion detection network; obtains the foreground image of the image to be detected according to the first target detection frame and the second target detection frame; inputs the foreground image into the target classification network, and outputs the target classification result of the image to be detected. In the above manner, the foreground target is effectively extracted from the background. Compared with traditional target detection, the target detection method of the present application can detect targets with smaller target pixels and lower image contrast. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 It is a flowchart of the first embodiment of the target detection method provided by the present application;

[0018] Figure 2 It is a schematic diagram of the overall process of the target detection method provided by this application;

[0019] Figure 3 It is a schematic diagram of the structure of the target detection network with an attention module provided in this application;

[0020] Figure 4 is a schematic diagram of the attention module structure provided by this application;

[0021] Figure 5 It is a schematic diagram of the structure of the sampling module in the attention module provided by this application;

[0022] Figure 6 It is a schematic diagram of super-resolution module training provided by this application;

[0023] Figure 7This is a schematic diagram of the image restoration effect of the super-resolution module provided by this application;

[0024] Figure 8 is a flow chart of a second embodiment of the target detection method provided by the present application;

[0025] Fig. 9 is a schematic diagram of an embodiment of a target detection result provided by the present application;

[0026] Fig.10 is a schematic diagram of another embodiment of the target detection result provided by the present application;

[0027] Fig.11 is a structural schematic diagram of an embodiment of a target detection device provided by the present application;

[0028] Fig.12 It is a structural diagram of an embodiment of a computer storage medium provided by the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] This application proposes a target detection method. For details, please refer to Figure 1 and Figure 2 , Figure 1 is a flow chart of the first embodiment of the target detection method provided by the present application, Figure 2 It is a schematic diagram of the overall process of the target detection method provided in this application.

[0031] The target detection method of the present application is applied to a target detection device, wherein the target detection device of the present application can be a server, or a system composed of a server and a local terminal cooperating with each other. Accordingly, the various parts of the target detection device, such as various units, subunits, modules, and submodules, can all be set in the server, or can be set in the server and the local terminal respectively.

[0032] Furthermore, the above-mentioned server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules, such as software or software modules for providing distributed servers, or it can be implemented as a single software or software module, which is not specifically limited here. In some possible implementations, the target detection method of the embodiment of the present application can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0033] like Figure 1 As shown, the target detection method of this embodiment specifically includes the following steps:

[0034] Step S11: Acquire the image to be detected.

[0035] Step S12: Obtain a first target detection frame of the image to be detected through the target detection network.

[0036] See also Figure 2 The target detection device inputs the image to be detected into the target detection network to obtain a first target detection frame. In the embodiment of the present application, the target detection network can be any convolutional neural network.

[0037] In order to improve the accuracy of target detection, this application adds an attention module to the target detection network. The attention module is used to extract high-level features from the low-level features of the image to be detected, and the fusion module is used to fuse the low-level features with the high-level features to output image features.

[0038] This application takes a network structure as an example. Figure 3-Figure 5 , Figure 3 is a schematic diagram of the structure of the target detection network with an attention module provided in this application, Figure 4 is a schematic diagram of the attention module structure provided by this application, Figure 5 It is a structural diagram of the sampling module in the attention module provided in this application.

[0039] like Figure 3 As shown in the figure, the target detection network with the attention module includes: slice layer, concatenation layer, convolution layer, bottleneck layer, cross-stage bottleneck layer (BottleNeckCSP), pooling layer (SPP layer), attention module and fusion module.

[0040] Among them, BottleNeckCSP is a bottleneck layer type commonly used in neural networks. It can improve the performance and efficiency of target detection networks by combining bottleneck structure and cross-stage partial connections.

[0041] like Figure 4 As shown in the figure, the main network of the attention module includes residual convolution blocks, normalization layers (norm layers) and activation function layers, and the branch network includes downsampling modules and upsampling modules. The attention module fuses the main features extracted by the main network with the context features extracted by the branch network to obtain attention weighted features, and fuses the attention weighted features with the main features to obtain high-level features.

[0042] The backbone network contains two residual convolution blocks, each of which consists of a BN layer (batch normalization layer), an activation function and a 1*1 convolution layer.

[0043] The branch network is first downsampled and then upsampled through residual connections to extract and fuse more contextual features. The features output by the branch network are multiplied by the features output by the trunk network to obtain the attention-weighted features. The attention-weighted features are summed with the features of the trunk to obtain the final channel attention features.

[0044] like Figure 5 As shown, the downsampling module includes a pooling layer and a residual convolution block, and the upsampling module includes a bilinear difference and a residual module.

[0045] It should be noted that in the embodiments of the present application, the slicing layer, splicing layer, convolution layer, bottleneck layer, residual convolution block, convolution layer, pooling layer, and bilinear interpolation have the same usage methods and functions as those in the prior art and will not be repeated here.

[0046] The multi-scale features obtained by adding the attention module can be used more reasonably, enabling accurate identification of small targets.

[0047] In one embodiment of the present application, there is a spatial difference between the target feature map of the channel attention feature obtained by the attention module and the context feature map involved in the fusion. Therefore, the fusion module will first deconvolute the context feature part so that it can align with the target feature map on the feature map H (height), W (width) and C (number of channels), and then normalize and activate it and splice it with the target feature map to obtain a fused feature map (i.e., high-level feature). Finally, the backbone network part sends the fused feature map that integrates the context feature and the target attention feature to the bottleneck layer (Neck layer) for subsequent network model inference analysis.

[0048] Step S13: Obtain a second target detection frame of the image to be detected through a motion detection network.

[0049] In one embodiment of the present application, the motion detection network uses a gated recurrent unit network (GRU), and the gated recurrent unit network (GRU) is used to extract temporal features of continuous multi-frame image features.

[0050] The gated recurrent model (GRU) is good at combining time series features for prediction, and the structure of the gated recurrent model (GRU) is a lightweight structure.

[0051] In one embodiment of the present application, the image to be detected includes at least two frames of images to be detected. In response to the existence of a second target detection frame in the previous frame of the image to be detected, the target detection device inputs the second target detection frame of the previous frame of the image to be detected and the current frame of the image to be detected into the motion detection network to generate a second target detection frame of the current frame of the image to be detected.

[0052] Specifically, when a target object is detected in the previous frame of the image to be detected, the target detection device predicts the current frame based on the target detection frame in the previous frame of the image to be detected, and obtains the target detection frame of the current frame, that is, the current frame image refers to the target detection frame of the previous frame image to generate the target detection frame of the target object in the current frame.

[0053] Through the above method, time series characteristics can be effectively utilized to improve computing efficiency and prediction accuracy.

[0054] In a specific embodiment of the present application, the object detection device trains the motion detection network in the following manner:

[0055] The target detection device inputs multiple consecutive frames of training images into a motion detection network to obtain a predicted target detection frame and a predicted confidence of each training image; uses the predicted target detection frame and the true target detection frame to calculate the position loss of each training image; uses the predicted confidence and the true confidence to calculate the confidence loss of each training image; and trains the motion detection network according to the predicted confidence and the true confidence of multiple consecutive frames of training images.

[0056] It should be noted that the motion detection network in the embodiment of the present application does not train the category of specific detection targets, and is mainly concerned with the detection of foreground targets. Therefore, the category loss part is discarded, and the motion detection network calculates the loss of multiple frames of input images. The loss function formula is:

[0057]

[0058] in, Represents multiple frame input, represents the position loss of a single frame, Represents the confidence loss of a single frame.

[0059] Through the above method, the changes are predicted using temporal features without being restricted by the specific target type. The foreground target can be effectively extracted from the background. Compared with the traditional target detection network, it can detect targets with smaller target pixels and lower picture contrast.

[0060] Step S14: Acquire a foreground image of the image to be detected according to the first target detection frame and the second target detection frame.

[0061] Specifically, the target detection device obtains a first target detection frame and a second target detection frame of the image to be detected; determines whether the intersection and union ratio of the first target detection frame and the second target detection frame of the image to be detected is greater than or equal to a preset threshold; if so, fuses the first target detection frame and the second target detection frame to obtain a fused target detection frame of the image to be detected; and obtains a foreground image of the image to be detected based on the fused target detection frame.

[0062] If not, a foreground image of the first target detection frame and a foreground image of the second target detection frame are generated respectively.

[0063] Through the above method, it is easier to effectively extract the foreground target from the background.

[0064] Step S15: Input the foreground image into the target classification network and output the target classification result of the image to be detected.

[0065] Among them, the motion detection network has good robustness for detecting targets with low discrimination and small pixel area, but when the target pixels are small, the accuracy of category classification is difficult to guarantee. Therefore, the embodiment of the present application further constructs a super-resolution module to restore the details of the target detection results, thereby further ensuring the accuracy of the target classification results.

[0066] For details, please see Figure 6-Figure 7 , Figure 6 This is a schematic diagram of super-resolution module training provided by this application. Figure 7 This is a schematic diagram of the image restoration effect of the super-resolution module provided in this application.

[0067] The target detection device inputs the foreground image into the super-resolution module, interpolates the foreground image to a preset pixel area, and extracts the detail features of the interpolated foreground image through the residual convolution block in the super-resolution module.

[0068] Specifically, taking a foreground image with a pixel area of ​​32*32 as an example, the target detection device expands the image with a pixel area of ​​32*32 into an image with a pixel area of ​​128*128 through bicubic interpolation.

[0069] Furthermore, the target detection device constructs a three-layer residual convolution block to extract and restore features of the expanded foreground image, and calculates the reconstruction loss of the expanded foreground image and the initial foreground image through a SmoothL1 loss function (smooth L1 loss function).

[0070] like Figure 7As shown, the super-resolution module is compatible with any target detection network. The present application does not limit the type of target classification network. The super-resolution module can sharpen edge contours and ultimately improve the classification accuracy of the target classification network.

[0071] Furthermore, this application also proposes an implementation, please refer to Figure 8 , Figure 8 It is a flowchart of the second embodiment of the target detection method provided by the present application.

[0072] like Figure 8 As shown, the specific steps are as follows:

[0073] Step S21: In response to the target classification result being a preset target, a pre-reporting position is set according to the position of the preset target.

[0074] Specifically, in a specific embodiment of the present application, taking the detection of spilled objects on the road as an example, in an application scenario, the spilled object situation needs to be reported.

[0075] See also Fig. 9 , Fig. 9 1 is a schematic diagram of an embodiment of the target detection result provided by the present application. When the target classification result is a scattered object, the current position of the scattered object is set as the pre-reporting position, and the final report is not performed at this time.

[0076] Step S22: Acquire a historical image group before the current frame image, and detect target association information of a preset target based on the historical image group.

[0077] The historical image group is a continuous multi-frame image before the current frame image within a preset time, and the target associated information is the relevant information of the associated object that generates the scattered objects. The associated object may be, for example, a truck, a sprinkler, a robot, etc.

[0078] In a specific embodiment of the present application, the target detection device detects the target association information of the preset target by determining whether the position of the corresponding associated object and the pre-reported position coordinates meet a preset intersection-and-union ratio threshold.

[0079] Furthermore, the target detection device outputs target association information of the top n associated objects in the association degree ranking, wherein the target association information includes but is not limited to associated target type, I frame, P frame, etc.

[0080] Step S23: Detect the subsequent image after the current frame image, and output the target association information when the preset target is detected at the pre-reported position of the subsequent image.

[0081] Specifically, the target detection device detects subsequent images within a preset time after the current frame image to determine whether there are still spilled objects in the pre-reported position in the subsequent images. If so, the associated object and its target associated information are output.

[0082] Through the above method, the accuracy of target detection is improved by double detection.

[0083] In one embodiment of the present application, after a subsequent image after a current frame image is detected, when a preset target is detected at a pre-reported position of the subsequent image, the cosine similarity between a feature vector of the preset target of the subsequent image and a false alarm feature vector in a preset image database is calculated; when the cosine similarity is lower than a preset threshold, target association information is output; when the cosine similarity is higher than the preset threshold, the target association information is deleted.

[0084] Before the target or approximate target triggers the reporting condition, the cosine similarity between the feature vector of the preset target of the subsequent image and the false alarm feature vector in the preset image database is calculated. If the similarity exceeds the threshold, the target related information is filtered to reduce the false alarm rate, optimize the accuracy of target detection, and improve the robustness. Another embodiment of the final target detection result is as follows: Fig.10 shown.

[0085] In an embodiment of the present application, the target detection device can also effectively locate and collect false alarm data based on the saved frame numbers and incorporate them into the training set, so as to facilitate long-term iterative updates of the method.

[0086] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0087] In order to implement the target detection method of the above embodiment, the present application also proposes a target detection device, for details, please refer to Fig.11 , Fig.11 It is a structural schematic diagram of an embodiment of a target detection device provided by the present application.

[0088] The target detection device 600 of this embodiment includes a processor 61 , a memory 62 , an input / output device 63 , and a bus 64 .

[0089] The processor 61 , the memory 62 , and the input / output device 63 are respectively connected to the bus 64 . The memory 62 stores program data. The processor 61 is used to execute the program data to implement the collective error correction optimization method described in the above embodiment.

[0090] The memory 62 is used to store program data, and the processor 61 is used to execute the program data to implement the target detection method described in the above embodiment.

[0091] In this embodiment, the processor 61 may also be referred to as a CPU (Central Processing Unit). The processor 61 may be an integrated circuit chip having the ability to process signals. The processor 61 may also be a general-purpose processor, 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, or discrete hardware components. A general-purpose processor may be a microprocessor or the processor 61 may also be any conventional processor, etc.

[0092] The present application also provides a computer storage medium, such as Fig.12 As shown, Fig.12 It is a structural diagram of an embodiment of a computer storage medium provided in the present application. The computer storage medium 700 is used to store a computer program 71. When the computer program 71 is executed by a processor, it is used to implement the target detection method described in the above embodiment.

[0093] The present application also provides a computer program product, wherein the computer program product includes a computer program, and the computer program is operable to enable a computer to execute the target detection method as described in the embodiment of the present application. The computer program product can be a software installation package.

[0094] The target detection method described in the above embodiment of the present application, when implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0095] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application. The above description is only an implementation method of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A target detection method, characterized in that: The target detection method comprises: Acquire the image to be detected; Acquire a first target detection frame of the image to be detected through a target detection network; Acquire a second target detection frame of the image to be detected through a motion detection network; Acquire a foreground image of the image to be detected according to the first target detection frame and the second target detection frame; Inputting the foreground image into a target classification network, and outputting a target classification result of the image to be detected; The image to be detected includes at least two frames of images to be detected; The acquiring of a second target detection frame of the image to be detected through a motion detection network comprises: In response to the presence of a second target detection frame in the previous frame of the image to be detected, the second target detection frame of the previous frame of the image to be detected and the current frame of the image to be detected are input into the motion detection network to generate the second target detection frame of the current frame of the image to be detected; The target classification network includes a super-resolution module; Before outputting the target classification result of the image to be detected, the target detection method further includes: Inputting the foreground image into the super-resolution module, and interpolating the foreground image to a preset pixel area; Extracting detailed features of the interpolated foreground image through the residual convolution block in the super-resolution module; After outputting the target classification result of the current frame image, the target detection method further includes: In response to the target classification result being a preset target, setting a pre-reporting position according to the position of the preset target, wherein the preset target is a spilled object; Acquire a historical image group before the current frame image, and detect target association information of the preset target based on the historical image group, wherein the target association information includes an associated target type, an I frame and / or a P frame; A subsequent image after the current frame image is detected, and when the preset target is detected at the pre-reported position of the subsequent image, the target association information is output.

2. The target detection method according to claim 1, characterized in that: The step of obtaining the foreground image of the image to be detected according to the first target detection frame and the second target detection frame includes: Acquire a first target detection frame and a second target detection frame of the image to be detected; Determine whether an intersection-over-union ratio of a first target detection frame and a second target detection frame of the image to be detected is greater than or equal to a preset threshold; If yes, fuse the first target detection frame and the second target detection frame to obtain a fused target detection frame of the image to be detected; A foreground image of the image to be detected is obtained according to the fused target detection frame.

3. The target detection method according to claim 1, characterized in that: The target detection network includes an attention module and a fusion module; the attention module is used to extract high-level features from low-level features of the image to be detected, and the fusion module is used to fuse the low-level features with the high-level features to output image features; The main network part of the attention module includes a residual convolution block, and the branch network part includes a downsampling module and an upsampling module; The attention module fuses the trunk features extracted by the trunk network part with the context features extracted by the branch network part to obtain attention weighted features, and fuses the attention weighted features with the trunk features to obtain the high-level features.

4. The target detection method according to claim 1, characterized in that: The target detection method further includes: Inputting multiple frames of continuous training images into the motion detection network to obtain a predicted target detection frame and a predicted confidence of each training image; Calculate the position loss of each training image using the predicted target detection frame and the real target detection frame; Calculating the confidence loss of each training image using the predicted confidence and the true confidence; The motion detection network is trained according to the predicted confidence and the true confidence of the continuous multiple frames of training images.

5. The target detection method according to claim 1, characterized in that: After detecting the subsequent image after the current frame image, the target detection method further includes: When the preset target is detected at the pre-reported position of the subsequent image, calculating the cosine similarity between the feature vector of the preset target of the subsequent image and the false alarm feature vector in the preset image database; When the cosine similarity is lower than a preset threshold, outputting the target association information; When the cosine similarity is higher than the preset threshold, the target association information is deleted.

6. A target detection device, characterized in that: The target detection device includes a processor and a memory; the memory stores a computer program, and the processor is used to execute the computer program to implement the steps of the target detection method as described in any one of claims 1 to 5.

7. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed, the steps of the target detection method according to any one of claims 1 to 5 are implemented.