Corn kernel image segmentation method

By adding a feature extraction model of attention module in the jump connection layer of the Unet network, the problem that feature extraction in corn kernel image segmentation is solved, and a higher segmentation accuracy is achieved.

CN119540251APending Publication Date: 2025-02-28HENAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411696083.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the existing corn kernel image segmentation method, the features extracted by the neural network are difficult to reflect the fine feature information of corn kernels, resulting in low segmentation accuracy.

Method used

The feature extraction model trained by the training set is used to extract the image containing corn kernels to be segmented. The feature extraction model includes the Unet network with attention modules added to each jump connection layer. The attention module captures multi-scale and multi-resolution context information through multi-scale convolution, spatial attention, and channel attention, and combines features through Hadamard product and Sigmoid computed attention weights.

Benefits of technology

By optimizing the Unet network that jumps to the connection layer, the extracted features can more accurately reflect the fine feature information of corn kernels, effectively improving the segmentation accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540251A_ABST
    Figure CN119540251A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of grain information processing, and particularly relates to a corn kernel image segmentation method. According to the invention, feature extraction is carried out through the trained feature extraction model and then segmentation is carried out; the feature extraction model comprises a Unet network in which an attention module is added to each jump connection layer; the attention module takes the output of the encoder as the input, performs point-by-point convolution, normalization and RELU activation, performs deep convolution through at least two convolution layers with different convolution kernels, fuses convolution results, performs channel shuffling, and performs residual connection with the input through point-by-point convolution and normalization; performing channel separation on a connection result, extracting features, processing the extracted features, and combining the processed features with the connection result by using a Hadamard product; feature extraction is carried out on different channels of a merging result, then convolution processing is carried out, and then a Hadamard product and a connection result are merged to serve as output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of grain information processing, and in particular relates to a corn kernel image segmentation method. Background Art

[0002] With the rapid development of sensor technology, optical technology, computer technology, image processing technology and food information technology, image segmentation, as a key technology in the field of computer vision, has been widely used in many fields, especially in the field of food information processing. Through the corn kernel image data collected by the camera, a series of pre-processing operations such as image filtering, image denoising, and image enhancement are performed, and the kernel segmentation, classification, identification and sorting are realized through the neural network classifier, so as to realize the automated grain quality detection work, which is very popular in agricultural and commercial output applications.

[0003] The traditional grain collection system includes a camera, a computer, an image acquisition card, a data acquisition test bench and a set of acquisition software. The acquisition software drives the camera to collect grain images. The camera lens contains a convex lens. The reflection of corn grains is captured by the photosensitive device through the convex lens. The convex lens, aperture and shutter are used to adjust the amount of light entering. Through photoelectric conversion, the light signal is converted into an electrical signal, and then into an image, finally realizing grain data collection.

[0004] However, the camera is easily disturbed by external factors such as ambient light, test bench disturbance and self-adjustment during data collection, which directly affects the performance of the collection system, resulting in grain segmentation, classification, identification and sorting through the collected grain image data, thus limiting the development of automated grain quality detection. In order to reduce the impact of camera data collection on grain segmentation, the prior art uses a neural network (such as a Unet neural network) to extract features from the collected grain image, and then performs subsequent grain segmentation based on the obtained features; however, due to the small shape, large number, low recognition, easy adhesion and rich grain texture information of corn kernels, it is easy for the features extracted by the neural network to be difficult to reflect the fine feature information of corn kernels, resulting in low segmentation accuracy. Summary of the invention

[0005] The object of the present invention is to provide a corn kernel image segmentation method to solve the problem in the existing corn kernel image segmentation method that the features extracted by the neural network used for feature extraction of the collected kernel images are difficult to reflect the fine feature information of the corn kernels, resulting in low segmentation accuracy.

