A method for detecting drowned diatoms based on efficient feature extraction and fusion

By constructing a SERAM module and optimizing the diatom detection model using the SLO Smooth L1 loss function, the problems of interference in diatom detection under complex backgrounds and low accuracy of slender targets were solved, achieving a highly efficient drowning detection effect.

CN120032367BActive Publication Date: 2025-11-14GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510089535.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-11-14
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

Existing technologies suffer from interference problems in diatom detection under complex backgrounds and have low detection accuracy for slender diatom targets, making it difficult to meet the needs of forensic drowning detection.

Method used

We adopt a method based on efficient feature extraction and fusion. We construct a SERAM module to extract local features and fuse global features, and use the SLO Smooth L1 loss function to optimize the target loss function, thereby improving the accuracy of the detection model.

Benefits of technology

It effectively reduces detection interference in complex backgrounds, improves the detection accuracy of slender diatom targets, and enhances the accuracy of forensic drowning detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120032367B_ABST
    Figure CN120032367B_ABST
Patent Text Reader

Abstract

This invention relates to a method for detecting drowned diatoms based on efficient feature extraction and fusion. The method includes: S1: acquiring diatom images and preprocessing them to generate input data; S2: optimizing the network structure of a diatom detection model based on the preprocessed input data to obtain a predicted distribution; S3: optimizing the loss function of the diatom detection model based on the predicted distribution and the true values; S4: outputting the diatom species in the image based on the optimized diatom detection model. By using this invention, diatom images acquired under a scanning electron microscope can be detected and classified efficiently. This invention overcomes the detection interference problem caused by complex backgrounds in diatom images and the low detection accuracy of slender diatom targets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, specifically to a method for detecting drowned diatoms based on efficient feature extraction and fusion. Background Technology

[0002] Diatoms are widely distributed in Earth's water bodies and are highly sensitive to their aquatic environment. They are not only acutely responsive to changes in the concentration of nutrients such as nitrogen and phosphorus, but also exhibit significant responses to a variety of environmental factors, thus often being used as important indicators in environmental monitoring and forensic research. In forensic practice, forensic scientists often face significant challenges when determining the cause of death of bodies recovered from water, drowning victims, or bodies thrown into water after death. In such cases, diatom testing is considered the gold standard for diagnosing drowning. This not only provides crucial evidence for determining the cause of death in drowning victims, but also allows for the inference of the drowning location through diatom test results, thus providing key clues for solving cases.

[0003] Common diatom detection methods are mainly divided into two categories: molecular biology methods and morphological methods. Molecular biology methods typically utilize DNA barcoding or DNA arrays, but this technology is not yet mature. Furthermore, the internal DNA of diatoms degrades over time, often leading to detection errors. Morphological methods classify diatoms by observing their morphological characteristics. Morphological methods can be further divided into methods based on manual observation and computer-based automated detection and identification methods. Manual observation methods rely on experienced forensic experts for observation and classification. However, a major drawback of this method is its high labor and time consumption. Computer-based methods are further divided into traditional machine learning and deep learning approaches. Traditional machine learning methods typically extract morphological differences between diatom species as input to the classifier. However, this method is more effective for diatom images with simple backgrounds, but its recognition performance is limited when dealing with diatoms with high class similarity. With the development of deep learning technology, researchers are gradually trying to apply it to diatom detection. Deep learning can automatically extract feature information from large amounts of training data, significantly improving detection performance. Many studies have made improvements and optimizations to diatom image detection based on deep neural networks, but these methods have not yet solved the problems of detection interference in complex backgrounds and low detection accuracy of slender diatom targets. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention provides a method for detecting drowned diatoms based on efficient feature extraction and fusion. This method can accurately identify a large number of diatom images and overcome the detection interference problem under complex backgrounds in scanning electron microscopy and the low detection accuracy of slender diatom targets.

[0005] Specifically, the method includes the following steps:

