Method and system for automatically grading saline-alkaline tolerance in corn seedling stage

Through the DeepVit model combined with Transformer and ASPP module, the problem of insufficient robustness and accuracy in salt tolerance grading of corn plants is solved, efficient automatic grading in complex environments is achieved, and the accuracy and stability of grading are enhanced.

CN119131482APending Publication Date: 2024-12-13JILIN ACAD OF AGRI SCI
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411215363.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The prior art lacks robustness, limited grading accuracy and poor data enhancement effects in corn plants salt tolerance grading, difficult to adapt to complex environments and image noise, and cannot capture global context information by relying on local feature extraction.

Method used

The DeepVit model is used to combine Transformer and ASPP modules, and the global context and multi-scale features of the image are extracted through data augmentation techniques such as random translation, salt and pepper noise, Gaussian noise and brightness contrast adjustment, and the global context and multi-scale features of the image are automatically graded through model training.

Benefits of technology

It improves the accuracy and robustness of grading, reduces manual intervention, enhances the stability and computational efficiency of the model under different environmental conditions, and supports scientific research and breeding work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131482A_ABST
    Figure CN119131482A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic grading method and system for saline-alkaline tolerance in a corn seedling stage, and the method comprises the steps: carrying out the preprocessing of image data, including the screening of high-quality images, and the labeling and enhancement of data; according to the method, a DeepVit model is constructed, an image is divided into non-overlapping blocks and converted into low-dimensional embedding vectors, and the low-dimensional embedding vectors are embedded and input into a Transform encoder layer in combination with positions, so that image features are extracted, and global context modeling is carried out. And capturing multi-scale information by using an ASPP module, and restoring the feature map to the original resolution through an expansion path. And executing an image segmentation task through the head part of the model, and outputting a grading result of the salt tolerance of the corn plant. The method has the advantages that the accuracy and reliability of grading are improved, the working efficiency is improved, the response speed of the system is improved, and the method is suitable for corn salt tolerance evaluation in the actual agricultural environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer vision, deep learning and agricultural engineering technology, and in particular to a method and system for automatically grading corn seedling salt-alkali tolerance. Background Art

[0002] In the agricultural field, corn is one of the main food crops, and its salt tolerance has an important impact on its growth and yield. Traditional methods for evaluating corn plant salt tolerance mainly rely on manual observation and manual grading, which are usually time-consuming and easily affected by human subjective factors, resulting in inconsistency and lack of accuracy in grading results.

[0003] Traditional image processing techniques, such as threshold-based segmentation, edge detection, and color space conversion, are widely used in image analysis tasks. These methods process images through artificially designed features and rules. However, these techniques show low robustness and accuracy when dealing with complex image features and changing environmental conditions. Especially in practical applications such as illumination changes and image noise, these methods often require frequent parameter adjustments, resulting in inefficient processing and unstable results.

[0004] In recent years, convolutional neural networks (CNNs) have been widely used in image classification and segmentation tasks, showing good performance. CNNs are able to extract local features of images through stacked convolutional layers and improve the accuracy of classification in some tasks. However, traditional CNNs focus mainly on local features and often fail to fully capture the global contextual information in the image. This limitation may lead to insufficient adaptability of the model to complex scenes when dealing with tasks that require global understanding, such as salt tolerance classification of corn plants.

[0005] In the field of deep learning, data augmentation technology is a commonly used method to improve the generalization ability of the model. Traditional data augmentation methods include image rotation, cropping, translation, color transformation, etc. Although these methods can increase the diversity of data, they often cannot fully simulate the noise and lighting changes in the actual environment. Therefore, the model may still have performance degradation when facing real scenes, especially when the amount of data is insufficient or the environmental conditions are extreme.

[0006] Disadvantages of the prior art

[0007] 1. Poor adaptability to complex environments: Traditional image processing technology and CNN-based methods are not robust enough and have low processing efficiency when dealing with changing environmental conditions and image noise, and require frequent manual adjustments.

