A lightweight cross-medium high-speed small target detection method based on coordinate attention mechanism

By constructing a cross-medium projectile water entry test system and a lightweight target detection model based on coordinate attention mechanism, the problems of insufficient real-time performance and accuracy in high-speed projectile detection are solved, and efficient identification of projectiles at the moment of water entry is achieved.

CN119478336BActive Publication Date: 2025-12-30NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies have insufficient real-time detection and positioning capabilities in high-speed projectile detection, especially in cross-media environments where recognition accuracy is low. Furthermore, datasets are scarce and the response speed of traditional equipment cannot keep up with the projectile speed.

Method used

A cross-medium projectile water entry test system was constructed. High-speed cameras were used to capture projectile images, and data augmentation and preprocessing were performed. A lightweight target detection model based on coordinate attention mechanism was built, and depthwise separable convolution was used to replace ordinary convolution to improve recognition accuracy and speed.

Benefits of technology

It achieves a 2.68% improvement in detection accuracy and a 7.31% improvement in recall rate at the moment the projectile enters the water. It adapts to the high-speed movement of the projectile and overcomes the problem of low recognition accuracy caused by water splash obstruction and cavitation interference, resulting in a significant improvement in detection speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478336B_ABST
    Figure CN119478336B_ABST
Patent Text Reader

Abstract

The application provides a lightweight cross-medium high-speed small target detection method based on a coordinate attention mechanism, builds a cross-medium projectile water entry test system, uses a high-speed camera to capture the projectile, and obtains a projectile image. A series of data enhancement operations are performed on the original image, including blurring, affine transformation and flipping, the projectile image dataset is expanded, and the expanded dataset is subjected to contrast limited adaptive histogram equalization. A target detection model composed 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 projectile water entry moment; part of the ordinary convolution in the network is replaced with a depth separable convolution to lighten the network; and the pictures of the projectile water entry process are taken as the input of the target detection model to generate a target detection result. The application effectively improves the detection accuracy of the projectile water entry and provides a solution for cross-medium high-speed small target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image recognition technology and relates to target detection algorithms, specifically a lightweight, high-speed, cross-media small target detection method based on coordinate attention mechanism. Background Technology

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

[0003] In the field of high-speed projectile testing, the extremely high speed of projectiles poses significant challenges to detection technology, limiting the ability to detect and locate projectiles in real time. Furthermore, the complexity and high cost of projectile experiment setups lead to a scarcity of usable projectile datasets. Cross-medium projectiles suffer from low identification accuracy and poor performance due to issues such as water splash obstruction and the similarity between cavitation characteristics and projectiles.

[0004] The extremely high speed of projectiles makes it difficult for traditional detection techniques (such as light curtain methods, radar measurement, and mechanical measurement) to accurately capture and locate the projectile's position and velocity in real time. This is because the response speed and processing capacity of traditional equipment cannot keep up with the projectile's speed, resulting in insufficient detection accuracy and reliability. Summary of the Invention

[0005] To address the above problems, this invention proposes a lightweight, high-speed, small target detection method across media based on a coordinate attention mechanism.

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

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

[0008] Step 2: A series of data augmentation operations were performed on the original image, including blurring, affine transformation and flipping, to expand the projectile image dataset, and Contrast-Limited Adaptive Histogram Equalization (CLAHE) was 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 projectile entering the water; replace some ordinary convolutions in the network with depthwise separable convolutions to lighten the network; use the image of the projectile entering the water as the input to the target detection model to generate target detection results.

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

[0011] Step S11: An experiment is conducted in an indoor wave tank. The wavelength and wave steepness of the water surface are adjusted by finely controlling the visualized anti-shock wave tank, and the ejection speed of the projectile is controlled by adjusting the launch pressure of the light gas launcher.

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

[0013] Step S13: Obtain a sequence of images of the projectile's flight.

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

[0015] The core area of ​​the testing system is a visual anti-shock wave tank, used to simulate the environment of a projectile entering the water. Wave-generating and wave-dissipating ends are located at both ends of the tank. A light gas launcher is installed above one side of the tank to simulate the projectile's entry into the water. The experiment used three high-speed cameras, all mounted parallel to each other in front of the tank, each equipped with a Nikon AF-S 24-85mm f / 3.5-4.5G ED VR multi-purpose lens. These cameras are controlled via PCC software, allowing for settings of frame rate, frame size, and exposure time parameters, and are connected to a mobile PC via an IPv4 network cable.

[0016] In the experiment, the wave height meter was set in the middle of the water tank, installed at the top edge of the transparent tank, and connected to the data acquisition system. The experiment also used NANLUX Evoke 1200 spotlights equipped with NANLUX FL-35 Fresnel lenses and two FS-300 supplementary lights. The spotlights were suspended from the top structure of the experimental scene to provide sufficient illumination for the entire water tank area, while the supplementary lights were placed on both sides of the water tank and used together with a 2.4m×2.4m diffuser. The diffuser was placed in front of the supplementary lights, close to the side of the water tank.

