1. A method comprising: in a training mode, using a plurality of training images for learning spatial distributions associated with a plurality of body parts; in the training mode, generating a three-dimensional implicit shape model of a person based on the plurality of training images, the three-dimensional implicit shape model including a three-dimensional spatial distribution of the person, the spatial distribution defined by at least x, y, and scale coordinates; in a detection mode, 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 associated with the plurality of body parts or with the three-dimensional spatial distribution of the person; in the detection mode, assigning a confidence value to each detection of a body part; in the detection mode, when first and second detections of a first body part overlap, removing one of the first and second detections of the first body part; in the detection mode, clustering the-remaining detections of body parts located within a predetermined distance from one another to create one effective detection for each cluster of detections; and in a segmentation mode, determining a position of a person associated with each effective detection by combining detected and clustered body parts into a probabilistic framework.