Traffic event detection method and apparatus, electronic device, and machine-readable storage medium
By acquiring target images within a time period associated with the detection time of traffic incidents, and using the similarity between the incident images and target images to determine false detections, the problem of low false detection rate in existing traffic incident detection technologies is solved, thus improving the accuracy of detection.
Patent Information
- Application Number
- CN202111402177.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2041-11-19
AI Technical Summary
Existing traffic incident detection technologies have low accuracy under the influence of road environmental factors, especially the detection of spilled materials, which is easily affected by sunlight and rain, leading to false detections and a high false detection rate.
By acquiring target images within a time period associated with the detection time of traffic events, and utilizing the similarity between event images and target images in the event detection area, it can be determined whether the traffic event was a false detection.
It improved the accuracy of traffic incident detection and reduced the false detection rate.
Smart Images

Figure CN114120249B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of traffic management technology, and in particular to a traffic incident detection method, device, electronic equipment, and machine-readable storage medium. Background Technology
[0002] Traffic incident detection refers to the discovery of various traffic incidents such as littering, vehicle accidents, illegal parking, and congestion. The goal is to achieve early detection, early intervention, and early traffic management, thereby improving traffic conditions and increasing road capacity.
[0003] Taking spilled materials as an example, whether it is a small spill or cargo spilled or scattered by freight vehicles, it can easily endanger the driving safety of vehicles on the road. Traffic accidents caused by spilled materials occur frequently, and some even cause serious casualties.
[0004] Due to the influence of road environment factors, the accuracy of some traffic incident detection is low, especially for spilled materials, tree shadows affected by sunlight, water stains caused by rain, and markings and signs, resulting in a high false detection rate. Summary of the Invention
[0005] In view of this, this application provides a traffic incident detection method, apparatus, electronic device, and machine-readable storage medium.
[0006] According to a first aspect of the embodiments of this application, a traffic incident detection method is provided, comprising:
[0007] Acquire detected traffic events;
[0008] Based on the detection time of the traffic incident, the target image collected by the target front-end device within the target time period is obtained; wherein, the target front-end device is the front-end device associated with the traffic incident, and the target time period is the time period associated with the detection time; the time period associated with the detection time includes a first time period of a first preset duration before the detection time, and / or a second time period of a second preset duration after the detection time.
[0009] Based on the similarity between the event image and the target image in the event detection area, it is determined whether the traffic event is a false detection.
[0010] According to a second aspect of the embodiments of this application, a traffic incident detection device is provided, comprising:
[0011] The first acquisition unit is configured to acquire detected traffic events;
[0012] The second acquisition unit is configured to acquire target images collected by the target front-end device within a target time period based on the detection time of the traffic event; wherein the target front-end device is the front-end device associated with the traffic event, and the target time period is the time period associated with the detection time; the time period associated with the detection time includes a first time period of a first preset duration before the detection time, and / or a second time period of a second preset duration after the detection time.
[0013] The determining unit is configured to determine whether a traffic event is a false detection based on the similarity between the event image and the target image in the event detection region.
[0014] According to a third aspect of the embodiments of this application, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0015] Memory, used to store computer programs;
[0016] The processor, when executing a program stored in memory, implements the traffic incident detection method of the first aspect.
[0017] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, it implements the traffic event detection method of the first aspect.
[0018] According to a fifth aspect of the embodiments of this application, a computer program is provided, which is stored in a computer-readable storage medium, and when a processor executes the computer program, causes the processor to perform the traffic incident detection method of the first aspect.
[0019] The traffic incident detection method of this application improves the accuracy of traffic incident detection by acquiring target images collected by the target front end within a target time period based on the detection time of the traffic incident when a detected traffic incident is obtained, and determining whether the traffic incident is a false detection based on the similarity between the event image of the traffic incident and the target image in the event detection area. Attached Figure Description
[0020] Figure 1 This is a schematic flowchart of a traffic incident detection method provided in an embodiment of this application;
[0021] Figure 2 This is a schematic diagram of a platform-side handling process for spilled material events provided in an embodiment of this application;
[0022] Figure 3This is a schematic diagram of a platform-side processing flow for vehicle accident events provided in an embodiment of this application;
[0023] Figure 4 This is a schematic diagram of a platform-side processing flow for vehicle illegal parking incidents provided in an embodiment of this application;
[0024] Figure 5 This is a schematic diagram of a platform-side processing flow for vehicle congestion events provided in an embodiment of this application;
[0025] Figure 6 This is a schematic diagram of the structure of a traffic incident detection device provided in an embodiment of this application;
[0026] Figure 7 This is a schematic diagram of another traffic incident detection device provided in an embodiment of this application;
[0027] Figure 8 This is a schematic diagram of another traffic incident detection device provided in an embodiment of this application;
[0028] Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0030] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0031] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, and to make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0032] It should be noted that the sequence number of each step in the embodiments of this application does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0033] Please see Figure 1 This is a flowchart illustrating a traffic incident detection method provided in an embodiment of this application. Figure 1 As shown, the traffic incident detection method may include the following steps:
[0034] Step S100: Obtain the detected traffic events.
[0035] In this embodiment of the application, when the front-end device (such as an IPC (Internet Protocol Camera)) has intelligent analysis capabilities, the detection device (the device used for traffic incident detection) can be the front-end device.
[0036] When the front-end equipment does not have intelligent analysis capabilities, the detection equipment can serve as an intelligent analysis device for the back-end; the detection equipment can perform traffic incident detection based on the data collected by the front-end equipment.
[0037] In this embodiment of the application, when a traffic event is detected, the detection device may use the solution provided in this embodiment to determine whether the traffic event is a false detection; or, when a traffic event is detected, the detection device may report the detected event to a designated device (such as a platform), and the designated device may use the solution provided in this embodiment to determine whether the traffic event is a false detection.
[0038] For example, when a detection device reports a detected event to a designated device, the information reported by the detection device may include, but is not limited to: detection time, device identifier (the device identifier of the front-end device to which the monitoring image of the detected traffic event belongs), event image (the monitoring image of the detected traffic event), and event detection area (i.e., the location of the detected traffic event).
[0039] Step S110: Based on the detection time of the traffic event, obtain the target image collected by the target front-end device within the target time period; wherein, the target front-end device is the front-end device associated with the traffic event, and the target time period is the time period associated with the detection time; the time period associated with the detection time includes a first time period of a first preset duration before the detection time, and / or a second time period of a second preset duration after the detection time.
[0040] Step S120: Based on the similarity between the event image and the target image in the event detection area, determine whether the traffic event is a false detection.
[0041] In this embodiment of the application, it is considered that for any traffic event, in the case of false detection and non-false detection, the image features in the event detection area will have significant differences before and after the event occurs.
[0042] Taking littering incidents as an example, false detections of littering incidents are usually caused by the presence of targets such as tree shadows, water stains, or road markings in the preset detection area. However, for falsely detected littering incidents, the targets that cause false detections usually do not change significantly in a short period of time, while the actual littering usually undergoes a process of appearing in the detection area from nothing to something in a short period of time when the littering incident occurs. Therefore, it is possible to determine whether the littering incident is a false detection based on the similarity of image features of the event detection area (i.e., the area where littering was detected) before and after the event.
[0043] Taking illegal parking incidents as an example, false detections of illegal parking incidents are usually caused by the presence of slow-moving vehicles in the preset detection area. However, for falsely detected illegal parking incidents, the vehicle may actually still be moving, and its position in the detection area may change. In contrast, when a real illegal parking incident occurs, the position of the illegally parked vehicle in the detection area is usually unchanged. Therefore, the similarity of the image features of the event detection area (i.e., the area where the illegally parked vehicle was detected) after the event can be used to determine whether the illegal parking incident is a false detection.
[0044] Therefore, based on the similarity of the event images of the traffic incident (the surveillance images that detected the traffic incident), the surveillance images of the same front-end device within a specific time range before the traffic incident, and / or the surveillance images of the same front-end device within a specific time range after the traffic incident, in the event detection area, it can be determined whether the traffic incident is a false detection, thereby improving the accuracy of traffic incident detection.
[0045] Accordingly, when a detected traffic event is obtained, the images (referred to as target images) collected by the front-end device associated with the traffic event (the front-end device to which the monitoring image of the detected traffic event belongs, referred to as the target front-end device in this paper) within the time period associated with the detection time (referred to as the target time period in this paper) can be obtained based on the detection time of the traffic event. Based on the similarity between the event image of the traffic event and the target image in the event detection area, it can be determined whether the traffic event is a false detection.
[0046] For example, the target time period may include a first time period of a first preset duration before the detection time, and / or a second time period of a second preset duration after the detection time.
[0047] For example, in the case of a first time period that is a first preset time length before the detection time, the target image can be extracted from the video recording data of the target front-end device during that time period.
[0048] For example, in the case where the target time period is a second time period of a second preset duration after the detection time, the target image can be acquired in real time by the target front-end device.
[0049] It can be seen that, in Figure 1 In the method flow shown, when a traffic event is detected, the target image collected by the target front end within the target time period is obtained based on the detection time of the traffic event. Then, based on the similarity between the event image of the traffic event and the target image in the event detection area, it is determined whether the traffic event is a false detection, thus improving the accuracy of traffic event detection.
[0050] In some embodiments, the time period associated with the detection time is determined based on the event type of the traffic event.
[0051] For example, it is worth noting that the changes in image features of the event detection area may differ for different types of traffic events, whether they are falsely detected or not.
[0052] For example, for spilled object events, the difference in image features of the event detection area under false detection and non-false detection conditions is mainly reflected in the case where the spilled object event has occurred and the case where the spilled object event has not occurred.
[0053] For vehicle parking violations, the difference in image features of the event detection area under false detection and non-false detection conditions is mainly reflected after the vehicle parking violation occurs.
[0054] Therefore, in order to more accurately identify whether a traffic incident is a false detection, the time period associated with the detection time can be determined based on the type of the traffic incident, and the similarity between the target image and the event image in the event detection area within the determined time period (i.e., the target time period) can be used to determine whether the traffic incident is a false detection.
[0055] In some embodiments, step S120, determining whether the traffic event is a false detection based on the similarity between the event image and the target image in the event detection region, includes:
[0056] Based on the type of the traffic incident and the similarity between the incident image and the target image in the incident detection area, it is determined whether the traffic incident is a false detection.
[0057] For example, considering that for different types of traffic events, the similarity between the event image and the target image in the event detection region may have different characteristics in the case of false detection and non-false detection.
[0058] Taking the incident of littering as an example, in the case of false detection, the similarity between the event image and the target image in the event detection area will be relatively high; in the case of no false detection, the similarity between the event image and the target image in the event detection area will be relatively low.
[0059] Taking illegal parking incidents as an example, in the case of false detection, the similarity between the event image and the target image in the event detection area will be relatively low; in the case of no false detection, the similarity between the event image and the target image in the event detection area will be relatively high.
[0060] For example, if a slow-moving vehicle is mistakenly detected as an illegally parked vehicle, the similarity between the event image and the target image in the event detection area will be relatively low because the vehicle is in motion.
[0061] Accordingly, it can be determined whether a traffic incident is a false detection based on the type of the traffic incident and the similarity between the incident image and the target image in the event detection area.
[0062] In one example, when the event type of the traffic event is the first event type, the target time period may include a first time period of a first preset duration prior to the detection time; wherein, the traffic event of the first event type may include, but is not limited to, a spill event.
[0063] In one example, when the traffic event is of the second event type, the target time period includes a second time period of a second preset duration after the detection time; wherein, the traffic event of the second event type may include, but is not limited to, vehicle accident events, vehicle illegal parking events, or vehicle congestion events.
[0064] For example, considering traffic incidents such as littering incidents (which can be referred to as traffic incidents of the first event type), in the case of false detection, the difference in image features of the event detection area is usually small when the littering incident occurs and when it does not; while in the case of non-false detection, the difference in image features of the event detection area is relatively large when the littering incident occurs and when it does not. Therefore, for traffic incidents of the first event type, whether the traffic incident is a false detection can be determined based on the event image and the target image within a first time period of a first preset duration prior to the detection time of the traffic incident.
[0065] For example, the first preset duration can be determined based on the detection time of the spilled material, such as the time from when the spilled material appears in the detection area to when it is detected. Its specific value can be an empirical value, such as 20 to 30 seconds.
[0066] For traffic incidents such as illegal parking, traffic accidents, or traffic congestion, in the case of false detection, the image features of the detected area typically change significantly over time; conversely, in the case of non-false detection, the image features of the detected area change only slightly within a short period. Therefore, for traffic incidents of the first type, whether the traffic incident is a false detection can be determined based on the incident image and the target image within a second time period (a second preset duration) after the incident's detection time.
[0067] In some embodiments, the target image may include multiple images.
[0068] The determination of whether a traffic event is a false detection based on the event type and the similarity between the event image and the target image in the event detection region can include:
[0069] If the traffic incident is classified as a first type of incident, determine the first similarity between the incident image and each target image in the incident detection area.
[0070] If the proportion of target images with a first similarity score less than a first similarity threshold exceeds a first proportion threshold, the traffic event is determined to be a non-false detection.
[0071] Otherwise, the traffic incident is determined to be a false detection.
[0072] For example, considering traffic events of the first event type, such as spillage incidents, in the case of false detection, the difference in image features of the event detection area is usually small when the spillage incident occurs and when it does not occur; while in the case of non-false detection, the difference in image features of the event detection area is relatively large when the spillage incident occurs and when it does not occur.
[0073] Therefore, if the obtained traffic event is of the first event type, the similarity between the event image and the target image (which can be called the first similarity) can be determined, and the traffic event can be determined as a false detection based on the first similarity.
[0074] For example, in order to improve the accuracy of false detection judgment, multiple target images collected by the target front-end device within the target time period can be obtained, and the first similarity between the event image and each target image can be determined. Based on the first similarity between the event image and each target image, it can be determined whether the traffic event is a false detection.
[0075] For example, if the first similarity between the event image and each target image is determined, and the proportion of target images with a first similarity less than the first similarity threshold exceeds a preset proportion threshold (referred to as the first proportion threshold in this document, the value of which can be set according to the actual scenario, such as 80%), then the traffic event can be determined to be a non-false detection; otherwise, the traffic event can be determined to be a false detection.
[0076] In one example, before obtaining the target image collected by the target front-end device within the target time period based on the detection time of the traffic event in step S110, the following may also be included:
[0077] In cases where the traffic incident is identified as a littering incident, vehicle detection is performed on the incident images;
[0078] If a vehicle is present in the event image, determine the overlap ratio between the vehicle detection frame and the spilled material detection area in the event image.
[0079] If the overlap ratio between the vehicle detection frame and the spilled material detection area in the event image exceeds the second ratio threshold, the traffic event is determined to be a false detection.
[0080] If no vehicle is present in the event image, or if the overlap ratio between the vehicle detection box and the spillage detection area in the event image does not exceed the second ratio threshold, then the operation described above, which involves obtaining the target image collected by the target front-end device within the target time period based on the detection time of the traffic event, is determined to be performed.
[0081] For example, considering real-world scenarios, there might be instances where certain parts of a vehicle or goods on the vehicle are mistakenly detected as spilled material, such as a rearview mirror being mistakenly detected as spilled material. Therefore, to improve the accuracy of spilled material event detection, this type of false detection can be excluded.
[0082] Accordingly, in the event of a spill incident, vehicle detection can be performed on the event images to determine whether vehicles are present in the images.
[0083] When a vehicle is present in the event image, the overlap ratio between the vehicle detection frame and the spilled material detection area in the event image can be determined.
[0084] For example, the overlap ratio between the vehicle detection frame and the spill detection area can be the ratio of the area of overlap between the spill detection area and the vehicle detection frame to the total area of the spill detection area.
[0085] For example, once the overlap ratio between the vehicle detection box and the spilled material detection area in the event image is determined, the overlap ratio can be compared with a preset ratio threshold (which can be called the second ratio threshold, and its specific value can be set according to requirements, such as 80%).
[0086] If the overlap between the vehicle detection frame and the spilled material detection area in the event image exceeds the second threshold, the spilled material event can be determined to be a false detection.
[0087] If there are no vehicles in the event image, or if the overlap ratio between the vehicle detection frame and the spillage detection area in the event image does not exceed the second ratio threshold, the operation of obtaining the target image collected by the target front-end device within the target time period based on the detection time of the traffic event can be performed in the manner described in the above embodiments.
[0088] In some embodiments, the target image may include multiple images.
[0089] The determination of whether a traffic event is a false detection based on the event type and the similarity between the event image and the target image in the event detection region can include:
[0090] If the traffic incident is classified as a second type of incident, the second similarity between the incident image and each target image in the incident detection area is determined.
[0091] If the proportion of target images with a second similarity greater than the second similarity threshold exceeds the third proportion threshold, the traffic event is determined to be a non-false detection.
[0092] Otherwise, the traffic incident is determined to be a false detection.
[0093] For example, considering traffic events of the second event type, in the case of false detection, the image features of the event detection area will change significantly over time after the traffic event occurs; while in the case of non-false detection, the image features of the event detection area will not change significantly in a short period of time after the traffic event occurs.
[0094] Therefore, if the obtained traffic event is of the second event type, the similarity between the event image and the target image (which can be called the second similarity) can be determined, and the traffic event can be determined as a false detection based on the second similarity.
[0095] For example, in order to improve the accuracy of false detection judgment, multiple target images collected by the target front-end device within the target time period can be obtained, and the second similarity between the event image and each target image can be determined. Based on the second similarity between the event image and each target image, it can be determined whether the traffic event is a false detection.
[0096] For example, if the second similarity between the event image and each target image is determined, and the proportion of target images with a second similarity greater than the second similarity threshold exceeds a preset proportion threshold (referred to as the third proportion threshold in this paper, the value of which can be set according to the actual scenario, such as 80%), then the traffic event can be determined to be a non-false detection; otherwise, the traffic event can be determined to be a false detection.
[0097] In one example, before obtaining the target image collected by the target front-end device within the target time period based on the detection time of the traffic event, it may also include:
[0098] Vehicle detection is performed on the event detection area of the event image;
[0099] If no vehicle is found in the event detection area of the event image, the traffic event is determined to be a false detection.
[0100] If a vehicle is present in the event detection area of the event image, the operation described above, which involves obtaining the target image collected by the target front-end device within the target time period based on the detection time of the traffic event, will be performed.
[0101] For example, considering that traffic events of the second event type are traffic events directly related to vehicles, meaning that when a traffic event of the second event type is detected, a vehicle should be present in the event detection area. Therefore, false detections of traffic events of the second event type can be eliminated by detecting vehicles in the event detection area.
[0102] Accordingly, in the case of a traffic event of the second event type, vehicle detection can be performed on the event detection area of the event image to determine whether a vehicle exists in the event detection area of the event image.
[0103] For example, if no vehicle is found in the event detection area of an event image, the traffic event can be determined to be a false detection.
[0104] If a vehicle is present in the event detection area of the event image, the operation of obtaining the target image collected by the target front-end device within the target time period can be performed according to the method described in the above embodiments.
[0105] In one example, if a vehicle is present in the event detection area of the event image, before obtaining the target image collected by the target front-end device within the target time period based on the detection time of the traffic event, the following may also be included:
[0106] In the case of a traffic incident that is a vehicle congestion incident, determine whether the number of vehicles in the event detection area of the event image exceeds a preset number threshold;
[0107] If so, then determine the operation to obtain the target image collected by the target front-end device within the target time period based on the detection time of the traffic incident;
[0108] Otherwise, the traffic incident is determined to be a false detection.
[0109] For example, considering that there are usually many vehicles in the vehicle detection area for traffic congestion events, if there are vehicles in the event detection area, the number of vehicles in the event detection area can be used to further verify whether the traffic event is a false detection.
[0110] Accordingly, after obtaining a vehicle congestion event and determining that there are vehicles in the event detection area of the event image, it is also possible to detect the number of vehicles in the event detection area of the event image and determine whether the number exceeds a preset number threshold (which can be set according to the actual scenario, such as 5 vehicles, 8 vehicles, etc.).
[0111] If the number of vehicles in the event detection area of the event image exceeds a preset threshold, the operation of obtaining the target image collected by the target front-end device within the target time period based on the detection time of the traffic event can be performed in the manner described in the above embodiments.
[0112] If the number of vehicles in the event detection area of the event image does not exceed a preset threshold, the traffic event can be determined to be a false detection.
[0113] In one embodiment, before obtaining the target image collected by the target front-end device within the target time period based on the detection time of the traffic event in step S110, the following may also be included:
[0114] In cases where the traffic incident is a traffic accident or a vehicle parking violation, determine whether the incident detection area in the image is within a construction area, and whether the detection time of the traffic incident falls within the construction period.
[0115] If the event detection area in the event image is within the construction area, and the detection time of the traffic event falls within the construction period, then the traffic event is determined to be a false detection.
[0116] Otherwise, determine to perform the above operation based on the detection time of the traffic incident, and obtain the target image collected by the target front-end device within the target time period.
[0117] For example, considering that in real-world scenarios, road construction events may trigger false detections of vehicle accidents or illegal parking, false detections of vehicle accidents or illegal parking can be investigated in conjunction with road construction conditions.
[0118] For example, in the case of a traffic accident or illegal parking incident, it can be determined whether the incident detection area of the incident image is within a construction area, and whether the detection time of the traffic incident is within the construction period.
[0119] Among them, the location of the construction area and the construction time period of road construction events can be obtained and stored in advance.
[0120] For example, a construction event can also be recorded as a traffic event, and the recorded information may include the construction location and construction time.
[0121] For example, a construction event can be recorded once at the start of the construction event and once at the end of the construction event.
[0122] For example, if the event detection area of the event image is within a construction area and the detection time of the traffic event is within the construction period, the traffic event can be determined to be a false detection.
[0123] If the event detection area of the event image is not within the construction area, and / or the detection time of the traffic event is not within the construction time period, the operation of obtaining the target image collected by the target front-end device within the target time period based on the detection time of the traffic event can be performed in the manner described in the above embodiments.
[0124] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, the technical solutions provided in the embodiments of this application are described below with reference to specific examples.
[0125] In the following embodiments, when a detection device detects a traffic event, it reports the detected traffic event to the platform, and the platform determines whether the traffic event is a false detection.
[0126] For example, in the following embodiments, a false detection of a traffic event can be referred to as a false alarm, and a valid detection of a traffic event can be referred to as a positive alarm.
[0127] Example 1: Spillage Incident
[0128] For example, detection areas and rules can be pre-configured for spill events. The detection device can detect the detection areas in the image based on the image data collected by the front-end device and according to the preset rules to determine whether a spill event exists. If a spill event is determined to exist, the device will report the spill event to the platform.
[0129] For example, such as Figure 2 As shown, the platform's handling process for spilled material incidents can be as follows:
[0130] 2.1 The platform receives reports of spilled material incidents from detection equipment;
[0131] The information reported by the detection equipment when reporting a spill event may include: the reporting time (taking the reporting time as the detection time as an example), the equipment code (used to uniquely identify the front-end equipment that collected the spill event), the event image, and the location information of the spill area (i.e., the event detection area mentioned above).
[0132] 2.2 The platform performs vehicle detection on the event images to determine if a vehicle exists in the images. If so, proceed to 2.3; otherwise, proceed to 2.4.
[0133] 2.3 Determine the overlap ratio between the vehicle detection frame and the spilled material area in the event image, and compare this overlap ratio with a preset ratio threshold (i.e., the second ratio threshold mentioned above). If the overlap ratio exceeds the second ratio threshold, the spilled material event is determined to be a false alarm; otherwise, proceed to step 2.4.
[0134] For example, assuming the area of the spilled material region in the event image is S1, and the area of the overlapping region between the spilled material region and the vehicle detection frame is S2, then the overlap ratio between the vehicle detection frame and the spilled material region in the event image can be (S2 / S1)*100%.
[0135] 2.4 The platform queries the event recording of the front-end device (i.e. the target front-end device mentioned above) corresponding to the reporting time and device code, and captures one image (i.e. the target image mentioned above) every second for the recording data from 30 seconds to 20 seconds before the reporting time (i.e. the target time period mentioned above).
[0136] 2.5. Compare the event images with each target image one by one to determine the image similarity between the event images and each target image within the area of the spilled material (i.e., the first similarity mentioned above);
[0137] 2.6. Compare the first similarity of each target image with the preset similarity threshold (i.e., the first similarity threshold mentioned above, which is 40% in this embodiment), and count the proportion of target images with a first similarity of less than 40%.
[0138] For example, assuming the number of target images is N1 and the number of target images with a first similarity of less than 40% is N2, then the percentage of target images with a first similarity of less than 40% is (N2 / N1)*100%.
[0139] 2.7. Compare the proportion of target images with a first similarity of less than 40% with the preset proportion threshold (i.e., the first proportion threshold mentioned above); if the proportion of target images with a first similarity of less than 40% exceeds the first proportion threshold, then determine that the spill event is a positive report; otherwise, determine that the spill event is a false report.
[0140] For example, the platform can display spill events after secondary filtering, and may not display spill events that are determined to be false alarms.
[0141] Example 2: Vehicle Accident Event
[0142] For example, detection areas and rules can be pre-configured for vehicle accident events. The detection equipment can detect the detection areas in the image based on the image data collected by the front-end device and according to the preset rules to determine whether a vehicle accident event exists. If a vehicle accident event is determined to exist, the equipment will report the vehicle accident event to the platform.
[0143] For example, such as Figure 3 As shown, the platform's handling process for vehicle accident incidents can be as follows:
[0144] 3.1 The platform receives vehicle accident incidents reported by the detection equipment;
[0145] The information reported by the detection equipment when reporting vehicle accident events may include: reporting time, equipment code (used to uniquely identify the front-end equipment that collected the vehicle accident event), event image, and location information of the vehicle accident area (i.e., the event detection area mentioned above).
[0146] 3.2 The platform analyzes the event images to determine if a vehicle exists in the area of the vehicle accident shown in the images. If so, proceed to step 3.3; otherwise, the vehicle accident event is determined to be a false alarm.
[0147] It should be noted that when the vehicle accident detection area in an image is too small, the accuracy of vehicle detection based on that area will be poor. Therefore, a threshold (which can be called the exemption area threshold) can be preset. If the area of the accident detection region in the event image is smaller than this threshold, vehicle detection is not required (i.e., exemption from detection).
[0148] For example, in the case of exemption from inspection, it can be assumed that a vehicle exists in the accident detection area.
[0149] For example, considering that the pixels of the event image and the captured image may be inconsistent, and the same pixel coordinates may be located in different event images and captured images, in order to avoid this situation, the above-mentioned exemption area threshold can use normalized area. The area of the accident detection area can also be normalized area, and the exemption condition can be determined based on the normalized area of the accident detection area.
[0150] 3.3 Determine whether the vehicle accident area in the event image is within a construction area, and whether the reporting time of the vehicle accident event falls within the construction period; if the vehicle accident area in the event image is within a construction area, and the reporting time of the vehicle accident event falls within the construction period, then the vehicle accident event is determined to be a false alarm; otherwise, proceed to 3.4.
[0151] For example, for road construction events, information about the construction area and construction time period (such as construction start time and construction end time) can be obtained in advance.
[0152] 3.4 Starting from the time the vehicle accident was reported, the front-end device of the control target captures one image every second, for a total of 10 images (i.e., the target images mentioned above);
[0153] 3.5. Compare the event images with each target image one by one to determine the image similarity between the event images and each target image within the vehicle accident area (i.e., the second similarity mentioned above);
[0154] 3.6. Compare the second similarity of each target image with the preset similarity threshold (i.e., the second similarity threshold mentioned above, which is 60% in this embodiment), and count the proportion of target images with a second similarity greater than 60%.
[0155] 3.7 Compare the proportion of target images with a second similarity greater than 60% with the preset proportion threshold (i.e., the third proportion threshold mentioned above); if the proportion of target images with a second similarity greater than 60% exceeds the third proportion threshold, then the vehicle accident event is determined to be a positive report; otherwise, the vehicle accident event is determined to be a false report.
[0156] For example, the platform can display vehicle accident events after secondary filtering, and may not display vehicle accident events that are determined to be false alarms.
[0157] Example 3: Vehicle Illegal Parking Incident
[0158] For example, detection areas and rules can be pre-configured for vehicle parking violations. The detection device can detect the detection areas in the image based on the image data collected by the front-end device and according to the preset rules to determine whether a vehicle parking violation exists. If a vehicle parking violation is confirmed, the device will report the violation to the platform.
[0159] For example, such as Figure 4 As shown, the platform's handling process for vehicle parking violations can be as follows:
[0160] 4.1 The platform receives reports of illegally parked vehicles from detection equipment;
[0161] The information reported by the detection equipment when reporting a vehicle parking violation may include: the reporting time, the equipment code (used to uniquely identify the front-end equipment that collected the vehicle parking violation), the event image, and the location information of the vehicle parking violation area (i.e., the event detection area mentioned above).
[0162] 4.2 The platform analyzes the event image to determine if a vehicle actually exists in the area of illegal parking shown in the image. If so, proceed to step 4.3; otherwise, the illegal parking incident is determined to be a false alarm.
[0163] 4.3 Determine whether the area where the vehicle is illegally parked in the event image is within a construction area, and whether the time when the vehicle illegally parked was reported falls within the construction period. If the area where the vehicle is illegally parked in the event image is within a construction area, and the time when the vehicle illegally parked was reported falls within the construction period, then the vehicle illegally parked event is determined to be a false alarm; otherwise, proceed to 4.4.
[0164] For example, for road construction events, information about the construction area and construction time period (such as construction start time and construction end time) can be obtained in advance.
[0165] 4.4 Starting from the time the illegal parking incident of the vehicle was reported, the front-end device of the control target captures one image every second, for a total of 10 images (i.e., the target images mentioned above);
[0166] 4.5. Compare the event image with each target image one by one to determine the image similarity between the event image and each target image within the area of illegal parking of the vehicle (i.e., the second similarity mentioned above);
[0167] 4.6. Compare the second similarity of each target image with the preset similarity threshold (i.e., the second similarity threshold mentioned above, which is 40% in this embodiment), and count the proportion of target images with a second similarity greater than 40%.
[0168] 4.7 Compare the proportion of target images with a second similarity greater than 40% with the preset proportion threshold (i.e., the third proportion threshold mentioned above); if the proportion of target images with a second similarity greater than 40% exceeds the third proportion threshold, then the illegal parking event of the vehicle is determined to be a positive report; otherwise, the illegal parking event of the vehicle is determined to be a false report.
[0169] For example, the platform can display vehicle parking violations after secondary filtering, and may not display vehicle parking violations that are determined to be false alarms.
[0170] Example 4: Vehicle Congestion Events
[0171] For example, detection areas and rules can be pre-configured for vehicle congestion events. The detection device can detect the detection areas in the image based on the image data collected by the front-end device and according to the preset rules to determine whether a vehicle congestion event exists. If a vehicle congestion event is determined to exist, the device will report the vehicle congestion event to the platform.
[0172] For example, such as Figure 5 As shown, the platform's handling process for vehicle congestion events can be as follows:
[0173] 5.1 The platform receives vehicle congestion events reported by the detection equipment;
[0174] The information reported by the detection equipment when reporting vehicle congestion events may include: reporting time, equipment code (used to uniquely identify the front-end equipment that collected the vehicle congestion event), event image, and location information of the vehicle congestion area (i.e. the event detection area mentioned above) (such as the coordinate information of the rule box area to which the congested lane belongs).
[0175] 5.2 The platform analyzes the event image to determine if vehicles actually exist in the congested area shown in the image. If so, proceed to step 5.3; otherwise, the congestion event is determined to be a false alarm.
[0176] 5.3 Determine whether the number of vehicles in the vehicle congestion area of the event graph exceeds the preset threshold; if so, proceed to 5.4; otherwise, determine that the vehicle congestion event is a false alarm.
[0177] 5.4 Starting from the reporting time of the vehicle congestion event, control the front-end device of the target to capture one image every second, for a total of 10 images (i.e., the target images mentioned above).
[0178] 5.5. Compare the event images with each target image one by one to determine the image similarity between the event images and each target image within the vehicle congestion area (i.e., the second similarity mentioned above);
[0179] 5.6. Compare the second similarity of each target image with the preset similarity threshold (i.e., the second similarity threshold mentioned above, which is 65% in this embodiment), and count the proportion of target images with a second similarity greater than 65%.
[0180] 5.7 Compare the proportion of target images with a second similarity greater than 65% with the preset proportion threshold (i.e., the third proportion threshold mentioned above); if the proportion of target images with a second similarity greater than 65% exceeds the third proportion threshold, then the vehicle congestion event is determined to be a positive report; otherwise, the vehicle congestion event is determined to be a false report.
[0181] For example, the platform can display vehicle congestion events after secondary filtering, and may not display vehicle congestion events that are determined to be false alarms.
[0182] The method provided in this application has been described above. The apparatus provided in this application is described below:
[0183] Please see Figure 6 This is a schematic diagram of the structure of a traffic incident detection device provided in an embodiment of this application, as shown below. Figure 6 As shown, the traffic incident detection device may include:
[0184] The first acquisition unit 610 is configured to acquire detected traffic events;
[0185] The second acquisition unit 620 is configured to acquire target images collected by the target front-end device within a target time period based on the detection time of the traffic event; wherein the target front-end device is the front-end device associated with the traffic event, and the target time period is the time period associated with the detection time; the time period associated with the detection time includes a first time period of a first preset duration before the detection time, and / or a second time period of a second preset duration after the detection time.
[0186] The determining unit 630 is configured to determine whether the traffic event is a false detection based on the similarity between the event image and the target image in the event detection area.
[0187] In some embodiments, the time period associated with the detection time is determined based on the event type of the traffic event.
[0188] In some embodiments, the determining unit 630 is specifically configured to determine whether the traffic event is a false detection based on the event type of the traffic event and the similarity between the event image of the traffic event and the target image in the event detection area.
[0189] In some embodiments, when the event type of the traffic event is a first event type, the target time period includes a first time period of a first preset duration prior to the detection time; wherein, the traffic event of the first event type includes a spill event;
[0190] When the traffic incident is classified as a second type of incident, the target time period includes a second time period of a second preset duration following the detection time; wherein, traffic incidents of the second type of incident include vehicle accident incidents, vehicle illegal parking incidents, or vehicle congestion incidents.
[0191] In some embodiments, the target image includes multiple images;
[0192] The determining unit 630 is specifically configured to, when the event type of the traffic event is a first event type, determine the first similarity between the event image and each target image in the event detection area; if the proportion of target images with a first similarity less than a first similarity threshold exceeds a first proportion threshold, determine that the traffic event is not a false detection; otherwise, determine that the traffic event is a false detection.
[0193] In some embodiments, such as Figure 7 As shown, the device further includes:
[0194] The first detection unit 640 is configured to perform vehicle detection on the event image when the traffic event is a spill event;
[0195] The determining unit 630 is specifically configured to, when a vehicle is present in the event image, determine the overlap ratio between the vehicle detection frame and the spilled material detection area in the event image; and when the overlap ratio between the vehicle detection frame and the spilled material detection area in the event image exceeds a second ratio threshold, determine that the traffic event is a false detection.
[0196] The second acquisition unit 620 is specifically configured to acquire a target image collected by the target front-end device within a target time period based on the detection time of the traffic event, provided that no vehicle exists in the event image or the overlap ratio between the vehicle detection box and the spilled material detection area in the event image does not exceed the second ratio threshold.
[0197] In some embodiments, the target image includes multiple images;
[0198] The determining unit 630 is specifically configured to, when the event type of the traffic event is a second event type, determine the second similarity between the event image and each target image in the event detection region; if the proportion of target images with a second similarity greater than a second similarity threshold exceeds a third proportion threshold, determine that the traffic event is a non-false detection; otherwise, determine that the traffic event is a false detection.
[0199] In some embodiments, such as Figure 8 As shown, the traffic incident detection device may further include:
[0200] The second detection unit 650 is configured to perform vehicle detection in the event detection area of the event image;
[0201] The determination unit 630 is specifically configured to determine that the traffic event is a false detection if there is no vehicle in the event detection area of the event image;
[0202] The second acquisition unit 620 is specifically configured to acquire the target image collected by the target front-end device within the target time period based on the detection time of the traffic event, when a vehicle is present in the event detection area of the event image.
[0203] In some embodiments, the determining unit 630 is further configured to determine whether the number of vehicles in the event detection area of the event image exceeds a preset number threshold when the traffic event is a vehicle congestion event.
[0204] The acquisition unit 620 is specifically configured to acquire the target image collected by the target front-end device within a target time period based on the detection time of the traffic event when the number of vehicles in the event detection area of the event image exceeds a preset number threshold.
[0205] The determining unit 630 is specifically configured to determine that the traffic event is a false detection if the number of vehicles in the event detection area of the event image does not exceed a preset number threshold.
[0206] In some embodiments, the determining unit 630 is specifically configured to, when the traffic event is a traffic accident event or a vehicle illegal parking event, determine whether the event detection area of the event image is within a construction area, and whether the detection time of the traffic event is within a construction period; and when the event detection area of the event image is within a construction area and the detection time of the traffic event is within a construction period, determine that the traffic event is a false detection.
[0207] The second acquisition unit 620 is specifically configured to acquire the target image collected by the target front-end device within the target time period based on the detection time of the traffic event, provided that the event detection area of the event image is not within the construction area and / or the detection time of the traffic event does not fall within the construction time period.
[0208] Please see Figure 9This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device may include a processor 901, a communication interface 902, a memory 903, and a communication bus 904. The processor 901, communication interface 902, and memory 903 communicate with each other via the communication bus 904. The memory 903 stores a computer program; the processor 901 can execute the traffic incident detection method described above by executing the program stored in the memory 903.
[0209] The memory 903 mentioned in this document can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the memory 903 can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid-state drive, any type of storage disk (such as optical disc, DVD, etc.), or similar storage media, or combinations thereof.
[0210] This application also provides a computer-readable storage medium storing a computer program, such as... Figure 9 The memory 903 in the memory, the computer program can be generated by Figure 9 The processor 901 in the electronic device shown executes to implement the traffic incident detection method described above.
[0211] This application also provides a computer program stored in a computer-readable storage medium, such as... Figure 9 The memory 903 in the memory, and when the processor executes the computer program, it causes the processor 901 to execute the traffic incident detection method described above.
[0212] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0213] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A traffic incident detection method characterized by, The method comprises: acquiring a detected traffic event; acquiring target pictures collected by a target front-end device in a target time period according to a detection time of the traffic event, wherein the target front-end device is a front-end device associated with the traffic event, and the target time period is a time period associated with the detection time; the time period associated with the detection time comprises a first time period of a first preset time length before the detection time and / or a second time period of a second preset time length after the detection time; the target front-end device is a front-end device to which a monitoring image of the detected traffic event belongs; determining whether the traffic event is a false detection according to a similarity between an event picture of the traffic event and the target pictures in an event detection area; wherein the time period associated with the detection time is determined according to an event type of the traffic event; in a case where the time period associated with the detection time comprises a first time period of a first preset time length before the detection time, the determining whether the traffic event is a false detection according to the similarity between the event picture of the traffic event and the target pictures in the event detection area comprises: respectively determining first similarities between the event picture and the target pictures in the event detection area; in a case where a proportion of target pictures with a first similarity less than a first similarity threshold value exceeds a first proportion threshold value, determining that the traffic event is not a false detection; otherwise, determining that the traffic event is a false detection; in a case where the time period associated with the detection time comprises a second time period of a second preset time length after the detection time, the determining whether the traffic event is a false detection according to the similarity between the event picture of the traffic event and the target pictures in the event detection area comprises: respectively determining second similarities between the event picture and the target pictures in the event detection area; in a case where a proportion of target pictures with a second similarity greater than a second similarity threshold value exceeds a third proportion threshold value, determining that the traffic event is not a false detection; otherwise, determining that the traffic event is a false detection.
2. The method of claim 1, wherein, Before the acquiring target pictures collected by a target front-end device in a target time period according to a detection time of the traffic event, the method further comprises: in a case where the traffic event is a littering event, performing vehicle detection on the event picture; in a case where there is a vehicle in the event picture, determining an overlap proportion between a vehicle detection box in the event picture and a littering detection area; in a case where the overlap proportion between the vehicle detection box in the event picture and the littering detection area exceeds a second proportion threshold value, determining that the traffic event is a false detection; in a case where there is no vehicle in the event picture or the overlap proportion between the vehicle detection box in the event picture and the littering detection area does not exceed the second proportion threshold value, determining to perform the acquiring target pictures collected by a target front-end device in a target time period according to a detection time of the traffic event.
3. The method of claim 1, wherein, Before the acquiring target pictures collected by a target front-end device in a target time period according to a detection time of the traffic event, the method further comprises: performing vehicle detection on an event detection area of the event picture; In a case where no vehicle exists in the event detection area of the event picture, it is determined that the traffic event is a false detection; In a case where a vehicle exists in the event detection area of the event picture, it is determined to perform the operation of acquiring a target picture collected by a target front-end device in a target time period according to a detection time of the traffic event.
4. A traffic incident detection apparatus characterized by comprising: Comprise: A first acquisition unit configured to acquire a detected traffic event; A second acquisition unit configured to acquire a target picture collected by a target front-end device in a target time period according to a detection time of the traffic event; wherein the target front-end device is a front-end device associated with the traffic event, and the target time period is a time period associated with the detection time; the time period associated with the detection time comprises a first time period of a first preset time length before the detection time, and / or a second time period of a second preset time length after the detection time; the target front-end device is a front-end device to which a monitoring image of the detected traffic event belongs; A determination unit configured to determine whether the traffic event is a false detection according to a similarity of the event picture and the target picture in an event detection area; Wherein, the time period associated with the detection time is determined according to the event type of the traffic event; The determination unit is specifically configured to, in a case where the time period associated with the detection time comprises a first time period of a first preset time length before the detection time, respectively determine a first similarity of the event picture and each target picture in the event detection area; in a case where a proportion of target pictures with a first similarity less than a first similarity threshold value exceeds a first proportion threshold value, determine that the traffic event is not a false detection; otherwise, determine that the traffic event is a false detection. The determination unit is specifically configured to, in a case where the time period associated with the detection time comprises a second time period of a second preset time length after the detection time, respectively determine a second similarity of the event picture and each target picture in the event detection area; in a case where a proportion of target pictures with a second similarity greater than a second similarity threshold value exceeds a third proportion threshold value, determine that the traffic event is not a false detection; otherwise, determine that the traffic event is a false detection.
5. The apparatus of claim 4, wherein The apparatus further comprises: A first detection unit configured to perform vehicle detection on the event picture in a case where the traffic event is a littering event; The determination unit is specifically configured to, in a case where a vehicle exists in the event picture, determine an overlap proportion between a vehicle detection box in the event picture and a littering detection area; in a case where the overlap proportion between the vehicle detection box in the event picture and the littering detection area exceeds a second proportion threshold value, determine that the traffic event is a false detection. The second acquisition unit is specifically configured to acquire, in a case where there is no vehicle in the event graph or a proportion of overlap between a vehicle detection frame in the event picture and the spillage detection region does not exceed the second proportion threshold, a target picture collected by a target front-end device in a target time period according to a detection time of the traffic event. And / or, The device further comprises: A second detection unit configured to perform vehicle detection on an event detection region of the event picture; The determination unit is specifically configured to determine that the traffic event is a false detection in a case where there is no vehicle in the event detection region of the event picture; The second acquisition unit is specifically configured to acquire, in a case where there is a vehicle in the event detection region of the event picture, a target picture collected by a target front-end device in a target time period according to a detection time of the traffic event.
6. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; The memory is used for storing a computer program; The processor is used for executing the program stored on the memory, and realizes the method in any one of claims 1-3.
7. A computer readable storage medium characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the method in any one of claims 1-3.
Citation Information
Patent Citations
Traffic accident information collection method and device
CN107547617A
Event detection method and device
CN113076821A
Event detection apparatus and event detection method
US20130121590A1