Search

CN-121982423-A - Method, device, equipment and medium for training annotation model for grain image

CN121982423ACN 121982423 ACN121982423 ACN 121982423ACN-121982423-A

Abstract

The application discloses a method, a device, equipment and a medium for training a labeling model for a grain image, and relates to the technical field of model training. The method comprises the steps of obtaining a pre-constructed marking model, a corresponding grain image training set and a grain image verification set, training the marking model based on the grain image training set, marking the grain image verification set based on the trained marking model, adding a grain image failing to mark in the grain image verification set into the grain image training set when the overall marking accuracy of the marking model for the grain image verification set does not reach an accuracy threshold, training the marking model based on the updated grain image training set, and verifying the trained marking model based on the grain image verification set until the overall marking accuracy of the marking model meets the accuracy threshold.

Inventors

  • ZENG XIAOBING
  • HUANG GUOYONG

Assignees

  • 中联农业机械股份有限公司

Dates

Publication Date
20260505
Application Date
20260210

Claims (10)

  1. 1. A method of annotation model training for grain images, the method comprising: acquiring a pre-constructed labeling model and a corresponding grain image training set and a grain image verification set; training the marking model based on the grain image training set, and marking the grain image verification set based on the trained marking model; adding a grain image with failed labeling in the grain image verification set into the grain image training set under the condition that the overall labeling accuracy of the grain image verification set by the labeling model does not reach an accuracy threshold; Training the labeling model based on the updated grain image training set, and verifying the trained labeling model based on the grain image verification set until the overall labeling accuracy of the labeling model meets the accuracy threshold.
  2. 2. The method of claim 1, wherein the training set of grain images includes a labeling rule, a plurality of grain images, and reference labels corresponding to the grain images, wherein training the labeling model based on the training set of grain images comprises: inputting the marking rules and the grain images into the marking model in a large model fine-tuning frame to obtain grain types and grain positions of grains in the grain images output by the marking model; and fine tuning the labeling model according to the grain type, the grain position and the reference label of grains in the grain image so as to obtain a trained labeling model.
  3. 3. The method for training a labeling model for grain images of claim 2, wherein the labeling rules comprise: under the condition that the shape of the seed is elliptical and the color of the seed meets the first color parameter, judging that the seed type is a complete seed; Judging that the seed grain type is broken seed grains under the condition that the seed grain shape is a fault shape or the edge of the seed grains are concave-convex and the color of the seed grains meets a second color parameter; And under the condition that the shape of the seeds is irregular, and the color of the seeds meets the third color parameter, judging the types of the seeds as impurities.
  4. 4. The annotation model training method for grain images according to claim 1, further comprising: Inputting all the grain images into a trained labeling model to obtain the grain types and the grain positions of grains in the grain images output by the labeling model; Generating a labeling file according to the grain image, the corresponding grain type and the grain position, and training a grain impurity-containing crushing rate image recognition model based on the labeling file.
  5. 5. The annotation model training method for grain images according to claim 1, further comprising: And carrying out format processing on the seed image training set and the seed image verification set according to the framework used by the annotation model.
  6. 6. The method of claim 1, wherein adding a grain image for which labeling fails in the grain image verification set to the grain image training set comprises: determining the error type of the grain image with failed marking in the grain image verification set; Taking the error type as a clustering feature, carrying out clustering analysis on all grain images with failed labeling, and screening out typical grain images meeting the preset quantity according to a clustering analysis result; and adding the typical seed image into the seed image training set.
  7. 7. The annotation model training method for grain images according to claim 1, further comprising: performing cluster analysis on all the seed images based on visual features, and dividing all the seed images into a plurality of clusters with similar contents according to the result of the cluster analysis; and outputting alarm information for each cluster group under the condition that the labeling result of each grain image in the cluster group does not meet the consistency threshold value.
  8. 8. Annotate model trainer to seed image, characterized by, include: a memory configured to store instructions; A processor configured to invoke the instructions from the memory and when executing the instructions is capable of implementing the annotation model training method for grain images according to any of claims 1 to 7.
  9. 9. An annotation model training device for grain images, comprising: the annotation model training device for grain images of claim 8.
  10. 10. A machine-readable storage medium having instructions stored thereon, which when executed by a processor, cause the processor to be configured to perform the annotation model training method for grain images according to any of claims 1 to 7.

