Improved U-Net-based germination form measurement method and system

By improving the U-Net model and Canny edge detection algorithm, the problems of low accuracy and insufficient segmentation performance of tomato radicle length measurement were solved, and efficient and automated radicle length measurement was achieved, which can adapt to stable segmentation under different environmental conditions.

CN120599241APending Publication Date: 2025-09-05NANJING AGRICULTURAL UNIVERSITY +1
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510345223.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing image processing technology has low accuracy when measuring the length of tomato radicle, is difficult to automatically adapt to the complex morphology of the root structure, is sensitive to noise, has high computational complexity, and has insufficient segmentation performance, especially prone to confusion under different growth periods or lighting conditions.

Method used

An improved U-Net model is adopted. By replacing the 3×3 convolution with DiverseBranchBlock in the decoder and introducing the CAA attention mechanism between the decoder and the skip connection, the segmentation performance of the tiny features of the tomato radicle is enhanced. The Canny edge detection algorithm is combined to extract the radicle edge contour and calculate the radicle length.

Benefits of technology

The accuracy and robustness of tomato radicle length measurement were significantly improved, labor costs were reduced, measurement efficiency was improved, the radicle could be stably segmented under different environmental conditions, and the segmentation accuracy and anti-interference ability of the model were improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599241A_ABST
    Figure CN120599241A_ABST
Patent Text Reader

Abstract

The invention provides a germination form measurement method and system based on improved U-Net to realize automatic measurement, reduce labor cost and significantly improve efficiency, thereby optimizing tomato planting and management. According to the application, the seed germination form acquisition system is used for acquiring images of seed culture and seed germination processes, a data set is constructed, and the data set is used for training the improved U-Net model. According to the invention, the up-sampling of the model is replaced by the DBB module, and the CAA is introduced into the jump joint and the decoder. The MIOU index and the MPA index of the model can be respectively improved by 2.03% and 0.39% compared with those of the basic U-Net. According to the method, based on the segmentation result of the improved model, the radicle length can be extracted in combination with the canny algorithm. Compared with the ImageJ measurement result, the correlation coefficient of the model can reach 0.991, and the measurement efficiency is improved by 300 times. According to the method, the influence of drought, salinization and different molds on tomato radicle germination can be evaluated, and an efficient solution is provided for nondestructive monitoring and crop management in precision agriculture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of plant germination phenotype collection, and in particular to a germination phenotype measurement method and system based on an improved U-Net. Background Art

[0002] Traditional methods for measuring radicle length mostly rely on manual measurement, which is not only time-consuming and labor-intensive, but also prone to damaging the radicle morphology and structure. Furthermore, accuracy is easily limited by the operator's expertise. With advances in computer technology, traditional image processing methods have begun to be used for measuring plant root length. However, existing image processing techniques are sensitive to noise, have high computational complexity, rely on accurate root-to-background segmentation, and still require certain manual feature processing, making them difficult to automatically adapt to complex root structures.

[0003] Although certain specific semantic segmentation models are used to process crop images in existing technologies, their segmentation performance is still insufficient: First, when plant tissue is similar to the background color or texture, the model is prone to over-segmentation or under-segmentation, making it difficult to accurately distinguish the target area; second, plants have diverse growth forms and some areas are often obscured by themselves or the medium. Multi-scale feature fusion that simply relies on jump connections is often insufficient to identify these complex structures, resulting in insufficiently refined edge recognition; in addition, the model's detection robustness is still insufficient in the face of subtle morphological changes under different growth periods or lighting conditions, and it is easy to cause confusion in areas with finer details.

[0004] In particular, when applying existing image detection technology to the measurement of tomato radicles, accuracy remains a challenge. First, tomato roots have complex morphology and irregular growth, making the slender structure of the radicle difficult to accurately extract. Second, the output of the segmentation model is often only an intermediate result, requiring further processing with image processing algorithms to accurately measure the radicle length. Therefore, developing a hybrid method that combines deep learning models with traditional image processing techniques is crucial for achieving high-precision, automated measurement of tomato radicles. Summary of the Invention

[0005] In response to the shortcomings of the existing technology, the present application provides a germination phenotype measurement method and system based on an improved U-Net. Based on the U-Net model, the present application replaces the traditional 3×3 convolution (Conv) with DiverseBranchBlock in the decoder part of the model, and introduces the CAA attention mechanism at the decoder and jump connection, which enhances the U-Net's segmentation performance of the subtle features of the tomato radicle. This improves the accuracy and robustness of using this model to study the changes in tomato radicle length over time under different drought, salinization, and different concentrations of Streptomyces virginianus. It can more conveniently and efficiently explore the impact of different conditions on tomato radicle length, avoid incomplete segmentation of subtle features in the early stages of tomato germination, improve recognition accuracy and stability, and reduce the number of errors in detection results. The present application specifically adopts the following technical solutions.

[0006] First, to achieve the above objectives, a germination phenotype measurement method based on an improved U-Net is proposed, which includes the following steps: preprocessing the collected seed image, then inputting the preprocessed image into a pre-trained DC-U-Net model for semantic segmentation to obtain a binary image containing mask information; using the Canny edge detection algorithm to extract the edge contour of the germination phenotype detection target in the binary image according to the pixels corresponding to the mask information, and counting the number of pixels corresponding to the extracted edge contour; calculating the actual size of the germination phenotype detection target based on the proportional relationship between the image pixels and the actual length; wherein, the DC-U-Net model uses the DiverseBranchBlock module to replace the 3×3 convolution module in the decoder, and introduces the CAA attention mechanism module at the decoder and the jump connection.

[0007] Optionally, a germination phenotype measurement method based on an improved U-Net as described above, wherein the DiverseBranchBlock module includes a four-branch structure for receiving input features in parallel, wherein the first branch structure first performs 1×1 convolution on its input, and then performs batch normalization on the convolution result; the second branch structure performs 1×1 convolution and K×K convolution on its input sequence, and performs batch normalization on each convolution result after each convolution; the third branch structure performs 1×1 convolution and average pooling on its input sequence, and performs batch normalization on each result after each convolution and pooling; the fourth branch structure first performs K×K convolution on its input, and then performs batch normalization on the convolution result; the outputs of the four-branch structure are accumulated and fused and then output after nonlinear activation processing.

[0008] Optionally, a germination phenotype measurement method based on an improved U-Net as described above, wherein the CAA attention mechanism module first extracts global information through global average pooling; then uses 1×1Conv to perform channel transformation to enhance local features; then captures long-distance dependencies through horizontal depth-separable convolution branches, vertical depth-separable convolution branches, and captures local oblique textures through diagonal depth-separable convolution branches; finally, an attention weight map is generated through 1×1Conv and Sigmoid activation to adjust the importance of each feature channel and enhance key features; in the above steps, the horizontal depth-separable convolution branches are used to capture long-distance dependencies, vertical depth-separable convolution branches, and diagonal depth-separable convolution branches. The product branch uses a 1×K convolution kernel, performs sliding convolution operations only in the horizontal direction of the feature map, and then outputs the activation function and attention module passed to the subsequent vertical depth-separable convolution branch; the vertical depth-separable convolution branch uses a K×1 convolution kernel, performs sliding convolution operations only in the vertical direction of the feature map, and then outputs the activation function and attention module passed to the subsequent diagonal depth-separable convolution branch; the diagonal depth-separable convolution branch specifically uses a 3×3 convolution kernel independently on each channel to cover the pixels in the diagonal direction, capture local oblique texture and boundary information, and then perform channel mixing through point-by-point convolution.

[0009] Optionally, in any of the above methods for measuring germination phenotype based on the improved U-Net, when the diagonal depth-separable convolution branch uses a 3×3 convolution kernel, weights are applied to the (±1,±1) direction neighborhoods respectively to focus on oblique textures and edges; the calculation process is as follows: first, a 3×3 convolution kernel K is used to calculate the morphological distribution of the diagonal depth-separable convolution branch. c Channel-by-channel oblique convolution is performed, and then channel mixing is performed through a 1×1 convolution kernel, and the final output is: Among them, the weight k in any diagonal direction in the 3×3 convolution kernel is c (i,j),(i,j∈{±1}) satisfy the following constraints: k c (i,j)≥max(0.5·k c (0,0),0.3·max(k c )); where: k c (0,0) is the center element of the convolution kernel, which usually has the highest weight; max(k c ) is the maximum weight in the entire 3x3 convolution kernel.

[0010] Optionally, a germination phenotype measurement method based on an improved U-Net as described above, wherein the step of pre-training the DC-U-Net model includes: first assigning initial weights to all convolutional layers and attention modules in the DC-U-Net model, selecting an appropriate optimizer, and setting the initial learning rate, momentum, and weight decay hyperparameter values; then, batch reading images and corresponding radicle mask labels, and sending them to the DC-U-Net model, so that the DC-U-Net model first performs multiple convolution and maximum pooling operations on the image in the VGG encoder stage , continuously extracting multi-scale deep semantic features and saving the output of each layer for jump connection; then in the decoder stage, the shallow details and deep representations are fused by upsampling and splicing the feature maps recorded by the encoder; in the process, the improved module embedded in the DC-U-Net model will further enhance the extraction of edge and texture features of the radicle area, and finally output the predicted mask; the predicted mask of the DC-U-Net model outputted in the above steps is compared with the real mask label of the radicle corresponding to the image, and the error of this batch is calculated by the cross entropy or Dice loss function. The difference is then back-propagated, and the gradient of the loss is passed layer by layer to all learnable parameters in the DC-U-Net model. The step() function of the optimizer is then called to modify the parameters, and the gradient accumulated in the previous batch is cleared using zero_grad(). After each batch of images in the training set is processed according to the above steps, the next batch of images is read and the above steps are repeated to update the parameters in a loop until all batches of the entire training set are completed. At the end of the batch, the validation set is used for segmentation reasoning. During the segmentation reasoning process, there is no need to update the weights. Only the mIoU and mPA indicators are calculated. When the performance of the indicators stagnates or overfits, the learning rate needs to be reduced or the early stopping strategy needs to be enabled. When the performance of the validation set continues to improve and reaches the optimal value, the model weights of the batch are saved for future use to obtain the trained DC-U-Net model. The optimal weights are directly used in the trained DC-U-Net model to perform reasoning on the test set and calculate the segmentation indicators. After the test results are satisfactory, the model parameters determined according to the optimal weights are directly used to perform semantic segmentation on the collected seed images to obtain a binary image containing mask information.

