The invention discloses an anti-collision early-warning method based on pedestrians and riders in front of a road, and belongs to the field of driving auxiliary systems. The anti-collision early-warning method comprises three aspects of environment perception, information interpretation and target state judgment. According to the anti-collision early-warning method, a collected training set is transmitted to a YOLO-R network to be trained, target detection and classification are conducted, and multi-target tracking is achieved through Kalman filtering; an image is subjected to inverse perspective transformation, thus an IPM image is obtained, a relation curve between original image pixel coordinates and IPM image pixel coordinates is fitted through data regression modeling, and the distance is estimated through a linear relation between the IPM image pixel coordinates and world coordinates; and according to the vehicle speed and the braking distance, an early-warning activation area isdetermined, then a fuzzy early-warning algorithm is adopted for targets in the activation area so as to judge whether the targets in the activation area are in danger or not, if the danger exists, drivers are reminded in time, accordingly, accidents are effectively reduced, and the safety of the pedestrians and the riders is protected.