Plant root system image occlusion prediction method based on combination of diffusion model and GAN generator

By combining the diffusion model and the GAN generator, the plant root occlusion prediction network is solved, and high-quality image reconstruction and automated prediction are achieved, which is suitable for a variety of plant root system research and agricultural and forestry monitoring.

CN120472320APending Publication Date: 2025-08-12ANHUI AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510609181.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with the occlusion problem in plant root images, resulting in the loss of root topological information, which brings difficulties to automated image analysis and root modeling.

Method used

Combining the diffusion model and GAN generator, a plant root occlusion prediction network is constructed. Through multiple loss function training, the pixel consistency and local detail restoration of the image are optimized to generate a complete plant root image.

Benefits of technology

Accurately predict occlusion areas, improve image quality, is suitable for different plant varieties and soil environments, reduce manual operation complexity, and improve prediction speed and automation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472320A_ABST
    Figure CN120472320A_ABST
Patent Text Reader

Abstract

The invention discloses a plant root system image occlusion prediction method combining a diffusion model and a GAN generator, and the method comprises the steps: 1, collecting different plant root system images, and simulating an occlusion region in the image through an occlusion mask; 2, constructing a plant root system image occlusion prediction network; 3, the diffusion model is combined with a GAN generator for joint training; 4, alternately training the training result and the discriminator; and 5, predicting the new plant root system image with the occlusion by using the trained model to obtain a complete plant root system image. The method aims to predict the occlusion area in the plant root system image through the deep learning technology, the reconstruction precision, detail reduction and image quality evaluation indexes are remarkably improved, and the method has high application value, especially in the fields of plant growth research, root system structure analysis and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of plant science and computer vision, and in particular to a plant root image occlusion prediction method combining a diffusion model and a GAN generator. Background Art

[0002] Plant root detection and phenotyping play a crucial role in agricultural and forestry breeding, plant physiology research, ecosystem dynamics monitoring, and smart agricultural and forestry management. As a crucial underground organ of plants, roots are not only responsible for absorbing water and nutrients but also play a central role in anchoring support, interacting with soil microorganisms, and carbon cycling. Therefore, accurately and comprehensively detecting plant roots and extracting their phenotypic characteristics is crucial for accelerating crop breeding, improving agricultural and forestry productivity, and promoting sustainable ecological and environmental development.

[0003] However, due to the complexity of the root growth environment, acquiring high-quality root images in natural or simulated environments presents numerous challenges. In particular, root images often suffer from severe occlusion during actual imaging. To observe root growth dynamics with minimal disturbance, researchers have proposed and widely applied in situ observation techniques such as the micro-root window method and the micro-root tube method. The micro-root window method uses a transparent window placed on the soil sidewall or below the surface to periodically image the root growth behind it, thus obtaining time-series information on root development. The micro-root tube method inserts a transparent tube into the soil and uses a specially designed small camera to scan the tube axially, continuously recording the distribution and changes of roots around the tube. Although micro-root observation technology has made significant progress in root imaging, it still faces a series of challenges in practical application. First, due to factors such as the optical properties of transparent materials, soil moisture fluctuations, and surface dirt deposition, the images often exhibit blurring, reflections, or localized distortion. Secondly, root structure occlusion and overlap are particularly severe in densely populated areas, leading to the loss of root topology information in a single image. This greatly complicates subsequent automated image analysis and root modeling. Therefore, there is an urgent need to develop efficient and robust image processing and occlusion completion techniques to address the occlusion issues inherent in root images of growing environments.

[0004] Traditional methods rely primarily on interpolation, statistical modeling, or simple deep learning methods such as convolutional neural networks (CNNs) or variational autoencoders (VAEs). Interpolation methods generally work well for filling in small missing regions, but struggle to preserve biological properties for complex root structures. Statistical modeling methods make predictions based on root growth patterns, but their generalization ability is weak in complex environments. In recent years, diffusion models have demonstrated excellent performance in image denoising and image generation tasks, gradually generating high-quality images and making the restoration of missing regions more natural. However, diffusion models are computationally expensive and may have limitations when restoring fine local structure. Generative adversarial networks (GANs), through the adversarial training mechanism of generators and discriminators, have also demonstrated strong capabilities in image restoration tasks. However, GANs also have limitations. For example, the generated images may contain artifacts, and when the missing regions are large, GANs may not accurately restore the overall structure. Summary of the Invention