[0017] Furthermore, a series of data augmentation operations were performed on the original images, including blurring, affine transformation, and flipping, to expand the projectile image dataset. The expanded dataset was then subjected to Contrast-Limited Adaptive Histogram Equalization (CLAHE), including the following steps:

[0018] Step S21: Blur, perform affine transformation and flip on the acquired effective projectile sequence image;

[0019] Step S22: Use LabelImg to mark the positions of the bullets in the dataset. During the marking process, the three different states of the bullet are defined as “bullet_air”, “bullet_junction” and “bullet_water”, respectively.

[0020] Step S23: Before performing projectile image recognition, the original image needs to be preprocessed, including noise reduction, enhancement, and threshold segmentation. Noise reduction aims to eliminate interference factors in the environment and noise from the system itself, in order to extract projectile shape information more accurately. Due to the dim lighting in the underwater environment, the overall brightness of the image is low, and the projectile blends into the background. CLAHE technology is used to enhance the image to improve image quality and projectile recognizability. CLAHE can enhance contrast in local areas, preserving local details and features of the image, and effectively preventing 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 at the moment the projectile enters the water; some ordinary convolutions in the network are replaced with depthwise separable convolutions to lighten the network; the image of the projectile entering the water is used as the input to the target detection model to generate target detection results, including the following steps:

[0022] Step S31: Construct an object detection model consisting of an input layer, a backbone network layer, and a head layer. The input layer receives the raw image data and preprocesses it into tensor form required by the network to meet the model's input requirements. The backbone network layer extracts features from the input image to capture key information and context in the image. The head layer receives the features extracted by the backbone network, performs object detection, and generates object bounding boxes and class probability scores.

[0023] In step S32, the model has three outputs. In a convolutional layer before the final output, global average pooling is performed on the input feature tensor in the width and height directions to obtain feature maps with reduced dimensions. Then, pooling kernels are used to encode each channel in the horizontal and vertical directions to generate feature maps of spatial information. These attention feature maps are then expanded back to the original spatial dimensions and multiplied element-wise with the input feature maps to adjust the feature representation capability of each spatial location, thus finally realizing the addition of the coordinate attention mechanism.

[0024] Step S33: Replace the ordinary convolutional layers in the MP module and SPPCSPC module of the YOLOv7 network with depthwise separable convolutions.

[0025] Compared with existing technologies, the significant advantages of this invention are: 1) An experimental system for cross-medium projectile water entry was constructed, and flight images of the projectile were captured using this system. To expand the existing projectile flight dataset, a new projectile image dataset was independently generated; 2) Depthwise separable convolution (DSC) was used to lightweight the model, replacing traditional convolution with DSC, thereby significantly reducing the number of model parameters and computational cost, achieving a good balance between detection accuracy, speed, and model complexity; 3) A coordinate attention (CA) mechanism was introduced based on the target detection model, effectively preserving key spatial information by integrating positional information into channel attention. This method improved the detection accuracy by 2.68% and the recall rate by 7.31% at the moment of projectile water entry. Attached Figure Description

[0026] Figure 1 This is a system flowchart of the present invention.

[0027] Figure 2 This is a schematic diagram of the overall experimental setup for this invention.

[0028] Figure 3 Images of projectiles captured by a high-speed camera.

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

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

[0031] Figure 6 This is a schematic diagram of a regular convolution.

[0032] Figure 7 This is a schematic diagram of depthwise separable convolution.

[0033] Figure 8 Projectile identification diagram. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation processes described herein are merely illustrative and not intended to limit the scope of this application.

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

[0036] like Figure 1 As shown, this invention provides a lightweight, high-speed, small target detection method across media based on a coordinate attention mechanism, with the following steps:

[0037] Step 1: Construct a cross-medium projectile water entry test system, using a high-speed camera to capture projectile images. A schematic diagram of the overall layout is shown below. Figure 2 As shown. The specific steps are as follows:

[0038] The experiment was conducted in an indoor wave tank with internal dimensions of 1000×1800×6000mm. 3 The test was conducted in a water depth of 1200mm. Wave-generating and wave-eliminating ends were installed at both ends of the water tank to create and eliminate water waves, ensuring controlled experimental conditions. A light gas launcher was installed above one side of the water tank to launch projectiles into the tank, simulating the projectile's entry into the water. Three high-speed cameras were used, mounted parallel to each other in front of the water tank to film the projectile's entry into the water. All three cameras were equipped with Nikon AF-S24-85mm f / 3.5-4.5G ED VR multi-purpose lenses to ensure clear footage. These cameras were controlled via PCC software, allowing for settings of frame rate, frame size, and exposure time, and were connected to a mobile PC via an IPv4 network cable.

