Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for obtaining a foreground occupancy map for a camera view. The methods, systems, and apparatus include actions of determining an area of an image in which there is a false detection of an object, determining a likely contribution of the area to the false detection based on the foreground occupancy map, generating a modified object detector based on the likely contribution of the area, and detecting an object using the modified object detector.