[0005] The purpose of the present invention is to solve the occlusion problem and difficulty in prediction of plant root images in the existing technology, and propose a plant root image occlusion prediction method combining a diffusion model and a GAN generator, so as to use deep learning technology to accurately predict the occlusion area in the plant root image, thereby improving the occlusion prediction effect of the plant root image.

[0006] The present invention adopts the following technical solutions to solve the technical problems:

[0007] The plant root occlusion prediction method combining a diffusion model and a GAN generator of the present invention is characterized in that it is performed according to the following steps:

[0008] Step 1: Obtain a set of plant root images ,in, For the An image of a plant root system, , is the total number of plant root images;

[0009] Randomly generate Image of plant roots The binary occlusion mask and add to , thus obtaining the The plant root images after occlusion are obtained, and then the plant root image set after occlusion is obtained. ;

[0010] Will middle The real area occluded is recorded as , thus obtaining the image set of the real area of the occluded part ;

[0011] Step 2: Build a plant root occlusion prediction network, including: diffusion model, GAN generator, local discriminator and the global discriminator , and 、 and Process and obtain The obscured Generated image Hedi Zhang plant root system reconstruction image , thereby constructing different loss functions;

[0012] Step 3: In each training cycle, first fix the network parameters of the GAN generator and diffusion model, and only update the local discriminator. and the global discriminator The network parameters of the global discriminator are fixed. and local discriminator The network parameters of the generator and the diffusion model are updated, and the network parameters of the generator and the diffusion model are updated; thereby the plant root occlusion prediction network is trained using the gradient descent method, and the corresponding loss function is calculated to update the network parameters until the global discriminator and local discriminator When the authenticity of input data cannot be determined, an optimal plant root occlusion prediction model is obtained; the model is used to predict a new plant root image with occlusion to obtain a complete plant root image.

[0013] The plant root occlusion prediction method combining a diffusion model and a GAN generator according to the present invention is also characterized in that step 2 is performed as follows:

[0014] Step 2.1, Diffusion Model Process and obtain Occluded predicted area , thereby constructing the variational lower bound loss and mean square error loss function ;

[0015] Step 2.2: Construct the GAN generator including encoder and decoder, and and Process it and get Zhang plant root system reconstruction image , thereby constructing the reconstruction loss function of the GAN generator and perceptual loss function ;

[0016] Step 2.3, local discriminator respectively and Processing is performed and the corresponding judgment is obtained Probability of true or false and discrimination Probability of true or false , thereby constructing a local discriminator Adversarial loss function And the total loss function of the diffusion model ;

[0017] Step 2.4, Global Discriminator Follow the process of step 2.3 to and Process and get the judgment Probability of true or false and discrimination Probability of true or false , thereby constructing a global discriminator Adversarial loss function And the global loss function of the GAN generator ;

[0018] Step 2.5: Use formula (22) to get the fusion discrimination probability , thereby constructing a local discriminator With the global discriminator Fusion discriminative loss ;

[0019] (twenty two)

[0020] In formula (22), is the weight, and ;

[0021] Step 2.6: Use formula (24) to construct the overall joint loss function of the diffusion model and the GAN generator :

[0022] (twenty four)

[0023] In formula (24), are two weights that control the balance between the generator and the diffusion model.

[0024] Furthermore, the step 2.1 is performed as follows:

[0025] Step 2.1.1, use formula (1) to Gradually add noise to get the A noisy plant root image sequence ,in, Indicates the The time step Noisy plant root images, represents the total number of time steps of diffusion;

[0026] , (1)

[0027] In formula (1), is the real noise added in the forward process; is a Gaussian distribution; For the The noise scheduling parameters under time steps, and , For the Noise intensity parameter at each time step; = For the front The noise scheduling parameters accumulated in time steps; is the identity matrix;

[0028] Step 2.1.2: Use formula (2) to Perform step-by-step reverse denoising to obtain the Denoised plant root image sequences , and the first time step under the initial time step Denoised plant root images As middle Occluded predicted area ,in, Indicates the The time step Denoised plant root images:

[0029] (2)

[0030] In formula (2), is the noise predicted in the reverse process;

[0031] Step 2.1.3: Use formula (3) to construct the variational lower bound loss :

[0032] L VLB = 1 N ∑ i = 1 N E t , e [ ‖ e − e i ( p i , t , t ) ‖ 2 ] (3)

[0033] In formula (3), For the The real noise at time steps expectations;

[0034] Step 2.1.4: Use formula (4) to construct the mean square error loss function :

[0035] (4)

[0036] Furthermore, the step 2.2 is performed as follows:

