Cordyceps target identification method and device based on deep learning, and terminal equipment

The Cordyceps target recognition method uses FasterNet and advanced attention mechanisms to enhance feature extraction and detection accuracy for small targets, addressing the limitations of existing methods by improving computational efficiency and recognition performance.

CN119169421APending Publication Date: 2024-12-20PANZHIHUA UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411190212.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Existing Cordyceps identification methods, both manual and image recognition based on deep learning, suffer from low accuracy and limited recognition ability for small-sized targets due to challenges in processing small target detection.

Method used

A Cordyceps target identification method utilizing FasterNet as a backbone network, combined with a convolutional attention model, two-layer routing attention mechanism, SSFF module, Context Aggregation attention mechanism, TFE module, and CPAM module to enhance feature extraction and detection accuracy for small targets.

Benefits of technology

Improves detection performance and accuracy of Cordyceps recognition by reducing computational complexity and enhancing feature representation, particularly for small targets, through multi-scale feature fusion and attention mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169421A_ABST
    Figure CN119169421A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cordyceps sinensis recognition, discloses a cordyceps sinensis target recognition method and device based on deep learning and terminal equipment, and aims at solving the problem that an existing cordyceps sinensis recognition method is poor in accuracy, and the scheme mainly comprises the steps that feature extraction is conducted on a cordyceps sinensis image through FasterNet to obtain a first feature; inputting the first feature into a convolution attention model to obtain a second feature; utilizing a double-layer routing attention mechanism to distribute attention weights, and extracting corresponding third features; fusing the second feature and the third feature to obtain a fourth feature; inputting the fourth feature into an SSFF module to obtain a fifth feature; the fifth feature is input to Context Aggregation, and a sixth feature is obtained; inputting the fifth feature and the sixth feature into a TFE module to obtain a seventh feature; inputting the fifth feature and the seventh feature into a CPAM module to obtain an eighth feature; and inputting the eighth feature into a detection head to realize detection and positioning of a cordyceps target. According to the invention, the accuracy of cordyceps identification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Cordyceps identification, and specifically to a Cordyceps target identification method and device, and terminal equipment based on deep learning. Background Art

[0002] Cordyceps sinensis is a precious Chinese medicinal material, also known as caterpillar fungus, which belongs to a type of fungus. It is a complex of the fruiting body and the corpse of the larvae of the bat moth insect larvae of the family Clavicipitaceae. The main active ingredients are cordyceps acid (i.e. D-mannitol), cordyceps polysaccharides and other substances that are beneficial to human absorption. It has many functions such as regulating the immune system function and anti-fatigue.

[0003] There are two main traditional methods for identifying Cordyceps in Cordyceps images. The first is to manually identify Cordyceps targets in Cordyceps images by observing the morphological features, color, texture and other external features of Cordyceps. This method relies on manual experience and has poor accuracy. The second is image recognition, which is to automatically identify and locate Cordyceps targets in Cordyceps images based on deep learning technology. In this way, it is determined whether Cordyceps exists in the image and the location of Cordyceps is found in the image. However, due to the small size of Cordyceps targets, traditional target recognition algorithms face many challenges in processing small target detection, such as low detection accuracy and limited recognition ability for small-sized targets. Summary of the invention

[0004] The present application aims to solve the problem of poor accuracy of existing Cordyceps identification methods, and proposes a Cordyceps target identification method, device, and terminal device based on deep learning.

[0005] The technical solution adopted by this application to solve the above technical problems is:

[0006] In a first aspect, the present application provides a method for identifying Cordyceps sinensis targets based on deep learning, the method comprising:

[0007] Acquire a Cordyceps image, and use FasterNet as a Backbone network to perform feature extraction on the Cordyceps image to obtain first feature information;

[0008] Inputting the first feature information into a convolutional attention model, performing convolution with hole convolutions of different dilation rates on the convolutional attention model to obtain semantic information features of different receptive fields, and using the semantic information features as second feature information;

[0009] Allocating attention weights using a two-layer routing attention mechanism, allocating computing resources in a feature map corresponding to the second feature information according to the attention weights, and extracting corresponding third feature information using the allocated computing resources;

