IP Library Granted Patent US 12,437,516
Granted Patent B2
US 12,437,516 · App. 18/317,889 · Granted Oct 7, 2025

Method and system for adaptation of a trained object detection model to account for domain shift

Inventors: Rindranirina Ramamonjison (Burnaby, CA); Amin Banitalebi Dehkordi (Vancouver, CA); Xinyu Kang (Vancouver, CA); Yong Zhang (Vancouver, CA)
Assignee: HUAWEI CLOUD COMPUTING TECHNOLOGIES CO., LTD.
G06V10/774G06V10/764G06V10/82
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,437,516
App. No.
18/317,889
Granted
Oct 7, 2025
Kind
B2
Abstract

The present disclosure provides a method and system for adapting a machine learning model, such as an object detection model, to account for domain shift. The method includes receiving a labeled data elements and target image samples and performing a plurality of model adaptation epochs. Each adaptation epoch includes: predicting for each of the target image samples, using the machine learning model configured by a current set of configuration parameters, a corresponding target class label for the respective target data object included in the target image sample; generating a plurality of labeled mixed data elements that each include: (i) a mixed image sample including a source data object from one of the source image samples and a target data object from one of the target image samples, and (ii) the corresponding source class label for the source data object and the corresponding target class label for the target data object. The method also includes adjusting the current set of configuration parameters to minimize a loss function for the machine learning model for the plurality of mixed data elements. The method results in adapted machine learning model that accounts for domain shift and that has improved performance at inference on new target image samples.

Claims (65)

1. A computer implemented method for adapting a machine learning model that is configured by a learned set of configuration parameters, comprising:

receiving a plurality of labeled data elements that each include: (i) a source image sample including a respective source data object, and (ii) a corresponding source class label for the respective source data object;

receiving a plurality of target image samples each including a respective target data object;

performing a plurality of model adaptation epochs, wherein for an initial model adaptation epoch the learned set of configuration parameters is used as a current set of configuration parameters for the machine learning model, each model adaptation epoch comprising:

predicting for each of the plurality of targets image samples, using the machine learning model configured by the current set of configuration parameters, a corresponding target class label for the respective target data object included in the target image sample;

generating a plurality of labeled mixed data elements that each include: (i) a mixed image sample including a source data object from one of the source image samples and a target data object from one of the target image samples, and (ii) the corresponding source class label for the source data object and the corresponding target class label for the target data object; and

adjusting the current set of configuration parameters to minimize a loss function for the machine learning model for the plurality of labeled mixed data elements;

and

when performing the plurality of model adaptation epochs is completed, outputting the current set of configuration parameters as a final set of adapted configuration parameters for the machine learning model.

2. The method of claim 1 wherein the machine learning model comprises a plurality of first type layers performing a first type of computation and a plurality of second type layers performing a second type of computation, the first type layers being configured by a first group of the configuration parameters and the second type layers being configured by a second group of the configuration parameters, wherein for an initial set of the plurality of model adaptation epochs, adjusting the current set of configuration parameters comprises adjusting the second group of the configuration parameters while maintaining constant values for the first group of the configuration parameters; and for a further set of the plurality of model adaptation epochs, adjusting the current set of configuration parameters comprises adjusting the both first group of the configuration parameters and the second group of the configuration parameters.

3. The method of claim 2 wherein the first type layers perform matrix multiplication computations, the first group of the configuration parameters including weights for the matrix multiplication computations; and the second type layers perform batch normalization computations, the second group of configuration parameters including batch normalization beta and gamma parameters.

4. The method of claim 2 wherein the machine learning model is a deep learning neural network model comprising multiple network computational blocks that each include one of the first type of layers and one of the second type of layers.

5. The method of claim 1 wherein:

the data elements each include a source bounding box definition associated with each source class label to indicate a location of the respective source data object within the source image sample;

the mixed image samples are each composite image samples that include image portions from one of the source image samples and from one of the target image samples; and

for each model adaptation epoch,

predicting for each of the plurality of target image samples also comprises predicting a target bounding box definition associated with the corresponding target class label, the target bounding box indicating a location of the respective target data object within the target image sample;