[0006] In order to achieve the above-mentioned object, the present invention provides a corn kernel image segmentation method, which extracts features from an image containing corn kernels to be segmented by a feature extraction model trained by a training set and then segments the image to obtain a segmentation result of a single corn kernel; the feature extraction model includes a Unet network in which an attention module is added to each jump connection layer;

[0007] The attention module takes the output of the encoder corresponding to the skip connection layer as input, performs point-by-point convolution, normalization, and RELU activation to expand the number of channels, and then passes through at least two convolution layers with different convolution kernels for depth convolution. After weighted fusion of each convolution result, the channel is shuffled, and then converted back to the original channel through point-by-point convolution and normalization and residual connection is performed with the input.

[0008] The connection result is channel-separated and features are extracted, and the extracted features are processed to obtain processed features. The processed features are merged with the connection result according to the attention weight calculated by Sigmoid using Hadamard product;

[0009] After feature extraction between different channels of the merged result, it is processed by a convolution layer with a convolution size greater than or equal to the set size, and then the processed features are merged with the connection result according to the attention weight calculated by Sigmoid using the Hadamard product as the output of the attention module.

[0010] Furthermore, the Unet network is a VMUnet network architecture.

[0011] Furthermore, the connection result is subjected to channel separation to extract features, and the extracted features are processed to obtain the processed features, including:

[0012] The connection results are separated into channels, and then the features of the channel separation results are extracted through average pooling and maximum pooling respectively. The features extracted from the two are respectively subjected to point-by-point convolution for reducing the channel and RELU activation, and point-by-point convolution for restoring the channel. The features obtained by each processing are weighted fused to obtain the processed features.

[0013] Furthermore, the channel separation performed on the residual connection result is the channel separation performed on the height and width dimensions in the residual connection result.

[0014] Furthermore, the feature extraction model is trained by comparing the segmentation result obtained by the features extracted by the feature extraction model with the loss corresponding to the true label.

[0015] Furthermore, the loss function used in training the feature extraction model is a total loss function obtained by weighting the cross entropy loss and Dice loss corresponding to the segmentation result obtained according to the features extracted by the feature extraction model and the true label.

[0016] Furthermore, the convolution of the set size is a convolution consisting of three convolution blocks with 3×3 convolution kernels.

[0017] Furthermore, the image containing corn kernels to be segmented is obtained by performing image denoising, filtering, enhancement, size normalization and channel rearrangement processing on the image containing corn kernels acquired by the image acquisition device.

[0018] Furthermore, the image acquisition device includes a planar backlight platform for placing corn kernels, a camera fixture for fixing a camera, a camera for taking images of corn kernels on the planar backlight platform from above, an XYZ three-dimensional displacement lifting platform for placing the camera fixture, a lateral fine-tuning dovetail groove displacement slider and a longitudinal fine-tuning dovetail groove displacement slider for placing the lifting platform, and a duralumin optical breadboard.

[0019] Furthermore, the method of performing feature extraction between different channels of the merged result and then performing convolution layer processing with a convolution size greater than or equal to a set size includes: performing feature extraction between the features corresponding to different channels of the merged result, obtaining the maximum value and the average value of the feature extraction, splicing the two, and then performing convolution layer processing with a convolution layer size greater than or equal to the set size.

