transfer learning and domain adaptation...transfer learning same domain, different task...

22
Transfer Learning and Domain Adaptation Prof. Leal-Taixé and Prof. Niessner 1

Upload: others

Post on 04-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Transfer Learning and

Domain AdaptationProf. Leal-Taixé and Prof. Niessner 1

Page 2: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Biggest Criticism of Computer Vision

Works on constructed datasets, but not in the real world…

… and that’s also true for deep learning

Prof. Leal-Taixé and Prof. Niessner 2

Page 3: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

E.g., Multi-Dataset Efforts

Prof. Leal-Taixé and Prof. Niessner 3

Robust Vision Challenge: CVPR’18 [Geiger/Niessner/Pollefeys/Rother et al.]

Page 4: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Transfer Learning & Domain Adaptation• Task

– Image Classification– Image Segmentation– Object Instance Segmentation– …

• Domain– Real data

• Real != real: webcam model 1 vs webcam model 2; day vs night– Synthetic data

• E.g., rasterization vs – …

Prof. Leal-Taixé and Prof. Niessner 4

Page 5: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Transfer Learning & Domain Adaptation

Prof. Leal-Taixé and Prof. Niessner 5Source: wikipedia

Page 6: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Transfer LearningSame domain, different task• Pre-trained Image Net (visual domain of real images)

– Train on image classification

• Fine-tune on new task – E.g., semantic image segmentation– > keep ‘backbone the same, fine-tune ‘head’ layers– > assumption: visual features generalize within domain

Prof. Leal-Taixé and Prof. Niessner 6

Page 7: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Transfer LearningSame task, different domain• Pre-trained Image Net (visual domain of real images)

– Train on image classification

• Fine-tune on new task – Now need to train *entire* network, cuz input features will

be different– Training only a few layers at the end is less likely to

fundamentally solve it

Prof. Leal-Taixé and Prof. Niessner 7

Page 8: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Fine Tuning• How much labeled data in the target domain?

– Zero-shot learning– One-shot learning– Few-shot learning

• Just ‘throwing in as much data as we can’ seems somewhat unsatisfactory…

Prof. Leal-Taixé and Prof. Niessner 8

Page 9: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Domain Adaption

Prof. Leal-Taixé and Prof. Niessner 9

Page 10: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Applications to different types of domain shift

From simulated to real control

From dataset to dataset From RGB to depth

From CAD models to real images

Slide Credit: Kate Saenko

Page 11: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

backpack chair bike

Source Data + Labels

Unlabeled Target Data

?

Cla

ssifie

r

classification

loss

Adversarial domain adaptation

conv1 conv5fc

6

fc

7

conv1 conv5fc

6

fc

7

Slide Credit: Kate Saenko

Page 12: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

backpack chair bike

Source Data + Labels

Unlabeled Target Data

?

Encoder

Cla

ssifie

r

Encoderclassification

loss

Adversarial domain adaptation

can be shared

Slide Credit: Kate Saenko

Page 13: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

backpack chair bike

Source Data + Labels

Unlabeled Target Data

?

Encoder

Cla

ssifie

r

Encoderclassification

loss

Adversarial domain adaptation

Discriminator Adversarial

loss

can be shared

Slide Credit: Kate Saenko

Page 14: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

backpack chair bike

Source Data + Labels

Unlabeled Target Data

?

Encoder

Cla

ssifie

r

Encoderclassification

loss

Adversarial domain adaptation

Discriminator Adversarial

loss

can be shared

Slide Credit: Kate Saenko

Page 15: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Before domain

confusion

After domain confusion

Results on Cityscapes to SF adaptation

FCNs in the Wild: Pixel-level Adversarial and Constraint-based Adaptation, Judy Hoffman, Dequan Wang, Fisher Yu, Trevor Darrell,

Arxiv 2016

Page 16: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Cycle-Consistent Adversarial Domain Adaptation

Prof. Leal-Taixé and Prof. Niessner 16CyCADA [Hoffman et al. 2018]

Page 17: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Cycle-Consistent Adversarial Domain Adaptation

Prof. Leal-Taixé and Prof. Niessner 17CyCADA [Hoffman et al. 2018]

Page 18: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Exam• Slides provide additional references (use them)

• Look up the important papers that we discussed

• Understanding of– high-level concepts – underlying math– architecture design

Prof. Leal-Taixé and Prof. Niessner 18

Page 19: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Administrative• Deadline for final projects

– Wed Feb 6th, 11:59pm– Submission via moodle– Submission must contain

• Code (results must be replicable)• 2-3 pages of final report (at most 1 page of text, rest results;

i.e., images and tables)• Use CVPR templates:

http://cvpr2019.thecvf.com/submission/main_conference/author_guidelines

Prof. Leal-Taixé and Prof. Niessner 19

Page 20: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Administrative• Poster presentation

– Friday Feb 8th, 1pm-3pm– Location:

• Magistrale (preliminary – will update if it changes)• In the area next to the back entrance (parking lot direction)

– Poster stands will be provided– You need to print posters yourself ([email protected])– Hang posters 15 mins before presentation session starts

Prof. Leal-Taixé and Prof. Niessner 20

Page 21: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Guest Speakers• Oriol Vinyals:

– https://ai.google/research/people/OriolVinyals– Time: January 31st, 6pm – 8pm– Location: HS-1 (CS building – the big one)

Prof. Leal-Taixé and Prof. Niessner 21

Page 22: Transfer Learning and Domain Adaptation...Transfer Learning Same domain, different task •Pre-trained Image Net (visual domain of real images) –Train on image classification •Fine-tune

Next Lectures

This was the last lecture

Prof. Leal-Taixé and Prof. Niessner 22