The invention discloses a safety protection method for the personnel around a foundation pit. The method comprises steps that S1, a safety warning area is set at the area around the foundation pit; S2, cameras are placed around the foundation pit, and the cameras are guaranteed to capture photos including both the foundation pit and the alert area; S3, all the cameras mounted around the foundationpit are connected with a remote control center, and the monitoring area is adjusted by the remote control center according to the surrounding conditions of the foundation pit, and the foundation pitarea is delimited; and S4, the photos captured by the cameras are utilized by the remote control center, through the pedestrian detection algorithm, the personnel around the foundation pit are detected, the relative position between the detected surrounding personnel and the safety warning area is further obtained, whether issuing a warning message is needed is determined, for the pedestrian detection algorithm, the probability that a small quantity of sample classes is acquired through model network calculation is enhanced. The method is advantaged in that through the principle, accuracy andthe speed of detection on the personnel around the foundation pit are improved, the personnel around the foundation pit is rapidly and timely prompted, and safety of the personnel around the foundation pit is guaranteed with high reliability.