[0008] 2. Limited feature extraction: Traditional methods and CNN mainly rely on local information for feature extraction and cannot effectively capture global contextual relationships, thus affecting the accuracy and comprehensiveness of classification.

[0009] 3. Data augmentation has limited effects: Although data augmentation techniques can increase data diversity, they are often unable to fully simulate various environmental changes in reality, which limits the performance of the model in real scenarios.

[0010] In summary, the existing technology has problems such as insufficient robustness, limited classification accuracy and poor data enhancement effect when dealing with the task of corn plant salt tolerance classification. Therefore, there is an urgent need for a new technical solution that can overcome these defects and improve the accuracy and efficiency of automatic classification of corn plant salt tolerance. Summary of the invention

[0011] In view of the defects of the prior art, the present invention provides a method and system for automatically grading salt-alkali tolerance of corn at the seedling stage.

[0012] In order to achieve the above invention object, the technical solution adopted by the present invention is as follows:

[0013] A method for automatically grading salt-alkali tolerance of corn at the seedling stage comprises the following steps:

[0014] S1: Preprocessing of image data:

[0015] The acquired corn plant image data were preliminarily screened and high-quality images were selected as the data set.

[0016] The image data set is annotated to identify the salt tolerance level of the corn plants in the image.

[0017] The image data set is subjected to data enhancement, wherein the data enhancement includes: randomly translating and rotating the image along the X-axis, the Y-axis or the Z-axis; adding random salt and pepper noise to the image; adding random Gaussian noise to the image; and adjusting the brightness and contrast of the image.

[0018] S2: Build DeepVit model:

[0019] Divide the data-augmented image dataset into a set of non-overlapping image patches;

[0020] Each image patch is flattened and converted into a low-dimensional embedding vector through a fully connected layer;

[0021] Combining the embedding vector with the position embedding to form an input sequence;

[0022] Inputting the input sequence into multiple sets of stacked Transformer encoder layers, each Transformer encoder layer includes a self-attention mechanism, multi-head attention, a feedforward neural network, and a residual connection for extracting image features and modeling global context;

[0023] The ASPP module is used to capture multi-scale information through convolutional layers with different dilation rates, and the output feature map is restored to the resolution of the input image through the expansion path;

[0024] The image segmentation task is performed through the head part of the model, which includes convolutional layers, upsampling layers, feature fusion and classification layers, and the final feature map is converted into a classification result of the salt tolerance of corn plants.

[0025] S3: Model training and optimization:

[0026] The DeepVit model is trained using the image data set, and the model parameters are optimized during the training process so that the model can accurately identify the salt tolerance levels of different corn plants; and the salt tolerance classification data in the training data are regularized and normalized.

[0027] S4: Automatic classification of corn plant salt tolerance:

[0028] Take photos of the tested corn plants at different time points after stress treatment;

[0029] The resulting images are fed into the trained DeepVit model to automatically identify and output the salt tolerance level of corn plants.

[0030] Furthermore, the corn plant images in the image data set are obtained through salt, alkali or salt-alkali mixed stress treatment.

[0031] Furthermore, in the data enhancement, the addition of salt and pepper noise simulates the interference of sensor device problems by randomly changing pixel values ​​in the image.

[0032] The present invention also discloses an automatic grading system for salt-alkali tolerance of corn seedlings, which can be used to implement the above-mentioned automatic grading method for salt tolerance of corn plants, and specifically comprises:

[0033] An image data preprocessing module is used to preliminarily screen the acquired corn plant image data, select high-quality images as a data set, and perform data annotation on the image data set to identify the salt tolerance level of the corn plants in the image, and perform data enhancement on the image data set, wherein the data enhancement includes randomly translating and rotating the image along the X-axis, Y-axis or Z-axis, adding random salt and pepper noise, adding random Gaussian noise, and adjusting the brightness and contrast of the image;