[0010] Fusing the second feature information with the third feature information to obtain fourth feature information;

[0011] Using the SSFF module to fuse the feature maps of different scales corresponding to the fourth feature information to obtain fifth feature information;

[0012] Aggregating the global context information in the feature map corresponding to the fifth feature information using the Context Aggregation attention mechanism to obtain the sixth feature information;

[0013] Inputting the fifth feature information and the sixth feature information into a TFE module, wherein the TFE module obtains seventh feature information by fusing feature maps of different scales corresponding to the fifth feature information and the sixth feature information;

[0014] Inputting the fifth feature information and the seventh feature information into the CPAM module, the CPAM module combines the channel attention mechanism and the position attention mechanism to fuse the feature information to obtain the eighth feature information;

[0015] The eighth characteristic information is input into the detection head, and the detection head detects and locates the Cordyceps target according to the eighth characteristic information.

[0016] Furthermore, the FasterNet applies a partial convolution method to extract spatial features, and the number of floating-point operations in the partial convolution method is:

[0017]

[0018] The memory access amount in the partial convolution method is:

[0019]

[0020] Among them, FLOPs represents the number of floating point operations, AMC represents the memory access, h represents the height of the input Cordyceps image, w represents the width of the input Cordyceps image, k represents the side length of the convolution kernel, and c represents the length of the convolution kernel. p The number of channels of the mask representing the partial convolution.

[0021] Furthermore, the convolutional attention model is expressed as follows:

[0022] F2=CAM(F1,{d1,d2,d3});

[0023] Among them, F2 represents the second feature information, F1 represents the first feature information, d1, d2, and d3 represent different expansion rates respectively, and CAM represents the convolutional attention model.

[0024] Further, the feature maps of different scales corresponding to the fourth feature information are fused using the SSFF module, specifically including:

[0025] For the feature maps of the P4 and P5 feature levels of the fourth feature information, the number of channels is changed to 256 using 1*1 convolution, and the nearest neighbor interpolation method is used to adjust its size to adapt to the size of the P3 level;

[0026] Use the unsqueeze method to convert each feature layer from a 3D tensor to a 4D tensor, and stack the 4D feature maps along the depth dimension to form a 3D feature map for subsequent convolution operations;

[0027] 3D convolution, 3D batch normalization and SiLU activation function are used to complete scale sequence feature extraction and obtain the fifth feature information.

[0028] Furthermore, the TFE module fuses the feature maps of different scales corresponding to the fifth feature information and the sixth feature information, specifically including:

[0029] The TFE module takes the large-size, medium-size and small-size feature maps corresponding to the fifth feature information and the sixth feature information as input, and for the large-size feature map, after convolution processing, adjusts its channel number to 1, and then uses a hybrid structure of maximum pooling and average pooling for down-sampling; for the small-size feature map, after adjusting the channel number using the convolution layer, uses the nearest neighbor interpolation method for up-sampling;

[0030] The adjusted large-size, medium-size, and small-size feature maps of the same size are spliced ​​in the spatial dimension to form three feature maps with the same dimension. After a convolution operation is performed on the spliced ​​feature maps, they are spliced ​​in the channel dimension to obtain the output feature information of the TFE module, that is, the seventh feature information.

[0031] Further, the TFE module is expressed as follows:

[0032] F7=Concat(F l ,F m ,F s );

[0033] Among them, F7 represents the seventh feature information, Concat() represents the concatenation function, and F l Represents a large-size feature map, F m represents the feature map of medium size, F s Represents a small-sized feature map.

[0034] Furthermore, the CPAM module includes a channel attention network that receives the fifth feature information input, and a position attention network that receives the superimposed input of the channel attention network and the seventh feature information.

[0035] In a second aspect, the present application provides a Cordyceps target recognition device based on deep learning, which is used to implement the steps of the Cordyceps target recognition method based on deep learning as described in the first aspect.

[0036] In a third aspect, the present application provides a terminal device, the terminal device comprising a processor, a memory and a communication bus;