[0020] The beneficial effects of the technical solution of the corn kernel image segmentation method of the present invention include: a VMUnet network optimized by a multi-scale attention module for a jump connection layer, wherein the attention module first performs channel expansion and point-by-point convolution, normalization, and RELU activation on the jump connection layer features corresponding to each downsampled output layer, and then performs convolution extraction, weighted fusion, and channel shuffling through convolution kernels of different scales, thereby capturing multi-scale and multi-resolution context information, and then converts the upsampled point-by-point convolution and normalization of each layer back to the original channel and performs residual connection with the output of the encoder to enhance the features of the encoder output and retain the feature mapping of the context relationship; further, the connection result is channel separated, the scale of the feature image is reduced, the number of layers (i.e., the number of channels) of the feature image is increased, and the depth features of the feature image are preliminarily extracted; then, the features are extracted and processed, and the processed features are executed using the Hadamard product Sigmoid function is equivalent to further enhancing the features of the encoder output by emphasizing the spatial attention used to capture local context information; finally, feature extraction is performed between different channels of the merged result, that is, deep feature extraction is further performed on the feature image, and then the two are spliced ​​and processed by a convolution layer of a convolution layer greater than or equal to the set size, that is, a convolution layer with a larger kernel is used to enhance the local context relationship between features, and then the processed features are merged with the connection results according to the attention weights calculated by Sigmoid using the Hadamard product as the output of the attention module, which is equivalent to further enhancing the features of the encoder output through channel attention used to emphasize channel correlation, and finally ensuring that the features of the input decoder contain more context features and have a greater feature depth, so they can better reflect the fine information of the corn kernels in the image. The segmentation of the corn kernel image based on these features can effectively improve the segmentation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is an example diagram of the architecture of the feature extraction model in the embodiment of the corn kernel image segmentation method of the present invention;

[0022] Figure 2 This is an example diagram of the architecture of the attention module for flame retardants in the embodiment of the corn kernel image segmentation method of the present invention;

[0023] Figure 3This is a structural example diagram of an image acquisition device for acquiring images containing corn kernels in an embodiment of the corn kernel image segmentation method of the present invention; 1 is a corn kernel acquisition Microscope Camera, 2 is a shockproof test bench, 3 is a storage table with a backlight, 4 is a shockproof rubber pad, 5 is a base support for the camera system, 6 is a horizontal lateral adjustment slider, 7 is a horizontal longitudinal adjustment slider, 8 is a vertical movement adjustment slider, 9 is a camera lateral support, and 10 is a shockproof table leg. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.

[0025] Corn kernel image segmentation method embodiment

[0026] This embodiment provides a technical solution for a corn kernel image segmentation method, by adding an attention module including a multi-scale convolution for enhancing feature mapping for preserving contextual relationships, a spatial attention for emphasizing the capture of local contextual information, and a channel attention for emphasizing channel correlation to each jump connection layer of the Unet network, thereby achieving the effect of refining the feature mapping, so that the extracted features can more accurately reflect the fine feature information of the corn kernels, thereby effectively improving the segmentation accuracy.

[0027] The corn kernel image segmentation method specifically includes:

[0028] The image containing corn kernels to be segmented is subjected to feature extraction and segmentation by a feature extraction model trained by the training set, thereby obtaining a segmentation result of a single corn kernel; the feature extraction model includes a Unet network in which an attention module is added to each skip connection layer;

[0029] The attention module takes the output of the encoder corresponding to the jump connection layer as input, performs point-by-point convolution and normalization, and RELU activation to expand the number of channels.

[0030] After at least two convolution layers with different convolution kernels, the convolution results are weighted and fused, and then the channels are shuffled, and then converted back to the original channels through point-by-point convolution and normalization, and residual connection is performed with the input;

[0031] The connection result is channel-separated and features are extracted, and the extracted features are processed to obtain processed features. The processed features are merged with the connection result according to the attention weight calculated by Sigmoid using Hadamard product;

[0032] After feature extraction between different channels of the merged result, it is processed by a convolution layer with a convolution size greater than or equal to the set size, and then the processed features are merged with the connection result according to the attention weight calculated by Sigmoid using the Hadamard product as the output of the attention module.

