Method and apparatus for updating target detection model
Disclosed in the present disclosure are a method and apparatus for updating a target detection model. A specific implementation of the method comprises: constructing a three-dimensional model of a target article according to image data of the target article at a plurality of angles; generating, according to the three-dimensional model, a synthetic image comprising a target article object, which represents the target article; by taking the synthetic image as a sample image and taking the target article object as a label, obtaining training samples to generate a training sample set; and training a target detection model by means of the training sample set, so as to obtain an updated target detection model.
1 . A method for updating a target detection model, comprising:
constructing, according to image data of a target item at a plurality of angles, a three-dimensional model of the target item;
generating a composite image comprising a target item object representing the target item according to the three-dimensional model;
using the composite image as a sample image and the target item object as a tag to obtain a training sample to generate a training sample set; and
training the target detection model through the training sample set to obtain an updated target detection model, wherein the target detection model is used to represent a corresponding relationship between an input image and a detection result corresponding to the target item object in the input image, wherein the generating the composite image comprising the target item object representing the target item according to the three-dimensional model comprises:
determining a coordinate system corresponding relationship among a second image collection apparatus disposed on a picking robot, a preset information collection position and a first image collection apparatus, wherein the image data of the target item is obtained by the first image collection apparatus when the target item is placed at the preset information collection position;
determining an adjusted three-dimensional model of the three-dimensional model in a field of view of the second image collection apparatus disposed on the picking robot according to the coordinate system corresponding relationship; and
generating the composite image comprising the target item object corresponding to the target item according to the adjusted three-dimensional model and a preset background image representing a picking scenario of the picking robot.
2 . The method according to claim 1 , wherein the constructing, according to image data of a target item at a plurality of angles, a three-dimensional model of the target item comprises:
collecting, in a process of controlling the picking robot to perform the picking task for the target item according to the detection result of the target detection model for the target item object in the input image, two-dimensional image data and three-dimensional image data of the target item at the preset information collection position at the plurality of angles through the first image collection apparatus; and
constructing the three-dimensional model of the target item according to the two-dimensional image data and the three-dimensional image data.
3 . The method according to claim 1 , wherein the method further comprises:
determining a weight of the target item, and
the generating the composite image comprising the target item object corresponding to the target item according to the adjusted three-dimensional model and a preset background image representing a picking scenario of the picking robot comprises:
generating the composite image comprising the target item object corresponding to the target item according to the adjusted three-dimensional model, the preset background image, the weight, preset resolution of the composite image and a parameter of the second image collection apparatus.
4 . The method according to claim 1 , wherein the training the target detection model through the training sample set to obtain an updated target detection model comprises:
using a machine learning algorithm to train the target detection model through the training sample set to obtain the updated target detection model, in response to determining that a detection precision of the target detection model is less than a preset threshold.
5 . The method according to claim 1 , further comprising:
performing a target detection on a subsequent input image through the updated target detection model to obtain a detection result; and
controlling the picking robot to perform a picking task according to the detection result.
6 . An apparatus for updating a target detection model, comprising:
one or more processors; and
a storage apparatus, storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform operations, the operations comprising:
constructing, according to image data of a target item at a plurality of angles, a three-dimensional model of the target item;
generating a composite image comprising a target item object representing the target item according to the three-dimensional model;
using the composite image as a sample image and the target item object as a tag to obtain a training sample to generate a training sample set; and
training the target detection model through the training sample set to obtain an updated target detection model, wherein the target detection model is used to represent a corresponding relationship between an input image and a detection result corresponding to the target item object in the input image, wherein the generating the composite image comprising the target item object representing the target item according to the three-dimensional model comprises:
determining a coordinate system corresponding relationship among a second image collection apparatus disposed on a picking robot, a preset information collection position and a first image collection apparatus, wherein the image data of the target item is obtained by the first image collection apparatus when the target item is placed at the preset information collection position;
determining an adjusted three-dimensional model of the three-dimensional model in a field of view of the second image collection apparatus disposed on the picking robot according to the coordinate system corresponding relationship; and
generating the composite image comprising the target item object corresponding to the target item according to the adjusted three-dimensional model and a preset background image representing a picking scenario of the picking robot.
7 . The apparatus according to claim 6 , wherein the constructing, according to image data of a target item at a plurality of angles, a three-dimensional model of the target item comprises:
collecting, in a process of controlling the picking robot to perform the picking task for the target item according to the detection result of the target detection model for the target item object in the input image, two-dimensional image data and three-dimensional image data of the target item at the preset information collection position at the plurality of angles through the first image collection apparatus; and constructing the three-dimensional model of the target item according to the two-dimensional image data and the three-dimensional image data.
8 . The apparatus according to claim 6 , wherein the operations further comprise:
determining a weight of the target item, and
the generating the composite image comprising the target item object corresponding to the target item according to the adjusted three-dimensional model and a preset background image representing a picking scenario of the picking robot comprises:
generating the composite image comprising the target item object corresponding to the target item according to the adjusted three-dimensional model, the preset background image, the weight, preset resolution of the composite image and a parameter of the second image collection apparatus.
9 . The apparatus according to claim 6 , wherein the training the target detection model through the training sample set to obtain an updated target detection model comprises:
using a machine learning algorithm to train the target detection model through the training sample set to obtain the updated target detection model, in response to determining that a detection precision of the target detection model is less than a preset threshold.
10 . The apparatus according to claim 6 , wherein the operations further comprise:
performing a target detection on a subsequent input image through the updated target detection model to obtain a detection result; and
controlling the picking robot to perform a picking task according to the detection result.
11 . A non-transitory computer readable medium, storing a computer program, wherein the program, when executed by a processor, causes the processor to perform operations, the operations comprising:
constructing, according to image data of a target item at a plurality of angles, a three-dimensional model of the target item;
generating a composite image comprising a target item object representing the target item according to the three-dimensional model;
using the composite image as a sample image and the target item object as a tag to obtain a training sample to generate a training sample set; and
training the target detection model through the training sample set to obtain an updated target detection model, wherein the target detection model is used to represent a corresponding relationship between an input image and a detection result corresponding to the target item object in the input image, wherein the generating the composite image comprising the target item object representing the target item according to the three-dimensional model comprises:
determining a coordinate system corresponding relationship among a second image collection apparatus disposed on a picking robot, a preset information collection position and a first image collection apparatus, wherein the image data of the target item is obtained by the first image collection apparatus when the target item is placed at the preset information collection position;
determining an adjusted three-dimensional model of the three-dimensional model in a field of view of the second image collection apparatus disposed on the picking robot according to the coordinate system corresponding relationship; and
generating the composite image comprising the target item object corresponding to the target item according to the adjusted three-dimensional model and a preset background image representing a picking scenario of the picking robot.
12 . The non-transitory computer readable medium according to claim 11 , wherein the constructing, according to image data of a target item at a plurality of angles, a three-dimensional model of the target item comprises:
collecting, in a process of controlling the picking robot to perform a picking task for the target item according to the detection result of the target detection model for the target item object in the input image, two-dimensional image data and three-dimensional image data of the target item at the preset information collection position at the plurality of angles through the first image collection apparatus; and constructing the three-dimensional model of the target item according to the two-dimensional image data and the three-dimensional image data.
13 . The non-transitory computer readable medium according to claim 11 , wherein the operations further comprise:
determining a weight of the target item, and
the generating the composite image comprising the target item object corresponding to the target item according to the adjusted three-dimensional model and a preset background image representing a picking scenario of the picking robot comprises:
generating the composite image comprising the target item object corresponding to the target item according to the adjusted three-dimensional model, the preset background image, the weight, preset resolution of the composite image and a parameter of the second image collection apparatus.
14 . The non-transitory computer readable medium according to claim 11 , wherein the training the target detection model through the training sample set to obtain an updated target detection model comprises:
using a machine learning algorithm to train the target detection model through the training sample set to obtain the updated target detection model, in response to determining that a detection precision of the target detection model is less than a preset threshold.
15 . The non-transitory computer readable medium according to claim 11 , wherein the operations further comprise:
performing a target detection on a subsequent input image through the updated target detection model to obtain a detection result; and
controlling the picking robot to perform a picking task according to the detection result.