[0034] A DeepVit model building module is used to divide the image data set processed by data enhancement into a set of non-overlapping image blocks, flatten each image block, convert it into a low-dimensional embedding vector through a fully connected layer, combine the embedding vector with the position embedding to form an input sequence, and input it into multiple sets of stacked Transformer encoder layers. The encoder layer includes a self-attention mechanism, multi-head attention, a feedforward neural network, and a residual connection, which are used to extract image features and model the global context. The model adopts an ASPP module, captures multi-scale information through convolutional layers with different void rates, and restores the output feature map to the resolution of the input image through an extended path. At the same time, the image segmentation task is performed through the head part of the model. The head part includes a convolutional layer, an upsampling layer, a feature fusion, and a classification layer, and the final feature map is converted into a grading result of the salt tolerance of corn plants;

[0035] The model training and optimization module is used to train the DeepVit model through image data sets, optimize model parameters, enable it to accurately identify the salt tolerance levels of different corn plants, and perform regularization on the salt tolerance classification data in the training data;

[0036] The result display module is used to receive the corn plant salt tolerance classification results output by the model and display the results in a visual form.

[0037] The present invention also discloses a computer device, including a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned automatic grading method for salt tolerance of corn plants when executing the program.

[0038] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned automatic grading method for salt tolerance of corn plants is realized.

[0039] Compared with the prior art, the advantages of the present invention are:

[0040] 1. Improved classification accuracy: By using the DeepVit network, the present invention can effectively extract detailed features from images and accurately classify the salt tolerance of corn plants. DeepVit combines the advantages of the Transformer and ASPP modules, and can capture global contextual information and multi-scale features in images, thereby improving the accuracy and reliability of classification.

[0041] 2. Enhance model robustness: Data augmentation techniques such as random translation and rotation, salt and pepper noise, Gaussian noise, and brightness and contrast adjustment help simulate image conditions in various real-world environments, enhance the robustness of the model, and enable it to stably perform grading under different image quality and environmental conditions.

[0042] 3. Automated processing: The present invention reduces the need for manual intervention and improves work efficiency through automated image processing and grading processes. Automated processing can significantly reduce manual errors and ensure the consistency and accuracy of each grading.

[0043] 4. Strong adaptability: The present invention can process various types of image data and adapt to different corn varieties and growing conditions. This flexibility enables the system to play a role in different application scenarios.

[0044] 5. Efficient data processing: The DeepVit model has high computational efficiency, especially when processing high-resolution images. Through the optimization of the Transformer encoder and ASPP module, it can effectively process large amounts of data and improve the response speed of the system.

[0045] 6. Support scientific research: By providing high-precision salt tolerance classification data, the present invention can support related agricultural research and breeding work, help researchers better understand the salt tolerance characteristics of corn plants, and promote the development of improved varieties. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a technical roadmap of the automatic classification method of corn plant salt tolerance based on DeepVit network in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0048] like Figure 1 As shown, a method for automatically grading corn seedling salt-alkali tolerance comprises the following steps:

[0049] 1. Material cultivation and stress treatment

[0050] Select full and uniform corn seeds for testing, sterilize with 10g / L sodium hypochlorite for 20 minutes, and rinse with sterile distilled water for 3 times. Dry at 30℃~35℃ for 10 hours, and cool to room temperature for use. The seed quality should meet the requirements of seed purity, cleanliness and moisture in GB / T 4404.1. The seeds should be fully mature and full seeds harvested in the same season of the year, and the seeds should be of uniform size, with a germination rate greater than 95%, and should not be coated or mixed.

[0051] Seeds were sown in a corn seedling identification instrument, with 100 seeds planted in each pot, including 3 biological replicates, a total of 4 pots, and placed in a light incubator. The culture conditions were 16h light and 8h dark alternation, 60% humidity, (25±2)℃ / (20±2)℃ day / night alternation, light intensity of 50-60μmol m-2·s-1, and an appropriate amount of Hoagland nutrient solution was poured. When the seedlings grew to three leaves and one heart, one pot of corn seedling identification instrument continued to be cultured with Hoagland nutrient solution, and the other three pots were subjected to salt stress solution (200mmol / L NaCl), alkali stress solution (100mmol / L Na2CO3) or 4.3 salt-alkali stress solution (a mixture of 200mmol / L NaCl and 25mmol / L Na2CO3) in accordance with DB22 / T 2621-2017 "Technical Regulations for Identification of Salt and Alkali Tolerance of Corn", respectively.

