1 of 67

1

EC 500 A1: �Vision & language

2 of 67

Homework assignment (proposed changes)

  • Homework – 4
    • Release on 10/26 🡪 11/2 🡪 11/6
    • Due on at 11/11 midnight 🡪 11/18 🡪 11/22

​

  • Homework – 5
    • Release on 11/9 🡪 11/16 🡪 11/18
    • Due on 11/25 at midnight 🡪 12/9 🡪 12/10

​

​

3 of 67

Recap - Final project timeline

  • Steps:
    • Project proposal: 2 – 3 pages [11/2] 🡪 11/11
    • Project milestone report: 2 – 3 pages [11/23]
    • Project report & code release: academic paper format; LaTeX is required [12/10]
    • Project presentation: 7 – 10 minutes [12/16]

​

4 of 67

Recap - Final project proposal (3%)

​

  • Project proposal: 11/9 🡪 11/11 (3%)

​

  • Change (in the template):
    • Please include figures
    • Please include a brief timeline

​

  • Baseline:
    • Something “simple” that you can implement in a day or two
    • Get a basic idea of the computation
    • Get a basic idea of the performance (e.g., classification accuracy)

5 of 67

Recap - Baseline/prototype is important!

  • Where is your data?
  • How are you going to separate your data?
  • How are you going to evaluate (what metric)?

​

  • What is your baseline approach?
    • What algorithm (e.g., YOLO)?
    • What neural network pre-trained backbone?
    • Anything simpler --- just to get a sense of whether the project is manageable

​

  • How long does it take to train and test?
    • Using what computational resource?

​

​

​

​

6 of 67

Recap - Final project – What to prevent

  • The final project is 30%. Thus, I do expect a corresponding workload.

​

  • Working on something that is too straightforward or outdated is highly discouraged. Specifically, if “the TA and I” can find online code that can be directly used for what you proposed, it may not be an appropriate project.

​

  • Be realistic---don’t propose something impossible to do given 1.5 months (e.g., no data and no evaluation metric) and the computing resources SCC provides. If you cannot produce any results, the final project score will be low.

​

  • Let’s talk!

7 of 67

Recap - Final project – General rubric

  • Project quality
  • Project completion
  • Project workload/difficulty

8 of 67

Questions?

8

9 of 67

First half of the semester - basics

  • Image basics: Chapters 2, 5, 6, 7
  • Learning basics: Chapters 9, 10, 11, 12, 13
  • Image processing-1: Chapters 15, 16, 17, 18
  • Image processing-2: Chapters 20, 21, 22, 23
  • Neural networks: Chapters 24, 26
  • Geometry & 3D basics: Chapters 38, 39
  • Representation learning: Chapters 30, 31
  • Visual recognition: Chapter 50

10 of 67

Second half of the semester - advances

  • Generative models: Chapters 32, 33, 34
  • Vision and language (VLM, VLLM) Chapter 51
  • Color & texture & pixel modeling Chapters 8, 27, 28
  • Learning-based challenges Chapters 4, 35, 36, 37
  • Beyond the simple vision system: monocular & stereo 3D Chapters 40, 41, 42, 43
  • Beyond single & stereo imaging: multi-view geometry Chapter 44
  • 3D reconstruction and novel view synthesis Chapter 45
  • Going beyond a single time: motion & tracking Chapters 46, 47, 48, 49
  • 3D & 4D Vision foundation models (VFM)
  • Computer Vision for biodiversity

​

​

​

​

​

​

​

​

​

11 of 67

Second half of the semester - advances

Neural Radiance Fields (NeRF)

12 of 67

Today (51 & 34)

  • Recap
  • Vision & language
  • Conditional generative models

​

​

12

13 of 67

Recap: Unconditional generative models

  • Given a collection of images x without label y

[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]

Gray: visible; White: latent

14 of 67

Recap: Autoregressive model (where is z?)

[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]

15 of 67

Recap: Diffusion model (where is z?)

16 of 67

Recap: Generative adversarial net (GAN) (where is z?)

16

Generator

Discriminator

REAL

FAKE

[Credits: Mengdi Fan and Xinyu Zhou, CSE 5539 course presentation]

 

 

17 of 67

Recap: VAE (where is z?)

[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]

18 of 67

Examples

19 of 67

20 of 67

Gaussian encourages “disentanglement”

21 of 67

Recap: Generative models with “z” as Gaussian

[Credits: What are Diffusion Models?]

22 of 67

23 of 67

Today (51 & 34)

  • Recap
  • Vision & language
  • Conditional generative models

​

​

23

24 of 67

Vision & language

  • Both are ways to represent the world

25 of 67

