An online intelligent identification method for the sex of silkworm pupae with missing tail gonad information

By combining hollow convolution, channel attention module and stochastic gradient descent optimization, the problem of caudal gonad information defect in the identification of male and female silkworm pupae is solved, and efficient online identification of male and female silkworm pupae and visualization of gonad characteristics is achieved.

CN120318599BActive Publication Date: 2025-08-19EAST CHINA JIAOTONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510795688.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-08-19
Estimated Expiration
2045-06-16

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with the problems of tail gonad information defects and occlusion in the identification of male and female silkworm pupae, resulting in low recognition accuracy and low efficiency. Especially in deep learning models, gonad texture loss and posture uncertainty lead to limited classification accuracy.

Method used

The hollow convolution is combined with the high-efficiency channel attention module ECA, combined with spatial pyramid pooling and depth separable convolution, and the male and female silkworm pupae are identified through semantic segmentation method, and the stochastic gradient descent SGD optimization model is used to capture the tail gonad characteristics.

Benefits of technology

It improves the accuracy and efficiency of online identification of male and female silkworm pupae, can effectively learn tail gonad characteristics and visualize them, and enhances the model's learning ability and robustness of gonad characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318599B_ABST
    Figure CN120318599B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of bio-agricultural engineering technology and discloses an online intelligent method for sexing silkworm pupae with missing tail gonad information. The specific steps are as follows: Step 1: Constructing a silkworm pupa image dataset. The present invention combines dilated convolution with an efficient channel attention module (ECA) to construct a channel feature interaction system across receptive fields and obtain multi-scale channel correlation features. Spatial pyramid pooling and depthwise separable convolution are combined to respectively obtain channel and spatial information of the image, achieving decoupled extraction of spatial-channel dual-domain features. The depthwise separable convolution uses different dilated convolution coefficients. Compared to traditional end-to-end deep learning sexing methods, this method innovatively proposes a semantic segmentation-based approach for sexing silkworm pupae. By annotating semantic-level tail gonad features, it not only provides accurate classification results but also enables visualization of gonadal features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of biological agricultural engineering, and specifically relates to an online intelligent identification method for the sex of silkworm pupae with missing tail gonad information. Background Art

[0002] Currently, in the research on the identification of male and female silkworm pupae, hyperspectral imaging data is huge, the calculation is complex and time-consuming, and it cannot meet the silkworm industry's needs for online real-time and accurate identification. X-ray equipment is relatively expensive, and the silkworm pupa identification model based on near-infrared spectroscopy needs to be re-modeled every four hours. Pattern recognition methods are effective for identifying the sex of silkworm pupae with complete gonad information, but when silkworm pupae are identified online, the images obtained usually have missing gonad information and severe occlusion, which greatly challenges the recognition accuracy.

[0003] In the study of intelligent identification of male and female silkworm pupae based on deep learning algorithms, the integrity of gonad texture, as the only body surface marker with significant differences, directly affects the performance of the classification model. However, due to the ellipsoidal living characteristics of silkworm pupae and the uncertainty of posture during the transmission process of automated equipment, obtaining a complete image of the gonad faces great challenges: on the one hand, the swinging of the silkworm pupae's tail can easily cause the gonad surface to deviate from the imaging area; on the other hand, although the existing rotating device can improve the probability of capturing the gonad surface through multi-angle acquisition, due to the ellipsoidal living characteristics of silkworm pupae, the actual acquired images still generally lack gonad texture caused by tail rollover. In addition, this feature loss not only reduces the discrimination between male and female images, but also increases The difficulty of building a deep learning algorithm is increased, and the incomplete gonad sample set weakens the model's ability to learn key discriminant features; in the feature expression dimension, the lack of significant difference features increases the difficulty of the model to extract effective classification features, which ultimately leads to limited classification accuracy of the deep learning model. Therefore, for the silkworm pupa image dataset with missing gonad information, it is difficult to build an effective deep learning model to learn the tail gonad feature representation. In summary, the shortcomings of the existing technical solutions lie in the limitations of the model structure. For example, the missing tail gonad texture information makes it difficult to accurately describe the tail information of male and female silkworm pupae. These problems lead to low online identification accuracy and low efficiency in practical applications. Summary of the Invention

[0004] The purpose of the present invention is to provide an online intelligent identification method for the sex of silkworm pupae with missing tail gonad information, so as to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solution: an online intelligent method for distinguishing the sex of silkworm pupae with missing tail gonad information, comprising the following specific steps:

[0006] Step 1:

[0007] Construct a silkworm pupa image dataset;

[0008] Step 2:

[0009] Accurately label the tail gonads of male and female silkworm pupae images;

[0010] Step 3:

[0011] All data sets are divided into a ratio of 7:3;

[0012] Step 4:

[0013] Combine the dilated convolution with the efficient channel attention module ECA;

[0014] The ECA weights of the efficient channel attention module are expressed as follows:

[0015]

[0016] In the formula, k represents the convolution kernel size, c represents the number of channels of the feature map, G 1 represents the ECA weight, g1,...,g k Represents a set of learnable weight parameters, and T represents transpose;

[0017] The expression of efficient channel attention module ECA is:

[0018] P=I*σ(E Avg (I)*G 1 )

[0019] Where P represents the weighted ECA expression, I represents the input feature map, σ represents the Sigmoid function, and E Avg represents the channel-level global average operation;

[0020] Step 5:

[0021] A convolutional block attention module (CBAM) is used to assign differentiated weights to categories of different importance, and collaboratively learn key details and global information in feature images. It consists of a channel attention submodule and a spatial attention submodule.

[0022] Step 6:

[0023] Dilated convolution with different dilation coefficients is used to generate multi-scale feature maps, and an improved dilated spatial pyramid pooling module is introduced for feature splicing and fusion.

[0024] Step 7:

[0025] Feature addition is used to fuse features, and then nonlinear operations are introduced to enhance the expressiveness of the model, enabling it to learn more complex features and functional relationships;

[0026] Step 8:

[0027] Stochastic gradient descent (SGD) is used to help capture the significant differences between the two types of gonads. In each iteration, the gradient is calculated and the model parameters are updated based on one or a small number of samples.

[0028] Step 9:

[0029] To evaluate the silkworm pupa sex identification model based on semantic segmentation methods, average accuracy, mIoU, Recall, mFscore, and mPrecision are used to evaluate recognition accuracy. The FPS metric is used to measure the model's inference speed, indicating the number of images the model can process per second.

[0030] As a preferred technical solution of the present invention, the silkworm pupa image dataset described in step one includes normal and side-turned male and female silkworm pupa images, each image resolution is 960 pixels × 1280 pixels, and the silkworm pupa image dataset contains 5 silkworm pupa varieties: 628, KW854B1, KW854B2, KW872A2, and three cotton silkworms.

[0031] As a preferred technical solution of the present invention, the processing process of combining the dilated convolution and the efficient channel attention module ECA described in step 4 is as follows:

[0032]

[0033] In the formula, Y[i] represents the result after processing, r is the void ratio, Indicates the accumulation of weighted results at all positions within the convolution kernel, G[k] represents the weight assigned to the convolution kernel position k, k is the one-dimensional convolution kernel size, in the efficient channel attention module ECA, the hole rate r is fixed to 1, when r = 2, the weight matrix G of the hole one-dimensional convolution 2 As shown below:

[0034]

[0035] As a preferred technical solution of the present invention, when the channel attention submodule described in step 5 is used, the input image feature is E∈R C×H×W , where C represents the number of channels, H and W represent the height and width of the input feature map respectively, then the whole process can be expressed as:

[0036] E avg =MLP(AvgPool(E))

[0037] E max =MLP(MaxPool(E))

[0038] E m =E avg +E max

[0039] E c =σ(E m )·E

[0040] Where σ represents the Sigmoid activation function, E avg represents the image features after average pooling, E max represents the image features after maximum pooling, and MLP represents multi-layer perceptron.

[0041] As a preferred technical solution of the present invention, the spatial attention submodule in step 5 is based on the output E of the channel attention submodule. c As input, average pooling and maximum pooling are performed on the channel dimension to obtain and After data compression and spatial weight extraction, two feature maps are obtained, as shown below:

[0042]

[0043] The two spatial feature maps are spliced into 2×H×W, and the convolution layer is used to fuse and extract the spliced features to obtain weighted spatial information. After processing by the activation function, the spatial attention feature map (1×H×W) is finally obtained:

[0044]

[0045] Among them, E 7×7 It represents the convolution layer with a convolution kernel size of 7×7.

[0046] The obtained weighted feature map is then multiplied by the input feature map to obtain the attention-guided feature map.

