Search

US-12626591-B2 - Detection method and apparatus of abnormal vehicle, device, and storage medium

US12626591B2US 12626591 B2US12626591 B2US 12626591B2US-12626591-B2

Abstract

This disclosure provides a detection method and an apparatus of abnormal vehicle, device, and storage medium, wherein the detection method includes: obtaining a surveillance video of a target road; performing background modeling based on the surveillance video to obtain background images of at least partial video frames in the surveillance video; performing vehicle detection processing on the background images; and determining detection boxes located on the target road in the background images as detection boxes of abnormal vehicles with abnormal stop events.

Inventors

  • Jie Wu

Assignees

  • BEIJING ZITIAO NETWORK TECHNOLOGY CO., LTD.

Dates

Publication Date
20260512
Application Date
20220509
Priority Date
20210616

Claims (17)

  1. 1 . A detection method of abnormal vehicle, comprising: obtaining a surveillance video of a target road; performing differential mask extraction processing on the surveillance video to obtain a mask of the target road; performing background modeling based on the surveillance video to obtain background images of at least partial video frames in the surveillance video; performing vehicle detection processing on the background images; and determining detection boxes located on the target road in the background images as detection boxes of abnormal vehicles with abnormal stop events, comprising: determining Intersections over Union (IoUs) between the detection boxes in the background images and the mask; and determining detection boxes with IoUs greater than a first threshold as the detection boxes of the abnormal vehicles with the abnormal stop events.
  2. 2 . A non-transitory computer-readable storage medium stored thereon a computer instructions which, when executed by a processor, cause the processor to implement the detection method of claim 1 .
  3. 3 . A detection method of abnormal vehicle, comprising: obtaining a surveillance video of a target road; performing background modeling based on the surveillance video to obtain background images of at least partial video frames in the surveillance video; performing vehicle detection processing on the background images; determining detection boxes located on the target road in the background images as detection boxes of abnormal vehicles with abnormal stop events; determining at least one image sequence composed of background images from the background images of the at least partial video frames, wherein background images in a same image sequence comprise detection boxes of a same abnormal vehicle; and for each image sequence, determining a start time and an end time of the image sequence as a start time and an end time of an abnormal stop event corresponding to the image sequence, wherein the abnormal stop event corresponding to the image sequence is an abnormal stop event of a same abnormal vehicle corresponding to the image sequence.
  4. 4 . The detection method according to claim 3 , wherein the determining the at least one image sequence composed of the background images from the background images of the at least partial video frames comprises: for any two background images with a shooting interval less than a preset interval, calculating an Intersections over Union (IoU) between a target detection box in one of the two background images and a target detection box in the other background image, the target detection boxes being the detection boxes of the abnormal vehicles; and determining that a first target detection box in one of the two background images and a second target detection box in the other background image are detection boxes of a same abnormal vehicle in response to an IoU between the first target detection box and the second target detection box being greater than a second threshold; and adding the one of the two background images and the other background image to a same image sequence.
  5. 5 . The detection method according to claim 3 , wherein the at least one image sequence comprises a first image sequence and a second image sequence, the first image sequence corresponding to an abnormal stop event of a first abnormal vehicle, and the second image sequence corresponding to an abnormal stop event of a second abnormal vehicle, and the detection method further comprises: before the determining the start time and the end time of the image sequence as the start time and the end time of the abnormal stop event corresponding to the image sequence for each image sequence, determining that a first abnormal stop event and a second abnormal stop event are a same abnormal stop event in response to an IoU between a detection box of the first abnormal vehicle in a first frame of the first image sequence and a detection box of the second abnormal vehicle in a first frame of the second image sequence being greater than a third threshold; and combining the first image sequence and the second image sequence into one image sequence.
  6. 6 . The detection method according to claim 3 , further comprising, for each image sequence: performing vehicle detection on other video frames located before the image sequence in the surveillance video after the determining the at least one image sequence composed of the background images from the background images of the at least partial video frames; deleting the detection boxes of the same abnormal vehicle from the image sequence in response to the other video frames comprising the detection boxes of the same abnormal vehicle corresponding to the image sequence, wherein the determining the start time and the end time of the image sequence as the start time and the end time of the abnormal stop event corresponding to the image sequence for each image sequence is performed in response to the other video frames not comprising the detection boxes of the same abnormal vehicle corresponding to the image sequence.
  7. 7 . The detection method according to claim 3 , further comprising: for each image sequence, obtaining a plurality of video frames corresponding to the image sequence based on a correspondence between the background images and the video frames before the determining the start time and the end time of the image sequence as the start time and the end time of the abnormal stop event corresponding to the image sequence for each image sequence; performing vehicle detection on the plurality of video frames; determining a video frame in which the same abnormal vehicle first appears among the plurality of video frames as a target frame based on a detection result; and deleting a part of the image sequence that was captured earlier than the target frame.
  8. 8 . The detection method according to claim 3 , further comprising: determining multiple abnormal stop events with start times within a preset period of time as the same abnormal stop event after the determining the start time and the end time of the image sequence as the start time and the end time of the abnormal stop event corresponding to the image sequence for each image sequence; and determining an earliest start time and a latest end time corresponding to the multiple abnormal stop events as a start time and an end time of the same abnormal stop event.
  9. 9 . A computer device, comprising: a memory; and a processor coupled to the memory, the processor configured to execute the detection method of claim 3 .
  10. 10 . The computer device according to claim 9 , wherein the determining the at least one image sequence composed of the background images from the background images of the at least partial video frames comprises: for any two background images with a shooting interval less than a preset interval, calculating an IoU between a target detection box in one of the two background images and a target detection box in the other background image, the target detection boxes being the detection boxes of the abnormal vehicles; and determining that a first target detection box in one of the two background images and a second target detection box in the other background image are detection boxes of a same abnormal vehicle in response to an IoU between the first target detection box and the second target detection box being greater than a second threshold; and adding the one of the two background images and the other background image to a same image sequence.
  11. 11 . The computer device according to claim 9 , wherein the at least one image sequence comprises a first image sequence and a second image sequence, the first image sequence corresponding to an abnormal stop event of a first abnormal vehicle, and the second image sequence corresponding to an abnormal stop event of a second abnormal vehicle, and the detection method further comprises: before the determining the start time and the end time of the image sequence as the start time and the end time of the abnormal stop event corresponding to the image sequence for each image sequence, determining that a first abnormal stop event and a second abnormal stop event are a same abnormal stop event in response to an IoU between a detection box of the first abnormal vehicle in a first frame of the first image sequence and a detection box of the second abnormal vehicle in a first frame of the second image sequence being greater than a third threshold; and combining the first image sequence and the second image sequence into one image sequence.
  12. 12 . The computer device according to claim 9 , wherein the processor is further configured to execute the detection method for performing instructions comprising, for each image sequence: performing vehicle detection on other video frames located before the image sequence in the surveillance video after the determining the at least one image sequence composed of the background images from the background images of the at least partial video frames; deleting the detection boxes of the same abnormal vehicle from the image sequence in response to the other video frames comprising the detection boxes of the same abnormal vehicle corresponding to the image sequence, wherein the determining the start time and the end time of the image sequence as the start time and the end time of the abnormal stop event corresponding to the image sequence for each image sequence is performed in response to the other video frames not comprising the detection boxes of the same abnormal vehicle corresponding to the image sequence.
  13. 13 . The computer device according to claim 9 , wherein the processor is further configured to execute the detection method for performing instructions comprising: for each image sequence, obtaining a plurality of video frames corresponding to the image sequence based on a correspondence between the background images and the video frames before the determining the start time and the end time of the image sequence as the start time and the end time of the abnormal stop event corresponding to the image sequence for each image sequence; performing vehicle detection on the plurality of video frames; determining a video frame in which the same abnormal vehicle first appears among the plurality of video frames as a target frame based on a detection result; and deleting a part of the image sequence that was captured earlier than the target frame.
  14. 14 . The computer device according to claim 9 , wherein the processor is further configured to execute the detection method for performing instructions comprising: determining multiple abnormal stop events with start times within a preset period of time as the same abnormal stop event after the determining the start time and the end time of the image sequence as the start time and the end time of the abnormal stop event corresponding to the image sequence for each image sequence; and determining an earliest start time and a latest end time corresponding to the multiple abnormal stop events as a start time and an end time of the same abnormal stop event.
  15. 15 . A non-transitory computer-readable storage medium stored thereon a computer instructions which, when executed by a processor, cause the processor to implement the detection method of claim 3 .
  16. 16 . The non-transitory computer-readable storage medium according to claim 15 , wherein the determining the at least one image sequence composed of the background images from the background images of the at least partial video frames comprises: for any two background images with a shooting interval less than a preset interval, calculating an IoU between a target detection box in one of the two background images and a target detection box in the other background image, the target detection boxes being the detection boxes of the abnormal vehicles; and determining that a first target detection box in one of the two background images and a second target detection box in the other background image are detection boxes of a same abnormal vehicle in response to an IoU between the first target detection box and the second target detection box being greater than a second threshold; and adding the one of the two background images and the other background image to a same image sequence.
  17. 17 . A computer device comprising: a memory; and a processor coupled to the memory, the processor configured to execute a detection method for performing instructions comprising: obtaining a surveillance video of a target road; performing differential mask extraction processing on the surveillance video to obtain a mask of the target road; performing background modeling based on the surveillance video to obtain background images of at least partial video frames in the surveillance video; performing vehicle detection processing on the background images; and determining detection boxes located on the target road in the background images as detection boxes of abnormal vehicles with abnormal stop events, comprising: determining Intersections over Union (IoUs) between the detection boxes in the background images and the mask; and determining detection boxes with IoUs greater than a first threshold as the detection boxes of the abnormal vehicles with the abnormal stop events.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS The present disclosure is based on and claims priority of Chinese application for invention No. 202110667910.5, filed on Jun. 16, 2021, the disclosure of which is hereby incorporated into this disclosure by reference in its entirety. TECHNICAL FIELD This disclosure relates to the technical field of image processing, in particular to a detection method and an apparatus of abnormal vehicle, device, and storage medium. BACKGROUND Relevant technologies usually use deep learning-based methods to detect abnormally stopped vehicles on roads. However, due to the relatively small number of samples of abnormally stopped vehicles and insufficient accuracy in sample labeling, relevant technologies can generally only use samples of normal driving vehicles to train detection models and identify significant behavior that deviates from normal driving conditions as abnormal stopping behavior. SUMMARY In an aspect, the present disclosure provides a detection method of abnormal vehicle, comprising: obtaining a surveillance video of a target road;performing background modeling based on the surveillance video to obtain background images of at least partial video frames in the surveillance video;performing vehicle detection processing on the background images; anddetermining detection boxes located on the target road in the background images as detection boxes of abnormal vehicles with abnormal stop events. Optionally, the detection method further comprises: performing differential mask extraction processing on the surveillance video to obtain a mask of the target road after the obtaining the surveillance video of the target road,wherein the determining the detection boxes located on the target road in the background images as the detection boxes of the abnormal vehicles with the abnormal stop events comprises:determining Intersections over Union (IoUs) between the detection boxes in the background images and the mask; anddetermining detection boxes with IoUs greater than a first threshold as the detection boxes of the abnormal vehicles with the abnormal stop events. Optionally, the detection method further comprises: determining at least one image sequence composed of background images from the background images of the at least partial video frames after the determining the detection boxes located on the target road in the background images as the detection boxes of the abnormal vehicles with the abnormal stop events, wherein background images in a same image sequence comprise detection boxes of a same abnormal vehicle; andfor each image sequence, determining a start time and an end time of the image sequence as a start time and an end time of an abnormal stop event corresponding to the image sequence, wherein the abnormal stop event corresponding to the image sequence is an abnormal stop event of a same abnormal vehicle corresponding to the image sequence. Optionally, the determining the at least one image sequence composed of the background images from the background images of the at least partial video frames comprises: for any two background images with a shooting interval less than a preset interval, calculating an IoU between a target detection box in one of the two background images and a target detection box in the other background image, the target detection boxes being the detection boxes of the abnormal vehicles; anddetermining that a first target detection box in one of the two background images and a second target detection box in the other background image are detection boxes of a same abnormal vehicle in response to an IoU between the first target detection box and the second target detection box being greater than a second threshold; andadding the one of the two background images and the other background image to a same image sequence. Optionally, the at least one image sequence comprises a first image sequence and a second image sequence, the first image sequence corresponding to an abnormal stop event of a first abnormal vehicle, and the second image sequence corresponding to an abnormal stop event of a second abnormal vehicle, and the detection method further comprises: before the determining the start time and the end time of the image sequence as the start time and the end time of the abnormal stop event corresponding to the image sequence for each image sequence, determining that a first abnormal stop event and a second abnormal stop event are a same abnormal stop event in response to an IoU between a detection box of the first abnormal vehicle in a first frame of the first image sequence and a detection box of the second abnormal vehicle in a first frame of the second image sequence being greater than a third threshold; andcombining the first image sequence and the second image sequence into one image sequence. Optionally, the detection method further comprises: for each image sequence,performing vehicle detection on other video frames located before the image seque