[0011] Optionally, a germination phenotype measurement method based on an improved U-Net as described above, wherein, in the DC-U-Net model: in the training phase, the DiverseBranchBlock module obtains feature representation through a parallel four-branch structure; in the inference phase, the DiverseBranchBlock module simplifies the complex multi-branch structure into a single convolutional layer through structural reparameterization, integrating multi-scale features.

[0012] Optionally, in any of the above-described methods for measuring germination phenotype based on the improved U-Net, the specific steps of extracting the edge contour of the germination phenotype detection target in the binary image according to the pixels corresponding to the mask information using the Canny edge detection algorithm include: step C1, smoothing the image using a Gaussian kernel; step C2, calculating the gradient of each pixel in the irregular area corresponding to the mask information in the x and y directions using the Sobel operator: Among them S x With S y , is the Sobel operator kernel, Represents the convolution operation, and the total gradient amplitude is Gradient direction Given; Step C3, set the non-maximum pixel values ​​in the gradient direction to 0, and only retain the local maximum pixels as potential edge points; Step C4, set a high threshold (maxVal) and a low threshold (minVal), and determine the pixels with gradient amplitude greater than maxVal as "strong edges", and the pixels with gradient amplitude less than minVal as "non-edges", and temporarily regard the pixels between the two as "weak edges"; Step C5 starts from the determined strong edge pixel and checks all weak edge pixels in its 8-neighborhood with gradient values ​​between [minVal, maxVal]. If there is a connected relationship, the weak edge is regarded as part of the real edge; otherwise, it is discarded; finally, a complete and continuous edge contour is formed.

[0013] At the same time, in order to achieve the above-mentioned purpose, the present application also provides a germination phenotype measurement system based on an improved U-Net, which includes: a light source device for providing a stable shooting light source; an image acquisition device for capturing a seed image under the lighting conditions provided by the light source device; an edge computer, which is connected to the image acquisition device, receives the seed image, and measures the seed image according to the steps described in claim C7.

[0014] Optionally, a germination phenotype measurement system based on the improved U-Net as described above, wherein the light source device and the image acquisition device are arranged in a seed incubator, and the interior of the seed incubator is divided into an upper and lower layer structure by a hollow partition, and the lower layer is equipped with ventilation equipment and a heating device, and the hollow partition is also respectively fixed with two groups of limit bars arranged orthogonally to each other for fixing the culture dish for accommodating germinating seeds, and the top of the seed incubator is also equipped with two groups of movable guide rails with mutually orthogonal moving directions, and the image acquisition device and the light source device are jointly fixed on the slider platform of the movable guide rail.

[0015] Optionally, a germination phenotype measurement system based on the improved U-Net as described above is provided, wherein the light source device is a ring light source with an illumination of 183.9K Lux and a brightness of 46.341K cd / ㎡; the image acquisition device is an RGB industrial camera equipped with a CMOS sensor element; a GigE Ethernet interface is also provided on the back of the seed incubator for transmitting the seed image to the edge computer, triggering the image processing software built into the edge computer to automatically process the seed image.

[0016] Beneficial effects

[0017] This application uses an improved U-Net model to automatically measure radicle length, reducing labor costs and significantly improving efficiency, thereby optimizing tomato planting and management. To achieve automated measurement of radicle length, we designed a seed germination phenotype acquisition system for capturing images of seed cultivation and germination processes and constructed a dataset using these images. Furthermore, to improve the performance of the U-Net model, we replaced the upsampled 3×3 Conv with a DiverseBranchBlock module and introduced CAA at the skip connections and decoder. The improved model achieved improvements of 2.03% and 0.39% in MIOU and MPA, respectively, compared to the basic U-Net. Based on the segmentation results, the radicle length was extracted using the Canny algorithm and compared with the ImageJ measurement results, achieving a correlation coefficient of 0.991, indicating a 300-fold improvement in measurement efficiency. Furthermore, this method was used to evaluate the effects of drought, salinization, and different concentrations of Streptomyces leucoflavus (HL4) and Streptomyces virginianus (GZ2) on tomato radicle germination. The results showed that drought, salinization, and HL4 stock solution inhibited radicle growth, while HL4 dilutions and GZ2 stock solution and its dilutions all promoted radicle growth. This study provides an efficient solution for non-destructive monitoring and crop management in precision agriculture.

[0018] In particular, by introducing DiverseBranchBlock in the decoder stage, the present application enables the network to integrate multi-scale convolution branches, and can more accurately extract and fuse information of multiple spatial scales when faced with scenes where the radicles have different morphologies or subtle edges and are highly similar to the background. At the same time, the CAA attention mechanism adopted in this application can adaptively adjust the feature weights at both the channel and spatial levels, so that the key details in the radicle area can be highlighted and the background interference can be significantly weakened, thereby enhancing the segmentation stability of the model under different environmental disturbances (such as drought, salinization, microbial treatment, etc.). Therefore, in the segmentation measurement of tomato radicle length, the present application not only shows higher accuracy and anti-interference ability, but also significantly improves the sensitivity to the delicate structure and morphological changes of the radicle.

[0019] Other features and advantages of the present application will be set forth in the following description, and in part will be apparent from the description, or may be learned by practicing the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to provide a further understanding of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings:

[0021] Figure 1 This is the data set collection process used to train the U-Net model in this application: (a) is the seed germination phenotype collection system; (b) is the seed germination test process and parameters;

[0022] Figure 2 This is the process of constructing the dataset used to train the U-Net model in this application: (a) shows the germination of tomato seeds at 24, 64, and 72 hours; (b) shows the seed germination standard; (c) shows the Labelme annotation process; (d) shows an example of a manual annotation mask; and (e) shows the data augmentation method.

[0023] Figure 3 Schematic diagram of the overall structure of the DC-U-Net model used in this application, where (a) is the traditional U-Net model, (d) is the DC-U-Net model used in this application, (c) is the DBB module used in the model of this application, and (d) is the Improved CAA module used in the model of this application;

[0024] Figure 4 This is the actual length extraction process of tomato radicle adopted in this application;

[0025] Figure 5 Performance comparison of different models: (a) training loss of each model; (b) validation loss of each model; (c) MIOU of each model; (d) MPA of each model;

[0026] Figure 6 is the actual segmentation effect of each model on tomato radicle;

[0027] Figure 7 Comparison of tomato radicle length measurement using ImageJ software and our method: (a) Actual measurement results of the two methods (partial radicle details are magnified); (b) Fitting results of the two methods; (c) Processing speed of the two methods

[0028] Figure 8 is the radicle length of tomatoes under different drought conditions detected by the improved U-Net model of this application;

[0029] Figure 9is the tomato radicle length under different salinization conditions detected by the model of this application;

[0030] Figure 10 is the tomato radicle length under different concentrations of HL4 detected by the model of this application;

[0031] Figure 11 It is the tomato radicle length under different concentrations of GZ2 detected by the model of this application. DETAILED DESCRIPTION

[0032] To make the purpose and technical solutions of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be clearly and completely described below in conjunction with the drawings of the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the described embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0033] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and, unless defined as such herein, will not be interpreted in an idealized or overly formal sense.

[0034] The meaning of "inside" and "outside" mentioned in this application refers to the direction pointing to the inside of the box relative to the seed incubator itself, that is, the direction pointing to the inside of the box is inside, and the opposite is outside; it is not a specific limitation on the device mechanism of this application.

[0035] The meaning of "left and right" mentioned in this application refers to that when the user is operating the button on the seed incubator, the user's left is left and the user's right is right, rather than a specific limitation on the device mechanism of this application.

[0036] The term “connection” as used in this application may mean a direct connection between components or an indirect connection between components via other components.

[0037] The meaning of "up" and "down" in this application refers to that when the user uses a seed incubator, the direction from the ground to the light source device is up, and the opposite direction is down, rather than a specific limitation on the device structure of this application.

[0038] The tomato embryo image data used to train the improved U-Net model in this application was collected at Nanjing Agricultural University from June to September 2023. We used the seed germination phenotype collection system independently developed by the laboratory for tomato seed germination culture and image collection. The system integrates seed germination culture environment control, image collection and processing functions, and the system parameters are set through the human-computer interaction interface on the touch screen. The system is as follows: Figure 1 (a) As shown. Specifically, the environmental control module is implemented based on a seed incubator. The overall dimensions of the incubator are 640 mm long, 740 mm wide, and 1400 mm high. The power supply, LED switch, temperature adjustment and other buttons are integrated in the upper right corner of the box. The room is divided into two layers, separated by a hollow partition. The lower layer is mainly used to install ventilation equipment and heating devices, and the upper layer is mainly used to place culture dishes and install image acquisition devices. The seed culture dish is fixed by two limit bars in the X and Y directions. The side of the box has an embedded PTC hot air circulation system and a Tp-100 thermocouple for monitoring the temperature inside the box and temperature regulation. In addition, an LED light source is installed inside the box to supplement the lighting. Image acquisition is accomplished by X- and Y-axis guide rails (X-axis model: RXP45-L220, Y-axis model: RXP30-L380) paired with a Hikvision RGB industrial camera (model: MV-CS200-10GC) equipped with a CMOS sensor and a 30mm telecentric lens. The distance between the camera and the culture dish is 16cm. A ring light source mounted on the rails provides illumination of 183.9K lux and a brightness of 46.341K cd / ㎡, providing light for seed image acquisition. After image acquisition, the image data is transmitted to a computer via the GigE Ethernet port on the back of the box. The built-in image processing software automatically pre-processes and stores the captured images.