[0052] 2. Material cultivation and stress treatment

[0053] The salt-alkali tolerance of corn seedlings is divided into five levels according to the seedling conditions, namely, highly salt-alkali tolerant, salt-alkali tolerant, moderately salt-alkali tolerant, salt-alkali sensitive and highly salt-alkali sensitive. The specific seedling conditions are shown in Table 1.

[0054] Table 1 Modified evaluation criteria for salt-alkali tolerance of corn seedlings

[0055]

[0056] The seedlings after stress treatment were photographed on the 1st, 3rd, 5th and 7th day, and the tolerance of the seedlings was graded based on the above principles.

[0057] The salt tolerance / alkali tolerance / salt-alkali tolerance rate at the seedling stage is calculated according to the following formula:

[0058]

[0059] Where: STI represents the salt tolerance / alkali tolerance / salt-alkali tolerance rate at the seedling stage, C i Indicates the seedling condition category, N i Indicates the number of plants in each category, 5 indicates the highest category, N t Indicates the total number of test samples.

[0060] 3. Preprocessing:

[0061] The images used for training were preliminarily screened and labeled. 1,000 high-quality images were selected and labeled from the acquired image data as the dataset.

[0062] In addition, considering the noise conditions of data acquisition, such as different brightness and exposure, which may lead to low generalization of the trained model, a customized random data augmentation method is used to expand the data set. Specifically, the following operations are performed on the original image data:

[0063] (1) Translation and rotation: Randomly rotate the image along the X-axis, Y-axis, or Z-axis to increase data diversity.

[0064] (2) Salt and pepper noise: Add random salt and pepper noise (impulse noise) to the image.

[0065]

[0066] Salt and pepper noise is black and white light and dark noise generated by image sensors, transmission channels, decoding processing, etc. In the formula, N is the three-channel color value after the pixel is changed. This method can simulate the interference caused by sensor equipment problems and ultimately help improve the robustness of the model.

[0067] (3) Gaussian noise: Add random Gaussian noise to the image

[0068]

[0069] Among them, Gaussian noise f(x) means that its probability density function obeys Gaussian distribution (i.e. normal distribution, μ and σ are two controllable parameters, the curve is symmetrical about x = μ, and the amplitude is exp represents a natural constant), and each pixel is reprocessed using this rule to obtain a noisy image. This method can simulate the interference of image data under different lighting and environmental conditions, helping to improve the generalization of the model.

[0070] (4) Adjusting image brightness and contrast: The brightness and contrast of the image were adjusted to simulate the differences in data acquired under different time and lighting conditions, thereby improving the accuracy of the entire method.

[0071] 4. Construction of DeepVit+ vegetation segmentation model

[0072] Vision Transformer is used as the backbone network and encoder to extract image features and model global context. For the input embedding part, the image is divided into a set of non-overlapping patches. Each patch is usually a square area of ​​fixed size. Each patch is flattened into a vector and then converted into a low-dimensional embedding vector by a learnable linear mapping (usually a fully connected layer). After that, it is linearly transformed by a fully connected layer. Next, the embedding vector is combined with the position embedding to form an input sequence. This sequence passes through multiple stacked Transformer encoder layers. Each Transformer encoder layer includes a self-attention mechanism (multi-head attention), a feedforward neural network, and a residual connection. The self-attention mechanism is used to obtain the semantic associations and dependencies between different positions in the input sequence. For the output layer, the output sequence of the last Transformer encoder is usually fed into the output layer for performing specific computer vision tasks. ViT converts image patches into sequence data and then applies Transformer to these sequences. At the same time, through the self-attention mechanism, ViT can capture global context information.

