Method and apparatus for training a machine learning model
The active domain adaptation method addresses the challenge of adapting machine learning models to new domains by using a discriminator model to select dissimilar target domain data, thereby reducing annotation costs and improving performance.
Patent Information
- Application Number
- DE102024201225
- Authority / Receiving Office
- DE · DE
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-09
- Publication Date
- 2025-08-14
AI Technical Summary
Existing methods for domain adaptation in machine learning models are limited in scenarios where the goal is to adapt a model trained on a source domain to operate in a related target domain, particularly when target domain data is rare or has limited annotations, leading to reduced performance and high annotation costs.
An active domain adaptation method using a discriminator model to select target domain data with high dissimilarity to the source domain, incorporating domain adaptation knowledge into the active learning pipeline, thereby reducing annotation costs and improving model performance.
The method effectively selects informative target domain data for annotation, reducing costs and enhancing the performance of machine learning models in adapting to new domains.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] The invention relates to a method and a device for training a machine learning model. The invention relates to an inference method for object recognition, semantic segmentation, or classification. The invention further relates to a control unit. The invention also relates to a computer program with program code and a computer-readable data carrier with program code of a computer program. State of the art
[0002] In the digital age, the ability to efficiently adapt machine learning models to new, unfamiliar domains is crucial. This phenomenon, known as domain adaptation, is the subject of intensive research and has led to the development of various methods.
[0003] Various methods are available in the area of domain adaptation, including feature learning, style transfer, and graph neural networks. These methods aim to improve the performance of machine learning models when applied to unfamiliar domains. The use of foundation models is also well known. These models are trained with large amounts of multimodal data and have proven state-of-the-art for many downstream tasks. However, even with these large models, performance can be reduced due to a domain gap when applied to a new domain.
[0004] In parallel, the concept of active learning is in focus, which aims to select the most effective data from a target domain for annotation. However, traditional methods based on measures of model uncertainty reach their limits in domain adaptation scenarios. Therefore, it is necessary to develop new approaches aimed at bridging the gap between source and target domains.
[0005] Data selection strategies for active learning typically aim to identify the most meaningful data samples from the target domain for annotation. This is done, for example, based on measures of model uncertainty such as entropy, energy, distance, or model confidence. However, these methods are not well suited for domain adaptation scenarios, where the goal is to adapt a model trained on a source domain to perform in a specific, but related, target domain. In this case, new selection strategies based on the domain gap between the source and target domains must be applied, which are not possible in the usual active learning setup. It is advantageous to leverage the relationships between the source and target domains to place active learning in the context of domain adaptation.
[0006] Therefore, the next step in this evolutionary development chain was Active Domain Adaptation. This approach combines the principles of Active Learning with those of Domain Adaptation, aiming to optimize model performance in the target domain while using a limited annotation budget. Active Domain Adaptation can be useful when target domain data is rare or has a limited amount of annotated data, as it can help utilize available annotation resources as effectively as possible. Current techniques combine uncertainty with diversity samples, cluster the feature space based on simple and hard data samples, or have no connection to Domain Adaptation.
[0007] In many real-world scenarios, annotating large amounts of target data can be difficult and expensive. Therefore, it is important and cost-effective to develop active learning strategies that can select the most informative images for annotation, especially in the context of domain adaptation. In the paper by V. Prabhu, A. Chandrasekaran, K. Saenko, and J. Hoffman, "Active domain adaptation via clustering uncertainty-weighted embeddings," in Proceedings of the IEEE / CVF International Conference on Computer Vision, pp. 8505-8514, 2021, on active domain adaptation, the goal is to find the most diverse and uncertain data samples possible.
[0008] Even though some approaches are known from the state of the art, there is still potential for development.
[0009] Therefore, it is an object of the invention to propose an improved method for active domain adaptation.
[0010] The problem is solved by a method for training a machine learning model according to the features of patent claim 1. The problem is solved by an inference method according to the features of patent claim 11. The problem is solved by a device for training a machine learning model according to the features of patent claim 12. The problem is solved by a control device according to the features of patent claim 13. The problem is solved by a computer program with program code according to the features of patent claim 14. The problem is solved by a computer-readable data carrier with program code of a computer program according to the features of patent claim 15. Disclosure of the invention
[0011] According to a first aspect, a method for training a machine learning model, in particular for object recognition or semantic segmentation or classification, is proposed. The method comprises the steps: - Providing source domain data with associated source domain annotations; - Providing unannotated target domain data; - Evaluating, using a discriminator model, a respective target domain probability for each of the target domain data by comparing the target domain data with the source domain data; - Selecting a subset of the target domain data using a selection strategy based on the assessed target domain probabilities; - Annotating the selected subset of the target domain data using an annotation strategy for providing target domain annotations; - Training the machine learning model based on the selected subset of the target domain data and the respective associated target domain annotations or on the basis of the source domain data with respective associated source domain annotations and on the basis of the selected subset of the target domain data and the respective associated target domain annotations; and - Deploy the trained machine learning model.
[0012] It is understood that the steps according to the invention, as well as other optional steps, do not necessarily have to be performed in the order shown, but can also be performed in a different order. Furthermore, additional intermediate steps can be provided. The individual steps can also comprise one or more substeps without thereby departing from the scope of the method according to the invention.
[0013] According to a second aspect, a device for training a machine learning model is proposed. The device comprises an evaluation and / or computing device configured to perform the following steps: - Providing source domain data with associated source domain annotations; - Providing unannotated target domain data; - Evaluating, using a discriminator model, a respective target domain probability for each of the target domain data by comparing the target domain data with the source domain data; - Selecting a subset of the target domain data using a selection strategy based on the assessed target domain probabilities; - Annotating the selected subset of the target domain data using an annotation strategy for providing target domain annotations; - Training the machine learning model based on the selected subset of the target domain data and the respective associated target domain annotations or on the basis of the source domain data with respective associated source domain annotations and on the basis of the selected subset of the target domain data and the respective associated target domain annotations; and - Deploy the trained machine learning model.
[0014] The statements made for the method apply accordingly to the device. It is understood that linguistic modifications of procedurally formulated features can be reformulated for the device according to common linguistic practice, without such formulations having to be explicitly listed here.
[0015] Here, a source domain is defined that contains annotated data. Furthermore, a target domain is defined that contains unannotated data. A "domain" can, for example, characterize specific properties of data, e.g. properties of a camera lens and / or a sensor, and / or a group of environments and / or scenarios. Domains can also differ due to sensor generations and / or due to a data origin (synthetically rendered data vs. real data). The difference between the source domain and the target domain is preferably referred to here as the domain gap. Domain adaptation solves the problem of the domain gap by changing the way machine learning models, such as deep neural networks, are trained. In this approach, the machine learning models are trained to specifically recognize patterns that correspond across domains.This ensures that the model performs well even when applied to the target domain. There are basically several ways to perform domain adaptation, such as using adversarial style transfer, graph neural networks, or learning generic features of the data. All of these methods help deep learning models work better with data from different domains.
[0016] However, after using domain adaptation techniques to bridge the gap between domains, there is still a difference between training with target domain data, which is common practice, especially when annotations are available, and adapting the machine learning model from the source domain to the target domain. The present method improves active domain adaptation by effectively selecting target domain data for annotation and, if necessary, adding it to the already annotated source domain data.
[0017] The method differs from the state of the art in the way the target domain data is selected. Preference is given to those target domain data that differ most from the source domain data, especially in an implicit metric. For this purpose, a discriminatory model explicitly trained on the domain difference is used. The discriminator model allows knowledge about domain adaptation to be incorporated into the active learning pipeline. Furthermore, target domain data can be more effectively distinguished from source domain data and selected accordingly. Therefore, knowledge about domain adaptation can be incorporated into the iterative active learning cycle (incremental selection of the most effective unlabeled target domain data).In this way, training with combined annotated source and selected annotated target domain data achieves maximum performance gains with minimal annotation costs. In this case, the overall annotation costs can be reduced.
[0018] Here, we propose selecting a small amount of target domain data from the unlabeled target domain using the discriminator model or a domain classifier. The discriminator model distinguishes between data from the source and target domains. By using the output of the discriminator model, data that exhibits a predetermined difference from the source domain and thus has a particularly strong influence on domain-adaptive training can be selected. This can save annotation costs. Alternatively or additionally, the detection rate of object detectors can be improved.
[0019] The present method can achieve improved training. This is achieved through the active domain adaptation training data selection used here. The improved model training leads, for example, to better performance of domain-adaptive object detectors. The present method also reduces annotation costs because only relevant data is annotated. This can reduce the costs of manual annotation.
[0020] In one embodiment, the discriminator model calculates a score metric for each of the target domain data that evaluates how similar the respective target domain data is to the respective source domain data.
[0021] In one embodiment, the selection strategy selects the target domain data with the highest target domain probabilities as the subset. The target domain data with the highest target domain probabilities exhibits the greatest dissimilarity to the respective source domain data.
[0022] Other selection strategies are also conceivable, for example, target domain data can be selected for which the target domain probability exceeds a predetermined threshold.
[0023] In one embodiment, the discriminator model is selected from a GAN framework. Alternatively, the discriminator model is a CNN model or a transformer-based model, wherein the CNN model or the transformer-based model is preferably trained in a supervised manner.
[0024] A discriminator model is a key component of GANs. GANs are typically used to separate source and target domain data. In GANs, the so-called generator generates synthetic data, while a discriminator distinguishes between real data and the synthetic data. The discriminator is trained to classify data as originating from one of the two domains. During training, the generator attempts to generate target-like data, while the discriminator attempts to separate or distinguish the generated data from the original data. In the present method, preferably only the discriminator model originating from the GAN context or GAN framework is used. This discriminator model is trained to decide whether data originates from the source or target domain, or is trained to do so before the present training procedure.Such a discriminator can be used to generate or calculate the active learning scores or probabilities for all data in the target domain. Although multiple objectives are optimized simultaneously in this case, using the discriminator trained in this way has proven advantageous. Network and / or training architectures and / or underlying protocols can be adopted, for example, from known GAN approaches.
[0025] During training, the discriminator model used here is preferably trained based on data fragments, such as small image fragments, rather than on the entire data set. This reduces "hallucinations," since no global data content is visible to the discriminator model during training. During inference, or in the present training procedure, the trained discriminator model can calculate the target domain probabilities based on complete data, since the discriminator model is fundamentally designed to process any input variables.
[0026] Alternatively, a different discriminator model, which is preferably trained under supervision, can be used to separate or differentiate between source and target domain data. This discriminator model is preferably a machine learning model that is designed to decide, for any data format, whether it originates from the source or target domain. This is achieved, for example, by a CNN- or transformer-based discriminator model that can extract data information from the target domain data and predict a corresponding target domain probability that reflects the domain affiliation of the data. This target domain probability is then preferably compared with the source domain of the data. The weights of the discriminator model can be updated, preferably using a training loss value, such as a cross-entropy loss.
[0027] In both versions of the discriminator model, the data from the source and target domains are preferably used as training data for the discriminator model, with the annotation preferably reflecting the domain affiliation.
[0028] Compared to the GAN framework discriminator model, a supervised discriminator model does not require a generator's training objective to be met. Instead, the discriminator model can directly learn discriminator functions that can separate the source and target data.
[0029] In one embodiment, the source domain data and / or the target domain data comprise image data and / or video data and / or audio data and / or text data and / or time series data.
[0030] In principle, other data types that are not explicitly mentioned here are also conceivable.
[0031] In one embodiment, the target domain data is acquired by a camera and / or a lidar sensor and / or an infrared sensor and / or an ultrasonic sensor and / or a radar sensor.
[0032] In principle, other sensor types are also conceivable, so this list is not intended to be exhaustive. For example, sensors for capturing time series data could also be included, such as temperature, pressure, force, torque, acceleration, voltage, current, and capacitance sensors. Audio sensors, such as microphones, for capturing audio data should also be mentioned.
[0033] In one embodiment, the source domain data comprises synthetic data and / or virtually generated data.
[0034] Alternatively or additionally, the source domain data may also include labeled or annotated sensor data. The source domain data may be extracted from a virtual environment, such as a computer game or simulation, in which labels or annotations have already been automatically assigned to the data.
[0035] In one embodiment, the machine learning model is a foundation model that is trained in a fine-tuning process to adapt the foundation model to the target domain based on the selected subset of the target domain data and the respective associated target domain annotations.
[0036] The training method can therefore also be applied to foundation models to improve their final performance. This performance can be evaluated, for example, by incorporating newly labeled target domain data from the target domain into the training of the foundation model and measuring the performance improvement, preferably multiple times during training or after one or more training runs. In other words, after a possibly lengthy pre-training with large and / or variable data sets, foundation models are trained in fine-tuning based on target domain data extracted or reduced according to the invention. Therefore, the selection of a small fine-tuning dataset or the subset of target domain data can be aligned with a domain-adaptive, active learning strategy, whereby the most relevant data samples of the target domain data can be selected for the annotation of a fine-tuning dataset.
[0037] In one embodiment, after or during training of the machine learning model, an evaluation of a quality of a model performance or model performance takes place.
[0038] In one embodiment, the annotation strategy comprises manual annotation or at least partially automatic, in particular model-based, annotation of the subset of the target domain data.
[0039] Annotation can be performed manually by a domain expert or a user. For example, with image data, annotation can be performed by rendering bounding boxes. With time series data, annotation can be performed by specifying a state, such as OK or NOK. Annotation can also be performed automatically, for example, by a machine learning model or a neural network trained to annotate data.
[0040] The present invention also claims a control device which is used for a partially automated or automated driving function of a motor vehicle and / or a drone and / or in a robotics system and / or in an industrial machine and / or is used for optical inspection, and on which a machine learning model trained according to the invention can be executed.
[0041] This invention, or rather the machine learning model trained according to the invention, is relevant for all data processing-based applications where annotated target domain data is rare or non-existent. This is especially the case for driver assistance systems, fully automated driving, surveillance cameras, automation systems, or other areas where large amounts of data are required, for example, to train and apply assistance functions. The present training method can also be used for multimodal systems based, for example, on video data, lidar data, radar data, or any combination of these or other data. The data-efficient fine-tuning of large foundation models is also a use case, as described above.The selection of target domain data for this fine-tuning is relevant because, as a rule, target domain data that was not previously present in the Foundation model training dataset is sought in order to improve model performance. Fine-tuning can improve model performance for the task to be solved by the trained Foundation model for the target domain.
[0042] This invention preferably relates to an interface between active learning and domain adaptation, also referred to as active domain adaptation, in particular for autonomous driving systems but also other technical applications. The presently trained machine learning model can be used for object detection, semantic segmentation, and / or classification. Sensor modalities such as radar, lidar, or camera sensors are also possible. Autonomous driving systems are based on deep neural networks (DNNs) for object detection, semantic segmentation, and / or classification. However, these systems tend to suffer from reduced performance when applied to new environments or scenarios or a new target domain, especially when the data acquired in the target domain differs from the source domain data used in training the underlying machine learning model.
[0043] The present invention also claims a computer program with program code for executing at least parts of the method according to the invention in one of its embodiments when the computer program is executed on a computer. In other words, the invention relates to a computer program (product) comprising instructions that, when executed by a computer, cause the computer to execute the method / steps of the method according to the invention in one of its embodiments.
[0044] The present invention also proposes a computer-readable data carrier containing program code of a computer program for executing at least parts of the method according to the invention in one of its embodiments when the computer program is executed on a computer. In other words, the invention relates to a computer-readable (storage) medium comprising instructions which, when executed by a computer, cause the computer to execute the method / steps of the method according to the invention in one of its embodiments.
[0045] The described designs and further training courses can be combined as desired.
[0046] Further possible embodiments, developments and implementations of the invention also include combinations of features of the invention described previously or below with regard to the embodiments that are not explicitly mentioned. Short description of the drawings
[0047] The accompanying drawings are intended to provide a further understanding of embodiments of the invention. They illustrate embodiments and, in conjunction with the description, serve to explain principles and concepts of the invention.
[0048] Other embodiments and many of the aforementioned advantages will become apparent upon review of the drawings. The elements illustrated in the drawings are not necessarily drawn to scale.
[0049] They show: Fig. 1 is a schematic flow diagram of an embodiment of the present method; and Fig. 2 a schematic block diagram of an embodiment of the present method.
[0050] In the figures of the drawings, the same reference symbols designate the same or functionally identical elements, parts or components, unless otherwise stated.
[0051] Fig. 1 shows a schematic flow diagram of a method for training a machine learning model C1.
[0052] In any embodiment, the method can be carried out at least partially by a device 100, which for this purpose can comprise several components not shown in detail, for example one or more provision devices and / or at least one evaluation and computing device. It is understood that the provision device can be designed jointly with the evaluation and computing device or can be different from it. Furthermore, the device 100 can comprise a storage device and / or an output device and / or a display device and / or an input device. The device 100 can be part of a system.
[0053] The computer-implemented method comprises at least the following steps: In a step S1, source domain data A1 is provided with the corresponding source domain annotations A2.
[0054] In a step S2, non-annotated target domain data B1 is provided.
[0055] In a step S3, a respective target domain probability E2 is evaluated for each of the target domain data B1 using a discriminator model E1 by comparing the target domain data B1 with the source domain data A1. The evaluation S3 is preferably performed iteratively, ie, individually for each of the target domain data B1.
[0056] In a step S4, a subset B1* of the target domain data B1 is selected using a selection strategy D2 based on the evaluated target domain probabilities E2. The selection S4 is preferably performed iteratively, ie, for each evaluated target domain probability E2, in particular for all target domain data B1.
[0057] In a step S5, the selected subset B1* of the target domain data B1 is annotated using an annotation strategy D3 to provide target domain annotations B2*. The annotation preferably occurs for all target domain data B1 contained in the subset B1*.
[0058] In a step S6, the machine learning model C1 is trained on the basis of the selected subset B1* of the target domain data B1 and the respective associated target domain annotations B2* or on the basis of the source domain data A1 with respective associated source domain annotations A2 as well as on the basis of the selected subset B1* of the target domain data B1 and the respective associated target domain annotations B2*
[0059] In a step S7, the trained machine learning model C1 is provided, in particular in a machine-readable and performable form.
[0060] The learning model C1 trained in this way can then be used in an inference process. Such an inference process can be used for object recognition, semantic segmentation, or classification. The inference process then preferably comprises providing sensor data or other input data that is to be recognized, segmented, or classified. Furthermore, the inference process comprises recognizing an object or semantic segmentation or classification of the sensor data or input data using the trained machine learning model C1.
[0061] The trained machine learning model C1 can also be used or implemented in a control unit.
[0062] Fig.2 shows a schematic block diagram of an embodiment of the present training method. The training method preferably reflects an Active Domain Adaptation cycle. A source domain dataset comprising a set of source domain data A1 and the corresponding source domain annotations A2 is provided for the training method. This set of source domain data A1 is used, for example, to train or pre-train the machine learning model C1 for object recognition, semantic segmentation, or classification. Subsequently, the trained machine learning model C1 can also be evaluated in principle in order to calculate a quality of the model performance C2 or performance. Furthermore, an initially unannotated target domain dataset comprising a set of target domain data B1 is provided.In other words, there is initially only one set of target domain data B1 of the target domain, but no associated annotation information.
[0063] In this case, the evaluation metric D1 is then calculated for all data in the target domain data B1, which evaluates how closely the respective data in the target domain data B1 resembles the source domain data A1. Based on this evaluation metric D1, the selection strategy D2 is implemented, in which a target domain subset B1* is selected, which is then annotated, for example, using a manual or at least semi-automatic annotation strategy D3. In this process, annotations B2* are generated for the subset B1*.
[0064] The machine learning model C1 is then retrained, for example, based on the annotated source data A1 and A2 and the newly annotated target data B1* and B2*. Alternatively, the machine learning model C1 can also be retrained based solely on the newly annotated target data B1* and B2*. Model training C1 can therefore also be a fine-tuning on the selected subset B1* and B2*, whereby the model is not trained on the subset A1 and A2, for example, because the source domain is no longer of interest. This also applies, for example, to the fine-tuning of a foundation model, especially for a small target domain subset B1*.
[0065] In this case, the evaluation metric D1 is optimized using the discriminator model E1. The discriminator model E1 preferably compares the similarity of all target domain data B1 with the source domain data A1. The discriminator model E1 is preferably trained to separate the source domain data A1 from the target domain data B1. The discriminator model E1 outputs a target domain probability E2 (also called target domain scores) for all target domain data.
[0066] The target domain probabilities E2 are then passed to the selection strategy D2, which selects some target domain data, namely the subset B1*, based on the calculated target domain probabilities E2. Particular preference is given to selecting those data from the target domain data B1 that have the highest or largest target domain probabilities E2, since these data are furthest removed from the source domain data A1 already contained in the original source training dataset. This selection strategy D2 is exemplary, so other selection strategies D2 are also conceivable. QUOTES CONTAINED IN THE DESCRIPTION
[0000] This list of documents submitted by the applicant was generated automatically and is included solely for the convenience of the reader. This list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions. Cited non-patent literature
[0000] V. Prabhu, A. Chandrasekaran, K. Saenko, and J. Hoffman, “Active domain adaptation via clustering uncertainty-weighted embeddings,” in Proceedings of the IEEE / CVF International Conference on Computer Vision, pp. 8505-8514, 2021
[0007]
Claims
[1] Method for training a machine learning model (C1), in particular for object recognition or semantic segmentation or classification, the method comprising the steps: - Providing (S1) source domain data (A1) with associated source domain annotations (A2); - Providing (S2) unannotated target domain data (B1); - Evaluating (S3), by means of a discriminator model (E1), a respective target domain probability (E2) for each of the target domain data (B1) by comparing the target domain data (B1) with the source domain data (A1); - selecting (S4) a subset (B1*) of the target domain data (B1) by means of a selection strategy (D2) based on the evaluated target domain probabilities (E2); - annotating (S5) the selected subset (B1*) of the target domain data (B1) by means of an annotation strategy (D3) for providing target domain annotations (B2*); - Training (S6) the machine learning model (C1) on the basis of the selected subset (B1*) of the target domain data (B1) and the respective associated target domain annotations (B2*) or on the basis of the source domain data (A1) with respective associated source domain annotations (A2) and on the basis of the selected subset (B1*) of the target domain data (B1) and the respective associated target domain annotations (B2*); and - Providing (S7) the trained machine learning model (C1). [2] Method according to claim 1, wherein the discriminator model (E1) calculates an evaluation metric (D1) for each of the target domain data (B1), which evaluates how similar the respective target domain data (B1) are to the respective source domain data (A1). [3] Method according to claim 1 or 2, wherein the selection strategy (D2) selects the target domain data (B1) with the highest target domain probabilities (E2) as the subset (B1*), and wherein the target domain data (B1) with the highest target domain probabilities (E2) have the greatest dissimilarities to the respective source domain data (A1). [4] Method according to one of the preceding claims, wherein the discriminator model (E1) is selected from a GAN framework or comprises a CNN model or a transformer-based model, wherein the CNN model or the transformer-based model is preferably trained in a supervised manner. [5] Method according to one of the preceding claims, wherein the source domain data (A1) and / or the target domain data (B1) comprise image data and / or video data and / or audio data and / or text data and / or time series data. [6] Method according to one of the preceding claims, wherein the target domain data (B1) are acquired by a camera and / or a lidar sensor and / or an infrared sensor and / or an ultrasonic sensor and / or a radar sensor. [7] Method according to one of the preceding claims, wherein the source domain data (A1) comprises synthetic data and / or virtually generated data. [8] Method according to one of the preceding claims, wherein the machine learning model (C1) is a foundation model which is trained in a fine-tuning to adapt the foundation model to the target domain on the basis of the selected subset (B1*) of the target domain data (B1) and the respectively associated target domain annotations (B2*). [9] Method according to one of the preceding claims, wherein after or during the training of the machine learning model (C1) an evaluation of a quality of a model performance (C2) takes place. [10] Method according to one of the preceding claims, wherein the annotation strategy (D3) comprises a manual annotation or an at least partially automatic, in particular model-based, annotation of the subset (B1*) of the target domain data B1. [11] Inference method for object recognition, semantic segmentation or classification, the inference method comprising: Providing sensor data or other input data; Detecting an object or semantically segmenting or classifying the sensor data or input data by means of a machine learning model (C1) trained according to the method of any one of the preceding claims. [12] Device (100) for training a machine learning model (C1), the device (100) comprising an evaluation and / or computing device which is designed to carry out the following steps: - Providing source domain data (A1) with associated source domain annotations (A2); - Providing unannotated target domain data (B1); - Evaluating, by means of a discriminator model (E1), a respective target domain probability (E2) for each of the target domain data (B1) by comparing the target domain data (B1) with the source domain data (A1); - selecting a subset (B1*) of the target domain data (B1) using a selection strategy (D2) based on the evaluated target domain probabilities (E2); - annotating the selected subset (B1*) of the target domain data (B1) using an annotation strategy (D3) for providing target domain annotations (B2*); - Training the machine learning model (C1) on the basis of the selected subset (B1*) of the target domain data (B1) and the respective associated target domain annotations (B2*) or on the basis of the source domain data (A1) with respective associated source domain annotations (A2) as well as on the basis of the selected subset (B1*) of the target domain data (B1) and the respective associated target domain annotations (B2*); and - Deploy the trained machine learning model (C1). [13] Control unit for an automated driving function of a motor vehicle, an automated function of a drone, a robot and / or for an automated optical inspection of components and / or samples, wherein the control unit is designed to execute a machine learning model trained according to a method according to one of claims 1 to 10. [14] Computer program with program code to carry out at least parts of a method according to one of claims 1 to 11 when the computer program is executed on a computer. [15] Computer-readable data carrier with program code of a computer program for carrying out at least parts of a method according to one of claims 1 to 11 when the computer program is executed on a computer.