[0006] S1: Acquire diatom images and preprocess the acquired diatom images to generate input data;

[0007] S2: Based on the preprocessed input data, the network structure of the diatom detection model is optimized to obtain the predicted distribution;

[0008] S3: Based on the predicted distribution and the true value, the loss function of the diatom detection model is optimized to obtain the optimized diatom detection model;

[0009] S4: Based on the optimized diatom detection model, output the types of diatoms in the diatom image.

[0010] Preferably, S1 includes the following steps:

[0011] S1.1: Construct the image acquisition module;

[0012] S1.2: Rotate the bounding box annotations on the diatom image according to the image acquisition module;

[0013] S1.3: Divide the diatom images into datasets based on the image acquisition module.

[0014] Preferably, S2 includes the following steps:

[0015] S2.1: Construct the Squeeze-and-Excitation Residual Attention Module (SERAM);

[0016] S2.2: Based on the SERAM module, local feature extraction is performed on the input feature x to obtain the local residual feature f. residual ;

[0017] S2.3: Based on the SERAM module, the local residual characteristics f residual Max pooling and upsampling operations are performed to capture multi-scale feature relationships, resulting in global features f. global ;

[0018] S2.4: Based on the global feature f from the SERAM module global A channel attention mechanism is employed, which generates inter-channel attention weights w through adaptive global average pooling. attention ;

[0019] S2.5: For global features f global and attention weight w attention By combining these features, we obtain the weighted enhancement feature f that strengthens the input features. enhanced .

[0020] Preferably, S2.1 includes the following steps:

[0021] f residual =RELU(BN(Conv3×3(RELU(BN(Conv3×3(x))))))+x,

[0022] f global =Upsample(MaxPool(f residual )),

[0023] w attention =SE(f global )=f global ⊙σ(W2·RELU(W1·GlobalAvgPool(f global ))),

[0024] f enhanced =(1+w attention )⊙f global .

[0025] In the above formula, x represents the input feature, ReLU represents the activation function, BN represents normalization, Conv n×n(·) represents a convolutional kernel of size n, Upsample represents the upsampling operation, MaxPool represents the max pooling operation, SE represents the channel attention mechanism, ⊙ represents the XOR operation, and σ is the Sigmoid activation function. and It consists of two fully connected layers, where C is the number of channels, r is the channel compression factor, and GlobalAvgPool represents the global average pooling operation.

[0026] Preferably, S3 includes:

[0027] S3.1: Construct a smooth L1 loss function SLO (Slender and Long Object Feedback Smooth L1 Loss) based on aspect ratio feedback of slender objects;

[0028] S3.2: Obtain the aspect ratio of the target based on the SLO Smooth L1 Loss module;

[0029] S3.3: Dynamically determine the target loss function weight w based on the slender target criterion Mask determined by the SLO Smooth L1 Loss module and the obtained target aspect ratio. i ;

[0030] S3.4: The weights w of the loss function obtained from the SLO Smooth L1 Loss module. iAdjust the loss function.

[0031] Preferably, S3.1 includes the following steps:

[0032]

[0033] L SLOSmoothL1 =∑(1+w i SmoothL1(pred) i -target i ),

[0034]

[0035] In the above formula, x represents the input error value, δ is the threshold for controlling error segmentation, i represents the i-th sample, and w i Pred represents the weight of the i-th sample. i and target i These represent the predicted value and the target value, respectively. Ratio represents the aspect ratio of the target box, or the height-to-width ratio. Mask is the criterion for determining a slender target, and exp(·) represents the exponential function.

[0036] Preferably, S4 includes:

[0037] S4.1: Construct the data processing module;

[0038] S4.2: According to the data processing module, input the diatom image into the optimized diatom detection model;

[0039] S4.3: Based on the optimized diatom detection model, output the rotated bounding box, species, and confidence level of the diatom image;

[0040] S4.4: Perform statistics on the output detection results and output the types of diatom images.