[0037] The communication bus is used to realize the connection and communication between the processor and the memory;

[0038] The processor is used to execute one or more programs in the memory to implement the steps of the Cordyceps target recognition method based on deep learning as described in the first aspect.

[0039] The beneficial effects of the present application are as follows: the deep learning-based Cordyceps target recognition method, device, and terminal device provided by the present application adopt a convolutional attention model to improve the contextual information of tiny objects. FasterNet is used as the backbone to extract features, which reduces the number of parameters and the amount of calculation, and reduces the complexity of the model while ensuring that the detection performance of the model remains unchanged. The attention mechanism and context aggregation are introduced to aggregate the global context information in the image, enhance the feature representation, and improve the accuracy and reliability of segmentation. The present application incorporates an ASF-YOLO framework based on attention scale sequence fusion, which is specifically designed for the detection of small targets and significantly improves the accuracy and speed of Cordyceps recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A flowchart of a method for identifying Cordyceps sinensis targets based on deep learning provided in an embodiment of the present application;

[0041] Figure 2 A schematic diagram of the structure of FasterNet provided in an embodiment of the present application;

[0042] Figure 3 A schematic diagram of the structure of a convolutional attention model provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of the structure of a two-layer routing attention mechanism provided in an embodiment of the present application;

[0044] Figure 5 A schematic diagram of the structure of ASF-YOLO provided in an embodiment of the present application;

[0045] Figure 6 A schematic diagram of the structure of a Context Aggregation attention mechanism provided in an embodiment of the present application;

[0046] Figure 7 A schematic diagram of the structure of a TFE module provided in an embodiment of the present application;

[0047] Figure 8 A schematic diagram of the structure of a CPAM provided in an embodiment of the present application;

[0048] Fig. 9 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0050] The technical solution of the embodiment of the present application is applicable to application scenarios where detection and positioning of Cordyceps targets need to be realized in Cordyceps images. In order to solve the problem of detection accuracy of traditional target recognition algorithms when processing small target detection, the technical solution of the present application is proposed. In the embodiment of the present application, after obtaining the Cordyceps image, FasterNet is used as the Backbone network to extract features of the Cordyceps image to obtain the first feature information; the first feature information is input into the convolutional attention model, and the convolutional attention model is convolved with hole convolutions of different expansion rates to obtain semantic information features of different receptive fields, and the semantic information features are used as the second feature information; the attention weights are allocated using a two-layer routing attention mechanism, and computing resources are allocated in the feature map corresponding to the second feature information according to the attention weights, and the corresponding third feature information is extracted using the allocated computing resources; the second feature information and the third feature information are feature fused to obtain the fourth feature information; the feature maps of different scales corresponding to the fourth feature information are fused using the SSFF module to obtain the fifth feature information; the Context The Aggregation attention mechanism aggregates the global context information in the feature map corresponding to the fifth feature information to obtain the sixth feature information; the fifth feature information and the sixth feature information are input into the TFE module, and the TFE module obtains the seventh feature information by fusing the feature maps of different scales corresponding to the fifth feature information and the sixth feature information; the fifth feature information and the seventh feature information are input into the CPAM module, and the CPAM module fuses the feature information in combination with the channel attention mechanism and the position attention mechanism to obtain the eighth feature information; the eighth feature information is input into the detection head, and the detection head detects and locates the Cordyceps target according to the eighth feature information.

[0051] Specifically, this application uses FasterNet as the Backbone to extract features, which reduces the number of parameters and the amount of calculation while ensuring that the detection performance of the model remains unchanged, and reduces the complexity of the model. The convolutional attention model uses hole convolutions with different expansion rates. Different expansion rates provide contextual information of different scales, thereby improving the accuracy of feature extraction and Cordyceps target positioning. By introducing a double-layer routing attention mechanism, each query only needs to focus on a small number of related key-value pairs, thereby improving computational efficiency and memory utilization. The extracted multi-scale feature maps are fused through the SSFF module, which solves the multi-scale problem of different types of targets and the target detection and segmentation problem of small targets, and improves the accuracy of instance segmentation. The Context Aggregation attention mechanism aggregates parallel information from different contextual information, thereby improving the accuracy and convergence speed of the model. The feature information is fused through the CPAM module, further improving the accuracy of instance segmentation.

