A method for determining pollen fertility of sugarcane plants based on a neural network model
By using a neural network model to extract and fuse features from sugarcane plant pollen images and environmental data, the problem of low efficiency in traditional manual detection is solved, enabling rapid and accurate detection of sugarcane plant pollen fertility and meeting the needs of large-scale detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGXI ZHUANG AUTONOMOUS REGION ACAD OF AGRI SCI
- Filing Date
- 2025-03-05
- Publication Date
- 2026-07-17
AI Technical Summary
Traditional methods for manually testing the pollen fertility of sugarcane plants are inefficient and easily affected by subjective factors, making it difficult to meet the needs of large-scale testing.
A neural network-based method was adopted to extract and fuse features by acquiring pollen images and environmental data of sugarcane plants, enhance training samples by image amplification, establish a target loss function for model training, and output pollen fertility detection results.
It enables rapid and accurate detection of pollen fertility in sugarcane plants, improves detection efficiency, meets the needs of large-scale testing, and enhances the reliability of test results.
Smart Images

Figure CN120298832B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of plant cultivation technology, and in particular to a method for determining the pollen fertility of sugarcane plants based on a neural network model. Background Technology
[0002] In the cultivation of sugarcane plants, accurate detection of pollen fertility is crucial for crop breeding and seed quality assessment. Traditional methods for pollen fertility detection mainly rely on manual observation and microscopic analysis. These manual methods have several drawbacks. Manual observation requires highly experienced professionals, is cumbersome and inefficient, and consumes a significant amount of time, making it unsuitable for large-scale testing. Furthermore, human judgment is easily influenced by subjective factors, leading to inconsistent accuracy and reliability of the results.
[0003] Therefore, there is an urgent need for a method for determining the pollen fertility of sugarcane plants based on a neural network model, so as to achieve rapid and accurate detection of sugarcane pollen fertility, save detection time, improve detection efficiency, and meet the needs of large-scale detection. Summary of the Invention
[0004] This invention provides a method for determining the pollen fertility of sugarcane plants based on a neural network model. This method can quickly and accurately determine the pollen fertility of sugarcane plants, and then use the pollen fertility of sugarcane plants to achieve crop breeding and seed quality assessment of sugarcane, thereby effectively improving agricultural production efficiency.
[0005] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:
[0006] In a first aspect, a method for determining pollen fertility of sugarcane plants based on a neural network model is provided. The method includes: acquiring a first training sample set, which includes multiple first training samples. Each first training sample includes a pollen image of a sugarcane plant, environmental data, and pollen fertility detection results. The environmental data includes temperature, humidity, and light intensity at the time the pollen image was acquired. The pollen fertility detection results include high fertility, low fertility, or sterility. The method also includes performing image augmentation operations on the pollen images included in the multiple first training samples to obtain a second training sample set. The image augmentation operations include image rotation, image flipping, image scaling, or image noise addition. The second training sample set includes multiple second training samples. Each second training sample includes pollen images of sugarcane plants obtained through image amplification, environmental data, and pollen fertility detection results, which include high fertility, low fertility, or sterility. The neural network model is trained based on the first and second training sample sets to obtain a trained neural network model. The data to be detected is acquired, which includes pollen images of the target sugarcane plant and environmental data. The data to be detected is input into the trained neural network model, which outputs the pollen fertility detection results of the target sugarcane plant, which include high fertility, low fertility, or sterility.
[0007] In one possible implementation of the first aspect, the neural network model is trained according to a first training sample set and a second training sample set to obtain a trained neural network model, including: establishing a target loss function with temperature, humidity and light intensity as constraints; and training the neural network model according to the first training sample set and the second training sample set based on the target loss function to obtain a trained neural network model.
[0008] The target loss function L is:
[0009] L=L1+λ1L 温度 +λ2L 湿度 +λ3L 光照强度 ;
[0010]
[0011] L1 is the cross-entropy loss function, L 温度 For the temperature constraint term, L 湿度 L is a humidity constraint term. 光照强度 The light intensity constraint term is λ1, λ2, and λ3, which are weighting coefficients, N is the number of training samples, and T is the weighting coefficient. i H represents the temperature value of the i-th training sample. i Let L be the humidity value of the i-th training sample. i Let be the illumination intensity value of the i-th training sample.
[0012] In one possible implementation of the first aspect, the neural network model includes: an image data processing module, an environmental data processing module, a feature vector fusion module, and a detection module; the image data processing module and the environmental data processing module are respectively connected to the feature vector fusion module, and the feature vector fusion module is connected to the detection module; the image data processing module is used to extract features from pollen images included in the data to be detected to obtain a first feature vector corresponding to the pollen image; the environmental data processing module is used to extract features from environmental data included in the data to be detected to obtain a second feature vector corresponding to the environmental data; the feature vector fusion module is used to fuse the first feature vector and the second feature vector to obtain a fused feature vector; the detection module is used to determine the pollen fertility detection result of the target sugarcane plant based on the fused feature vector, and the pollen fertility detection result includes high fertility, low fertility, or sterility.
[0013] In one possible implementation of the first aspect, the aforementioned neural network model further includes: an attention mechanism layer, which is connected to the feature vector fusion module and the detection module respectively; the attention mechanism layer is used to perform weighted summation on the fused feature vector based on the attention mechanism to obtain a weighted feature vector and the attention weight corresponding to each feature included in the data to be detected, the features including pollen image, temperature, humidity or light intensity; the detection module is also used to determine the pollen fertility detection result of the target sugarcane plant based on the weighted feature vector.
[0014] In one possible implementation of the first aspect, the pollen fertility detection result also includes a contribution score for each feature included in the data to be detected, the contribution score being used to determine the degree of contribution of the standard feature to the pollen fertility detection result; the method further includes: determining the attention weight corresponding to each feature as the contribution score of each feature.
[0015] In one possible implementation of the first aspect, acquiring the data to be detected includes: acquiring a pollen image of a target sugarcane plant at a target time using an image acquisition device; acquiring the temperature, humidity, and light intensity of the target sugarcane plant at each of multiple times using a sensor; and determining the temperature, humidity, and light intensity of the target sugarcane plant at the target time as the environmental data of the target sugarcane plant.
[0016] The beneficial effects of this invention are as follows: The method provided by this invention acquires multimodal data of the target sugarcane plant, namely, pollen image data and environmental data of the target sugarcane plant. Then, it uses a neural network model to extract and fuse features from the pollen image data and environmental data, and determines the pollen fertility detection result of the target sugarcane plant based on the obtained fused feature vector. Therefore, it can achieve rapid and accurate detection of pollen fertility of sugarcane plants. Compared with manual detection methods, it can effectively save detection time, improve detection efficiency, and meet the needs of large-scale detection of sugarcane pollen fertility. Furthermore, the method provided by this invention, by performing augmentation operations on the training samples included in the first training sample set, can train the neural network model even with a limited number of training samples, thereby achieving rapid and accurate detection of pollen fertility.
[0017] Secondly, the present invention provides a system for determining the pollen fertility of sugarcane plants based on a neural network model. The system includes: an acquisition unit for acquiring a first training sample set, the first training sample set including multiple first training samples, each first training sample including a pollen image of a sugarcane plant, environmental data, and a pollen fertility detection result; the environmental data including temperature, humidity, and light intensity at the time of acquiring the pollen image; and the pollen fertility detection result including high fertility, low fertility, or sterility; and an augmentation unit for performing image augmentation operations on the pollen images included in the multiple first training samples to obtain a second training sample set, wherein the image augmentation operation includes image rotation, image flipping, image scaling, or image noise addition operations. The training sample set includes multiple second training samples. Each second training sample includes a pollen image of a sugarcane plant obtained through image amplification, environmental data, and pollen fertility detection results, which include high fertility, low fertility, or sterility. The training unit is used to train the neural network model based on the first and second training sample sets to obtain a trained neural network model. The acquisition unit is also used to acquire the data to be detected, which includes pollen images and environmental data of the target sugarcane plant. The detection unit is used to input the data to be detected into the trained neural network model and output the pollen fertility detection results of the target sugarcane plant, which include high fertility, low fertility, or sterility.
[0018] In one possible implementation of the second aspect, the training unit is specifically used to: establish a target loss function with temperature, humidity and light intensity as constraints; and train the neural network model based on the target loss function, according to the first training sample set and the second training sample set, to obtain the trained neural network model.
[0019] The target loss function L is:
[0020] L=L1+λ1L 温度 +λ2L湿度 +λ3L 光照强度
[0021]
[0022] L1 is the cross-entropy loss function, L 温度 For the temperature constraint term, L 湿度 L is a humidity constraint term. 光照强度 The light intensity constraint term is λ1, λ2, and λ3, which are weighting coefficients, N is the number of training samples, and T is the weighting coefficient. i H represents the temperature value of the i-th training sample. i Let L be the humidity value of the i-th training sample. i Let be the illumination intensity value of the i-th training sample.
[0023] In one possible implementation of the second aspect, the neural network model includes: an image data processing module, an environment data processing module, a feature vector fusion module, and a detection module; the image data processing module and the environment data processing module are respectively connected to the feature vector fusion module, and the feature vector fusion module is connected to the detection module; the image data processing module is used to extract features from the pollen image included in the data to be detected to obtain a first feature vector corresponding to the pollen image; the environment data processing module is used to extract features from the environment data included in the data to be detected to obtain a second feature vector corresponding to the environment data;
[0024] The feature vector fusion module is used to fuse the first feature vector and the second feature vector to obtain the fused feature vector; the detection module is used to determine the pollen fertility detection result of the target sugarcane plant based on the fused feature vector, and the pollen fertility detection result includes high fertility, low fertility or sterility.
[0025] The neural network model also includes: an attention mechanism layer, which is connected to the feature vector fusion module and the detection module respectively; the attention mechanism layer is used to perform weighted summation on the fused feature vector based on the attention mechanism to obtain a weighted feature vector and the attention weight corresponding to each feature included in the data to be detected, the features including pollen image, temperature, humidity or light intensity; the detection module is also used to determine the pollen fertility detection result of the target sugarcane plant based on the weighted feature vector.
[0026] Thirdly, an electronic device is provided, the electronic device including a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method as described in any implementation of the first aspect.
[0027] Fourthly, a computer-readable storage medium is provided, including computer instructions that, when executed on an electronic device, cause the electronic device to perform a method as described in any implementation of the first aspect.
[0028] Fifthly, a computer program product is provided that, when run on a computer, causes the computer to perform the methods as described in any implementation of the first aspect.
[0029] Understandably, the beneficial effects achieved by the system of the second aspect, the electronic device of the third aspect, the computer-readable storage medium of the fourth aspect, and the computer program product of the fifth aspect provided above can be referred to with reference to the beneficial effects of the first aspect and any of its possible design embodiments, which will not be repeated here. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention;
[0031] Figure 2 This is a flowchart illustrating a method for determining pollen fertility of sugarcane plants based on a neural network model, as shown in an embodiment of the present invention.
[0032] Figure 3 This is a schematic diagram of the hardware structure of a neural network model according to an embodiment of the present invention;
[0033] Figure 4 This is a schematic diagram of the hardware structure of another neural network model shown in an embodiment of the present invention;
[0034] Figure 5 This is a schematic diagram of the hardware structure of a determination system according to an embodiment of the present invention. Detailed Implementation
[0035] The technical solutions of the embodiments of the present invention will be described below with reference to the accompanying drawings. In the description of the present invention, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. The "or" in the present invention is merely a description of the relationship between the related objects, indicating that three relationships can exist. For example, A or B can represent: A alone, A and B simultaneously, and B alone. A and B can be singular or plural. Furthermore, in the description of the present invention, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items.
[0036] Furthermore, to facilitate a clear description of the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0037] In this embodiment of the invention, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in this embodiment of the invention should not be construed as superior or more advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner for ease of understanding.
[0038] In the cultivation of sugarcane plants, accurate detection of pollen fertility is crucial for crop breeding and seed quality assessment. Traditional methods for pollen fertility detection mainly rely on manual observation and microscopic analysis. These manual methods have several drawbacks. Manual observation requires highly experienced professionals, is cumbersome and inefficient, and consumes a significant amount of time, making it unsuitable for large-scale testing. Furthermore, human judgment is easily influenced by subjective factors, leading to inconsistent accuracy and reliability of the results.
[0039] Therefore, there is an urgent need for a method for determining the pollen fertility of sugarcane plants based on a neural network model, so as to achieve rapid and accurate detection of sugarcane pollen fertility, save detection time, improve detection efficiency, and meet the needs of large-scale detection.
[0040] In view of this, embodiments of the present invention provide a method for determining pollen fertility of sugarcane plants based on a neural network model. The method includes: acquiring a first training sample set, which includes multiple first training samples. Each first training sample includes a pollen image of a sugarcane plant, environmental data, and pollen fertility detection results. The environmental data includes temperature, humidity, and light intensity at the time the pollen image was acquired. The pollen fertility detection results include high fertility, low fertility, or sterility. The method also includes performing image augmentation operations on the pollen images included in the multiple first training samples to obtain a second training sample set. The image augmentation operations include image rotation, image flipping, image scaling, or image noise addition. The operation involves a second training sample set comprising multiple second training samples, each including a pollen image of a sugarcane plant obtained through image amplification, environmental data, and pollen fertility detection results, which may be classified as high fertility, low fertility, or sterility. A neural network model is trained based on the first and second training sample sets to obtain a trained neural network model. Data to be detected is acquired, including pollen images and environmental data of the target sugarcane plant. This data is then input into the trained neural network model, which outputs the pollen fertility detection results of the target sugarcane plant, which may be classified as high fertility, low fertility, or sterility.
[0041] The method provided by this invention acquires multimodal data of the target sugarcane plant, namely pollen image data and environmental data of the target sugarcane plant. Then, it uses a neural network model to extract and fuse features from the pollen image data and environmental data. Based on the obtained fused feature vector, it determines the pollen fertility detection result of the target sugarcane plant. Therefore, it can achieve rapid and accurate detection of pollen fertility of sugarcane plants. Compared with manual detection, it can effectively save detection time, improve detection efficiency, and meet the needs of large-scale detection of pollen fertility of sugarcane.
[0042] In some embodiments, the method for determining pollen fertility of sugarcane plants based on a neural network model provided in this invention can be executed by a system 100 for determining pollen fertility of sugarcane plants based on a neural network model (hereinafter referred to as the determination system 100). As an example, the determination system 100 can be any electronic device 200 with data processing capabilities, such as a general-purpose computer, personal computer, laptop computer, switch, or tablet computer, etc. The specific implementation of the determination system 100 is not limited here.
[0043] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention is shown. The electronic device 200 includes a processor 210, a memory 220, and a communication interface 230.
[0044] Processor 210 may include one or more processing cores. Processor 210 connects to various parts within electronic device 200 using various interfaces and lines, and performs various functions and processes data of electronic device 200 by running or executing instructions, programs, code sets, or instruction sets stored in memory 220, and by calling data stored in memory 220. Optionally, processor 210 may be implemented using at least one of the following hardware forms: Central Processing Unit (CPU), Graphics Processing Unit (GPU), Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA).
[0045] The memory 220 may include random access memory (RAI) or read-only memory (ROI). Optionally, the memory 220 may include non-transitory computer-readable storage ledger. The memory 220 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 220 may include a stored program area. The stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as data acquisition functions, model training functions, etc.), and instructions for implementing the various method embodiments described above.
[0046] The communication interface 230 is used to communicate with other devices, equipment, or communication networks, such as data storage devices, image processing devices, or Ethernet, wireless access networks (RAN), wireless local area networks (WLAN), etc.
[0047] In terms of physical implementation, the aforementioned devices (such as processor 210, memory 220, and communication interface 230) can each be devices within the same device (such as a laptop computer). Alternatively, at least two of these devices can be located within the same device, i.e., as different devices within the same device, similar to the deployment of devices or components in a distributed system.
[0048] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 200. In other embodiments of the present invention, the electronic device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0049] The following description, in conjunction with the accompanying drawings, illustrates a method for determining pollen fertility of sugarcane plants based on a neural network model, as provided in an embodiment of the present invention.
[0050] Figure 2 This is a flowchart illustrating a method for determining pollen fertility of sugarcane plants based on a neural network model, provided in an embodiment of the present invention. Optionally, this method can be... Figure 1 The illustrated electronic device 200 performs the operation, that is, the system 100 determines the operation. The method may include the following steps:
[0051] S1. Obtain the first training sample set, which includes multiple first training samples.
[0052] Specifically, each first training sample includes pollen images of sugarcane plants, environmental data, and pollen fertility test results. The pollen images of sugarcane plants are obtained through a high-resolution microscope, and each pollen image includes pollen grains from multiple sugarcane plants.
[0053] The environmental data includes temperature, humidity, and light intensity at the time the pollen images were acquired. The system obtains temperature using a temperature sensor set within a preset range around the sugarcane plant; humidity using a humidity sensor set within a preset range around the sugarcane plant; and light intensity using a light intensity sensor set within a preset range around the sugarcane plant.
[0054] Pollen fertility testing results include high fertility, low fertility, or sterility. It's important to note that sugarcane fertility refers to the sugarcane plant's ability to reproduce sexually, that is, its capacity to produce fertile seeds or offspring through sexual reproduction. High fertility indicates a high capacity for sexual reproduction, low fertility indicates a low capacity for sexual reproduction, and sterility indicates that the sugarcane plant lacks the capacity for sexual reproduction.
[0055] S2. Perform image augmentation on multiple pollen images included in the first training samples to obtain the second training sample set.
[0056] The image augmentation operation includes image rotation, image flipping, image scaling, or image noise addition. The second training sample set includes multiple second training samples. Each second training sample includes pollen images of sugarcane plants obtained from the image augmentation operation, environmental data, and pollen fertility detection results. The pollen fertility detection results include high fertility, low fertility, or sterility.
[0057] Specifically, each second training sample corresponds to a first training sample. The pollen image of each second training sample is obtained by performing image amplification operation based on the pollen image of the corresponding first training sample. The environmental data and pollen fertility detection results of each second training sample are the same as those of the first training sample corresponding to this second training sample.
[0058] The following example illustrates the process of determining the second training sample set. The first training sample includes pollen image a, environmental data a, and pollen fertility detection result a. The determination system performs image amplification on pollen image a to obtain pollen image b, pollen image c, and pollen image d. Then, the determination system obtains the second training sample b based on pollen image b, environmental data a, and pollen fertility detection result a; obtains the second training sample c based on pollen image c, environmental data a, and pollen fertility detection result a; obtains the second training sample d based on pollen image d, environmental data a, and pollen fertility detection result a; and finally, the second training sample set is obtained based on the second training sample b, the second training sample c, and the second training sample d.
[0059] It should be understood that the above image augmentation operations are merely illustrative examples. The embodiments of the present invention do not impose any particular restrictions on the specific implementation of the image augmentation operations. The system can obtain a larger number of second training samples corresponding to the first training sample through any operation, thereby obtaining the second training sample set.
[0060] S3. Train the neural network model based on the first training sample set and the second training sample set to obtain the trained neural network model;
[0061] In some embodiments, training a neural network model based on a first training sample set and a second training sample set to obtain a trained neural network model includes:
[0062] A target loss function is established with temperature, humidity, and light intensity as constraints.
[0063] Based on the target loss function, the neural network model is trained using the first training sample set and the second training sample set to obtain the trained neural network model.
[0064] The target loss function L is:
[0065] L=L1+λ1L 温度 +λ2L 湿度 +λ3L 光照强度
[0066]
[0067] L1 is the cross-entropy loss function, L 温度 For the temperature constraint term, L 湿度 L is a humidity constraint term. 光照强度 The light intensity constraint term is λ1, λ2, and λ3, which are weighting coefficients, N is the number of training samples, and T is the weighting coefficient. i H represents the temperature value of the i-th training sample. i Let L be the humidity value of the i-th training sample. i Let be the illumination intensity value of the i-th training sample.
[0068] It should be understood that the actual values of the weight coefficients λ1, λ2, and λ3 can be flexibly set according to the user's actual usage scenario. This embodiment of the invention does not impose any special restrictions on the specific implementation of the weight coefficients λ1, λ2, and λ3.
[0069] Specifically, in the temperature constraint term, 35 and 10 are the upper and lower temperature thresholds, respectively, in degrees Celsius. The temperature constraint term is used to constrain the temperature range. During the growth of sugarcane plants, high temperatures can cause pollen inactivation or abnormal development, reducing fertility. Low temperatures can slow down pollen physiological activity and even cause frost damage, also reducing fertility. Therefore, when the temperature is above 35 degrees Celsius, a penalty for loss needs to be increased; similarly, when the temperature is below 10 degrees Celsius, a penalty for loss also needs to be increased.
[0070] In one example, the environmental temperature values for the five training samples are 36, 25, 8, 12, and 40 degrees Celsius. Specifically, at a temperature of 36 degrees Celsius, max(36-35,0) = 1 and max(10-36,0) = 0; at a temperature of 8 degrees Celsius, max(8-35,0) = 0 and max(10-8,0) = 2. 温度 =1+0+2+0+5 / 5=1.6.
[0071] Specifically, in the humidity constraint, 80 and 30 are the upper and lower limit thresholds for temperature, respectively, expressed as a percentage, used to constrain the humidity range. During the growth of sugarcane plants, high humidity causes pollen to absorb water, swell, and even rupture, affecting its activity and fertilization ability. Low humidity causes pollen to dehydrate and become inactive, similarly reducing fertility. Therefore, when the humidity is greater than 80%, a penalty for loss needs to be increased; similarly, when the humidity is less than 30%, a penalty for loss also needs to be increased.
[0072] In one example, the humidity values of the environmental data for the five training samples were 85, 25, 40, 90, and 30, respectively. 湿度 =5+5+10+0+0 / 5=4.
[0073] Specifically, in the light intensity constraint, 1000 is the lower limit threshold for temperature, in units of l. ux This is used to constrain the range of light intensity. During the growth of sugarcane plants, light is a key factor for photosynthesis, affecting pollen development and fertility. Insufficient light leads to poor pollen development, reducing its activity and fertilization capacity. Therefore, when the light intensity is less than 1000, a loss penalty needs to be increased.
[0074] In one example, the ambient light intensity values for the five training samples were 1200, 800, 1500, 500, and 1000, respectively. 光照强度 =0+200+0+500+0 / 5=140.
[0075] It should be noted that the above target loss function is only an example. The method provided in this embodiment of the invention can also establish a target loss function based on more or fewer parameters as constraints. For example, the expression mode of the target gene of sugarcane plant can be used as a constraint.
[0076] The method provided in this invention establishes constraints based on temperature, humidity, and light intensity, which enables the neural network model to pay more attention to key biological influencing factors during training, thereby improving the scientific validity and accuracy of its predictions.
[0077] S4. Obtain the data to be detected, which includes pollen images of the target sugarcane plant and environmental data.
[0078] In some embodiments, acquiring the data to be detected includes: acquiring a pollen image of a target sugarcane plant at a target time using an image acquisition device; acquiring the temperature, humidity, and light intensity of the target sugarcane plant at each of multiple times using a sensor; and determining the temperature, humidity, and light intensity of the target sugarcane plant at the target time as the environmental data of the target sugarcane plant.
[0079] S5. Input the data to be detected into the trained neural network model and output the pollen fertility detection results of the target sugarcane plant. The pollen fertility detection results include high fertility, low fertility, or sterility.
[0080] In one possible implementation, see Figure 3The neural network model 300 includes: an image data processing module 310, an environmental data processing module 320, a feature vector fusion module 330, and a detection module 340; the image data processing module 310 and the environmental data processing module 320 are respectively connected to the feature vector fusion module 330, and the feature vector fusion module 330 is connected to the detection module 340; the image data processing module 310 is used to extract features from pollen images included in the data to be detected to obtain a first feature vector corresponding to the pollen image; the environmental data processing module 320 is used to extract features from environmental data included in the data to be detected to obtain a second feature vector corresponding to the environmental data; the feature vector fusion module 330 is used to fuse the first feature vector and the second feature vector to obtain a fused feature vector; the detection module 340 is used to determine the pollen fertility detection result of the target sugarcane plant based on the fused feature vector, and the pollen fertility detection result includes high fertility, low fertility, or sterility;
[0081] In some embodiments, see Figure 4 The neural network model 300 also includes: an attention mechanism layer 350, which is connected to the feature vector fusion module 330 and the detection module 340 respectively; the attention mechanism layer 350 is used to perform weighted summation on the fused feature vector based on the attention mechanism to obtain a weighted feature vector and the attention weight corresponding to each feature included in the data to be detected, the features including pollen image, temperature, humidity or light intensity; the detection module 340 is also used to determine the pollen fertility detection result of the target sugarcane plant based on the weighted feature vector.
[0082] As can be seen from the above, the attention mechanism performs a weighted summation of the fused feature vectors based on the weight matrix, which can accurately capture the importance of each feature and effectively improve the performance of the neural network model. Furthermore, through the attention mechanism, it can accurately distinguish the importance of each feature (image, temperature, humidity, and light intensity) to the pollen fertility detection results, thus meeting the usage requirements of the neural network model in different application scenarios.
[0083] As described in S1-S5 above, the method provided by this invention acquires multimodal data of the target sugarcane plant, namely, pollen image data and environmental data of the target sugarcane plant. Then, it uses a neural network model to extract and fuse features from the pollen image data and environmental data. Based on the obtained fused feature vector, it determines the pollen fertility detection result of the target sugarcane plant. Therefore, it can achieve rapid and accurate detection of sugarcane pollen fertility. Compared with manual detection, it can effectively save detection time, improve detection efficiency, and meet the needs of large-scale detection of sugarcane pollen fertility. Furthermore, the method provided by this invention, by augmenting the training samples included in the first training sample set, can train the neural network model even with a limited number of training samples, thereby achieving rapid and accurate detection of pollen fertility.
[0084] In one possible implementation, the pollen fertility test results also include a contribution score for each feature included in the data to be tested, the contribution score indicating the degree of contribution of the standard feature to the pollen fertility test results.
[0085] The method provided in this embodiment of the invention further includes:
[0086] The attention weight corresponding to each feature is determined as the contribution score of each feature.
[0087] In this way, the method provided by the embodiments of the present invention can determine the contribution score of each feature. Users can determine the degree of contribution of each feature to the pollen fertility detection results of the target sugarcane plant based on the contribution score of each feature, thereby increasing the interpretability of the pollen fertility detection results output by the neural network model and meeting the user's needs in different usage scenarios.
[0088] The foregoing primarily describes the solutions of the embodiments of the present invention from a methodological perspective. It is understood that, to achieve the aforementioned functions, the system 100 includes at least one of the hardware structures and software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present invention.
[0089] In this embodiment of the invention, the system 100 can be divided into functional units according to the above method example. For example, the system 100 can be divided into functional units corresponding to various functions, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0090] For example, Figure 5 This diagram illustrates a hardware structure of a determination system according to an embodiment of the present invention. The determination system 100 includes: an acquisition unit 110, configured to acquire a first training sample set, the first training sample set including multiple first training samples, each first training sample including a pollen image of a sugarcane plant, environmental data, and pollen fertility detection results; the environmental data including temperature, humidity, and light intensity at the time of acquiring the pollen image; and the pollen fertility detection results including high fertility, low fertility, or sterility; and an augmentation unit 120, configured to perform image augmentation operations on the pollen images included in the multiple first training samples to obtain a second training sample set, wherein the image augmentation operations include image rotation, image flipping, image scaling, or image noise addition operations; and the second training sample set including multiple second training samples, each... The second training sample includes pollen images of sugarcane plants obtained through image amplification, environmental data, and pollen fertility detection results, which include high fertility, low fertility, or sterility. The training unit 130 is used to train the neural network model based on the first and second training sample sets to obtain a trained neural network model. The acquisition unit 110 is also used to acquire the data to be detected, which includes pollen images of the target sugarcane plant and environmental data. The detection unit 140 is used to input the data to be detected into the trained neural network model and output the pollen fertility detection results of the target sugarcane plant, which include high fertility, low fertility, or sterility.
[0091] Optionally, the training unit 130 is specifically used to: establish a target loss function with temperature, humidity and light intensity as constraints; and train the neural network model based on the target loss function, according to the first training sample set and the second training sample set, to obtain the trained neural network model.
[0092] The target loss function L is:
[0093] L=L1+λ1L 温度 +λ2L 湿度 +λ3L 光照强度
[0094]
[0095] L1 is the cross-entropy loss function, L 温度 For the temperature constraint term, L 湿度 L is a humidity constraint term. 光照强度 The light intensity constraint term is λ1, λ2, and λ3, which are weighting coefficients, N is the number of training samples, and T is the weighting coefficient. i H represents the temperature value of the i-th training sample. i Let L be the humidity value of the i-th training sample. i Let be the illumination intensity value of the i-th training sample.
[0096] It should be understood that a detailed description of the above-mentioned optional methods can be found in the foregoing method embodiments, and will not be repeated here. Furthermore, explanations of any of the determination systems 100 provided above, as well as descriptions of their beneficial effects, can be found in the corresponding method embodiments described above, and will not be repeated here.
[0097] This invention also provides a computer-readable storage medium storing at least one computer instruction, which is loaded and executed by a processor to implement the methods of the various embodiments described above. Explanations of the relevant content and descriptions of the beneficial effects of any of the computer-readable storage media provided above can be found in the corresponding embodiments described above, and will not be repeated here.
[0098] This invention also provides a chip. This chip integrates a control circuit for implementing the functions of the aforementioned determining system 100 and one or more ports. Optionally, the functions supported by this chip are as described above and will not be repeated here.
[0099] Those skilled in the art will understand that the program for implementing all or part of the steps of the above embodiments, which can be executed by a program instructing related hardware, can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The processing unit or processor mentioned above can be a central processing unit, a general-purpose processor, an application-specific integrated circuit (ASIC), a microprocessor (DSP), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.
[0100] This invention also provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform any of the methods described in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this invention is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., SSD), etc.
[0101] It should be noted that the devices for storing computer instructions or computer programs provided in the embodiments of the present invention, such as, but not limited to, the aforementioned memory, computer-readable storage medium, and communication chip, are all non-transitory. Those skilled in the art should recognize that the functions described in the embodiments of the present invention in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or code on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers.
[0102] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for determining pollen fertility of sugarcane plants based on a neural network model, characterized in that, The method includes: Obtain a first training sample set, which includes multiple first training samples. Each first training sample includes a pollen image of a sugarcane plant, environmental data, and pollen fertility detection results. The environmental data includes temperature, humidity, and light intensity when the pollen image is acquired. The pollen fertility detection results include high fertility, low fertility, or sterility. Image amplification is performed on the pollen images included in the plurality of first training samples to obtain a second training sample set. The image amplification operation includes image rotation, image flipping, image scaling, or image noise addition. The second training sample set includes a plurality of second training samples. Each second training sample includes a pollen image of a sugarcane plant obtained from the image amplification operation, environmental data, and pollen fertility detection results. The pollen fertility detection results include high fertility, low fertility, or sterility. The neural network model is trained based on the first training sample set and the second training sample set to obtain the trained neural network model. Acquire the data to be detected, which includes pollen images and environmental data of the target sugarcane plant; The data to be detected is input into the trained neural network model, and the pollen fertility detection result of the target sugarcane plant is output. The pollen fertility detection result includes high fertility, low fertility, or sterility. The step of training the neural network model based on the first training sample set and the second training sample set to obtain the trained neural network model includes: A target loss function is established with temperature, humidity, and light intensity as constraints. Based on the target loss function, the neural network model is trained according to the first training sample set and the second training sample set to obtain the trained neural network model. The target loss function L for: ; ; ; ; L 1 represents the cross-entropy loss function. L 温度 For temperature constraints, L 湿度 For humidity constraints, L 光照强度 Here, λ1, λ2, and λ3 are the light intensity constraint terms, and they are the weighting coefficients. N The number of training samples, T i Let i be the temperature value of the i-th training sample. H i Let be the humidity value of the i-th training sample. L i Let be the illumination intensity value of the i-th training sample; The neural network model includes: an image data processing module, an environment data processing module, a feature vector fusion module, and a detection module; the image data processing module and the environment data processing module are respectively connected to the feature vector fusion module, and the feature vector fusion module is connected to the detection module; The image data processing module is used to extract features from the pollen image included in the data to be detected, and obtain a first feature vector corresponding to the pollen image; The environmental data processing module is used to extract features from the environmental data included in the data to be detected, and obtain a second feature vector corresponding to the environmental data. The feature vector fusion module is used to fuse the first feature vector and the second feature vector to obtain a fused feature vector. The detection module is used to determine the pollen fertility detection result of the target sugarcane plant based on the fused feature vector, wherein the pollen fertility detection result includes high fertility, low fertility, or sterility. The neural network model further includes an attention mechanism layer, which is connected to the feature vector fusion module and the detection module respectively. The attention mechanism layer is used to perform a weighted summation of the fused feature vector based on the attention mechanism to obtain a weighted feature vector and an attention weight corresponding to each feature included in the data to be detected. The features include pollen image, temperature, humidity or light intensity. The detection module is also used to determine the pollen fertility detection result of the target sugarcane plant based on the weighted feature vector; The pollen fertility detection results also include a contribution score for each feature included in the data to be detected, the contribution score being used to characterize the degree of contribution of the feature to the pollen fertility detection results; The method further includes: The attention weight corresponding to each feature is determined as the contribution score of each feature.
2. The method according to claim 1, characterized in that, The acquisition of the data to be detected includes: The image acquisition device acquires pollen images of the target sugarcane plant at a target time. The temperature, humidity, and light intensity of the target sugarcane plant at each of multiple moments are obtained using sensors. The temperature, humidity, and light intensity of the target sugarcane plant at the target time are determined as the environmental data of the target sugarcane plant.
3. A system for determining pollen fertility of sugarcane plants based on a neural network model, applied to the method described in any one of claims 1-2, characterized in that, The system includes: The acquisition unit is used to acquire a first training sample set, which includes multiple first training samples. Each first training sample includes a pollen image of a sugarcane plant, environmental data, and pollen fertility detection results. The environmental data includes temperature, humidity, and light intensity when the pollen image is acquired. The pollen fertility detection results include high fertility, low fertility, or sterility. An augmentation unit is used to perform image augmentation operations on the pollen images included in the plurality of first training samples to obtain a second training sample set. The image augmentation operations include image rotation, image flipping, image scaling, or image noise addition operations. The second training sample set includes a plurality of second training samples. Each second training sample includes a pollen image of a sugarcane plant obtained from the image augmentation operation, environmental data, and pollen fertility detection results. The pollen fertility detection results include high fertility, low fertility, or sterility. The training unit is used to train the neural network model based on the first training sample set and the second training sample set to obtain the trained neural network model. The acquisition unit is also used to acquire data to be detected, which includes pollen images and environmental data of the target sugarcane plant. The detection unit is used to input the data to be detected into the trained neural network model and output the pollen fertility detection result of the target sugarcane plant, wherein the pollen fertility detection result includes high fertility, low fertility or sterility. The training unit is specifically used for: A target loss function is established with temperature, humidity, and light intensity as constraints. Based on the target loss function, the neural network model is trained according to the first training sample set and the second training sample set to obtain the trained neural network model. The target loss function L for: ; ; ; ; L 1 represents the cross-entropy loss function. L 温度 For temperature constraints, L 湿度 For humidity constraints, L 光照强度 Here, λ1, λ2, and λ3 are the light intensity constraint terms, and they are the weighting coefficients. N The number of training samples, T i Let i be the temperature value of the i-th training sample. H i Let be the humidity value of the i-th training sample. L i Let be the illumination intensity value of the i-th training sample.
4. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method for determining pollen fertility of sugarcane plants based on a neural network model as described in any one of claims 1-2.