[0039] The seed germination phenotype acquisition system constructed by this research institute has achieved a high degree of synergy between traditional incubators and imaging devices, and can complete multi-time series, high-resolution image acquisition while the seeds are growing normally. Specifically, the system maintains the seeds under stable and controllable growth conditions through temperature environment control of the double-layer incubator, and uses industrial-grade cameras and telecentric lenses with high-brightness light sources to achieve timed or continuous shooting of seeds in different positions; at the same time, human-computer interaction and Ethernet data transmission based on the touch screen avoid external interference caused by repeated unpacking or manual operation during the experiment. This integrated design not only ensures that the seed radicle development process is not disrupted, but also provides standardized and repeatable image data for subsequent phenotypic analysis and dynamic tracking, demonstrating its innovative value at the application and engineering levels.

[0040] In order to construct a tomato radicle germination dataset, we conducted a seed germination experiment in a deionized water environment. The seed model used in the experiment was Shanghai Cooperation 903 tomato seeds (Shanghai Hongqiao Tianlong Seed Co., Ltd.). The seed pretreatment process in the experiment was as follows: Figure 1 As shown in (b) ①. After pretreatment, the seeds were neatly placed in 16 culture plots arranged in a 4×4 pattern. Each plot was covered with sterilized black filter paper and 48 seeds were placed. They were then placed in the seed germination culture system for culture. The seed culture germination parameters and seed culture plate parameters are shown in Figure 1 As shown in the table in (b), a total of 4608 seed germination images were collected in this experiment, and all images were saved in .jpg format.

[0041] In order to verify the performance of the model in practical applications and explore the effects of different conditions on the root length of tomato seeds, after confirming that the improved U-Net tomato radicle length measurement method can accurately detect and obtain tomato radicle data, we also conducted germination experiments for drought, salinization, Streptomyces albicans, and Streptomyces virginianus. Drought and salinization environments were simulated by five concentrations of PEG-6000 solution (2%, 4%, 6%, 8%, 10%) and NaCl solution (50, 75, 100, 125, 150mmol / L). The specific preparation process is as follows: Figure 1 (b) ② is shown. The pre-treated seeds are Figure 1 (b) After treatment in step ①, the seeds were placed in the culture system, with 30 seeds placed in each culture plot. During the experiment, 4 ml of deionized water or treatment solution of the corresponding concentration was added regularly every day. In addition, we prepared fermentation broths of Streptomyces albiflorus and Streptomyces virginiana at different concentrations, including the original solution and solutions diluted 10, 100, 500, and 1000 times. The specific preparation process is as follows: Figure 1 (b) ③. After disinfection, the seeds were immersed in different concentrations of HL4 or GZ2 fermentation broth for 6 hours. The control group (CK) was immersed in deionized water. The seeds were then transferred to a culture plot covered with filter paper and 4 ml of deionized water was added daily. All experiments were repeated three times, and 5,184 images of germinating tomato seed radicles were collected under each condition.

[0042] After collecting the tomato embryonic image data, we constructed a dataset to train the U-Net model of this application as follows. Specifically, we used the white radicle of tomato exposed to the seed coat as the standard for tomato seed germination. Figure 2 (b) As shown. Since tomatoes did not germinate 24 hours before planting ( Figure 2 (b), A1), plus the tomato radicles began to intertwine and block each other around 64 hours after germination ( Figure 2(b), A2), which makes it difficult to accurately segment the target. Therefore, we removed the tomato germination images of the first 24 hours and the images of 60.25-72 hours, and finally there were 2304 tomato radicle images. We used Labelme software to manually annotate the tomato radicles in the above images. The entire annotation process is as follows Figure 2 As shown in (c), the annotated area is the edge outline of the tomato radicle, named "root." After annotation, the generated label file is saved in .json format. We then use a tool to convert the .json file into the corresponding binary mask images (2(d), D3-D6). These mask images are paired with the original images for model training.

[0043] Since the growth morphology of tomato roots is highly irregular, in order to increase the diversity of samples and improve the model's ability to cope with complex situations, we performed data augmentation on the original images and their corresponding labels. The specific data augmentation methods include: (1) adjusting the brightness to simulate different lighting conditions and improve the robustness of the model under lighting changes ( Figure 2 (e), E4, E7); (2) flip and rotate the image to simulate the situation of tomato radicle in different growth directions to improve the detection effect of the model ( Figure 2 (e), E5, E6, E9); (3) Apply motion blur to simulate possible small vibrations or slight movements of the device ( Figure 2 (e), E8); (4) Add fog and rain effects to simulate possible humidity changes in the box, thereby increasing data diversity and improving the generalization ability of the model under humid conditions ( Figure 2 After these enhancement processes, we finally obtained 4304 images of tomato seed germination, which were randomly divided into a training set of 3013 images, a validation set of 861 images, and a test set of 430 images in a ratio of 7:2:1.

[0044] The U-Net model used in this application is a classic semantic segmentation method (such as Figure 3(as shown in (a)), it has a symmetrical encoder-decoder structure consisting of convolutional layers and upsampling layers. Its encoder is used to extract multi-level feature representations from the image, while the decoder gradually restores the spatial resolution of the feature map through upsampling operations to generate pixel-level segmentation results. Even when trained on smaller datasets, U-Net has shown excellent accuracy, making it the first choice for medical image segmentation tasks. However, when applied to the segmentation of tomato germinating radicles, U-Net still has some shortcomings. First, U-Net has limited ability to extract complex features, especially when dealing with targets with different scales and complex morphologies, it is difficult to effectively capture features of various sizes. In addition, the upsampling process of U-Net will lead to the loss of some detailed information, especially for scenes that require precise boundary segmentation. Therefore, we improved the U-Net model and constructed the following Figure 3 (b) The DC-U-Net model shown.

[0045] In the DC-U-Net model, we first replaced the 3×3 Conv in the decoder with DiverseBranchBlock (DBB) (DU-Net). The core principle of DBB is to enhance feature extraction capabilities through a multi-branch structure. It combines different types of convolution (such as 1×1 convolution, 3×3 convolution, etc.), sequential convolution, and average pooling to enrich the feature representation space. Figure 3 As shown in (c), during training, DBB uses these parallel branches to obtain richer feature representations. During inference, DBB uses structural reparameterization to simplify the complex multi-branch structure into a single convolutional layer, thereby maintaining efficient inference speed. Due to the complex morphology and scale variations of tomato radicles, they often have rich texture details. Traditional 3×3 convolutions may suffer from detail loss or insufficient feature representation when processing such complex and multi-scale features. However, DBB can better capture these subtle features and information at different scales through diverse convolutional paths, enabling the model to effectively identify and extract the boundaries and texture features of tomato radicles when faced with objects of diverse morphologies.

[0046] Secondly, we added Context Anchor Attention (CAA) to the upsampling part and skip connection of the DC-U-Net model (DC-U-Net). The core principle of CAA is to enhance feature expression by capturing long-range contextual relationships (Cai et al., 2024). Figure 3As shown in (d), CAA extracts global information through global average pooling, followed by channel transformation using 1×1 Conv to enhance local features. Next, horizontal and vertical Depth-wise StripConvolutions Conv (DWConv) are used to capture long-range dependencies, effectively expanding the receptive field. Finally, an attention weight map is generated through 1×1 Conv and Sigmoid activation to adjust the importance of each feature channel and enhance key features. CAA mainly addresses the problem that traditional networks have difficulty in recognizing detailed features, especially their insensitivity to relationships between distant pixels.

[0047] In addition, in the model of this application, in order to better adapt to the complex and changeable morphological characteristics of tomato radicle, a diagonal depth-separable convolution (DWConv(diag)) is added to the CAA module based on the original horizontal and vertical depth-separable convolution branches. This improvement aims to capture oblique texture and boundary information, which are particularly significant in the image of tomato radicle, and are difficult to fully extract by relying solely on horizontal and vertical convolution branches. DWConv(diag) uses a 3×3 convolution kernel. The 3×3 convolution kernel is chosen because it can effectively cover pixels in the diagonal direction and capture local oblique textures while maintaining low computational complexity. Combined with the high efficiency of depth-separable convolution, the module's sensitivity and expression ability to oblique features are significantly enhanced by performing independent oblique feature extraction on each channel. Its calculation principle includes first performing depth-wise convolution to capture local oblique features, and then performing channel mixing through point-by-point convolution, thereby improving the diversity and comprehensiveness of feature extraction without significantly increasing the amount of computation. Through this design, the optimized CAA module not only maintains a good capture capability of horizontal and vertical features, but also effectively supplements the extraction of oblique features, significantly improving the accuracy and robustness of the model in the tomato radicle segmentation task.

[0048] Using the data set obtained in the previous steps, this application can specifically adopt the following method to train the improved DC-U-Net model, then conduct a verification experiment of the model evaluation index, and finally use it to measure the germination phenotype.

[0049] In this study, we used Mean Intersection over Union (MIoU) and Mean Pixel Accuracy (MPA) to evaluate model performance. MIoU calculates the ratio of the intersection over union between the true and predicted values ​​for each class, then averages it across all classes. MPA calculates the average pixel accuracy across all classes; higher values ​​for these metrics indicate higher segmentation accuracy.

[0050]

[0051] Among them, TP, FP, TN, and FN represent true positive, false positive, true negative, and false negative, respectively.

[0052] We also used the Autodl cloud computing platform (https: / / www.autodl.com) for accelerated training, using an RTX 4090 (24GB) GPU. We used Python version 3.8 as the programming language for building the model, and PyTorch version 1.10 as the programming framework. The hyperparameters for model training are as follows.

[0053] Table 1 Model training hyperparameters

[0054]

[0055] After the DC-U-Net model obtained by the above method processes the cultivated tomato seed image, the output is a binary image containing mask information (such as Figure 4 (C) However, due to the irregular growth morphology of tomato radicles in the image, which is often accompanied by curvature, direct extraction of radicle length parameters from this image is not possible. Therefore, we combined the DC-U-Net model with the Canny edge detection algorithm to extract the radicle edge. We then counted the number of pixels within the edge contour in the binary image and approximated the radicle length by half the perimeter of the irregular polygonal contour. The Canny algorithm employed in this edge detection process consists of key steps such as Gaussian filtering, gradient calculation, non-maximum suppression (NMS), and double threshold detection. To improve the accuracy of radicle edge detection, this study considered and utilized mask information during Canny edge detection. It is important to emphasize that the mask here is not a simple rectangular bounding box, but rather a binary image generated by the DC-Unet model through pixel-by-pixel semantic segmentation. This mask accurately represents the true shape of the radicle region at each pixel. Due to the use of this precise mask, the Canny algorithm only calculates gradients for pixels within the mask during edge detection, effectively eliminating background interference and accurately identifying sudden changes in the radicle contour between the radicle and the background. In other words, we do not just search for edges within the box, but use gradient changes to determine the edges based on the pixel-level radicle area defined by the mask, so that the detection results are more consistent with the actual radicle morphology.

[0056] Specifically:

[0057] In the U-Net model used in this application, first, we replaced the 3×3Conv in the decoder part with DiverseBranchBlock (DBB). Figure 3The left side is specifically constructed as follows with a four-branch structure that receives input features in parallel, where:

[0058] DBB-1) First branch structure (1×1 convolution BN)

[0059] The first branch performs a 1×1 convolution on the input feature X for channel conversion, so that the information of each pixel is linearly converted through the 1x1 convolution kernel.

[0060] The transformation calculation process is as follows:

[0061] Y1=Conv 1×1 (X)

[0062] Subsequently, this branch applies batch normalization (BN1) to the convolution result to normalize the activation values ​​and improve training stability:

[0063] Y1=BN1(Y1)

[0064] Finally, the output Y1 of this branch is used as a partial feature for subsequent fusion.

[0065] DBB-2) Second branch structure (1×1 convolution K×K convolution twice BN)