[0039] In the experiment, a wave height meter was positioned in the central area of ​​the tank, mounted at the top edge of the transparent tank, to monitor wave height within the tank. It was connected to the data acquisition system to ensure the accuracy of the experimental data. To compensate for insufficient underwater light, the experiment also used NANLUX Evoke 1200 spotlights equipped with NANLUX FL-35 Fresnel lenses and two FS-300 supplemental lights. The spotlights were suspended from the overhead structure of the experimental setup, providing ample illumination to the entire tank area. The supplemental lights were placed on either side of the tank, used in conjunction with a 2.4m × 2.4m diffuser to avoid isolated bright spots caused by direct light, thus ensuring the quality of the captured images.

[0040] Step 2: A series of data augmentation operations were performed on the original images, including blurring, affine transformation, and flipping, to expand the projectile image dataset. Contrast-Limited Adaptive Histogram Equalization (CLAHE) was then applied to the expanded dataset. The specific operations are as follows:

[0041] Based on the medium in which the projectile is positioned, the images are divided into three categories: projectiles in the air, such as... Figure 3 As shown in (a); at the moment the projectile enters the water, as... Figure 3 As shown in (b); the projectile is in the water, as... Figure 3 As shown in (c).

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

[0043] The locations of projectiles in the dataset were labeled using LabelImg. During the labeling process, three different states of the bullet were defined as "bullet_air", "bullet_junction", and "bullet_water". Observations revealed that bullets in water are accompanied by cavitation bubbles, which are generally in a closed or collapsed state. Bullets entering the water at the moment of impact, however, produce water splashes and cavitation bubbles, which are generally in a state of formation and development. To enhance the model's ability to distinguish between bullets entering the water at the moment of impact and bullets in the water, cavitation bubbles were used as a feature of bullets in the water and included in the labeling anchor boxes, while water splashes were used as a feature of bullets entering the water at the moment of impact.

[0044] Before performing projectile image recognition, the original image must be preprocessed, including noise reduction, enhancement, and threshold segmentation. Noise reduction aims to eliminate interference from the environment and noise inherent in the system itself, enabling more accurate extraction of projectile shape information. Due to the dim lighting conditions underwater, the overall image brightness is low, causing the projectile to blend into the background. CLAHE (Contrast Enhancement and Reflection) technology is used to enhance the image, improving image quality and projectile recognizability. CLAHE can enhance contrast in localized areas, preserving local details and features while effectively preventing over-enhancement and saturation.

[0045] 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 projectile entering the water; replace some ordinary convolutions in the network with depthwise separable convolutions to lighten the network; use the image of the projectile entering the water as input to the target detection model to generate target detection results. The specific operations are as follows:

[0046] The input layer receives the raw image data and preprocesses it into tensor form required by the network to meet the model's input requirements. The backbone layer extracts features from the input image to capture key information and context. The head layer receives the features extracted by the backbone network, performs object detection, and generates object bounding boxes and class probability scores. The model structure is as follows: Figure 4 As shown.

[0047] Subsequently, 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. Assuming the input CA feature tensor is X with dimensions C×H×W, global average pooling is performed on it in both the width and height directions to obtain feature maps of dimensions C×H×1 and C×1×W respectively. Then, pooling kernels are used 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 It is the output of the c-th channel after encoding; x c This is the input for the c-th channel; This represents the output of the c-th channel at height h; This represents the output of the c-th channel with width w.

[0050] By merging the two parallel stages, transposing the width and height to the same dimension and stacking them, and then using 1×1 convolution to compress the channel dimension, followed by normalization and non-linear activation to encode spatial information, an intermediate feature map f can be obtained, the calculation formula of which is as follows:

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

[0052] In the formula, [,] represents the splicing operation along the spatial dimension, δ is the nonlinear activation function, and f∈R C×H×W An intermediate feature map that encodes spatial information in the horizontal and vertical directions.

[0053] Decompose f into two separate tensors along the spatial dimension. Then transform F using two 1×1 convolutions. H and F W f h and f W Transform it into a tensor with the same number of channels as the input X to obtain the horizontal and vertical attention weights g of the input X. 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 This refers to convolution operations in the horizontal and vertical directions. The output of the coordinate attention block can be represented as:

[0057]

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

