CNNs are a type of neural network designed for **image processing and pattern recognition**. They are widely used in tasks like **image classification, object detection, and medical imaging**. ### Key Layers in CNN ![[CNN.jpg]] 1️.**Convolution Layer** - Extracts **features** (edges, textures) using **filters (kernels)**. - Each filter slides over the input and applies a **dot product** operation. 2️.**Pooling Layer** - Reduces **spatial dimensions** to improve efficiency. - Common types: - **Max Pooling** – Takes the largest value in a region. - **Average Pooling** – Takes the average of values. 3️. **Fully Connected Layer** - Flattens the feature map and connects to the final classification layer. - Uses [[Activation Function]] (e.g., **Softmax** for multi-class classification). ### How CNNs Work ? 1. The **convolution layer** extracts features from the input image. 2. The **pooling layer** downsamples the image to reduce computation. 3. Multiple layers improve feature extraction. 4. The **fully connected layer** makes the final prediction. ### Why CNNs ? - Learn **spatial hierarchies** (local and global patterns). - Reduce parameters compared to fully connected networks. - Work well with **images and videos**.