[0066] The second branch first performs a 1x1 convolution on the input X for channel transformation and applies batch norm (BN2-1) to it.

[0067] Y2=BN2-1(Conv 1×1 (X))

[0068] Then, Y2 undergoes a KxK convolution to extract spatial information, and its result is batch-normalized (BN2-2):

[0069] Y2=BN2-2(Conv K×K (Y2))

[0070] Finally, the output Y2 of this branch is used as a partial feature for subsequent fusion.

[0071] DBB-3) The third branch structure (1×1 convolution + average pooling + two batch normalizations)

[0072] The third branch first performs a 1x1 convolution on the input X and then applies batch norm (BN3-1) for normalization:

[0073] Y3=BN3-1(Conv 1×1 (X))

[0074] Subsequently, Y3 undergoes KxK average pooling to aggregate local information and applies batch norm (BN3-2)

[0075] Y3=BN3-2(AvgPool K×K (Y3))

[0076] Finally, the output Y3 of this branch is used as a partial feature for subsequent fusion.

[0077] DBB-4) Fourth branch structure (KxK convolution BN)

[0078] The fourth branch directly applies KxK convolution to the input X, and then applies batch norm (BN4) for normalization:

[0079] Y4=BN4(Conv K×K (X))

[0080] Finally, the output Y4 of this branch is used as a partial feature for subsequent fusion.

[0081] DBB-5) After the input features are processed separately by each branch structure mentioned above, the four branches are also fused and nonlinearly activated. In this step, the outputs of all branches are accumulated as follows:

[0082] Y sum =Y1+Y2+Y3+Y4

[0083] Then, the accumulated results are activated by nonlinearity (SiLU)

[0084] Y out =SiLU(Y sum )

[0085] Final output Y out As the final result of this module.

[0086] In this U-Net model, the CAA attention mechanism module introduced at the decoder and jump connection first extracts global information through global average pooling; then uses 1×1Conv for channel transformation to enhance local features; then captures long-distance dependencies through horizontal depth-separable convolution branches, vertical depth-separable convolution branches, and local oblique textures through diagonal depth-separable convolution branches; finally, generates an attention weight map through 1×1Conv and Sigmoid activation to adjust the importance of each feature channel and enhance key features.

[0087] In the above CAA attention mechanism module, the calculation principle of the horizontal depthwise separable convolution branch (HorizontalDepthwiseSeparableConvolution) is as follows: The horizontal depthwise separable convolution (h_conv) uses a 1×K convolution kernel and performs convolution operations only in the horizontal direction (W axis) of the feature map without affecting the vertical direction (H axis). Its core idea is to use group convolution (groups=ch) to make the calculation of each channel independent, thereby reducing the computational complexity and being able to capture long-distance horizontal features. In this way, the model's perception of horizontal edges and horizontal structures can be enhanced.

[0088] The specific calculation process is:

[0089] h1. Input feature map x (size is C×H×W);

[0090] h2. Apply a 1×K convolution kernel to each channel independently, sliding only along the width W axis, leaving the height H unchanged; ensure that the output size is consistent with the input by padding = (0, K / / 2);

[0091] h3. Output feature Y, whose size is still C×H×W;

[0092] h4. The output is passed to the subsequent activation function and attention module;

[0093] The mathematical formula corresponding to the above steps is:

[0094]

[0095] in:

[0096] X(c,h,w) is the input feature map, each channel is calculated separately;

[0097] W h (c,k x ) is the convolution kernel of 1×K (horizontally);

[0098] Y h (c,h,w) is the output after convolution calculation.

[0099] In the above CAA attention mechanism module, the calculation principle of the vertical depthwise separable convolution branch (VerticalDepthwiseSeparableConvolution) is as follows: The vertical depthwise separable convolution (v_conv) uses a K×1 convolution kernel and performs convolution operations only in the vertical direction (H axis) of the feature map without affecting the horizontal direction (W axis). Similar to horizontal convolution, it uses group convolution (groups=ch) to make each channel calculated independently to reduce computational complexity and help capture structural information in the vertical direction. This method can enhance the model's ability to capture features such as vertical edges and vertical textures. For example, it performs well in scenarios such as plant stems and columnar structures.

[0100] The specific calculation process is:

[0101] v1. Input features Figure X (size is C×H×W);

[0102] v2. Apply a K×1 convolution kernel to each channel independently, sliding only along the height H axis, with width W unchanged. Padding = (K / / 2, 0) is used to ensure that the output size is consistent with the input.

[0103] v3. Output feature Y, whose size is still C×H×W;

[0104] v4. The output is passed to the subsequent activation function and attention module.

[0105] The mathematical formula corresponding to the above steps is:

[0106]

[0107] in:

[0108] X(c,h,w) is the input feature map, each channel is calculated separately;

[0109] W v (c,k y ) is the K×1 convolution kernel (vertical direction);

[0110] Y v (c,h,w) is the output after convolution calculation;

[0111] In the above-mentioned CAA attention mechanism module, after performing horizontal depth-separable convolution and vertical depth-separable convolution on the feature image, the diagonal depth-separable convolution branch described below is also used to independently use a 3×3 convolution kernel on each channel to cover the pixels in the diagonal direction, capturing local oblique texture and boundary information, and then performing channel mixing through point-by-point convolution. The reason for this is that the aforementioned depthwise separable convolution primarily focuses on local neighborhood features in the horizontal direction (e.g., (Δx, 0)) and vertical direction (e.g., (0, Δy). Given the often oblique growth or curved structure of tomato radicles, relying solely on horizontal and vertical convolution branches may cause the network to ignore or weaken learning of diagonal pixel differences. To this end, this module adds a diagonal depthwise separable convolution branch (DWConv(diag)) to the existing branch. This branch uses a 3×3 convolution kernel to apply more weight to the (±1, ±1) directional neighborhood, focusing on oblique textures and edges. The overall process: Depthwise + Pointwise is similar to general depthwise separable convolution. DWConv(diag) consists of two steps: Depthwise (diag) Convolution (channel-by-channel oblique convolution) and Pointwise Convolution (channel blending). The specific computational process of this diagonal depthwise separable convolution branch is as follows:

[0112] 1-Depthwise (diag) Convolution channel oblique feature extraction

[0113] (d1-1) Let the input feature and channel splitting be X∈R C×H×W , where C is the number of channels, H and W are the height and width of the feature map respectively. Split X into {X1, X2, .., Xc} in the channel dimension, corresponding to the two-dimensional feature map of C channels {X1, X2, ..., Xc} C}

[0114] (d1-2) diagonal convolution kernel design

[0115] For channel c, define a 3×3 convolution kernel

[0116]

[0117] In order to highlight the diagonal direction ((±1,±1)), we can let |k c (±1,±1)| is higher to more sensitively capture oblique pixel differences.

[0118] (d1-3) channel-by-channel convolution calculation

[0119] Output for channel c At pixel (u,v), the calculation formula is:

[0120]

[0121] After completing the depth convolution of all channels, the output

[0122]

[0123] At this time, the number of channels remains consistent with the input, and only oblique features are extracted in the spatial dimension.

[0124] 2-Pointwise Convolution: Channel Mixing

[0125] The depthwise (diag) output is still C channels. In order to allow the network to fully integrate the oblique feature information of each channel, a 1×1 volume (Pointwise Convolution) is required:

[0126] (d2-1) defines a 1×1 convolution kernel

[0127] The convolution kernel weight is recorded as

[0128] Where Cot is the required number of output channels.

[0129] (d2-2) linear combination between channels

[0130] For the final d-th output channel Za, the calculation formula at the pixel position (u, w) is:

[0131]

[0132] In this way, the features learned in the oblique direction of each channel can be fused or weighted through 1×1 convolution to obtain a new channel representation.

[0133] 3- Final output

[0134] Finally formed All channel oblique features learned by the diagonal branch are integrated for use by subsequent network layers or attention mechanisms.

[0135] In the above diagonal depth-wise separable convolution branch, k c The weight of (i,j)(i,j∈{±1}) should ensure the effectiveness of extracting oblique texture and edge features, so the following constraints can be adopted:

[0136] k c (i,j)≥max(0.5·k c (0,0),0.3·max(k c ))

[0137] in:

[0138] k c (0,0) is the center element of the convolution kernel and usually has the highest weight;

