The invention relates to the technical field of computer vision, in particular to a child detection frame filtering algorithm based on grid clustering, and the method comprises the following steps: obtaining video data in a real scene through a camera, transmitting the video data to a computer through the camera, obtaining a target image, storing the target image, selecting a target camera, and pulling detection frame data corresponding to one week from a production environment; according to the child detection frame filtering algorithm provided by the invention, a detected human-shaped frame can be directly used as statistical data, then the average frame height in the grid range is obtained by using a grid clustering method, whether a child is a child is judged by using the average frame height and the target frame height, and meanwhile, the average frame height of each region in a target image can be judged; misjudgment caused by shielding is avoided, and the problem that due to the fact that many shielding and false detection exist in a real scene, statistical clustering is directly carried out through a detection frame, the whole data distribution is disturbed by an abnormal detection frame, and consequently many misjudgments of a child frame are caused is solved.