NEWVectors or files. Pick a path.Start →

    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 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. For image and video search, Mixpeek's embedding models are listed in the model catalog, and a custom extractor 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
    Put it to work: search your own files
    Managed Mixpeek

    Put multimodal search to work

    Connect a bucket and Mixpeek runs the whole multimodal search pipeline for you: extraction, indexing, and search over your own objects. No models to wire up, nothing to host.

    Start with Managed
    MVS · bring your own

    Already have vectors?

    Keep your embeddings on your own cloud and run dense, sparse, and BM25 search directly on object storage. From $25/mo.

    Start with MVS