Soybean phenotype recognition method, electronic device, and medium based on image phenotype matching
Through image phenotype matching technology, neural networks are used to identify multiple phenotypic characteristics of soybeans, which solves the problems of traditional manual measurement being time-consuming and labor-intensive and the insufficient identification of existing technologies, achieving efficient and accurate identification of soybean phenotypes, and improving Efficiency and accuracy of soybean variety selection.
Patent Information
- Application Number
- CN202410704308.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-03
AI Technical Summary
Traditional soybean phenotypic measurement relies on manual operations, which is time-consuming, labor-intensive, and unsystematic. Existing neural network technology can only identify the number and type of pods, but cannot fully identify soybean phenotypes, affecting the efficiency and accuracy of soybean variety breeding.
A soybean phenotype recognition method based on image phenotype matching is used to obtain soybean maturity images, train the image encoder and phenotype decoder, and use neural networks such as ResNet50, ViT, and DETR to extract image features and phenotypic features, combined with Transformer, Network optimization such as RNN and LSTM enables end-to-end identification of multiple soybean phenotypes.
It achieves the accurate identification of multiple phenotypes such as soybean plant height, bottom pod height, and number of pod nodes, improves the efficiency and accuracy of soybean variety breeding, and reduces the reliance on manual measurement.
Smart Images

