We are asked to define Computer Vision, list three common tasks, define CNN, define convolution, and explain how a convolutional filter works at a high level. Provide a clear, structured answer.
Computer Vision
Computer Vision (CV) is a multidisciplinary field of artificial intelligence and computer science that focuses on enabling machines to interpret, understand, and make decisions based on visual data (images or videos). It aims to replicate aspects of human vision by extracting meaningful information from pixel arrays.
Common tasks include:
- Image Classification: Assigning a label to an entire image (e.g., "cat", "car").
- Object Detection: Locating and identifying multiple objects within an image (typically via bounding boxes).
- Semantic Segmentation: Labeling each pixel in an image with the class of the object it belongs to (e.g., road, sky, person).
Convolutional Neural Network (CNN)
A Convolutional Neural Network (CNN) is a specialized deep learning architecture designed for processing grid-like data (such as images). It uses convolutional layers to automatically learn hierarchical spatial features by applying filters that capture local patterns (edges, textures, etc.). This architecture is highly effective for computer vision tasks due to its parameter sharing and spatial invariance properties.
Convolution
A convolution is a mathematical operation that combines an input (e.g., an image) with a filter (or kernel) to produce a feature map. In the context of CNNs, it involves sliding the filter over the input, computing the dot product between the filter's weights and the corresponding local region of the input at each position.
How a Convolutional Filter Works (High-Level)
- Filter Definition: A small matrix (e.g., 3×3, 5×5) of learnable weights that detects specific local patterns (e.g., vertical edges, blurs).
- Sliding: The filter is placed at the top-left corner of the input image and moved across it in steps (strides), covering every possible location.
- Dot Product: At each position, the filter's elements are multiplied element‑wise with the overlapping input pixel values, and the results are summed to produce a single output value.
- Feature Map: The repeated dot products generate a 2D map highlighting where the pattern recognized by the filter appears in the input.
- Multiple Filters: Using many filters in parallel yields multiple feature maps, which are stacked to form the output of the convolutional layer. These maps capture different features and are passed to subsequent layers.
Through backpropagation, the filter weights are adjusted during training so that they respond strongly to patterns useful for the specific task (e.g., distinguishing cats from dogs). This process allows CNNs to learn increasingly complex features as depth increases.