A target detection method based on multi-element branch and dense information exchange

CN122926092APending Publication Date: 2026-10-16蔡翔宇
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410653019.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0006]本发明的目的在于提供一种基于多元分支和密集信息交换的目标检测方法,解决了现有的问题

Benefits of technology

[0052] This invention improves feature downsampling and constructs a more comprehensive multi-scale fusion network, which adds skip layers and cross-scale connections, and finally redesigns the classification loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122926092A_ABST
    Figure CN122926092A_ABST
Patent Text Reader

Abstract

The application discloses a target detection method based on multi-element branch and dense information exchange, which comprises the following steps: step S1, using multi-element branch DBB and C2f combination, so that each branch is responsible for detecting targets on different scales or feature layers; step S2, introducing dense information exchange CFPN, improving the information transmission and target detection performance between each branch through feature fusion and global information integration; step S3, carrying out channel number transformation and convolution kernel size adjustment in feature fusion to adapt the dimension, and ensuring the consistency of the features of each branch; step S4, redesigning a loss function suitable for the multi-element branch structure, balancing the outputs of each branch, introducing corresponding weights and parameters, and training through a back propagation algorithm; step S5, in the reasoning stage, acquiring the detection results of each branch through forward propagation, and obtaining the final result by using non-maximum suppression. The application realizes high-precision automatic detection of phages, and has very high practicability and application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, specifically to a target detection method based on multi-branch and dense information exchange. Background Technology

[0002] Bacteriophages are viruses that parasitize bacteria, exhibiting diverse shapes and sizes ranging from approximately 10 to 200 nanometers. They infect and kill bacteria, playing a crucial role in bacteriological research. Object detection is a computer vision task designed to identify specific targets in an image and determine their location and bounding box. In object detection of bacteriophage images, the task typically involves identifying and locating bacteriophage particles within the image. This work is significant for studying the morphological characteristics, infection mechanisms, and applications of bacteriophages in bacterial infection and treatment. Automating the analysis and processing of large numbers of bacteriophage images through object detection provides data support and an analytical foundation for related research.

[0003] The background of target detection techniques for phage images encompasses various methods, primarily including those based on traditional image features, deep learning, and model compression. However, these methods all have some limitations. Methods based on traditional image features typically require manually designed feature extractors, making them difficult to handle the complex features of phage images. While deep learning-based methods exhibit excellent accuracy, their large number of backbone network parameters and high computational complexity make deployment in resource-constrained environments more challenging. Furthermore, deep learning-based methods often require substantial amounts of labeled data to train the model, which becomes a limiting factor when phage image datasets are small or difficult to label. Model compression methods, while aiming to reduce model parameters, often sacrifice some detection performance, frequently impacting the accurate detection and localization of phages.

[0004] While the aforementioned methods each possess unique advantages, in the specific scenario of bacteriophage medical images, feature extraction is insufficient, inference speed is inadequate, and multi-scale feature networks require improvement. To address these issues, this invention proposes a target detection method based on multi-branching and dense information exchange, improving inference speed while acquiring as much feature information as possible from limited images. Specifically, the feature extraction module combines a multi-branching module (DBB) with C2f, enriching the diversity of the feature space by combining branches of different scales and complexities to enhance the feature extraction capability of a single convolution. In the feature fusion section, the original network lacks information exchange between high-level and low-level features, and its path design lacks the exchange of semantic and spatial information between different levels.

[0005] To address the aforementioned problems, we propose a target detection method based on multi-branch and dense information exchange. Summary of the Invention

[0006] The purpose of this invention is to provide a target detection method based on multi-branch and dense information exchange, which solves the existing problems.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] A target detection method based on multi-branch and dense information exchange includes the following steps:

[0009] Step S1: Combine multi-branch DBB with C2f, so that each branch is responsible for detecting targets at different scales or feature layers;

[0010] Step S2: Introduce Dense Information Exchange (CFPN) to improve information transfer between branches and target detection performance through feature fusion and global information integration.

[0011] Step S3: In feature fusion, channel number transformation and convolution kernel size adjustment are performed to adapt the dimensions and ensure the consistency of features in each branch;

[0012] Step S4: Redesign the loss function to adapt to the multi-branch structure, balance the output of each branch, introduce corresponding weights and parameters, and train it through the backpropagation algorithm;