How to encode/represent text?

  • “A computer screen with a Windows …”

​

    • One-hot sequence: [1, 150, 3820, 2, 1, 10850, …]
    • Large dimension (according to vocabulary size)
    • No semantic relatedness across words

Vocabulary size of K

26 of 67

How to encode/represent text?

  • “A computer screen with a Windows …”

​

    • Project one-hot encoding into d-dimensional tokens (d<<K)

​

​

27 of 67

Image & text representation

v

Transformer Encoder

Transformer for text

A beautiful building ….

28 of 67

Embedding makes it easy to combine vision & language

29 of 67

Visual representation by language supervision

30 of 67

Visual representation by language supervision

  • Recap of Chapter 30

31 of 67

Visual representation by language supervision

  • Can we use the text associated with each image as the “pretext” task?

​

​

​

​

​

​

  • What objective functions?
    • Text-to-image generation or image-to-text generation
    • Text-to-image retrieval or similarity matching

​

​

32 of 67

CLIP (Contrastive Language-Image Pre-Training)

33 of 67

CLIP (Contrastive Language-Image Pre-Training)

  • Maximize the “similarity” (inner product) along the diagonal

​

  • Minimize the “similarity” (inner product) at off-diagonal elements

34 of 67

CLIP (Contrastive Language-Image Pre-Training)

35 of 67

CLIP (Contrastive Language-Image Pre-Training)

36 of 67

CLIP (Contrastive Language-Image Pre-Training)

37 of 67

CLIP (Contrastive Language-Image Pre-Training)

“positive” image-text pairs

  • Seek large similarity

“negative” image-text pairs

  • Seek small similarity

38 of 67

CLIP (Contrastive Language-Image Pre-Training)

“positive” text-image pairs

  • Seek large similarity

“negative” text-image pairs

  • Seek small similarity

39 of 67

CLIP (Contrastive Language-Image Pre-Training)

40 of 67

Illustration

41 of 67

CLIP as a zero-shot classifier

  • Language can be used to describe a new, compositional category

42 of 67

CLIP as a zero-shot classifier

  • Language can be used to describe a new, compositional category

43 of 67

CLIP as a zero-shot classifier

  • Language can be used to describe a new, compositional category
  • Extract text representation

44 of 67

CLIP as a zero-shot classifier

  • Language can be used to describe a new, compositional category
  • Extract image representation

45 of 67

CLIP as a zero-shot classifier

  • Language can be used to describe a new, compositional category
  • Compute “similarity”

46 of 67

CLIP for image retrieval

[INQUIRE-Search: Interactive Discovery in Large-Scale Biodiversity Databases, 2026]

47 of 67

Questions?

47

48 of 67

Translation between images and text

​

​

​

​

​

​

​

  • What objective functions?
    • Text-to-image generation or image-to-text generation
    • Text-to-image retrieval or similarity matching

​

​

49 of 67

From unconditioned to conditioned generation

50 of 67

Image-to-Image

51 of 67

Text-to-Image

​

​

​

​

​

​

​

  • Using “encoder-decoder” architecture
    • Can leverage pre-trained encoders and decoders
    • Fine-tune with (image, text) pairs

​

52 of 67

Text-to-Image (conditional VAE)

  • Trained with (image, text) pairs

​

  • Test with text + randomly sampled noise

​

  • Used in DALL-E 1

​

​

[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]

53 of 67

Text-to-Image (conditional VAE)

[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]

54 of 67

Text-to-Image (conditional Diffusion)

  • Used in DALL-E 2, stable diffusion …

​

  • Text is injected into the U-Net

​

​

[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]

55 of 67

Text-to-Image (conditional Diffusion)

[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]

56 of 67

Questions?

56

57 of 67

Image-to-Text

  • Representative tasks: image captioning

58 of 67

Image captioning (by Transformers)

59 of 67

Image captioning (by Transformers)

60 of 67

Image captioning (by Transformers)

Cross-attentions:

Text tokens will attend to the image tokens, using their information to decide on the next words

61 of 67

Image captioning (by Transformers)

Surely, we need training data

62 of 67

Visual question answering (VQA)

  • What is the architecture of g?

63 of 67

LLaVA: Large Language and Vision Assistant

Using another transformer --- for example, a large language model --- to combine image and questions

64 of 67

Questions?

64

65 of 67

Open-vocabulary recognition models

[SAM 3: Segment Anything with Concepts, 2025]

66 of 67

Open-vocabulary recognition models

[SAM 3: Segment Anything with Concepts, 2025]

67 of 67

Open-vocabulary recognition models

[SAM 3: Segment Anything with Concepts, 2025]