1 of 79

The Slow & Steady March for Generality in Vision

Tanmay Gupta | Research Scientist @ Allen AI

Enough of GPTs, we want GPVs!!

My computer can do 99 things, seeing well ain’t one ?!?!

2 of 79

General Purpose Systems

Build once

Reuse for several purposes w/o changing the system architecture

3 of 79

General Purpose Systems

 

Image

Class Label

 

Image

Caption

 

Image

Segmentation

Map

 

Image

Pose Keypoints

4 of 79

General Purpose Systems

 

Image

Output

Instruction

Classify this dog breed

Describe this image

Segment the cars, roads, and traffic signs

Localize the elbows and the knees

Class Label

Caption

Segmentation masks

Key points

5 of 79

ChatGPT �A General Purpose NLP System

In context learning

Describing an end task

6 of 79

Towards General Purpose Vision

Show & Tell. CVPR 2015

Specialized

models

Architecture designed for a single vision task

Pretraining +

Task Finetuning

Cross-modal pretraining. Finetuned separately

for each task.

VilBERT. Neurips 2019

Multitask Finetuning with task heads

Jointly finetuned for multiple tasks, with task-specific heads.

12-in-1. CVPR 2020

Shared V&L

Representations

SVLR. ICCV 2017

Learn aligned vision-language embeddings that are shared across tasks

7 of 79

Towards General Purpose Vision

Show & Tell. CVPR 2015

Specialized

models

Architecture designed for a single vision task

Pretraining +

Task Finetuning

Cross-modal pretraining. Finetuned separately

for each task.

VilBERT. Neurips 2019

Multitask Finetuning with task heads

Jointly finetuned for multiple tasks, with task-specific heads.

12-in-1. CVPR 2020

Shared V&L

Representations

SVLR. ICCV 2017

Learn aligned vision-language embeddings that are shared across tasks

How do we make V&L systems more “general-purpose”

?

8 of 79

GPV-1

Towards General Purpose Vision Systems: An End-to-End Task-Agnostic Vision-Language Architecture

Gupta et al. CVPR 2022

9 of 79

GPV-1

No more task specific branches

Use modality specific branches

10 of 79

GPV-1

No more task specific branches

Use modality specific branches

Visual input

Language input

Task instruction

11 of 79

GPV-1

No more task specific branches

Use modality specific branches

Cross modal fusion

12 of 79

GPV-1

No more task specific branches

Use modality specific branches

Bounding boxes + scores

Language output

Support tasks like

Captioning / VQA

Support tasks like

Loc / RefExp

13 of 79

Skill-Concept Generalization

Towards General Purpose Vision Systems: An End-to-End Task-Agnostic Vision-Language Architecture

Gupta et al. CVPR 2022

Model Perf.

Cat

Dog

VQA

Localization

Skills

Concepts

Seen Skill-Concepts

Model

VQA

Cap

Loc

Cls

Specialized Models

57.2

86.7

68.1

83.0

1-Task GPV-1

56.5

89.1

69.8

83.1

Multitask GPV-1

59.3

94.4

68.8

82.6

Unseen Skill-Concepts

Model

VQA

Cap

Loc

Cls

Specialized Models

45.2

50.1

7.4

0

1-Task GPV-1

41.9

52.4

16.4

0

Multitask GPV-1

47.7

56.0

25.0

5.4

14 of 79

GPV-1

Learn Skill

Learn Concepts

Model understands 80 concepts across 4 skills

How do we expand the concept vocab to 10K concepts?

15 of 79

Webly Supervised Concept Expansion for General Purpose Vision Models

Amita Kamath*, Chris Clark*, Tanmay Gupta*, Eric Kolve, Derek Hoiem, and Ani Kembhavi. ECCV 2022

GPV-2

Learn Skill

Learn Concepts

Use skill-concept generalization to transfer concepts from classification to other skills

16 of 79

Webly Supervised Concept Expansion for General Purpose Vision Models

Amita Kamath*, Chris Clark*, Tanmay Gupta*, Eric Kolve, Derek Hoiem, and Ani Kembhavi. ECCV 2022

17 of 79

Towards General Purpose Vision

Show & Tell. CVPR 2015

Specialized

models

Architecture designed for a single vision task

Pretraining +

Task Finetuning

