CN-121982300-A - Blueberry branch segmentation method and system
Abstract
The invention discloses a method and a system for segmenting blueberry tree trunks, wherein the method comprises the steps of extracting multi-scale characteristics of a blueberry tree image to be segmented to obtain characteristic representations comprising low-layer details, middle-layer semantics and high-layer contexts; the method comprises the steps of realizing information complementation and semantic alignment of deep and shallow layer features through a bidirectional cross-level information interaction module, optimizing fusion features by utilizing a space and channel attention mechanism to obtain enhancement features, carrying out up-sampling and dynamic reconstruction on the enhancement features by adopting a frequency domain dynamic convolution module, refining branch edges and texture details, and outputting a high-resolution pixel level classification result. The method effectively solves the problems of boundary blurring, fracture adhesion and background interference existing in the segmentation of the slender blueberry branches, and has good precision and generalization capability.
Inventors
- GUO YA
- ZHAO YUANLI
- WU CHUANSHUN
- Zhu Henghang
- DAI HANGYU
- LI AOQIANG
Assignees
- 江南大学
- 无锡恺易物联网科技发展有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251222
Claims (10)
- 1. The blueberry branch division method is characterized by comprising the following steps of: S1, carrying out multi-scale feature extraction on a blueberry tree image to be segmented to obtain feature representation comprising low-level detail features, middle-level semantic features and high-level context features; S2, performing bidirectional cross-level information interaction on the feature representation, and performing multi-scale perception and attention-directed feature optimization on the interacted multi-scale fusion features to obtain enhanced features; s3, up-sampling the enhanced features to restore the spatial resolution, and carrying out dynamic convolution processing on the enhanced features in the up-sampling process to refine the edge and texture details of the branches to obtain a high-resolution segmentation result; And S4, outputting a blueberry branch division result of a pixel level based on the high-resolution division result.
- 2. The method for segmenting the blueberry tree trunks according to claim 1, wherein in the step S1, the method for extracting the multi-scale features of the blueberry tree images to be segmented to obtain the feature representations comprising the low-level detail features, the middle-level semantic features and the high-level context features is as follows: and extracting feature graphs of different levels through an encoder network, wherein the encoder network consists of a plurality of convolution layers, the low-level feature graph contains abundant space details and edge texture information, and the high-level feature graph contains global semantic context information.
- 3. The blueberry branch segmentation method according to claim 1 is characterized in that in the step S2, the method for performing bidirectional cross-level information interaction on the feature representation is characterized in that high-resolution detailed information of a low-level feature map in the feature representation is transferred upwards to a middle-level feature map, semantic information of a high-level feature map in the feature representation is transferred downwards to the middle-level feature map, and feature extraction and fusion are performed on the middle-level feature map through a plurality of parallel convolution paths with different receptive fields to obtain multi-scale fusion features.
- 4. A blueberry branch segmentation method according to claim 3 is characterized in that in step S2, multi-scale perception and attention-directed feature optimization is carried out on the multi-scale fusion features after interaction, and the method for obtaining enhancement features comprises the steps of carrying out information aggregation on the multi-scale fusion features along the space dimension and the channel dimension of the multi-scale fusion features to generate corresponding space information weight graphs and channel information weight vectors, carrying out element-by-element multiplication on the space information weight graphs and the multi-scale fusion features to highlight the space position of the branches and inhibit the background, carrying out channel dimension scaling on the channel information weight vectors and the features subjected to space weighting to enhance key channels related to the branch features, and outputting the features subjected to space and channel double weighting as the enhancement features.
- 5. The method for segmenting the blueberry branch is characterized in that in the step S3, the enhancement feature is subjected to dynamic convolution processing in the up-sampling process, and the method for refining the edge and the texture detail of the branch is characterized in that in the process of up-sampling the enhancement feature to restore the resolution, the enhancement feature is subjected to dynamic convolution processing in a frequency domain to generate a plurality of groups of dynamic convolution kernels with different frequency responses, and the different frequency components of the feature are subjected to self-adaptive weighted fusion to enhance the reconstruction effect of the edge and the texture detail.
- 6. The method for dividing blueberry branches into a plurality of frequency groups which are not overlapped with each other, generating a plurality of groups of dynamic convolution kernels with different frequency responses through inverse Fourier transformation, generating a modulation matrix for adjusting each element in the dynamic convolution kernels point by point according to local context information and global context information of the enhancement features, further dividing the frequency response of the convolution kernels into a plurality of frequency bands, generating a modulation weight with adaptive spatial position for each frequency band, adjusting the dynamic convolution kernels by using the modulation matrix and the modulation weight, acting on the enhancement features, and fusing output features.
- 7. The method for dividing blueberry branches according to claim 1, further comprising a training step of calculating a loss value based on a prediction division result and a real label, wherein the loss value is calculated by adopting a joint loss function, the joint loss function is formed by adding a first loss component and a second loss component, the first loss component is used for applying higher weight to pixels with a prediction error, and the second loss component is directly used for maximizing the overlapping degree of a prediction area and a real area.
- 8. A blueberry branch segmenting system, comprising the following modules: the feature extraction module is used for carrying out multi-scale feature extraction on the blueberry tree image to be segmented to obtain feature representation comprising low-level detail features, middle-level semantic features and high-level context features; The feature interaction and enhancement module is used for carrying out bidirectional cross-level information interaction on the feature representation, and carrying out multi-scale perception and attention-directed feature optimization on the interacted multi-scale fusion features to obtain enhanced features; The up-sampling and thinning module is used for up-sampling the enhanced features to restore the spatial resolution, and carrying out dynamic convolution processing on the enhanced features in the up-sampling process, and thinning the edge and texture details of the branches to obtain a high-resolution segmentation result; And the output module is used for outputting a blueberry branch division result of a pixel level based on the high-resolution division result.
- 9. An electronic device comprising a processor, a memory and a bus system, the processor and the memory being connected by the bus system, the memory being configured to store instructions, the processor being configured to execute the instructions stored by the memory to implement the method of dividing a blueberry branch as claimed in any one of claims 1 to 7.
- 10. A computer storage medium storing a computer software product comprising instructions for causing a computer device to perform the method of dividing a blueberry tree limb according to any one of claims 1 to 7.
Description
Blueberry branch segmentation method and system Technical Field The invention relates to the technical field of computer vision and agricultural image processing, in particular to a blueberry branch division method and system. Background The blueberry is taken as a berry plant with high economic value, and the digitalized and intelligent transformation of the planting management of the blueberry has important significance for the development of accurate agriculture. The accurate image segmentation of the blueberry tree trunks is a key premise for realizing tree body surface information analysis, growth analysis, intelligent pruning and yield prediction. However, the blueberry tree belongs to shrub fruit trees, and the branches of the blueberry tree are slender in shape, changeable in scale, staggered and overlapped in branches and leaves, similar in color to the background and the like in natural environment, and the accurate segmentation of the blueberry branches is challenged due to the interference of factors such as illumination change and shielding. Early image segmentation was primarily dependent on traditional computer vision methods such as Canny operator-based edge detection, thresholding, region growing, mathematical morphological operations, and the like. The method has a certain effect in a controlled scene with clear structure and uniform illumination, but for the targets of blueberry branches and the like with weak textures, fuzzy boundaries, multi-scale characteristics and strong background interference, the segmentation performance is unstable, the robustness is poor, the understanding capability of high-level semantic information is lacking, and the method is difficult to adapt to the complex and changeable actual orchard environment. With the development of deep learning technology, a semantic segmentation method based on a convolutional neural network is significantly broken through. The full convolutional neural network achieves end-to-end pixel level prediction for the first time. The subsequently proposed U-Net network, its encoder-decoder and jump connection structure, provides a very representative infrastructure for medical imaging and agricultural vision tasks. In order to obtain larger receptive fields and richer context information, deepLab series remarkably expand the feature perception range through hole convolution and multi-scale context aggregation, PSPNet enhances global feature expression by using a pyramid pooling module, segNet realizes efficient decoding through pooling indexes, and HRNet maintains high-precision spatial features through a multi-resolution parallel structure. These models significantly enhance feature expression in complex object segmentation. In the field of agricultural vision, the deep semantic segmentation technology is widely applied to segmentation tasks of branches, fruits, leaves and crop canopy of fruit trees such as apple trees, grape vines and the like, and has potential. However, the existing researches are still concentrated on arbor or vine fruit trees, aiming at the shrub fruit trees with slender branches, dense structures and obvious non-rigidity like blueberries, the existing segmentation model still has obvious limitations, the characteristic fusion capability of the model is insufficient, the characteristic redundancy and background noise are easily introduced by the traditional jump connection mechanism, the effective alignment and complementation of deep and shallow semantic and detail characteristics are difficult to realize, the reconstruction capability of the upsampling process on the edges of the slender branches and the details of textures is insufficient, the problems of boundary blurring, fine branch fracture or adhesion and the like are easily caused in the segmentation result, and the modeling capability of the context of the multi-scale branch structure is still insufficient, so that the segmentation precision and robustness of the multi-scale branch structure under a complex natural scene are restricted. Therefore, there is an urgent need for a high performance blueberry branch division method that can specifically solve the above problems. Disclosure of Invention Therefore, the invention aims to solve the technical problems that the characteristic fusion capability is insufficient, so that deep and shallow semantic and detail characteristics are difficult to align and complement effectively, the boundary of a segmentation result is fuzzy, branches are broken or stuck due to inaccurate edge and texture detail reconstruction in an up-sampling process, and the segmentation precision and robustness are insufficient under a complex natural scene due to the lack of the context modeling capability of a multi-scale branch structure in the prior art. In order to solve the technical problems, the invention provides a blueberry branch dividing method, which comprises the following steps: S1, carrying out multi-scale feature extrac