[0041] The second technical solution adopted in this invention is: a method for detecting drowned diatoms based on multi-scale feature fusion, comprising:

[0042] The image acquisition module is used to acquire diatom images and perform annotation and segmentation.

[0043] The SERAM module is used to capture the correlation between channels and spatial features to optimize the diatom detection model;

[0044] SLO Smooth L1 Loss is used to improve the model's ability and accuracy in detecting slender targets;

[0045] The data processing module is used to input diatom images into the optimized diatom detection model, and the diatom detection model outputs the types of diatoms in the images.

[0046] The beneficial effects of this invention are as follows: First, residual features are extracted from the input features through local feature extraction. Then, max pooling and upsampling operations are performed on the input features to capture multi-scale feature relationships and obtain global features. Attention weights are obtained through a channel attention mechanism. Finally, residual features and attention weights are fused to overcome the difficulty of detection in complex backgrounds. Simultaneously, this invention effectively addresses the challenge of low detection accuracy for slender diatom targets. By dynamically determining the target loss function weights using the target's aspect ratio and the slender target discrimination criterion (Mask), the invention overcomes the problem of low detection accuracy for slender diatom targets without affecting the detection accuracy of other diatom categories. Attached Figure Description

[0047] To more clearly illustrate the technical methods in the embodiments of the present invention, the accompanying drawings used in the prior art and embodiments are incorporated in and constitute a part of this specification. The following drawings are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0048] Figure 1 This is a flowchart of the present invention;

[0049] Figure 2 This is a structural diagram of the diatom detection algorithm based on efficient feature extraction and fusion of the present invention;

[0050] Figure 3 This is a comparison of the performance of the diatom detection algorithm based on efficient feature extraction and fusion of the present invention with the original Oriented R-CNN algorithm;

[0051] Figure 4 This is a diagram of the diatom detection algorithm based on efficient feature extraction and fusion of the present invention;

[0052] Figure 5 Examples of algae in the diatom dataset of this invention;

[0053] Figure 6 This is a schematic diagram of the attention residual module of the present invention;

[0054] Figure 7 This is a schematic diagram of the SLO SmoothL1 loss function for determining slender targets according to the present invention; Detailed Implementation Plan

[0055] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical methods of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this application. Unless otherwise specified, all other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0056] This invention provides a method for detecting drowned diatoms based on efficient feature extraction and fusion, which reduces detection interference in complex backgrounds and improves the detection accuracy of slender diatom targets at the algorithm level, thereby improving the detection effect of diatom images under scanning electron microscope.

[0057] A typical embodiment of the present invention uses a dataset of diatom images acquired at 1500x magnification under a scanning electron microscope as an example, referring to... Figure 1 , Figure 2 The method includes the following steps:

[0058] S1: Acquire diatom images and preprocess the acquired diatom images to generate input data;

[0059] S2: Based on the preprocessed input data, the network structure of the diatom detection model is optimized to obtain the predicted distribution;

[0060] S3: Based on the predicted distribution and the true value, the loss function of the diatom detection model is optimized to obtain the optimized diatom detection model;

[0061] S4: Based on the optimized diatom detection model, output the types of diatoms in the diatom image.

[0062] Furthermore, as a preferred embodiment of this method, S1 includes the following steps:

[0063] S1.1: Construct the image acquisition module;

[0064] S1.2: Rotate the bounding box annotations on the diatom image according to the image acquisition module;

[0065] S1.3: Divide the diatom images into datasets based on the image acquisition module.

[0066] Following the standards of the DOTA dataset, the LabelImage tool was used to rotate and label the bounding boxes of seven types of diatom images acquired under a scanning electron microscope at 1500x magnification, resulting in a diatom dataset. This dataset was then divided into training, validation, and test sets in a 6:2:2 ratio, as shown in Table 1.

[0067] Table 1 shows the division of the training and test sets in the diatom dataset.