[0037] Step 2.2.1 Use formula (5) to get A normalized image :

[0038] (5)

[0039] In formula (5), represents the normalization function; represents element-wise multiplication;

[0040] Step 2.2.2 Encoder layer convolutional layers and residual blocks, and Process it and get latent feature vectors ;

[0041] Step 2.2.3 Decoder Layer deconvolution layer and residual blocks, and Processing is performed to obtain the i-th plant root reconstruction image , thereby constructing the reconstruction loss function of the GAN generator and perceptual loss function .

[0042] Furthermore, the step 2.2.2 is performed as follows:

[0043] Step 2.2.2.1 Using formula (6) we can get The n-th level convolution feature map :

[0044] (6)

[0045] In formula (6), is the weight of the nth convolutional layer in the encoder; is the bias of the nth convolutional layer; is the activation function ; is the convolution operation; represents the downsampling operation; express The n-1th level convolution feature map;

[0046] Step 2.2.2.2 Use formula (7) to get The i-th encoded residual feature map output by the residual block ;

[0047] (7)

[0048] In formula (7), ⨁ represents a skip connection; represents the i-th encoded deep feature map output by the r-1-th residual block; express The S-th level feature map, represents the weight of the rth residual block, Represents the weight of the S-th convolutional layer;

[0049] Step 2.2.2.3 Use formula (8) to obtain the i-th potential feature vector ;

[0050] (8)

[0051] In formula (8), Represents the operation of flattening the feature map into a vector; represents the i-th deep feature map output by the R-th residual block.

[0052] Furthermore, step 2.2.3 is performed as follows:

[0053] Step 2.2.3.1 Using formula (9) we can get The n-th level deconvolution feature map ;

[0054] (9)

[0055] In formula (9), Represents a high-dimensional mapping operation; represents the deconvolution operation; is the weight of the nth deconvolution layer; is the bias of the nth deconvolution layer; Represents an upsampling operation; Represents the n-1th level deconvolution feature map;

[0056] Step 2.2.2.4 Use formula (10) to obtain the i-th decoded residual feature map output by the r-th residual block ;

[0057] (10)

[0058] In formula (10), represents the i-th decoded deep feature map output by the r-1-th residual block; express The S-th level feature map, represents the weight of the rth residual block;

[0059] Step 2.2.3.5 Use formula (11) to Make a prediction and get the i-th plant root reconstruction image ;

[0060] (11)

[0061] In formula (11), represents the activation function;

[0062] Step 2.2.3.6 Use formula (12) to construct the reconstruction loss function of the GAN generator :

[0063] L rec = 1 N ∑ i = 1 N E v i , v ^ i [ ‖ v i − v ^ i ‖ 1 ] (12)

[0064] In formula (12), Express and expectations of differences between

[0065] Step 2.2.3.7 Use Equation (13) to construct the perceptual loss function of the GAN generator :

[0066] (13)

[0067] in, Represents the generator in Feature maps of layer convolution; The generator is Weighting factors for convolutional features of layers.

[0068] Furthermore, the step 2.3 is performed as follows:

[0069] Step 2.3.1 Local Discriminator Depend on The convolutional layers are composed of layers, and the formula (14) is used to Process and obtain The u-th layer feature map ;

[0070] (14)

[0071] In formula (14), is the activation function; is the weight of the u-th convolutional layer in the local discriminator, is the bias of the u-th convolutional layer in the local discriminator;

[0072] Using formula (15) to get the discriminant Probability of true or false ;

[0073] (15)

[0074] Step 2.3.2 Follow the process of step 2.3.1 to obtain the discriminant Probability of true or false ;

[0075] Step 2.3.3 Use formula (16) to build a local discriminator Adversarial loss function :

[0076] = 1 N ∑ i = 1 N ( E p i [log D l ( p i )] + E p ^ i [log( 1 − D l ( p ^ i ))]) (16)

[0077] In formula (16), for expectations, for expectations;

[0078] Step 2.3.4 Use Equation (17) to construct the adversarial loss function of the diffusion model :

[0079] L adv M =− 1 N ∑ i = 1 N E [ D l ( p ^ i )] (17)

[0080] In formula (17), express expectations;

[0081] Step 2.3.5 Use Equation (18) to construct the total loss function of the diffusion model :

[0082] (18)

[0083] In formula (18), are three local weight coefficients.

[0084] Furthermore, step 2.4 is performed as follows:

[0085] Step 2.4.1 Use formula (19) to build a global discriminator Adversarial loss function :

