US11704817B2ActiveUtilityA1

Method, apparatus, terminal, and storage medium for training model

53
Assignee: TENCENT TECH SHENZHEN CO LTDPriority: May 13, 2019Filed: Jul 7, 2021Granted: Jul 18, 2023
Est. expiryMay 13, 2039(~12.8 yrs left)· nominal 20-yr term from priority
G06T 7/246G06F 18/214G06F 18/253G06T 7/73G06V 10/454G06V 10/62G06V 10/75G06V 10/82G06V 20/64G06T 2207/20081G06V 20/48G06V 20/46G06T 2207/20084G06T 2207/30196G06T 2207/30241
53
PatentIndex Score
0
Cited by
20
References
20
Claims

Abstract

This application disclose a method for training a model performed at a computing device. The method includes: acquiring a template image and a test image; invoking a first object recognition model to process a feature of a tracked object in the template image to obtain a first reference response, and a second object recognition model to process the feature in the template image to obtain a second reference response; invoking the first model to process a feature of a tracked object in the test image to obtain a first test response, and the second model to process the feature to obtain a second test response; tracking the first test response to obtain a tracking response of the tracked object; and updating the first object recognition model based on differences between the first and second reference responses, that between the first and second test responses, and that between a tracking label and the tracking response.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A method for training a model performed by a computing device, the method comprising:
 acquiring a template image and a test image for the training, the template image and the test image each comprising a tracked object, the test image comprising a tracking label of the tracked object, the tracking label being used for indicating a marking position of the tracked object in the test image; 
 invoking a first object recognition model to recognize a feature of the tracked object in the template image to obtain a first reference response, and invoking a second object recognition model to recognize the feature of the tracked object in the template image to obtain a second reference response; 
 invoking the first object recognition model to recognize a feature of the tracked object in the test image to obtain a first test response, and invoking the second object recognition model to recognize the feature of the tracked object in the test image to obtain a second test response; 
 tracking the first test response to obtain a tracking response of the tracked object, the tracking response being used for indicating a tracking position of the tracked object in the test image; and 
 updating the first object recognition model based on difference information between the first reference response and the second reference response, difference information between the first test response and the second test response, and difference information between the tracking label and the tracking response. 
 
     
     
       2. The method according to  claim 1 , further comprising:
 acquiring the second object recognition model; and 
 trimming the second object recognition model to obtain the first object recognition model. 
 
     
     
       3. The method according to the  claim 1 , wherein the updating the first object recognition model based on difference information between the first reference response and the second reference response, difference information between the first test response and the second test response, and difference information between the tracking label and the tracking response comprises:
 acquiring a loss optimization function corresponding to the first object recognition model; 
 determining a value of the loss optimization function based on the difference information between the first reference response and the second reference response, the difference information between the first test response and the second test response, and the difference information between the tracking label and the tracking response; and 
 updating the first object recognition model in such a way that the value of the loss optimization function is minimized. 
 
     
     
       4. The method according to the  claim 3 , wherein the loss optimization function comprises a feature recognition loss function and a tracking loss function, and the determining a value of the loss optimization function based on the difference information between the first reference response and the second reference response, the difference information between the first test response and the second test response, and the difference information between the tracking label and the tracking response comprises:
 acquiring the feature recognition loss function, and determining a value of the feature recognition loss function based on the difference information between the first reference response and the second reference response and the difference information between the first test response and the second test response; 
 acquiring the tracking loss function, and determining a value of the tracking loss function based on the difference information between the tracking label and the tracking response; and 
 determining the value of the loss optimization function based on the value of the feature recognition loss function and the value of the tracking loss function. 
 
     
     
       5. The method according to the  claim 4 , wherein the first object recognition model comprises a first convolutional layer, a second convolutional layer, and a third convolutional layer, the first test response being obtained by fusing a first test sub-response corresponding to the first convolutional layer, a second test sub-response corresponding to the second convolutional layer, and a third test sub-response corresponding to the third convolutional layer; and the determining a value of the tracking loss function based on the difference information between the tracking label and the tracking response comprises:
 determining a tracking loss value of the first convolutional layer based on difference information between a first tracking label corresponding to the first convolutional layer and a first tracking response obtained by tracking the first test sub-response; 
 determining a tracking loss value of the second convolutional layer based on difference information between a second tracking label corresponding to the second convolutional layer and a second tracking response obtained by tracking the second test sub-response; 
 determining a tracking loss value of the third convolutional layer based on difference information between a third tracking label corresponding to the third convolutional layer and a third tracking response obtained by tracking the third test sub-response; and 
 fusing the tracking loss value corresponding to the first convolutional layer, the tracking loss value corresponding to the second convolutional layer, and the tracking loss value corresponding to the third convolutional layer to obtain the value of the tracking loss function, wherein 
 the first tracking response, the second tracking response, and the third tracking response have different resolutions. 
 
     
     
       6. The method according to  claim 5 , wherein the first object recognition model comprises a plurality of convolutional layers connected in a connection order, the first convolutional layer being a first one of the convolutional layers that is indicated by the connection order, the third convolutional layer being a last one of the convolutional layers that is indicated by the connection order, and the second convolutional layer being any of the convolutional layers other than the first one of the convolutional layers and the last one of the convolutional layers. 
     
     
       7. The method according to  claim 1 , further comprising:
 acquiring a reference image comprising the tracked object, and determining, based on the reference image, a positive sample and a negative sample for the training, the positive sample being an image comprising the tracked object, the negative sample being an image not comprising the tracked object, the positive sample comprising a positive sample tracking label of the tracked object, the negative sample comprising a negative sample tracking label of the tracked object, and the reference image comprising marking information of the tracked object; 
 invoking the updated first object recognition model to recognize the positive sample to obtain a positive sample recognition response, and invoking the updated first object recognition model to recognize the negative sample to obtain a negative sample recognition response; 
 tracking the positive sample recognition response to obtain a positive sample tracking response in the positive sample to the tracked object, and tracking the negative sample recognition response to obtain a negative sample tracking response in the negative sample to the tracked object; and 
 training the updated first object recognition model based on difference information between the positive sample tracking response and the positive sample tracking label and difference information between the negative sample tracking response and the negative sample tracking label. 
 
     
     
       8. The method according to  claim 7 , wherein the training the updated first object recognition model based on difference information between the positive sample tracking response and the positive sample tracking label and difference information between the negative sample tracking response and the negative sample tracking label comprises:
 acquiring a tracking loss optimization function; 
 determining a value of the tracking loss optimization function based on the difference information between the positive sample tracking response and the positive sample tracking label and the difference information between the negative sample tracking response and the negative sample tracking label; and 
 updating the updated first object recognition model in such a way that the value of the tracking loss optimization function is minimized. 
 
     
     
       9. The method according to  claim 7 , further comprising:
 acquiring a to-be-processed image, and determining, according to the marking information of the tracked object in the reference image, a predicted tracked object comprised in the to-be-processed image; 
 invoking the updated first object recognition model to recognize the tracked object in the reference image to obtain a first recognition feature; 
 invoking the updated first object recognition model to recognize the predicted tracked object in the to-be-processed image to obtain a second recognition feature; and 
 determining, based on the first recognition feature and the second recognition feature, a target feature for tracking, and tracking the target feature by using a tracking algorithm to obtain position information of the tracked object in the to-be-processed image. 
 
     
     
       10. A computing device, further comprising:
 a processor configured to implement one or more instructions; and 
 a computer-readable storage medium, storing one or more instructions, the one or more instructions being configured to be executed by the processor to perform a plurality of operations including: 
 acquiring a template image and a test image for the training, the template image and the test image each comprising a tracked object, the test image comprising a tracking label of the tracked object, the tracking label being used for indicating a marking position of the tracked object in the test image; 
 invoking a first object recognition model to recognize a feature of the tracked object in the template image to obtain a first reference response, and invoking a second object recognition model to recognize the feature of the tracked object in the template image to obtain a second reference response; 
 invoking the first object recognition model to recognize a feature of the tracked object in the test image to obtain a first test response, and invoking the second object recognition model to recognize the feature of the tracked object in the test image to obtain a second test response; 
 tracking the first test response to obtain a tracking response of the tracked object, the tracking response being used for indicating a tracking position of the tracked object in the test image; and 
 updating the first object recognition model based on difference information between the first reference response and the second reference response, difference information between the first test response and the second test response, and difference information between the tracking label and the tracking response. 
 
     
     
       11. The computing device according to  claim 10 , wherein the plurality of operations further comprise:
 acquiring the second object recognition model; and 
 trimming the second object recognition model to obtain the first object recognition model. 
 
     
     
       12. The computing device according to  claim 10 , wherein the updating the first object recognition model based on difference information between the first reference response and the second reference response, difference information between the first test response and the second test response, and difference information between the tracking label and the tracking response comprises:
 acquiring a loss optimization function corresponding to the first object recognition model; 
 determining a value of the loss optimization function based on the difference information between the first reference response and the second reference response, the difference information between the first test response and the second test response, and the difference information between the tracking label and the tracking response; and 
 updating the first object recognition model in such a way that the value of the loss optimization function is minimized. 
 
     
     
       13. The computing device according to  claim 12 , wherein the loss optimization function comprises a feature recognition loss function and a tracking loss function, and the determining a value of the loss optimization function based on the difference information between the first reference response and the second reference response, the difference information between the first test response and the second test response, and the difference information between the tracking label and the tracking response comprises:
 acquiring the feature recognition loss function, and determining a value of the feature recognition loss function based on the difference information between the first reference response and the second reference response and the difference information between the first test response and the second test response; 
 acquiring the tracking loss function, and determining a value of the tracking loss function based on the difference information between the tracking label and the tracking response; and 
 determining the value of the loss optimization function based on the value of the feature recognition loss function and the value of the tracking loss function. 
 
     
     
       14. The computing device according to  claim 13 , wherein the first object recognition model comprises a first convolutional layer, a second convolutional layer, and a third convolutional layer, the first test response being obtained by fusing a first test sub-response corresponding to the first convolutional layer, a second test sub-response corresponding to the second convolutional layer, and a third test sub-response corresponding to the third convolutional layer; and the determining a value of the tracking loss function based on the difference information between the tracking label and the tracking response comprises:
 determining a tracking loss value of the first convolutional layer based on difference information between a first tracking label corresponding to the first convolutional layer and a first tracking response obtained by tracking the first test sub-response; 
 determining a tracking loss value of the second convolutional layer based on difference information between a second tracking label corresponding to the second convolutional layer and a second tracking response obtained by tracking the second test sub-response; 
 determining a tracking loss value of the third convolutional layer based on difference information between a third tracking label corresponding to the third convolutional layer and a third tracking response obtained by tracking the third test sub-response; and 
 fusing the tracking loss value corresponding to the first convolutional layer, the tracking loss value corresponding to the second convolutional layer, and the tracking loss value corresponding to the third convolutional layer to obtain the value of the tracking loss function, wherein 
 the first tracking response, the second tracking response, and the third tracking response have different resolutions. 
 
     
     
       15. The computing device according to  claim 14 , wherein the first object recognition model comprises a plurality of convolutional layers connected in a connection order, the first convolutional layer being a first one of the convolutional layers that is indicated by the connection order, the third convolutional layer being a last one of the convolutional layers that is indicated by the connection order, and the second convolutional layer being any of the convolutional layers other than the first one of the convolutional layers and the last one of the convolutional layers. 
     
     
       16. The computing device according to  claim 10 , wherein the plurality of operations further comprise:
 acquiring a reference image comprising the tracked object, and determining, based on the reference image, a positive sample and a negative sample for the training, the positive sample being an image comprising the tracked object, the negative sample being an image not comprising the tracked object, the positive sample comprising a positive sample tracking label of the tracked object, the negative sample comprising a negative sample tracking label of the tracked object, and the reference image comprising marking information of the tracked object; 
 invoking the updated first object recognition model to recognize the positive sample to obtain a positive sample recognition response, and invoking the updated first object recognition model to recognize the negative sample to obtain a negative sample recognition response; 
 tracking the positive sample recognition response to obtain a positive sample tracking response in the positive sample to the tracked object, and tracking the negative sample recognition response to obtain a negative sample tracking response in the negative sample to the tracked object; and 
 training the updated first object recognition model based on difference information between the positive sample tracking response and the positive sample tracking label and difference information between the negative sample tracking response and the negative sample tracking label. 
 
     
     
       17. The computing device according to  claim 16 , wherein the training the updated first object recognition model based on difference information between the positive sample tracking response and the positive sample tracking label and difference information between the negative sample tracking response and the negative sample tracking label comprises:
 acquiring a tracking loss optimization function; 
 determining a value of the tracking loss optimization function based on the difference information between the positive sample tracking response and the positive sample tracking label and the difference information between the negative sample tracking response and the negative sample tracking label; and 
 updating the updated first object recognition model in such a way that the value of the tracking loss optimization function is minimized. 
 
     
     
       18. The computing device according to  claim 16 , wherein the plurality of operations further comprise:
 acquiring a to-be-processed image, and determining, according to the marking information of the tracked object in the reference image, a predicted tracked object comprised in the to-be-processed image; 
 invoking the updated first object recognition model to recognize the tracked object in the reference image to obtain a first recognition feature; 
 invoking the updated first object recognition model to recognize the predicted tracked object in the to-be-processed image to obtain a second recognition feature; and 
 determining, based on the first recognition feature and the second recognition feature, a target feature for tracking, and tracking the target feature by using a tracking algorithm to obtain position information of the tracked object in the to-be-processed image. 
 
     
     
       19. A non-transitory computer-readable storage medium, storing computer program instructions, the computer program instructions, when executed by a processor of a computing device, causing the computing device to perform a plurality of operations including:
 acquiring a template image and a test image for the training, the template image and the test image each comprising a tracked object, the test image comprising a tracking label of the tracked object, the tracking label being used for indicating a marking position of the tracked object in the test image; 
 invoking a first object recognition model to recognize a feature of the tracked object in the template image to obtain a first reference response, and invoking a second object recognition model to recognize the feature of the tracked object in the template image to obtain a second reference response; 
 invoking the first object recognition model to recognize a feature of the tracked object in the test image to obtain a first test response, and invoking the second object recognition model to recognize the feature of the tracked object in the test image to obtain a second test response; 
 tracking the first test response to obtain a tracking response of the tracked object, the tracking response being used for indicating a tracking position of the tracked object in the test image; and 
 updating the first object recognition model based on difference information between the first reference response and the second reference response, difference information between the first test response and the second test response, and difference information between the tracking label and the tracking response. 
 
     
     
       20. The non-transitory computer-readable storage medium according to  claim 19 , wherein the updating the first object recognition model based on difference information between the first reference response and the second reference response, difference information between the first test response and the second test response, and difference information between the tracking label and the tracking response comprises:
 acquiring a loss optimization function corresponding to the first object recognition model; 
 determining a value of the loss optimization function based on the difference information between the first reference response and the second reference response, the difference information between the first test response and the second test response, and the difference information between the tracking label and the tracking response; and 
 updating the first object recognition model in such a way that the value of the loss optimization function is minimized.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.