Light-weight cross-medium high-speed small target detection method based on coordinate attention mechanism

By adopting a lightweight, high-speed small object detection method across media based on coordinate attention mechanism in the field of image recognition, the problem that traditional technology is difficult to accurately capture and locate projectiles in real time and achieve higher detection accuracy and recall rate.

CN119478336AActive Publication Date: 2025-02-18NANJING UNIV OF SCI & TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411171325.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2025-02-18
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

In the field of image recognition, especially in high-speed projectile testing, traditional target detection technology is difficult to accurately capture and locate the position and speed of projectiles in real time, and the recognition accuracy of cross-media projectiles is low and the effect is poor.

Method used

A lightweight cross-media high-speed small object detection method based on coordinate attention mechanism is adopted. By building a cross-media projectile inlet test system, a high-speed camera is used to capture projectile images, and data enhancement and preprocess the images. A target detection model consisting of the input layer, the backbone network layer and the head layer is constructed, and the coordinate attention mechanism is added to the head layer, and some ordinary convolutions are replaced with depth separable convolutions to achieve lightweighting of the model.

Benefits of technology

The detection accuracy of the projectile instantaneously enters the water is improved by 2.68%, and the recall rate is increased by 7.31%, while achieving a good balance between detection accuracy, speed and model complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478336A_ABST
    Figure CN119478336A_ABST
Patent Text Reader

Abstract

The invention provides a lightweight cross-medium high-speed small target detection method based on a coordinate attention mechanism, and the method comprises the steps: building a cross-medium projectile water entry test system, capturing a projectile through a high-speed camera, and obtaining a projectile image; a series of data enhancement operations including blurring, affine transformation and overturning are carried out on an original image, a projectile image data set is expanded, and contrast-limited adaptive histogram equalization is carried out on the expanded data set. Constructing a target detection model composed of an input layer, a backbone network layer and a head layer; a coordinate attention mechanism is added to the head layer to improve the recognition precision of the projectile at the moment of entering water; part of common convolution in the network is replaced by deep separable convolution, and the network is lightened; and taking the picture of the projectile water entering process as the input of the target detection model, and generating a target detection result. According to the method, the detection precision of projectile entry into water is effectively improved, and a solution is provided for cross-medium high-speed small target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image recognition and relates to a target detection algorithm, and specifically to a lightweight cross-medium high-speed small target detection method based on a coordinate attention mechanism. Background Art

[0002] In the field of image recognition, the main purpose of target detection is to quickly and accurately identify and locate targets of predefined categories in images. With the continuous development of deep learning technology, target detection algorithms have achieved good results in medium and large targets, but due to the small size, few features, and severe occlusion of small targets, the detection performance still needs to be further improved.

[0003] In the field of high-speed projectile testing, the extremely high speed of the projectile poses significant challenges to detection technology, and the ability to detect and locate the projectile in real time is limited. In addition, the complexity and high cost of projectile experiment layout have led to the scarcity of available projectile data sets. Cross-media projectiles have low recognition accuracy and poor results due to problems such as splash occlusion and the similarity of cavitation characteristics to projectiles.

[0004] The extremely high speed of the projectile makes it difficult for traditional detection technologies (such as light curtain method, radar measurement, mechanical measurement, etc.) to accurately capture and locate the position and speed of the projectile in real time. This is because the response speed and processing power of traditional equipment cannot keep up with the speed of the projectile, resulting in insufficient detection accuracy and reliability. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes a lightweight cross-medium high-speed small target detection method based on coordinate attention mechanism.

[0006] The technical solution of the present invention is: a lightweight cross-medium high-speed small target detection method based on a coordinate attention mechanism, comprising the following steps:

[0007] Step 1: Build a cross-media projectile water entry test system, use a high-speed camera to capture the projectile, and obtain the projectile image.

[0008] Step 2: A series of data augmentation operations are performed on the original image, including blurring, affine transformation and flipping, to expand the projectile image dataset, and then Contrast Limited Adaptive Histogram Equalization (CLAHE) is performed on the expanded dataset.