[0086] L adv global = 1 N ∑ i = 1 N ( E z i [log D g ( z i )] + E v ^ i [log( 1 − D g ( v ^ i ))]) (19)

[0087] In formula (19), Express expectations, Express expectations;

[0088] Step 2.4.2 Use formula (20) to construct the adversarial loss function of the GAN generator :

[0089] L adv G =− 1 N ∑ i = 1 N ( E z i ~ P z i [ m ⋅ log D g ( z i ) ] + E v ^ i ~ P v ^ i [ m ⋅ log( 1 − D g ( v ^ i )) ] ) (20)

[0090] In formula (20), Respectively The distribution and distribution of Indicates Under the distribution expectations; Indicates Under the distribution expectations;

[0091] Step 2.4.3 Use formula (21) to construct the global loss function of the GAN generator :

[0092] (twenty one)

[0093] In formula (21), are 3 global weight coefficients.

[0094] Furthermore, in step 2.5, the local discriminator is constructed using formula (23) With the global discriminator Fusion discriminative loss :

[0095] L adv D g l = 1 N ∑ i = 1 N ( E z i [log D g ( z i )] + E p i [log D l ( p i )] + E [log( 1 − D g l ( v ^ i , p ^ i ))]) (twenty three)

[0096] The electronic device of the present invention includes a memory and a processor, and is characterized in that the memory is used to store a program that supports the processor to execute the plant root image occlusion prediction method, and the processor is configured to execute the program stored in the memory.

[0097] Compared with the prior art, the present invention has the following beneficial effects:

[0098] 1. This invention uses deep learning technology, especially the excellent mechanism of combining diffusion model and GAN, to accurately predict the occluded areas in plant root images and effectively improve the image quality, especially in processing complex occluded areas.

[0099] 2. The present invention adopts a multiple loss function design, which not only optimizes the pixel consistency of the image, but also focuses on the restoration of structure and local details, making the local details of the generated image richer and more realistic.

[0100] 3. The present invention is applicable to the prediction of various plant root images, and shows good adaptability in plant root images of different plant varieties, different soil environments, and different growth stages.

[0101] 4. Compared with traditional image prediction methods, the present invention provides an automated occlusion prediction solution based on deep learning, which not only improves the prediction speed but also reduces the complexity of manual operation. It can be widely used in plant root research, agricultural and forestry monitoring and related ecological research. BRIEF DESCRIPTION OF THE DRAWINGS

[0102] Figure 1 This is a flow chart of the model principle of the method of the present invention;

[0103] Figure 2 This is a schematic diagram of the network structure of the present invention;

[0104] Figure 3 This is the real micro-root canal root system image of the present invention;

[0105] Figure 4 This is the real micro-rhizosphere root system image predicted by the trained model. DETAILED DESCRIPTION

[0106] In this embodiment, a plant root image occlusion prediction method combining a diffusion model and a GAN generator is suitable for occlusion prediction of plant root images, such as Figure 1 As shown, follow the steps below:

[0107] Step 1: Use the high-resolution depth camera Kinect2 to collect X root images of Q plants to form an initial root image set. ,in, For the An image of a plant root system, , is the total number of plant root images;

[0108] Using image annotation software The initial root system image set collected is labeled. Each plant root system image is subjected to occlusion simulation and the first Image of plant roots The binary occlusion mask and add to , thus obtaining the The plant root images after occlusion are obtained, and then the plant root image set after occlusion is obtained. ;

[0109] Will middle The real area occluded is recorded as , thus obtaining the image set of the real area of the occluded part .

[0110] Step 2: Construct a plant root occlusion prediction network, such as Figure 2 Shown include: diffusion model, GAN generator, local discriminator and the global discriminator ; The GAN generator includes: an encoder for generating a high-dimensional feature vector of the plant root image with occluded areas to be predicted, wherein the encoder is a residual module and a convolution module; and a decoder for mapping the high-dimensional feature vector into an RGB image to obtain the predicted plant root image, and the decoder adopts a deconvolution structure composed of multiple residual modules. And a diffusion model, the diffusion model adopts an improved U-Net structure; and finally a discriminator for outputting the probability of whether the predicted plant root image with occluded areas is complete, and the discriminator includes a local discriminator and a global discriminator. And for 、 and Process and obtain The obscured Generated image Hedi Zhang plant root system reconstruction image .

[0111] Step 2.1, Diffusion Model Process and obtain Occluded predicted area ;

[0112] Step 2.1.1, use formula (1) to Gradually add noise to get the A noisy plant root image sequence ,in, Indicates the The time step Noisy plant root images, represents the total number of time steps of diffusion;