[0047] As a preferred technical solution of the present invention, the dilated spatial pyramid pooling module described in step six performs five convolution operations on the feature map of the previous layer: the first convolution uses ordinary convolution and adds a batch normalization BN operation at the same time; in order to obtain multi-scale feature maps without increasing the parameter scale, the second, third and fourth convolution operations use depth-separable convolution; in the fifth convolution operation, the original image size is first reduced to 1 / 16, and then global average pooling is performed, and the feature map is sent to a 1×1 convolution kernel with 256 output channels, and a batch normalization BN operation is performed. Finally, bilinear interpolation upsampling is used to restore the low-dimensional feature map to its original size, and finally the five extracted multi-scale feature maps are spliced.

[0048] As a preferred technical solution of the present invention, the stochastic gradient descent SGD formula described in step eight is:

[0049] θ t+1 =θt -η▽f i (θ t )

[0050] In the formula, θ represents the model parameters, t represents the current iteration number, and t+1 represents the next iteration number; η is the learning rate, which controls the size of the step; f i is the loss function for the i-th data point or data batch; the formula means that in each iteration, the gradient under the current parameters is calculated, and then the parameters are updated in the opposite direction of the gradient to reduce the value of the loss function.

[0051] The beneficial effects of the present invention are as follows:

[0052] The present invention combines dilated convolution with an efficient channel attention module (ECA) to construct a channel feature interaction system across receptive fields and obtain multi-scale channel correlation features. It combines spatial pyramid pooling and depthwise separable convolution to respectively obtain channel and spatial information of the image, realizing spatial-channel dual-domain feature decoupling extraction. The depthwise separable convolution uses different dilated convolution coefficients to effectively learn the global information of the silkworm pupa image and the key area information of the tail. The stepwise optimization method of stochastic gradient descent (SGD) can accurately adjust the model's learning process of gonad features, making it more effective in capturing the salient features of the target area. The above scheme can not only effectively improve the learning and expression of the gonad features of the silkworm pupae's tail when the posture is flipped, but also greatly improve the accuracy of online identification of the sex of silkworm pupae. Compared with the traditional end-to-end deep learning sex classification method, the present invention innovatively proposes a method for sex identification of silkworm pupae based on semantic segmentation for the first time. By annotating the gonad features of the tail at the semantic level, it can not only provide accurate classification results but also visualize the gonad features. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is the flow chart of the algorithm of the present invention;

[0054] Figure 2 Schematic diagram of the efficient channel attention module ECA with different void rates of the present invention;

[0055] Figure 3 Schematic diagram of the structure of the convolutional block attention module CBAM of the present invention;

[0056] Figure 4 This is a schematic diagram of the improved dilated space pyramid pooling module of the present invention. DETAILED DESCRIPTION

[0057] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0058] like Figures 1 to 4 As shown, the embodiment of the present invention provides an online intelligent identification method for the sex of silkworm pupae with missing tail gonad information, and the specific steps are as follows:

[0059] Step 1:

[0060] Construct a silkworm pupa image dataset;

[0061] Step 2:

[0062] Accurately label the tail gonads of male and female silkworm pupae images;

[0063] Step 3:

[0064] All data sets are divided into a ratio of 7:3;

[0065] Step 4:

[0066] Combine the dilated convolution with the efficient channel attention module ECA;

[0067] The ECA weights of the efficient channel attention module are expressed as follows:

[0068]

[0069] In the formula, k represents the convolution kernel size, c represents the number of channels of the feature map, G 1 represents the ECA weight, g1,...,g k Represents a set of learnable weight parameters, and T represents transpose;

[0070] The expression of efficient channel attention module ECA is:

[0071] P=I*σ(E Avg (I)*G 1 )

[0072] Where P represents the weighted ECA expression, I represents the input feature map, σ represents the Sigmoid function, and E Avg represents the channel-level global average operation;

[0073] Step 5:

[0074] A convolutional block attention module (CBAM) is used to assign differentiated weights to categories of different importance, and collaboratively learn key details and global information in feature images. It consists of a channel attention submodule and a spatial attention submodule.

[0075] Step 6:

[0076] Atrous convolution with different dilation coefficients is used to generate multi-scale feature maps, and an improved atrous spatial pyramid pooling module is introduced for feature splicing and fusion.

[0077] Step 7:

[0078] Feature addition is used to fuse features, and then nonlinear operations are introduced to enhance the expressiveness of the model, enabling it to learn more complex features and functional relationships;