[0013] Step S5, the inference stage, forward propagation is used to obtain the detection results of each branch, and non-maximum suppression is used to obtain the final result.

[0014] Preferably, step S1 includes the following steps:

[0015] Step S11: Preprocess the input image by performing normalization and scaling operations;

[0016] Step S12: Use models such as Convolutional Neural Networks (CNN) to extract basic features and obtain feature maps;

[0017] Step S13: Design and construct multiple branches, each responsible for detecting targets at different scales or feature layers;

[0018] Step S14: Extract the feature maps required for each branch from the base feature map;

[0019] Steps S15 and F fused =αF1 + βF2 + ... + γFn,

[0020] Where F fusedF1, F2, ..., Fn are the feature maps after fusion, and α, β, ..., γ are the weight parameters.

[0021] Step S16: Reduce the dimensionality of the feature mapping and increase the number of channels to adapt it to the needs of each branch;

[0022] Step S17: Design a convolutional neural network for object detection for each branch;

[0023] Step S18: Fuse the feature maps;

[0024] Step S19: Input the fused feature map into the C2f structure for further feature extraction and processing;

[0025] Step S110: Based on the features output by the C2f structure, convolutional layers and fully connected layers are used to perform target detection and classification.

[0026] Preferably, step S2 includes the following steps:

[0027] Step S21: Design a dense information exchange network structure to integrate feature fusion and global information;

[0028] Step S22: Extract features from the input image to obtain the feature maps for each branch.

[0029] Step S23: Construct a feature pyramid, which includes feature maps at different scales, in order to better capture multi-scale target information, and fuse the features in the feature pyramid to integrate global and local information;

[0030] Step S24: Facilitate information transmission and exchange between each branch through a dense information exchange network;

[0031] Step S25: Obtain the target detection results output by the dense information exchange network.

[0032] Preferably, step S3 includes the following steps:

[0033] Step S31: During the feature fusion process, the number of channels of the feature mapping of each branch is transformed to ensure that the dimension of the features of each branch is consistent.

[0034] Step S32: Adjust the size of the convolution kernel and fuse the feature maps after channel number transformation and convolution kernel size adjustment;

[0035] Step S33: Normalize the fused feature maps and finally output the processed and fused feature maps.

[0036] Preferably, step S4 includes the following steps:

[0037] Step S41: In the process of designing a loss function to adapt to a multi-branch structure, redesign the loss function to balance the weights of the outputs of each branch;

[0038] Step S42: Define the objective function, including the detection error and classification error of each branch;

[0039] Step S43: Introduce the corresponding weights and parameters, calculate the loss between the output of each branch and the label, and sum them by weight to obtain the final loss function;

[0040] Step S44: Use the backpropagation algorithm to update the weights and parameters in the entire network and optimize the output of each branch;

[0041] Step S45: Monitor the changes in the loss function during training to ensure that the final model result can converge.

[0042] Preferably, step S5 includes the following steps:

[0043] Step S51: In the inference phase, obtain the detection results of each branch through forward propagation;

[0044] Step S52: Extract the target location and category information from the output of each branch;

[0045] Step S53: Merge and stack the results of each branch;

[0046] Step S54: Use Non-Maximum Suppression (NMS) to remove overlapping boxes and low-confidence boxes;

[0047] Step S55: Obtain the final target detection result, including the target location, category, and confidence score.

[0048] Step S56: Display the final result on the original image;

[0049] Step S57: Use COCO and T IDE metrics to evaluate and analyze the results, demonstrating the model's performance on the object detection task.

[0050] In summary, the experiments show that the model achieves excellent results on the phage image dataset, significantly improving the model's ability to identify phages in images. Furthermore, the feature extraction method and feature fusion framework of this invention have good adaptability.

[0051] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0052] This invention improves feature downsampling and constructs a more comprehensive multi-scale fusion network, which adds skip layers and cross-scale connections, and finally redesigns the classification loss.

[0053] This invention improves both the accuracy and inference speed of target detection, providing an effective approach for achieving high-precision target detection. Attached Figure Description

[0054] Figure 1 This is a flowchart illustrating the process of the method of the present invention;

[0055] Figure 2 This is a model structure diagram of the method of the present invention;

[0056] Figure 3 This is a structural diagram of the CFPN of the method of the present invention. Detailed Implementation

