sliding window detection
Suppose you have a yes/no classifier that, given a fixed-size crop, can answer is this a face? Detection asks the harder question: where are the faces in this whole photo, and how big? The sliding window paradigm turns detection into many classification calls: you take a fixed-size window, slide it across every position of the image, and at each position run the classifier on the cropped patch. To find objects of different sizes, you repeat the whole scan at multiple scales — usually by shrinking the image step by step into an image pyramid — so a single fixed-size window can catch both near and far objects.
Made precise, the detector visits a grid of positions (often every few pixels, called the stride) across each level of the pyramid, extracts features from each window, scores it, and keeps windows above a threshold. Because the true object usually triggers several overlapping windows, a cleanup step called non-maximum suppression (NMS) keeps the highest-scoring box in each cluster and discards its neighbors. This was the dominant detection recipe before deep learning, and the engineering challenge was speed: a megapixel image at several scales and a small stride yields hundreds of thousands to millions of windows, so the classifier per window must be extremely cheap or aggressively short-circuited.
That cost pressure shaped the most famous classical detectors. The Viola–Jones face detector used a boosted cascade so that the vast majority of background windows are rejected after only a few cheap tests. HOG-plus-linear-SVM (Dalal and Triggs) made the per-window score a single dot product. The deformable part model extended sliding windows with movable parts. Modern deep detectors did not abandon the idea so much as fold it into convolution: a fully convolutional network effectively evaluates a classifier at every spatial location in one shared pass (the sliding window becomes the receptive field), and anchor-based detectors like Faster R-CNN, SSD, and YOLO, or query-based ones like DETR, replaced the explicit pyramid-and-stride loop with learned, far more efficient mechanisms.
Why it matters: sliding windows make the accuracy-versus-speed trade-off explicit. Finer stride and more scales find more objects but cost more windows; this tension is the historical reason cascades and, later, region proposals and single-shot CNNs were invented.