[0079] Step 8:

[0080] Stochastic gradient descent (SGD) is used to help capture the significant differences between the two types of gonads. In each iteration, the gradient is calculated and the model parameters are updated based on one or a small number of samples.

[0081] Step 9:

[0082] To evaluate the silkworm pupa sex identification model based on semantic segmentation methods, average accuracy, mIoU, Recall, mFscore, and mPrecision are used to evaluate recognition accuracy. The FPS metric is used to measure the model's inference speed, indicating the number of images the model can process per second.

[0083] Based on the Fast-SCNN lightweight semantic segmentation model, the present invention introduces a dilated and efficient channel attention module to obtain multi-scale channel-related features without the need for additional computational overhead. In the global feature extraction stage, a dilated and efficient convolutional attention module is introduced to assign differentiated weights to categories of different importance, collaboratively learn key details and global information in feature images, and improve the learning and expression capabilities of the network. To enhance the model's ability to extract multi-scale contextual information, an improved dilated spatial pyramid pooling module is introduced. Dilated convolutions with different expansion rates are used to extract multi-scale features in parallel, thereby improving the sensitivity to the tiny gonad texture features of the silkworm pupae's tail and retaining more high-frequency information of the original image. A stochastic gradient descent loss function is introduced, and through frequent updates and dynamic iterations, the model is able to focus on subtle regional features and local change features, thereby more efficiently capturing the gonad texture differences between male and female silkworm pupae.

[0084] The silkworm pupa image dataset in step 1 includes normal and side-turned male and female silkworm pupa images, with a resolution of 960 pixels × 1280 pixels for each image. The silkworm pupa image dataset contains five silkworm pupa varieties: 628, KW854B1, KW854B2, KW872A2, and three cotton silkworms.

[0085] The dataset contains 875 images in total, including 432 images of female silkworm pupae, 443 images of male silkworm pupae, 435 normal images, and 440 flipped images.

[0086] The processing process of combining the dilated convolution in step 4 with the efficient channel attention module ECA is as follows:

[0087]

[0088] In the formula, Y[i] represents the result after processing, r is the void ratio, Indicates the accumulation of weighted results at all positions within the convolution kernel, G[k] represents the weight assigned to the convolution kernel position k, k is the one-dimensional convolution kernel size, in the efficient channel attention module ECA, the hole rate r is fixed to 1, when r = 2, the weight matrix G of the hole one-dimensional convolution 2 As shown below:

[0089]

[0090] The scale of channel correlation features captured by the efficient channel attention module ECA depends only on the size of the convolution kernel, and cannot capture multi-scale channel correlation features. Therefore, the efficient channel attention module ECA is combined with the void convolution. The void rate r represents the sampling interval of the input feature. The convolution kernel size is expanded by inserting r-1 zero values in the convolution kernel. Compared with the standard one-dimensional convolution, the void one-dimensional convolution not only does not introduce additional parameters, but also can capture channel correlation features of any scale by adjusting the void rate. Figure 2 Visualization results of dilated one-dimensional convolution with different dilation rates.

[0091] Among them, when the channel attention submodule in step 5 is used, the input image feature is set to E∈R C×H×W , where C represents the number of channels, H and W represent the height and width of the input feature map respectively, then the whole process can be expressed as:

[0092] E avg =MLP(AvgPool(E))

[0093] E max =MLP(MaxPool(E))

[0094] E m =E avg +Emax

[0095] E c =σ(E m )·E

[0096] Where σ represents the Sigmoid activation function, E avg represents the image features after average pooling, E max represents the image features after maximum pooling, and MLP represents multi-layer perceptron.

[0097] The input features are compressed by maximum pooling and average pooling, and the feature weights are extracted to obtain two different feature representations. Subsequently, the features are input into the multi-layer perceptron MLP to generate two feature maps of dimension C×1×1. These two feature maps are added in the spatial dimension to obtain E m , and then activated by the Sigmoid function to obtain the required channel attention weight E c ,Finally, after the weighted operation, the feature channel of the initial input image is multiplied by the channel attention weight to obtain the feature map after feature enhancement.

[0098] Among them, the spatial attention submodule in step 5 is based on the output E of the channel attention submodule c As input, average pooling and maximum pooling are performed on the channel dimension to obtain and After data compression and spatial weight extraction, two feature maps are obtained, as shown below:

[0099]

