Rapeseed clubroot disease detection method, system, electronic device and computer storage medium
The three-dimensional model of the rape root system is generated through magnetic resonance imaging and three-dimensional interactive measurement technology, and the in-situ non-destructive detection of rape root swelling is achieved in combination with the random forest model, which solves the problem of difficulty in early non-destructive detection in the existing technology and improves the detection efficiency and accuracy.
Patent Information
- Application Number
- CN202211081324.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-06
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-09-06
AI Technical Summary
It is difficult for the existing technology to achieve early non-destructive testing of rapeseed root swelling. Traditional methods require destructive sampling and are inefficient. Existing non-destructive methods cannot achieve early non-destructive testing.
The root image of rapeseed is obtained by magnetic resonance imaging technology, and the root system three-dimensional model is generated through segmentation processing, alignment multiplication and three-dimensional reconstruction. The root system parameters are obtained by using three-dimensional interactive measurement technology, and the random forest model is used to detect it to achieve in-situ non-destructive detection of rapeseed root swelling.
In-situ non-destructive testing of rapeseed root swelling is achieved, the detection efficiency is improved, destructive sampling is avoided, and the root swelling is identified in early stages.
Smart Images

Figure CN115641291B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of clubroot disease detection, in particular to a method and system for detecting clubroot disease of rapeseed, an electronic device and a computer storage medium. Background Art
[0002] Nuclear magnetic resonance (NMR) technology is a non-contact non-destructive detection technology, whose physical basis is the nuclear magnetic resonance phenomenon and is mostly used in the field of medical engineering. With the gradual maturity of modern high-tech detection technologies, magnetic resonance imaging instruments have been gradually applied to related research fields such as chemical structure analysis, material detection, and biology. Magnetic Resonance Imaging (MRI) is very sensitive to the changes in the density of hydrogen spectrum (H) and the surrounding tissue structures, and the imaging signal intensity of its spatial voxels is closely related to the density of hydrogen spectrum (H) contained in the sample.
[0003] Magnetic resonance imaging has many advantages when used to detect plant roots. For example, the tomographic images obtained by magnetic resonance instruments have high resolution, there are many imaging parameters for magnetic resonance instruments, any layer can be selected during imaging, and there is no ionizing radiation damage to the measurement samples, etc.
[0004] As an important organ for plants to obtain various nutrients and water from the soil, roots provide the necessary water, fertilizer, and air for plant growth and development. At the same time, some pathogenic bacteria living in the soil will also infect plant roots under suitable conditions, thus causing plant diseases. Clubroot disease is a plant disease caused by the infection of Plasmodiophora brassicae Woronin, which harms cruciferous crops such as rapeseed. The clubroot fungus invades from the cambium of the plant root, and then stimulates the parenchyma cells of the host, causing a large number of parenchyma cells to divide and enlarge. As the cycle of root infection with clubroot disease becomes longer, the main root or lateral roots of the plant will gradually form tumors of different sizes, similar to short rods, fingers or spheres, the roots are deformed and swollen, and then the water migration rate in the damaged tissues of the roots increases, and its tissue structure will then rot and other changes occur. If the plant is infected with clubroot disease in the early growth stage, the roots of the seedlings will become swollen and then rot, and the plants will soon die; if the plant is infected with clubroot disease in the later growth stage, it will cause a reduction in agricultural products, and in severe cases, even a complete crop failure.
[0005] Clubroot belongs to root diseases. For the diagnosis of current plant root diseases, on the basis of field observation and symptom diagnosis by traditional plant protection experts, molecular diagnosis techniques based on polymerase chain reaction (PCR) are combined for pathogen identification. It is necessary to first dig out the entire plant roots from the soil, go through processes such as sampling, root-soil separation, and rinsing, and then destroy the plant tissues before detection can be carried out. This is inefficient, costly, time-consuming and laborious, and it is difficult to achieve early non-destructive detection of clubroot in rapeseed. For example, the patent application with the publication number CN108680109A discloses a method for measuring wheat root systems based on image processing. After separating the root systems from the soil and rinsing them, root images are taken against a black background. Some non-destructive root research methods, such as isotope tracer method, underground root chamber method, and minirhizotron method. For example, the patent application with the publication number CN215582841U discloses a device for observing the root system configuration of crops, which is used to observe the root systems of crops inside a culture cylinder. Although the existing non-destructive methods can avoid the sampling process in the destructive methods, they can only obtain limited in-situ observation data of the root systems and cannot achieve early non-destructive detection of clubroot in rapeseed. Summary of the Invention
[0006] The purpose of the present invention is to provide a method, system, electronic device and computer storage medium for detecting clubroot in rapeseed, which realizes in-situ non-destructive detection of clubroot in rapeseed.
[0007] To achieve the above purpose, the present invention provides the following solutions:
[0008] A method for detecting clubroot in rapeseed, the method includes:
[0009] Obtain a target magnetic resonance sequence image; the target magnetic resonance sequence image is a magnetic resonance sequence image of the rapeseed root system to be detected; the rapeseed root system to be detected is the rapeseed root system in the soil;
[0010] Perform segmentation processing, pairwise multiplication and three-dimensional reconstruction on the target magnetic resonance sequence image in sequence to obtain a three-dimensional model of the target root system;
[0011] Based on three-dimensional interactive measurement technology, obtain the root system parameters of the rapeseed root system to be detected from the three-dimensional model of the target root system; the root system parameters include: total root length, main root length, maximum root depth, maximum root width, maximum root diameter, root volume and number of root branches;
[0012] Input the root system parameters of the rapeseed root system to be detected into a clubroot detection model of rapeseed to obtain a detection result of the rapeseed root system to be detected; the detection result includes the number of diseased branches; the clubroot detection model of rapeseed is obtained by training a random forest model.
[0013] As an optional implementation, the training process of the rapeseed clubroot disease detection model is as follows:
[0014] Acquire a magnetic resonance sequence training image; the magnetic resonance sequence training image is a magnetic resonance sequence image of a rapeseed root system used for training;
[0015] The magnetic resonance sequence training images are sequentially segmented, multiplied and three-dimensionally reconstructed to obtain a training root system three-dimensional model;
[0016] Based on the three-dimensional interactive measurement technology, a training data set is obtained from the training root system three-dimensional model; the training data set includes: the root system parameters of the rapeseed root system used for training and the corresponding number of disease-susceptible branches;
[0017] The training data set is input into the random forest model for training to obtain the rapeseed clubroot disease detection model.
[0018] As an optional implementation, the magnetic resonance sequence training images are sequentially segmented, multiplied, and three-dimensionally reconstructed to obtain a training root system three-dimensional model, specifically including:
[0019] Segmenting the magnetic resonance sequence training image to obtain a training black and white mask image;
[0020] Performing positional multiplication on the magnetic resonance sequence training image and the training black-and-white mask image to obtain a training root foreground sequence image;
[0021] The training root system foreground sequence images are used to perform three-dimensional reconstruction to obtain a training root system three-dimensional model.
[0022] A rape clubroot disease detection system, the system comprising:
[0023] A target magnetic resonance sequence image acquisition module is used to acquire a target magnetic resonance sequence image; the target magnetic resonance sequence image is a magnetic resonance sequence image of a rapeseed root system to be detected; the rapeseed root system to be detected is a rapeseed root system in the soil;
[0024] A target root system three-dimensional model determination module is used to sequentially perform segmentation processing, position multiplication and three-dimensional reconstruction on the target magnetic resonance sequence images to obtain a target root system three-dimensional model;
[0025] A root system parameter determination module to be detected is used to obtain the root system parameters of the rapeseed root system to be detected from the target root system three-dimensional model based on three-dimensional interactive measurement technology; the root system parameters include: total root system length, main root length, maximum root system depth, maximum root system width, maximum root system diameter, root system volume and number of root branches;
[0026] The detection module is used to input the root system parameters of the rapeseed root system to be detected into the rapeseed clubroot disease detection model to obtain the detection result of the rapeseed root system to be detected; the detection result includes the number of diseased branches; the rapeseed clubroot disease detection model is obtained by training a random forest model.
[0027] As an optional implementation, the detection module includes a rape clubroot disease detection model training submodule; the rape clubroot disease detection model training submodule includes:
[0028] A magnetic resonance sequence training image acquisition unit, used for acquiring a magnetic resonance sequence training image; the magnetic resonance sequence training image is a magnetic resonance sequence image of a rapeseed root system used for training;
[0029] A training root system three-dimensional model determination unit is used to sequentially perform segmentation processing, position multiplication and three-dimensional reconstruction on the magnetic resonance sequence training images to obtain a training root system three-dimensional model;
[0030] A training data set determination unit is used to obtain a training data set from the training root system three-dimensional model based on a three-dimensional interactive measurement technology; the training data set includes: root system parameters of the rapeseed root system used for training and the corresponding number of disease-susceptible branches;
[0031] The rapeseed clubroot disease detection model determination unit is used to input the training data set into the random forest model for training to obtain the rapeseed clubroot disease detection model.
[0032] As an optional implementation manner, the training root system three-dimensional model determination unit specifically includes:
[0033] A training black-and-white mask image determination subunit is used to segment the magnetic resonance sequence training image to obtain a training black-and-white mask image;
[0034] A training root foreground sequence image determination subunit is used to perform positional multiplication on the magnetic resonance sequence training image and the training black-and-white mask image to obtain a training root foreground sequence image;
[0035] The training root system three-dimensional model determination subunit is used to perform three-dimensional reconstruction using the training root system foreground sequence images to obtain a training root system three-dimensional model.
[0036] An electronic device, comprising:
[0037] one or more processors;
[0038] a storage device having one or more programs stored thereon;
[0039] When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method described above.
[0040] A computer storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method described above.
[0041] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0042] The present invention discloses a method, a system, an electronic device and a computer storage medium for detecting clubroot disease of rapeseed. The method includes: obtaining a target magnetic resonance sequence image, where the target magnetic resonance sequence image is a magnetic resonance sequence image of the rapeseed root system to be detected, and the rapeseed root system to be detected is the rapeseed root system in the soil; sequentially performing segmentation processing, bitwise multiplication and three-dimensional reconstruction on the target magnetic resonance sequence image to obtain a three-dimensional model of the target root system; based on three-dimensional interactive measurement technology, obtaining root system parameters of the rapeseed root system to be detected from the three-dimensional model of the target root system, where the root system parameters include: total root length, main root length, maximum root depth, maximum root width, maximum root diameter, root volume and number of root branches; inputting the root system parameters of the rapeseed root system to be detected into a clubroot disease detection model of rapeseed to obtain a detection result of the rapeseed root system to be detected. The present invention directly detects the rapeseed root system still in the soil through the clubroot disease detection model of rapeseed, realizing in-situ non-destructive detection of clubroot disease of rapeseed. Description of the Drawings
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0044] Figure 1 It is a flowchart of the method for detecting clubroot disease of rapeseed provided by an embodiment of the present invention;
[0045] Figure 2 It is a schematic diagram of the foreground sequence image of the root system in an embodiment of the present invention;
[0046] Figure 3 It is a physical diagram of the clubroot-infected rapeseed root system in an embodiment of the present invention;
[0047] Figure 4 It is a physical diagram of the healthy rapeseed root system in an embodiment of the present invention;
[0048] Figure 5 It is a schematic diagram of the three-dimensional model of the clubroot-infected rapeseed root system in an embodiment of the present invention;
[0049] Figure 6 This is a schematic diagram of a three-dimensional model of a healthy rapeseed root system in an embodiment of the present invention;
[0050] Figure 7 A diagram of a three-dimensional model interaction interface in an embodiment of the present invention;
[0051] Figure 8 A block diagram of a rapeseed clubroot disease detection system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] The purpose of the present invention is to provide a rapeseed clubroot disease detection method, system, electronic equipment and computer storage medium, aiming to realize in-situ non-destructive detection of rapeseed clubroot disease, which can be applied to the field of clubroot disease detection technology.
[0054] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] Example 1
[0056] Figure 1 Flow chart of the rape clubroot disease detection method provided by the embodiment of the present invention. Figure 1 As shown, the rape clubroot disease detection method in this embodiment includes:
[0057] Step 101: acquiring a target magnetic resonance sequence image; the target magnetic resonance sequence image is a magnetic resonance sequence image of a rapeseed root system to be detected; the rapeseed root system to be detected is a rapeseed root system in soil.
[0058] Step 102: performing segmentation processing, position multiplication and three-dimensional reconstruction on the target magnetic resonance sequence images in sequence to obtain a target root system three-dimensional model.
[0059] Step 103: Based on the three-dimensional interactive measurement technology, the root system parameters of the rapeseed root system to be detected are obtained from the target root system three-dimensional model; the root system parameters include: total root system length, main root length, maximum root system depth, maximum root system width, maximum root system diameter, root system volume and number of root branches.
[0060] Step 104: input the root system parameters of the rapeseed root system to be detected into the rapeseed clubroot disease detection model to obtain the detection result of the rapeseed root system to be detected; the detection result includes the number of diseased branches; the rapeseed clubroot disease detection model is obtained by training the random forest model.
[0061] As an optional implementation, the training process of the rapeseed clubroot disease detection model is as follows:
[0062] Acquire MRI sequence training images.
[0063] The magnetic resonance sequence training images are sequentially segmented, multiplied and three-dimensionally reconstructed to obtain a three-dimensional model of the training root system.
[0064] Based on three-dimensional interactive measurement technology, a training data set is obtained from a training root system three-dimensional model; the training data set includes: the root system parameters of the rapeseed root system used for training and the corresponding number of diseased branches; the root system parameters of the rapeseed root system used for training include: total root system length, main root length, maximum root system depth, maximum root system width, maximum root system diameter, root system volume and number of root branches.
[0065] The training data set was input into the random forest model for training to obtain the rapeseed clubroot disease detection model.
[0066] As an optional implementation, segmentation processing, bitwise multiplication and three-dimensional reconstruction are sequentially performed on the magnetic resonance sequence training images to obtain a training root system three-dimensional model, which specifically includes:
[0067] The magnetic resonance sequence training image is segmented to obtain a training black and white mask image.
[0068] The magnetic resonance sequence training image and the training black-and-white mask image are aligned and multiplied to obtain the training root foreground sequence image.
[0069] The training root system foreground sequence images are used for 3D reconstruction to obtain a training root system 3D model.
[0070] Specifically, the magnetic resonance sequence training images include: diseased magnetic resonance sequence images and healthy magnetic resonance sequence images; the diseased magnetic resonance sequence images are magnetic resonance sequence images of diseased rapeseed roots, and the healthy magnetic resonance sequence images are magnetic resonance sequence images of healthy rapeseed roots.
[0071] The diseased magnetic resonance sequence images and the healthy magnetic resonance sequence images are segmented respectively to obtain the diseased black-and-white mask images and the healthy black-and-white mask images.
[0072] The diseased magnetic resonance sequence images and the diseased black and white mask images are aligned and multiplied to obtain the diseased root foreground sequence images.
[0073] The healthy magnetic resonance sequence images and the healthy black-and-white mask images are aligned and multiplied to obtain the healthy root foreground sequence images.
[0074] The three-dimensional model of the diseased root system was obtained by three-dimensional reconstruction using the foreground sequence images of the diseased root system.
[0075] The healthy root system foreground sequence images are used for three-dimensional reconstruction to obtain a three-dimensional model of the healthy root system.
[0076] Based on the three-dimensional interactive measurement technology, the parameters of the susceptible root system are obtained from the three-dimensional model of the susceptible root system.
[0077] Based on 3D interactive measurement technology, healthy root system parameters are obtained from the 3D model of the healthy root system.
[0078] Specifically, the steps for constructing the rapeseed clubroot disease detection model include:
[0079] Step 1: Cultivate a sample of infected rapeseed (with a root system such as Figure 3 ) and healthy rapeseed samples (whose root system is shown in Figure 4 shown).
[0080] Preparation of inoculum: Take 10g of diseased root tissue, add 100ml of sterilized water, and grind the tissue with a juicer. During the juicing process, turn off the machine every 60s, let it stand for 2min, and then repeat the juicing to prevent the temperature from increasing and affecting the activity of spores. Repeat this step until the diseased root tissue is completely ground, and finally filter it with four layers of gauze. Transfer the prepared spore suspension into a 50ml centrifuge tube and store it at 4℃ for later use.
[0081] Substrate preparation: peat soil (250L, 0-10mm) produced by Germany's Vetter was used as the growth substrate in this example. The prepared substrate was sterilized to prevent the seedlings from being infected with other pathogens.
[0082] Seed treatment: To ensure the germination rate of rapeseed seeds, soak the seeds in warm water and germinate them before sowing. Soaking seeds in warm water: Take 80 seeds and soak them in a constant temperature water bath at 56°C for 8 minutes, and keep stirring to ensure that all rapeseed seeds are heated evenly. Then pour out the warm water, rinse the seeds twice with normal temperature tap water to remove impurities, and finally replace with pure normal temperature tap water to soak the seeds for 2 hours.
[0083] Germination: Take a culture dish with a diameter of 15 cm, put a clean filter paper in the middle, spray a small amount of tap water on the filter paper, make the filter paper completely wet but without flowing water, then evenly place the seeds soaked in the warm soup on the wet filter paper, and finally cover the seeds with a layer of clean wet filter paper to keep them moist. Cover the culture dish with a lid, place it in an incubator at 25°C, and germinate at room temperature. During the germination period, pay attention to spraying water to keep it moist, and the seeds should not germinate on the filter paper for more than 24 hours. After the seeds have been germinated for 24 hours, move each rapeseed seed to the prepared seedling pot. At the same time, sterilize and disinfect the incubator, put it in a greenhouse incubator to ensure the normal growth of the seedlings, and maintain daily management. When the seedlings grow to have two leaves, inoculate them.
[0084] Inoculation method: To ensure the success rate of rape seedlings infected with clubroot, the inoculation method of the fungus soil method is adopted. Fungus soil method: fully mix the inoculation liquid and the substrate to fully soak the soil. Finally, put the fully soaked substrate into a seedling tray with an outer diameter of 60mm, and sow the seeds soaked in warm water into the seedling tray. According to the daily management method of plants, ensure sufficient light and control water.
[0085] Daily management: The daytime temperature of the greenhouse incubator is set at 25°C and the nighttime temperature is set at 20°C. During the cultivation period, sufficient light is ensured, water is controlled, and the light and water required by conventional cruciferous plants are managed.
[0086] Step 2: Based on the imaging function of low-field magnetic resonance, the SE sequence is used to obtain magnetic resonance sequence images of diseased and healthy samples of rapeseed roots.
[0087] The model of the low-field nuclear magnetic resonance imaging instrument used in this embodiment is MesoMR23-060V-I, with a magnetic field strength of 0.5T, a rated input of 220VAC, 50 / 60Hz, 1000W, and a magnet temperature of 32±0.01°C, purchased from Suzhou Newmai Analytical Instrument Co., Ltd. First, the computer control unit, industrial computer, spectrometer unit, radio frequency unit, and gradient unit of the low-field nuclear magnetic resonance instrument are turned on, and the instrument is heated for 20 minutes; then, the center frequency of the instrument is calibrated, the field is uniformed, and according to the setting values of the preferred imaging parameters, the whole rapeseed plant is placed in a sample tube, and then the tube is placed in the probe of the magnetic resonance instrument to collect images; the same operation is performed on healthy samples and diseased samples. The parameters of the SE sequence were set as follows: analog gain 15 dB, preamplification gain 3 dB, digital gain 3 dB, receiver bandwidth 20 kHz, number of selected layers 4-32, layer thickness 1.5 mm, layer spacing 1 mm, imaging field of view 150, image reconstruction method 2D Fourier transform reconstruction, and the resulting image size was 256 pixels x 256 pixels.
[0088] The specific preferred imaging parameter settings are shown in Table 1:
[0089] Table 1 Preferred parameter settings for rapeseed root imaging based on magnetic resonance imaging technology
[0090]
[0091]
[0092] Specifically, a low-field magnetic resonance instrument is used to collect signals from rapeseed roots still in the soil, and computer technology is used for reconstruction to obtain a magnetic resonance sequence image with a width of 256 pixels and a height of 256 pixels (such as Figure 2As shown in the figure). The process of obtaining magnetic resonance sequence images by low-field magnetic resonance imaging is as follows: 1) First, place the sample in the main magnetic field. The hydrogen protons in the sample are arranged along the main magnetic field from a disordered state. Most of the hydrogen protons are in the same direction as the main magnetic field and are called low-energy protons; a small number of hydrogen protons are in the opposite direction to the main magnetic field and are called high-energy protons. 2) Then, apply a radiofrequency pulse to the sample. The radiofrequency pulse has two functions: First, it transfers energy. The low-energy protons absorb energy and become high-energy protons; Second, since the frequency of the radiofrequency pulse signal is equal to the precession frequency of the protons, all the protons that absorb energy attract and approach each other, generating the same phase. 3) The radiofrequency pulse is turned off. The sample simultaneously undergoes transverse relaxation (T2 relaxation) and longitudinal relaxation (T1 relaxation). That is, the low-energy protons slowly release the energy they just absorbed, and the free induction decay phenomenon (FID) occurs. In our experiment, we choose transverse relaxation because transverse relaxation mainly involves the hydrogen protons in water molecules, which is accurate for water analysis. In longitudinal relaxation, in addition to the hydrogen protons in water molecules, there may also be other molecules containing hydrogen protons around, so water molecules cannot be used as the main research object. 4) During the transverse relaxation process in step 3), the low-field magnetic resonance instrument starts to collect signals and forms magnetic resonance images through spatial phase encoding technology. Based on the imaging function of low-field magnetic resonance, use the SE sequence (the SE sequence is the most basic pulse sequence in magnetic resonance imaging. The SE sequence first applies a 90° excitation pulse and then a 180° refocusing pulse. Here, 90 degrees and 180 degrees are relative to the direction of the main magnetic field. After applying the 90° pulse, the low-energy protons absorb energy and become high-energy protons, and precess at the same frequency and the same phase as the original high-energy protons. However, the application of the 90° pulse is time-limited. After the 90° pulse ends, the free decay phenomenon occurs, and the protons that were originally at the same frequency and the same phase start to have differences and a phase difference. The protons will disperse in the X, Y plane. If a 180° pulse is applied in the X, Y plane after a period of time, the protons with a faster precession frequency will become behind, and the protons with a slower frequency will be in front, and then continue to precess at the original frequency. As time delays, the phase difference between the protons becomes 0 again, the phase of the proton group is reunited again, and the transverse vector in the X, Y plane reaches the maximum again. The maximum signal intensity is generated. Subsequently, the phase between the protons becomes different again, and the receiving coil detects the gradually decaying signal again. Such a gradually rising and then gradually falling echo signal formed is called a spin echo.). Respectively obtain the magnetic resonance sequence images of the diseased rapeseed roots and the healthy rapeseed roots. Both of these two magnetic resonance sequence images are horizontal plane (cross-sectional) images.
[0093] Specifically, control the low-field magnetic resonance instrument to the spin echo sequence mode, and scan the rapeseed roots to obtain a sequence of magnetic resonance images of the roots; the spin echo sequence mode includes multiple echo signals with different intensities; one echo signal corresponds to the magnetic resonance image of one position of the roots.
[0094] Among them, the intensity calculation formula of the echo signal is as follows:
[0095]
[0096] Among them, S represents the intensity of the echo signal, A represents the hydrogen proton density, TR represents the repetition sampling time, TE represents the echo time, T1 represents the longitudinal relaxation time, and T2 represents the transverse relaxation time.
[0097] Step 3: Denoise and segment the root magnetic resonance sequence images obtained in Step 2 to obtain a black-and-white binary mask image.
[0098] The denoising method uses the non-local means filtering method, and the denoising parameters are set as follows: the smoothing parameter is set to 10, the neighborhood window size is set to 7, and the search window size is set to 21; the segmentation method uses the adaptive threshold segmentation algorithm, and the opencv is called to implement this segmentation algorithm to obtain a binary image.
[0099] Specifically, the magnetic resonance sequence images of the diseased and healthy rapeseed roots obtained in Step 2 are respectively segmented to obtain the black-and-white mask images of the foreground images of the diseased and healthy rapeseed roots. Here, a magnetic resonance image sequence of a rapeseed root sample includes about 24 horizontal plane images, that is, an image sequence contains 24 images. After segmenting it, 24 corresponding black-and-white mask images of the root foreground images can be obtained. The black-and-white mask image means that on the basis of the original image (grayscale image, grayscale value 0-255, gradually changing from black to white), the target root is painted white, the background is all set to black, and then the image is changed into a binary image (the grayscale value of the binary image is only 0 and 1, 0 is black, and 1 is white), so that the black-and-white mask image is obtained.
[0100] Step 4: Multiply the binary image obtained in Step 3 with the corresponding original image bit by bit to obtain the root foreground sequence images.
[0101] Specifically, the mask image is multiplied with the original image (i.e., the magnetic resonance sequence images of the diseased and healthy rapeseed roots obtained in step 2) to obtain two root foreground sequence images (the diseased root foreground sequence image and the healthy root foreground sequence image). In the image, the place with water will be bright, and the place without water will not be bright, so the ideal state is that the root is bright and the soil is not bright. Because the root system is in the soil, and the soil also has some water, then the water in the soil may also be imaged, causing some influence. Therefore, the root system should be cut out from the soil background, so that the background behind is all black, so that only the root information can be studied. Corresponding multiplication refers to the multiplication of the grayscale values at the corresponding positions. The black and white mask image is obtained based on the original image and is consistent with its size. Because the black in the black and white mask image is all 0, the product of 0 and any grayscale value is 0, and the corresponding position in the resulting image should also be 0, that is, black, that is, the soil background is black. If the white is all 1, then this block should be the grayscale value in the original image, that is, the actual value of the target root system, and the root foreground sequence image is obtained.
[0102] Step 5: Using the root system foreground sequence images obtained in step 4, perform 3D reconstruction of the root system to obtain a 3D model of the diseased root system (e.g. Figure 5 ) and a healthy root system 3D model (as shown Figure 6 shown).
[0103] Specifically, the three-dimensional model of the root system is reconstructed by combining the scientific computing visualization tool library Mayavi and the root system foreground sequence images obtained in step 4;
[0104] The specific steps of 3D reconstruction are: 1) The root foreground sequence images (h, w) extracted by segmentation in step 4 are sequentially organized into a 3D data set (h, w, n). Among them, h and w are the height and width of the root foreground sequence images, and n is the number of horizontal slices; 2) Use mayavi.pipeline.scalar_field to create a data source (this data source includes length, volume, etc.); 3) Add the data attribute spacing to the data source in step 2), that is, the length, width and height of a single voxel; 4) Use mayavi.pipeline.iso_surface to generate isosurfaces and adjust color and other attributes; 5) Visualize the 3D reconstruction results (the specific result is a three-dimensional root model that can be interactively operated, and a screenshot of a plane is shown in Figure 2). Figure 7 shown).
[0105] Step 6: Based on the three-dimensional models of diseased roots and healthy roots obtained in Step 5, use three-dimensional interactive measurement technology to obtain the parameters of the three-dimensional models of diseased roots and healthy roots, and obtain root architecture parameters. The root architecture parameters include: diseased root parameters and healthy root parameters. The diseased root parameters include: the root parameters of rapeseed roots for training and the number of diseased branches; the root parameters of rapeseed roots for training and the healthy root parameters both include: total root length, main root length, maximum root depth, maximum root width, maximum root diameter, root volume, and number of root branches.
[0106] Specifically, based on the three-dimensional root model obtained in Step 5, design a program to achieve interactive measurement of the parameters of the three-dimensional root model. The specific steps of the interactive measurement technology are: Step 1: Establish a Figure scene; Step 2: Use the MC algorithm to perform three-dimensional reconstruction on a sequence of images of a root system; Step 3: Define the picker_callback(picker) pick event handling function; Step 4: Establish a response mechanism through on_mouse_pick(picker_callback).
[0107] Clicking on the root model with the left mouse button can pick the spatial coordinates (x1, y1, z1) of this point (see Figure 7 ). The distance between any two points can be calculated through the Euclidean distance. Based on the point picking, further calculate the Euclidean distance of the coordinates of the picked points, and the distance between any two points can be obtained in real time. The distance calculation of the program of the present invention is implemented using the euclidean function in scipy, and integrate this distance calculation program into the three-dimensional reconstruction program, so that the distance between any two points can be obtained in real time; pick three spatial points on the root model with the left mouse button, and the included angle of the intersecting lines formed in the plane where these three points are located can be obtained by the cosine theorem, the included angle between two line segments AB and AC, and integrate this angle calculation program into the three-dimensional reconstruction program, so that the real-time acquisition of any target angle can be achieved.
[0108] Step 7: Based on the root architecture parameters obtained in Step 6, train a random forest model to obtain a rapeseed clubroot detection model. Use the total root length, main root length, maximum root depth, maximum root width, maximum root diameter, root volume, and number of root branches as features to establish a random forest model. The samples of diseased roots and healthy roots are divided into a training set, a validation set, and a test set according to 2:1:1. The training set and the validation set are used to train the model, and the test set is only used to evaluate the model.
[0109] Specifically, the root system was dug out, and referring to the classification standard of rapeseed clubroot, the samples with swollen main roots or lateral roots were determined as susceptible samples, and the samples were marked, wherein the susceptible samples were marked as 1 and the healthy samples were marked as 0, and 59 susceptible samples and 43 healthy samples were obtained; the samples were randomly divided into training set, validation set and test set in a ratio of 2:1:1; the random forest RF model was trained using the training set and validation set, the RF model was implemented using the Scikit-learn machine learning library, and the GridSearch function was used to optimize the model parameters, and the test set was only used to evaluate the model; the optimal parameter of the established RF model was n_estimators=41, and the other parameters used the default parameters; the rapeseed clubroot detection model established based on the root system configuration parameters can achieve 100%, 100% and 95.83% accuracy in the training set, validation set and test set, respectively.
[0110] Example 2
[0111] Figure 8 Flow chart of the rape clubroot disease detection method provided by the embodiment of the present invention. Figure 8 As shown, a rape clubroot disease detection system in this embodiment includes:
[0112] The target magnetic resonance sequence image acquisition module 201 is used to acquire target magnetic resonance sequence images; the target magnetic resonance sequence images are magnetic resonance sequence images of the rapeseed root system to be detected; the rapeseed root system to be detected is the rapeseed root system in the soil.
[0113] The target root system three-dimensional model determination module 202 is used to perform segmentation processing, position multiplication and three-dimensional reconstruction on the target magnetic resonance sequence images in sequence to obtain the target root system three-dimensional model.
[0114] The module 203 for determining the root system parameters to be detected is used to obtain the root system parameters of the rapeseed root system to be detected from the three-dimensional model of the target root system based on the three-dimensional interactive measurement technology; the root system parameters include: total root length, main root length, maximum root depth, maximum root width, maximum root diameter, root volume and number of root branches.
[0115] The detection module 204 is used to input the root system parameters of the rapeseed root system to be detected into the rapeseed clubroot disease detection model to obtain the detection result of the rapeseed root system to be detected; the detection result includes the number of diseased branches; the rapeseed clubroot disease detection model is obtained by training the random forest model.
[0116] As an optional implementation, the detection module 204 includes a rape clubroot disease detection model training submodule; the rape clubroot disease detection model training submodule includes:
[0117] The magnetic resonance sequence training image acquisition unit is used to acquire the magnetic resonance sequence training image.
[0118] The training root system three-dimensional model determination unit is used to perform segmentation processing, alignment multiplication, and three-dimensional reconstruction on the magnetic resonance sequence training images in sequence to obtain a training root system three-dimensional model.
[0119] The training dataset determination unit is used to obtain a training dataset from the training root system three-dimensional model based on the three-dimensional interactive measurement technology; the training dataset includes: the root system parameters of the rapeseed root system for training and the corresponding number of diseased branches.
[0120] The rapeseed clubroot detection model determination unit is used to input the training dataset into a random forest model for training to obtain a rapeseed clubroot detection model.
[0121] As an alternative implementation, the training root system three-dimensional model determination unit specifically includes:
[0122] The training black and white mask image determination subunit is used to perform segmentation processing on the magnetic resonance sequence training images to obtain a training black and white mask image.
[0123] The training root system foreground sequence image determination subunit is used to perform alignment multiplication on the magnetic resonance sequence training images and the training black and white mask images to obtain a training root system foreground sequence image.
[0124] The training root system three-dimensional model determination subunit is used to perform three-dimensional reconstruction using the training root system foreground sequence image to obtain a training root system three-dimensional model.
[0125] Embodiment 3
[0126] An electronic device in this embodiment includes:
[0127] One or more processors;
[0128] A storage device on which one or more programs are stored;
[0129] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in Embodiment 1.
[0130] Embodiment 4
[0131] A computer storage medium in this embodiment stores a computer program, wherein when the computer program is executed by a processor, the method described in Embodiment 1 is implemented.
[0132] In this specification, the various embodiments are described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the system disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0133] In this article, specific examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for helping to understand the device of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for detecting clubroot disease of rape, characterized in that, The method comprises: Acquire a target magnetic resonance sequence image; the target magnetic resonance sequence image is a magnetic resonance sequence image of a rapeseed root system to be detected; the rapeseed root system to be detected is a rapeseed root system in soil; The target magnetic resonance sequence images are sequentially segmented, multiplied and three-dimensionally reconstructed to obtain a target root system three-dimensional model; Based on the three-dimensional interactive measurement technology, the root system parameters of the rapeseed root system to be detected are obtained from the three-dimensional model of the target root system; the root system parameters include: total root system length, main root length, maximum root system depth, maximum root system width, maximum root system diameter, root system volume and number of root branches; Inputting the root system parameters of the rapeseed root system to be detected into a rapeseed clubroot disease detection model to obtain a detection result of the rapeseed root system to be detected; the detection result includes the number of diseased branches; the rapeseed clubroot disease detection model is obtained by training a random forest model; The training process of the rapeseed clubroot disease detection model is as follows: Acquire a magnetic resonance sequence training image; the magnetic resonance sequence training image is a magnetic resonance sequence image of a rapeseed root system used for training; The magnetic resonance sequence training images are sequentially segmented, multiplied and three-dimensionally reconstructed to obtain a training root system three-dimensional model; Based on the three-dimensional interactive measurement technology, a training data set is obtained from the training root system three-dimensional model; the training data set includes: the root system parameters of the rapeseed root system used for training and the corresponding number of disease-susceptible branches; Inputting the training data set into the random forest model for training to obtain the rapeseed clubroot disease detection model; The step of sequentially performing segmentation processing, position multiplication and three-dimensional reconstruction on the magnetic resonance sequence training image to obtain a training root system three-dimensional model specifically includes: Segmenting the magnetic resonance sequence training image to obtain a training black and white mask image; Performing positional multiplication on the magnetic resonance sequence training image and the training black-and-white mask image to obtain a training root foreground sequence image; The training root system foreground sequence images are used to perform three-dimensional reconstruction to obtain a training root system three-dimensional model.
2. A detection system for clubroot disease of rape, characterized in that, The system comprises: A target magnetic resonance sequence image acquisition module is used to acquire a target magnetic resonance sequence image; the target magnetic resonance sequence image is a magnetic resonance sequence image of a rapeseed root system to be detected; the rapeseed root system to be detected is a rapeseed root system in the soil; A target root system three-dimensional model determination module is used to sequentially perform segmentation processing, position multiplication and three-dimensional reconstruction on the target magnetic resonance sequence images to obtain a target root system three-dimensional model; A root system parameter determination module to be detected is used to obtain the root system parameters of the rapeseed root system to be detected from the target root system three-dimensional model based on three-dimensional interactive measurement technology; the root system parameters include: total root system length, main root length, maximum root system depth, maximum root system width, maximum root system diameter, root system volume and number of root branches; A detection module, used for inputting the root system parameters of the rapeseed root system to be detected into a rapeseed clubroot disease detection model to obtain a detection result of the rapeseed root system to be detected; the detection result includes the number of diseased branches; the rapeseed clubroot disease detection model is obtained by training a random forest model; The detection module includes a rape clubroot disease detection model training submodule; the rape clubroot disease detection model training submodule includes: A magnetic resonance sequence training image acquisition unit, used for acquiring a magnetic resonance sequence training image; the magnetic resonance sequence training image is a magnetic resonance sequence image of a rapeseed root system used for training; A training root system three-dimensional model determination unit is used to sequentially perform segmentation processing, position multiplication and three-dimensional reconstruction on the magnetic resonance sequence training images to obtain a training root system three-dimensional model; A training data set determination unit is used to obtain a training data set from the training root system three-dimensional model based on a three-dimensional interactive measurement technology; the training data set includes: root system parameters of the rapeseed root system used for training and the corresponding number of disease-susceptible branches; A rapeseed clubroot disease detection model determination unit, used for inputting the training data set into the random forest model for training to obtain the rapeseed clubroot disease detection model; The training root system three-dimensional model determination unit specifically includes: A training black-and-white mask image determination subunit is used to segment the magnetic resonance sequence training image to obtain a training black-and-white mask image; A training root foreground sequence image determination subunit is used to perform positional multiplication on the magnetic resonance sequence training image and the training black-and-white mask image to obtain a training root foreground sequence image; The training root system three-dimensional model determination subunit is used to perform three-dimensional reconstruction using the training root system foreground sequence images to obtain a training root system three-dimensional model.
3. An electronic device, characterized in that, include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as claimed in claim 1 .
4. A computer storage medium, characterized in that, A computer program is stored thereon, wherein when the computer program is executed by a processor, the method according to claim 1 is implemented.
Citation Information
Patent Citations
Wheat root measurement method based on image processing
CN108680109A
Crop root system configuration forming observation device
CN215582841U
Magnetic resonance imaging technology-based Chinese cabbage clubroot early rapid nondestructive detection device
CN107389718A
CT image three-dimensional reconstruction method based on MC-T algorithm
CN112802193A