3D environment
3D model
Background image
Lighting and camera parameters
By default, computer vision models learn to extrapolate between domains
Domain randomization makes the model interpolate to the target domain

import random
from sklearn.datasets import make_blobs
light_intensity = random.uniform(0.1, 2)
X, _ = make_blobs(n_samples=100, centers=10, n_features=2)
Domain adaptation reduces the dissimilarity between domains
Pogorelov, K., Randel, K., Griwodz, C.,
Eskeland, S., Lange, T., Johansen, D., Spampinato, C., Dang-Nguyen, D.T., Lux, M., Schmidt, P.,
Riegler, M., & Halvorsen, P. (2017). KVASIR: A Multi-Class Image Dataset for Computer Aided Gastrointestinal
Disease Detection. In Proceedings of the 8th ACM on Multimedia Systems Conference
(pp. 164–169). ACM.
Zhu, J. Y., Park, T., Isola, P., & Efros, A. A.
(2017). Unpaired image-to-image translation using cycle-consistent adversarial
networks. In Proceedings of the IEEE international conference on computer vision
(pp. 2223-2232).
Chien-Hsiang Huang, Hung-Yu Wu, & Youn-Long Lin.
(2021). HarDNet-MSEG: A
Simple Encoder-Decoder Polyp Segmentation Neural Network that Achieves over 0.9 Mean Dice
and 86 FPS.
Taesung Park, Alexei A. Efros, Richard Zhang, &
Jun-Yan Zhu (2020). Contrastive Learning for Unpaired Image-to-Image Translation. In
European Conference on Computer Vision.
net_G = CutGenerator()
net_S = HarDMSEG()
adapted_image = net_G(synthetic_image)
prediction = net_S(adapted_image)
loss_G = criterion_G(adapted_image, synthetic_image)
loss_D = criterion_D(adapted_image, synthetic_image)
loss_S = criterion_S(prediction, synthetic_label)
loss_GAN = 0.1 * (loss_G + loss_D) + 0.9 * loss_S
loss_GAN.backward()