Mini project 1 · CMU 16-720
Spatial pyramid matching for scene classification.
Given an image, determine the scene it was taken in. The representation is built on a bag of visual words, extended with spatial pyramid matching so that where features appear counts, not just which ones appear.
The approach
The program determines the scene where an image was taken. The image representation is built on a bag-of-visual-words approach: filter responses are extracted across the image, clustered into a dictionary of visual words, and each image is then described by the histogram of which words it contains.
The weakness of a plain histogram is that it discards all spatial information, so an image with sky at the top scores identically to one with sky at the bottom. Spatial pyramid matching fixes this by computing histograms over progressively finer grid subdivisions and concatenating them, capturing both global and local spatial structure when classifying the scene category.