[0100] The two spatial feature maps are spliced into 2×H×W, and the convolution layer is used to fuse and extract the spliced features to obtain weighted spatial information. After processing by the activation function, the spatial attention feature map (1×H×W) is finally obtained:

[0101]

[0102] Among them, E 7×7 It represents the convolution layer with a convolution kernel size of 7×7.

[0103] The obtained weighted feature map is then multiplied by the input feature map to obtain the attention-guided feature map.

[0104] The Convolutional Block Attention Module (CBAM) is a dual-attention mechanism that filters effective information in both channel and spatial dimensions. This mechanism can assign differentiated weights to categories of different importance, and collaboratively learn key details and global information in feature images, thereby enhancing the neural network's attention to the overall scene and the boundaries of various images, and improving the network's learning and expression capabilities.

[0105] Among them, the dilated spatial pyramid pooling module in step six performs five convolution operations on the feature map of the previous layer: the first convolution uses ordinary convolution and adds batch normalization BN operation at the same time; in order to obtain multi-scale feature maps without increasing the parameter scale, the second, third and fourth convolution operations use depth-separable convolution; in the fifth convolution operation, the original image size is first reduced to 1 / 16, and then global average pooling is performed, and the feature map is sent to a 1×1 convolution kernel with 256 output channels, and batch normalization BN operation is performed. Finally, bilinear interpolation upsampling is used to restore the low-dimensional feature map to its original size, and finally the 5 extracted multi-scale feature maps are spliced.

[0106] Using dilated convolutions with different expansion coefficients to generate multi-scale feature maps can obtain the contextual multi-scale information of the input feature maps; and introducing the improved dilated spatial pyramid pooling module for feature splicing and fusion can address the problem of feature map scale changes caused by inconsistent input image sizes.

[0107] Among them, the stochastic gradient descent SGD formula in step eight is:

[0108] θ t+1 =θ t -η▽f i (θ t )

[0109] In the formula, θ represents the model parameters, t represents the current iteration number, and t+1 represents the next iteration number; η is the learning rate, which controls the size of the step; f i is the loss function for the i-th data point or data batch; the formula means that in each iteration, the gradient under the current parameters is calculated, and then the parameters are updated in the opposite direction of the gradient to reduce the value of the loss function.

[0110] In solving highly challenging tasks such as gonad classification, stochastic gradient descent (SGD) has demonstrated unique advantages through its dynamic adjustment strategy. The gonadal area of male and female silkworm pupae is relatively small, and there are significant differences in the morphology of the two types of gonads. After flipping, the expression of male and female characteristics will change with the angle. This complexity places higher demands on the optimization algorithm of the classification model. Stochastic gradient descent (SGD) enables the model to focus on subtle regional features, especially these local change features, through frequent updates and dynamic iterations, thereby more efficiently capturing the significant differences between the two types of gonads. In addition, the randomness enables stochastic gradient descent (SGD) to more flexibly adapt to the feature differences of different samples when dealing with the complex changes brought about by the flipping of gonadal regional features, significantly improving the model's robustness and adaptability to changes in flipping angles.

[0111] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0112] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. An online intelligent identification method for the sex of silkworm pupae with missing tail gonad information, characterized in that: The specific steps are as follows: Step 1: Construct a silkworm pupa image dataset; Step 2: Accurately label the tail gonads of male and female silkworm pupae images; Step 3: All data sets are divided into a ratio of 7:3; Step 4: Combine the dilated convolution with the efficient channel attention module ECA; The ECA weights of the efficient channel attention module are expressed as follows: In the formula, k represents the convolution kernel size, c represents the number of channels of the feature map, G 1 represents the ECA weight, g1,...,g k Represents a set of learnable weight parameters, and T represents transpose; The expression of efficient channel attention module ECA is: P=I*σ(E Avg (I)*G 1 ) Where P represents the weighted ECA expression, I represents the input feature map, σ represents the Sigmoid function, and E Avg represents the channel-level global average operation; Step 5: A convolutional block attention module (CBAM) is used to assign differentiated weights to categories of different importance, and collaboratively learn key details and global information in feature images. It consists of a channel attention submodule and a spatial attention submodule. Step 6: Dilated convolution with different dilation coefficients is used to generate multi-scale feature maps, and an improved dilated spatial pyramid pooling module is introduced for feature splicing and fusion. Step 7: Feature addition is used to fuse features, and then nonlinear operations are introduced to enhance the expressiveness of the model, enabling it to learn more complex features and functional relationships; Step 8: Stochastic gradient descent (SGD) is used to help capture the significant differences between the two types of gonads. In each iteration, the gradient is calculated and the model parameters are updated based on one or a small number of samples. Step 9: To evaluate the silkworm pupa sex identification model based on semantic segmentation methods, average accuracy, mIoU, Recall, mFscore, and mPrecision are used to evaluate recognition accuracy. The FPS metric is used to measure the model's inference speed, indicating the number of images the model can process per second.

