The invention provides a pedestrian detection method and system. According to the pedestrian detection method, head and shoulder detection, face detection and whole body detection are carried out on a collected image to obtain one or more kinds of features of the head and shoulders in front, the head and the shoulders at back or the head and the shoulders on the side, feature information of the whole body in front, feature information of the whole body at back, feature information of the whole body on the left and feature information of the whole body on the right. Accordingly, the features of the head and the shoulders in front, at back and on the side and features of the whole body at multiple angles of a target pedestrian with the covered face or a camouflage target pedestrian can be obtained, real-time handling of illegal activities and postmortem analysis are facilitated, and later workload of related staff can be greatly reduced. Defects of a staff gate system based on face detection in the prior art are overcome. The method and system are suitable for face detection in front, can be used for pedestrian detection at back and on the side, all information of a person is basically included in a face snapshot and a whole body snapshot of the person, and later deep analysis is facilitated.