[0113] , (1)

[0114] In formula (1), is the real noise added in the forward process; is a Gaussian distribution; For the The noise scheduling parameters under time steps, and , For the Noise intensity parameter at each time step; = For the front The noise scheduling parameters accumulated in time steps; is the identity matrix.

[0115] Step 2.1.2: Use formula (2) to Perform step-by-step reverse denoising to obtain the Denoised plant root image sequences , and the first time step under the initial time step Denoised plant root images As middle Occluded predicted area ,in, Indicates the The time step Denoised plant root images:

[0116] (2)

[0117] In formula (2), is the noise predicted in the backward process.

[0118] Step 2.1.3: Use formula (3) to construct the variational lower bound loss :

[0119] L VLB = 1 N ∑ i = 1 N E t , e [ ‖ e − e i ( p i , t , t ) ‖ 2 ] (3)

[0120] In formula (3), For the The real noise at time steps expectations;

[0121] Step 2.1.4: Use formula (4) to construct the mean square error loss function :

[0122] (4)

[0123] Step 2.2: Construct the GAN generator including encoder and decoder, and and Process it and get Zhang plant root system reconstruction image .

[0124] Step 2.2.1 Use formula (5) to get A normalized image :

[0125] (5)

[0126] In formula (5), represents the normalization function; represents element-wise multiplication;

[0127] Step 2.2.2 Encoder layer convolutional layers and The encoder is composed of residual blocks, and its function is to extract key features from the original high-dimensional data and compress it into a low-dimensional potential representation. Process it and get latent feature vectors .

[0128] Step 2.2.2.1 Using formula (6) we can get The n-th level convolution feature map :

[0129] (6)

[0130] In formula (6), is the weight of the nth convolutional layer in the encoder; is the bias of the nth convolutional layer; is the activation function ; is the convolution operation; represents the downsampling operation; express The n-1th level convolutional feature map.

[0131] Step 2.2.2.2 Use formula (7) to get The i-th encoded residual feature map output by the residual block ;

[0132] (7)

[0133] In formula (7), ⨁ represents a skip connection; represents the i-th encoded deep feature map output by the r-1-th residual block; express The S-th level feature map, represents the weight of the rth residual block, Represents the weight of the S-th convolutional layer.

[0134] Step 2.2.2.3 Use formula (8) to obtain the i-th potential feature vector ;

[0135] (8)

[0136] In formula (8), Represents the operation of flattening the feature map into a vector; represents the i-th deep feature map output by the R-th residual block.

[0137] Step 2.2.3 Decoder Layer deconvolution layer and The main function of the decoder is to transform the latent feature vector extracted by the encoder into Mapping back to a high-resolution image while maintaining local details and global consistency of the root system image Processing is performed to obtain the i-th plant root reconstruction image .

[0138] Step 2.2.3.1 Using formula (9) we can get The n-th level deconvolution feature map ;

[0139] (9)

[0140] In formula (9), Represents a high-dimensional mapping operation; represents the deconvolution operation; is the weight of the nth deconvolution layer; is the bias of the nth deconvolution layer; Represents an upsampling operation; Represents the n-1th level deconvolution feature map.

[0141] Step 2.2.2.4 During the decoding process, skip connections are used to fuse information from different scales, and the features of the corresponding layer of the encoder are combined to obtain the i-th decoded residual feature map output by the r-th residual block using formula (10) ;

[0142] (10)

[0143] In formula (10), represents the i-th decoded deep feature map output by the r-1-th residual block; express The S-th level feature map, represents the weight of the rth residual block.

[0144] Step 2.2.3.5 Use formula (11) to Make a prediction and get the i-th plant root reconstruction image ;

[0145] (11)

[0146] In formula (11), represents the activation function;

[0147] Step 2.2.3.6 Use formula (12) to construct the reconstruction loss function of the GAN generator :

[0148] L rec = 1 N ∑ i = 1 N E v i , v ^ i [ ‖ v i − v ^ i ‖ 1 ] (12)

[0149] In formula (12), Express and Differences in expectations.

[0150] Step 2.2.3.7 Use Equation (13) to construct the perceptual loss function of the GAN generator :

[0151] (13)

[0152] in, Represents the generator in Feature maps of layer convolution; The generator is Weighting factors for convolutional features of layers.

[0153] Step 2.3, local discriminator respectively and Processing is performed and the corresponding judgment is obtained Probability of true or false and discrimination Probability of true or false ;