[0059] Subsequently, the ordinary convolutions in the MP (Max Pooling) and SPC / SPC (Spatial Pyramid Pooling, CrossStage Partial Channel) modules were replaced with depthwise separable convolutions, reducing the network weight and improving the real-time performance of detection. The computational cost reduction of depthwise separable convolutions is significantly greater than that of ordinary convolutions. This significantly reduces the computational cost, by several times. The ordinary convolution process is as follows: Figure 6 As shown, depthwise separable convolution is as follows Figure 7 As shown. By Figure 6 , Figure 7 It can be seen that the number of floating-point operations FLPOS_Conv for ordinary convolution and the number of floating-point operations FLOPS_DSC for depthwise separable convolution can be calculated by the following formulas:

[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 equations (1) and (2), D K ·D K Let M be the size of the convolution kernel, and N be the number of input and output channels, respectively. F ·D F This specifies the size of the output feature map.

[0063] Finally, the constructed dataset is used as input to the model for 140 iterations. Then, the dynamic process of the projectile entering the water is input into the trained model to obtain the detected image of the projectile entering the water, such as... Figure 8 As shown.

[0064] In summary, the high-speed projectile detection model constructed in this invention achieves a good balance between detection accuracy, speed, and model complexity, providing a solution for high-speed small target detection across media.

[0065] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A lightweight cross-media high-speed small target detection method based on a coordinate attention mechanism, characterized in that, The method comprises the following steps: 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 enhancement operations are performed on the original image, including blurring, affine transformation and flipping, the projectile image dataset is expanded, and the expanded dataset is subjected to contrast limited adaptive histogram equalization; Step 3: a target detection model composed 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 projectile water entry moment; some ordinary convolution in the network is replaced with depth separable convolution to lighten the network; the picture of the projectile water entry process is used as the input of the target detection model to generate the target detection result; The method for building the cross-medium projectile water entry test system comprises the following steps: Step S11, adjust the wavelength and wave steepness of the water surface by fine control of the visual anti-shock wave tank, and control the projectile launch speed by adjusting the launch pressure of the light gas launcher; Step S12, use a high-speed camera to capture the dynamic process of the projectile water entry under each working condition; Step S13, obtain the sequence images of the projectile flight; The method for building the cross-medium projectile water entry test system comprises the following steps: The core area of the test system is the visual anti-shock wave tank, which is used to simulate the projectile water entry environment; the tank has a wave making end and a wave absorbing end at both ends; the light gas launcher is installed above one side of the tank to simulate the projectile water entry process; three high-speed cameras are used in the experiment, which are installed in parallel in front of the tank and are equipped with Nikon AF-S24-85 mm f / 3.5-4.5G ED multi-purpose lenses; these cameras are controlled through PCC software, and the frame rate, frame size and exposure time parameters can be set, and they are connected with a mobile PC through IPV4 network cable; In the experiment, the wave height instrument is set in the middle area of the tank, installed at the top edge of the transparent tank and connected with the data acquisition system; a NANLUX Evoke 1200 spotlight equipped with a NANLUX FL-35 Fresnel lens and two FS-300 fill lights are also used; the spotlight is hung on the top structure of the experimental scene, and the fill lights are placed on both sides of the tank, together with the 2.4m×2.4m soft light board, which is placed in front of the fill lights and close to the side of the tank; The target detection model composed 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 projectile water entry moment; some ordinary convolution in the network is replaced with depth separable convolution to lighten the network; the picture of the projectile water entry process is used as the input of the target detection model to generate the target detection result, comprising the following steps: Step S31, a target detection model composed of an input layer, a backbone network layer and a head layer is constructed; the input layer is responsible for receiving raw image data and pre-processing it into a 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 features extracted by the backbone network and performing target detection, and generating target bounding boxes and class probability scores; Step S32, the model finally has three outputs, and global average pooling is performed on the input feature tensor in the convolution layer before the final output, obtaining two dimension-reduced feature maps; then a pooling kernel is used to encode each channel in the horizontal and vertical directions to generate feature maps of spatial information, and then these attention feature maps are expanded back to the original spatial dimension, and an element-wise multiplication operation is performed with the input feature map to adjust the feature expression ability of each spatial position, finally realizing the addition of coordinate attention mechanism; Step S33, replace the ordinary convolution layer in the MP module and the SPPCSPC module in the YOLOv7 network with a depth separable convolution.

2. The lightweight cross-media high-speed small target detection method based on the coordinate attention mechanism according to claim 1, characterized in that, A series of data enhancement operations are performed on the original image, including blurring, affine transformation and flipping, expanding the ballistic image dataset, and performing contrast limited adaptive histogram equalization on the expanded dataset, including the following steps: Step S21, the obtained effective ballistic sequence image is blurred, affine transformed and flipped to realize ballistic dataset expansion; Step S22, the position of the bullet in the dataset is labeled using LabelImg, and in the labeling process, the three different states of the bullet are defined as "bullet_air", "bullet_junction" and "bullet_water"; Step S23, before performing the ballistic image recognition, the original image is pre-processed, including the steps of noise reduction, enhancement and threshold segmentation.

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