the plurality of labeled mixed data elements each include: (i) a corresponding source bounding box definition that indicates a location of the at least one source data object within the mixed image sample of the labeled mixed data element; (ii) a corresponding target bounding box definition that indicates a location of the at least one target data object within the mixed image sample of the labeled mixed data element.

6. The method of claim 1 wherein at least some of the mixed image samples of the plurality of mixed data elements include a plurality of source data objects from one or more of the source image samples, and a plurality of target data objects from one or more of the target image samples, and the mixed data elements each include corresponding source class labels for each source data object included in the mixed image sample of the mixed data element and corresponding target class labels for each target data object included in the mixed image sample of the mixed data element.

7. The method of claim 1 wherein adjusting the current set of configuration parameters to minimize a loss function for the machine learning model is performed over a set of iterations that are performed for a respective batch of the of labeled mixed data elements.

8. The method of claim 1 further comprising adapting a second machine learning model that is configured by a learned set of second configuration parameters by:

using the machine learning model with the final set of adapted configuration parameters to predict, for each of the plurality of targets image samples, a corresponding target class label for the respective target data object included in the target image sample;

generating a further plurality of labeled mixed data elements that each include: (i) a mixed image sample including a source data object from one of the source image samples and a target data object from one of the target image samples, and (ii) the corresponding source class label for the source data object and the corresponding target class label for the target data object; and

adjusting the set of second configuration parameters to minimize a loss function for the second machine learning model for the further plurality of labeled mixed data elements.

9. The method of claim 8 wherein the second machine learning model has a smaller neural network size than the machine learning model with the final set of adapted configuration parameters.

10. The method of claim 1 further comprising:

receiving a request through a network from computing device to adapt the machine learning model that is configured by a learned set of configuration parameters; and

returning the final set of adapted configuration parameters for the machine learning model to the requesting computer device.

11. The method of claim 1 wherein generating the plurality of labeled mixed data elements includes downscaling a source image portion that includes the source data object.

12. A processing system for adapting a machine learning model that is configured by a learned set of configuration parameters, the processing system, including one or more processing circuits and one or more non-volatile memories storing computer software instructions that, when executed by the one or more processing circuits, configure the processing system to:

receive a plurality of labeled data elements that each include: (i) a source image sample including a respective source data object, and (ii) a corresponding source class label for the respective source data object;

receive a plurality of target image samples each including a respective target data object;

perform a plurality of model adaptation epochs, wherein for an initial model adaptation epoch the learned set of configuration parameters is used as a current set of configuration parameters for the machine learning model, each model adaptation epoch comprising:

predicting for each of the plurality of targets image samples, using the machine learning model configured by the current set of configuration parameters, a corresponding target class label for the respective target data object included in the target image sample;

generating a plurality of labeled mixed data elements that each include: (i) a mixed image sample including a source data object from one of the source image samples and a target data object from one of the target image samples, and (ii) the corresponding source class label for the source data object and the corresponding target class label for the target data object; and

adjusting the current set of configuration parameters to minimize a loss function for the machine learning model for the plurality of labeled mixed data elements;

and

when the plurality of model adaptation epochs are completed, output the current set of configuration parameters as a final set of adapted configuration parameters for the machine learning model.

13. The system of claim 12 wherein the machine learning model comprises a plurality of first type layers performing a first type of computation and a plurality of second type layers performing a second type of computation, the first type layers being configured by a first group of the configuration parameters and the second type layers being configured by a second group of the configuration parameters, wherein for an initial set of the plurality of model adaptation epochs, adjusting the current set of configuration parameters comprises adjusting the second group of the configuration parameters while maintaining constant values for the first group of the configuration parameters; and for a further set of the plurality of model adaptation epochs, adjusting the current set of configuration parameters comprises adjusting the both first group of the configuration parameters and the second group of the configuration parameters.

14. The system of claim 13 wherein the first type layers perform matrix multiplication computations, the first group of the configuration parameters including weights for the matrix multiplication computations; and the second type layers perform batch normalization computations, the second group of configuration parameters including batch normalization beta and gamma parameters.