[0068]

[0069] Various algae images in the dataset (reference) Figure 5 .

[0070] A diatom dataset was created based on the DOTA data format. The diatom data was mainly saved to two folders: Labels and Images. Labels is used to store the annotation information of each image in txt file format, while Images contains all the images.

[0071] After the DOTA format dataset is created, divide the dataset according to the ratio of training set:validation set:test set = 6:2:2, and then store it in the corresponding folder.

[0072] Furthermore, refer to Figure 6 S2 includes the following steps:

[0073] S2.1: Construct the Squeeze-and-Excitation Residual Attention Module (SERAM);

[0074] S2.2: Based on the SERAM module, local feature extraction is performed on the input feature x to obtain the local residual feature f. residual ;

[0075] S2.3: Based on the SERAM module, the local residual characteristics f residual Max pooling and upsampling operations are performed to capture multi-scale feature relationships, resulting in global features f. global ;

[0076] S2.4: Based on the global feature f from the SERAM module global A channel attention mechanism is employed, which generates inter-channel attention weights w through adaptive global average pooling. attention ;

[0077] S2.5: For global features f global and attention weight w attention By combining these features, we obtain the weighted enhancement feature f that strengthens the input features. enhanced .

[0078] Furthermore, S2.1 includes the following steps:

[0079] The results are extracted using residual units and channel attention mechanisms, and then weighted to obtain the SERAM structure:

[0080] fresidual =RELU(BN(Conv3×3(RELU(BN(Conv3×3(x))))))+x,

[0081] f global =Upsample(MaxPool(f residual )),

[0082] w attention =SE(f global )=f global ⊙σ(W2·RELU(W1·GlobalAvgPool(f global ))),

[0083] f enhanced =(1+w attention )⊙f global .

[0084] In the above formula, x represents the input feature, ReLU represents the activation function, BN represents normalization, Conv n×n(·) represents a convolutional kernel of size n, Upsample represents the upsampling operation, MaxPool represents the max pooling operation, SE represents the channel attention mechanism, ⊙ represents the XOR operation, and σ is the Sigmoid activation function. and It consists of two fully connected layers, where C is the number of channels, r is the channel compression factor, and GlobalAvgPool represents the global average pooling operation.

[0085] Furthermore, refer to Figure 7 S3 includes the following steps:

[0086] S3.1: Construct a smooth L1 loss function SLO (Slender and Long Object Feedback Smooth L1 Loss) based on aspect ratio feedback of slender objects;

[0087] S3.2: Obtain the aspect ratio of the target based on the SLO Smooth L1 Loss module;

[0088] S3.3: Dynamically determine the target loss function weight w based on the slender target criterion Mask determined by the SLO Smooth L1 Loss module and the obtained target aspect ratio. i ;

[0089] S3.4: The weights w of the loss function obtained from the SLO Smooth L1 Loss module. i Adjust the loss function.

[0090] Furthermore, S3.1 includes the following steps:

[0091]

[0092] L SLOSmoothL1 =∑(1+w i SmoothL1(pred) i -target i ),

[0093]

[0094] In the above formula, x represents the input error value, δ is the threshold for controlling error segmentation, i represents the i-th sample, and w i Pred represents the weight of the i-th sample. i and target i These represent the predicted value and the target value, respectively. Ratio represents the aspect ratio of the target box, or the height-to-width ratio. Mask is the criterion for determining a slender target, and exp(·) represents the exponential function.

[0095] Furthermore, S4 includes the following steps:

[0096] S4.1: Construct the data processing module;

[0097] S4.2: According to the data processing module, input the diatom image into the optimized diatom detection model;

[0098] S4.3: Based on the optimized diatom detection model, output the rotated bounding box, species, and confidence level of the diatom image;

[0099] S4.4: Perform statistics on the output detection results and output the types of diatom images.