[0057] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0058] like Figure 1-3 As shown, a target detection method based on multi-branch and dense information exchange includes the following steps:

[0059] Step S1: Combine multi-branch (DBB) with C2f, so that each branch is responsible for detecting targets at different scales or feature layers.

[0060] Step S1 specifically includes the following steps:

[0061] Step S11: Design a multi-branch structure, where each branch is responsible for detecting targets at different scales or feature layers, and each branch contains different convolutional kernel sizes and number of channels;

[0062] Assume the input channel of the convolution is A, the output channel is B, the convolution size is K×K, and the convolution kernel C is F∈R. B×A×K×K Bias parameter c∈R B The bias parameter is expressed as REP(c)∈R B×H×W Then convolution can be expressed as:

[0063] O = I * F + REP(c);

[0064] Step S12: Make the output channel representable as follows:

[0065]

[0066] The notification property of convolution can be expressed as:

[0067]

[0068] Step S13: Transform the number of channels and adjust the kernel size of the feature maps extracted from each branch to make the dimensions of the features in each branch consistent.

[0069] Step S14, the feature fusion formula is:

[0070]

[0071] Step S2: Introduce Dense Information Exchange (CFPN) to improve information transfer between branches and target detection performance through feature fusion and global information integration.

[0072] Step S2 specifically includes the following steps:

[0073] Step S21: Design a dense information exchange network structure to integrate feature fusion and global information;

[0074] Step S22: Extract features from the input image to obtain the feature mapping of each branch;

[0075] Step S23: Construct a feature pyramid, which includes feature maps at different scales, in order to better capture multi-scale target information, and fuse the features in the feature pyramid to integrate global and local information;

[0076] Step S24: Facilitate information transmission and exchange between each branch through a dense information exchange network;

[0077] Step S25: Obtain the target detection results output by the dense information exchange network.

[0078] Step S3: In feature fusion, channel number transformation and convolution kernel size adjustment are performed to adapt the dimensions and ensure the consistency of features in each branch.

[0079] Step S3 specifically includes the following steps:

[0080] Step S31: During feature fusion, the number of channels is adjusted to be consistent with the number of channels in other branches by using a 1x1 convolution kernel;

[0081] Step S32: Convolve the feature maps with the same number of channels using 3×3 and 5×5 convolution kernels to adapt to the feature size of different branches. The formula for the 3x3 convolution operation is: (3x3)x C2;

[0082] Step S33: Concatenate and fuse the feature maps after channel number transformation and kernel size adjustment. The fused feature map is: H x W x C2;

[0083] Step S34: Input the fused feature map into the subsequent network layer for processing. After operations such as activation function, pooling and fully connected layers, higher-level feature information is extracted.

[0084] Step S4: Redesign the loss function to adapt to the multi-branch structure, balance the output of each branch, introduce corresponding weights and parameters, and train it through the backpropagation algorithm.

[0085] Step S4 specifically includes the following steps:

[0086] Step S41: Design a comprehensive loss function by combining the outputs of each branch, and then combine the loss functions of each branch using a weighted method;

[0087] Step S42, the formula for the comprehensive loss function is:

[0088] L = w1*L1 + w2*L2 + ... + wn*Ln

[0089] Where Li represents the loss function of the i-th branch, and wi represents the weight of the i-th branch;

[0090] Step S43: Use the gradients of the parameters of each branch of the backpropagation algorithm and update each parameter according to the loss function to ensure that the parameters of each branch can be adjusted in time.

[0091] Step S44, the parameter update formula is:

[0092]

[0093] Where θ represents the model parameters and α represents the learning rate. Represents the gradient of the parameters;

[0094] Step S45: Adjust the weights of each branch based on the model training effect, and determine the optimal weight settings through experiments.

[0095] Step S46: Perform multiple rounds of iterative training on the model, continuously update the model parameters and weights, and optimize the overall loss function so that the model performs optimally on the training set.

[0096] Step S5, the inference stage, forward propagation is used to obtain the detection results of each branch, and non-maximum suppression is used to obtain the final result.

[0097] Step S51: During the inference phase, forward propagation is performed on the input data to obtain the detection results of each branch. Each branch will output some candidate boxes and their corresponding confidence scores;

[0098] Step S52: Perform non-maximum suppression on the detection results of each branch, filter the IoU (Intersection over Union) between candidate boxes, remove redundant candidate boxes, and retain candidate boxes with high confidence.