Cross-modal pretraining. Finetuned separately

for each task.

VilBERT. Neurips 2019

Multitask Finetuning with task heads

Jointly finetuned for multiple tasks, with task-specific heads.

12-in-1. CVPR 2020

Shared V&L

Representations

SVLR. ICCV 2017

Learn aligned vision-language embeddings that are shared across tasks

How do we make V&L systems more “general-purpose”

?

18 of 79

Towards General Purpose Vision

Show & Tell. CVPR 2015

Specialized

models

Architecture designed for a single vision task

Pretraining +

Task Finetuning

Cross-modal pretraining. Finetuned separately

for each task.

VilBERT. Neurips 2019

Multitask Finetuning with task heads

Jointly finetuned for multiple tasks, with task-specific heads.

12-in-1. CVPR 2020

Shared V&L

Representations

SVLR. ICCV 2017

Learn aligned vision-language embeddings that are shared across tasks

Modality-specific heads

No more task heads. Modality heads support variety of tasks.

GPV-1. CVPR 2022

19 of 79

Towards General Purpose Vision

Show & Tell. CVPR 2015

Specialized

models

Architecture designed for a single vision task

Pretraining +

Task Finetuning

Cross-modal pretraining. Finetuned separately

for each task.

VilBERT. Neurips 2019

Multitask Finetuning with task heads

Jointly finetuned for multiple tasks, with task-specific heads.

12-in-1. CVPR 2020

Shared V&L

Representations

SVLR. ICCV 2017

Learn aligned vision-language embeddings that are shared across tasks

Modality-specific heads

No more task heads. Modality heads support variety of tasks.

GPV-1. CVPR 2022

Tokenize + Seq2Seq

Tokenize inputs and outputs and treat all tasks as seq2seq translation

Unified IO. ICLR 2023

20 of 79

Towards General Purpose Vision

Show & Tell. CVPR 2015

Specialized

models

Architecture designed for a single vision task

Pretraining +

Task Finetuning

Cross-modal pretraining. Finetuned separately

for each task.

VilBERT. Neurips 2019

Multitask Finetuning with task heads

Jointly finetuned for multiple tasks, with task-specific heads.

12-in-1. CVPR 2020

Shared V&L

Representations

SVLR. ICCV 2017

Learn aligned vision-language embeddings that are shared across tasks

Modality-specific heads

No more task heads. Modality heads support variety of tasks.

GPV-1. CVPR 2022

Tokenize + Seq2Seq

Tokenize inputs and outputs and treat all tasks as seq2seq translation

Unified IO. ICLR 2023

How should we evaluate GPVs?

21 of 79

Towards General Purpose Vision

Show & Tell. CVPR 2015

Specialized

models

Architecture designed for a single vision task

Pretraining +

Task Finetuning

Cross-modal pretraining. Finetuned separately

for each task.

VilBERT. Neurips 2019

Multitask Finetuning with task heads

Jointly finetuned for multiple tasks, with task-specific heads.

12-in-1. CVPR 2020

Shared V&L

Representations

SVLR. ICCV 2017

Learn aligned vision-language embeddings that are shared across tasks

Modality-specific heads

No more task heads. Modality heads support variety of tasks.

GPV-1. CVPR 2022

Tokenize + Seq2Seq

Tokenize inputs and outputs and treat all tasks as seq2seq translation

Unified IO. ICLR 2023

Evaluation of GPVs

Evaluation of diverse visual capabilities with focus on generality, robustness & calibration

GRIT. arXiv 2022

22 of 79

Towards General Purpose Vision

Show & Tell. CVPR 2015

Specialized

models

Architecture designed for a single vision task

Pretraining +

Task Finetuning

Cross-modal pretraining. Finetuned separately

for each task.

VilBERT. Neurips 2019

Multitask Finetuning with task heads

Jointly finetuned for multiple tasks, with task-specific heads.

12-in-1. CVPR 2020

Shared V&L

Representations

SVLR. ICCV 2017

Learn aligned vision-language embeddings that are shared across tasks

Modality-specific heads

No more task heads. Modality heads support variety of tasks.

GPV-1. CVPR 2022

Tokenize + Seq2Seq

Tokenize inputs and outputs and treat all tasks as seq2seq translation

