CPC G06V 40/103 (2022.01) [G06N 3/08 (2013.01); G06T 7/20 (2013.01); G06T 7/70 (2017.01); G06V 20/46 (2022.01); G06V 40/168 (2022.01); G06V 40/172 (2022.01); G06V 40/178 (2022.01); G06T 2207/20081 (2013.01); G06T 2207/20084 (2013.01); G06T 2207/30201 (2013.01); G06T 2207/30242 (2013.01); G06V 2201/07 (2022.01)] | 16 Claims |
1. A method in a real-time pedestrian statistic apparatus; the real-time pedestrian statistic apparatus comprises a processor and a storage with at least one command;
the at least one command is implemented by the processor to execute the following steps:
acquiring to-be-analyzed video;
extracting images showing pedestrian in the to-be-analyzed video as images;
identifying pedestrians in the images by a first detection model and outputting pedestrian frames;
extracting facial sub-frames based on a face identification operation applied to the pedestrian frames;
executing a duplication-removal operation of duplicated faces in the facial sub-frames by a second detection model;
determining whether a database comprises a face of each detected pedestrian;
labeling the face of pedestrians appearing in each facial sub-frame and tracking a path of a movement of a pedestrian based on a specified algorithm when the database does not comprise the face;
determining whether the path of the movement of the pedestrian passes through a specified location; and
when the path of the movement of the pedestrian passes through the specified location, extracting target object, which are projected to pass through the specified location, and computing a total number of the target objects;
wherein the method further comprises:
detecting facial features in the facial sub-frame by a third detection model;
wherein the step of detecting facial features in the facial sub-frame by the third detection model further comprises:
extracting facial features in the facial sub-frame;
correcting an angle of the face in the facial sub-frame according to the facial features;
determining whether an area of the facial sub-frame is greater than a specified area;
when the area of the facial sub-frame is greater than the specified area, acquiring a facial ambiguity based on a first function;
determining whether the facial ambiguity is greater than a threshold ambiguity; and
when the facial ambiguity is greater than the threshold ambiguity, detecting an age and a sex of the face appearing in the image by the third detection model.
|