[0139] max(k c ) is the maximum weight in the entire 3x3 convolution kernel.

[0140] Setting 0.5 as the lower limit of the ratio relative to the center weight can ensure that the diagonal weights will not be much lower than the center weight.

[0141] Setting 0.3 as the lower limit of the ratio relative to the maximum weight ensures that even if the center weight is low, the diagonal direction still accounts for a certain proportion. This standard can ensure that: when the center weight is high, the diagonal direction retains at least 50% of its weight, ensuring that the oblique features are not weakened. Secondly, when the center weight is low but other directions are strong, the weight of the diagonal direction is not less than 30% of the global maximum weight to prevent the loss of oblique feature information. This method takes into account both computational stability and oblique feature extraction capabilities, and can be effectively applied to edge detection and oblique texture analysis, while avoiding information bias or computational instability caused by excessively high diagonal weights.

[0142] The convolution kernel K of the diagonal depth-wise separable convolution, where any element k c (i, j) represent the weighting coefficients for each pixel within the 3x3 computation window, respectively, which determine the intensity of the convolution operation's response to surrounding pixels. The following are the Chinese and physical meanings of each element.

[0143] Convolution kernel matrix representation

[0144]

[0145] in:

[0146] The row index i represents the offset of the pixel in the vertical direction (row direction): i=-1 represents the upper pixel, i=0 represents the current pixel (center point), and i=-1 represents the lower pixel.

[0147] The column index j represents the offset of the pixel in the horizontal direction (column direction): j=-1 represents the left pixel, j=0 represents the column where the current pixel is located, and j=1 represents the right pixel.

[0148] The Chinese meaning and physical significance of each element

[0149]

[0150]

[0151] Therefore, in the above CAA attention mechanism module, the following can be achieved through the diagonal depth-separable convolution branch:

[0152] (1) More sensitive to oblique neighborhoods

[0153] By assigning higher convolution kernel weights at diagonal positions such as (±1, ±1), DWConv(diag) can capture the subtle structures of non-horizontal or vertical radicles and solve the problem of local omission when relying only on horizontal and vertical branches.

[0154] (2) Integration with other branches

[0155] In the CAA module, horizontal, vertical, and newly added diagonal branches capture textures in different directions. Pointwise convolution then unifies the mixing in the channel dimension. Leveraging the attention mechanism, it can further selectively enhance or suppress certain channel features, resulting in a more comprehensive and accurate segmentation of tomato radicle morphology. By introducing a new branch, the diagonal depthwise separable convolution (DWConv(diag)), it performs independent convolutions on diagonal areas in the "Depthwise" stage while blending multi-channel diagonal information in the "Pointwise" stage. This, in conjunction with the other horizontal and vertical convolution branches and the attention mechanism, enables the network to maintain high segmentation accuracy and robustness despite the variable and curved growth of tomato radicle morphology.

[0156] The improved DC-U-Net model can clarify its model parameters through the following pre-training steps. Then, in the detection and inference stage, the DiverseBranchBlock module can be structurally reparameterized to simplify the complex multi-branch structure into a single convolutional layer, integrating multi-scale features, and directly used for extracting and analyzing the phenotypic characteristics of tomato germinating seeds.

[0157] The specific training steps of the improved U-Net model provided by the present invention are as follows:

[0158] X1) Model Initialization and Optimizer Configuration: Load the DC-Unet model (including the VGG encoder, improved decoder, and attention mechanism) onto an available computing device. Initialize all convolutional layers and attention modules using methods such as Kaiming and Xavier. Then, select an appropriate optimizer and set hyperparameters such as the initial learning rate, momentum, and weight decay to ensure stable convergence in subsequent iterations.

[0159] X2) - Batch Data Input and Forward Propagation: After formal training begins, batches of images and corresponding radicle mask labels are read from the DataLoader and fed into the network. The network first performs multiple convolutions and max pooling on the images in the VGG encoder stage, continuously extracting multi-scale deep semantic features and saving the outputs of each layer for skip connections. The decoder then enters the decoder stage, where shallow details are fused with deep representations by upsampling and concatenating feature maps recorded by the encoder. During this process, embedded improvement modules further enhance the extraction of edge and texture features in the radicle region, ultimately outputting a predicted mask.

[0160] X3) - Loss Function and Backpropagation: The predicted mask output by the network is compared with the ground-truth mask labels, and the error for the current batch is calculated using the cross-entropy or Dice loss function. Backpropagation is then performed to propagate the gradient of the loss layer by layer to all learnable parameters, including convolution kernels and attention units. The optimizer's step() function is then called to modify these parameters. Zero_grad() is then used to clear the accumulated gradients from the previous batch, preparing for the next batch of data.

[0161] X4) Epoch Loop and Validation Monitoring: After processing each batch, the next batch of images is read and the "forward propagation - loss calculation - backpropagation - parameter update" cycle is repeated until all batches of the training set are complete. This constitutes one epoch. Typically, at the end of each epoch, segmentation inference is performed on the validation set. Weights do not need to be updated, and only metrics such as mIoU and mPA are calculated to assess the generalization ability of the current model. If these metrics continue to improve, training is converging steadily. If performance stagnates or overfitting occurs, consider reducing the learning rate or implementing strategies such as early stopping.

[0162] X5) Model Saving and Testing Evaluation: When validation set performance continues to improve and reaches optimality, the model weights for that epoch are saved for future use. After final training, these optimal weights are used to perform inference on the test set and calculate segmentation metrics to verify the network's actual performance on unseen data. If the test results are satisfactory, the model can be applied to tomato radicle segmentation to assist in subsequent quantitative analysis of growth phenotypes.

[0163] After the training is completed, the DC-U-Net model can be directly called according to the model parameters obtained from the training. The image of tomato germinating seeds is processed by the improved U-Net model to obtain a binary image containing mask information. Then, the Canny edge detection algorithm is called to extract the edge contour of the germination phenotype detection target in the binary image according to the pixels corresponding to the mask information. The actual size of the germination phenotype detection target is calculated based on the number of pixels corresponding to the extracted edge contour and the proportional relationship between the image pixels and the actual length.

[0164] The biggest feature of the Canny edge detection used in this application is that its series of operations can effectively suppress noise while retaining real edge information: Gaussian filtering can smooth the image and reduce the impact of random noise on the gradient results; gradient calculation and non-maximum suppression can refine the edges and highlight the maximum pixels of the local gradient; dual threshold detection and edge connection ensure that strong edges are retained, and weak edges must be connected to strong edges to be retained, thereby eliminating a large number of pseudo-edges or incoherent areas. Therefore, in many cases, Canny edge detection has good accuracy and stability, and is especially suitable for contour extraction and edge tracking (such as radicles). The Canny edge detection principles and key steps used in this application are as follows:

[0165] Canny Step 1: Image Smoothing: Gaussian filtering uses a Gaussian kernel to smooth the image, reducing noise interference and providing a more stable foundation for subsequent gradient detection. The template elements of the Gaussian filter are typically determined by the Gaussian distribution formula; smoothing is achieved by convolving the image. When processing an M×N image, a padding strategy is typically used at the edges to ensure that the output size after convolution is consistent with the input.

[0166] Canny step 2) Calculate the gradient magnitude and direction. The Sobel operator is often used to calculate the gradient of the image in the x and y directions:

[0167]

[0168] Among them S x With S y , is the Sobel operator kernel, Represents a convolution operation.

[0169] The total gradient amplitude is

[0170]

[0171] The gradient direction θ can be obtained by If a finer edge response is required, a more complex Sobel kernel or other operators can be used, but the principle is the same.

[0172] Canny step 3) Non-maximum suppression (NMS)

[0173] Edge thinning sets the non-maximum pixel values ​​in the gradient direction to 0, retaining only the local maximum pixels as potential edge points. Specifically, compare two adjacent pixels in the gradient direction of the current pixel. If the gradient value of the current pixel is not the largest among the three, set it to zero.

[0174] Canny step 4) dual threshold detection

[0175] High and low threshold discrimination

[0176] Set the upper threshold (maxVal) and the lower threshold (minVal), usually making maxVal≈3×minVal.

[0177] For gradient magnitude:

[0178] Pixels with a value greater than maxVal are considered "strong edges".

[0179] Pixels smaller than minVal are considered "non-edge".

[0180] The edges between the two are temporarily regarded as "weak edges", and their ultimate retention depends on the connectivity with the strong edges.

[0181] Canny step 5) Edge connection

[0182] This step first checks connectivity: Starting from the identified strong edge pixel, all weak edge pixels in its 8-neighborhood whose gradient values ​​are between [minVal, maxVal] are checked. If connectivity exists, the weak edge is considered part of the true edge; otherwise, it is discarded. Ultimately, a complete and refined edge outline is formed.