[0073] The ASPP module is the core component of the network. It uses different dilated convolution kernel sizes to capture information at different scales and uses pyramid pooling operations to integrate this information. Typically, the ASPP module includes multiple parallel dilated convolution layers, each with a different dilation rate to increase the receptive field. Specifically, ASPP has four layers. The first layer has a dilation rate of 6, uses a 3*3 convolution kernel, has 256 output channels, and uses ReLU as the activation function; the second layer increases the dilation rate to 12 while keeping other parameters unchanged; the third layer increases it to 18; and the last layer performs a global average pooling with a dilation rate of 1. These layers are executed in parallel, and the output feature maps of each ASPP layer have the same number of channels (256). In addition, the model uses an expansion path based on dilated convolution to restore the output feature maps of the ASPP module to the resolution of the original input image. The expansion path uses inverse convolution (deconvolution or transposed convolution) and upsampling operations.

[0074] The head of DeepViT+, the "Head" part, uses a variety of functions and operations to perform segmentation tasks, and consists of convolutional layers, upsampling layers, feature fusion and classification layers. Specifically, this part of the input feature map is the feature map generated from the ASPP module and the expansion path. These feature maps contain multi-scale semantic information, but the resolution is relatively low. In order to reduce the number of channels, a 1x1 convolution layer is usually added. The role of this layer is to reduce the dimension of the feature map to reduce computational complexity while maintaining important feature information. Afterwards, a bilinear interpolation method is used to upsample it to restore it to the same resolution as the input image, as shown below:

[0075]

[0076] Where μ is a fixed value and θ is the weight of different points in bilinear interpolation.

[0077] 5. Post-processing:

[0078] After the above feature learning and fusion, the method can predict the salt tolerance of plants. However, the plant classification training data is greatly affected by human factors, resulting in the intermediate grades being close to each other. The regularization method is used to normalize the classification data, thereby eliminating the inaccurate classification of training and evaluation samples caused by the influence of experience of different evaluators.

[0079] In another embodiment of the present invention, a system for automatically grading corn seedlings for salt-alkali tolerance is provided. The system can be used to implement the above-mentioned method for automatically grading corn seedlings for salt-alkali tolerance, and specifically includes:

[0080] An image data preprocessing module is used to preliminarily screen the acquired corn plant image data, select high-quality images as a data set, and perform data annotation on the image data set to identify the salt tolerance level of the corn plants in the image, and perform data enhancement on the image data set, wherein the data enhancement includes randomly translating and rotating the image along the X-axis, Y-axis or Z-axis, adding random salt and pepper noise, adding random Gaussian noise, and adjusting the brightness and contrast of the image;

[0081] A DeepVit model building module is used to divide the image data set processed by data enhancement into a set of non-overlapping image blocks, flatten each image block, convert it into a low-dimensional embedding vector through a fully connected layer, combine the embedding vector with the position embedding to form an input sequence, and input it into multiple sets of stacked Transformer encoder layers. The encoder layer includes a self-attention mechanism, multi-head attention, a feedforward neural network, and a residual connection, which are used to extract image features and model the global context. The model adopts an ASPP module, captures multi-scale information through convolutional layers with different void rates, and restores the output feature map to the resolution of the input image through an extended path. At the same time, the image segmentation task is performed through the head part of the model. The head part includes a convolutional layer, an upsampling layer, a feature fusion, and a classification layer, and the final feature map is converted into a grading result of the salt tolerance of corn plants;

[0082] The model training and optimization module is used to train the DeepVit model through image data sets, optimize model parameters, enable it to accurately identify the salt tolerance levels of different corn plants, and perform regularization on the salt tolerance classification data in the training data;

[0083] The result display module is used to receive the salt tolerance classification results of corn plants output by the model and display the results in a visual form. It supports multiple display modes such as images, texts or charts, making it convenient for users to intuitively evaluate and analyze the salt tolerance of corn plants.

[0084] In another embodiment of the present invention, a terminal device is provided, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of the automatic grading method for salt-alkali tolerance of corn seedlings, including the following steps:

[0085] S1: Preprocessing of image data:

[0086] The acquired corn plant image data were preliminarily screened and high-quality images were selected as the data set.

[0087] The image data set is annotated to identify the salt tolerance level of the corn plants in the image.

