The present invention discloses a pedestrian detection method for the traffic environment based on the human body tree model, and belongs to the field of road traffic pedestrian detection. The method comprises: selecting a data set with annotation information of the human body joint as a training sample of the model, and expanding the joint into the required human body part; based on the relative position relation between each parent part and child part, using principles of the relative distance of the sample, the mean value of the sample correlation difference and the mean value of the total correlation difference of the sample set, optimizing the initial clustering center of the K-means algorithm to realize the clustering of the various parts of the human body, and obtaining hidden variables of the training samples; using a coordinate reduction method to solve the hidden structure SVM problem, and training, obtaining, detecting and determining the models; in the detection phase, according to the constructed human tree structure, the part state transition equation and the off-line training model, merging the dynamic planning idea to realize the traversal of the pyramid of the test sample, obtaining the whole human body detection result of the image, and using a non-maximal suppression algorithm to obtain the final detection bounding box.