15. The system of claim 13 wherein the machine learning model is a deep learning neural network model comprising multiple network computational blocks that each include one of the first type of layers and one of the second type of layers.

16. The system of claim 12 wherein:

the data elements each include a source bounding box definition associated with each source class label to indicate a location of the respective source data object within the image sample;

the mixed image samples are each composite image samples that include image portions from one of the source image samples and from one of the target image samples; and

for each model adaptation epoch,

predicting for each of the plurality of target image samples also comprises predicting a target bounding box definition associated with the corresponding target class label, the target bounding box indicating a location of the respective target data object within the target image sample;

the plurality of labeled mixed data elements each include: (i) a corresponding source bounding box definition that indicates a location of the at least one source data object within the mixed image sample of the labeled mixed data element; (ii) a corresponding target bounding box definition that indicates a location of the at least one target data object within the mixed image sample of the labeled mixed data element.

17. The system of claim 12 wherein at least some of the mixed image samples of the plurality of mixed data elements include a plurality of source data objects from one or more of the source image samples, and a plurality of target data objects from one or more of the target image samples, and the mixed data elements each include corresponding source class labels for each source data object included in the mixed image sample of the mixed data element and corresponding target class labels for each target data object included in the mixed image sample of the mixed data element.

18. The system of claim 12 wherein the computer software instructions, when executed by the one or more processing circuits, further configure the processing system to: adapt a second machine learning model that is configured by a learned set of second configuration parameters by:

using the machine learning model with the final set of adapted configuration parameters to predict, for each of the plurality of targets image samples, a corresponding target class label for the respective target data object included in the target image sample;

generating a further plurality of labeled mixed data elements that each include: (i) a mixed image sample including a source data object from one of the source image samples and a target data object from one of the target image samples, and (ii) the corresponding source class label for the source data object and the corresponding target class label for the target data object; and

adjusting the set of second configuration parameters to minimize a loss function for the second machine learning model for the further plurality of labeled mixed data elements,

wherein the second machine learning model has a smaller neural network size than the machine learning model with the final set of adapted configuration parameters.

19. The system of claim 12 wherein the computer software instructions, when executed by the one or more processing circuits, further configure the processing system to:

receive a request through a network from computing device to adapt the machine learning model that is configured by a learned set of configuration parameters; and

return the final set of adapted configuration parameters for the machine learning model to the requesting computer device.

20. A non-transitory computer readable medium storing computer software instructions that, when executed by the one or more processing circuits of a processing system, cause the processing system to perform a method for adapting a machine learning model that is configured by a learned set of configuration parameters, the method comprising:

receiving a plurality of labeled data elements that each include: (i) a source image sample including a respective source data object, and (ii) a corresponding source class label for the respective source data object;

receiving a plurality of target image samples each including a respective target data object;

performing a plurality of model adaptation epochs, wherein for an initial model adaptation epoch the learned set of configuration parameters is used as a current set of configuration parameters for the machine learning model, each model adaptation epoch comprising:

predicting for each of the plurality of targets image samples, using the machine learning model configured by the current set of configuration parameters, a corresponding target class label for the respective target data object included in the target image sample;

generating a plurality of labeled mixed data elements that each include: (i) a mixed image sample including a source data object from one of the source image samples and a target data object from one of the target image samples, and (ii) the corresponding source class label for the source data object and the corresponding target class label for the target data object; and

adjusting the current set of configuration parameters to minimize a loss function for the machine learning model for the plurality of labeled mixed data elements;

and