[0033] Therefore, the corn kernel image segmentation method of this embodiment adopts the Unet network optimized by the attention module of the jump connection layer, wherein the attention module first performs point-by-point convolution and normalization, RELU activation and other pre-feature extraction processing on the output of the encoder corresponding to the jump connection layer to expand the number of channels, and then performs deep convolution of different scales through different convolution kernels to capture multi-scale and multi-resolution context information, and then converts it back to the original channel through another point-by-point convolution layer and normalization and performs residual connection with the output of the encoder to achieve the effect of feature mapping that enhances the feature output of the encoder and retains the context relationship; and by performing channel separation on the connection result, the scale of the feature image is reduced, and the number of layers (i.e., the number of channels) of the feature image is increased, thereby increasing the depth of feature extraction of the feature image; therefore, by extracting features, a feature with greater depth can be obtained, and the features can reflect more details, and the features extracted by the two are processed separately, and the Hadamard The processed features are merged with the connection results according to the attention weights calculated by Sigmoid, which is equivalent to enhancing the features of the encoder output again through spatial attention used to emphasize the capture of local context information; finally, feature extraction is performed between different channels of the merged results to further increase the depth of feature extraction of the feature image, and then the convolution layer is processed with a convolution greater than or equal to the set size, that is, a convolution layer with a larger kernel is used to enhance the local context relationship between the features, and then the processed features are merged with the connection results according to the attention weights calculated by Sigmoid as the output of the attention module using the Hadamard product, which is equivalent to enhancing the features of the encoder output again through channel attention used to emphasize channel correlation, and finally ensuring that the features input to the decoder contain more context features and have a greater feature depth, so they can better reflect the fine information of the corn kernels in the image. The segmentation of the corn kernel image according to these features can effectively improve the segmentation accuracy.

[0034] Among them, Figure 1 As shown, the Unet network used in this embodiment is a VMUnet network architecture (i.e. Figure 1The network architecture mainly consists of encoders including VSS Block and Patch Merging at various levels, decoders including VSS Block and Patch Expanding, and skip connection layers, wherein the MSAM part is the attention module added in the skip connection layer in this embodiment). The structured state space sequence model and the Mamba model are adopted in the network architecture, which can make full use of the advantages of the VMUnet network architecture, that is, on the one hand, the advantages of Unet are adopted, and on the other hand, the context information is extracted, and then combined with the multi-scale attention mechanism on the skip connection, the detailed features of the small target task can be further highlighted from the depth level and the spatial layer, thereby improving the segmentation accuracy. Except for the attention module added in the skip connection layer, the other parts of the VMUnet network architecture and their specific principles belong to the prior art and will not be described here.