2. The method for online intelligent identification of the sex of silkworm pupae with missing tail gonad information according to claim 1, characterized in that: The silkworm pupa image dataset described in step 1 includes normal and side-turned male and female silkworm pupa images, each image has a resolution of 960 pixels × 1280 pixels, and the silkworm pupa image dataset contains 5 silkworm pupa varieties: 628, KW854B1, KW854B2, KW872A2, and three cotton silkworms.

3. The method for online intelligent identification of the sex of silkworm pupae with missing tail gonad information according to claim 1, characterized in that: The processing process of combining the dilated convolution with the efficient channel attention module ECA described in step 4 is as follows: In the formula, Y[i] represents the result after processing, r is the void ratio, Indicates the accumulation of weighted results at all positions within the convolution kernel, G[k] represents the weight assigned to the convolution kernel position k, k is the one-dimensional convolution kernel size, in the efficient channel attention module ECA, the hole rate r is fixed to 1, when r = 2, the weight matrix G of the hole one-dimensional convolution 2 As shown below:

4. The method for online intelligent identification of the sex of silkworm pupae with missing tail gonad information according to claim 1, characterized in that: When the channel attention submodule described in step 5 is used, the input image feature is E∈R C×H×W , where C represents the number of channels, H and W represent the height and width of the input feature map respectively, then the whole process can be expressed as: E avg =MLP(AvgPool(E)) E max =MLP(MaxPool(E)) AND m =And avg +E max AND c =σ(E m )·AND Where σ represents the Sigmoid activation function, E avg represents the image features after average pooling, E max represents the image features after maximum pooling, and MLP represents multi-layer perceptron.

5. The method for online intelligent identification of the sex of silkworm pupae with missing tail gonad information according to claim 1, characterized in that: The spatial attention submodule described in step 5 is based on the output E of the channel attention submodule c As input, average pooling and maximum pooling are performed on the channel dimension to obtain and After data compression and spatial weight extraction, two feature maps are obtained, as shown below: The two spatial feature maps are spliced into 2×H×W, and the convolution layer is used to fuse and extract the spliced features to obtain weighted spatial information. After processing by the activation function, the spatial attention feature map (1×H×W) is finally obtained: Among them, E 7×7 It represents the convolution layer with a convolution kernel size of 7×7. The obtained weighted feature map is then multiplied by the input feature map to obtain the attention-guided feature map.

6. The method for online intelligent identification of the sex of silkworm pupae with missing tail gonad information according to claim 1, characterized in that: The dilated spatial pyramid pooling module described in step 6 performs five convolution operations on the feature map of the previous layer: the first convolution uses ordinary convolution and adds batch normalization (BN) operation at the same time; in order to obtain multi-scale feature maps without increasing the parameter scale, the second, third and fourth convolution operations use depth-separable convolution; in the fifth convolution operation, the original image size is first reduced to 1 / 16, and then global average pooling is performed, and the feature map is sent to a 1×1 convolution kernel with 256 output channels, and batch normalization (BN) operation is performed. Finally, bilinear interpolation upsampling is used to restore the low-dimensional feature map to its original size, and finally the five extracted multi-scale feature maps are spliced.

7. The method for online intelligent identification of the sex of silkworm pupae with missing tail gonad information according to claim 1, characterized in that: The stochastic gradient descent SGD formula described in step 8 is: In the formula, θ represents the model parameters, t represents the current iteration number, and t+1 represents the next iteration number; η is the learning rate, which controls the size of the step; f i is the loss function for the i-th data point or data batch; the formula means that in each iteration, the gradient under the current parameters is calculated, and then the parameters are updated in the opposite direction of the gradient to reduce the value of the loss function.

Citation Information

Patent Citations

  • Image Semantic Segmentation Method Based on Deep Full Convolutional Network and Conditional Random Field

    AU2020103901A4

  • Canny-matrix-pulse-edge-mode-based silkworm chrysalis male-female identification method

    CN104408465A