Multi-Channel Convolution
What You'll Learn
You'll learn how convolution operations extend from single-channel (grayscale) images to multi-channel inputs like RGB color images.
The Core Idea
So far, you've seen convolution with single-channel inputs (like grayscale images). But real-world images typically have multiple channels—RGB images have 3 channels (red, green, and blue), each representing intensity values for that color.
When we convolve over a multi-channel input, our kernel must also have multiple channels—one set of weights per input channel. Here's how it works:
- Each input channel gets its own 2D kernel: For an RGB image (3 channels), the kernel has 3 separate 2D filters
- Convolve each channel separately: Apply the corresponding 2D kernel to each input channel
- Sum across channels: Add up all the channel-wise convolution results into a single 2D output
Think of it like a recipe with three ingredients. You process each ingredient separately (convolve each channel), but combine them all (sum) to create the final dish (output feature map).
Example Dimensions
- Input: RGB image of shape
(3, 224, 224)→ 3 channels, 224×224 pixels - Kernel: Shape
(3, 5, 5)→ 3 channels (matching input), each 5×5 - Process: Three 5×5 convolutions happen simultaneously, one per channel
- Output: Single channel result of shape
(220, 220)(assuming no padding)
To produce multiple output channels (which is typical in CNNs), you simply use multiple complete kernels—each producing one output channel through the same multi-channel convolution process.
Key Takeaway: Multi-channel convolution extends the sliding window operation across all input channels simultaneously, using a separate kernel per channel and summing results to produce each output value—enabling CNNs to process color images and learn rich feature representations.