[0035] Specifically, in this embodiment, the structure of the attention module refers to Figure 2 First, the output of the encoder corresponding to the skip connection layer is taken as input, and the output of the attention module is obtained by sequentially passing through the efficient multi-scale convolution block MSC(·) for enhancing the feature map that retains the contextual relationship, the channel attention block CA(·) that emphasizes channel correlation, and the spatial attention block SA(·) that emphasizes capturing local contextual information; the specific structure of MSC(·) is as follows Figure 2 As shown in the corresponding dotted box in , the input of the attention module is first subjected to a point-by-point convolution PWC1(·) (i.e., a 1×1 convolution, Figure 2 denoted as Conv1×1) and normalized ( Figure 2 Indicated as BN), RELU activation ( Figure 2 After that, they pass through at least two convolution layers with different convolution kernels. In this embodiment, they pass through three convolution layers with different convolution kernels (i.e. Figure 2 DW1, DW2, DW3) are used for depth convolution. In other embodiments, other numbers of convolution layers may be used as long as different scales of convolution can be achieved respectively. In principle, the convolution of no less than 2 scales shall be achieved. Since the depth convolution ignores the relationship between channels, the channel shuffling method is used to achieve cross-channel shuffling to compensate for the system loss caused by the information of the feature images of the same layer destroyed by the depth convolution (i.e., the convolution between layers). Then, the channel shuffling is performed after weighted fusion of the convolution results ( Figure 2 , which is represented as shuffle channel in the figure), and then converted back to the original channel through point-by-point convolution PWC2(·) and normalization and residual connection (i.e. Figure 2 Element-wiseAddition in .

[0036] After MSC (·), a channel attention block CA (·) that emphasizes channel correlation is used to assign different weight levels to each channel, thereby emphasizing more relevant features and suppressing minor features. In this embodiment, the connection result is channel-separated and features are extracted, and the extracted features are processed to obtain the processed features in the following manner:

[0037] The connection results are separated into channels, and then the results after channel separation are extracted by average pooling and maximum pooling, and the features extracted by the two are respectively subjected to point-by-point convolution for reducing channels and RELU activation, and point-by-point convolution for restoring channels, and the features obtained by the separate processing are weighted fused to obtain the processed features. In this way, the accuracy of feature extraction can be enhanced from both high-frequency (maximum pooling) and low-frequency (average pooling) aspects; in other embodiments, only maximum pooling or average pooling can be used for feature extraction.

[0038] Specifically, the channel attention block CA(·) first separates the channels of the connection results to reduce the scale of the feature image and increase the number of layers (i.e., the number of channels) of the feature image, thereby increasing the depth of feature extraction from the feature image; then, the average pooling (i.e., Figure 2 AP in) and maximum pooling feature extraction (i.e. Figure 2 MP in the feature image), that is, by pooling, more relevant features are emphasized on the basis of increasing the depth of feature extraction of the feature image, while suppressing minor features, and the features extracted by the two are respectively subjected to point-by-point convolution for reducing channels and RELU activation, and point-by-point convolution for restoring channels. The processed features are weighted fused and the Hadamard product (i.e. Figure 2 The Hadamard Product in the formula combines the fused features with the connection results according to the attention weights calculated by Sigmoid; it is expressed as follows:

[0039]

[0040] CAB1(x tensor )=PWC2(ReLU6(PWC1(P M (x tensor )))

[0041] CAB2(x tensor )=PWC2(ReLU6(PWC1(P A (x tensor )))

[0042] Among them, CAB(x tensor ) is the output of the channel attention block, x tensorThat is, the feature after the residual connection of MSC(·); P M is the maximum pooling, P A is average pooling; ReLU6 is RELU activation, PWC1 is point-by-point convolution for reducing channels, and PWC2 is point-by-point convolution for restoring channels. This part (i.e., the channel attention block CA(·)) is equivalent to a part of the efficient multi-scale deep convolution decoder at the spatial level.

[0043] In this embodiment, the channel separation performed on the residual connection result is the channel separation performed on the height and width dimensions in the residual connection result. Different from downsampling, channel separation specifically separates the features of multiple channels by channel, for example, a color image with a feature of 512*512*3 (where 3 represents the number of channels) is separated into three grayscale images with features of 512*512.

[0044] Finally, after CA(·), the spatial attention block SA(·) that emphasizes capturing local context information is used to simulate the attention process of the human brain using spatial attention, focusing attention on specific parts of the input image to enhance the model's recognition ability and ability to respond to relevant spatial features. In this embodiment, feature extraction is performed between different channels of the merged result, and then processed by a convolution layer of a size greater than or equal to a set size. The specific processing is as follows: feature extraction is performed between features corresponding to different channels of the merged result to obtain the maximum value and the average value of the feature extraction, and the two are concatenated and processed by a convolution layer of a size greater than or equal to a set size. In this way, the accuracy of feature extraction can be enhanced from both high frequency (maximum value of feature extraction) and low frequency (average value of feature extraction) aspects. In other embodiments, only the maximum value or the average value of feature extraction can be used for feature extraction.

[0045] Specifically, the spatial attention block SA(·) first aggregates the maximum C along the channel dimension M (·) and the mean value C A (·) (that is, respectively determine the maximum and average feature values ​​corresponding to different channels in the merged result, that is, Figure 2 ChannelMax and Channel Average in , in order to reduce the scale of the feature image, increase the number of layers (i.e., the number of channels) of the feature image, and thus increase the depth of feature extraction of the feature image; splicing the two (i.e., Figure 2 After the convolution kernel is larger than the set value, the local contextual relationship between features is enhanced; the Hadamard product (i.e. Figure 2The Hadamard Product in the attention module is used to combine the processed features with the connection results according to the attention weights calculated by Sigmoid as the output of the attention module. In this embodiment, the convolution layer with a convolution kernel greater than the set value uses a 7×7 convolution kernel. In other embodiments, at least three 3*3 convolution kernels can be used instead, but the number of operation steps will increase three times, that is, as long as the convolution is greater than or equal to three convolution blocks with a convolution kernel of 3×3, it can be used.

[0046] After the features are extracted by the above-mentioned feature extraction model, the extracted features are input into the existing classifier for corn kernel segmentation to obtain the image segmentation results of the corn kernels (i.e., the segmentation results of each individual corn kernel). Since the image segmentation implemented by the classifier belongs to the existing technology, it will not be repeated here.

[0047] The feature extraction model is trained by the loss corresponding to the segmentation result obtained by the features extracted by the feature extraction model and the true label; and in this embodiment, the loss function used by the above-mentioned feature extraction model is a total loss function L obtained by weighting the cross entropy loss and Dice loss corresponding to the segmentation result obtained by the features extracted by the feature extraction model and the true label. BceDice :

[0048] L BceDice =λ1L Bce +λ2L Dice

[0049]

[0050] Where (λ1,λ2) is the constant weight corresponding to the weighting, and (1,1) is usually selected as the default parameter. Bce is the cross entropy loss; L Dice is the Dice loss; N is the total number of classifications; y i Represents the true probability distribution value of the final segmentation result (ie, the true label), Represents the predicted probability distribution value; X represents the predicted value of the final segmentation result, and Y represents the true value (ie, the true label).

[0051] In other embodiments, other loss functions may be used to perform supervised training on the feature extraction model. The specific loss function used does not affect the training of the feature extraction model, so it will not be described here.

[0052] In addition, in this embodiment, the image containing corn kernels to be segmented is obtained by performing image denoising, filtering, enhancement, size normalization and channel rearrangement processing on the image containing corn kernels acquired by the image acquisition device.

[0053] The above-mentioned image acquisition device refers to Figure 3 , including a flat backlight platform for placing corn kernels, a camera fixture for fixing a camera, a camera for taking images of corn kernels on the flat backlight platform from above, an XYZ three-dimensional displacement lifting platform for placing the camera fixture, a lateral fine-tuning dovetail groove displacement slider and a longitudinal fine-tuning dovetail groove displacement slider for placing the lifting platform, and a duralumin optical breadboard. The duralumin optical breadboard can increase the counterweight of the test bench on the one hand, and can provide more precise adjustment parameters for the experiment on the other hand. Figure 3 In the figure, 1 is a corn kernel collection Microscope Camera (i.e., camera), 2 is an anti-vibration test bench, 3 is a storage table with a backlight (i.e., a flat backlight platform), 4 is an anti-vibration rubber pad, 5 is a base support of a camera system (i.e., a part of an XYZ three-dimensional displacement lifting platform), 6 is a horizontal lateral adjustment slider (i.e., a lateral fine-tuning dovetail groove displacement slider), 7 is a horizontal longitudinal adjustment slider (i.e., a longitudinal fine-tuning dovetail groove displacement slider), 8 is a vertical movement adjustment slider (i.e., a part of an XYZ three-dimensional displacement lifting platform), 9 is a camera lateral support (i.e., a part of an XYZ three-dimensional displacement lifting platform), and 10 is an anti-vibration table leg.

[0054] In this embodiment, the method of collecting images containing corn kernels by the image collection device includes:

[0055] The corn kernels are spread out and laid flat on a flat backlight platform. The effective field of view of the corn kernels is placed within the visible range of the camera by adjusting the horizontal fine-tuning dovetail displacement slider, the vertical fine-tuning dovetail displacement slider, and the XYZ three-dimensional displacement lifting platform. The camera collects and saves images containing corn kernels. The position and number of corn kernels are randomly changed to obtain different images containing corn kernels. Repeat the above operation to obtain multiple images containing corn kernels.

[0056] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, but do not constitute a limitation to the present invention.

Claims

1. A corn kernel image segmentation method, characterized in that: The image containing corn kernels to be segmented is subjected to feature extraction and segmentation by a feature extraction model trained by the training set, thereby obtaining a segmentation result of a single corn kernel; the feature extraction model includes a Unet network in which an attention module is added to each skip connection layer; The attention module takes the output of the encoder corresponding to the skip connection layer as input, performs point-by-point convolution, normalization, and RELU activation to expand the number of channels, and then passes through at least two convolution layers with different convolution kernels for depth convolution. After weighted fusion of each convolution result, the channel is shuffled, and then converted back to the original channel through point-by-point convolution and normalization and residual connection is performed with the input. The connection result is channel-separated and features are extracted, and the extracted features are processed to obtain processed features. The processed features are merged with the connection result according to the attention weight calculated by Sigmoid using Hadamard product; After feature extraction between different channels of the merged result, it is processed by a convolution layer with a convolution size greater than or equal to the set size, and then the processed features are merged with the connection result according to the attention weight calculated by Sigmoid using the Hadamard product as the output of the attention module.

2. The corn kernel image segmentation method according to claim 1, characterized in that: The Unet network is a VMUnet network architecture.

3. The corn kernel image segmentation method according to claim 1 or 2, characterized in that: The connection result is channel-separated and features are extracted, and the extracted features are processed. The methods for obtaining the processed features include: The connection results are separated into channels, and then the features of the channel separation results are extracted through average pooling and maximum pooling respectively. The features extracted from the two are respectively subjected to point-by-point convolution for reducing the channel and RELU activation, and point-by-point convolution for restoring the channel. The features obtained by each processing are weighted fused to obtain the processed features.

4. The corn kernel image segmentation method according to claim 1 or 2, characterized in that: The channel separation performed on the residual connection result is the channel separation performed on the height and width dimensions in the residual connection result.

5. The corn kernel image segmentation method according to claim 1 or 2, characterized in that: The feature extraction model is trained by the loss corresponding to the segmentation result obtained by the features extracted by the feature extraction model and the true label.

6. The corn kernel image segmentation method according to claim 5, characterized in that: The loss function used in training the feature extraction model is a total loss function obtained by weighting the cross entropy loss and Dice loss corresponding to the segmentation result obtained according to the features extracted by the feature extraction model and the true label.

7. The corn kernel image segmentation method according to claim 1 or 2, characterized in that: The convolution of the set size is a convolution consisting of three convolution blocks with 3×3 convolution kernels.

8. The corn kernel image segmentation method according to claim 1 or 2, characterized in that: The image containing corn kernels to be segmented is obtained by performing image denoising, filtering, enhancement, size normalization and channel rearrangement processing on the image containing corn kernels acquired by an image acquisition device.

9. The corn kernel image segmentation method according to claim 8, characterized in that: The image acquisition device includes a plane backlight platform for placing corn kernels, a camera fixture for fixing a camera, a camera for taking images of corn kernels on the plane backlight platform from above, an XYZ three-dimensional displacement lifting platform for placing the camera fixture, a transverse fine-tuning dovetail groove displacement slider and a longitudinal fine-tuning dovetail groove displacement slider for placing the lifting platform, and a hard aluminum optical breadboard.

10. The corn kernel image segmentation method according to claim 1 or 2, characterized in that: The method of performing feature extraction between different channels of the merged result and then performing convolution layer processing with a convolution size greater than or equal to a set size includes: performing feature extraction between the features corresponding to different channels of the merged result, obtaining the maximum value and the average value of the feature extraction, splicing the two, and then performing convolution layer processing with a convolution layer size greater than or equal to the set size.

Citation Information

Cited By

  • Medical image segmentation model and segmentation method

    CN120259671A

  • A medical image segmentation model and a segmentation method

    CN120259671B