Description

Method, device, equipment and medium for training annotation model for grain image Technical Field The application relates to the technical field of model training, in particular to a method, a device, equipment and a medium for training a labeling model aiming at a grain image. Background In the harvesting, threshing and conveying processes, the crops are easy to mix with various impurities such as crushed straws, glumes, dust, stones and the like, and meanwhile, the complete seeds can be crushed. Therefore, the grain impurity breakage rate is set as a core index for measuring the operation quality of the harvester. Currently, grain impurity breakage is generally evaluated using image recognition techniques. The technology generally relies on manual labeling, and a professional draws impurities and incomplete grain contours in grain images one by one, so that an identification model is trained by using the labeled images, and automatic and accurate identification is realized. However, the training process of the recognition model usually needs tens of thousands of pictures as a support, and Shan Zhangzi images often contain a plurality of targets to be marked, so that the overall marking task is huge, and the efficiency is low by adopting a manual marking mode. Disclosure of Invention The embodiment of the application aims to provide a method, a device, equipment and a medium for training a labeling model for a grain image. In order to achieve the above object, a first aspect of the present application provides a method for training a labeling model for a grain image, the method comprising: acquiring a pre-constructed labeling model and a corresponding grain image training set and a grain image verification set; training the labeling model based on the grain image training set, and labeling the grain image verification set based on the trained labeling model; Under the condition that the overall labeling accuracy of the labeling model aiming at the kernel image verification set does not reach the accuracy threshold, adding the kernel image which is failed to be labeled in the kernel image verification set into a kernel image training set; Training the labeling model based on the updated grain image training set, and verifying the trained labeling model based on the grain image verification set until the overall labeling accuracy of the labeling model meets the accuracy threshold. In the embodiment of the application, a grain image training set comprises a labeling rule, a plurality of grain images and reference labels corresponding to the grain images, and the labeling model is trained based on the grain image training set, wherein the labeling rule and the grain images are input into a labeling model in a large model fine-tuning frame to obtain the grain types and the grain positions of grains in the grain images output by the labeling model; and fine tuning the labeling model according to the grain type, the grain position and the reference label of grains in the grain image so as to obtain a trained labeling model. In the embodiment of the application, the labeling rule comprises that the type of the seed is judged to be a complete seed when the shape of the seed is an ellipse and the color of the seed meets a first color parameter, the type of the seed is judged to be a broken seed when the shape of the seed is a fault shape or the edge of the seed is concave-convex and the color of the seed meets a second color parameter, and the type of the seed is judged to be an impurity when the shape of the seed is an irregular shape and the color of the seed meets a third color parameter. The method further comprises the steps of inputting all the grain images into a trained marking model to obtain grain types and grain positions of grains in the grain images output by the marking model, and generating marking files according to the grain images and the corresponding grain types and grain positions to train the grain impurity-containing crushing rate image recognition model based on the marking files. In the embodiment of the application, the method further comprises the step of carrying out format processing on the grain image training set and the grain image verification set according to the framework used by the labeling model. In the embodiment of the application, the grain images with failed labeling in the grain image verification set are added into a grain image training set, and the method comprises the steps of determining the error type of the grain images with failed labeling in the grain image verification set, carrying out cluster analysis on all the grain images with failed labeling by taking the error type as a cluster characteristic, screening out typical grain images meeting the preset quantity according to the result of the cluster analysis, and adding the typical grain images into the grain image training set. The method further comprises the steps of carrying out cluster analysis on all the g