[0052] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0053] Figure 1 A flowchart of a method for identifying Cordyceps sinensis targets based on deep learning is provided in an embodiment of the present application. The method comprises the following steps:

[0054] S1. Obtain a Cordyceps image, and use FasterNet as a Backbone network to perform feature extraction on the Cordyceps image to obtain first feature information F1.

[0055] In an embodiment of the present application, FasterNet is used as the backbone of the network to extract the features of the input Cordyceps image, and the obtained first feature information F1 is passed to the subsequent layers to perform the task.

[0056] Among them, FasterNet is a family of neural networks designed to achieve higher operating speeds without compromising accuracy in a variety of visual tasks. Figure 2 , FasterNet applies the partial convolution method (PConv) to extract spatial features, which can extract spatial features more efficiently by reducing redundant calculations and memory accesses.

[0057] The number of floating point operations in the partial convolution method is:

[0058]

[0059] The memory access amount in the partial convolution method is:

[0060]

[0061] Among them, FLOPs represents the number of floating point operations, AMC represents the memory access, h represents the height of the input Cordyceps image, w represents the width of the input Cordyceps image, k represents the side length of the convolution kernel, and c represents the length of the convolution kernel. p The number of channels of the mask representing the partial convolution.

[0062] It can be understood that the convolution layer is a key part of processing image data, among which the number of convolution operations, namely the number of floating-point operations FLOPs and the amount of memory access AMC are important indicators for measuring the computational efficiency and resource consumption of the model. Compared with the conventional convolution method, when the ratio r of the number of channels of the input feature map to the number of channels of the output feature map is 1 / 4, the number of floating-point operations FLOPs of the partial convolution method is only 1 / 16 of that of the conventional convolution method, that is, the number of floating-point operations FLOPs of the partial convolution method is significantly lower than that of the conventional convolution method, thereby improving the computational efficiency, and the memory access AMC of the partial convolution method is smaller.

[0063] S2. Input the first feature information F1 into a convolutional attention model. The convolutional attention model performs convolution with hole convolutions of different dilation rates to obtain semantic information features of different receptive fields, and use the semantic information features as the second feature information F2.

[0064] See also Figure 3 In practical applications, the convolutional attention model (CAM) uses dilated convolutions with different dilation rates to perform convolution operations, which can effectively expand the receptive field and capture multi-scale semantic information features without increasing the model complexity and computational burden, so as to improve the performance of image segmentation and target detection tasks. In real-time image segmentation, by adjusting the dilation rate, the spacing between the medians of the convolution kernel can be controlled to achieve receptive fields of different sizes. Different dilation rates provide contextual information of different scales, thereby improving the accuracy of feature extraction and target positioning.

[0065] The convolutional attention model is expressed as follows:

[0066] F2=CAM(F1,{d1,d2,d3});

[0067] Among them, F2 represents the second feature information, F1 represents the first feature information, d1, d2, and d3 represent different expansion rates, which are 1, 3, and 5 respectively in the embodiment of the present application, and CAM represents the convolutional attention model.

[0068] S3. Use a two-layer routing attention mechanism to allocate attention weights, allocate computing resources in a feature map corresponding to the second feature information F2 according to the attention weights, and use the allocated computing resources to extract the corresponding third feature information F3.

[0069] Since the traditional attention mechanism requires each query to pay attention to all key-value pairs, this may lead to a waste of computing and storage resources when processing data on a large scale. Based on this, the embodiment of the present application uses a bi-level routing attention mechanism to filter out most of the irrelevant key-value pairs, thereby improving computing efficiency and memory utilization.

[0070] See also Figure 4 In practical applications, the two-layer routing attention mechanism allocates computing resources and limits attention to a specific area of ​​the feature map corresponding to the second feature information F2, namely:

[0071] Q=W^Q×F2, K=W^Q×F2, V=W^V×F2;

[0072] Among them, Q, K, and V are query, key, and value respectively, and W^Q, W^K, and W^V are the corresponding weights respectively.

[0073] S4. Fusing the second feature information F2 and the third feature information F3 to obtain fourth feature information F4.

[0074] It can be understood that fusing the second feature information F2 with the third feature information F3 input by the double-layer routing attention mechanism can enhance the feature representation, wherein the fusion can be merging, splicing, concatenation, etc., that is:

[0075] F4=Concat(F3,F2);

[0076] Among them, Concat() represents the concatenation function.

[0077] S5. Use the SSFF module to fuse the feature maps of different scales corresponding to the fourth feature information F4 to obtain fifth feature information F5.

[0078] In the embodiment of the present application, the SSFF module is used to fuse the feature maps of different scales corresponding to the fourth feature information F4, specifically including:

[0079] S51. For the feature maps of the P4 and P5 feature levels of the fourth feature information F4, use 1*1 convolution to change the number of channels to 256, and use the nearest neighbor interpolation method to adjust their size to adapt to the size of the P3 level.

[0080] S52. Use the unsqueeze method to convert each feature layer from a 3D tensor [height, width, channel] to a 4D tensor [depth, height, width, channel], and stack the 4D feature map along the depth dimension to form a 3D feature map for subsequent convolution operations.

[0081] S53, using 3D convolution, 3D batch normalization and SiLU activation function to complete scale sequence feature extraction and obtain fifth feature information F5.

[0082] See also Figure 5 ,The SSFF module is included in the overall structure of ASF-YOLO. The SSFF module combines global or high-level semantic information from multiple scale images to provide complementary information for small target segmentation, thereby improving the accuracy of small target recognition. The SSFF module fuses the extracted multi-scale feature maps, solves the multi-scale problem of different types of targets and the target detection and segmentation problem of small targets, and improves the accuracy of instance segmentation.

[0083] S6. Utilize the Context Aggregation attention mechanism to aggregate the global context information in the feature graph corresponding to the fifth feature information F5 to obtain the sixth feature information F6.

[0084] See also Figure 6 , the parallel information from different contextual information is aggregated through the Context Aggregation attention mechanism, thereby improving the accuracy and convergence speed of the model.

[0085] S7, inputting the fifth feature information F5 and the sixth feature information F6 into a TFE module, and the TFE module obtains the seventh feature information F7 by fusing feature maps of different scales corresponding to the fifth feature information F5 and the sixth feature information F6.

[0086] See also Figure 7In practical applications, the TFE module takes the large-size, medium-size and small-size feature maps corresponding to the fifth feature information F5 and the sixth feature information F6 as input. For the large-size feature map, after convolution processing, the number of channels is adjusted to 1, and then down-sampled using a hybrid structure of maximum pooling and average pooling to retain the effectiveness and diversity of high-resolution features and Cordyceps images; for the small-size feature map, after adjusting the number of channels using the convolution layer, up-sampled using the nearest neighbor interpolation method to maintain the local feature richness of the low-resolution image and prevent the loss of small target feature information; the adjusted large-size, medium-size and small-size feature maps with the same size are spliced ​​in the spatial dimension to form three feature maps with the same dimension. After a convolution operation is performed on the spliced ​​feature map, it is spliced ​​in the channel dimension to obtain the output feature information of the TFE module, that is, the seventh feature information F7:

[0087] F7=Concat(F l ,F m ,F s );

[0088] Among them, F7 represents the seventh feature information, Concat() represents the concatenation function, and F l Represents a large-size feature map, F m represents the feature map of medium size, F s Represents a small-sized feature map.

[0089] S8. Input the fifth feature information F5 and the seventh feature information F7 into the CPAM module. The CPAM module combines the channel attention mechanism and the position attention mechanism to fuse the feature information to obtain the eighth feature information F8.

[0090] The Channel and Position Attention Mechanism (CPAM) fuses the feature information from the SSFF and TFE modules to further improve the accuracy of instance segmentation.