[0099] Step S53: Merge the results of each branch;

[0100] Step S54: Output the final detection results, including classification information and candidate box information.

[0101] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A target detection method based on multi-branch and dense information exchange, characterized in that, Includes the following steps: Step S1: Combine multi-branch DBB with C2f, so that each branch is responsible for detecting targets at different scales or feature layers; Step S2: Introduce Dense Information Exchange (CFPN) to improve information transfer between branches and target detection performance through feature fusion and global information integration. Step S3: In feature fusion, channel number transformation and convolution kernel size adjustment are performed to adapt the dimensions and ensure the consistency of features in each branch; Step S4: Redesign the loss function to adapt to the multi-branch structure, balance the output of each branch, introduce corresponding weights and parameters, and train it through the backpropagation algorithm; Step S5, the inference stage, forward propagation is used to obtain the detection results of each branch, and non-maximum suppression is used to obtain the final result.

2. The target detection method based on multi-branch and dense information exchange according to claim 1, characterized in that, Step S1 includes the following steps: Step S11: Preprocess the input image by performing normalization and scaling operations; Step S12: Use models such as Convolutional Neural Networks (CNN) to extract basic features and obtain feature maps; Step S13: Design and construct multiple branches, each responsible for detecting targets at different scales or feature layers; Step S14: Extract the feature maps required for each branch from the base feature map; Step S15、F fused =αF1+βF2+...+γFn, Where F fused F1, F2, ..., Fn are the feature maps after fusion, and α, β, ..., γ are the weight parameters. Step S16: Reduce the dimensionality of the feature mapping and increase the number of channels to adapt it to the needs of each branch; Step S17: Design a convolutional neural network for object detection for each branch; Step S18: Fuse the feature maps; Step S19: Input the fused feature map into the C2f structure for further feature extraction and processing; Step S110: Based on the features output by the C2f structure, convolutional layers and fully connected layers are used to perform target detection and classification.

3. The target detection method based on multi-branch and dense information exchange according to claim 1, characterized in that, Step S2 includes the following steps: Step S21: Design a dense information exchange network structure to integrate feature fusion and global information; Step S22: Extract features from the input image to obtain the feature maps for each branch. Step S23: Construct a feature pyramid, which includes feature maps at different scales, in order to better capture multi-scale target information, and fuse the features in the feature pyramid to integrate global and local information; Step S24: Facilitate information transmission and exchange between each branch through a dense information exchange network; Step S25: Obtain the target detection results output by the dense information exchange network.

4. The target detection method based on multi-branch and dense information exchange according to claim 1, characterized in that, Step S3 includes the following steps: Step S31: During the feature fusion process, the number of channels of the feature mapping of each branch is transformed to ensure that the dimension of the features of each branch is consistent. Step S32: Adjust the size of the convolution kernel and fuse the feature maps after channel number transformation and convolution kernel size adjustment; Step S33: Normalize the fused feature maps and finally output the processed and fused feature maps.

5. The target detection method based on multi-branch and dense information exchange according to claim 1, characterized in that, Step S4 includes the following steps: Step S41: In the process of designing a loss function to adapt to a multi-branch structure, redesign the loss function to balance the weights of the outputs of each branch; Step S42: Define the objective function, including the detection error and classification error of each branch; Step S43: Introduce the corresponding weights and parameters, calculate the loss between the output of each branch and the label, and sum them by weight to obtain the final loss function; Step S44: Use the backpropagation algorithm to update the weights and parameters in the entire network and optimize the output of each branch; Step S45: Monitor the changes in the loss function during training to ensure that the final model result can converge.

6. The target detection method based on multi-branch and dense information exchange according to claim 1, characterized in that, Step S5 includes the following steps: Step S51: In the inference phase, obtain the detection results of each branch through forward propagation; Step S52: Extract the target location and category information from the output of each branch; Step S53: Merge and stack the results of each branch; Step S54: Use Non-Maximum Suppression (NMS) to remove overlapping boxes and low-confidence boxes; Step S55: Obtain the final target detection result, including the target location, category, and confidence score. Step S56: Display the final result on the original image; Step S57: Use COCO and TIDE metrics to evaluate and analyze the results, demonstrating the model's performance on the object detection task.