Shape-based pedestrian detection and localization