[0091] See also Figure 8The CPAM module includes a channel attention network that receives the fifth feature information F5 input, and a position attention network that receives the superimposed input of the channel attention network and the seventh feature information F7. Input 1 (Input1) is the channel attention network. The feature map corresponding to the fifth feature information F5 is input to Input1. The channel attention network first performs independent global average pooling on each channel, and uses two fully connected layers and a nonlinear Sigmoid function to generate channel weights. Input 2 (Input2) is the position attention network. The output of the channel attention network and the feature map corresponding to the seventh feature information F7 are input to Input2. The position attention network first divides the input feature map into two parts according to width and height, and then performs feature encoding on the two parts on the axes and respectively, and finally merges them to generate output to obtain the eighth feature information F8.

[0092] S9, inputting the eighth characteristic information F8 into the detection head, and the detection head detects and locates the Cordyceps target according to the eighth characteristic information F8.

[0093] It can be understood that the detection head is a neural network part for target detection, which is responsible for identifying target objects in the image and determining their positions. In the embodiment of the present application, the eighth feature information F8 obtained is input into the detection head, and then the Cordyceps in the Cordyceps image is identified, and the position and category of the Cordyceps are determined, thereby completing the detection and positioning of the Cordyceps target.

[0094] In summary, the Cordyceps target recognition method based on deep learning provided by the embodiment of the present application uses FasterNet as the Backbone to extract features, which reduces the number of parameters and the amount of calculation while ensuring that the detection performance of the model remains unchanged, and reduces the complexity of the model. The convolutional attention model uses hollow convolutions with different expansion rates, and different expansion rates provide contextual information of different scales, thereby improving the accuracy of feature extraction and Cordyceps target positioning. By introducing a double-layer routing attention mechanism, each query only needs to focus on a small number of related key-value pairs, thereby improving computational efficiency and memory utilization. The extracted multi-scale feature maps are fused by the SSFF module, which solves the multi-scale problem of different types of targets and the target detection and segmentation problem of small targets, and improves the accuracy of instance segmentation. Parallel information from different contextual information is aggregated by the ContextAggregation attention mechanism, thereby improving the accuracy and convergence speed of the model. The feature information is fused by the CPAM module, further improving the accuracy of instance segmentation.

[0095] Based on the above technical solution, this embodiment also proposes a Cordyceps target recognition device based on deep learning, which is used to implement the steps of the Cordyceps target recognition method based on deep learning as described in the embodiment.

[0096] See also Fig. 9 , Based on the above technical solution, this embodiment also proposes a terminal device, the terminal device includes a processor, a memory and a communication bus;

[0097] The communication bus is used to realize the connection and communication between the processor and the memory;

[0098] The processor is used to execute one or more programs in the memory to implement the steps of the Cordyceps target recognition method based on deep learning as described in the embodiment.

[0099] It can be understood that since the devices and equipment described in the embodiments of the present application are devices and equipment for implementing the Cordyceps target identification method based on deep learning described in the embodiments, for the devices and equipment disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For relevant matters, please refer to the partial description of the method, which will not be repeated here.

Claims

1. A Cordyceps target recognition method based on deep learning, characterized in that: The method comprises: Acquire a Cordyceps image, and use FasterNet as a Backbone network to perform feature extraction on the Cordyceps image to obtain first feature information; Inputting the first feature information into a convolutional attention model, performing convolution with hole convolutions of different dilation rates on the convolutional attention model to obtain semantic information features of different receptive fields, and using the semantic information features as second feature information; Allocating attention weights using a two-layer routing attention mechanism, allocating computing resources in a feature map corresponding to the second feature information according to the attention weights, and extracting corresponding third feature information using the allocated computing resources; Fusing the second feature information with the third feature information to obtain fourth feature information; Using the SSFF module to fuse the feature maps of different scales corresponding to the fourth feature information to obtain fifth feature information; Aggregating the global context information in the feature map corresponding to the fifth feature information using the Context Aggregation attention mechanism to obtain the sixth feature information; Inputting the fifth feature information and the sixth feature information into a TFE module, wherein the TFE module obtains seventh feature information by fusing feature maps of different scales corresponding to the fifth feature information and the sixth feature information; Inputting the fifth feature information and the seventh feature information into the CPAM module, the CPAM module combines the channel attention mechanism and the position attention mechanism to fuse the feature information to obtain the eighth feature information; The eighth characteristic information is input into the detection head, and the detection head detects and locates the Cordyceps target according to the eighth characteristic information.