[0154] Step 2.3.1 Local Discriminator Depend on The convolutional layers are composed of layers, and the formula (14) is used to Process and obtain The u-th layer feature map ;

[0155] (14)

[0156] In formula (14), is the activation function; is the weight of the u-th convolutional layer in the local discriminator, is the bias of the u-th convolutional layer in the local discriminator.

[0157] Using formula (15) to get the discriminant Probability of true or false ;

[0158] (15)

[0159] Step 2.3.2 Follow the process of step 2.3.1 to obtain the discriminant Probability of true or false .

[0160] Step 2.3.3 Use formula (16) to build a local discriminator Adversarial loss function :

[0161] = 1 N ∑ i = 1 N ( E p i [log D l ( p i )] + E p ^ i [log( 1 − D l ( p ^ i ))]) (16)

[0162] In formula (16), for expectations, for expectations.

[0163] Step 2.3.4 Use Equation (17) to construct the adversarial loss function of the diffusion model :

[0164] L adv M =− 1 N ∑ i = 1 N E [ D l ( p ^ i )] (17)

[0165] In formula (17), Express expectations.

[0166] Step 2.3.5 Use Equation (18) to construct the total loss function of the diffusion model :

[0167] (18)

[0168] In formula (18), are 3 local weight coefficients;

[0169] Step 2.4, Global Discriminator Follow the process of step 2.3 to and Process and get the judgment Probability of true or false and discrimination Probability of true or false ;

[0170] Step 2.4.1 Use formula (19) to build a global discriminator Adversarial loss function :

[0171] L adv global = 1 N ∑ i = 1 N ( E z i [log D g ( z i )] + E v ^ i [log( 1 − D g ( v ^ i ))]) (19)

[0172] In formula (19), Express expectations, Express expectations.

[0173] Step 2.4.2 Use formula (20) to construct the adversarial loss function of the GAN generator :

[0174] L adv G =− 1 N ∑ i = 1 N ( E z i ~ P z i [ m ⋅ log D g ( z i ) ] + E v ^ i ~ P v ^ i [ m ⋅ log( 1 − D g ( v ^ i )) ] ) (20)

[0175] In formula (20), Respectively The distribution and distribution of Indicates Under the distribution expectations; Indicates Under the distribution expectations.

[0176] Step 2.4.3 Use formula (21) to construct the global loss function of the GAN generator :

[0177] (twenty one)

[0178] In formula (21), are 3 global weight coefficients.

[0179] Step 2.5: Use formula (22) to get the fusion discrimination probability , thus using formula (23) to construct a local discriminator With the global discriminator Fusion discriminative loss :

[0180] (twenty two)

[0181] In formula (22), is the weight, and .

[0182] L adv D g l = 1 N ∑ i = 1 N ( E z i [log D g ( z i )] + E p i [log D l ( p i )] + E [log( 1 − D g l ( v ^ i , p ^ i ))]) (twenty three)

[0183] Step 2.6: Use formula (24) to construct the overall joint loss function of the diffusion model and the GAN generator :

[0184] (twenty four)

[0185] In formula (24), are two weights that control the balance between the generator and the diffusion model.

[0186] Step 3: In each training cycle, first fix the network parameters of the GAN generator and diffusion model, and only update the local discriminator. and the global discriminator The network parameters of the global discriminator are fixed. and local discriminator The network parameters of the generator and the diffusion model are updated, and the network parameters of the generator and the diffusion model are updated; thereby the plant root occlusion prediction network is trained using the gradient descent method, and the corresponding loss function is calculated to update the network parameters until the global discriminator and local discriminator When the authenticity of input data cannot be determined, an optimal plant root occlusion prediction model is obtained; the model is used to predict a new plant root image with occlusion to obtain a complete plant root image.

[0187] Step 4: Obtain occluded root image data; Use the trained deep learning model to obtain images of specific plant roots using a high-resolution depth camera. Within A sampling cycles, obtain images of the target plant roots. In these images, some root images may be missing or blurred due to occlusions, such as Figure 3 shown.

[0188] Step 5: Predict the occluded area; use the trained model to predict a plant root image. The prediction results will be gradually optimized through the plant root image training model to make the predicted image more realistic and consistent with the real root growth pattern. Figure 4 shown.

[0189] Step 6: Post-process the image; perform post-processing on the predicted image to further improve the restoration quality. The post-processing steps include denoising, contrast enhancement and other operations to ensure that the predicted root system image is clear and has no obvious artifacts such as Figure 4 shown.