Unified IO. ICLR 2023

Evaluation of GPVs

Evaluation of diverse visual capabilities with focus on generality, robustness & calibration

GRIT. arXiv 2022

More data

More parameters

More compute

23 of 79

Towards General Purpose Vision

Show & Tell. CVPR 2015

Specialized

models

Architecture designed for a single vision task

Pretraining +

Task Finetuning

Cross-modal pretraining. Finetuned separately

for each task.

VilBERT. Neurips 2019

Multitask Finetuning with task heads

Jointly finetuned for multiple tasks, with task-specific heads.

12-in-1. CVPR 2020

Shared V&L

Representations

SVLR. ICCV 2017

Learn aligned vision-language embeddings that are shared across tasks

Modality-specific heads

No more task heads. Modality heads support variety of tasks.

GPV-1. CVPR 2022

Tokenize + Seq2Seq

Tokenize inputs and outputs and treat all tasks as seq2seq translation

Unified IO. ICLR 2023

Evaluation of GPVs

Evaluation of diverse visual capabilities with focus on generality, robustness & calibration

GRIT. arXiv 2022

More data

More parameters

More compute

Visual Programming

Generate code that invokes existing models and libraries

VisProg. CVPR 2023

Little/no new data

Little/no new learning

Uses existing models

24 of 79

Tag the characters on the TV show Big Bang Theory

1. detect faces

2. query knowledge

Penny

Leonard

Sheldon

Raj

Amy

Bernadette

Howard

3. matches faces and names

25 of 79

Tag the characters on the TV show Big Bang Theory

1. detect faces

2. query knowledge

4. display labeled bboxes

Howard

Raj

Bernadette

Amy

Sheldon

Leonard

Penny

Penny

Leonard

Sheldon

Raj

Amy

Bernadette

Howard

3. matches faces and names

26 of 79

Tag the characters on the TV show Big Bang Theory

Howard

Raj

Bernadette

Amy

Sheldon

Leonard

Penny

end-to-end

model

27 of 79

Unified-IO

end-to-end

model

Face detection

Knowledge retrieval

Image-Text matching

Image Processing

Plotting

Training

Funnel

28 of 79

end-to-end

model

Create a color pop of the first ladies and blur the rest

Replace the sky with sunrise behind mountains

The left and right images contain a total of six people and two boats

False

Image classification

Object detection

Face recognition

Knowledge retrieval

Image generation

Pose estimation

Depth estimation

Semantic segmentation

Captioning

Question Answering

Surface normal estimation

Image processing

Scientific plotting

Text generation

Reading comprehension

Commonsense knowledge

Image Inpainting

Situation Recognition

Classification in context

Training

Funnel

29 of 79

Tag the characters on the TV show Big Bang Theory

An implementation for each step

The program that calls the functions in sequence

Execute the program on the given input

tag_characters.py

30 of 79

end-to-end

model

Image classification

Object detection

Face detection

Knowledge retrieval

Image generation

Pose estimation

Depth estimation

Semantic segmentation

Captioning

Question Answering

Surface normal estimation

Image processing

Scientific plotting

Text generation

Reading comprehension

Commonsense knowledge

Image Inpainting

Situation Recognition

Classification in context

Training

Funnel

31 of 79

image_classification ()

object_detection ()

face_detection ()

knowledge_retrieval ()

image_generation ()

pose_estimation ()

depth ()

semantic_segment ()

image_captioning ()

question_answering ()

image_text_matching ()

image_proc ()

image_plot ()

text_generation ()

reading_comp ()

commonsense ()

inpainting ()

situations ()

class_context ()

INVOKE

program.py

32 of 79

Visual Programming

Language description of a visual task

Program

Program

Generator

Output

Program

Interpreter

Task Inputs

33 of 79

Visual Programming

Language description of a visual task

Program

Program

Generator

Output

Task Inputs

In-context Learning in LLMs

Python + HTML

Program

Interpreter

34 of 79

VisProg Modules

Image Processing Libraries

Any program you like!

Neural Models

35 of 79

OBJ0 = Segment(image=IMAGE)

OBJ1 = Select(image=IMAGE, object=OBJ0, query='desert')

IMAGE0 = Replace(image=IMAGE, object=OBJ1, prompt='lush green grass')

