1. A method comprising: using a plurality of training images for learning spatial distributions associated with a plurality of body parts; detecting a plurality of detections of body parts in an input image, the detections of body parts are associated with respective previously learned spatial distributions; clustering the detections of body parts located within a predetermined distance from one another to create one effective detection for each cluster of detections; and determining a position of a person associated with each effective detection.