when performing the plurality of model adaptation epochs is completed, outputting the current set of configuration parameters as a final set of adapted configuration parameters for the machine learning model.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 15, 2023
From: RAMAMONJISON, RINDRANIRINA; BANITALEBI DEHKORDI, AMIN; KANG, XINYU; ZHANG, YONG
To: HUAWEI CLOUD COMPUTING TECHNOLOGIES CO., LTD.
Reel/Frame 063648/0133 →
Continuity (3)
Continuation PCTCA2021051625 · Nov 16, 2021
Provisional Application 63114367 · Nov 16, 2020
Related Publication 20230281974A1 · Sep 7, 2023
References Cited (27)
US 10719301B1 · Dasgupta et al. · 2020 [cited by applicant]
US 20200242771A1 · Park et al. · 2020 [cited by applicant]
US 20200249674A1 · Dally et al. · 2020 [cited by applicant]
US 20200327029A1 · Prakash et al. · 2020 [cited by applicant]
US 20200334520A1 · Chen · 2020 [cited by examiner]
EP 3731144A1 · 2020 [cited by applicant]
Sankaranarayanan, Swami et al. “Generate to adapt: Aligning domains using generative adversarial networks”, Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8503-8512 2018. [cited by applicant]
Sun, Baochen and Saenko, Kate, “Deep coral: Correlation alignment for deep domain adaptation”, European conference on computer vision, pp. 443-450 2016. [cited by applicant]
Tzeng, Eric et al. “Deep domain confusion: Maximizing for domain invariance”, arXiv preprint arXiv:1412.3474 2014. [cited by applicant]
Long, Mingsheng et al. “Learning transferable features with deep adaptation networks”, International conference on machine learning, pp. 97-105 2015. [cited by applicant]
Gretton, Arthur et al. “A kernel two-sample test”, The Journal of Machine Learning Research, vol. 13, No. 1, pp. 723-773 2012. [cited by applicant]
Russo, Paolo et al. “From source to target and back: symmetric bi-directional adaptive gan”, Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8099-8108 2018. [cited by applicant]
Bousmalis, Konstantinos et al. “Unsupervised pixel-level domain adaptation with generative adversarial networks”, Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3722-3731 2017. [cited by applicant]
Hendrycks, Dan and Dietterich, Thomas, “Benchmarking neural network robustness to common corruptions and perturbations”, arXiv preprint arXiv:1903.12261 2019. [cited by applicant]
Michaelis, Claudio et al. “Benchmarking robustness in object detection: Autonomous driving when winter is coming”, arXiv preprint arXiv:1907.07484 2019. [cited by applicant]
Kamann, Christoph and Rother, Carsten, “Benchmarking the Robustness of Semantic Segmentation Models with Respect to Common Corruptions”, International Journal of Computer Vision, pp. 1-22 2020. [cited by applicant]
Kamann, Christoph and Rother, Carsten, “Benchmarking the Robustness of Semantic Segmentation Models”, Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8828-8838 2020. [cited by applicant]
Hendrycks, Dan et al. “The many faces of robustness: A critical analysis of out-of-distribution generalization”, arXiv preprint arXiv:2006.16241 2020. [cited by applicant]
Hendrycks, Dan et al. “Augmix: A simple data processing method to improve robustness and uncertainty”, arXiv preprint arXiv:1912.02781 2019. [cited by applicant]
Cygert, Sebastian and Czyewski, Andrzej, “Toward Robust Pedestrian Detection With Data Augmentation”, vol. 8, pp. 136674-136683 2020. [cited by applicant]
Rusak, Evgenia et al. “A simple way to make neural networks robust against diverse image corruptions”, European Conference on Computer Vision, ECCV 2020. [cited by applicant]
Schneider, Steffen et al. “Improving robustness against common corruptions by covariate shift adaptation”, arXiv preprint arXiv:2006.16971 2020. [cited by applicant]
Benz, Philipp et al. “Revisiting Batch Normalization for Improving Corruption Robustness”, arXiv preprint arXiv:2010.03630 2020. [cited by applicant]
French, Geoffrey et al. “Self-ensembling for visual domain adaptation”, ICLR 2018. [cited by applicant]
Sohn, Kihyuk et al. “A Simple Semi-Supervised Learning Framework for Object Detection”, arXiv preprint arXiv:2005.04757 2020. [cited by applicant]
Zhang, Hongyi et al. “mixup: Beyond empirical risk minimization”, arXiv preprint arXiv:1710.09412 2017. [cited by applicant]
Ramamonjison R, et al. SimROD: A Simple Adaptation Method for Robust Object Detection .arXiv preprint arXiv:2107.13389, Jul. 28, 2021 total 25 pages. [cited by applicant]