Learning Discriminative Spatial Relations for Detector Dictionaries: An Application to Pedestrian Detection