[0088] The image data set is subjected to data enhancement, wherein the data enhancement includes: randomly translating and rotating the image along the X-axis, the Y-axis or the Z-axis; adding random salt and pepper noise to the image; adding random Gaussian noise to the image; and adjusting the brightness and contrast of the image.

[0089] S2: Build DeepVit model:

[0090] Divide the data-augmented image dataset into a set of non-overlapping image patches;

[0091] Each image patch is flattened and converted into a low-dimensional embedding vector through a fully connected layer;

[0092] Combining the embedding vector with the position embedding to form an input sequence;

[0093] Inputting the input sequence into multiple sets of stacked Transformer encoder layers, each Transformer encoder layer includes a self-attention mechanism, multi-head attention, a feedforward neural network, and a residual connection for extracting image features and modeling global context;

[0094] The ASPP module is used to capture multi-scale information through convolutional layers with different dilation rates, and the output feature map is restored to the resolution of the input image through the expansion path;

[0095] The image segmentation task is performed through the head part of the model, which includes convolutional layers, upsampling layers, feature fusion and classification layers, and the final feature map is converted into a classification result of the salt tolerance of corn plants.

[0096] S3: Model training and optimization:

[0097] The DeepVit model is trained using the image data set, and the model parameters are optimized during the training process so that the model can accurately identify the salt tolerance levels of different corn plants; and the salt tolerance classification data in the training data are regularized and normalized.

[0098] S4: Automatic classification of corn plant salt tolerance:

[0099] Take photos of the tested corn plants at different time points after stress treatment;

[0100] The resulting images are fed into the trained DeepVit model to automatically identify and output the salt tolerance level of corn plants.

[0101] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It is understandable that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage.

[0102] The processor may load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the method for automatically grading corn seedlings for salt-alkali tolerance in the above embodiment; the processor may load and execute the following steps:

[0103] S1: Preprocessing of image data:

[0104] The acquired corn plant image data were preliminarily screened and high-quality images were selected as the data set.

[0105] The image data set is annotated to identify the salt tolerance level of the corn plants in the image.

[0106] The image data set is subjected to data enhancement, wherein the data enhancement includes: randomly translating and rotating the image along the X-axis, the Y-axis or the Z-axis; adding random salt and pepper noise to the image; adding random Gaussian noise to the image; and adjusting the brightness and contrast of the image.

[0107] S2: Build DeepVit model:

[0108] Divide the data-augmented image dataset into a set of non-overlapping image patches;

[0109] Each image patch is flattened and converted into a low-dimensional embedding vector through a fully connected layer;

[0110] Combining the embedding vector with the position embedding to form an input sequence;

[0111] Inputting the input sequence into multiple sets of stacked Transformer encoder layers, each Transformer encoder layer includes a self-attention mechanism, multi-head attention, a feedforward neural network, and a residual connection for extracting image features and modeling global context;

[0112] The ASPP module is used to capture multi-scale information through convolutional layers with different dilation rates, and the output feature map is restored to the resolution of the input image through the expansion path;

[0113] The image segmentation task is performed through the head part of the model, which includes convolutional layers, upsampling layers, feature fusion and classification layers, and the final feature map is converted into a classification result of the salt tolerance of corn plants.

[0114] S3: Model training and optimization:

[0115] The DeepVit model is trained using the image data set, and the model parameters are optimized during the training process so that the model can accurately identify the salt tolerance levels of different corn plants; and the salt tolerance classification data in the training data are regularized and normalized.

[0116] S4: Automatic classification of corn plant salt tolerance:

[0117] Take photos of the tested corn plants at different time points after stress treatment;

[0118] The resulting images are fed into the trained DeepVit model to automatically identify and output the salt tolerance level of corn plants.

