$35
Task Description - Domain Adaptation
● Imagine you want to do tasks related to the 3D environment, and then discover that…
○ 3D images are difficult to mark and therefore expensive.
○ Simulated images (such as simulated scene on GTA-5) are easy to label.
Why not just train on simulated images?
Task Description - Domain Adaptation
Net (D)
Net (U)
Feat A
Output
????
????
● For Net, the input is “abnormal”, which makes Net doesn’t work properly.
???
Task Description - Domain Adaptation
Net (D)
Net (U)
Output
Output
● Therefore, one simple way to solve this problem is to make the distributions of FeatA and FeatB similar.
similar
Task Description - Domain Adaptation
● Our task: Given real images (with labels) and drawing images (without labels), please use domain adaptation technique to make your network predict the drawing images correctly.
Dataset
●
Label: 10 classes (numbered from 0 to 9), as following pictures discribed.
● Training : 5000 (32, 32) RGB real images (with label). ● Testing : 100000 (28, 28) gray scale drawing images.
Data Format
● Unzip real_or_drawing.zip, the data format is as below: ● real_or_drawing/
○ train_data/
■ 0/
● 0.bmp, 1.bmp … 499.bmp
■ 1/
● 500.bmp, 501.bmp … 999.bmp
■ … 9/
○ test_data/
■ 0/
● 00000.bmp
● 00001.bmp
● … 99999.bmp
Data Format
● You can simply use the following code to get dataloader after extracting the zip. (You can apply your own source/target transform function.)
source_dataset = ImageFolder('real_or_drawing/train_data', transform=source_transform) target_dataset = ImageFolder('real_or_drawing/test_data', transform=target_transform)
source_dataloader = DataLoader(source_dataset, batch_size=32, shuffle=True) target_dataloader = DataLoader(target_dataset, batch_size=32, shuffle=True) test_dataloader = DataLoader(target_dataset, batch_size=1