[0190] Step 7: Evaluate the prediction results. Use the Structural Similarity Index (SSIM) and Peak Signal-to-Noise Ratio (PSNR) to evaluate the prediction results. For SSIM, set a threshold of 0.75 for a good prediction result; higher values indicate better prediction quality. For PSNR, the PSNR value between the predicted image and the original image should exceed 30dB; higher values indicate higher prediction quality.

[0191] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.

[0192] In this embodiment, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are executed.

Claims

1. A plant root occlusion prediction method combining a diffusion model and a GAN generator, characterized in that: The steps are as follows: Step 1: Obtain a set of plant root images ,in, For the An image of a plant root system, , is the total number of plant root images; Randomly generate Image of plant roots The binary occlusion mask and add to , thus obtaining the The plant root images after occlusion are obtained, and then the plant root image set after occlusion is obtained. ; Will middle The real area occluded is recorded as , thus obtaining the image set of the real area of the occluded part ; Step 2: Build a plant root occlusion prediction network, including: diffusion model, GAN generator, local discriminator and the global discriminator , and 、 and Process and obtain The obscured Generated image Hedi Zhang plant root system reconstruction image , thereby constructing different loss functions; Step 3: In each training cycle, first fix the network parameters of the GAN generator and diffusion model, and only update the local discriminator and the global discriminator The network parameters of the global discriminator are fixed. and local discriminator The network parameters of the generator and the diffusion model are updated, and the network parameters of the generator and the diffusion model are updated; thereby the plant root occlusion prediction network is trained using the gradient descent method, and the corresponding loss function is calculated to update the network parameters until the global discriminator and local discriminator When the authenticity of input data cannot be determined, an optimal plant root occlusion prediction model is obtained; the model is used to predict a new plant root image with occlusion to obtain a complete plant root image.

2. The plant root occlusion prediction method combining a diffusion model and a GAN generator according to claim 1 is characterized in that: Described step 2 is carried out as follows: Step 2.1, Diffusion Model Process and obtain Occluded predicted area , thereby constructing the variational lower bound loss and mean square error loss function ; Step 2.2: Construct the GAN generator including encoder and decoder, and and Process it and get Zhang plant root system reconstruction image , thereby constructing the reconstruction loss function of the GAN generator and perceptual loss function ; Step 2.3, local discriminator respectively and Processing is performed and the corresponding judgment is obtained Probability of true or false and discrimination Probability of true or false , thereby constructing a local discriminator Adversarial loss function And the total loss function of the diffusion model ; Step 2.4, Global Discriminator Follow the process of step 2.3 to and Process and get the judgment Probability of true or false and discrimination Probability of true or false , thereby constructing a global discriminator Adversarial loss function And the global loss function of the GAN generator ; Step 2.5: Use formula (22) to get the fusion discrimination probability , thereby constructing a local discriminator With the global discriminator Fusion discriminative loss ; (22) In formula (22), is the weight, and ; Step 2.6: Use formula (24) to construct the overall joint loss function of the diffusion model and the GAN generator : (24) In formula (24), are two weights that control the balance between the generator and the diffusion model.

3. The plant root occlusion prediction method combining a diffusion model and a GAN generator according to claim 2 is characterized in that: The step 2.1 is carried out as follows: Step 2.1.1, use formula (1) to Gradually add noise to get the A noisy plant root image sequence ,in, Indicates the The time step Noisy plant root images, represents the total number of time steps of diffusion; , (1) In formula (1), is the real noise added in the forward process; is a Gaussian distribution; For the The noise scheduling parameters under time steps, and , For the Noise intensity parameter at each time step; = For the front The noise scheduling parameters accumulated in time steps; is the identity matrix; Step 2.1.2: Use formula (2) to Perform step-by-step reverse denoising to obtain the Denoised plant root image sequences , and the first time step under the initial time step Denoised plant root images As middle Occluded predicted area ,in, Indicates the The time step Denoised plant root images: (2) In formula (2), is the noise predicted in the reverse process; Step 2.1.3: Use formula (3) to construct the variational lower bound loss : (3) In formula (3), For the The real noise at time steps expectations; Step 2.1.4: Use formula (4) to construct the mean square error loss function : (4)。 4. The plant root occlusion prediction method combining a diffusion model and a GAN generator according to claim 3 is characterized in that: The step 2.2 is carried out as follows: Step 2.2.1 Use formula (5) to get the A normalized image : (5) In formula (5), represents the normalization function; represents element-wise multiplication; Step 2.2.2 Encoder layer convolutional layers and residual blocks, and Process it and get latent feature vectors ; Step 2.2.3 Decoder Layer deconvolution layer and residual blocks, and Processing is performed to obtain the i-th plant root reconstruction image , thereby constructing the reconstruction loss function of the GAN generator and perceptual loss function .