[0119] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0120] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0121] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0123] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the implementation methods of the present invention, and should be understood that the protection scope of the present invention is not limited to such special statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A method for automatically grading corn seedling salt-alkali tolerance, characterized in that: The following steps are involved: S1: Preprocessing of image data: Perform a preliminary screening on the acquired corn plant image data and select high-quality images as the data set; Annotating the image data set to identify the salt tolerance level of corn plants in the image; Performing data enhancement on the image data set, wherein the data enhancement includes: randomly translating and rotating the image along the X-axis, the Y-axis or the Z-axis; adding random salt and pepper noise to the image; adding random Gaussian noise to the image; and adjusting the brightness and contrast of the image; S2: Build DeepVit model: Divide the data-augmented image dataset into a set of non-overlapping image patches; Each image patch is flattened and converted into a low-dimensional embedding vector through a fully connected layer; Combining the embedding vector with the position embedding to form an input sequence; Inputting the input sequence into multiple sets of stacked Transformer encoder layers, each Transformer encoder layer includes a self-attention mechanism, multi-head attention, a feedforward neural network, and a residual connection for extracting image features and modeling global context; The ASPP module is used to capture multi-scale information through convolutional layers with different dilation rates, and the output feature map is restored to the resolution of the input image through the expansion path; The image segmentation task is performed through the head part of the model, which includes convolutional layers, upsampling layers, feature fusion and classification layers, and the final feature map is converted into the classification result of the salt tolerance of corn plants; S3: Model training and optimization: The DeepVit model is trained using the image data set, and the model parameters are optimized during the training process so that the model can accurately identify the salt tolerance levels of different corn plants; the salt tolerance classification data in the training data is subjected to regularization normalization processing; S4: Automatic classification of corn plant salt tolerance: Take photos of the tested corn plants at different time points after stress treatment; The resulting images are fed into the trained DeepVit model to automatically identify and output the salt tolerance level of corn plants.

2. The automatic grading method for salt-alkali tolerance of corn seedlings according to claim 1, characterized in that: The corn plant images in the image data set are obtained by salt, alkali or salt-alkali mixed stress treatment.

3. The automatic grading method for salt-alkali tolerance of corn seedlings according to claim 1, characterized in that: In the data enhancement, the addition of salt and pepper noise simulates the interference of sensor equipment problems by randomly changing pixel values ​​in the image.

4. An automatic grading system for salt-alkali tolerance of corn seedlings, characterized by: The system can be used to implement the automatic grading method for salt-alkali tolerance of corn seedlings according to any one of claims 1 to 3, specifically comprising: An image data preprocessing module is used to preliminarily screen the acquired corn plant image data, select high-quality images as a data set, and perform data annotation on the image data set to identify the salt tolerance level of the corn plants in the image, and perform data enhancement on the image data set, wherein the data enhancement includes randomly translating and rotating the image along the X-axis, Y-axis or Z-axis, adding random salt and pepper noise, adding random Gaussian noise, and adjusting the brightness and contrast of the image; A DeepVit model building module is used to divide the image data set processed by data enhancement into a set of non-overlapping image blocks, flatten each image block, convert it into a low-dimensional embedding vector through a fully connected layer, combine the embedding vector with the position embedding to form an input sequence, and input it into multiple sets of stacked Transformer encoder layers. The encoder layer includes a self-attention mechanism, multi-head attention, a feedforward neural network, and a residual connection, which are used to extract image features and model the global context. The model adopts an ASPP module, captures multi-scale information through convolutional layers with different void rates, and restores the output feature map to the resolution of the input image through an extended path. At the same time, the image segmentation task is performed through the head part of the model. The head part includes a convolutional layer, an upsampling layer, a feature fusion, and a classification layer, and the final feature map is converted into a grading result of the salt tolerance of corn plants; The model training and optimization module is used to train the DeepVit model through image data sets, optimize model parameters, enable it to accurately identify the salt tolerance levels of different corn plants, and perform regularization on the salt tolerance classification data in the training data; The result display module is used to receive the corn plant salt tolerance classification results output by the model and display the results in a visual form.

5. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for automatically grading the salt-alkali tolerance of corn seedlings according to one of claims 1 to 3 is implemented.

6. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method for automatically grading the salt-alkali tolerance of corn seedlings according to one of claims 1 to 3 is implemented.

Citation Information

Cited By

  • Comprehensive evaluation method for saline-alkaline tolerance of medicago sativa

    CN120161176A