2. The method for identifying Cordyceps target based on deep learning according to claim 1, characterized in that: The FasterNet uses a partial convolution method to extract spatial features. The number of floating-point operations in the partial convolution method is: The memory access amount in the partial convolution method is: Among them, FLOPs represents the number of floating point operations, AMC represents the memory access, h represents the height of the input Cordyceps image, w represents the width of the input Cordyceps image, k represents the side length of the convolution kernel, and c represents the length of the convolution kernel. p The number of channels of the mask representing the partial convolution.

3. The method for identifying Cordyceps target based on deep learning according to claim 1, characterized in that: The convolutional attention model is expressed as follows: F2=CAM(F1,{d1,d2,d3}); Among them, F2 represents the second feature information, F1 represents the first feature information, d1, d2, and d3 represent different expansion rates respectively, and CAM represents the convolutional attention model.

4. The method for identifying Cordyceps sinensis targets based on deep learning according to claim 1, characterized in that: The SSFF module is used to fuse the feature maps of different scales corresponding to the fourth feature information, specifically including: For the feature maps of the P4 and P5 feature levels of the fourth feature information, the number of channels is changed to 256 using 1*1 convolution, and the nearest neighbor interpolation method is used to adjust its size to adapt to the size of the P3 level; Use the unsqueeze method to convert each feature layer from a 3D tensor to a 4D tensor, and stack the 4D feature maps along the depth dimension to form a 3D feature map for subsequent convolution operations; 3D convolution, 3D batch normalization and SiLU activation function are used to complete scale sequence feature extraction and obtain the fifth feature information.

5. The method for identifying Cordyceps target based on deep learning according to claim 1, characterized in that: The TFE module fuses the feature maps of different scales corresponding to the fifth feature information and the sixth feature information, specifically including: The TFE module takes the large-size, medium-size and small-size feature maps corresponding to the fifth feature information and the sixth feature information as input, and for the large-size feature map, after convolution processing, adjusts its channel number to 1, and then uses a hybrid structure of maximum pooling and average pooling for down-sampling; for the small-size feature map, after adjusting the channel number using the convolution layer, uses the nearest neighbor interpolation method for up-sampling; The adjusted large-size, medium-size, and small-size feature maps of the same size are spliced ​​in the spatial dimension to form three feature maps with the same dimension. After a convolution operation is performed on the spliced ​​feature maps, they are spliced ​​in the channel dimension to obtain the output feature information of the TFE module, that is, the seventh feature information.

6. The method for identifying Cordyceps sinensis targets based on deep learning according to claim 5, characterized in that: The TFE module is expressed as follows: F7=Concat(F l ,F m ,F s ); Among them, F7 represents the seventh feature information, Concat() represents the concatenation function, and F l Represents a large-size feature map, F m represents the feature map of medium size, F s Represents a small-sized feature map.

7. The method for identifying Cordyceps target based on deep learning according to claim 1, characterized in that: The CPAM module includes a channel attention network that receives the fifth feature information input, and a position attention network that receives the channel attention network and the seventh feature information superimposed input.

8. A Cordyceps target recognition device based on deep learning, characterized in that: The device is used to implement the steps of the Cordyceps target recognition method based on deep learning as described in any one of claims 1 to 7.

9. A terminal device, characterized in that: The terminal device includes a processor, a memory and a communication bus; The communication bus is used to realize the connection and communication between the processor and the memory; The processor is used to execute one or more programs in the memory to implement the steps of the Cordyceps target recognition method based on deep learning as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Fish behavior analysis device and method based on underwater image processing

    CN120032423A