5. The plant root occlusion prediction method combining a diffusion model and a GAN generator according to claim 4 is characterized in that: The step 2.2.2 is performed as follows: Step 2.2.2.1 Using formula (6) we can get The n-th level convolution feature map : (6) In formula (6), is the weight of the nth convolutional layer in the encoder; is the bias of the nth convolutional layer; is the activation function ; is the convolution operation; represents the downsampling operation; express The n-1th level convolution feature map; Step 2.2.2.2 Use formula (7) to get The i-th encoded residual feature map output by the residual block ; (7) In formula (7), ⨁ represents a skip connection; represents the i-th encoded deep feature map output by the r-1-th residual block; express The S-th level feature map, represents the weight of the rth residual block, Represents the weight of the S-th convolutional layer; Step 2.2.2.3 Use formula (8) to obtain the i-th potential feature vector ; (8) In formula (8), Represents the operation of flattening the feature map into a vector; represents the i-th deep feature map output by the R-th residual block.

6. The plant root occlusion prediction method combining a diffusion model and a GAN generator according to claim 5 is characterized in that: The step 2.2.3 is performed as follows: Step 2.2.3.1 Using formula (9) we can get The n-th level deconvolution feature map ; (9) In formula (9), Represents a high-dimensional mapping operation; represents the deconvolution operation; is the weight of the nth deconvolution layer; is the bias of the nth deconvolution layer; Represents an upsampling operation; Represents the n-1th level deconvolution feature map; Step 2.2.2.4 Use formula (10) to obtain the i-th decoded residual feature map output by the r-th residual block ; (10) In formula (10), represents the i-th decoded deep feature map output by the r-1-th residual block; express The S-th level feature map, represents the weight of the rth residual block; Step 2.2.3.5 Use formula (11) to Make a prediction and get the i-th plant root reconstruction image ; (11) In formula (11), represents the activation function; Step 2.2.3.6 Use formula (12) to construct the reconstruction loss function of the GAN generator : (12) In formula (12), Express and expectations of differences between Step 2.2.3.7 Use Equation (13) to construct the perceptual loss function of the GAN generator : (13) In formula (13), Represents the generator in Feature maps of layer convolution; The generator is Weighting factors for convolutional features of layers.

7. The plant root occlusion prediction method combining a diffusion model and a GAN generator according to claim 6 is characterized in that: The step 2.3 is carried out as follows: Step 2.3.1 Local Discriminator Depend on The convolutional layers are composed of layers, and the formula (14) is used to Process and obtain The u-th layer feature map ; (14) In formula (14), is the activation function; is the weight of the u-th convolutional layer in the local discriminator, is the bias of the u-th convolutional layer in the local discriminator; Using formula (15) to get the discriminant Probability of true or false ; (15) Step 2.3.2 Follow the process of step 2.3.1 to obtain the discriminant Probability of true or false ; Step 2.3.3 Use formula (16) to build a local discriminator Adversarial loss function : = (16) In formula (16), for expectations, for expectations; Step 2.3.4 Use Equation (17) to construct the adversarial loss function of the diffusion model : (17) In formula (17), express expectations; Step 2.3.5 Use Equation (18) to construct the total loss function of the diffusion model : (18) In formula (18), are three local weight coefficients.

8. The plant root occlusion prediction method combining a diffusion model and a GAN generator according to claim 7 is characterized in that: The step 2.4 is carried out as follows: Step 2.4.1 Use formula (19) to build a global discriminator Adversarial loss function : (19) In formula (19), Express expectations, Express expectations; Step 2.4.2 Use formula (20) to construct the adversarial loss function of the GAN generator : (20) In formula (20), Respectively The distribution and distribution of Indicates Under the distribution expectations; Indicates Under the distribution expectations; Step 2.4.3 Use formula (21) to construct the global loss function of the GAN generator : (21) In formula (21), are 3 global weight coefficients.

9. The plant root occlusion prediction method combining a diffusion model and a GAN generator according to claim 8, characterized in that: In step 2.5, the local discriminator is constructed using formula (23) With the global discriminator Fusion discriminative loss : (23)。 10. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the plant root image occlusion prediction method according to any one of claims 1 to 9, and the processor is configured to execute the program stored in the memory.