A method for training an automatic learning machine capable of determining characteristics of plant elements, comprising the following steps:
- recording a first sample photograph of a first sample made up of a first mixture of plant elements;
- recording a second sample photograph of a second sample made up of a second mixture of plant elements;
- measuring a first measured characteristic value for said first mixture of plant elements, and a second measured characteristic value for said second mixture of plant elements, with the second measured characteristic value being different from the first measured characteristic value,
- characterized in that it further comprises the following steps:
- obtaining, by means of image analysis software, a plurality of first images of a pseudo-isolated plant element, each first image of a pseudo-isolated plant element being contained in said first sample photograph and depicting totally or partially a plant element of said first sample, each said first image of a pseudo-isolated plant element being represented by a first image matrix;
- obtaining, by means of said image analysis software, a plurality of second images of a pseudo-isolated plant element, each second image of a pseudo-isolated plant element being contained in said second sample photograph and depicting totally or partially a plant element of said second sample, each said second image of a pseudo-isolated plant element being represented by a second image matrix;
- defining, in a database of the training images, at least one first class of image matrices and one second class of image matrices, the first class of image matrices being associated with said first measured characteristic value or with a range containing said first measured characteristic value;
- and
- the second class of image matrices being associated with said second measured characteristic value or with a range containing said second measured characteristic value;
- classifying said image matrices in said classes as a function of the respective measured characteristic value for the mixture of plant elements from which each of said images has been obtained, the step of classifying said image matrices comprising classifying said first image matrices in said first class and classifying said second image matrices in said second class;
- calculating, for each of said image matrices, by means of a calculator, a first indicator of inclusion in said at least two classes, said first inclusion indicator representing a first probability of inclusion of the image matrix in said at least two classes;
- measuring, by means of a comparator, an overall classification error, said overall classification error being dependent on classes in which said image matrices have been classified and on first inclusion probabilities;
- and
- modifying, by said calculator, in response to the reception of said overall classification error, at least one of its calculation elements, for subsequently calculating second indicators of inclusion in said at least two classes corresponding to said image matrices, said second inclusion indicators representing second probabilities of inclusion of the image matrices in said at least two classes, said at least one calculation element being modified so that the second inclusion probabilities of the image matrices in said at least two classes are closer to the true inclusion of said image matrices in the at least two classes than the first inclusion probabilities.