[0009] Step 3: Construct a target detection model consisting of an input layer, a backbone network layer, and a head layer; add a coordinate attention mechanism to the head layer to improve the recognition accuracy of the moment the projectile enters the water; replace some ordinary convolutions in the network with depthwise separable convolutions to lightweight the network; use the picture of the projectile entering the water as the input of the target detection model to generate target detection results.

[0010] Furthermore, a cross-medium projectile water entry test system is built, and a high-speed camera is used to capture the projectile and obtain the projectile image, including the following steps:

[0011] Step S11, conducting an experiment in an indoor wave tank, adjusting the wavelength and wave steepness of the water surface by finely controlling the visual anti-shock wave tank, and controlling the launch speed of the projectile by adjusting the launch pressure of the light gas launch device;

[0012] Step S12, using a high-speed camera to capture the dynamic process of the projectile entering the water under each working condition;

[0013] Step S13, acquiring a sequence of images of the projectile flying.

[0014] Furthermore, the method for constructing the cross-medium projectile water entry test system is as follows:

[0015] The core area of ​​the test system is a visual anti-shock wave tank, which is used to simulate the environment of projectiles entering the water. The two ends of the tank are respectively provided with a wave-making end and a wave-breaking end. The light gas launch device is installed above one side of the tank to simulate the process of projectiles entering the water. Three high-speed cameras are used in the experiment. The three cameras are installed in parallel in front of the tank. They are all equipped with Nikon AF-S24-85mm f / 3.5-4.5G ED VR multi-purpose lenses. These cameras are controlled by PCC software, which can set the shooting frame rate, frame size, exposure time parameters, and are connected to the mobile PC through an IPV4 network cable.

[0016] In the experiment, the wave height meter was set in the middle area of ​​the tank, installed on the top edge of the transparent tank and connected to the data acquisition system. The experiment also used a NANLUX Evoke 1200 spotlight equipped with a NANLUX FL-35 Fresnel lens and two FS-300 fill lights. The spotlights were hung on the top structure of the experimental scene to provide sufficient lighting for the entire tank area, and the fill lights were placed on both sides of the tank and used together with the 2.4m×2.4m soft light board. The soft light board was placed in front of the fill light and close to the side of the tank.

[0017] Furthermore, a series of data enhancement operations are performed on the original image, including blurring, affine transformation and flipping, to expand the projectile image dataset, and contrast limited adaptive histogram equalization (CLAHE) is performed on the expanded dataset, including the following steps:

[0018] Step S21, blurring, affine transforming and flipping the acquired valid projectile sequence image;

[0019] Step S22, use LabelImg to mark the position of the projectile in the data set. During the labeling process, the three different states of the bullet are defined as "bullet_air", "bullet_junction" and "bullet_water".

[0020] Step S23, before performing projectile image recognition, the original image must be preprocessed, including steps such as noise reduction, enhancement and threshold segmentation. The purpose of noise reduction is to eliminate interference factors in the environment and the noise of the system itself, so as to more accurately extract the projectile shape information. Due to the dim light in the underwater environment, the overall brightness of the image is low, and the projectile blends into the background. The image is enhanced using CLAHE technology to improve image quality and enhance the recognizability of the projectile. CLAHE can perform contrast enhancement in local areas, retain local details and features of the image, and can effectively prevent over-enhancement and saturation.

[0021] Furthermore, a target detection model consisting of an input layer, a backbone network layer, and a head layer is constructed; a coordinate attention mechanism is added to the head layer to improve the recognition accuracy of the moment when the projectile enters the water; some ordinary convolutions in the network are replaced with depthwise separable convolutions to lighten the network; and pictures of the projectile entering the water are used as inputs of the target detection model to generate target detection results, including the following steps:

[0022] Step S31, constructing a target detection model consisting of an input layer, a backbone network layer and a head layer. The input layer is responsible for receiving the original image data and preprocessing it into the tensor form required by the network to meet the input requirements of the model. The backbone network layer is responsible for extracting features from the input image to capture key information and context in the image. The head layer is responsible for receiving the features extracted by the backbone network and performing target detection, and generating target bounding boxes and category probability scores.

[0023] Step S32: The model finally has three outputs. In a convolutional layer before the final output, the input feature tensor is globally averaged pooled in the width and height directions to obtain a feature map with two reduced dimensions. Then, each channel is encoded in the horizontal and vertical directions using the pooling kernel to generate a feature map of spatial information. These attention feature maps are then expanded back to the original spatial dimensions and element-wise multiplied with the input feature map to adjust the feature expression capability of each spatial position, and finally realize the addition of the coordinate attention mechanism.

[0024] Step S33, replace the ordinary convolutional layers in the MP module in the YOLOv7 network and the SPPCSPC module with depthwise separable convolution.

[0025] Compared with the prior art, the present invention has the following significant advantages: 1) An experimental system for projectiles entering water across media is constructed, and the flight images of projectiles are captured using the system. In order to expand the existing projectile flight data set, a new projectile image data set is independently generated; 2) Depthwise separable convolution is used to lightweight the model, and DSC is used to replace traditional convolution, thereby greatly reducing the number of model parameters and the amount of calculation, achieving a good balance between detection accuracy, speed and model complexity; 3) A coordinate attention (CA) mechanism is introduced on the basis of the target detection model, and by integrating position information into channel attention, key spatial information is effectively retained. This method improves the detection accuracy of the projectile entering the water by 2.68% and the recall rate by 7.31%. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a system flow chart of the present invention.

[0027] Figure 2 It is a schematic diagram of the overall experimental arrangement of the present invention.

[0028] Figure 3 This is a picture of a projectile captured by a high-speed camera.

[0029] Figure 4 This is the network structure diagram of the target detection model.

[0030] Figure 5 This is the CA structure diagram.

[0031] Figure 6 Schematic diagram of ordinary convolution.

[0032] Figure 7 Schematic diagram of depth-wise separable convolution.

[0033] Figure 8 Schematic diagram of projectile identification. DETAILED DESCRIPTION

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

[0035] The target detection method used in the present invention can capture the trajectory and position of the projectile in real time, greatly improve the speed and accuracy of detection, adapt to the high-speed movement of the projectile, and overcome the problem of low recognition accuracy caused by splash occlusion and cavitation interference in cross-media detection of traditional methods.

[0036] like Figure 1 As shown, the present invention provides a lightweight cross-medium high-speed small target detection method based on a coordinate attention mechanism, the steps are as follows:

[0037] Step 1: Build a cross-medium projectile water entry test system, use a high-speed camera to capture the projectile, and obtain the projectile image. The overall layout diagram is as follows Figure 2 The specific operations are as follows:

[0038] The test was carried out in an indoor wave tank with internal dimensions of 1000×1800×6000mm. 3 The water depth during the test was 1200mm. Wave-making ends and wave-breaking ends were respectively provided at both ends of the water tank to create and eliminate water waves to ensure the control of experimental conditions. A light gas launch device was installed above one side of the water tank to launch projectiles into the water tank to simulate the process of projectiles entering the water. Three high-speed cameras were used in the experiment. The three cameras were installed in parallel in front of the water tank to shoot the process of projectiles entering the water. They were all equipped with Nikon AF-S24-85mm f / 3.5-4.5G ED VR multi-purpose lenses to ensure clear shooting images. These cameras were controlled by PCC software, which could set shooting frame rate, frame size, exposure time parameters, and were connected to the mobile PC via an IPV4 network cable.

