Skip to main content
Skip table of contents

Creating and Using Domain Adaptation

Domain Adaptation can make synthetic data useful by bridging the domain gap between a digital twin camera and your sensor. users train CycleGAN models for pixel level domain adaptation from raw synthetic data to domain adapted sythetic data. This tutorial will walk through the steps of uploading a GAN model to a workspace, and generating domain adapted datasets.

Read more about CycleGAN

Uploading a GAN Model supports PyTorch CycleGAN models for domain adaptation. Many of the models shown in the CycleGAN landing page linked above are available for download. For demonstration purposes, we will use the apple-to-orange pre-trained model available here:

To use the apple2orange.pth model, it must be added to your organization, and then associated with a workspace.

Add a Model to an Organization

Navigate to your organization’s GAN Models management space.

Open the new GAN Model configuration wizard

Under your organization (1), find the GAN Model section (2), and click the + New GAN Model button (3).

New GAN Model Dialog

In the new GAN model upload dialog, give the model a name and set the inference flags. The pre-trained CycleGAN models were trained with the --no_dropout flag, so it is required for inference.

Add a Model to a Workspace

Each workspace has various resources, such as channels, annotation maps, and GAN models. To manage these resources, navagate to the organization’s workspaces.

Workspaces List

From your workspaces manager (1), select the three vertical dots next to the workspace you want to edit, and select the Resources option (2).

GAN Model Manager for the Example Workspace

There are two models that come with the Example workspace. Add the new model from the Excluded list to the Included list.

Apple to Orange Transfiguration Model Included

Once the new model is associated with the Example workspace, click Save.

Create a Domain Adapted Dataset

The Example workspace comes pre-loaded with some datasets, and the one named Custom Objects is made up of images containing apples. To use the Apple to Orange Transfiguration CycleGAN model, create a GAN dataset based on Custom Objects.

Example Workspace Datasets

From the Librabries tab in the Example workspace (1), select the Custom Objects dataset (2), and open the wizard for creating a GAN dataset (3).

Create GAN Dataset Configuration

Give the new dataset a name, select the domain adaptation model, and, optionally, give it a description. When the job is complete take a look at the results.

Raw Synthetic Data Image

Domain Adapted Image

Congratulations! This model can be used in other workspaces or on other datasets. To generate GAN datasets in your ML pipeline, please take a look at our SDK.

SDK Documentation:

SDK Examples:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.