> ## Documentation Index
> Fetch the complete documentation index at: https://aegean.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Shadow-invariant vision

> Understanding colors and building shadow-invariant representations.

## Grading

| Component                          | Points |
| ---------------------------------- | ------ |
| Nickname                           | 0      |
| Development environment (optional) | 0      |
| Shadow-invariant vision            | 100    |

## Nickname

Change your nickname in the Discord server to your full name, first and last. This is how we identify you.

This item carries 0 points. If you skip it and open a ticket without a first and last name in your nickname, we subtract 10 points from your Assignment 1 grade as a penalty.

## Development Environment Setup

This section is optional and carries no points - you can do the assignment in Colab but you will benefit long term from learning how to use docker.

Please refer to the [Virtualization guide](/aiml-common/resources/environment/virtualization) for setup instructions. After you clone or import the [class github repo](https://github.com/pantelis/eng-ai-agents) you can show that your development environment is correctly set up:

1. [Complete this notebook](https://colab.research.google.com/github/pantelis/eng-ai-agents/blob/main/notebooks/assignments/devenv/index.ipynb). It prints your Torch version and the device it resolved, which is `cuda` on an NVIDIA machine, `mps` on an Apple Silicon Mac running natively, and `cpu` otherwise. A screenshot of that output is the proof, whichever setup you chose.

2. Create an account on Hugging Face and provide a screenshot of your profile.

Screenshots must be stored as `.png` files, named `dev-environment-xyz.png`, and located under the assignment submission folder in your cloned class repo.

## Shadow-Invariant Vision

A shadow puts a strong edge in an image. The material under the shadow is the same material, and only the light reaching it changed. A vision system that reads that edge as a real boundary can be fooled by it, and driver assistance systems have braked and swerved for a stripe of shade across a road. The question is whether you can build a representation that responds to a change of surface material and stays quiet for a change of illumination.

<iframe src="https://platform.twitter.com/embed/Tweet.html?id=2034946481744929113" title="A Tesla on FSD 14.2.2.5 swerving for a shadow" loading="lazy" allow="autoplay; encrypted-media; picture-in-picture; fullscreen" style={{ width: '100%', maxWidth: '560px', height: '700px', border: 'none' }} />

*A Tesla on FSD 14.2.2.5 swerving for a shadow, reported by [Elias Martinez](https://x.com/EliasMartinez/status/2034946481744929113) in March 2026. If the embed does not load, the clip is on X.*

The method follows chapter 10 of Peter Corke's *Robotics, Vision & Control*. [Download the chapter](https://artifacts.aegeanai.com/pdf/corke-rvc3/ch10-light-and-color.pdf) before you start, and read sections 10.1, 10.2 and 10.4.

### Points

| Component                        | Points |
| -------------------------------- | ------ |
| Illumination and image formation | 10     |
| RGB, HSV and Lab comparison      | 15     |
| Log-chromaticity implementation  | 20     |
| Shadow-invariant image           | 25     |
| Quantitative evaluation          | 10     |
| PyTorch and Kornia port          | 15     |
| Discussion                       | 5      |

### What you will need

**In the course container**, run `make install-notebooks`. It installs Kornia alongside OpenCV and PyTorch. Running `make start` on its own is not enough, since that installs only the base dependencies.

**In Colab**, run this once before the first cell:

```python theme={null}
!pip install kornia
```

### Assignment Notebook

<Card title="Open Notebook in Colab" icon="google" href="https://colab.research.google.com/github/pantelis/eng-ai-agents/blob/main/notebooks/assignments/topics/shadow-invariance/shadow_invariant_vision_assignment.ipynb">
  Shadow-Invariant Vision Notebook
</Card>

The default regions of interest in section 3.1 are placeholders. Replace them with coordinates that put one box on lit material and the other on the same material in shade, otherwise every comparison that follows comes out empty.

## Submitting

Commit the notebook to your own private clone of the [class repo](https://github.com/pantelis/eng-ai-agents), under `assignments/assignment-1`. Save all cell outputs before you commit.

See also the [assignment submission guide](/aiml-common/resources/environment/assignment-submission).

***

<Callout icon="pen-to-square" iconType="regular">
  [Edit this page on GitHub](https://github.com/aegean-ai/eaia/edit/main/src/aiml-common/assignments/main/cv-fall-2026/assignment-1.mdx) or [file an issue](https://github.com/aegean-ai/eaia/issues/new/choose).
</Callout>