[0039] In the experiment, the wave height meter was set in the middle area of ​​the tank and installed on the top edge of the transparent tank to monitor the wave height in the tank and connect to the data acquisition system to ensure the accuracy of the experimental data. In order to make up for the lack of underwater light, the experiment also used NANLUX Evoke 1200 spotlights equipped with NANLUX FL-35 Fresnel lenses and two FS-300 fill lights. The spotlights are suspended on the top structure of the experimental scene to provide sufficient lighting for the entire tank area, while the fill lights are placed on both sides of the tank and used together with the 2.4m×2.4m soft light board to avoid isolated bright spots caused by direct light, thereby ensuring the quality of the captured images.

[0040] Step 2: A series of data enhancement operations are performed on the original image, including blurring, affine transformation and flipping, to expand the projectile image dataset, and then contrast limited adaptive histogram equalization (CLAHE) is performed on the expanded dataset. The specific operations are as follows:

[0041] The images are divided into three categories according to the medium in which the projectile is located: the projectile is in the air, such as Figure 3 (a) As shown; the moment the projectile enters the water, Figure 3 (b) As shown; the projectile is in the water, Figure 3 (c) as shown.

[0042] Since the insufficient size of the dataset can easily lead to overfitting problems, a series of data enhancement operations were performed on the original images, including blurring, affine transformation, and flipping.

[0043] LabelImg is used to mark the position of the projectile in the dataset. During the labeling process, the three different states of the bullet are defined as "bullet_air", "bullet_junction" and "bullet_water". It can be observed that the bullet in the water is accompanied by cavitation, which is generally in a closed or collapsed state. The bullet at the moment of entering the water is accompanied by splashes and cavitation, and the cavitation is generally in a state of generation and development. In order to enhance the model's ability to distinguish between bullets at the moment of entering the water and bullets in water, cavitation is used as a feature of bullets in water during labeling and is included in the labeled anchor frame, while splashes are used as a feature of bullets at the moment of entering the water.

[0044] Before projectile image recognition, the original image must be preprocessed, including noise reduction, enhancement, and threshold segmentation. The purpose of noise reduction is to eliminate interference factors in the environment and the noise of the system itself, so as to more accurately extract the projectile shape information. Due to the dim light in the underwater environment, the overall brightness of the image is low, and the projectile blends into the background. The image is enhanced using CLAHE technology to improve image quality and enhance the recognizability of the projectile. CLAHE can perform contrast enhancement in local areas, retain local details and features of the image, and can effectively prevent over-enhancement and saturation.

[0045] Step 3: Build a target detection model consisting of an input layer, a backbone network layer, and a head layer; add a coordinate attention mechanism to the head layer to improve the recognition accuracy of the moment when the projectile enters the water; replace some ordinary convolutions in the network with depthwise separable convolutions to lighten the network; use the picture of the projectile entering the water as the input of the target detection model to generate the target detection result. The specific operations are as follows:

[0046] The input layer is responsible for receiving the original image data and preprocessing it into the tensor form required by the network to meet the input requirements of the model. The backbone network layer is responsible for extracting features from the input image to capture the key information and context in the image. The head layer is responsible for receiving the features extracted by the backbone network and performing target detection, and generating target bounding boxes and category probability scores. The structure of the model is as follows Figure 4 shown.

[0047] Then, a coordinate attention mechanism (CA) is added to the head layer of the model. The structure of CA is as follows: Figure 5 As shown. Assume that the feature tensor of the input CA is X, with a size of C×H×W, and perform global average pooling in the width and height directions to obtain feature maps of sizes C×H×1 and C×1×W respectively. Then use the pooling kernel to encode each channel of X in the horizontal and vertical directions. The basic principle is as follows:

[0048]

[0049] In the formula, z c is the output of the cth channel after encoding; x c is the input of the cth channel; represents the output of the cth channel with height h; Represents the output of the cth channel with width w.

[0050] By merging the two parallel stages, transposing the width and height to the same dimension and stacking them, using 1×1 convolution to compress the channel dimension, and then using normalization and nonlinear activation to encode spatial information, we can get the intermediate feature map f, which is calculated as follows:

[0051] f=δ(F′([z h ,z w ])) (4)

