AI engineering glossary · Computer vision

What is padding?

Padding (also called Zero padding): Extra values, usually zeros, added around the border of an image or feature map before convolution. It lets the kernel be centred on edge pixels and controls output size; 'same' padding keeps the size unchanged while 'valid' uses none.

Level: beginnerTopic: Computer vision

Padding: an example

A 3 x 3 kernel with padding 1 and stride 1 maps a 32 x 32 input to a 32 x 32 output; with no padding it gives 30 x 30.

Related terms

More Computer vision terms

Where you learn it

Padding is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.