Wine grape phenotype information extraction method, electronic equipment and storage medium
The method leverages high-resolution imaging and three-dimensional scanning to construct and train a neural network model for accurate and efficient extraction of grape phenotypic information, addressing inefficiencies and inaccuracies of manual methods.
Patent Information
- Application Number
- CN202411107288.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-03
AI Technical Summary
Traditional methods for acquiring grape phenotypic information are inefficient, labor-intensive, and prone to human error, leading to inaccurate and inconsistent data due to reliance on manual observation and measurement.
A method utilizing high-resolution imaging and high-precision three-dimensional scanning to construct a sample data set, train a phenotypic information extraction model using a neural network, and identify phenotypic characteristics through a combination of two-dimensional and three-dimensional models.
Enables rapid, comprehensive, and accurate extraction of phenotypic information, supporting efficient grape breeding, cultivation, and management with scalable and versatile application across various grape varieties and environments.
Smart Images

Figure CN119067929A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of grape planting and computer vision technology, and specifically relates to a method for extracting phenotypic information of wine grapes, an electronic device and a storage medium. Background Art
[0002] In the agricultural field, accurate acquisition of grape phenotypic information plays a vital role in many aspects such as high-quality grape breeding, scientific cultivation, effective pest and disease control, and accurate quality evaluation. However, for a long time, traditional means of obtaining grape phenotypic information mainly rely on careful manual observation and manual measurement. This method not only consumes a lot of manpower and time costs, but is also extremely inefficient. In addition, due to the influence of human factors, its accuracy and objectivity are often difficult to be effectively guaranteed. For example, manual observation may be interfered by the observer's experience, fatigue, and subjective judgment, resulting in data deviation and inconsistency. In addition, manual measurement is difficult to achieve comprehensive coverage and timely update of data when facing large-scale vineyards. With the rapid development of computer technology and the increasing maturity of image processing technology, the use of advanced machine vision and efficient image recognition models to extract grape phenotypic information has gradually become a very promising and practical solution. This emerging technical means is expected to overcome many limitations of traditional methods and provide strong support for the modernization of the grape industry. Summary of the invention
[0003] The present invention aims to solve the deficiencies of the prior art and provides the following solutions:
[0004] A method for extracting phenotypic information of wine grapes comprises the following steps:
[0005] Acquire a sample two-dimensional image and a sample three-dimensional scanning model of a grape fruit sample, and construct a sample data set based on the two-dimensional image and the three-dimensional scanning model;
[0006] Constructing and training a phenotypic information extraction model based on the sample data set;
[0007] Collecting 2D images and 3D models of the grape fruit to be extracted;
[0008] The two-dimensional image and the three-dimensional model are identified based on the phenotypic information extraction model to obtain the phenotypic information of the grape fruit to be extracted.
[0009] Preferably, the method for constructing the sample data set includes:
[0010] Manually obtaining sample phenotypic information of the grape fruit sample, wherein the sample phenotypic information includes: color information, texture information and morphological information;
[0011] The obtained sample phenotype information is used as a label and added to the sample two-dimensional image and the sample three-dimensional scanning model to obtain the sample data set.
[0012] Preferably, the method for obtaining the phenotypic information extraction model comprises:
[0013] Preprocessing the sample data set to obtain a preprocessed data set;
[0014] Constructing a neural network model, and training the neural network model based on the preprocessed data;
[0015] The trained model is verified and optimized using a cross-validation method to obtain the phenotypic information extraction model.
[0016] Preferably, the method for collecting the two-dimensional image and the three-dimensional model of the grape fruit to be extracted comprises:
[0017] Using a high-resolution camera to perform two-dimensional imaging on the grape fruit to be extracted to obtain the two-dimensional image;
[0018] The grape fruit to be extracted is three-dimensionally scanned by high-precision three-dimensional scanning equipment, and the three-dimensional model is established.
[0019] The present invention also provides an electronic device for extracting phenotypic information of wine grapes, the electronic device applying any of the extraction methods described above, comprising: a data set construction module, a model construction module, an image acquisition module and an information extraction module;
[0020] The data set construction module is used to obtain a sample two-dimensional image and a sample three-dimensional scanning model of a grape fruit sample, and to construct a sample data set based on the two-dimensional image and the three-dimensional scanning model;
[0021] The model building module builds and trains a phenotypic information extraction model based on the sample data set;
[0022] The image acquisition module is used to acquire the two-dimensional image and three-dimensional model of the grape fruit to be extracted;
[0023] The information extraction module identifies the two-dimensional image and the three-dimensional model based on the phenotypic information extraction model to obtain the phenotypic information of the grape fruit to be extracted.
[0024] Preferably, the data set construction module includes: an initial data acquisition unit, a phenotype information acquisition unit and a data set construction unit;
[0025] The initial data acquisition unit is used to acquire the sample two-dimensional image and the sample three-dimensional scanning model of the grape fruit sample;
[0026] The phenotypic information acquisition unit is used to manually acquire sample phenotypic information of the grape fruit sample, wherein the sample phenotypic information includes: color information, texture information and morphological information;
[0027] The data set construction unit is used to add the obtained sample phenotype information as a label to the sample two-dimensional image and the sample three-dimensional scanning model to obtain the sample data set.
[0028] Preferably, the model building module includes: a data preprocessing unit, a model training unit and a model optimization unit;
[0029] The data preprocessing unit is used to preprocess the sample data set to obtain a preprocessed data set;
[0030] The model training unit is used to construct a neural network model and train the neural network model based on the preprocessed data;
[0031] The model optimization unit verifies and optimizes the trained model using a cross-validation method to obtain the phenotypic information extraction model.
[0032] Preferably, the image acquisition module includes: a two-dimensional acquisition unit and a three-dimensional acquisition unit;
[0033] The two-dimensional acquisition unit is used to perform two-dimensional imaging on the grape fruit to be extracted to obtain the two-dimensional image;
[0034] The three-dimensional acquisition unit is used to perform three-dimensional scanning on the grape fruit to be extracted and to establish the three-dimensional model.
[0035] The present invention also provides a storage medium, on which a computer program is stored, and when the computer program is run, the method for extracting phenotypic information of wine grapes is executed.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] (1) In terms of efficiency, the present invention greatly improves the speed of grape phenotypic information extraction by leveraging the powerful capabilities of machine vision and image recognition models. Work that previously required a lot of time and manpower can now be completed in a short period of time, saving valuable time for related research and production decision-making.
[0038] (2) The present invention can obtain various phenotypic information of grapes in a comprehensive, detailed and complete manner. Whether it is subtle changes in morphological characteristics or complex physiological and biochemical indicators, it can be accurately captured and analyzed, providing all-round, multi-angle and highly reliable data support for grape breeding, cultivation and management.
[0039] (3) The present invention has excellent scalability and versatility. It is not only suitable for currently common grape varieties and growth environments, but can also easily cope with and apply new varieties and different planting conditions that may appear in the future. It has wide applicability and long-term development potential. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0041] Figure 1 The figure is a schematic diagram of a method flow of an embodiment of the present invention. DETAILED DESCRIPTION
[0042] 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.
[0043] 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.
[0044] Embodiment 1
[0045] In this embodiment, if Figure 1 As shown, a method for extracting phenotypic information of wine grapes comprises the following steps:
[0046] S1. Obtain a sample two-dimensional image and a sample three-dimensional scanning model of a grape fruit sample, and construct a sample data set based on the two-dimensional image and the three-dimensional scanning model.
[0047] The method for constructing a sample data set includes: manually obtaining sample phenotypic information of grape fruit samples, the sample phenotypic information including color information, texture information and morphological information; using the obtained sample phenotypic information as a label, adding it to a sample two-dimensional image and a sample three-dimensional scanning model to obtain a sample data set.
[0048] In this embodiment, in the process of obtaining the sample data set, a high-resolution camera is first used to capture a two-dimensional image of the grape fruit under different angles and lighting conditions to ensure the image clarity and color accuracy. Then, a high-precision three-dimensional scanning device is used to perform an all-round scan of the grape fruit to obtain its three-dimensional morphological data. Next, the two-dimensional image is preliminarily screened and corrected by image processing software to remove blurred, overexposed or underexposed images. For the three-dimensional scanning model, a three-dimensional modeling software is used for cleaning and smoothing to ensure the accuracy and integrity of the model. When manually obtaining the sample phenotypic information, it is necessary to record the color distribution, texture characteristics and morphological characteristics of the grape fruit, such as fruit color, fruit texture, fruit size, fruit stem length, etc. This information is used as a label, one-to-one correspondence with the two-dimensional image and the three-dimensional scanning model to form a structured sample data set.
[0049] S2. Build and train a phenotypic information extraction model based on the sample dataset.
[0050] The method for obtaining a phenotypic information extraction model includes: preprocessing a sample data set to obtain a preprocessed data set; constructing a neural network model and training the neural network model based on the preprocessed data; and verifying and optimizing the trained model using a cross-validation method to obtain a phenotypic information extraction model.
[0051] Before building the phenotypic information extraction model, the sample data set is first preprocessed, including image normalization, scaling the pixel values of the image to between 0 and 1, and then data enhancement to increase the generalization ability of the model, as well as encoding the label information and converting it into a format recognizable by the model. Next, a neural network model is constructed, and a convolutional neural network (CNN) is selected as the basic model. The structure of the model may include multiple convolutional layers, pooling layers, fully connected layers, and attention mechanism layers to better capture the phenotypic characteristics of grape fruits. Then, the cross entropy loss function and batch gradient descent optimization algorithm are selected to train the convolutional neural network based on the preprocessed data, and hyperparameters such as the learning rate are adjusted to speed up the convergence. After the model training is completed, the cross-validation method is used to verify the model to evaluate the accuracy and stability of the model. Finally, the model is optimized based on the verification results, which may include adjusting the network structure, hyperparameter tuning, or using regularization techniques to reduce overfitting.
[0052] S3. Collect the two-dimensional image and three-dimensional model of the grape fruit to be extracted.
[0053] Specifically, a high-resolution camera is used to perform two-dimensional imaging of the grape fruit to be extracted to obtain a two-dimensional image; a high-precision three-dimensional scanning device is used to perform three-dimensional scanning of the grape fruit to be extracted, and a three-dimensional model is established.
[0054] In this embodiment, when collecting the two-dimensional image of the grape fruit to be extracted, it is necessary to ensure that the camera settings are consistent with those when the sample data set is collected to ensure the consistency of image quality. In addition, appropriate shooting angles and lighting conditions are selected to maximize the capture of the characteristics of the grape fruit. For the collection of the three-dimensional model, a high-precision three-dimensional scanning device is used to ensure that every detail of the grape fruit can be accurately captured during the scanning process, and during the collection process, the grape fruit needs to be fixed or a bracket is used to reduce errors caused by movement or deformation.
[0055] S4. Identify the two-dimensional image and the three-dimensional model based on the phenotypic information extraction model to obtain the phenotypic information of the grape fruit to be extracted.
[0056] In the recognition process, the collected two-dimensional images and three-dimensional models are first input into the trained phenotypic information extraction model. The model will extract and analyze the input images and models to identify the phenotypic characteristics of the grape fruit, such as color, texture and morphology. Specifically, the color and texture characteristics of the grape fruit are identified through the two-dimensional image, and the size and morphological characteristics of the grape fruit are identified through the three-dimensional model. The recognition results will be compared with the labels in the sample data set to evaluate the recognition accuracy of the model. If the recognition results deviate from expectations, the reasons can be further analyzed, such as whether more data is needed for training, or whether the model structure and parameters need to be adjusted. Finally, through the recognition of the model, detailed phenotypic information of the grape fruit to be extracted can be obtained, providing a scientific basis for grape breeding, cultivation and management.
[0057] Embodiment 2
[0058] In this embodiment, an electronic device for extracting phenotypic information of wine grapes includes: a data set construction module, a model construction module, an image acquisition module and an information extraction module.
[0059] The data set construction module is used to obtain a sample two-dimensional image and a sample three-dimensional scanning model of a grape fruit sample, and to construct a sample data set based on the two-dimensional image and the three-dimensional scanning model.
[0060] The data set construction module includes: an initial data acquisition unit, a phenotypic information acquisition unit and a data set construction unit. The initial data acquisition unit is used to obtain a sample two-dimensional image and a sample three-dimensional scanning model of a grape fruit sample; the phenotypic information acquisition unit is used to manually obtain sample phenotypic information of the grape fruit sample, and the sample phenotypic information includes: color information, texture information and morphological information; the data set construction unit is used to add the obtained sample phenotypic information as a label to the sample two-dimensional image and the sample three-dimensional scanning model to obtain a sample data set.
[0061] In this embodiment, the initial data acquisition unit first uses a high-resolution camera to take a two-dimensional image of the grape fruit at different angles and lighting conditions to ensure the image clarity and color accuracy; then, a high-precision three-dimensional scanning device is used to perform a comprehensive scan of the grape fruit to obtain its three-dimensional morphological data; then, the two-dimensional image is preliminarily screened and corrected by the image processing software to remove blurred, overexposed or underexposed images. For the three-dimensional scanning model, the three-dimensional modeling software is used for cleaning and smoothing to ensure the accuracy and integrity of the model. When the phenotypic information acquisition unit manually obtains the sample phenotypic information, it is necessary to record the color distribution, texture characteristics and morphological characteristics of the grape fruit, such as fruit color, fruit texture, fruit size, fruit stem length, etc. The information extraction module uses this information as a label, one-to-one correspondence with the two-dimensional image and the three-dimensional scanning model, to form a structured sample data set.
[0062] The model building module builds and trains a phenotypic information extraction model based on a sample dataset.
[0063] The model building module includes: data preprocessing unit, model training unit and model optimization unit. The data preprocessing unit is used to preprocess the sample data set to obtain the preprocessed data set; the model training unit is used to build a neural network model and train the neural network model based on the preprocessed data; the model optimization unit uses the cross-validation method to verify and optimize the trained model to obtain a phenotypic information extraction model.
[0064] In the present embodiment, the data preprocessing unit first preprocesses the sample data set, including normalization of the image, scaling the pixel value of the image to between 0 and 1, and then performing data enhancement to increase the generalization ability of the model, and encoding the label information and converting it into a format recognizable by the model. When constructing the neural network model, the model training unit selects a convolutional neural network (CNN) as the basic model, and the structure of the model may include multiple convolutional layers, pooling layers, fully connected layers, and attention mechanism layers to better capture the phenotypic characteristics of grape fruits. Then, a cross entropy loss function and a batch gradient descent optimization algorithm are selected to train the convolutional neural network based on the preprocessed data, and hyperparameters such as the learning rate are adjusted to accelerate the convergence speed. After the model training is completed, the model optimization unit verifies the model using a cross-validation method, evaluates the accuracy and stability of the model, and optimizes the model according to the verification result, which may include adjusting the network structure, hyperparameter tuning, or using regularization techniques to reduce overfitting.
[0065] The image acquisition module is used to acquire the two-dimensional image and three-dimensional model of the grape fruit to be extracted.
[0066] The image acquisition module includes: a two-dimensional acquisition unit and a three-dimensional acquisition unit. The two-dimensional acquisition unit is used to perform two-dimensional imaging on the grape fruit to be extracted to obtain a two-dimensional image; the three-dimensional acquisition unit is used to perform three-dimensional scanning on the grape fruit to be extracted and establish a three-dimensional model.
[0067] In this embodiment, the two-dimensional acquisition unit uses a high-resolution camera. When acquiring the two-dimensional image of the grape fruit to be extracted, it is necessary to ensure that the camera settings are consistent with those when the sample data set is acquired to ensure the consistency of image quality; in addition, appropriate shooting angles and lighting conditions are selected to maximize the capture of the characteristics of the grape fruit. The three-dimensional acquisition unit uses a high-precision three-dimensional scanning device. For the acquisition of the three-dimensional model, it is ensured that every detail of the grape fruit can be accurately captured during the scanning process. In addition, during the acquisition process, the grape fruit needs to be fixed or supported to reduce errors caused by movement or deformation.
[0068] The information extraction module identifies the two-dimensional image and the three-dimensional model based on the phenotypic information extraction model to obtain the phenotypic information of the grape fruit to be extracted.
[0069] In the recognition process, the collected two-dimensional images and three-dimensional models are first input into the trained phenotypic information extraction model. The model will extract and analyze the input images and models to identify the phenotypic characteristics of the grape fruit, such as color, texture and morphology. Specifically, the color and texture characteristics of the grape fruit are identified through the two-dimensional image, and the size and morphological characteristics of the grape fruit are identified through the three-dimensional model. The recognition results will be compared with the labels in the sample data set to evaluate the recognition accuracy of the model. If the recognition results deviate from expectations, the reasons can be further analyzed, such as whether more data is needed for training, or whether the model structure and parameters need to be adjusted. Finally, through the recognition of the model, detailed phenotypic information of the grape fruit to be extracted can be obtained, providing a scientific basis for grape breeding, cultivation and management.
[0070] Embodiment 3
[0071] In this embodiment, a storage medium is further provided, wherein a computer program is stored on the storage medium, and the computer program executes the method for extracting phenotypic information of wine grapes when running.
[0072] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for extracting phenotypic information of wine grapes, characterized in that: The following steps are involved: Acquire a sample two-dimensional image and a sample three-dimensional scanning model of a grape fruit sample, and construct a sample data set based on the two-dimensional image and the three-dimensional scanning model; Constructing and training a phenotypic information extraction model based on the sample data set; Collecting 2D images and 3D models of the grape fruit to be extracted; The two-dimensional image and the three-dimensional model are identified based on the phenotypic information extraction model to obtain the phenotypic information of the grape fruit to be extracted.
2. A method for extracting phenotypic information of wine grapes according to claim 1, characterized in that: The method for constructing the sample data set includes: Manually obtaining sample phenotypic information of the grape fruit sample, wherein the sample phenotypic information includes: color information, texture information and morphological information; The obtained sample phenotype information is used as a label and added to the sample two-dimensional image and the sample three-dimensional scanning model to obtain the sample data set.
3. The method for extracting phenotypic information of wine grapes according to claim 1, characterized in that: The method for obtaining the phenotypic information extraction model comprises: Preprocessing the sample data set to obtain a preprocessed data set; Constructing a neural network model, and training the neural network model based on the preprocessed data; The trained model is verified and optimized using a cross-validation method to obtain the phenotypic information extraction model.
4. The method for extracting phenotypic information of wine grapes according to claim 1, characterized in that: The method for collecting the two-dimensional image and three-dimensional model of the grape fruit to be extracted comprises: Using a high-resolution camera to perform two-dimensional imaging on the grape fruit to be extracted to obtain the two-dimensional image; The grape fruit to be extracted is three-dimensionally scanned by high-precision three-dimensional scanning equipment, and the three-dimensional model is established.
5. An electronic device for extracting phenotypic information of wine grapes, the electronic device applying the extraction method according to any one of claims 1 to 4, characterized in that: include: Dataset building module, model building module, image acquisition module and information extraction module; The data set construction module is used to obtain a sample two-dimensional image and a sample three-dimensional scanning model of a grape fruit sample, and to construct a sample data set based on the two-dimensional image and the three-dimensional scanning model; The model building module builds and trains a phenotypic information extraction model based on the sample data set; The image acquisition module is used to acquire the two-dimensional image and three-dimensional model of the grape fruit to be extracted; The information extraction module identifies the two-dimensional image and the three-dimensional model based on the phenotypic information extraction model to obtain the phenotypic information of the grape fruit to be extracted.
6. The electronic device for extracting phenotypic information of wine grapes according to claim 5, characterized in that: The data set construction module includes: an initial data acquisition unit, a phenotype information acquisition unit and a data set construction unit; The initial data acquisition unit is used to acquire the sample two-dimensional image and the sample three-dimensional scanning model of the grape fruit sample; The phenotypic information acquisition unit is used to manually acquire sample phenotypic information of the grape fruit sample, wherein the sample phenotypic information includes: color information, texture information and morphological information; The data set construction unit is used to add the obtained sample phenotype information as a label to the sample two-dimensional image and the sample three-dimensional scanning model to obtain the sample data set.
7. The electronic device for extracting phenotypic information of wine grapes according to claim 5, characterized in that: The model building module includes: a data preprocessing unit, a model training unit and a model optimization unit; The data preprocessing unit is used to preprocess the sample data set to obtain a preprocessed data set; The model training unit is used to construct a neural network model and train the neural network model based on the preprocessed data; The model optimization unit verifies and optimizes the trained model using a cross-validation method to obtain the phenotypic information extraction model.
8. The electronic device for extracting phenotypic information of wine grapes according to claim 5, characterized in that: The image acquisition module includes: a two-dimensional acquisition unit and a three-dimensional acquisition unit; The two-dimensional acquisition unit is used to perform two-dimensional imaging on the grape fruit to be extracted to obtain the two-dimensional image; The three-dimensional acquisition unit is used to perform three-dimensional scanning on the grape fruit to be extracted and to establish the three-dimensional model.
9. A storage medium, characterized in that: The storage medium stores a computer program, which, when run, executes the method for extracting phenotypic information of wine grapes according to any one of claims 1 to 4.
