Abnormal vehicle detection method, device, equipment and storage medium
1. A method of detecting an abnormal vehicle, characterized by comprising:
acquiring a monitoring video of a target road;
performing background modeling processing based on the monitoring video to obtain a background image of at least part of video frames in the monitoring video;
carrying out vehicle detection processing on the background image;
and determining the detection frame positioned on the target road in the background image as a detection frame of an abnormal vehicle with an abnormal parking event.
2. The method of claim 1, wherein after the obtaining the surveillance video of the target road, the method further comprises:
carrying out differential mask extraction processing on the monitoring video to obtain a mask of the target road;
the determining a detection frame located on the target road in the background image as a detection frame of an abnormal vehicle in which an abnormal parking event occurs includes:
determining the intersection ratio of the detection frame in the background image and the mask;
and determining the detection frame with the intersection ratio larger than a first threshold value as the detection frame of the abnormal vehicle with the abnormal parking event.
3. The method according to claim 1 or 2, wherein the determining of the detection frame on the target road in the background image is subsequent to the detection frame of the abnormal vehicle in which the abnormal parking event occurs, the method further comprises:
determining at least one image sequence formed by background images from the background images of at least part of the video frames, wherein the background images in the same image sequence comprise detection frames of the same abnormal vehicle;
and for each image sequence, determining the starting time and the ending time of the image sequence as the starting time and the ending time of the abnormal parking event corresponding to the image sequence, wherein the abnormal parking event corresponding to the image sequence refers to the abnormal parking event of the same abnormal vehicle corresponding to the image sequence.
4. The method of claim 3, wherein determining at least one image sequence of background images from the background images of the at least some video frames comprises:
calculating the intersection ratio of a target detection frame in one background image and a target detection frame in the other background image aiming at any two background images with shooting intervals smaller than a preset interval, wherein the target detection frame is the detection frame of an abnormal vehicle;
in response to the intersection ratio of a first target detection frame in the one background image and a second target detection frame in the other background image being greater than a second threshold, determining that the first target detection frame and the second target detection frame are detection frames of the same abnormal vehicle;
adding the one background image and the another background image to the same image sequence.
5. The method of claim 3, wherein the at least one sequence of images includes a first sequence of images corresponding to an abnormal parking event of a first abnormal vehicle and a second sequence of images corresponding to an abnormal parking event of a second abnormal vehicle;
for each image sequence, determining the starting time and the ending time of the image sequence to be before the starting time and the ending time of the abnormal parking event corresponding to the image sequence, wherein the method further comprises the following steps:
determining that the first abnormal parking event and the second abnormal parking event are the same abnormal parking event in response to the intersection ratio of the detection frame of the first abnormal vehicle in the first frame of the first image sequence and the detection frame of the second abnormal vehicle in the first frame of the second image sequence being greater than a third threshold;
merging the first image sequence and the second image sequence into one image sequence.
6. The method of claim 3, wherein after determining at least one image sequence of background images from the background images of the at least some video frames, the method further comprises:
for each image sequence, performing vehicle detection on other video frames in the monitoring video, which are positioned before the image sequence;
in response to the other video frames including the detection frame of the same abnormal vehicle corresponding to the image sequence, deleting the detection frame of the same abnormal vehicle from the target image sequence;
and in response to the other video frames not including the detection frame of the same abnormal vehicle corresponding to the image sequence, executing the step of determining the starting time and the ending time of the image sequence as the starting time and the ending time of the abnormal parking event corresponding to the image sequence for each image sequence.
7. The method of claim 3, wherein for each image sequence, determining a start time and an end time of the image sequence to be before a start time and an end time of a corresponding abnormal parking event of the image sequence, the method further comprises:
for each image sequence, acquiring a plurality of video frames corresponding to the image sequence based on the corresponding relation between the background image and the video frames;
performing vehicle detection on the plurality of video frames;
determining a video frame in which the same abnormal vehicle appears for the first time in the plurality of video frames as a target frame based on the detection result;
and deleting the part of the image sequence, the shooting time of which is earlier than the target frame.
8. The method of claim 3, wherein for each image sequence, determining a start time and an end time of the image sequence after a start time and an end time of the image sequence corresponding to the abnormal parking event, the method further comprises:
determining a plurality of abnormal parking events with the starting time within the preset time as the same abnormal parking event;
and determining the earliest starting time and the latest ending time corresponding to the plurality of abnormal parking events as the starting time and the ending time of the same abnormal parking event.
9. An abnormal vehicle detection device, comprising:
the video acquisition unit is used for acquiring a monitoring video of a target road;
the background image extraction unit is used for carrying out background modeling processing based on the monitoring video to obtain a background image of at least part of video frames in the monitoring video;
a first vehicle detection unit configured to perform vehicle detection processing on the background image;
a detection frame determination unit configured to determine a detection frame located on the target road in the background image as a detection frame of an abnormal vehicle in which an abnormal parking event occurs.
10. The apparatus of claim 9, further comprising a mask extraction unit;
the mask extraction unit is used for carrying out differential mask extraction processing on the monitoring video to obtain a mask of the target road;
the detection frame determination unit includes:
the first intersection ratio calculation subunit is used for determining the intersection ratio of the detection frame in the background image and the mask;
and the detection frame determining subunit is used for determining the detection frame with the intersection ratio larger than the first threshold value as the detection frame of the abnormal vehicle with the abnormal parking event.
11. The apparatus of claim 9 or 10, further comprising:
the image sequence construction unit is used for determining at least one image sequence formed by background images from the background images of at least part of the video frames, wherein the background images in the same image sequence comprise detection frames of the same abnormal vehicle;
and the abnormal parking event determining unit is used for determining the starting time and the ending time of the image sequence as the starting time and the ending time of the abnormal parking event corresponding to the image sequence aiming at each image sequence, wherein the abnormal parking event corresponding to the image sequence refers to the abnormal parking event of the same abnormal vehicle corresponding to the image sequence.
12. The apparatus according to claim 11, wherein the image sequence construction unit comprises:
the second intersection ratio calculation subunit is used for calculating the intersection ratio of the target detection frame in one background image and the target detection frame in the other background image aiming at any two background images with shooting intervals smaller than a preset interval, wherein the target detection frames refer to the detection frames of abnormal vehicles;
a detection frame association subunit, configured to determine that a first target detection frame in the one background image and a second target detection frame in the another background image are detection frames of the same abnormal vehicle in response to a coincidence ratio of the first target detection frame to the second target detection frame being greater than a second threshold;
and the image sequence combination subunit is used for adding the one background image and the other background image into the same image sequence.
13. The apparatus of claim 11, wherein the at least one sequence of images includes a first sequence of images corresponding to an abnormal parking event of a first abnormal vehicle and a second sequence of images corresponding to an abnormal parking event of a second abnormal vehicle; the device further comprises:
an abnormal parking event fusion unit, configured to determine that the first abnormal parking event and the second abnormal parking event are the same abnormal parking event in response to an intersection ratio of a detection frame of the first abnormal vehicle in the first frame of the first image sequence and a detection frame of the second abnormal vehicle in the first frame of the second image sequence being greater than a third threshold;
an image sequence merging unit for merging the first image sequence and the second image sequence into one image sequence.
14. The apparatus of claim 11, further comprising:
the second vehicle detection unit is used for carrying out vehicle detection on other video frames positioned before the image sequence in the monitoring video aiming at each image sequence;
a detection frame deleting unit, configured to delete a detection frame of the same abnormal vehicle from the target image sequence in response to a detection frame of the same abnormal vehicle corresponding to the image sequence included in the other video frames;
the abnormal parking event determining unit is configured to, when the other video frames do not include the detection frame of the same abnormal vehicle corresponding to the image sequence, perform the determining, for each image sequence, the start time and the end time of the image sequence as the start time and the end time of the abnormal parking event corresponding to the image sequence.
15. The apparatus according to claim 11, further comprising a video frame acquisition unit, a third vehicle detection unit, a target frame determination unit, and a deletion unit:
the video frame acquisition unit is used for acquiring a plurality of video frames corresponding to each image sequence based on the corresponding relation between the background image and the video frame;
the third vehicle detection unit is used for carrying out vehicle detection on the plurality of video frames;
the target frame determining unit is used for determining a video frame of the same abnormal vehicle appearing for the first time in the plurality of video frames as a target frame based on the detection result;
the deleting unit is used for deleting the part of the image sequence, the shooting time of which is earlier than the target frame.
16. The apparatus of claim 11, further comprising:
the abnormal parking event merging unit is used for determining a plurality of abnormal parking events with the starting time within the preset time as the same abnormal parking event; and determining the earliest starting time and the latest ending time corresponding to the plurality of abnormal parking events as the starting time and the ending time of the same abnormal parking event.
17. A computer device, comprising:
memory and a processor, wherein the memory has stored therein a computer program which, when executed by the processor, implements the method of any of claims 1-8.
18. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-8.
Background
The related art generally detects an abnormally stopped vehicle on a road based on a deep learning method. However, due to the reasons that the number of samples for vehicle abnormal stopping is small, the labeling of the samples is not fine enough, and the like, the related art can only train the detection model by using the samples of the vehicles running normally, and recognize the significant behavior deviating from the normal running state as the abnormal stopping behavior, however, the method can easily recognize some normal running behaviors as the abnormal stopping behaviors, and the deep learning method can only be applied to the scenes with the same quality as the training samples, and has poor accuracy in the case of unknown scenes.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present disclosure provide a method, an apparatus, a device, and a storage medium for detecting an abnormal vehicle.
In one aspect, the present disclosure provides a method of detecting an abnormal vehicle, including:
acquiring a monitoring video of a target road;
performing background modeling processing based on the monitoring video to obtain a background image of at least part of video frames in the monitoring video;
carrying out vehicle detection processing on the background image;
and determining the detection frame positioned on the target road in the background image as a detection frame of an abnormal vehicle with an abnormal parking event.
Optionally, after the obtaining of the surveillance video of the target road, the method further includes:
carrying out differential mask extraction processing on the monitoring video to obtain a mask of the target road;
the determining a detection frame located on the target road in the background image as a detection frame of an abnormal vehicle in which an abnormal parking event occurs includes:
determining the intersection ratio of the detection frame in the background image and the mask;
and determining the detection frame with the intersection ratio larger than a first threshold value as the detection frame of the abnormal vehicle with the abnormal parking event.
Optionally, after determining the detection frame located on the target road in the background image as a detection frame of an abnormal vehicle in which an abnormal parking event occurs, the method further includes:
determining at least one image sequence formed by background images from the background images of at least part of the video frames, wherein the background images in the same image sequence comprise detection frames of the same abnormal vehicle;
and for each image sequence, determining the starting time and the ending time of the image sequence as the starting time and the ending time of the abnormal parking event corresponding to the image sequence, wherein the abnormal parking event corresponding to the image sequence refers to the abnormal parking event of the same abnormal vehicle corresponding to the image sequence.
Optionally, the determining at least one image sequence composed of background images from the background images of at least some of the video frames includes:
calculating the intersection ratio of a target detection frame in one background image and a target detection frame in the other background image aiming at any two background images with shooting intervals smaller than a preset interval, wherein the target detection frame is the detection frame of an abnormal vehicle;
in response to the intersection ratio of a first target detection frame in the one background image and a second target detection frame in the other background image being greater than a second threshold, determining that the first target detection frame and the second target detection frame are detection frames of the same abnormal vehicle;
adding the one background image and the another background image to the same image sequence.
Optionally, the at least one image sequence includes a first image sequence and a second image sequence, the first image sequence corresponds to an abnormal parking event of a first abnormal vehicle, and the second image sequence corresponds to an abnormal parking event of a second abnormal vehicle;
for each image sequence, determining the starting time and the ending time of the image sequence to be before the starting time and the ending time of the abnormal parking event corresponding to the image sequence, wherein the method further comprises the following steps:
determining that the first abnormal parking event and the second abnormal parking event are the same abnormal parking event in response to the intersection ratio of the detection frame of the first abnormal vehicle in the first frame of the first image sequence and the detection frame of the second abnormal vehicle in the first frame of the second image sequence being greater than a third threshold;
merging the first image sequence and the second image sequence into one image sequence.
Optionally, after determining at least one image sequence composed of background images from the background images of at least some of the video frames, the method further includes:
for each image sequence, performing vehicle detection on other video frames in the monitoring video, which are positioned before the image sequence;
in response to the other video frames including the detection frame of the same abnormal vehicle corresponding to the image sequence, deleting the detection frame of the same abnormal vehicle from the target image sequence;
and in response to the other video frames not including the detection frame of the same abnormal vehicle corresponding to the image sequence, executing the step of determining the starting time and the ending time of the image sequence as the starting time and the ending time of the abnormal parking event corresponding to the image sequence for each image sequence.
Optionally, for each image sequence, determining a start time and an end time of the image sequence to be before a start time and an end time of an abnormal parking event corresponding to the image sequence, where the method further includes:
for each image sequence, acquiring a plurality of video frames corresponding to the image sequence based on the corresponding relation between the background image and the video frames;
performing vehicle detection on the plurality of video frames;
determining a video frame in which the same abnormal vehicle appears for the first time in the plurality of video frames as a target frame based on the detection result;
and deleting the part of the image sequence, the shooting time of which is earlier than the target frame.
Optionally, for each image sequence, determining a start time and an end time of the image sequence as being after a start time and an end time of an abnormal parking event corresponding to the image sequence, where the method further includes:
determining a plurality of abnormal parking events with the starting time within the preset time as the same abnormal parking event;
and determining the earliest starting time and the latest ending time corresponding to the plurality of abnormal parking events as the starting time and the ending time of the same abnormal parking event.
In another aspect, the present disclosure provides an abnormal vehicle detection apparatus including:
the video acquisition unit is used for acquiring a monitoring video of a target road;
the background image extraction unit is used for carrying out background modeling processing based on the monitoring video to obtain a background image of at least part of video frames in the monitoring video;
a first vehicle detection unit configured to perform vehicle detection processing on the background image;
a detection frame determination unit configured to determine a detection frame located on the target road in the background image as a detection frame of an abnormal vehicle in which an abnormal parking event occurs.
Optionally, the system further comprises a mask extraction unit;
the mask extraction unit is used for carrying out differential mask extraction processing on the monitoring video to obtain a mask of the target road;
the detection frame determination unit includes:
the first intersection ratio calculation subunit is used for determining the intersection ratio of the detection frame in the background image and the mask;
and the detection frame determining subunit is used for determining the detection frame with the intersection ratio larger than the first threshold value as the detection frame of the abnormal vehicle with the abnormal parking event.
Optionally, the method further comprises: the image sequence construction unit is used for determining at least one image sequence formed by background images from the background images of at least part of the video frames, wherein the background images in the same image sequence comprise detection frames of the same abnormal vehicle;
and the abnormal parking event determining unit is used for determining the starting time and the ending time of the image sequence as the starting time and the ending time of the abnormal parking event corresponding to the image sequence aiming at each image sequence, wherein the abnormal parking event corresponding to the image sequence refers to the abnormal parking event of the same abnormal vehicle corresponding to the image sequence.
Optionally, the image sequence construction unit includes:
the second intersection ratio calculation subunit is used for calculating the intersection ratio of the target detection frame in one background image and the target detection frame in the other background image aiming at any two background images with shooting intervals smaller than a preset interval, wherein the target detection frames refer to the detection frames of abnormal vehicles;
a detection frame association subunit, configured to determine that a first target detection frame in the one background image and a second target detection frame in the another background image are detection frames of the same abnormal vehicle in response to a coincidence ratio of the first target detection frame to the second target detection frame being greater than a second threshold;
and the image sequence combination subunit is used for adding the one background image and the other background image into the same image sequence.
Optionally, the at least one image sequence includes a first image sequence and a second image sequence, the first image sequence corresponds to an abnormal parking event of a first abnormal vehicle, and the second image sequence corresponds to an abnormal parking event of a second abnormal vehicle; the device further comprises:
an abnormal parking event fusion unit, configured to determine that the first abnormal parking event and the second abnormal parking event are the same abnormal parking event in response to an intersection ratio of a detection frame of the first abnormal vehicle in the first frame of the first image sequence and a detection frame of the second abnormal vehicle in the first frame of the second image sequence being greater than a third threshold;
an image sequence merging unit for merging the first image sequence and the second image sequence into one image sequence.
Optionally, the apparatus further comprises: the second vehicle detection unit is used for carrying out vehicle detection on other video frames positioned before the image sequence in the monitoring video aiming at each image sequence;
a detection frame deleting unit, configured to delete a detection frame of the same abnormal vehicle from the target image sequence in response to a detection frame of the same abnormal vehicle corresponding to the image sequence included in the other video frames;
the abnormal parking event determining unit is configured to, if the other video frames do not include the detection frame of the same abnormal vehicle corresponding to the image sequence, perform the determining, for each image sequence, the start time and the end time of the image sequence as the start time and the end time of the abnormal parking event corresponding to the image sequence.
Optionally, the system further comprises a video frame acquisition unit, a third vehicle detection unit, a target frame determination unit and a deletion unit:
the video frame acquisition unit is used for acquiring a plurality of video frames corresponding to each image sequence based on the corresponding relation between the background image and the video frame;
the third vehicle detection unit is used for carrying out vehicle detection on the plurality of video frames;
the target frame determining unit is used for determining a video frame of the same abnormal vehicle appearing for the first time in the plurality of video frames as a target frame based on the detection result;
the deleting unit is used for deleting the part of the image sequence, the shooting time of which is earlier than the target frame.
Optionally, the method further comprises: the abnormal parking event merging unit is used for determining a plurality of abnormal parking events with the starting time within the preset time as the same abnormal parking event; and determining the earliest starting time and the latest ending time corresponding to the plurality of abnormal parking events as the starting time and the ending time of the same abnormal parking event.
In yet another aspect, the present disclosure provides a computer device comprising:
a memory and a processor, wherein the memory has stored therein a computer program which, when executed by the processor, implements the method of any of the preceding claims.
In a further aspect, the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as in any of the preceding claims.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
the abnormal vehicle detection method, the abnormal vehicle detection device, the abnormal vehicle detection equipment and the storage medium provided by the disclosure have the advantages that the background modeling is carried out on the obtained monitoring video of the target road by adopting the background modeling method to obtain the background image of at least part of video frames in the monitoring video, then the vehicle identification model is adopted to carry out vehicle detection on the background image, and the detection frame positioned on the target road in the background image is determined as the detection frame of the abnormal vehicle with the abnormal parking event, so that the accuracy of the abnormal vehicle detection can be improved, in addition, because the vehicle in the background image is identified as the abnormal vehicle according to the characteristic that the static vehicle can be kept in the background image, the abnormal vehicle sample and the normal running vehicle sample are not required to be adopted to train the abnormal vehicle detection model like the prior art, therefore, the problem of inaccurate model caused by the lack of the abnormal vehicle sample is avoided, the problem that the model can only be suitable for a homogeneous scene due to the scene information carried in the sample is solved, so that the defects in the prior art are overcome, and the accuracy of abnormal vehicle identification is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic structural diagram of an abnormal vehicle detection system provided in an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method for detecting an abnormal vehicle provided by an embodiment of the present disclosure;
FIG. 3 is a flow chart of a method for detecting an abnormal vehicle provided by another embodiment of the present disclosure;
fig. 4 is a video frame image of a surveillance video provided by an embodiment of the present disclosure;
FIG. 5 is a mask of the target road obtained for the target road of FIG. 4;
FIG. 6 is a partial schematic flow chart diagram illustrating a method for detecting an abnormal vehicle according to an embodiment of the present disclosure;
FIG. 7 is a flow chart of a method of determining a sequence of images provided by some embodiments of the present disclosure;
FIG. 8 is a schematic diagram of a sequence of images provided by an embodiment of the present disclosure;
FIG. 9 is a partial schematic flow diagram of a method for anomalous vehicle detection provided in some embodiments of the present disclosure;
FIG. 10 is a partial schematic flow diagram of a method of detecting an abnormal vehicle provided by the present disclosure in some embodiments;
FIG. 11 is a partial flow diagram of a method for detecting an abnormal vehicle provided by some embodiments of the present disclosure;
fig. 12 is a schematic structural diagram of a detection device for an abnormal vehicle according to an embodiment of the present disclosure;
fig. 13 is a schematic structural diagram of a server in an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Fig. 1 is a schematic structural diagram of an abnormal vehicle detection system provided in an embodiment of the present disclosure; as shown in fig. 1, the abnormal vehicle detecting system 100 may include at least one image capturing apparatus 101, and a computer device 102 communicatively connected to the aforementioned image capturing apparatus 101.
The image capturing device 101 may be installed on an equipment tower beside a target road or on a high-rise building, and is configured to capture a target road to obtain a monitoring video of the target road, where the road monitored by the image capturing device 101 is referred to as the target road, and the target road may be, for example, a trunk road, a vehicle intersection, a traffic accident high-speed road segment, but is not limited to the road listed here.
The computer device 102 is configured to store and process a surveillance video of a target road, and determine an abnormal vehicle having an abnormal parking event in the surveillance video, where the abnormal vehicle is a vehicle having a parking time on the road exceeding a preset threshold, such as a vehicle having a traffic accident. By way of example, the computer device 102 in the implementation of the present disclosure may be understood as a server or a server cluster or other devices with storage and image processing functions.
Fig. 2 is a flowchart of a method for detecting an abnormal vehicle according to an embodiment of the present disclosure, which may be exemplarily executed by the computer device in fig. 1. As shown in fig. 2, in one embodiment, the method for detecting an abnormal vehicle may include steps S101 to S104.
Step S101: and acquiring a monitoring video of the target road.
The monitoring video of the target road can be understood as the video of the target road collected by the image collecting device in a certain time period. The surveillance video of the target road includes a stationary object and a moving object. The static objects can include green belts, guard rails, lane lines and various road signs, and vehicles with stopping time exceeding a preset threshold value on a road. The moving object may include a vehicle, a pedestrian, and the like that normally travels in the target road.
In the embodiment of the present disclosure, the computer device may obtain the surveillance video of the target road in a loading manner from the local storage, or may obtain the surveillance video of the target road in a downloading manner from an image capturing device or the like. It should be noted that the manner of acquiring the surveillance video according to the embodiments of the present disclosure is not limited to the aforementioned loading from the local storage and downloading from other devices, and may be other manners known in the art.
Step S102: and carrying out background modeling processing based on the monitoring video to obtain a background image of at least part of video frames in the monitoring video.
In each video frame of the monitoring video, the pixels for representing the static object form a background image of the video frame, and the pixels for representing the moving object form a foreground image of the video frame.
The background modeling method in the embodiment may be a forward background modeling method or a backward background modeling method, and is similar to the related art and is not described herein again.
It should be noted that the background modeling algorithm employed by the embodiments of the present disclosure is not limited to the aforementioned forward or backward background modeling algorithm, and various background modeling algorithms known in the field of image processing may be employed.
Step S103: and carrying out vehicle detection processing on the background image.
In the embodiment of the disclosure, a preset vehicle detection model is adopted to perform vehicle detection processing on a background image, so as to obtain a vehicle in the background image. The vehicle in the background image is the vehicle in which the abnormal parking event occurs, and since the vehicle is stopped on the road, the vehicle is kept in the background image as the background when the background is modeled.
The vehicle detection model is obtained by adopting vehicle sample image training and is used for identifying the vehicle in the image. In one application of the embodiment of the disclosure, the adopted vehicle detection model can be understood as a Cascader R-CNN model by way of example, but is not limited to the Cascader R-CNN model, and the Cascader R-CNN model is a multi-level target detection model, so that the problems of over-fitting in the training process of the vehicle detection model and quality mismatch in the reasoning process can be avoided.
It should be noted that the vehicle detection model adopted in the embodiment of the present disclosure is not limited to the cascade R-CNN model, and in other applications in the embodiment of the present disclosure, the vehicle detection model may be other models known in the art.
If the vehicle detection model is used for detecting that the vehicle exists in the background image, the vehicle detection model forms a detection frame with the minimum size capable of containing the vehicle on the background image. In a specific application of the embodiment of the present disclosure, the detection frame may be a rectangular frame.
In some embodiments of the present disclosure, after identifying a detection frame of a vehicle, the vehicle identification model may further output a confidence that the detection frame corresponds to the vehicle; in practical application, the detection frames with the prediction confidence smaller than the preset threshold may be deleted, and only the detection frames with the confidence larger than the preset threshold are reserved.
Step S104: and determining the detection frame positioned on the target road in the background image as the detection frame of the abnormal vehicle with the abnormal parking event.
Since the objects in the background image are all still objects, if a vehicle is recognized in the background image, it can be determined that this vehicle is a still vehicle. And a stationary vehicle located on the target road may be understood as an abnormal vehicle in which an abnormal parking event occurs, and thus the detection frame of a vehicle identified from the background image and located on the target road may be determined as the detection frame of an abnormal vehicle in which an abnormal parking event occurs.
According to the abnormal vehicle detection method provided by the embodiment of the disclosure, the background modeling is performed on the obtained surveillance video of the target road by adopting the background modeling method to obtain the background image of at least part of video frames in the surveillance video, then the vehicle identification model is adopted to perform vehicle detection on the background image, and the detection frame on the target road in the background image is determined as the detection frame of the abnormal vehicle with the abnormal parking event, so that the accuracy of abnormal vehicle detection can be improved.
Compared with the method that the monitoring video is input into the abnormal vehicle identification model trained in advance and the abnormal vehicle identification model is directly adopted to identify the abnormal vehicle in the video, the abnormal vehicle detection method provided by the embodiment of the disclosure overcomes the problems that the number of abnormal vehicle samples is small and the abnormal vehicle identification model has poor identification capability on the abnormal vehicle in an unknown scene.
Fig. 3 is a flowchart of a method for detecting an abnormal vehicle according to another embodiment of the present disclosure. In other embodiments of the present disclosure, as shown in fig. 3, the method for detecting an abnormal vehicle includes steps S201 to S206. The execution manner and advantageous effects of steps S201 to S203 are similar to those of steps S101 to S103, and only steps S204 to S206 are specifically described herein, and other steps can refer to the foregoing description.
Step S201: and acquiring a monitoring video of the target road.
Step S202: and carrying out background modeling processing based on the monitoring video to obtain a background image of at least part of video frames in the monitoring video.
Step S203: and carrying out vehicle detection processing on the background image.
Step S204: and carrying out differential mask extraction processing on the monitoring video to obtain a mask of the target road.
Masks (also known as masks) are selected areas that are used to frame specific areas of an image. The mask of the target road is used for framing the target road in each video frame of the monitoring video.
In some implementations of embodiments of the present disclosure, each video frame of the surveillance video may include a building area adjacent to the target road in addition to the target road area. Adjacent building areas may have parking lots where the vehicles are not what this embodiment refers to as abnormal vehicles.
In the embodiment of the disclosure, by setting the mask of the target road, the vehicle detection frames outside the target road are excluded by using the mask of the target road, and then, the vehicles outside the target road are prevented from being identified as abnormal vehicles.
In an embodiment of the present disclosure, performing a differential mask extraction process on a surveillance video may include: selecting two video frames in the monitoring video, comparing pixels at the same positions of the two video frames, and determining the position as the position on the target road if the pixels at the same positions are changed, so that the mask of the target road can be determined by continuous analysis and comparison.
For example, in one application of the present disclosure, for a surveillance video, one video frame may be selected every 5 frames as a video frame for determining a mask; and comparing the extracted pixels at the same positions of the two adjacent video frames, and if the difference of the pixels at the same positions exceeds a preset threshold value, determining the position as the position on the target road, so that the mask of the target road can be determined by continuous analysis and comparison.
Fig. 4 is a video frame image of a surveillance video provided by an embodiment of the present disclosure; fig. 5 is a mask of the target road obtained for the target road in fig. 4. As shown in fig. 4, the video frame image includes, in addition to the target road 401, buildings 402 beside the target road 401 and a green belt 403 beside the target road 401. As shown in fig. 5, by comparing the video frames in the surveillance video, a mask 404 of the target road can be obtained, and the region of the mask is the region of the target road in the video frames.
It should be noted that step S204 provided by the embodiment of the present disclosure may be executed before steps S202 to S203, may be executed after steps S202 to S203, or may be executed in parallel with steps S202 to S203.
S205: and determining the intersection ratio of the detection frame in the background image and the mask.
In order to determine the intersection ratio of the detection frame and the mask in the background image, the intersection and the union of the detection frame and the mask in the background image are determined respectively, and then the ratio of the intersection and the union is adopted as the intersection ratio of the detection frame and the mask in the background image.
S206: and determining the detection frame with the intersection ratio larger than the first threshold value as the detection frame of the abnormal vehicle with the abnormal parking event.
The first threshold value may be set as needed. If the intersection ratio of the detection frame and the mask of the target road is larger than the first threshold value, the detection frame is at least mostly located in the mask of the target road, namely the vehicle is located in the target road, and the detection frame of the vehicle can be determined as the detection frame of the abnormal vehicle with the abnormal parking event.
By adopting the abnormal vehicle detection method provided by the embodiment of the application, the detection frame of the abnormal vehicle is determined by utilizing the mask of the target road and the detection frame in the background image, so that the vehicle in the non-target road area can be prevented from being identified as the abnormal vehicle.
Fig. 6 is a partial schematic flow chart of steps of a method for detecting an abnormal vehicle according to an embodiment of the present disclosure. As shown in fig. 6, in some embodiments of the present disclosure, after determining the detection frame in which the background image is located on the target road as the detection frame of the abnormal vehicle in which the abnormal parking event occurs, that is, after performing the aforementioned steps S101 to S104 or steps S201 to S206, steps S301 to S302 may be further included.
Step S301: at least one image sequence of background images is determined from the background images of at least some of the video frames.
The background images in the same image sequence include detection frames of the same abnormal vehicle, and the background images are sorted according to the shooting time of the corresponding video frame.
Fig. 7 is a flow chart of a method of determining an image sequence according to some embodiments of the present disclosure. As shown in fig. 7, in some embodiments of the present disclosure, the method for determining the image sequence may include steps S3011 to S3013.
S3011: and calculating the intersection ratio of the target detection frame in one background image and the target detection frame in the other background image aiming at the background images with any two shooting intervals smaller than the preset interval.
The target detection frame is a detection frame indicating an abnormal vehicle in the background image.
The preset interval may be set as needed, and this embodiment is not particularly limited. If the shooting interval of the two background images is smaller than the preset interval, intersection comparison calculation can be carried out on the target detection frames in the two background images; and if the shooting interval of the two background images is greater than or equal to the preset interval, not performing intersection ratio calculation on the target detection frames in the two background images.
In step S3011, if the intersection ratio of the target detection frames in the two background images is larger, it indicates that the degree of coincidence of the positions of the target detection frames in the two background images is higher; the smaller the intersection ratio, the smaller the degree of coincidence of the positions of the object detection frames in the two background images.
S3012: and in response to the intersection ratio of the first target detection frame in one background image and the second target detection frame in the other background image being greater than a second threshold value, determining that the first target detection frame and the second target detection frame are detection frames of the same abnormal vehicle.
The second threshold is a numerical value used for determining whether the target detection frames in the two background images are detection frames of the same abnormal vehicle, and the second threshold may be set as needed.
If the shooting interval of the two background images is smaller than the preset interval and the intersection ratio of the first target detection frame in one background image and the second target detection frame in the other background image is larger than a second threshold value, the two target detection frames are represented as the detection frames of the same abnormal vehicle, otherwise, the two target detection frames are determined not to be the detection frames of the same vehicle.
S3013: adding the one background image and the another background image to the same image sequence.
After determining that two target detection frames in the two background images are detection frames of the same abnormal vehicle, the two background images may be put into the same image sequence, so that the image sequence corresponds to an abnormal parking event of the same abnormal vehicle.
Fig. 8 is a schematic diagram of an image sequence provided by an embodiment of the present disclosure. Each frame in fig. 8 represents a background image in the image sequence, and each frame has a detection frame of the same abnormal vehicle; the plurality of background images are arranged according to the time sequence, and the detection frames in the plurality of background images are connected, so that a time-space tube for the abnormal vehicle to have the abnormal parking event can be shown, and the process from the abnormal parking event to the end of the abnormal parking event of the abnormal vehicle can be vividly shown through the time-space tube.
It should be noted that the schematic diagram shown in fig. 8 is only an example, and in the process of the method for detecting an abnormal vehicle provided by the embodiment of the present disclosure, the image sequence may not be displayed by using the method shown in fig. 8, but may be represented in the form of an array; for example, the array may include vertex coordinates of the detection frames of the same abnormal vehicle in each background image.
It is understood that if a plurality of abnormal vehicles are included in the surveillance video, a plurality of image sequences corresponding to the plurality of abnormal vehicles may be obtained based on steps S3011-S3013. Step S302 may then be performed.
Step S302: and determining the starting time and the ending time of the image sequence as the starting time and the ending time of the abnormal parking event corresponding to the image sequence.
Because each image sequence corresponds to the abnormal parking event of one abnormal vehicle, the time corresponding to the initial image frame of each image sequence is used as the initial time of the image sequence, and the time corresponding to the final image frame of each image sequence is used as the final time of the image sequence, so that the initial time and the final time of the abnormal parking event of the abnormal vehicle can be determined.
In some embodiments of the present disclosure, the at least one image sequence determined in step S301 may include a first image sequence and a second image sequence. The first image sequence corresponds to an abnormal parking event of a first abnormal vehicle, and the second image sequence corresponds to an abnormal parking event of a second abnormal vehicle.
Fig. 9 is a partial schematic flow chart of an abnormal vehicle detection method according to some embodiments of the present disclosure, and as shown in fig. 9, the abnormal vehicle detection method according to some embodiments of the present disclosure may further include steps S303 to S304 before step S302, in addition to steps S301 and S302 described above.
S303: and in response to the intersection ratio of the detection frame of the first abnormal vehicle in the first frame of the first image sequence and the detection frame of the second abnormal vehicle in the first frame of the second image sequence being greater than a third threshold value, determining that the first abnormal parking event and the second abnormal parking event are the same abnormal parking event.
The third threshold is a threshold for judging whether the first abnormal vehicle and the second abnormal vehicle have accidents such as collision, scratch and the like.
If the intersection ratio of the detection frame of the first abnormal vehicle in the first image sequence and the detection frame of the second abnormal vehicle in the first frame in the second image sequence is greater than the third threshold, it indicates that the first abnormal vehicle and the second abnormal vehicle have collision and scratch accidents, and the first abnormal vehicle and the second abnormal vehicle have abnormal parking due to the same accident, so that the first abnormal parking event and the second abnormal parking event can be determined as the same abnormal parking event.
S304: the first image sequence and the second image sequence are combined into one image sequence.
When the first and second abnormal parking events are the same abnormal parking event, the first and second image sequences may be merged into one image sequence. The merged sequence of images corresponds to the same abnormal parking event referred to previously.
Specifically, the first image sequence and the second image sequence are merged into the same image sequence, which may be a union of the first image sequence and the second image sequence, and the background images in the union are sorted according to the shooting order of the background images in the image sequence to obtain a merged image sequence.
By combining the first image sequence and the second image sequence into the same image sequence, each abnormal parking event caused by the same traffic accident can be treated as the same abnormal parking event, and the reason of the abnormal parking event and the occurrence process of the abnormal parking event can be conveniently analyzed subsequently.
In practical applications, a vehicle detection model may identify a stationary object such as a manhole cover or a guideboard as a vehicle, and construct an image sequence according to a detection frame of the stationary object, where the image sequence is not a true image sequence for representing an abnormal parking event. For this situation, the embodiments of the present disclosure also provide a method for eliminating this part of false detection.
For example, fig. 10 is a partial flow chart of a method for detecting an abnormal vehicle according to some embodiments of the present disclosure. As shown in fig. 10, in order to eliminate false detection, in some embodiments of the present disclosure, after the foregoing step S301 is performed, steps S305 to S306 may be further included.
Step S305: and for each image sequence, carrying out vehicle detection on other video frames positioned before the image sequence in the monitoring video.
When step S305 is executed, the vehicle detection module mentioned in step S103 may be used to perform vehicle detection on other video frames in the surveillance video before the image sequence, so as to obtain detection frames of vehicles in the other video frames.
Step S306: and in response to the other video frames including the detection frame of the same abnormal vehicle corresponding to the image sequence, deleting the detection frame of the same abnormal vehicle from the target image sequence.
In step S306, it is necessary to determine whether the other video frames include a detection frame of the abnormal vehicle corresponding to the image sequence; if the intersection ratio of the detection frame of the vehicle in the other video frames and the detection frame of the abnormal vehicle corresponding to the image sequence is greater than a preset threshold value, it can be determined that the other video frames include the detection frame of the abnormal vehicle corresponding to the image sequence.
In the case where the other video frame includes a detection frame of an abnormal vehicle corresponding to the image sequence, it is described that a still object corresponding to the detection frame is always present, and the still object may be erroneously detected as a vehicle, such as a road sign, instead of the detection frame of the abnormal vehicle.
In the case where the abnormal vehicle detection method includes step S305, the aforementioned step S302 may specifically be step S3021.
Step S3021: and in response to the detection frame of the same abnormal vehicle corresponding to the image sequence not being included in the other video frames, determining the starting time and the ending time of the image sequence as the starting time and the ending time of the abnormal parking event corresponding to the image sequence for each image sequence.
That is, if the other video frames do not include the detection frame of the abnormal vehicle corresponding to the image sequence, the start time and the end time of the image sequence can be directly used as the start time and the end time of the abnormal vehicle parking event.
By executing steps S305 to S306, the abnormal vehicle detection method provided by the embodiment of the disclosure can identify the image sequence of the non-abnormal vehicle formed by the false detection, and obtain a more accurate image sequence representing the abnormal parking event of the abnormal vehicle.
In the method for detecting an abnormal vehicle provided in some embodiments of the present disclosure, if a background modeling method is used for background modeling, due to a modeling algorithm, a time that the abnormal vehicle appears in a background image corresponding to a surveillance video frame may be advanced, so that a start time of an image sequence corresponding to an abnormal parking event of the abnormal vehicle is advanced. To address this issue, embodiments of the present disclosure also provide a method to calibrate the start time of an abnormal parking event.
Fig. 11 is a partial flowchart of a method for detecting an abnormal vehicle according to some embodiments of the present disclosure. As shown in fig. 11, in some embodiments of the present disclosure, in order to avoid that the start time of the image sequence corresponding to the abnormal parking event of the abnormal vehicle is advanced compared to the real time, steps S307 to S310 may be further included before the above step S302.
Step S307: and acquiring a plurality of video frames corresponding to the image sequence based on the corresponding relation between the background image and the video frame for each image sequence.
In this embodiment, each background image corresponds to an original video frame in the surveillance video, so that a plurality of video frames corresponding to the background images in the image sequence can be found according to the one-to-one correspondence relationship between the background images and the video frames.
Step S308: vehicle detection is performed on the plurality of video frames.
When step S308 is executed, the vehicle detection model mentioned above may be used to perform vehicle detection on the video frames corresponding to the background images in the image sequence, so as to identify the detection frames corresponding to the vehicles in the video frames.
Step S309: and determining a video frame in which the same abnormal vehicle appears for the first time in the plurality of video frames as a target frame based on the detection result.
If 5 corresponding video frames are determined based on 5 background images in the image sequence, and if a detection frame of an abnormal vehicle corresponding to the image sequence appears for the first time in the 2 nd video frame, the 2 nd video frame is determined as a target frame.
Step S310: and deleting the part of the image sequence, the shooting time of which is earlier than that of the target frame.
Since the detection frame of the abnormal vehicle appears in the target frame for the first time, the abnormal parking event of the abnormal vehicle can be determined to appear only when the target frame begins, so that the part of the image sequence, the shooting time of which is earlier than that of the target frame, can be deleted, and the accuracy of the starting time of the abnormal parking event is improved.
For example, in the example of step S309, the 2 nd frame is the target frame, and the first frame image in the image sequence is deleted accordingly, and the image sequence after deletion includes 4 background images.
In some embodiments of the present disclosure, the method for detecting an abnormal vehicle may further include, after step S302, step S311 to step S312.
Step S311: and determining a plurality of abnormal parking events with the starting time within the preset time as the same abnormal parking event.
In practice, if an abnormal parking event occurs due to a traffic accident on a target road, a road jam and other problems may be caused by a previous abnormal parking event in a subsequent preset time, so that an abnormal parking event also occurs on a following vehicle. Because the following abnormal parking event has an association relationship with the preceding abnormal parking event, the following abnormal parking event and the preceding abnormal parking event can be regarded as the same abnormal parking event; therefore, in order to analyze the abnormal parking time, the present embodiment may determine a plurality of abnormal parking events having a start time within a preset time as the same abnormal parking event.
Step S312: and determining the earliest starting time and the latest ending time corresponding to the abnormal parking events as the starting time and the ending time of the same abnormal parking event.
Since the plurality of abnormal parking events can be set as the same abnormal parking event, the earliest start event corresponding to the plurality of abnormal parking events can be set as the start time of the same abnormal parking event, and the latest end event corresponding to the plurality of abnormal parking events can be set as the end time of the same abnormal parking event.
Fig. 12 is a schematic structural diagram of a detection apparatus for an abnormal vehicle according to an embodiment of the present disclosure, where the detection apparatus may be understood as the computer device or a part of functional modules in the computer device. As shown in fig. 12, the detection apparatus 1200 includes: a video acquisition unit 1201, a background image extraction unit 1202, a first vehicle detection unit 1203, and a detection frame determination unit 1204.
The video acquiring unit 1201 is used for acquiring a monitoring video of a target road; the background image extraction unit 1202 is configured to perform background modeling processing based on the monitored video to obtain a background image of at least a part of video frames in the monitored video; the first vehicle detection unit 1203 is configured to perform vehicle detection processing on the background image; the detection frame determination unit 1204 is configured to determine a detection frame located on the target road in the background image as a detection frame of an abnormal vehicle in which an abnormal parking event has occurred.
In some embodiments of the present disclosure, a mask extraction unit is further included; the mask extraction unit is used for carrying out differential mask extraction processing on the monitoring video to obtain a mask of the target road; correspondingly, the detection frame determining unit comprises a first cross-over ratio calculating subunit and a detection frame determining subunit; the first intersection ratio calculation subunit is used for determining the intersection ratio of the detection frame and the mask in the background image; the detection frame determination subunit is configured to determine a detection frame with the intersection ratio larger than a first threshold as a detection frame of an abnormal vehicle in which an abnormal parking event occurs.
In some embodiments of the present disclosure, the detection apparatus of an abnormal vehicle further includes an image sequence construction unit and an abnormal parking event determination unit.
The image sequence construction unit is used for determining at least one image sequence formed by background images from the background images of at least part of video frames, wherein the background images in the same image sequence comprise detection frames of the same abnormal vehicle; the abnormal parking event determining unit is used for determining the starting time and the ending time of the image sequence as the starting time and the ending time of the abnormal parking event corresponding to the image sequence aiming at each image sequence, wherein the abnormal parking event corresponding to the image sequence refers to the abnormal parking event of the same abnormal vehicle corresponding to the image sequence.
In some embodiments of the present disclosure, the image sequence construction unit may include a second intersection ratio calculation subunit, a detection frame association subunit, and an image sequence combination subunit; the second intersection ratio calculation subunit is used for calculating the intersection ratio of the target detection frame in one background image and the target detection frame in the other background image aiming at any two background images with shooting intervals smaller than a preset interval, wherein the target detection frame is the detection frame of an abnormal vehicle; the detection frame association subunit is used for determining that the first target detection frame and the second target detection frame are detection frames of the same abnormal vehicle in response to the intersection ratio of the first target detection frame in one background image and the second target detection frame in the other background image being greater than a second threshold value; the image sequence combination subunit is used for adding one background image and the other background image into the same image sequence.
In some embodiments of the present disclosure, the at least one sequence of images includes a first sequence of images corresponding to an abnormal parking event of a first abnormal vehicle and a second sequence of images corresponding to an abnormal parking event of a second abnormal vehicle; in this case, the detection device of the abnormal vehicle further includes: the system comprises an abnormal parking event fusion unit and an image sequence combination unit.
The abnormal parking event fusion unit is used for responding to the fact that the intersection ratio of the detection frame of the first abnormal vehicle in the first frame of the first image sequence and the detection frame of the second abnormal vehicle in the first frame of the second image sequence is larger than a third threshold value, and then the first abnormal parking event and the second abnormal parking event are determined to be the same abnormal parking event; and the image sequence merging unit is used for merging the first image sequence and the second image sequence into one image sequence.
In some embodiments of the present disclosure, the apparatus further includes a second vehicle detection unit, configured to perform vehicle detection on other video frames in the surveillance video before the image sequence for each image sequence; correspondingly, the abnormal vehicle detection device further comprises a detection frame deleting unit and an abnormal parking event determining unit.
The detection frame deleting unit is used for responding to the detection frames of the same abnormal vehicle corresponding to the image sequence in other video frames, and deleting the detection frames of the same abnormal vehicle from the target image sequence; the abnormal parking event determining unit is used for determining the starting time and the ending time of the image sequence as the starting time and the ending time of the abnormal parking event corresponding to the image sequence aiming at each image sequence when the other video frames do not comprise the detection frame of the same abnormal vehicle corresponding to the image sequence.
In some embodiments of the present disclosure, the detection apparatus of an abnormal vehicle further includes a video frame acquisition unit, a third vehicle detection unit, a target frame determination unit, and a deletion unit: the video frame acquisition unit is used for acquiring a plurality of video frames corresponding to the image sequences based on the corresponding relation between the background images and the video frames aiming at each image sequence; the third vehicle detection unit is used for carrying out vehicle detection on the plurality of video frames; the target frame determining unit is used for determining a video frame of the same abnormal vehicle appearing for the first time in the plurality of video frames as a target frame based on the detection result; the deleting unit is used for deleting a part of the image sequence, the shooting time of which is earlier than that of the target frame.
In some embodiments of the present disclosure, the system further includes an abnormal parking event merging unit, configured to determine multiple abnormal parking events with a start time within a preset time as the same abnormal parking event; and determining the earliest starting time and the latest ending time corresponding to the plurality of abnormal parking events as the starting time and the ending time of the same abnormal parking event.
The apparatus provided in this embodiment can execute the method in any one of the embodiments in fig. 1 to fig. 11, and the execution manner and the beneficial effects are similar, and are not described herein again.
The embodiment of the present disclosure further provides a computer device, which includes a processor and a memory, where the memory stores a computer program, and when the computer program is executed by the processor, the method of any one of the above-mentioned fig. 1 to 11 may be implemented.
For example, fig. 13 is a schematic structural diagram of a computer device in an embodiment of the present disclosure. Referring now in particular to fig. 13, there is shown a schematic block diagram of a computer device 1000 suitable for use in implementing embodiments of the present disclosure.
As shown in fig. 13, computer device 1300 may include a processing means 1301 (e.g., a central processing unit, a graphics processor, etc.) which may perform various appropriate actions and processes in accordance with a program stored in a read only memory ROM1302 or a program loaded from a storage means 1308 into a random access memory RAM 1303. In the RAM1303, various programs and data necessary for the operation of the computer apparatus 1300 are also stored. The processing device 1301, the ROM1302, and the RAM1303 are connected to each other via a bus 1304. An input/output (I/O) interface 1305 is also connected to bus 1304.
Generally, the following devices may be connected to the I/O interface 1305: input devices 1306 including, for example, touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, and the like; an output device 1307 including, for example, a Liquid Crystal Display (LCD), speaker, vibrator, etc.; storage devices 1308 including, for example, magnetic tape, hard disk, etc.; and a communication device 1309. The communication means 1309 may allow the computer device 1300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 13 illustrates a computer device 1300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication means 1309, or installed from the storage device 1308, or installed from the ROM 1302. The computer program, when executed by the processing apparatus 1301, performs the functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the client, computer device may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the computer device; or may exist separately and not be incorporated into the computer device.
The computer readable medium carries one or more programs which, when executed by the computing device, cause the computing device to: acquiring a monitoring video of a target road; performing background modeling processing based on the monitoring video to obtain a background image of at least part of video frames in the monitoring video; carrying out vehicle detection processing on the background image; and determining the detection frame positioned on the target road in the background image as the detection frame of the abnormal vehicle with the abnormal parking event.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or computer device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The embodiments of the present disclosure further provide a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the method of any one of the embodiments in fig. 1 to 11 may be implemented, and the execution manner and the beneficial effects are similar, and are not described herein again.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:一种基于视频压缩域的多车测速方法