[0052] In the formula, [,] represents the concatenation operation along the spatial dimension, δ is the nonlinear activation function, and f∈R C×H×W Intermediate feature maps that encode spatial information for both horizontal and vertical directions.

[0053] Split f into two separate tensors along the spatial dimension. Transform F using two 1×1 convolutions H and F W f h and f W Transformed into a tensor with the same number of channels as the input X, the horizontal and vertical attention weights g of the input X are obtained h and g w :

[0054] g h =σ(F h (f h )) (5)

[0055] g w =σ(F w (f w )) (6)

[0056] In the formula, F h and F w is the convolution operation in the horizontal and vertical directions. The output of the coordinate attention block can be expressed as:

[0057]

[0058] In the formula, y c (i,j) represents the output feature map, x c (i,j) represents the input feature map, represents the horizontal attention weight of height i on the c-th channel, represents the vertical attention weight of width j on the c-th channel.

[0059] Subsequently, the ordinary convolution of the MP (Max Pooling) module and the SPPCSPC (Spatial Pyramid Pooling, CrossStage Partial Channel) module is replaced with a depthwise separable convolution, which makes the network lightweight and improves the real-time performance of detection. The reduction in the computational complexity of the depthwise separable convolution is a factor of comparison between ordinary convolution and deep convolution. times, greatly reducing the amount of calculation. The ordinary convolution process is as follows Figure 6 As shown, the depth-wise separable convolution is Figure 7 As shown. Figure 6 , Figure 7 It can be seen that the number of floating-point operations of ordinary convolution FLPOS_Conv and the number of floating-point operations of depth-separable convolution FLOPS_DSC can be calculated by the formula:

[0060] FLOPS_Conv = D K ·D K ·M·N·D F ·D F (1)

[0061] FLOPS_DSC = D K ·D K ·M·D F ·D F +M·N·D F ·D F (2)

[0062] In formula (1) and (2), D K ·D K is the size of the convolution kernel, M and N are the number of input and output channels respectively, and D F ·D F is the size of the output feature map.

[0063] Finally, the constructed data set is used as the input of the model, and the model is iterated 140 times. Then the dynamic process of the projectile entering the water to be detected is input into the trained model, and the detection image of the projectile entering the water process can be obtained, such as Figure 8 shown.

[0064] In summary, the high-speed projectile detection model constructed by the present invention achieves a good balance between detection accuracy, speed and model complexity, and provides a solution for cross-medium high-speed small target detection.

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

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

Claims

1. A lightweight cross-media high-speed small target detection method based on coordinate attention mechanism, characterized in that: The following steps are involved: Step 1: Build a cross-medium projectile water entry test system, use a high-speed camera to capture the projectile, and obtain the projectile image; Step 2: A series of data augmentation operations are performed on the original image, including blurring, affine transformation and flipping, to expand the projectile image dataset, and contrast-limited adaptive histogram equalization is performed on the expanded dataset; Step 3: Construct a target detection model consisting of an input layer, a backbone network layer, and a head layer; add a coordinate attention mechanism to the head layer to improve the recognition accuracy of the moment the projectile enters the water; replace some ordinary convolutions in the network with depthwise separable convolutions to lightweight the network; use the picture of the projectile entering the water as the input of the target detection model to generate target detection results.

2. The lightweight cross-medium high-speed small target detection method based on coordinate attention mechanism according to claim 1 is characterized in that: Build a cross-media projectile water entry test system, use a high-speed camera to capture the projectile, and obtain the projectile image; including the following steps: Step S11, adjusting the wavelength and wave steepness of the water surface by finely controlling the visualized anti-shock wave water tank, and controlling the launch speed of the projectile by adjusting the launch pressure of the light gas launch device; Step S12, using a high-speed camera to capture the dynamic process of the projectile entering the water under each working condition; Step S13, acquiring a sequence of images of the projectile flying.