FINAL_RESULT = Result(var=IMAGE0)

IMAGE

Replace the desert with lush green grass

36 of 79

OBJ0 = Segment(image=IMAGE)

OBJ1 = Select(image=IMAGE, object=OBJ0, query='desert')

IMAGE0 = Replace(image=IMAGE, object=OBJ1, prompt='lush green grass')

FINAL_RESULT = Result(var=IMAGE0)

Replace the desert with lush green grass

37 of 79

OBJ0 = Segment(image=IMAGE)

OBJ1 = Select(image=IMAGE, object=OBJ0, query='desert')

IMAGE0 = Replace(image=IMAGE, object=OBJ1, prompt='lush green grass')

FINAL_RESULT = Result(var=IMAGE0)

Replace the desert with lush green grass

38 of 79

OBJ0 = Segment(image=IMAGE)

OBJ1 = Select(image=IMAGE, object=OBJ0, query='desert')

IMAGE0 = Replace(image=IMAGE, object=OBJ1, prompt='lush green grass')

FINAL_RESULT = Result(var=IMAGE0)

Replace the desert with lush green grass

39 of 79

OBJ0 = Segment(image=IMAGE)

OBJ1 = Select(image=IMAGE, object=OBJ0, query='desert')

IMAGE0 = Replace(image=IMAGE, object=OBJ1, prompt='lush green grass')

FINAL_RESULT = Result(var=IMAGE0)

Replace the desert with lush green grass

40 of 79

OBJ0 = Segment(image=IMAGE)

OBJ1 = Select(image=IMAGE, object=OBJ0, query='desert')

IMAGE0 = Replace(image=IMAGE, object=OBJ1, prompt='lush green grass')

FINAL_RESULT = Result(var=IMAGE0)

FINAL_RESULT

Replace the desert with lush green grass

41 of 79

Information about the task and tools available for the task

Instruction: Replace the BMW with an Audi and cloudy sky with a clear sky

Program:

GPT3

Program Generator

42 of 79

Instruction: Hide the face of Nicole Kidman with :p

Program:

OBJ0=Facedet(image=IMAGE)

OBJ1=Select(image=IMAGE, object=OBJ0, query=‘Nicole Kidman’)

IMAGE0=Emoji(image=IMAGE, object=OBJ1, emoji=‘face_with_tongue’)

RESULT=IMAGE0

Instruction: Create a color pop of the white Audi

Program:

OBJ0=Seg(image=IMAGE)

OBJ1=Select(image=IMAGE, object=OBJ0, query=‘white Audi’)

IMAGE0=ColorPop(image=IMAGE, object=OBJ1)

RESULT=IMAGE0

Instruction: Replace the red car with a blue car

Program:

OBJ0=Seg(image=IMAGE)

OBJ1=Select(image=IMAGE, object=OBJ0, query=‘red car’)

IMAGE0=Replace(image=IMAGE, object=OBJ1, prompt=‘blue car’)

RESULT=IMAGE0

Instruction: Replace the BMW with an Audi and cloudy sky with a clear sky

Program:

GPT3

OBJ0=Seg(image=IMAGE)

OBJ1=Select(image=IMAGE, object=OBJ0, query=‘BMW’)

IMAGE0=Replace(image=IMAGE, object=OBJ1, prompt=‘Audi’)

OBJ1=Seg(image=IMAGE0)

OBJ2=Select(image=IMAGE0, object=OBJ1, query=‘cloudy sky’)

IMAGE1=Replace(image=IMAGE0, object=OBJ2, prompt=‘clear sky’)

RESULT=IMAGE1

Program Generator

43 of 79

Performance with varying # context examples

44 of 79

Tag these famous computer vision researchers from Berkeley and Stanford

45 of 79

OBJ0=FACEDET(image=IMAGE)

LIST0=LIST(query='famous computer vision researchers

from Berkeley and Stanford’, max=20) OBJ1=CLASSIFY(image=IMAGE, object=OBJ0, categories=LIST0)

IMAGE0=TAG(image=IMAGE, object=OBJ1)

FINAL_RESULT=RESULT(var=IMAGE0)

Tag these famous computer vision researchers from Berkeley and Stanford

46 of 79

Replace Jitendra with George Clooney wearing sunglasses and Fei-Fei with Aishwarya Rai wearing sunglasses