Figure CN118279610B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of agricultural breeding, and in particular relates to a soybean phenotype recognition method based on image phenotype matching, electronic equipment, and medium. Background Art
[0002] Soybean is one of the main oil crops in the world and an important agricultural cash crop. The yield of soybean is closely related to phenotypes such as plant height, number of nodes, number of pods, and number of grains. Therefore, measuring crop phenotypes is a very important part of agricultural breeding.
[0003] Traditional phenotypic measurement is usually done manually, with professionals observing, measuring and recording various complex phenotypes of crops. This requires a lot of manpower, material resources and time, and it is difficult to systematically evaluate the accuracy of manual measurements, which seriously affects the breeding process of new soybean varieties.
[0004] At present, the existing technology of target detection through neural network can only identify the number and type of pods, and cannot identify all phenotypes required for soybean phenotypic measurement, which affects the efficiency and accuracy of soybean variety breeding.
[0005] Therefore, it is urgent to propose a soybean phenotype identification method to overcome the above technical problems. Summary of the invention
[0006] In view of the shortcomings of the prior art, the present invention provides a soybean phenotype recognition method, electronic equipment and medium based on image phenotype matching.
[0007] In a first aspect, an embodiment of the present invention provides a soybean phenotype recognition method based on image phenotype matching, the method comprising:
[0008] Get the soybean image to be identified;
[0009] Input the soybean image to be identified into a pre-trained image encoder to extract image features;
[0010] The image features are input into a pre-trained phenotype decoder to obtain the phenotype result corresponding to the soybean image to be identified;
[0011] The training process of the image encoder and the phenotype decoder includes:
[0012] Obtain soybean maturity images; set phenotype labels and array labels for each soybean maturity image;
[0013] Input the soybean maturity image and its corresponding phenotypic label into the image encoder and the phenotypic encoder respectively, so as to train the image encoder and the phenotypic encoder;
[0014] The network weights of the phenotype encoder are fixed; the phenotype label is input into the phenotype encoder to extract the phenotypic feature, the phenotypic feature is input into the phenotype decoder to extract the phenotypic result recognition feature, and the phenotype decoder is optimized by back propagation based on the difference between the phenotypic result recognition feature and the array label.
[0015] Furthermore, setting a phenotype label and an array label for each soybean maturity stage image includes:
[0016] Count the phenotypes of each soybean maturity image, the phenotypes include: plant height, bottom pod height, number of nodes without pods, number of nodes with pods, number of branches, number of zero pods, number of one pod, number of two pods, number of three pods, number of four pods;
[0017] The phenotypic labels corresponding to each soybean maturity image are: plant height y1 cm, bottom pod height y2 cm, number of nodes without pods y3, number of nodes with pods y4, number of branches y5, number of zero pods y6, number of one pod y7, number of two pods y8, number of three pods y9, number of four pods y 10 indivual;
[0018] The array label Y=[y1,y2, y3, y4, y5, y6, y7, y8, y9,y 10 ].
[0019] Furthermore, the soybean maturity image and its corresponding phenotypic label are respectively input into the image encoder and the phenotypic encoder, so that the training of the image encoder and the phenotypic encoder includes:
[0020] Input the soybean maturity image into the image encoder to obtain image features;
[0021] The phenotypic labels corresponding to the soybean maturity images are input into the phenotypic encoder to obtain the phenotypic characteristics;
[0022] The image features are multiplied by the phenotypic features to obtain the feature matrix;
[0023] The first loss function is calculated based on the feature matrix and the unit matrix, and the back propagation method is used through the first loss function to optimize and update the parameters of the image encoder and the phenotype encoder respectively.
[0024] Furthermore, the optimization process of the phenotype decoder includes:
[0025] Input the phenotypic label into the phenotypic encoder to extract the phenotypic characteristics;
[0026] Inputting the phenotypic features into the phenotypic decoder to extract the phenotypic result identification features;
[0027] The second loss function is calculated based on the recognition features of the phenotypic results and the array labels, and the parameters of the phenotypic decoder are optimized and updated using the back propagation method through the second loss function.
[0028] Furthermore, the image encoder selects ResNet50 residual neural network, ViT visual converter neural network or DETR detection converter neural network.
[0029] Furthermore, the phenotype encoder and phenotype decoder use a Transformer converter neural network with an attention mechanism, an RNN recurrent neural network, and an LSTM long short-term memory artificial neural network.
[0030] Furthermore, the numerical value of each dimension in the phenotypic results obtained from the soybean image represents the identified plant height, bottom pod height, number of nodes without pods, number of nodes with pods, number of branches, number of zero-seed pods, number of one-seed pods, number of two-seed pods, number of three-seed pods, and number of four-seed pods, respectively.
[0031] In a second aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-mentioned soybean phenotype identification method based on image phenotype matching.
[0032] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the above-mentioned soybean phenotype identification method based on image phenotype matching is implemented.
[0033] In a fourth aspect, an embodiment of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-mentioned soybean phenotype identification method based on image phenotype matching.
[0034] Compared with the prior art, the invention has the following beneficial effects: the invention provides a soybean phenotype recognition method based on image phenotype matching, which regards the phenotypic characteristics of soybean as phenotypic information, and respectively inputs the soybean maturity image and its corresponding phenotypic label into the image encoder and the phenotype encoder, thereby training the image encoder and the phenotype encoder; fixing the network weight of the phenotype encoder; inputting the phenotypic label into the phenotype encoder to extract the phenotypic characteristics, and inputting the phenotypic characteristics into the phenotype decoder to extract the phenotypic result recognition characteristics, and back-propagating and optimizing the phenotype decoder based on the difference between the phenotypic result recognition characteristics and the array label. Thus, the correlation characteristics between the soybean image and the soybean phenotype are learned, and end-to-end soybean multi-phenotype recognition is realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0036] Figure 1 A flowchart of a soybean phenotype recognition method based on image phenotype matching provided by an embodiment of the present invention;
[0037] Figure 2 A flowchart of the training process of the image encoder and the phenotype decoder provided by the embodiment of the present invention;
[0038] Figure 3 A schematic diagram of obtaining a soybean maturity image provided by an embodiment of the present invention;
[0039] Figure 4 A flowchart of a training image encoder provided by an embodiment of the present invention;
[0040] Figure 5 A flowchart of a training phenotype decoder provided by an embodiment of the present invention;
[0041] Figure 6 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0043] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0044] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0045] The present invention is described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the features of the following embodiments and implementations can be combined with each other.
[0046] like Figure 1 As shown, an embodiment of the present invention provides a soybean phenotype recognition method based on image phenotype matching, the method comprising:
[0047] Step S1, obtaining a soybean image to be identified.
[0048] Step S2, inputting the soybean image to be identified into a pre-trained image encoder to extract image features.
[0049] Step S3, inputting the image features into a pre-trained phenotype decoder to obtain the phenotype result corresponding to the soybean image to be identified.
[0050] Specifically, the numerical value of each dimension in the phenotypic results obtained from the soybean image represents the identified plant height, bottom pod height, number of nodes without pods, number of nodes with pods, number of branches, number of zero-seed pods, number of one-seed pods, number of two-seed pods, number of three-seed pods, and number of four-seed pods.
[0051] Exemplarily, the phenotype decoder recognizes the output array label Y=[78,16,3,12,1,2,8,12,18,4], which means that the phenotypic result is: "plant height 78 cm, bottom pod height 16 cm, number of pod-free nodes 3, number of pod-containing nodes 12, number of branches 1, number of zero-grain pods 2, number of one-grain pods 8, number of two-grain pods 12, number of three-grain pods 18, number of four-grain pods 4".
[0052] Among them, Figure 2 As shown, the training process of the image encoder and the phenotype decoder includes:
[0053] Step S100, acquiring soybean maturity images; setting phenotype labels and array labels for each soybean maturity image;
[0054] Furthermore, if Figure 3As shown, an embodiment of the present invention provides a device for collecting images of soybeans in the maturity stage, which is composed of two fill lights, a camera bracket and a camera, a turntable and a background board. The power of the fill light is 800W, the color temperature is 5000K, and the size of the light mask is 40×60 cm; the camera bracket is 1 meter high, and the camera uses a Daheng industrial camera, model MER2-1220-32U3C, the lens model is HN-P-0824-10M-C2 / 3, and the lens focal length is 8 mm; the turntable speed is 36 degrees per second; the size of the background board is 2×3 meters. The color of the background board is pure white, and the camera is 1.5 meters away from the background board. By fixing the soybean plants in the maturity stage on the turntable fixture, the image is taken while the plant is rotated. Each soybean plant rotates one circle, and a total of 10 photos with 4024×3036 pixels are taken as a group of photos.
[0055] Furthermore, setting a phenotype label and an array label for each soybean maturity stage image includes:
[0056] Count the phenotypes of each soybean maturity image, the phenotypes include: plant height (cm), bottom pod height (cm), number of nodes without pods, number of nodes with pods, number of branches, number of zero-seed pods, number of one-seed pods, number of two-seed pods, number of three-seed pods, and number of four-seed pods;
[0057] The phenotypic labels corresponding to each soybean maturity image are: plant height y1 cm, bottom pod height y2 cm, number of nodes without pods y3, number of nodes with pods y4, number of branches y5, number of zero pods y6, number of one pod y7, number of two pods y8, number of three pods y9, number of four pods y 10 indivual;
[0058] The array label Y=[y1,y2, y3, y4, y5, y6, y7, y8, y9,y 10 ].
[0059] For example, the phenotypic label corresponding to a soybean maturity image is: "plant height 80 cm, bottom pod height 15 cm, 5 nodes without pods, 10 nodes with pods, 1 branch, 2 zero-seed pods, 8 one-seed pods, 12 two-seed pods, 20 three-seed pods, and 3 four-seed pods", and its corresponding array label Y = [80, 15, 5, 10, 1, 2, 8, 12, 20, 3]. A group of plant photos corresponds to a phenotypic label and a group of array labels Y to construct a soybean dataset. In this embodiment, a total of 200 groups, a total of 2000 soybean plant photos, were collected. 20 groups of 200 photos were randomly selected as the test dataset, and the remaining photos were used as the training dataset.
[0060] It should be noted that in order to more comprehensively understand the phenotypic statistics of soybean maturity images, the above phenotypic parameters are explained in detail. Among them, plant height is the vertical distance from the base of the soybean plant to the top of its main stem (usually the node where the last fully expanded leaf is located); bottom pod height is the height of the first pod-bearing part on the main stem of the soybean plant from the ground; the number of podless nodes is the number of nodes on the main stem of the soybean plant that have not pods; the number of pod nodes is the number of nodes on the main stem of the soybean plant that have pods; the number of branches is the number of branches growing from the main stem of the soybean plant; the number of zero-seed pods is the number of pods on the soybean plant that have pods but no seeds in the pods; the number of one-seed pods, two-seed pods, three-seed pods, and four-seed pods are the number of pods on the soybean plant with 1, 2, 3, and 4 seeds. By counting these phenotypic parameters, we can have a more comprehensive understanding of the growth status and yield potential of soybeans, and provide a scientific basis for variety improvement, cultivation management, and yield prediction.
[0061] Furthermore, the image encoder selects ResNet50 residual neural network, ViT visual converter neural network or DETR detection converter neural network.
[0062] Furthermore, the phenotype encoder selects a Transformer converter neural network with an attention mechanism, an RNN recurrent neural network, or an LSTM long short-term memory artificial neural network.
[0063] Step S200, inputting the soybean maturity image and its corresponding phenotypic label into the image encoder and the phenotypic encoder respectively, so as to train the image encoder and the phenotypic encoder;
[0064] Furthermore, if Figure 4 As shown, the step S200 includes:
[0065] Input the soybean maturity image into the image encoder to obtain the image feature X image ;
[0066] The phenotypic label corresponding to the soybean maturity image is input into the phenotypic encoder to obtain the phenotypic feature X pt ;
[0067] Image feature X image With phenotypic characteristics X pt Multiply to get the feature matrix X mut ;
[0068] Based on the feature matrix X mut With the identity matrix I 10 A first loss function is calculated, and the image encoder and the phenotype encoder are respectively optimized and updated with the back propagation method through the first loss function.
[0069] Among them, the first loss function selects the minimum square error loss function, the absolute value loss function or the smoothed absolute value loss function.
[0070] In this example, the first loss function uses the least square error loss function, which is expressed as follows:
[0071]
[0072] Among them, X (mut(i,j)) Refers to the feature matrix X mut The value of the i-th row and j-th column in I (10(i,j)) The identity matrix I 10 The value in the i-th row and j-th column of .
[0073] For example, in this example, a group of 10 soybean maturity images are selected and input into the image encoder to obtain an image feature matrix X with a dimension of 10×512. image , input the corresponding phenotypic label into the phenotypic encoder to obtain a 10×512 dimensional phenotypic feature matrix X pt . The image feature X image With phenotypic characteristics X pt Perform matrix multiplication to obtain a 10×10 dimension feature matrix X mut , using the feature matrix X mut and the 10×10 identity matrix I 10 The first least square error loss function is calculated by subtraction. According to the calculated first least square error loss function, the back propagation method is used to update the parameters of the image encoder and the phenotype encoder respectively. The training is iterated for 50 cycles, and the final network parameters are saved as the parameters of the image encoder and the phenotype encoder.
[0074] Step S300, fix the network weights of the phenotype encoder; input the phenotype label to the phenotype encoder to extract the phenotype feature, input the phenotype feature to the phenotype decoder to extract the phenotype result recognition feature, and back-propagate and optimize the phenotype decoder based on the difference between the phenotype result recognition feature and the array label.
[0075] Furthermore, if Figure 5 As shown, the step S300 includes:
[0076] Input the phenotypic label into the phenotypic encoder to extract the phenotypic feature X pt ;
[0077] The phenotypic feature X pt Input to the phenotype decoder to extract the phenotype result identification feature X out ;
[0078] Identify trait X based on phenotypic results outThe second loss function is calculated between the array label Y, and the back propagation method is used to optimize and update the parameters of the phenotype decoder respectively through the second loss function.
[0079] Among them, the second loss function is a minimum square error loss function, an absolute value loss function or a smoothed absolute value loss function.
[0080] In this example, the second loss function selects the minimum square error loss function, which is expressed as follows:
[0081]
[0082] In the formula, X (out(i)) Refers to the resulting feature vector X out The value of the i-th element in Y i Refers to the value of the i-th element in the group label Y. The parameters of the phenotype decoder are updated using the back-propagation method according to the calculated loss function.
[0083] Exemplarily, in this example, the phenotype label is input into the phenotype encoder to extract the phenotype feature X of 10×512 dimensions. pt , the phenotypic feature X pt Input to the phenotype decoder to extract the 10-dimensional phenotype result identification feature X out ; Iterate the training for 50 cycles and save the final network parameters as the parameters of the phenotype decoder.
[0084] Furthermore, the phenotype decoder selects a Transformer converter neural network with an attention mechanism, an RNN recurrent neural network, or an LSTM long short-term memory artificial neural network.
[0085] Furthermore, in this example, ten phenotypes were identified for the 20 soybean mature plant test sets collected in step S100. The results were compared with the manually counted soybean phenotype labels, and the recognition accuracy was used to measure the performance of the method of the present invention. The calculation formula for the recognition accuracy (ACC) is:
[0086]
[0087] Among them, MAE represents the mean absolute error, and Mean represents the mean of the various phenotypic data manually counted for the above soybean plants.
[0088] In statistics, absolute error is defined as the numerical difference between the predicted value and the actual value. The mean absolute error is calculated by dividing the sum of the absolute errors by the number of samples involved in the calculation. The formula is as follows:
[0089]
[0090]
[0091] In the present invention, n refers to the total number of samples 20, X (out(i)) Refers to the value of each phenotype obtained by collecting and identifying the i-th soybean plant in the test set in this embodiment, Y i Refers to the phenotypic value obtained by manual statistics of the i-th soybean plant in the test set in this embodiment. The recognition accuracy of each phenotype is shown in the following Table 1:
[0092] Table 1: Identification accuracy of each phenotype
[0093]
[0094] As can be seen from Table 1, the soybean phenotype recognition method based on image phenotype matching provided by the present invention has a high recognition accuracy rate for each phenotype of plant height, bottom pod height, number of nodes without pods, number of nodes with pods, number of branches, number of zero-seed pods, number of one-seed pods, number of two-seed pods, number of three-seed pods, and number of four-seed pods.
[0095] In summary, the present invention provides a soybean phenotype recognition method based on image phenotype matching, which regards the phenotypic characteristics of soybeans as phenotypic information, and respectively inputs the soybean maturity image and its corresponding phenotypic label into the image encoder and the phenotype encoder to train the image encoder and the phenotype encoder; fixes the network weight of the phenotype encoder; inputs the phenotype label into the phenotype encoder to extract the phenotypic characteristics, and inputs the phenotypic characteristics into the phenotype decoder to extract the phenotypic result recognition characteristics, and back-propagates and optimizes the phenotype decoder based on the difference between the phenotypic result recognition characteristics and the array label. In this way, the correlation characteristics between soybean images and soybean phenotypes are learned, and end-to-end soybean multi-phenotype recognition is realized.
[0096] like Figure 6 As shown, an embodiment of the present application provides an electronic device, which includes a memory 101 for storing one or more programs and a processor 102. When the one or more programs are executed by the processor 102, any method in the first aspect described above is implemented.
[0097] The memory 101, the processor 102 and the communication interface 103 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The memory 101 can be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101. The communication interface 103 can be used to communicate signaling or data with other node devices.
[0098] Among them, the memory 101 can be, but is not limited to, a random access memory 101 (Random Access Memory, RAM), a read only memory 101 (Read Only Memory, ROM), a programmable read-only memory 101 (Programmable Read-Only Memory, PROM), an erasable programmable read-only memory 101 (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable read-only memory 101 (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0099] The processor 102 may be an integrated circuit chip with signal processing capability. The processor 102 may be a general-purpose processor 102, including a central processing unit 102 (CPU), a network processor 102 (NP), etc.; it may also be a digital signal processor 102 (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0100] In the embodiments provided in the present application, it should be understood that the disclosed method and system can also be implemented in other ways. The method and system embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the method and system, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0101] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0102] On the other hand, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by the processor 102, the method as described in any one of the first aspects above is implemented. If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory 101 (ROM, Read-Only Memory), random access memory 101 (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes.
[0103] Those skilled in the art will readily appreciate other embodiments of the present application after considering the description and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only.
[0104] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A soybean phenotype recognition method based on image phenotype matching, characterized in that: The method comprises: Get the soybean image to be identified; Input the soybean image to be identified into a pre-trained image encoder to extract image features; The image features are input into a pre-trained phenotype decoder to obtain the phenotype result corresponding to the soybean image to be identified; The training process of the image encoder and the phenotype decoder includes: Acquire soybean maturity images; The method comprises the following steps: setting a phenotypic label and an array label for each soybean maturity image; comprising: counting the phenotype of each soybean maturity image, wherein the phenotypes include: plant height, bottom pod height, number of nodes without pods, number of nodes with pods, number of branches, number of zero pods, number of one pod, number of two pods, number of three pods, and number of four pods; the phenotypic label corresponding to each soybean maturity image is: plant height y1 cm, bottom pod height y2 cm, number of nodes without pods y3, number of nodes with pods y4, number of branches y5, number of zero pods y6, number of one pod y7, number of two pods y8, number of three pods y9, number of four pods y 10 Each soybean maturity image corresponds to an array label Y=[y1,y2, y3, y4,y5, y6, y7, y8, y9, y 10 ]; Input the soybean maturity image and its corresponding phenotypic label into the image encoder and the phenotypic encoder respectively, so as to train the image encoder and the phenotypic encoder; including: Input the soybean maturity image into the image encoder to obtain image features; The phenotypic labels corresponding to the soybean maturity images are input into the phenotypic encoder to obtain the phenotypic characteristics; The image features are multiplied by the phenotypic features to obtain the feature matrix; A first loss function is calculated based on the feature matrix and the identity matrix, and the image encoder and the phenotype encoder are respectively optimized and updated by using the back propagation method through the first loss function; The network weights of the phenotype encoder are fixed; the phenotype label is input into the phenotype encoder to extract the phenotypic feature, the phenotypic feature is input into the phenotype decoder to extract the phenotypic result recognition feature, and the phenotype decoder is optimized by back propagation based on the difference between the phenotypic result recognition feature and the array label.
2. The soybean phenotype recognition method based on image phenotype matching according to claim 1, characterized in that: The optimization process of the phenotype decoder includes: Input the phenotypic label into the phenotypic encoder to extract the phenotypic characteristics; Inputting the phenotypic features into the phenotypic decoder to extract the phenotypic result identification features; The second loss function is calculated based on the phenotypic result recognition features and array labels, and the parameters of the phenotypic decoder are optimized and updated using the back propagation method through the second loss function.
3. The soybean phenotype recognition method based on image phenotype matching according to claim 1, characterized in that: The image encoder uses a ResNet50 residual neural network, a ViT visual converter neural network, or a DETR detection converter neural network.
4. The soybean phenotype recognition method based on image phenotype matching according to claim 1 or 2, characterized in that: The phenotype encoder and phenotype decoder use a Transformer converter neural network with an attention mechanism, an RNN recurrent neural network, and an LSTM long short-term memory artificial neural network.
5. The soybean phenotype recognition method based on image phenotype matching according to claim 1, characterized in that: The numerical value of each dimension in the phenotypic result obtained from the soybean image represents the identified plant height, bottom pod height, number of nodes without pods, number of nodes with pods, number of branches, number of zero-seed pods, number of one-seed pods, number of two-seed pods, number of three-seed pods, and number of four-seed pods.
6. An electronic device comprising a memory and a processor, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the soybean phenotype identification method based on image phenotype matching as described in any one of claims 1-5 above.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the soybean phenotype recognition method based on image phenotype matching as described in any one of claims 1 to 5 is implemented.
8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the soybean phenotype identification method based on image phenotype matching described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Soybean pod test method, system and device based on deep learning
CN116434066A
