CS5720 - Week 4
Slide 66 of 80

Filters/Kernels: Feature Detectors

What Are Filters/Kernels?

Filters (or Kernels) are small matrices of learnable weights that act as feature detectors in CNNs. They slide across the input to detect specific patterns like edges, textures, or more complex features.
Key Characteristics:

Small Size: Typically 3×3, 5×5, or 7×7
Shared Weights: Same filter used across entire image
Feature Specific: Each filter detects one pattern
Learnable: Weights adjusted during training
Hierarchical: Simple → Complex features
🔲 Low-Level Features
Edges, corners, simple textures - the building blocks of visual perception
🔷 Mid-Level Features
Shapes, parts, texture patterns - combinations of simple features
🎯 High-Level Features
Objects, faces, complex patterns - semantic understanding

Common Filter Types

Vertical Edge
-1
0
1
-1
0
1
-1
0
1
Horizontal Edge
-1
-1
-1
0
0
0
1
1
1
Diagonal Edge
0
1
2
-1
0
1
-2
-1
0
Corner Detector
1
-2
1
-2
4
-2
1
-2
1
🧠 Learning vs Hand-Crafted
While we can design filters manually, CNNs learn optimal filters from data. This is the power of deep learning - discovering features we might never have thought of!

Filter Visualization

Input Pattern
Selected Filter
Filter Response
Prepared by Dr. Gorkem Kar