✳ BETWEEN QUESTIONS ML STUDY ATLAS

A QUESTION-LED LESSON

Images and Pixels: What Does a Vision Model Receive?

An image is represented as values arranged on a grid. Adjacent pixels carry spatial relationships that a vision model can exploit.

A grid of numbers

A grayscale image has a value at each position. A color image often has red, green and blue channels, though representations and scales vary. Pixel numbers alone do not tell the model what objects mean.

A local pattern

A filter can combine nearby pixel values. In the experiment, a fixed 2 × 2 filter [1, −1; 1, −1] computes left-column brightness minus right-column brightness. Its sign changes when the bright side changes. Change the top-left brightness. The grid shows the image; the filter result compares total brightness on the left with the right.

INTERACTIVE EXPLORATION

Change a pixel and detect an edge

Adjust the top-left pixel in a 2 × 2 grayscale image. Apply the fixed filter [1, −1; 1, −1] as written.

From patterns to learned features

Convolutional networks use shared local filters across locations and learn their weights from data. In many ML libraries the operation called convolution is technically cross-correlation; this example uses the filter as written.

Check your understanding

If all four pixels have the same value, what does the displayed left-minus-right filter output?

Zero. The positive and negative contributions cancel.

Keep exploring

Data and predictions ↗Vectors and matrices ↗

Further reading

Source and further reading ↗