3. The lightweight cross-medium high-speed small target detection method based on coordinate attention mechanism according to claim 2 is characterized in that: The method for constructing the cross-medium projectile water entry test system is as follows: The core area of ​​the test system is a visual anti-shock wave tank, which is used to simulate the environment of projectiles entering the water. The two ends of the tank are respectively provided with a wave-making end and a wave-breaking end. The light gas launch device is installed above one side of the tank to simulate the process of projectiles entering the water. The experiment uses three high-speed cameras, which are installed in parallel in front of the tank. They are all equipped with Nikon AF-S24-85mm f / 3.5-4.5G ED VR multi-purpose lenses. These cameras are controlled by PCC software, which can set the shooting frame rate, frame size, exposure time parameters, and are connected to the mobile PC through an IPV4 network cable. In the experiment, the wave height meter was set in the middle area of ​​the tank, installed on the top edge of the transparent tank and connected to the data acquisition system. The experiment also used a NANLUX Evoke 1200 spotlight equipped with a NANLUX FL-35 Fresnel lens and two FS-300 fill lights. The spotlight was suspended on the top structure of the experimental scene, and the fill lights were placed on both sides of the tank and used together with the 2.4m×2.4m soft light board. The soft light board was placed in front of the fill light and close to the side of the tank.

4. The lightweight cross-medium high-speed small target detection method based on coordinate attention mechanism according to claim 1 is characterized in that: A series of data augmentation operations, including blurring, affine transformation and flipping, were performed on the original image to expand the projectile image dataset, and contrast-limited adaptive histogram equalization was performed on the expanded dataset, including the following steps: Step S21, blurring, affine transformation and flipping the acquired valid projectile sequence images to achieve projectile data set expansion; Step S22, using LabelImg to mark the position of the projectile in the data set. During the labeling process, the three different states of the bullet are defined as "bullet_air", "bullet_junction" and "bullet_water" respectively; Step S23, before performing projectile image recognition, the original image is preprocessed, including noise reduction, enhancement and threshold segmentation steps.

5. The lightweight cross-medium high-speed small target detection method based on coordinate attention mechanism according to claim 1 is characterized in that: Construct a target detection model consisting of an input layer, a backbone network layer, and a head layer; add a coordinate attention mechanism to the head layer to improve the recognition accuracy of the moment the projectile enters the water; replace some ordinary convolutions in the network with depthwise separable convolutions to lightweight the network; The image of the projectile entering the water is used as the input of the target detection model to generate the target detection result, including the following steps: Step S31, constructing a target detection model consisting of an input layer, a backbone network layer and a head layer; the input layer is responsible for receiving the original image data and preprocessing it into the tensor form required by the network to meet the input requirements of the model; the backbone network layer is responsible for extracting features from the input image to capture key information and context in the image; the head layer is responsible for receiving the features extracted by the backbone network and performing target detection, and generating target bounding boxes and category probability scores; Step S32: The model finally has three outputs. In a convolutional layer before the final output, the input feature tensor is globally averaged pooled in the width and height directions to obtain a feature map with two reduced dimensions. Then, each channel is encoded in the horizontal and vertical directions using the pooling kernel to generate a feature map of spatial information. These attention feature maps are then expanded back to the original spatial dimensions and element-wise multiplied with the input feature map to adjust the feature expression capability of each spatial position, and finally realize the addition of the coordinate attention mechanism. Step S33, replace the ordinary convolutional layers in the MP module in the YOLOv7 network and the SPPCSPC module with depthwise separable convolution.

Citation Information

Patent Citations

  • Underwater three-dimensional trajectory fitting method based on Kalman filtering and trajectory equation fusion

    CN114087932A

  • Lightweight home small target detection model construction method based on improved YOLOv8

    CN116994114A

  • Convolutional neural network-based real-time low-illumination image target detection method

    CN117115616A

  • Lightweight convolutional neural network training method and system for water surface target detection

    CN117151186A

  • Lightweight overwater target detection method and device and medium

    CN117649544A