Skip to main content
Machine Learning & Deep Learning

⏱ About 10 min10 XP

Pictures as Data

You see a photo of a puppy and immediately think 'puppy!' Your eyes and brain work together so fast it feels like magic. But behind the scenes, your brain is doing serious work — reading colors, shapes, and edges. Machines can learn to read pictures too. And a picture, to a machine, is just a very organized piece of data.

How a Machine Sees a Picture

When you look at a photograph, you see a whole scene. A machine sees something different at first — it sees tiny colored squares called pixels. Pixel is a made-up word that means 'picture element.' Every photo is made of millions of tiny squares, each one a single color. A bright red square. A dark blue square. A light gray square. The machine reads all those little colored squares — their colors and where they are — and uses that information to learn. That grid of colored squares is image data. Over time, after studying millions of pictures, the machine learns that certain patterns of pixels usually mean 'cat,' and other patterns usually mean 'car.'

The Big Idea

A picture is data made of tiny colored squares called pixels. The machine reads the colors and positions of all those pixels to learn what the picture shows.

Here is a fun way to imagine it: Imagine a mosaic — an art project made of tiny colored tiles on a wall. Up close, you just see tiles. Step back, and you see a picture of a lion! A photo on a screen works the same way. Millions of tiny colored squares, arranged just right, make a picture. A machine learning program reads every single tile and slowly learns what different arrangements mean.

Fill in the blank to complete the sentence.

A picture on a screen is made of millions of tiny colored squares called .

Pictures are one of the most common kinds of data that machines learn from. Doctors use machines trained on medical images to help spot problems. Cars use machines trained on road photos to recognize stop signs. Even the app that unlocks your phone with your face uses a machine trained on millions of face photos. All of that started with pixels — tiny squares of color, saved as data.

Zoom In to See the Pixels

On a tablet or phone, open any photo and zoom in as far as you can go. You will start to see the individual colored squares — those are the pixels! That is the raw data a machine would read.

What is a pixel?

How does a machine learning program use picture data?

Pixel Art Experiment

  1. Get some graph paper or draw a simple grid with squares (at least 8 x 8).
  2. Pick a simple shape to draw: a heart, a star, or the first letter of your name.
  3. Color in the squares to make your shape.
  4. Step back and look at it from a distance.
  5. Notice: up close it looks like colored squares. From far away, it looks like a shape.
  6. You just made pixel art — the same way digital pictures work!
  7. Bonus: trade your pixel art with a friend and see if they can guess what shape you made.