[0183] Figure 4 (DCD4) shows the image processed by this algorithm. Finally, by accumulating the number of edge contour pixels identified by the Canny algorithm, the pixel length of the radicle can be calculated by the ratio of the image pixels to the actual length (e.g. Figure 4 (D)

[0184] Specifically, when the pixel length obtained in the above steps is converted into the actual length by using a scale, the scale relied on can be determined as follows: Figure 4 As shown in (E), a steel ruler with an actual length of 50 mm was placed in the culture area of ​​the acquisition platform. Its pixel length in the image is 3750 pixels, and 1 mm corresponds to 75 pixels. Based on this scale, the actual length of the radicle was finally obtained ( Figure 4 (F1)). To facilitate observation and statistical analysis, we superimpose the measured radicle length on the original image ( Figure 4 (F2)), and save the actual length of each radicle into a CSV file ( Figure 4 (F3)). In addition, we manually measured the radicle length using ImageJ software as a basis for comparison and verification with the model.

[0185] The following is a test of the performance indicators of the germination phenotype measurement method based on the improved U-Net provided in this application by comparing the measurement results of tomato radicles by different models.

[0186] C1. Performance indicators of different models

[0187] To compare the performance of different models and various improved U-Net models for tomato radicle segmentation, we evaluated the performance indicators of Seg-Net, DeeplabV3+, U-Net, DU-Net, and DC-U-Net. All models were trained on the same dataset. Although DeepLabV3+ and Seg-Net have achieved some results in agricultural applications, they have the following shortcomings: For DeepLabV3+, although the dilated convolution and ASPP modules can capture multi-scale features, in scenes with cluttered backgrounds and extremely subtle target edges, the dilated convolution sampling method may not fully retain those key local details, resulting in rough or broken target edges; at the same time, multi-scale pooling tends to focus on target features with significant differences and is not sensitive enough to distinguish lesions or subtle tissues that are highly similar to the background. For SegNet, although its upsampling mechanism based on maximum pooling index reduces the amount of computation, it is prone to omissions in the restoration of detailed textures and complex target edges compared to more sophisticated information fusion methods such as skip connections; in agricultural environments with high-similarity backgrounds or variable target shapes, SegNet's pooling index method sometimes finds it difficult to maintain stable and detailed target contours, and may also result in inaccurate edge positioning in the segmentation of long strips or overlapping targets.

[0188] In the prior art, although the symmetrical encoder-decoder structure and jump connection design in U-Net can be used in some fields to capture detailed features and contextual information in images, the existing U-Net model often has the problem of being unable to accurately identify the radicle, which has different shapes and fine edges, and is easily interfered by the background and cannot accurately identify the tiny features of the radicle in the recognition scenario of small and irregular features such as the radicle and plumule of tomatoes used in this application. However, this application introduces the DiverseBranchBlock network in the decoder stage of the U-Net model to integrate multi-scale convolution branches, thereby more accurately extracting and fusing information of multiple spatial scales; at the same time, it adds a CAA attention mechanism for the corner depth separable convolution branch, which can adaptively adjust the feature weights at both the channel and spatial levels, so that the key details in the radicle area can be highlighted, further effectively weakening background interference and enhancing the segmentation stability of the model under different environmental disturbances. Through the comparison of the segmentation measurement of the tomato radicle length by different models below, the model of this application not only shows higher accuracy and anti-interference ability, but also significantly improves the sensitivity to the delicate structure and morphological changes of the radicle.

[0189] Specifically, Figure 5 (a) and (b) show the training and validation loss curves of the five models over 100 epochs. Seg-Net exhibits high loss levels throughout training and validation, with large loss curve fluctuations, reflecting weak learning ability. Both its training and validation losses exceed 0.12. DeeplabV3+'s loss decreases rapidly in the early stages, but converges relatively poorly later, with significant validation curve fluctuations, and training and validation losses of approximately 0.10 and 0.11. In contrast, the U-net model exhibits significantly less volatility in its training and validation loss curves than Seg-Net and DeeplabV3+, with training and validation losses of approximately 0.078 and 0.081, respectively. DU-Net and DC-U-Net exhibit smoother loss curves, with lower training and validation loss values. DC-U-Net performs the best, with smoother and smallest training and validation loss curves, with training loss approaching 0.0457 and validation loss approaching 0.053, demonstrating excellent convergence and stability.

[0190] The MIOU and MPA of the five models are as follows: Figure 5As shown in (c) and (d), U-net's MIOU and MPA are both better than Seg-Net and DeeplabV3+. Specifically, U-net's MIOU is 7.16% and 3.31% higher than DeeplabV3+, respectively, while its MPA is 8.72% and 4.7% higher. This may be because U-net uses skip connections to directly fuse the encoder's feature maps with the feature maps of the corresponding stage of the decoder, allowing the model to simultaneously utilize low-level spatial details and high-level semantic information, thereby achieving better segmentation performance. Therefore, we carried out improvements based on U-net. When the convolution in U-net upsampling was replaced with DiverseBranchBlock, DU-Net's MIOU and MPA increased to 89.78% and 93.8%, respectively, an increase of 0.99 percentage points over U-Net, and an increase of 0.21 percentage points over MPA. By further adding the CAA attention mechanism to the upsampling portion and skip connections of DU-Net, DC-U-Net's MIOU and MPA increased by 90.82% and 94.19%, respectively, improving by 1.04% and 0.18% over DU-Net, and by 2.03% and 0.39% over the basic U-Net model. Therefore, replacing the upsampling convolutions and introducing the CAA attention mechanism can effectively improve the U-Net model.

[0191] C2. Actual segmentation results of different models

[0192] In order to evaluate the actual segmentation effects of the five models on tomato radicle, we extracted the actual segmentation maps, e.g. Figure 6 As shown. The figure shows four different example images, representing different stages of seed germination: Example 1 and Example 2 represent the early germination stage, Example 3 represents the middle germination stage, and Example 4 represents the late germination stage. The first row (ACA4) is the original image, and the remaining rows show the segmentation results of five models in turn, corresponding to Seg-Net (BCB4), DeeplabV3+ (CCC4), U-net (DCD4), DU-Net (ECE4) and DC-U-Net (FCF4). In these segmentation results, boxes of different colors are used to mark segmentation errors: blue boxes indicate incomplete segmentation, green boxes indicate root not recognized, that is, the root is missed; orange boxes indicate sticking or splitting breaks.

[0193] The number of errors reported by the model for the given example is annotated at the bottom of each segmentation result image, allowing for a quantitative comparison of the performance of different models. Specifically, Seg-Net performed poorly across all examples, with a total of 22, 21, 16, and 24 errors in Examples 1, 2, 3, and 4, respectively. In particular, in Examples 1 and 2, there were a high number of root failure errors, indicating that Seg-Net had significant deficiencies in handling the fine roots in the early stages of germination. In contrast, DeeplabV3+ improved on the root failure issue, but exhibited a high number of incomplete segmentation errors (18, 17, 16, and 12 in Examples 1, 2, 3, and 4, respectively), indicating that it still struggled in capturing detail and segmentation completeness. U-Net significantly reduced the number of errors, particularly in the early and middle stages of germination, with noticeable improvements in root failure and incomplete segmentation. In Examples 1 and 2, U-Net reported 2 and 6 errors, respectively, demonstrating improved detail handling. DU-Net further optimizes the U-Net model, further reducing the number of errors. Only three incomplete segmentation errors occurred in examples 1 and 2, and no errors occurred in examples 3 and 4. When the attention mechanism was introduced to DU-Net, the model's segmentation performance was further improved, eliminating the aforementioned errors in all examples. This demonstrates that the DC-U-Net model has excellent segmentation accuracy and stability, making it well suited for the tomato radicle segmentation task.

[0194] C3. Comparison of measurement accuracy of tomato radicle length

[0195] Given the excellent performance of the DC-U-Net model in the tomato radicle segmentation task, we selected this model for segmentation and combined it with the Canny algorithm to measure root length. We randomly selected 50 tomato seed germination images from the test set and compared the radicle length results measured by this method with those manually measured using ImageJ software to evaluate the performance of the two methods in terms of measurement speed and result consistency. Figure 7 Figure (a) shows the actual root lengths measured by the two methods. B1 and B2 represent the measurements obtained using ImageJ software, while C1 and C2 represent the measurements using our proposed method. A portion of the radicle is magnified for easier observation. As can be seen from the figure, the root length measurements obtained by the two methods are very close. Figure 7 (b) shows the fitting relationship between the root length measurement values ​​of the two methods in 50 images. The results show that the two methods are highly correlated, with a correlation coefficient R2 of 0.991 and a root mean square error (RMSE) of 0.198 mm. The total time required to complete the root length measurement of 50 images is as follows: Figure 7As shown in (c), we manually measured and recorded the radicle length data from these images using ImageJ, which took approximately 30,000 seconds. In comparison, our method completed the same task in just 100 seconds, significantly improving the efficiency of tomato radicle length measurement. These results demonstrate that our proposed tomato radicle length measurement method has advantages in accuracy and efficiency and is suitable for practical applications.

[0196] Furthermore, the present application also measures the radicle length of tomatoes under different experimental conditions using the improved U-Net-based germination phenotype measurement method obtained in the aforementioned manner.

[0197] D1. Effects of different drought conditions on tomato radicle length

[0198] The role of the root sensory system is to transport water and solutes to ensure the normal growth of the entire plant. It may be the first sense to perceive drought. Compared with shorter roots, longer roots are more conducive to drought tolerance. Figure 8 The data on radicle length of tomato seeds under different drought conditions at different time periods are displayed. The data points on the box plot reflect the distribution of radicle length of tomatoes in three repeated experiments, and the "Mean line" segment represents the average radicle length of the three experiments. As can be seen from the figure, with the increase in the concentration of PEG-6000 solution, the time for tomato germination and rooting is gradually delayed. Roots of CK began to grow within 28.25-32 hours, at which time the average root length of tomatoes was 1.28mm. Tomatoes treated with 2%, 4%, 6%, 8%, and 10% PEG-6000 solutions began to grow radicles within 32.25-36 hours, 40.25-44 hours, 48.25-52 hours, 52.25-56 hours, and 56.25-60 hours, respectively.

[0199] Furthermore, the average radicle length of the CK treatment was greater than that of the other treatments at all time periods. Furthermore, as the concentration of the PEG-6000 solution increased, the intensity of drought stress intensified, and the average radicle length of the tomato plants decreased significantly. For example, during the period of Dt = 56.25-60h, the average radicle length of the CK control group was 6.55mm, while the average root lengths of the tomatoes treated with 2%, 4%, 6%, 8%, and 10% PEG-6000 solutions were 3.87mm, 2.23mm, 1.99mm, 1.24mm, and 0.71mm, respectively. As can be seen, the average root length of tomatoes treated with 2% PEG-6000 solution decreased by approximately 41% compared to the CK control group. When the PEG-6000 concentration increased to 10%, the average root length decreased by approximately 89.2% compared to the CK control group. This indicates that water shortage is highly detrimental to the growth of tomato radicles, and root length is significantly inhibited under water-deficient conditions.

[0200] D2. Analysis of tomato radicle length under different salt stress conditions

[0201] Figure 9 The statistical results of the radicle length of tomato seeds at different time periods under different salinization environments are presented. The results show that salt stress also delays the initial germination time of tomato seeds to varying degrees. The seeds of the CK began to germinate within 28.25-32 hours, while under the treatment of 50, 75, 100, 125, and 150 mmol / L NaCl solutions, the seeds began to germinate and grow at 32.25-36 hours, 36.25-40 hours, 40.25-44 hours, 52.25-56 hours, and 56.25-60 hours, respectively. Moreover, at each time period, as the concentration of the NaCl solution increased, the average length of the tomato radicle decreased to varying degrees compared with the CK, and the inhibitory effect of increasing salt concentration on tomato radicle growth became more obvious. Taking the data from the period Dt = 56.25-60h as an example, the average radicle length of tomato plants treated with CK was 6.21mm, while the average root lengths of tomatoes treated with 50, 75, 100, 125, and 150mmol / L NaCl solutions decreased to 3.8mm, 3.63mm, 2.85mm, 1.05mm, and 0.73mm, respectively. Under 50mmol / L NaCl, radicle length decreased by approximately 38.8% compared to the control CK. When the NaCl concentration increased to 150mmol / L, the decrease increased to approximately 88.2%. This indicates that salinization has a significant negative impact on tomato radicle growth, and the inhibitory effect becomes more severe with increasing salt concentration.

[0202] D3. Analysis of tomato radicle length under different concentrations of HL4

[0203] Figure 10The figure shows the changing trends in radicle length of tomato seeds treated with different concentrations of HL4 over various time periods. The figure shows that the stock HL4 solution and its dilutions can advance the onset of germination in tomato seeds. Seeds in the CK treatment began germinating between 28.25 and 32 hours, while seeds treated with a 100-fold dilution of HL4 germinated between 20.25 and 24 hours. Seeds in the other treatment groups germinated between 24.25 and 28 hours earlier. Furthermore, it can be seen that HL4 fermentation solution diluted 10, 100, 500, and 1000 times promoted tomato radicle growth. During the time period of Dt = 56.25-60 hours, the average radicle length of tomatoes in the CK treatment was 6.49 mm, while that of tomatoes treated with 10-fold, 100-fold, 500-fold, and 1000-fold diluted HL4 fermentation solution was 6.87 mm, 7.55 mm, 6.64 mm, and 6.56 mm, respectively. Among them, the fermentation liquid diluted 100 times had the strongest effect on promoting the growth of tomato radicles. In addition, although the HL4 stock solution can promote early seed germination, it shows a certain inhibitory effect on the growth of the radicle. Starting from the time period of Dt = 28.25-32h, the average radicle length under the HL4 stock solution treatment was reduced compared with CK. In the time period of Dt = 56.25-60h, the average radicle length under the HL4 stock solution treatment was reduced by 2.33mm compared with CK. From the above results, it can be seen that in this study, HL4 stimulated the elongation of tomato radicles after germination, especially the effect of the fermentation liquid diluted 100 on promoting radicle growth was the most obvious, but it also revealed that excessively high concentrations of HL4 treatment may have an inhibitory effect on radicle growth.

[0204] D4. Analysis of tomato radicle length under different concentrations of GZ2

[0205] from Figure 11As can be seen, the GZ2 stock solution and its various dilutions all advanced the onset of tomato seed germination. Seeds treated with the GZ2 stock solution, 10-fold dilutions, and 100-fold dilutions germinated within 20.25-28 hours, while those treated with the 500-fold and 1000-fold dilutions germinated within 24.25-28 hours. Furthermore, at each time point, the average radicle length increased compared to the CK solution under treatment with the various concentrations of fermentation solution, showing an overall trend of initially increasing and then decreasing. From Dt = 56.25 to 60 hours, the average radicle length of the CK solution was 6.22 mm, while the radicle lengths for the GZ2 stock solution, 10-fold dilutions, 100-fold dilutions, 500-fold dilutions, and 100-fold dilutions were 6.91 mm, 7.37 mm, 8.17 mm, 7.14 mm, and 6.53 mm, respectively. Among them, the average radicle length of seeds soaked in GZ2 fermentation liquid diluted 100 times was the highest, 1.95mm longer than that of CK. These results indicate that GZ2 fermentation liquid has a promoting effect on the radicle growth of tomato seeds, especially when diluted 100 times.

[0206] In summary, the method based on the improved U-Net semantic segmentation algorithm provided in this application can be used to calculate the actual length of the irregular and subtle radicle of tomato germination. First, we conducted experiments with the help of the seed germination phenotype collection system independently developed by the laboratory to complete the germination culture and image collection of tomato seeds. In a deionized water environment, a total of 4608 seed germination images were collected. After screening and data enhancement, 4304 were finally selected for model training. In order to improve the segmentation accuracy, we replaced the traditional 3×3 convolution (Conv) with DiverseBranchBlock in the decoder part of the model, and introduced the CAA attention mechanism in the decoder and jump connection. The improved model achieved 90.82% and 94.19% in MIOU and MPA indicators, respectively, which were 2.03% and 0.39% higher than the basic U-Net model. Compared with other semantic segmentation models (Seg-Net and DeepLabV3+), the MIOU of the improved model increased by 9.19% and 5.34%, respectively, and the MPA increased by 9.11% and 5.09%, respectively.

[0207] The CAA attention mechanism used in this application to add a diagonal depth-separable convolution branch can be further compared with several attention mechanisms such as CBAM, SCSA, PPA, ECA, SE, etc. after being combined with the DBB module. The following performance indicators can be compared on the validation set:

[0208] Table 2 Performance comparison of DBB and several attention mechanisms

[0209] Module combination MIOU (%) MPA (%) DBB+SE 89.88 94.01 DBB+ECA 89.97 94.05 DBB+PPA 90.27 94.08 DBB+SCSA 90.45 94.13 DBB+CBAM 90.40 94.12 DBB+CAA(original) 90.61 94.17 DBB+CAA(improved) 90.82 94.19

[0210] As shown in the table above, the combination of DBB and CAA achieves the highest MIOU and MPA. This is because in the tomato radicle segmentation task, CAA dynamically adjusts the feature weights of each channel through a channel-by-channel attention mechanism, focusing on key features within the radicle. The morphology of the tomato radicle is complex and subtle, and the details within the root are particularly important. Local features are crucial to the segmentation result. CAA effectively enhances these key local features, avoiding over-smoothing and loss of information. For example, CAA can highlight edge features within the root during segmentation, which is crucial for improving accuracy.

[0211] In contrast, SE (Squeeze-and-Excitation) uses global average pooling to capture inter-channel dependencies. While this method can enhance channel expressiveness to a certain extent, it struggles when dealing with objects with rich local details and complex morphology, such as tomato radicles. SE's global pooling operation causes it to focus more on global features rather than local details, resulting in inferior performance to CAA in the radicle segmentation task. Especially in the root boundary region, where details are more complex, SE often overlooks subtle differences, leading to mis-segmentation or missed segmentation. Furthermore, SE's global weighting mechanism may not fully capture subtle morphological variations in the radicle, thus affecting the final segmentation accuracy.

[0212] The ECA (Efficient Channel Attention) module reduces computational effort and improves the modeling efficiency of channel attention through local convolution operations. Although ECA has advantages in computational efficiency, it captures inter-channel dependencies through simple convolution operations and fails to provide sufficient accuracy in detail segmentation tasks. In the segmentation of tomato radicles, the morphological differences between the root and the radicle are subtle, and the ECA weighting mechanism may be too simple to effectively enhance attention to these subtle differences. Although ECA's processing of global channel relationships can improve global perception to a certain extent, it fails to provide sufficient precision for processing small targets such as the radicle, resulting in a decrease in segmentation accuracy.

[0213] Parallel Patch-wise Attention (PPA) uses multi-scale pooling to enhance the ability to capture contextual information and is theoretically capable of processing features at different scales. However, PPA has significant limitations in the tomato radicle segmentation task. While multi-scale pooling enhances global perception, it also blurs detailed information. Especially for small and complex objects like the radicle, the pooling operation often over-smoothes details, resulting in the loss of subtle differences. PPA's multi-scale feature aggregation focuses more on the overall context while neglecting the precise extraction of local details. This makes it inferior to CAA in segmenting fine structures.

[0214] CBAM (Convolutional Block Attention Module) combines spatial and channel attention to enhance its ability to capture both global and local information. While CBAM offers certain advantages in terms of spatial and channel weighting of the overall image, its spatial attention mechanism may not be able to effectively handle the subtle structural variations of tomato radicles in fine-grained segmentation tasks. CBAM's spatial attention focuses primarily on larger regions, but when segmenting small and complex targets like radicles, the spatial attention mechanism often struggles to accurately capture local details, especially at the interface between the root and other tissues. Therefore, while CBAM can process global information, it fails to focus on the key details of the radicle as precisely as CAA, resulting in less accurate segmentation results.

[0215] SCSA (Spatial and Channel Collaborative Attention Mechanism) uses self-similarity to enhance feature representation and capture internal self-similarity in an image. However, this mechanism is not suitable for objects with large structural variations, such as radicles. SCSA's self-matching mechanism is primarily based on the similarity between local regions in an image. However, for objects like tomato radicles, which exhibit significant morphological variations and local details, self-similarity modeling may not be able to adequately account for these complex structural differences, resulting in reduced segmentation accuracy.

[0216] In general, CAA has obvious advantages in the tomato radicle segmentation task. It can finely enhance the subtle local features in the radicle while avoiding the loss of details, thereby improving the segmentation accuracy. While other attention mechanisms such as SE, ECA, PPA, CBAM, and SCSA may perform well in some tasks, they have the problem of not being able to accurately capture subtle differences and local features when dealing with objects with complex morphology and rich details such as tomato radicles. Therefore, we choose the combination of DBB+CAA

[0217] Furthermore, based on the improved model, this application used the extracted mask image in combination with the Canny algorithm to calculate the actual root length of tomato radicles and compared the results with those measured using ImageJ software. The results showed high consistency between the two measurements, with a correlation coefficient R² of 0.991. In terms of time consumption, our method only takes an average of 100 seconds to calculate 50 images, while manual measurement using ImageJ requires 30,000 seconds, significantly improving efficiency.

[0218] Finally, we applied this method to analyze changes in tomato root length under different environmental conditions. The results showed that under drought and salinization conditions, tomato radicle length decreased significantly with increasing stress concentration. Furthermore, under treatment with different concentrations of Streptomyces albiflorus, the original solution inhibited radicle growth, but its diluted solutions significantly promoted growth. Treatment with Streptomyces virginiana promoted radicle growth, both in the original solution and at various diluted concentrations.

[0219] In summary, this study presents a non-destructive, high-throughput method for tomato radicle length measurement, which can provide important technical support for seed breeding research. We can also deploy this model on an embedded device and, by synergizing the detection model with a seed germination incubator, automate the entire process from image acquisition to radicle length measurement, enhancing its practicality. Furthermore, we will collect germination images of other crops to expand the algorithm's applicability. We will also continue to optimize the seed germination phenotyping system, for example by introducing automated irrigation to reduce human intervention and further improve its automation and application efficiency.

[0220] The above is only an embodiment of the present application, and its description is relatively specific and detailed, but it should not be understood as limiting the scope of the patent application. It should be pointed out that for those skilled in the art, various modifications and improvements can be made without departing from the concept of the present application, and these modifications and improvements are all within the scope of protection of the present application.

Claims

1. A method for measuring germination phenotype based on improved U-Net, characterized in that the steps include: The collected seed image is preprocessed, and then the preprocessed image is input into the pre-trained DC-U-Net model for semantic segmentation to obtain a binary image containing mask information; The Canny edge detection algorithm is used to extract the edge contour of the germination phenotype detection target in the binary image based on the pixels corresponding to the mask information. The number of pixels corresponding to the extracted edge contour is counted. The actual size of the germination phenotype detection target is calculated based on the ratio between the image pixels and the actual length. Among them, the DC-U-Net model uses the DiverseBranchBlock module to replace the 3×3 convolution module in the decoder, and introduces the CAA attention mechanism module at the decoder and jump connection.

2. The method for measuring germination phenotype based on improved U-Net according to claim 1, wherein: The DiverseBranchBlock module includes a four-branch structure that receives input features in parallel, wherein: The first branch structure first performs a 1×1 convolution on its input, and then performs a batch normalization process on the convolution result; The second branch structure performs 1×1 convolution and K×K convolution on its input sequence, and performs batch normalization on each convolution result after each convolution; The third branch structure performs 1×1 convolution and average pooling on its input sequence, and performs batch normalization on each result after each convolution and pooling; The fourth branch structure first performs a K×K convolution on its input, and then performs a batch normalization process on the convolution result; The outputs of the four-branch structure are accumulated and fused, and then output after nonlinear activation processing.

3. The method for measuring germination phenotype based on improved U-Net according to claim 1, wherein: The CAA attention mechanism module first extracts global information through global average pooling; then uses 1×1 Conv to perform channel transformation to enhance local features; then captures long-range dependencies through horizontal depth-separable convolution branches, vertical depth-separable convolution branches, and local oblique texture through diagonal depth-separable convolution branches; finally, generates an attention weight map through 1×1 Conv and Sigmoid activation to adjust the importance of each feature channel and enhance key features; In the above steps, the horizontal depth-wise separable convolution branch uses a 1×K convolution kernel to perform sliding convolution operations only in the horizontal direction of the feature map, and then the output is passed to the activation function and attention module of the subsequent vertical depth-wise separable convolution branch; The vertical depth-wise separable convolution branch uses a K×1 convolution kernel to perform sliding convolution operations only in the vertical direction of the feature map, and then the output is passed to the activation function and attention module of the subsequent diagonal depth-wise separable convolution branch; The diagonal depthwise separable convolution branch specifically uses a 3×3 convolution kernel on each channel to cover the pixels in the diagonal direction, captures local oblique texture and boundary information, and then performs channel mixing through point-by-point convolution.

4. The method for measuring germination phenotype based on improved U-Net according to claim 3, wherein: When the diagonal depth-wise separable convolution branch uses a 3×3 convolution kernel, weights are applied to the (±1,±1) direction neighborhoods respectively to focus on oblique textures and edges; The calculation process: First, use the 3×3 convolution kernel K c Channel-by-channel oblique convolution, then channel mixing through a 1×1 convolution kernel, and finally output; Among them, the 3×3 convolution kernel is Among them, the weight k in any diagonal direction in the 3×3 convolution kernel is c (i,j),(i,j∈{±1}) satisfy the following constraints: k c (i,j)≥max(0.5·k c (0,0),0.3·max(k c )) Where: k c (0,0) is the center element of the convolution kernel, which usually has the highest weight; max(k c ) is the maximum weight in the entire 3x3 convolution kernel.

5. The method for measuring germination phenotype based on improved U-Net according to claim 2, wherein: The pre-training steps for the DC-U-Net model include: First, assign initial weights to all convolutional layers and attention modules in the DC-U-Net model, select an appropriate optimizer, and set the initial learning rate, momentum, and weight decay hyperparameter values. Then, the images and corresponding radicle mask labels are read in batches and fed into the DC-U-Net model. The model first performs multiple convolutions and max pooling on the images in the VGG encoder stage, continuously extracting multi-scale deep semantic features and saving the outputs of each layer for skip connections. Subsequently, in the decoder stage, shallow details and deep representations are fused by upsampling and concatenating the feature maps recorded by the encoder. During this process, the improved module embedded in the DC-U-Net model further enhances the extraction of edge and texture features in the radicle region, and ultimately outputs a predicted mask. Compare the predicted mask of the DC-U-Net model output in the above steps with the actual mask label of the radicle corresponding to the image. Calculate the error of this batch using the cross entropy or Dice loss function. Then perform backpropagation to pass the gradient of the loss layer by layer to all learnable parameters in the DC-U-Net model. Then call the optimizer's step() function to modify the parameters, and then use zero_grad() to clear the accumulated gradient of the previous batch. After processing each batch of images in the training set according to the above steps, continue to read the next batch of images and repeat the above steps to update the parameters in a loop until all batches of the entire training set are completed. At the end of the batch, use the validation set for segmentation reasoning. During the segmentation reasoning process, there is no need to update the weights. Only the mIoU and mPA indicators are calculated. When the indicators show performance stagnation or overfitting trends, the learning rate needs to be reduced or the early stopping strategy needs to be enabled. When the performance of the validation set continues to improve and reaches the optimal level, the model weights of this batch are saved for future use to obtain the trained DC-U-Net model. The trained DC-U-Net model directly uses the optimal weights to perform inference on the test set and calculate the segmentation indicators. After the test results are satisfactory, the model parameters determined according to the optimal weights are directly used to perform semantic segmentation on the collected seed image to obtain a binary image containing mask information.

6. The method for measuring germination phenotype based on improved U-Net according to claim 5, wherein: In the DC-U-Net model: During the training phase, the DiverseBranchBlock module obtains feature representation through a parallel four-branch structure; In the inference phase, the DiverseBranchBlock module simplifies the complex multi-branch structure into a single convolutional layer through structural reparameterization, integrating multi-scale features.

7. The method for measuring germination phenotype based on improved U-Net according to claim 1, wherein: The specific steps of the Canny edge detection algorithm to extract the edge contour of the germination phenotype detection target in the binary image according to the pixels corresponding to the mask information include: Step C1, smoothing the image using a Gaussian kernel; Step C2: Use the Sobel operator to calculate the x-value of each pixel in the irregular area corresponding to the mask information. And the gradient in the y direction: Among them S x With S y , is the Sobel operator kernel, represents the convolution operation, The total gradient amplitude is obtained as Gradient direction given; Step C3: Set the non-maximum pixel values ​​in the gradient direction to 0, and only retain the local maximum pixel as the potential edge point; Step C4: Set a high threshold (maxVal) and a low threshold (minVal). Pixels with gradient magnitudes greater than maxVal are considered "strong edges," pixels with gradient magnitudes less than minVal are considered "non-edges," and pixels between the two are temporarily considered "weak edges." Step C5 starts from the determined strong edge pixel and checks all the gradient values ​​in its 8 neighborhoods between If the weak edge pixels between [minVal, maxVal] are connected, the weak edge is considered as part of the real edge; otherwise, it is discarded; and finally a complete and continuous edge contour is formed.

8. A germination phenotype measurement system based on improved U-Net, characterized in that: include: A light source device, used to provide a stable light source for shooting; An image acquisition device, configured to capture a seed image under the illumination conditions provided by the light source device; An edge computer is connected to the image acquisition device, receives the seed image, and measures the seed image according to the steps described in claim C7.

9. The germination phenotype measurement system based on the improved U-Net according to claim 8, characterized in that: The light source device and the image acquisition device are arranged in a seed incubator. The interior of the seed incubator is divided into an upper and lower layer structure by a hollow partition. The lower layer is equipped with ventilation equipment and a heating device. The hollow partition is also respectively fixed with two sets of limit bars arranged orthogonally to each other for fixing a culture dish for accommodating germinating seeds. The top of the seed incubator is also equipped with two sets of movable guide rails with mutually orthogonal moving directions. The image acquisition device and the light source device are jointly fixed on the slider platform of the movable guide rail.

10. The germination phenotype measurement system based on improved U-Net according to claim 9, characterized in that: The light source device is a ring light source with an illumination of 183.9K Lux and a brightness of 46.341K cd / ㎡; The image acquisition device is an RGB industrial camera equipped with a CMOS sensor element; The back of the seed incubator is also provided with a GigE Ethernet interface for transmitting the seed image to the edge computer, triggering the built-in image processing software of the edge computer to automatically process the seed image.

Citation Information

Cited By

  • CEEMDAN-based transformer sound signal processing method

    CN120998232A

  • Crop root zone environmental parameter acquisition device, intelligent irrigation control method, system and equipment

    CN121067983A

  • Cotton radicle image segmentation method, and root length and root coarse measurement method and system

    CN121639728A

  • Cotton young root image segmentation method, root length and root thickness measurement method and system

    CN121639728B