OBJ0=FACEDET(image=IMAGE)

OBJ1=SELECT(image=IMAGE,object=OBJ0,query='Fei-Fei',category=None) IMAGE0=REPLACE(image=IMAGE,object=OBJ1,prompt=‘Aishwarya Rai wearing sunglasses') OBJ2=SELECT(image=IMAGE0,object=OBJ0,query='Jitendra',category=None) IMAGE1=REPLACE(image=IMAGE0,object=OBJ2,prompt='George Clooney wearing sunglasses’)

FINAL_RESULT=RESULT(var=IMAGE1)

47 of 79

48 of 79

Visual Rationales

49 of 79

Sources of Error

50 of 79

Recent Works

51 of 79

Image Generation

Cho et al. Visual Programming for Text-to-Image Generation and Evaluation. NeurIPS 2023

52 of 79

Cho et al. Visual Programming for Text-to-Image Generation and Evaluation. NeurIPS 2023

Image Generation

53 of 79

Simplifying Prompts

Hsieh et al. Tool Documentation Enables Zero-Shot Tool-Usage with Large Language Models.  Arxiv 2023

54 of 79

Program of Thoughts

Chen, Wenhu et al. Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Tasks. TMLR 2023

55 of 79

ViperGPT

Suris et al. ViperGPT: Visual Inference via Python Execution for Reasoning. ICCV 2023

56 of 79

ReAct

Shunyu et al. ReAct: Synergizing Reasoning and Acting in Language Models. ICLR 2023

57 of 79

ReAct

Shunyu et al. ReAct: Synergizing Reasoning and Acting in Language Models. ICLR 2023

58 of 79

Multimodal ReAct

Yang et al. MM-REACT: Prompting ChatGPT for Multimodal Reasoning and Action. Arxiv 2023

Gao et al. AssistGPT: A General Multi-modal Assistant that can Plan, Execute, Inspect, and Learn. Arxiv 2023

59 of 79

We’ve barely scratched the surface …

  • Error detection and correction

  • Multi-step and multimodal program generation

  • Scaling the number of tasks and modules

  • Image and video editing/generation with VisProg

  • Learning VisProg modules & programs from training data / feedback

60 of 79

Training language instruction following robots for the real world

w/o RL

w/o real-world training

SPOC

Shortest Path Oracle Clone

https://spoc-robot.github.io/

61 of 79

62 of 79

63 of 79

On-policy RL

  • Act using the current policy to collect episodes with rewards
  • Train on those episodes to update policy to maximize rewards

64 of 79

On-policy RL -> Behavior Cloning

  • Act using an expert policy to collect episodes
  • Train on those episodes to imitate expert actions

65 of 79

On-policy RL -> Behavior Cloning

  • Act using an expert policy to collect episodes
  • Train on those episodes to imitate expert actions

Supervised Learning!

66 of 79

On-policy RL -> Behavior Cloning

  • Act using an expert policy to collect episodes
  • Train on those episodes to imitate expert actions

Large and Diverse training data? Expert?

67 of 79

Large and Diverse Training Data for BC

ProcTHOR (NeurIPS 2022 Best Paper)

68 of 79

Large and Diverse Training Data for BC

Objaverse (CVPR 2023)

69 of 79

Large and Diverse Training Data for BC

Generate virtually infinite home simulation environments.

Populate these environments with diverse 3D assets

70 of 79

Experts for BC

Shortest-path plans using privileged information such as object locations, floor plan, and reachable locations.

71 of 79

Experts for BC

“Fetch a bowl”

72 of 79

Training Data

73 of 79

Training Data

74 of 79

Model

Goal-conditioned visual encoder

Action Decoder

75 of 79

Learned Behaviors

76 of 79

Emergence of exploration from shortest-path plans!

77 of 79

Task-specific behaviors

78 of 79

Recent advances in procedural generation of simulation environments, strong visual encoders, and the ubiquitous Transformers have allowed us to develop Robotic systems using good ol’ supervised learning in simulators.

Combined with widely available low cost hardware (Stretch, Mobile ALOHA) in the near future -

Significantly reduced barrier to training real-world robots

79 of 79

Thank You!

http://tanmaygupta.info/

https://prior.allenai.org/