[0100] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make other equivalent modifications or substitutions without departing from the spirit of the invention. These equivalent modifications or substitutions are included within the scope defined by the claims.

Claims

1. A method for detecting drowned diatoms based on efficient feature extraction and fusion, characterized in that, The method includes the following steps: S1: Acquire diatom images and preprocess the acquired diatom images to generate input data; S2: Based on the preprocessed input data, the network structure of the diatom detection model is optimized to obtain the predicted distribution; S2 includes the following steps: S2.1: Construct the Squeeze-and-Excitation ResidualAttention Module (SERAM); S2.2: Based on the input features from the SERAM module x Local feature extraction is performed to obtain local residual features. f residual ; S2.3: Based on the local residual characteristics of the SERAM module f residual Max pooling and upsampling operations are performed to capture multi-scale feature relationships and obtain global features. f global ; S2.4: Based on the global features of the SERAM module f global A channel attention mechanism is employed, which generates attention weights between channels through adaptive global average pooling. w attention ; S2.5: Global features f global and attention weight w attention By combining these features, we obtain a weighted enhancement of the input features. f enhanced ; S3: Based on the predicted distribution and the true value, the loss function of the diatom detection model is optimized to obtain the optimized diatom detection model; S3 includes the following steps: S3.1: Construct a smooth L1 loss function SLO (Slender and Long Object Feedback Smooth L1 Loss) based on aspect ratio feedback of slender objects; S3.2: Obtain the aspect ratio of the target based on the SLO Smooth L1 Loss module. Ratio ; S3.3: Criteria for determining slender targets based on the SLO Smooth L1 Loss module. Mask and the aspect ratio of the acquired target Ratio Dynamically determine the weights of the target loss function w i ; S3.4: Weights of the loss function obtained from the SLO Smooth L1 Loss module w i Adjust the loss function; S4: Based on the optimized diatom detection model, output the types of diatoms in the diatom image.

2. The method for detecting drowned diatoms based on efficient feature extraction and fusion according to claim 1, characterized in that, S1 includes the following steps: S1.1: Construct the image acquisition module; S1.2: Rotate the bounding box annotations on the diatom image according to the image acquisition module; S1.3: Divide the diatom images into datasets based on the image acquisition module.

3. The method for detecting drowned diatoms based on efficient feature extraction and fusion according to claim 1, characterized in that, S2.1 includes the following steps: In the above formula, x Represents the input features, ReLU represents the activation function, BN represents the normalization process, and Conv represents the input features. n×n (.) represents a convolutional kernel of size n, Upsample represents the upsampling operation, MaxPool represents the max pooling operation, SE represents the channel attention mechanism, ☉ represents the XOR operation, and σ is the Sigmoid activation function. and It consists of two fully connected layers. C It is the number of channels. r It is the channel compression factor, and GlobalAvgPool represents the global average pooling operation.

4. The method for detecting drowned diatoms based on efficient feature extraction and fusion according to claim 1, characterized in that, S3.1 includes the following steps: In the above formula, x This represents the input error value, where σ is the threshold value controlling the error segmentation. i Let i represent the i-th sample. w i Pred represents the weight of the i-th sample. i and target i These represent the predicted value and the target value, respectively. Ratio This indicates the aspect ratio or height-to-width ratio of the target bounding box. Mask It is the criterion for determining slender targets, and exp(.) represents the exponential function.

5. The method for detecting drowned diatoms based on efficient feature extraction and fusion according to claim 1, characterized in that, S4 include: S4.1: Construct the data processing module; S4.2: According to the data processing module, input the diatom image into the optimized diatom detection model; S4.3: Based on the optimized diatom detection model, output the rotated bounding box, species, and confidence level of the diatom image; S4.4: Perform statistics on the output detection results and output the types of diatom images.

Citation Information

Patent Citations

  • Algae detection method and device and terminal equipment

    CN115187982A

  • Drowning diatom detection method based on multi-scale feature fusion

    CN116229435A