Skip to main content
Each class session includes a structured in-class exercise (labeled E01–E11) that you complete in Google Colab. The exercises are designed to reinforce the theoretical concepts covered in lectures through direct implementation. Exercises are split into two groups: geometry (E01–E04), which build your understanding of projective geometry and camera models, and deep learning (E05–E11), which take you through CNNs, object detection, segmentation, generative models, Transformers, and ethics.
All Colab notebooks can be run without any local setup. Open the link, make a copy to your own Google Drive (File → Save a copy in Drive), and run the cells top to bottom. Make sure your runtime is set to GPU for deep learning exercises.

Geometry exercises (E01–E04)

These four exercises cover the core topics of Chapter 2: projective representations, homographies, camera calibration, and epipolar geometry.

E01 — Where does John Lennon look?

Apply homogeneous coordinates and line intersection to determine gaze direction in an image. Topic: homogeneous coordinates.

E01 — Solution

Reference solution for the John Lennon exercise.

E02 — Clock rectification

Compute and apply a homography to rectify a perspective-distorted image of a clock face. Topic: homographies.

E02 — Solution

Reference solution for the clock rectification exercise.

E03 — Camera calibration

Calibrate a real camera using a checkerboard pattern and recover intrinsic and extrinsic parameters. Topic: camera calibration.

E04 — Epipolar geometry

Compute the fundamental matrix and visualize epipolar lines between a stereo image pair. Topic: epipolar geometry.

Deep learning exercises (E05–E11)

These exercises cover Chapter 3 (deep learning architectures) and Chapter 4 (ethics).

E05 — CNN training

Train a convolutional neural network from scratch on an image classification dataset using PyTorch. Topic: CNNs.

E06 — YOLO mask detection

Fine-tune a YOLO model to detect face masks in images. Topic: object detection.

E07 — Facial analysis

Implement facial recognition and attribute analysis using pretrained deep learning models. Topic: facial analysis.

E08 — UNet segmentation

Train a UNet architecture to perform pixel-wise semantic segmentation on an image dataset. Topic: segmentation.

E09 — GAN image generation

Implement and train a Generative Adversarial Network to synthesize new images. Topic: GANs.

E10 — Transformers

Apply Vision Transformers (ViT) using HuggingFace for image understanding tasks. Topic: Transformers.

E11 — Ethics quiz

A short quiz on AI ethics, fairness, bias, and explainability. Completed through Canvas. Topic: ethics.

Full exercise list

#TopicExerciseSolution
E01Homogeneous coordinatesWhere does John Lennon look?Solution
E02HomographiesClock rectificationSolution
E03Camera calibrationCamera calibration for a project
E04Epipolar geometryCourse repo
E05CNN trainingCNN training
E06Object detection — YOLOCourse repo
E07Facial analysisFacial analysis
E08Segmentation — UNetUNet segmentation
E09Generative models — GANsGAN image generation
E10TransformersTransformers exercise
E11EthicsQuiz on Canvas

Working with Google Colab

Follow these practices to get the most out of the Colab exercises:
  • Save your own copy: Go to File → Save a copy in Drive before editing any notebook. The shared links are read-only.
  • Enable GPU: For deep learning exercises (E05–E10), switch to a GPU runtime: Runtime → Change runtime type → T4 GPU.
  • Run cells in order: Always run cells from top to bottom. Skipping cells will cause NameError or missing imports.
  • Check package versions: Some notebooks install specific package versions using !pip install. Run these cells even if the package appears to already be installed.
  • Runtime disconnects: Colab sessions disconnect after idle time. If you lose progress, re-run all cells from the top.

MATLAB examples

Several geometry topics also include MATLAB examples hosted on GitHub. These are especially useful for visualizing 3D transformations interactively. You can browse all MATLAB files directly in the course repository: To run the perspective GUI (CV02_Perspective.m), download the following files to the same directory before running MATLAB:
CV02_Perspective.m
CV02_Perspective.fig
CV02_experspec.m
CV02_meshplot.m
meshpoints.mat
perspecdata.mat

Build docs developers (and LLMs) love