1.  [](/)
2.  [Glossary](/glossary)
3.  Convolutional Neural Network (CNN)

[Back to Glossary](/glossary)

# What is Convolutional Neural Network (CNN)

## Convolutional Neural Network (CNN) - A neural network that learns image features with sliding filters

A convolutional neural network (CNN) is a neural network built for grid-shaped data such as images, which slides small learned filters across the input to detect patterns: edges and textures in early layers, then parts and whole objects in deeper ones. Because the same filter is reused at every position, a CNN needs far fewer parameters than a fully connected network and recognizes a pattern wherever it appears. CNNs such as ResNet and EfficientNet were the standard for image classification and detection through the 2010s, and they still run many detectors and on-device models.

### How It Works

*   Convolution: a filter, for example 3 × 3 pixels, slides over the image and outputs one value per position, producing a feature map
*   Activation: a non-linear function such as ReLU is applied to each value
*   Pooling or strided convolution: feature maps shrink, so deeper layers see a wider area of the image
*   Head: the final layers turn the features into an output, such as class scores, boxes or an embedding vector

### Worked Example

A 3 × 3 filter on a single-channel image has 9 weights plus a bias, 10 parameters, whatever the image size. A layer with 64 such filters over a 3-channel RGB input has 64 × (3 × 3 × 3 + 1) = 1,792 parameters. A fully connected layer mapping a 224 × 224 RGB image to the same 64 outputs would need 224 × 224 × 3 × 64 + 64, about 9.6 million.

### CNNs vs Vision Transformers

*   Vision transformers (ViT) split the image into patches and use attention, which relates any patch to any other from the first layer
*   CNNs build in locality, so they learn well from smaller datasets and run efficiently on phones and edge devices
*   Transformers scale better with very large training sets, which is why most current image-text embedding models, such as CLIP and [SigLIP](/models/siglip-base-patch16-224) variants, use them
*   Hybrid designs, such as ConvNeXt, carry transformer training ideas into a convolutional network

### CNNs in Mixpeek

The face identity extractor detects faces with SCRFD, a convolutional face detector, before computing ArcFace embeddings; see [face identity](https://mixpeek.com/docs/processing/extractors/face-identity). For image and video search, Mixpeek's embedding models are listed in the [model catalog](/models), and a [custom extractor](https://mixpeek.com/docs/processing/custom-extractors) can run any CNN you have trained.

### Common Pitfalls

*   Feeding images at a different size or normalization than the network was trained with
*   Training a CNN from scratch on a small dataset instead of fine-tuning a pretrained one
*   Assuming a classifier trained on product photos works on video frames with motion blur
*   Reading accuracy on a balanced test set as accuracy on skewed real traffic

[One-click templatesStart from a templateEach template deploys a working search app on your own files.Browse templates](/templates)

[Put it to work: search your own files](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=glossary_onramp&utm_campaign=mvs_onramp)

### Related Terms

[ACID](/glossary/acid)[API](/glossary/api)[Blob Storage](/glossary/blob-storage)[CLIP](/glossary/clip)[Embedding](/glossary/embedding)