CN-116091973-B - Pedestrian loitering detection method, device, equipment and medium
Abstract
The embodiment of the application provides a pedestrian loitering detection method, device, equipment and medium, wherein the method specifically comprises the steps of obtaining a video stream corresponding to a video area, tracking the video stream to obtain a track contained in the video stream, wherein the track corresponds to track characteristics, the track characteristics comprise pedestrian position characteristics and pedestrian identity characteristics, associating the track contained in the video stream with a corresponding pedestrian according to the pedestrian identity characteristics, determining track distribution information corresponding to the pedestrian according to the pedestrian position characteristics corresponding to the pedestrian, and judging whether the pedestrian is a candidate loitering target according to the track distribution information. The embodiment of the application can improve the accuracy of pedestrian loitering detection.
Inventors
- GONG XIAOYUN
Assignees
- 天翼云科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230113
Claims (13)
- 1. A method of detecting pedestrian wander, the method comprising: acquiring a video stream corresponding to a video area; The video stream is tracked by pedestrians to obtain tracks contained in the video stream, wherein the tracks correspond to track features, and the track features comprise pedestrian position features and pedestrian identity features; associating tracks contained in the video stream to corresponding pedestrians according to the pedestrian identity characteristics; determining track distribution information corresponding to pedestrians according to pedestrian position characteristics corresponding to the pedestrians; judging whether the pedestrian is a candidate loiter target or not according to the track distribution information; the determining the track distribution information corresponding to the pedestrians comprises the following steps: Mapping the pedestrian position characteristics to a preset grid area to obtain corresponding track points of the pedestrian in the preset grid area, wherein the preset grid area comprises n multiplied by n grids; And determining entropy information of the track of the pedestrian in the preset grid area according to the occurrence times of the track points corresponding to the pedestrian in the grid, and taking the entropy information as track distribution information corresponding to the pedestrian.
- 2. The method of claim 1, wherein the determining entropy information of the pedestrian trajectory in the preset mesh region comprises: Determining the occurrence probability of the track points in the grid according to the occurrence times of the track points corresponding to the pedestrian track in the grid; Determining entropy information corresponding to a pedestrian track according to the occurrence probability of track points in a plurality of grids; And carrying out weighted average on entropy information corresponding to the plurality of pedestrian tracks to obtain entropy information of the pedestrian tracks in the preset grid area.
- 3. The method of any one of claims 1-2, wherein the determining whether the pedestrian is a candidate loiter target comprises: And judging whether the pedestrian is a candidate loiter target or not according to the track distribution information, the repeated occurrence information of the pedestrian in the image acquisition equipment and/or the duration time information of the pedestrian track.
- 4. A method according to claim 3, characterized in that the method further comprises: determining repeated occurrence information of pedestrians in the image acquisition equipment according to the corresponding occurrence times of the pedestrian tracks in the plurality of image acquisition equipment respectively and/or And determining duration information of the pedestrian track according to the initial detection point and the final detection point corresponding to the pedestrian track.
- 5. The method of claim 3, wherein the determining whether the pedestrian is a candidate loiter target based on the trajectory distribution information and repeated occurrence information of the pedestrian in an image capturing device and/or duration information of a pedestrian trajectory comprises: carrying out weighted average on the track distribution information, repeated occurrence information of pedestrians in the image acquisition equipment and/or duration time information of the pedestrian track so as to obtain loitering scores corresponding to the pedestrians; sorting the pedestrians according to the loitering scores corresponding to the pedestrians; and judging whether the pedestrian is a candidate loiter target or not according to the sequencing result.
- 6. The method according to any one of claims 1 to 2, wherein said associating tracks contained in the video stream to corresponding pedestrians in accordance with the pedestrian identity characteristics comprises: newly creating a pedestrian, and associating a first track with the pedestrian; Determining a degree of matching between a first track and a second track, wherein the second track is different from the first track; and associating a second track with the matching degree meeting the preset condition with the pedestrian.
- 7. The method according to any one of claims 1 to 2, further comprising: adding tracks contained in at least one video stream to a track library; The associating the track contained in the video stream to the corresponding pedestrian according to the pedestrian identity feature includes: constructing a pedestrian library, wherein the pedestrian library comprises at least one pedestrian; Inquiring whether a first pedestrian matched with the first track exists in the pedestrian library aiming at the first track in the track library, and if so, associating the first track with the first pedestrian; If no first pedestrian matched with the first pedestrian exists, a second pedestrian is newly built, and the first track is associated with the second pedestrian.
- 8. The method according to any one of claims 1 to 2, wherein the pedestrian location feature comprises a location feature corresponding to a pedestrian bounding box in the trajectory.
- 9. The method according to any one of claims 1 to 2, wherein the pedestrian identity feature comprises a pedestrian identity feature of a corresponding image of a pedestrian bounding box in the trajectory.
- 10. A pedestrian wander detection device, the device comprising: The video stream acquisition module is used for acquiring a video stream corresponding to the video area; The system comprises a video stream, a pedestrian tracking module, a tracking module and a control module, wherein the video stream is used for carrying out pedestrian tracking on the video stream to obtain tracks contained in the video stream, and the tracks correspond to track characteristics which comprise pedestrian position characteristics and pedestrian identity characteristics; the track pedestrian association module is used for associating tracks contained in the video stream to corresponding pedestrians according to the pedestrian identity characteristics; The track distribution information determining module is used for determining track distribution information corresponding to pedestrians according to the pedestrian position characteristics corresponding to the pedestrians; the judging module is used for judging whether the pedestrian is a candidate loiter target or not according to the track distribution information; wherein, the track distribution information determining module includes: The mapping module is used for mapping the pedestrian position characteristics to a preset grid area to obtain corresponding track points of the pedestrians in the preset grid area, wherein the preset grid area comprises n multiplied by n grids; The entropy information determining module is used for determining entropy information of the track of the pedestrian in the preset grid area according to the occurrence times of the track points corresponding to the pedestrian in the grid, and the entropy information is used as track distribution information corresponding to the pedestrian.
- 11. The apparatus of claim 10, wherein the entropy information determination module comprises: the occurrence probability determining module is used for determining the occurrence probability of the track points in the grid according to the occurrence times of the track points corresponding to the pedestrian track in the grid; the single track entropy information determining module is used for determining entropy information corresponding to a pedestrian track according to the occurrence probabilities of track points in the grids; The first weighted average module is used for weighted average of entropy information corresponding to the plurality of pedestrian tracks so as to obtain entropy information of the pedestrian tracks in the preset grid area.
- 12. An electronic device is characterized by comprising a processor; and A memory having executable code stored thereon that, when executed, causes the processor to perform the method of any of claims 1-9.
- 13. A machine readable medium having stored thereon executable code which when executed causes a processor to perform the method of any of claims 1-9.
Description
Pedestrian loitering detection method, device, equipment and medium Technical Field The application relates to the technical field of computer vision, in particular to a pedestrian loitering detection method, device, equipment and medium. Background Pedestrian loitering detection technology is an important technology in the technical field of computer vision. A pedestrian may be considered to be in a loitering state when the pedestrian is continuously, reciprocally moving within the video area. The pedestrian loitering detection technology can detect pedestrian behaviors in the video area and timely give out warnings. The pedestrian loitering detection technology can be applied to a plurality of application scenes such as ponds, reservoirs, banks and the like. In the existing pedestrian loitering detection method, matching tracking based on positions is generally carried out on targets appearing in a video area, the existence time of the tracked targets is recorded, and targets with the existence time being greater than a set time threshold are taken as candidate loitering targets. In practical application, the set time threshold has easy cracking. If the set time threshold is cracked, the method can be multiplied organically by illegal persons, and further the accuracy of pedestrian wandering detection is affected. Disclosure of Invention The embodiment of the application provides a pedestrian loitering detection method, which can improve the accuracy of pedestrian loitering detection. Correspondingly, the embodiment of the application also provides a pedestrian loitering detection device, electronic equipment and a machine-readable medium, which are used for guaranteeing the implementation and application of the method. In order to solve the above problems, an embodiment of the application discloses a pedestrian loitering detection method, which comprises the following steps: acquiring a video stream corresponding to a video area; The video stream is tracked by pedestrians to obtain tracks contained in the video stream, wherein the tracks correspond to track features, and the track features comprise pedestrian position features and pedestrian identity features; associating tracks contained in the video stream to corresponding pedestrians according to the pedestrian identity characteristics; determining track distribution information corresponding to pedestrians according to pedestrian position characteristics corresponding to the pedestrians; and judging whether the pedestrian is a candidate loiter target or not according to the track distribution information. In order to solve the above problems, an embodiment of the present application discloses a pedestrian wander detection device, the device includes: The video stream acquisition module is used for acquiring a video stream corresponding to the video area; The system comprises a video stream, a pedestrian tracking module, a tracking module and a control module, wherein the video stream is used for carrying out pedestrian tracking on the video stream to obtain tracks contained in the video stream, and the tracks correspond to track characteristics which comprise pedestrian position characteristics and pedestrian identity characteristics; the track pedestrian association module is used for associating tracks contained in the video stream to corresponding pedestrians according to the pedestrian identity characteristics; The track distribution information determining module is used for determining track distribution information corresponding to pedestrians according to the pedestrian position characteristics corresponding to the pedestrians; and the judging module is used for judging whether the pedestrian is a candidate loiter target or not according to the track distribution information. Optionally, the track distribution information determining module includes: the mapping module is used for mapping the pedestrian position characteristics to a preset grid area to obtain corresponding track points of the pedestrians in the preset network area, wherein the preset grid area comprises n multiplied by n grids; the entropy information determining module is used for determining entropy information of the track of the pedestrian in the preset network area according to the occurrence times of the track points corresponding to the pedestrian in the grid, and the entropy information is used as track distribution information corresponding to the pedestrian. Optionally, the entropy information determining module includes: the occurrence probability determining module is used for determining the occurrence probability of the track points in the grid according to the occurrence times of the track points corresponding to the pedestrian track in the grid; the single track entropy information determining module is used for determining entropy information corresponding to a pedestrian track according to the occurrence probabilities of track points in the grids; The first