Traffic anomaly detection method, traffic signal control method, device and electronic equipment
By detecting and updating traffic detection frames in traffic intersection images, the accuracy problem of traffic anomaly detection is solved, enabling timely detection and signal control of abnormal situations such as intersection overflow and slow traffic, thereby improving traffic management efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2026-03-27
AI Technical Summary
Existing traffic anomaly detection methods are unable to accurately and promptly detect abnormal situations such as traffic overflow at intersections, affecting traffic efficiency.
By detecting images of preset traffic intersections, the initial traffic detection boxes are updated to target traffic detection boxes. By utilizing target detection algorithms and road marking detection results, detection accuracy is improved, and traffic signal control can be adjusted in a timely manner.
It improves the detection accuracy of traffic anomalies such as intersection overflow and slow-moving vehicles, thereby enhancing traffic management and traffic efficiency.
Smart Images

Figure CN116665454B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of artificial intelligence, in particular to the fields of intelligent transportation, smart city and big data. BACKGROUND
[0002] With the rapid development of cities, the traffic network in the city presents the trend of expansion and complication, and the number of vehicles driving in the traffic network grows rapidly. To improve the traffic efficiency, intelligent traffic detection devices such as intelligent traffic cameras can be used to determine the traffic abnormality in the traffic network, so as to improve the traffic efficiency. This requires optimizing the control of the traffic signal device in the traffic network to avoid congestion and improve the traffic efficiency of the traffic network. SUMMARY
[0003] The present disclosure provides a traffic anomaly detection method, a traffic signal control method, a device, an electronic device, a storage medium and a computer program product.
[0004] According to an aspect of the present disclosure, a traffic anomaly detection method is provided, comprising: detecting a first image in a first image set to obtain a first object detection result, wherein the first image set is related to a preset traffic intersection, the first image set includes at least one target first image, the target first image has at least one initial traffic detection box, and the first object detection result is related to an object in the first image; updating the initial traffic detection box according to the first object detection result to obtain a target traffic detection box; and performing traffic anomaly detection on the preset traffic intersection according to the target traffic detection box to obtain a traffic anomaly detection result.
[0005] According to another aspect of the present disclosure, a traffic signal control method is provided, comprising: updating traffic signal control information related to a preset traffic intersection according to a traffic anomaly detection result to obtain target traffic signal control information; and controlling a traffic signal device related to the preset traffic intersection to emit a traffic signal according to the target traffic signal control information; wherein the traffic anomaly detection result is obtained according to the traffic anomaly detection method provided in the embodiments of the present disclosure.
[0006] According to another aspect of the present disclosure, a traffic anomaly detection apparatus is provided, comprising: a first object detection result obtaining module configured to detect a first image in a first image set to obtain a first object detection result, wherein the first image set is related to a preset traffic intersection, the first image set comprises at least one target first image, the target first image has at least one initial traffic detection box, and the first object detection result is related to an object in the first image; a target traffic detection box obtaining module configured to update the initial traffic detection box according to the first object detection result to obtain a target traffic detection box; and a traffic anomaly detection result obtaining module configured to perform traffic anomaly detection on the preset traffic intersection according to the target traffic detection box to obtain a traffic anomaly detection result.
[0007] According to another aspect of the present disclosure, a traffic signal control apparatus is provided, comprising: updating traffic signal control information related to a preset traffic intersection according to a traffic anomaly detection result to obtain target traffic signal control information; and controlling a traffic signal device related to the preset traffic intersection to emit a traffic signal according to the target traffic signal control information; wherein the traffic anomaly detection result is obtained according to the traffic anomaly detection method provided by the embodiments of the present disclosure.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method provided by the embodiments of the present disclosure.
[0009] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method provided by the embodiments of the present disclosure.
[0010] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method provided by the embodiments of the present disclosure.
[0011] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0012] The accompanying drawings are used to better understand the present scheme, and do not limit the present disclosure. Among them:
[0013] Figure 1An exemplary system architecture to which the traffic anomaly detection method and device according to embodiments of the present disclosure can be applied is schematically shown.
[0014] Figure 2 A flowchart of the traffic anomaly detection method according to embodiments of the present disclosure is schematically shown.
[0015] Figure 3A A schematic diagram of a target first image according to embodiments of the present disclosure is schematically shown.
[0016] Figure 3B A schematic diagram of a target first image according to another embodiment of the present disclosure is schematically shown.
[0017] Figure 4 A schematic diagram of determining a target traffic bounding box according to embodiments of the present disclosure is schematically shown.
[0018] Figure 5 An application scenario diagram of the traffic anomaly detection method according to embodiments of the present disclosure is schematically shown.
[0019] Figure 6 An application scenario diagram of the traffic anomaly detection method according to another embodiment of the present disclosure is schematically shown.
[0020] Figure 7 A flowchart of the traffic signal control method according to embodiments of the present disclosure is schematically shown.
[0021] Figure 8 A block diagram of the traffic anomaly detection device according to embodiments of the present disclosure is schematically shown.
[0022] Figure 9 A block diagram of the traffic signal control device according to embodiments of the present disclosure is schematically shown.
[0023] Figure 10 A schematic block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0024] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of embodiments of the present disclosure to assist in understanding them. These should be considered in their context only as illustrative. Thus, those of ordinary skill in the art will recognize various changes and modifications of the embodiments described herein, without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
[0025] In the technical solutions of the present disclosure, the acquisition, storage and application of user personal information involved all comply with relevant laws and regulations, necessary security measures are taken, and do not violate public order and good customs.
[0026] With the complexity of the scale of the traffic network intensifying and the number of vehicles continuously rising, traffic anomalies such as intersection overflow often occur at road intersections during morning and evening rush hours. Intersection overflow can be a phenomenon that the queue of vehicles in the approach of a downstream intersection spreads to an upstream intersection. Timely detection of traffic anomalies such as intersection overflow can timely adjust the control mode of the traffic signal of the intersection, for example, the green light duration of the downstream intersection can be appropriately extended, and the green light duration of the upstream intersection can be reduced to avoid vehicles continuously entering the intersection, causing the upstream intersection to be more and more congested, and causing the entire traffic network to be paralyzed. However, the usual traffic anomaly detection method is difficult to accurately and timely detect traffic anomalies such as intersection overflow, which affects the overall efficiency of traffic.
[0027] Embodiments of the present disclosure provide traffic anomaly detection methods, traffic signal control methods, devices, electronic devices, storage media, and computer program products. The method includes: detecting a first image in a first image set to obtain a first object detection result, wherein the first image set is related to a preset intersection, the first image set includes at least one target first image, the target first image has at least one initial traffic detection box, and the first object detection result is related to an object in the first image; updating the initial traffic detection box according to the first object detection result to obtain a target traffic detection box; and performing traffic anomaly detection on the preset intersection according to the target traffic detection box to obtain a traffic anomaly detection result.
[0028] According to embodiments of the present disclosure, by detecting the first image related to the preset intersection and updating the initial traffic detection box in the target first image according to the first object detection result, the target traffic detection box obtained by updating can be adapted to the vehicle and other objects passing through the preset intersection, avoiding missing detection of traffic anomalies such as slow driving of the object. Therefore, the traffic anomaly detection result obtained according to the target traffic overflow detection box can improve the detection accuracy of traffic anomalies such as intersection overflow and slow driving of the object, and further improve the traffic management level of the preset intersection.
[0029] Figure 1 An exemplary system architecture to which the traffic anomaly detection method and device according to embodiments of the present disclosure can be applied is schematically shown.
[0030] It should be noted that, Figure 1The examples shown are merely examples of system architectures that can be applied to embodiments of this disclosure, intended to help those skilled in the art understand the technical content of this disclosure. However, they do not imply that embodiments of this disclosure cannot be used in other devices, systems, environments, or scenarios. For example, in another embodiment, an exemplary system architecture for applying the traffic anomaly detection method and apparatus may include a terminal device. However, the terminal device may implement the traffic anomaly detection method and apparatus provided by embodiments of this disclosure without interacting with a server.
[0031] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0032] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (for example only).
[0033] Terminal devices 101 and 102 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0034] Terminal device 103 can be an intelligent traffic detection terminal with data processing capabilities, such as a traffic camera.
[0035] Server 105 can be a server that provides various services, such as a backend management server that supports the content browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0036] It should be noted that the traffic anomaly detection method provided in this embodiment can generally be executed by terminal devices 101, 102, or 103. Correspondingly, the traffic anomaly detection device provided in this embodiment can also be installed in terminal devices 101, 102, or 103.
[0037] Alternatively, the traffic anomaly detection method provided by the embodiments of the present disclosure can also be generally executed by the server 105. Accordingly, the traffic anomaly detection apparatus provided by the embodiments of the present disclosure can be generally arranged in the server 105. The traffic anomaly detection method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the terminal device 101, 102, 103 and / or the server 105. Accordingly, the traffic anomaly detection apparatus provided by the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 105 and capable of communicating with the terminal device 101, 102, 103 and / or the server 105.
[0038] It should be understood that Figure 1 The number of terminal devices, networks and servers in the above-mentioned system is only illustrative. Any number of terminal devices, networks and servers can be provided according to the implementation needs.
[0039] Figure 2 A flowchart of a traffic anomaly detection method according to an embodiment of the present disclosure is schematically shown.
[0040] As Figure 2 shown, the traffic anomaly detection method includes operations S210-S230.
[0041] In operation S210, a first image in a first image set is detected to obtain a first object detection result, wherein the first image set is related to a preset traffic intersection, the first image set includes at least one target first image, the target first image has at least one initial traffic detection box, and the first object detection result is related to an object in the first image.
[0042] In operation S220, the initial traffic detection box is updated according to the first object detection result to obtain a target traffic detection box.
[0043] In operation S230, the target traffic detection box is used to perform traffic anomaly detection on the preset traffic intersection to obtain a traffic anomaly detection result.
[0044] According to the embodiments of the present disclosure, the first image set can be an image representing the traffic passing condition of the preset traffic intersection, for example, an image obtained after the intelligent traffic camera collects images of the preset traffic intersection. The object in the first image can be a vehicle, a pedestrian, an intelligent robot, etc. passing in the preset traffic intersection. The embodiments of the present disclosure do not limit the specific type of the object in the first image, and a person skilled in the art can select according to the actual needs.
[0045] According to an embodiment of the present disclosure, the first object detection result can represent any object attribute information of the object in the first image, such as position, size, type, speed, etc., the first image can be detected based on a target detection algorithm to obtain the first object detection result. The target detection algorithm may, for example, be an SPP-Net (Spatial Pyramid Pooling-Net) algorithm, but is not limited thereto, and can also be other types of target detection algorithms. Embodiments of the present disclosure do not limit the specific algorithm type of the target detection algorithm, and a person skilled in the art can select according to actual needs.
[0046] According to an embodiment of the present disclosure, the target first image can be an image in the first image set having an initial traffic detection box, and the initial traffic detection box can be obtained based on any manner. For example, the initial traffic detection box can be generated in the target first image based on a preset pixel position and a preset detection box size in the target first image. However, the initial traffic detection box can also be obtained based on a detection box generation operation of a user. Embodiments of the present disclosure do not limit the specific acquisition manner of the initial traffic detection box, and a person skilled in the art can select according to needs.
[0047] It should be noted that the target traffic detection box obtained by the traffic anomaly detection method provided by an embodiment of the present disclosure can correspond to an intelligent traffic detection device for image acquisition at a preset traffic intersection, for example, the image acquisition device of an intelligent traffic camera can capture an image containing the target traffic detection box related to the preset traffic intersection, so that the intelligent traffic camera can detect traffic anomalies in real time according to the target traffic detection box to obtain a traffic anomaly detection result.
[0048] According to an embodiment of the present disclosure, updating the initial traffic detection box according to the first object detection result can update the detection box attributes such as size, position, shape, etc. of the initial traffic detection box according to the object attribute information represented by the first object detection result, so that the obtained target traffic detection box can be adapted to the first object detection result in the first image. For example, the detection box size of the initial traffic detection box can be updated based on the object size of the object in the first image set, so that the obtained target traffic detection box can be adapted to the object size to avoid missing detection of the object. Therefore, traffic anomaly detection at the preset traffic intersection according to the target traffic detection box can reduce the missing detection of traffic anomalies such as slow driving of the object, and therefore the traffic anomaly detection result obtained according to the target traffic detection box can improve the detection accuracy of traffic anomalies such as intersection overflow and slow driving of the object.
[0049] According to an embodiment of the present disclosure, the traffic anomaly detection result can be a result of characterizing a traffic anomaly condition such as a road intersection overflow of a preset traffic intersection, a slow vehicle driving, etc. Embodiments of the present disclosure do not limit the specific type of the traffic anomaly detection result, as long as the traffic anomaly condition can be characterized.
[0050] According to an embodiment of the present disclosure, the traffic anomaly detection method can further include: performing road sign detection on the target first image to obtain a road sign detection result, the road sign detection result characterizing a road sign related to a target traffic path, wherein the target traffic path is related to the preset traffic intersection; and determining an initial traffic detection frame according to the road sign detection result.
[0051] According to an embodiment of the present disclosure, the target traffic path can be an import path and an export path related to the preset traffic intersection. The road sign detection result can characterize a road sign related to the import path, for example, a stop line at the intersection related to the import path. The road sign detection result can also characterize a road sign related to the export path, for example, a traffic direction indication sign related to the export path. The road sign detection result can also characterize a road sign related to both the export path and the import path, for example, a pedestrian traffic path sign (also known as a pedestrian crossing line or a zebra crossing line) related to the export path and the import path.
[0052] Figure 3A A schematic diagram of a target first image according to an embodiment of the present disclosure is schematically shown.
[0053] As shown in Figure 3A , the target first image 300 can include a first traffic path 301 and a second traffic path. The first traffic path 301 can be an import path related to a preset traffic intersection, and the second traffic path 302 can be an export path related to the preset traffic intersection. The target traffic path can be the first traffic path 301 and the second traffic path 302.
[0054] As shown in Figure 3A , performing road sign detection on the target first image to obtain a road sign detection result can be detecting a pedestrian traffic path sign (also known as a pedestrian crossing line or a zebra crossing line) in the target first image 300 to obtain a pedestrian traffic path sign detection frame 310 corresponding to the pedestrian traffic path sign in the target first image 300. For another example, a stop line at the intersection (also known as a stop line) in the target first image 300 can also be detected to obtain a stop line detection result 320.
[0055] As shown in Figure 3AAs shown, the initial traffic detection box 330 can be obtained based on the pedestrian path marker detection box 310 and the intersection stop line detection result 320. For example, the pedestrian path marker detection box 310 may contain the lower right vertex 311, and the intersection stop line detection result 320 may contain the stop line endpoint 321. The initial traffic detection box 330 can be determined based on the lower right vertex 311 and the stop line endpoint 321.
[0056] Figure 3B A schematic diagram of a target first image is shown according to another embodiment of the present disclosure.
[0057] like Figure 3B As shown, road marking detection is performed on the target first image to obtain road marking detection results. The detection results include a pedestrian path marking detection box 310, an intersection stop line detection result 320, and a traffic direction separating lane line 340 between the first traffic path 301 and the second traffic path 302. The traffic direction separating lane line 340 can be obtained based on the positional relationship between the stop line endpoint 321 of the intersection stop line detection result 320 and the endpoints of multiple lane lines facing the pedestrian path markings.
[0058] like Figure 3B As shown, the initial traffic detection box 350 in the target first image 300 can be determined by determining the first intersection point 341 and the second intersection point 342 between the extension line of the traffic direction dividing lane line 340 and the pedestrian traffic path identification detection box 310, and by determining the lower right vertex 311 of the pedestrian traffic path identification detection box 310.
[0059] For example, if the coordinates of the first intersection point 341 and the second intersection point 342 are determined to be (X1, Y1) and (X2, Y2) respectively, then the coordinates of the upper left vertex 351 of the initial traffic detection box 350 can be determined as (min(X1, X2), Y2). Furthermore, based on the coordinates of the lower right vertex 311 of the pedestrian path identification detection box 310, the initial traffic detection box 350 can be obtained.
[0060] According to the embodiment of the present disclosure, the initial traffic detection box is determined by the road surface mark detection result detected from the target first image, and then the initial traffic detection box is updated according to the first object detection result to obtain the updated target traffic detection box. In the case that the intelligent traffic detection device moves due to environmental factors such as strong wind, heavy rain, vibration, etc., the position of the target traffic detection box can still be corrected in time according to the traffic anomaly detection method provided by the embodiment of the present disclosure, so that the target traffic detection box and the intelligent traffic detection device are coordinated in the coordinate system, and the displacement of the target traffic detection box is avoided. Therefore, according to the traffic anomaly detection method provided by the embodiment of the present disclosure, the traffic anomaly detection of the preset traffic intersection can further improve the detection accuracy of the traffic anomaly such as intersection overflow.
[0061] According to the embodiment of the present disclosure, the road surface mark can also include an object turning waiting area mark, such as a vehicle turning waiting area in the preset traffic intersection. By detecting the road surface mark detection box corresponding to the object turning waiting area mark in the target first image, and moving the object turning waiting area mark detection box to the preset first target direction by a first preset distance, the initial traffic detection box can be obtained.
[0062] According to the embodiment of the present disclosure, the road surface mark can also include a passing direction indication mark, such as a straight passing mark, a left-turn passing mark, etc. in the passing lane related to the preset traffic intersection. By detecting the road surface mark detection box corresponding to the passing direction indication mark in the target first image, and moving the road surface mark detection box corresponding to the object turning waiting area mark to the preset second target direction by a second preset distance, the initial traffic detection box can be obtained.
[0063] According to the embodiment of the present disclosure, the initial traffic detection box can also be obtained by moving, cropping and other image processing methods on the road surface mark detection box corresponding to the object turning waiting area mark and the road surface mark detection box corresponding to the passing direction indication mark.
[0064] According to the embodiment of the present disclosure, the first object detection result includes a plurality of.
[0065] It should be noted that the plurality of first object detection results can be obtained based on the first object detection results related to each of the plurality of first images in the first image set. For example, the first image set obtained after image acquisition for the preset traffic intersection can be saved, and the vehicle detection box related to each of the first images in the first image set can be determined. Then, a plurality of vehicle detection boxes related to the preset intersection can be obtained according to the vehicle detection boxes in the first image set.
[0066] According to embodiments of this disclosure, updating the initial traffic detection box based on the first object detection result to obtain the target traffic detection box may include: determining a first-level intermediate detection result from multiple first object detection results, wherein the distance between the first-level intermediate detection result and the initial traffic detection box is less than or equal to a first preset distance threshold; updating the initial traffic detection box based on the first-level object size of the object corresponding to the first-level intermediate detection result to obtain the target traffic detection box.
[0067] According to embodiments of this disclosure, the first-level intermediate detection result may be a distance between itself and the boundary of the initial traffic detection frame that is less than or equal to a first preset distance threshold. For example, if the first-level intermediate detection result is a vehicle detection frame, the boundary of the vehicle detection frame may coincide with the boundary of the initial traffic detection frame.
[0068] According to embodiments of this disclosure, when the first object detection result is a first object detection box, a first-level intermediate detection result can be determined from multiple first object detection results by comparing the pixel difference between the boundary of the first object detection box closest to the Y-axis origin and the upper boundary of the initial traffic detection box furthest from the Y-axis origin. For example, a first object detection box whose pixel difference between the boundary of the object detection box closest to the Y-axis origin and the upper boundary of the initial traffic detection box furthest from the Y-axis origin is less than or equal to 5 pixels can be determined as a first-level intermediate detection result. This reduces the computational overhead of calculating the distance between the first-level intermediate detection result and the initial traffic detection box, while improving the accuracy of determining the first-level intermediate detection result.
[0069] Figure 4 A schematic diagram illustrating the determination of a target traffic detection frame according to an embodiment of the present disclosure is shown.
[0070] like Figure 4 As shown, this application scenario may include multiple first object detection results 401, 402, and 403. By detecting the distances between each of the first object detection results 401, 402, and 403 and the initial traffic detection box 410, the first object detection result 401 can be determined as a first-level intermediate detection result. Based on the size of the first-level object corresponding to the first object detection result 401, for example, based on the length of the first object detection result 401 along the Y-axis, the initial traffic detection box 410 is updated, thereby obtaining the target traffic detection box 420.
[0071] According to an embodiment of the present disclosure, the initial traffic detection box 410 is updated according to the length dimension of the first object detection result 401 along the Y-axis direction. For example, the coordinates (X4, Y4) of the top-right vertex 411 of the initial traffic detection box 410 can be updated according to the coordinates (X3, Y3) of the first-level top vertex 4011 of the first object detection result 401, so as to obtain the coordinates (X4, Y3) of a new top-right vertex 411', and then the target traffic detection box 420 can be obtained.
[0072] According to an embodiment of the present disclosure, in a case where the plurality of first object detection results contain detection results of a plurality of object types, the first object detection result of a target type can be selected from the plurality of first object detection results, and the first-level intermediate detection result can be determined from the first object detection result of the target type.
[0073] For example, the plurality of first object detection results contain detection boxes of vehicles, pedestrians, and the like, and the detection boxes of vehicles can be selected from the plurality of first object detection results, and the first-level intermediate detection result can be determined according to the positional relationship between one or more vehicle detection boxes and the initial traffic detection box. In this way, traffic anomaly detection can be performed on objects of the vehicle type, so as to ensure the passing efficiency of the preset traffic intersection.
[0074] According to an embodiment of the present disclosure, in a case where the first-level intermediate detection result contains a plurality of first-level objects, the target first-level object size can be determined according to the first-level object size corresponding to each of the plurality of first-level intermediate detection results, and the initial traffic detection box can be updated according to the target first-level object size to obtain the target traffic detection box.
[0075] For example, the 100 first-level object sizes can be sorted according to the length dimension along the Y-axis direction from long to short, and the first-level object size ranked at the 10th position can be determined as the target first-level object size. The target traffic detection box obtained according to the target first-level object size can accommodate a larger number of objects passing through the preset traffic intersection, so as to avoid missing detection of the objects passing through the preset traffic intersection. At the same time, the target traffic detection box obtained by updating can be adapted to the objects passing through the preset traffic intersection, so as to avoid that a truck, a bus, or the like, which has a relatively long length, cannot be accommodated in the target traffic detection box, resulting in missing detection of the traffic anomaly.
[0076] According to an embodiment of the present disclosure, the updating the initial traffic bounding box according to the first object detection result to obtain the target traffic bounding box can further include: determining an n-th intermediate detection result from the plurality of first object detection results, where a distance between the n-th intermediate detection result and an (n-1)-th intermediate traffic bounding box is less than or equal to an n-th preset distance threshold; updating the (n-1)-th intermediate traffic bounding box according to an n-th object size of the object corresponding to the n-th intermediate detection result to obtain an n-th intermediate traffic bounding box; and in a case where n=N, determining the target traffic bounding box according to the N-th intermediate traffic bounding box, where N≥n>1, and N and n are integers; and wherein the first intermediate traffic bounding box is obtained by updating the initial traffic bounding box according to a first object size.
[0077] According to an embodiment of the present disclosure, for example, in a case where the first intermediate detection result is a first vehicle detection box, the first intermediate traffic bounding box can be obtained by updating the initial traffic bounding box according to a first object size (i.e., a length size of the first vehicle detection box along a positive direction of a Y axis).
[0078] According to an embodiment of the present disclosure, in a case where n=2, a second vehicle detection box having a bounding box boundary of the first intermediate traffic bounding box less than or equal to a second preset distance threshold is determined from the plurality of vehicle detection boxes. The second intermediate traffic bounding box can be obtained by updating the first intermediate traffic bounding box according to a length size of the second vehicle detection box along a positive direction of a Y axis. In a case where N=n=2, the second intermediate traffic bounding box can be determined as the target traffic bounding box. In this way, the target traffic bounding box obtained by updating can accommodate at least two vehicles in a Y axis direction, so as to facilitate relatively accurate and timely detection of a vehicle driving in the target traffic bounding box or a vehicle stopping in the target traffic bounding box in a plurality of continuous video frames (the first image set), and further facilitate early detection of a congestion-retained vehicle at the preset traffic intersection, thereby improving detection efficiency for intersection overflow.
[0079] According to an embodiment of the present disclosure, the traffic anomaly detection method can further include: acquiring, by an image acquisition device arranged at a preset detection position, an image of the preset traffic intersection to obtain a second image set containing a second image, where a second image acquisition time of the second image is later than a first image acquisition time of the first image; and updating the first image set according to the second image to obtain a new first image set; and wherein a camera parameter of the image acquisition device is obtained by calibrating the image acquisition device based on the preset detection position.
[0080] Figure 5 An application scenario diagram of a traffic anomaly detection method according to an embodiment of the present disclosure is schematically shown.
[0081] It should be noted that in this application scenario, the intelligent traffic detection device can be installed with an image acquisition device. The camera parameters of the image acquisition device can be calibrated according to the installation position of the image acquisition device, so as to obtain the camera attribute parameters of the calibrated image acquisition device, such as camera intrinsic parameters and camera extrinsic parameters.
[0082] As shown in Figure 5 According to the target detection method provided by the embodiments of the present disclosure, the target traffic detection box 510 can be generated in the image acquisition picture 500 of the image acquisition device, and the traffic anomaly detection of the preset traffic intersection can be performed according to the target traffic detection box 510 in the image acquisition picture 500. For example, the second image set related to the preset traffic intersection can be acquired by the image acquisition device, and the second image in the second image set can be labeled with the target traffic detection box 510. The traffic anomaly detection of the preset traffic intersection is performed according to the second image set, so that the traffic anomaly situation can be detected in time.
[0083] As shown in Figure 5 Under the influence of weather environment factors such as heavy rain and strong wind, or other environmental influence factors such as ground vibration, the position of the image acquisition device will move, which will cause the target traffic detection box 510 in the image acquisition picture 500 to be offset, and the offset traffic detection box 520 is obtained, which will reduce the traffic anomaly detection accuracy of the preset traffic intersection. The first image set can be updated according to the second image set acquired by the image acquisition device, and the updated first image set can be obtained. Then, according to the updated first image set, the offset traffic detection box 520 in the image acquisition picture 500 can be corrected, so as to obtain the corrected target traffic detection box 510. In this way, the automatic correction function of the image acquisition device can be realized, so as to avoid the negative influence of environmental influence factors on the traffic anomaly detection of the intelligent traffic detection device, and improve the automation and intelligent degree of the intelligent traffic detection device.
[0084] According to the embodiments of the present disclosure, the traffic anomaly detection of the preset traffic intersection according to the target traffic detection box includes: detecting the second image in the second image set to obtain a second object detection result, determining a candidate stranded object detection result from the second object detection result, wherein the candidate stranded object detection result at least partially overlaps with the target traffic detection box; and determining the traffic anomaly detection result according to the candidate stranded object detection result.
[0085] According to the embodiments of the present disclosure, the second image in the second image set can be detected according to the target detection algorithm, and the candidate stranded object detection result at least partially overlapping with the target traffic detection box can be determined from the second object detection result by using the positional relationship between the target traffic detection box and the second object detection result.
[0086] According to embodiments of this disclosure, traffic anomaly detection results can be determined based on the number of candidate stranded object detection results. For example, if the number of candidate stranded object detection results is greater than a preset stranded number threshold, the traffic anomaly detection results can be determined as intersection overflow anomaly detection results.
[0087] Figure 6 The diagram illustrates an application scenario of a traffic anomaly detection method according to another embodiment of the present disclosure.
[0088] like Figure 6 As shown, in this application scenario 600, an image acquisition device 610 can be set up along the traffic path to acquire images of the opposing traffic paths at a preset traffic intersection, obtaining multiple consecutive frames of second images, i.e., a second image set. According to the traffic anomaly detection method provided in the embodiments of this disclosure, a target traffic detection box corresponding to the traffic anomaly detection area 620 can be generated in the second image.
[0089] like Figure 6 As shown, the traffic anomaly detection area 620 and the vehicle object 631 overlap at least partially. Therefore, the detection result of the second object corresponding to the vehicle object 631 in the second image can be the detection result of the candidate lingering object.
[0090] According to embodiments of this disclosure, determining traffic anomaly detection results based on candidate stranded object detection results may include: determining a candidate stranded time corresponding to the candidate stranded object detection results based on the correlation between the candidate stranded object detection results and the second image acquisition time; determining the stranded frequency of objects related to the candidate stranded object detection results within a preset stranded time period based on the candidate stranded time; and determining the traffic anomaly detection results based on the stranded frequency.
[0091] According to embodiments of this disclosure, the candidate dwell time can be the time when the second image corresponding to the candidate dwell object detection result is acquired by the image acquisition device. The frequency of occurrence of objects associated with the same object identifier within a preset dwell time period (e.g., 5 seconds) can be calculated using the object identifier (e.g., license plate identifier) of the candidate dwell object detection result. This allows for the determination of the dwell frequency of objects associated with the same object identifier. By determining the dwell frequency of objects associated with the candidate dwell object detection result within the preset dwell time period, objects appearing in the target traffic detection frame can be tracked, facilitating the determination of the number of slowly moving or stopped objects in the target traffic detection frame within the preset dwell time period.
[0092] According to embodiments of this disclosure, determining traffic anomaly detection results based on the frequency of lingering traffic may include determining the traffic anomaly detection results as intersection overflow anomaly detection results when the frequency of lingering traffic is greater than a preset lingering traffic frequency threshold.
[0093] According to embodiments of this disclosure, the target traffic detection frame includes a lane detection area, which is associated with a lane marking.
[0094] According to embodiments of this disclosure, the lane detection area can be the image area corresponding to the area divided by lane lines within the target traffic detection frame.
[0095] like Figure 6 As shown, the target traffic detection frame corresponding to the traffic anomaly detection area 620 can contain three lane detection areas, namely the lane detection areas corresponding to lane areas 621, 622 and 623 respectively.
[0096] According to embodiments of this disclosure, determining candidate stranded object detection results from second object detection results may include: determining stranded lane identifiers related to the second object detection results based on the positional relationship between the second object detection results and the lane detection area; and labeling the second object detection results based on the stranded lane identifiers related to each of the second object detection results to obtain candidate stranded object detection results.
[0097] According to embodiments of this disclosure, when the second object detection result is a second vehicle detection frame, a lingering lane identifier related to the second object detection result is determined based on the positional relationship between the second object detection result and the lane detection area. This can be achieved by determining the lane detection area as the lingering lane area when there is at least partial overlap between the second vehicle detection frame and the lane detection area, and the identifier of the lingering lane area can serve as the lingering lane identifier. By labeling the second object detection result related to the lingering lane identifier, the obtained candidate lingering object detection results can be used to statistically analyze the lingering frequency of candidate lingering objects in each lane detection area during a preset lingering time period, thereby accurately determining the traffic anomaly detection result.
[0098] According to an embodiment of the present disclosure, determining the traffic anomaly detection result according to the stay frequency can include: determining, in a preset stay time period, a stay frequency of candidate stay object detection results having a same object identifier; determining, according to second image collection time instants corresponding to the candidate stay object detection results having the same object identifier, a stay time interval of the candidate stay object having the same object identifier; determining, according to a ratio between the stay time interval and the preset stay time period and a stay lane identifier corresponding to the candidate stay object detection results having the same object identifier, a lane detection region overflow probability of a lane detection region related to the stay lane identifier; and determining, by determining the lane detection region overflow probability corresponding to each of the plurality of lane detection regions in the target traffic detection frame, a road intersection overflow anomaly probability related to the preset road intersection.
[0099] According to an embodiment of the present disclosure, the traffic anomaly detection method can further update the target traffic detection frame according to the updated first image set, so as to obtain a new target traffic detection frame. In this way, the size, position and other detection attribute parameters of the target traffic detection frame can be updated in real time, and the preset road intersection can be detected according to the updated target traffic detection frame, so as to timely adjust the traffic anomaly detection strategy according to the types of vehicles passing through the preset road intersection, and improve the traffic anomaly detection accuracy.
[0100] According to an embodiment of the present disclosure, by adjusting threshold parameters such as the preset stay time period and the preset probability threshold, the traffic anomaly detection can be adaptively adjusted under different traffic management requirements, so as to flexibly determine the alarm condition of the traffic anomaly detection result, so as to meet the individual needs in actual traffic management.
[0101] Figure 7 A flowchart of a traffic signal control method according to an embodiment of the present disclosure is schematically shown.
[0102] As shown in Figure 7 , the traffic signal control method includes operations S710-S720.
[0103] In operation S710, the traffic signal control information related to the preset road intersection is updated according to the traffic anomaly detection result, and target traffic signal control information is obtained.
[0104] According to the target traffic signal control information, the traffic signal device related to the preset road intersection is controlled to emit a traffic signal.
[0105] According to an embodiment of the present disclosure, the traffic anomaly detection result is obtained by the traffic anomaly detection method provided by an embodiment of the present disclosure.
[0106] According to an embodiment of the present disclosure, by means of the traffic anomaly detection method provided by the embodiment of the present disclosure, the relevant traffic anomaly message can be generated according to the intersection overflow anomaly detection result and other traffic anomaly detection results. The traffic signal control system can parse the received traffic anomaly message to obtain the traffic anomaly detection result, and update the traffic signal control information related to the preset traffic intersection according to the traffic anomaly type, the traffic anomaly level and other traffic anomaly attribute information of the traffic anomaly detection result. The obtained target traffic signal control information can appropriately adjust the traffic light timing related to the preset traffic intersection, and further adjust the vehicle waiting time of the passing path of each direction related to the preset traffic intersection, so as to realize timely alleviation of the traffic anomaly situation and improve the traffic passing efficiency.
[0107] The traffic signal control method provided by the embodiment of the present disclosure can be applied to the traffic signal control system, so as to take the traffic anomaly detection result as the calculation basis data for generating the traffic signal control strategy, realize real-time updating of the target traffic signal control information according to the traffic anomaly detection result, and control the traffic signal device to emit the traffic signal according to the updated target traffic signal control information, thereby improving the traffic passing efficiency.
[0108] Figure 8 The block diagram of the traffic anomaly detection device according to the embodiment of the present disclosure is schematically shown.
[0109] As shown in Figure 8 The traffic anomaly detection device 800 includes a first object detection result obtaining module 810, a target traffic detection box obtaining module 820 and a traffic anomaly detection result obtaining module 830.
[0110] The first object detection result obtaining module is configured to detect a first image in the first image set to obtain a first object detection result, wherein the first image set is related to a preset traffic intersection, the first image set includes at least one target first image, the target first image has at least one initial traffic detection box, and the first object detection result is related to an object in the first image.
[0111] The target traffic detection box obtaining module is configured to update the initial traffic detection box according to the first object detection result to obtain a target traffic detection box.
[0112] The traffic anomaly detection result obtaining module is configured to perform traffic anomaly detection on the preset traffic intersection according to the target traffic detection box to obtain a traffic anomaly detection result.
[0113] According to an embodiment of the present disclosure, the first object detection result includes a plurality of
[0114] According to an embodiment of the present disclosure, the target traffic bounding box obtaining module comprises a first intermediate detection result obtaining sub-module and a first target traffic bounding box obtaining sub-module.
[0115] The first intermediate detection result obtaining sub-module is configured to determine a first-level intermediate detection result from the plurality of first object detection results, wherein a distance between the first-level intermediate detection result and the initial traffic bounding box is less than or equal to a first preset distance threshold.
[0116] The first target traffic bounding box obtaining sub-module is configured to update the initial traffic bounding box according to a first-level object size of the object corresponding to the first-level intermediate detection result to obtain the target traffic bounding box.
[0117] According to an embodiment of the present disclosure, the first object detection result comprises a plurality of.
[0118] According to an embodiment of the present disclosure, the target traffic bounding box obtaining module comprises a second intermediate detection result obtaining sub-module, an intermediate traffic bounding box obtaining sub-module and a second target traffic bounding box obtaining sub-module.
[0119] The second intermediate detection result obtaining sub-module is configured to determine an nth-level intermediate detection result from the plurality of first object detection results, wherein a distance between the nth-level intermediate detection result and an (n-1)th-level intermediate traffic bounding box is less than or equal to an nth preset distance threshold.
[0120] The intermediate traffic bounding box obtaining sub-module is configured to update the (n-1)th-level intermediate traffic bounding box according to an nth-level object size of the object corresponding to the nth-level intermediate detection result to obtain the nth-level intermediate traffic bounding box.
[0121] The second target traffic bounding box obtaining sub-module is configured to determine the target traffic bounding box according to the Nth-level intermediate traffic bounding box when n=N, N≥n>1, and N and n are integers; wherein the first-level intermediate traffic bounding box is obtained by updating the initial traffic bounding box according to the first-level object size.
[0122] According to an embodiment of the present disclosure, the traffic anomaly detection device further comprises an image acquisition module and a first updating module.
[0123] The image acquisition module is configured to acquire images of a preset traffic intersection by using an image acquisition device arranged at a preset detection position to obtain a second image set comprising a second image, wherein a second image acquisition time of the second image is after a first image acquisition time of a first image.
[0124] The first updating module is configured to update the first image set according to the second image to obtain a new first image set; wherein a camera parameter of the image acquisition device is obtained by calibrating the image acquisition device based on the preset detection position.
[0125] According to an embodiment of the present disclosure, the traffic anomaly detection result obtaining module comprises a second object detection result obtaining sub-module, a candidate stationary object detection result obtaining sub-module, and a traffic anomaly detection result obtaining sub-module.
[0126] The second object detection result obtaining sub-module is configured to detect the second images in the second image set to obtain second object detection results.
[0127] The candidate stationary object detection result obtaining sub-module is configured to determine candidate stationary object detection results from the first object detection results, wherein the candidate stationary object detection results at least partially overlap with the target traffic bounding box.
[0128] The traffic anomaly detection result obtaining sub-module is configured to determine a traffic anomaly detection result according to the candidate stationary object detection results.
[0129] According to an embodiment of the present disclosure, the traffic anomaly detection result obtaining sub-module comprises a candidate stationary time obtaining unit, a stationary frequency obtaining unit, and a traffic anomaly detection result obtaining unit.
[0130] The candidate stationary time obtaining unit is configured to determine candidate stationary times corresponding to the candidate stationary object detection results according to the association between the candidate stationary object detection results and the second image collection time.
[0131] The stationary frequency obtaining unit is configured to determine a stationary frequency of an object related to the candidate stationary object detection results in a preset stationary time period according to the candidate stationary times.
[0132] The traffic anomaly detection result obtaining unit is configured to determine a traffic anomaly detection result according to the stationary frequency.
[0133] According to an embodiment of the present disclosure, the target traffic bounding box comprises a lane detection region, and the lane detection region is associated with a lane mark.
[0134] According to an embodiment of the present disclosure, the candidate stationary object detection result obtaining sub-module comprises a stationary lane mark obtaining unit and a candidate stationary object detection result obtaining unit.
[0135] The stationary lane mark obtaining unit is configured to determine stationary lane marks related to the second object detection results according to the positional relationship between the second object detection results and the lane detection region.
[0136] The candidate stationary object detection result obtaining unit is configured to label the second object detection results according to the stationary lane marks related to the second object detection results respectively to obtain candidate stationary object detection results.
[0137] According to an embodiment of the present disclosure, the traffic anomaly detection apparatus further comprises a road surface mark detection result obtaining module and an initial traffic detection box obtaining module.
[0138] The road surface mark detection result obtaining module is configured to perform road surface mark detection on the target first image to obtain a road surface mark detection result, the road surface mark detection result representing a road surface mark related to a target traffic path, wherein the target traffic path is related to the preset traffic intersection.
[0139] The initial traffic detection box obtaining module is configured to determine an initial traffic detection box according to the road surface mark detection result.
[0140] According to an embodiment of the present disclosure, the road surface mark comprises at least one of the following: a pedestrian traffic path mark, an object turning waiting area mark, and a traffic direction indication mark.
[0141] Figure 9 A block diagram of a traffic signal control apparatus according to an embodiment of the present disclosure is schematically shown.
[0142] As shown in Figure 9 The traffic signal control apparatus 900 comprises a target traffic signal control information obtaining module 910 and a control module 920.
[0143] The target traffic signal control information obtaining module is configured to update traffic signal control information related to the preset traffic intersection according to the traffic anomaly detection result to obtain target traffic signal control information.
[0144] The control module is configured to control a traffic signal device related to the preset traffic intersection to emit a traffic signal according to the target traffic signal control information, wherein the traffic anomaly detection result is obtained according to the traffic anomaly detection method provided by an embodiment of the present disclosure.
[0145] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.
[0146] According to an embodiment of the present disclosure, an electronic device comprises at least one processor and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method as described above.
[0147] According to an embodiment of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to perform the method as described above.
[0148] According to an embodiment of this disclosure, a computer program product includes a computer program that, when executed by a processor, implements the method described above.
[0149] Figure 10 A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0150] like Figure 10 As shown, device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1002 or a computer program loaded from storage unit 1008 into random access memory (RAM) 1003. The RAM 1003 may also store various programs and data required for the operation of device 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.
[0151] Multiple components in device 1000 are connected to I / O interface 1005, including: input unit 1006, such as keyboard, mouse, etc.; output unit 1007, such as various types of monitors, speakers, etc.; storage unit 1008, such as disk, optical disk, etc.; and communication unit 1009, such as network card, modem, wireless transceiver, etc. Communication unit 1009 allows device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0152] The computing unit 1001 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs various methods and processes described above, such as the traffic anomaly detection method, the traffic signal control method. For example, in some embodiments, the traffic anomaly detection method, the traffic signal control method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded onto the RAM 1003 and executed by the computing unit 1001, one or more steps of the traffic anomaly detection method, the traffic signal control method described above can be performed. Alternatively, in other embodiments, the computing unit 1001 can be configured to perform the traffic anomaly detection method, the traffic signal control method by any other suitable means, such as by means of firmware.
[0153] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0154] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0155] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can 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 the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0156] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0157] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0158] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0159] It should be understood that the various forms of flow shown above can be re-ordered, added to, or have steps deleted, using the flow. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present disclosure can be achieved, which are not limited herein.
[0160] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A traffic anomaly detection method, comprising: detecting a first image in a first image set to obtain a first object detection result, wherein the first image set is related to a preset traffic intersection, the first image set comprises at least one target first image, the target first image has at least one initial traffic detection box, the initial traffic detection box is determined by a road surface mark detection result obtained by detecting the target first image, and the first object detection result represents an object size of an object in the first image; updating a size of the initial traffic detection box according to the object size represented by the first object detection result to obtain a target traffic detection box; and performing traffic anomaly detection on the preset traffic intersection according to the target traffic detection box to obtain a traffic anomaly detection result.
2. The method of claim 1, wherein, The first object detection result comprises a plurality of The updating of the initial traffic detection box according to the first object detection result to obtain a target traffic detection box comprises: determining a first-level intermediate detection result from the plurality of first object detection results, wherein a distance between the first-level intermediate detection result and the initial traffic detection box is less than or equal to a first preset distance threshold; and updating the initial traffic detection box according to a first-level object size of an object corresponding to the first-level intermediate detection result to obtain the target traffic detection box.
3. The method of claim 1, wherein, The first object detection result comprises a plurality of The updating of the initial traffic detection box according to the first object detection result to obtain a target traffic detection box comprises: determining an nth-level intermediate detection result from the plurality of first object detection results, wherein a distance between the nth-level intermediate detection result and an (n-1) th-level intermediate traffic detection box is less than or equal to an nth preset distance threshold; and updating the (n-1) th-level intermediate traffic detection box according to an nth-level object size of an object corresponding to the nth-level intermediate detection result to obtain an nth-level intermediate traffic detection box; and in a case where n=N, determining the target traffic detection box according to the Nth-level intermediate traffic detection box, N≥n>1, and N and n are integers. The first-level intermediate traffic detection box is obtained by updating the initial traffic detection box according to the first-level object size. 4.The method of claim 1, further comprising: performing image acquisition on the preset traffic intersection by using an image acquisition device arranged at a preset detection position to obtain a second image set comprising a second image, wherein a second image acquisition time of the second image is after a first image acquisition time of the first image; and updating the first image set according to the second image to obtain a new first image set. A camera parameter of the image acquisition device is obtained by calibrating the image acquisition device based on the preset detection position.
5. The method of claim 4, wherein, The performing of traffic anomaly detection on the preset traffic intersection according to the target traffic detection box to obtain a traffic anomaly detection result comprises: detecting a second image in the second image set to obtain a second object detection result. determine a candidate stationary object detection result from the second object detection result, wherein the candidate stationary object detection result at least partially overlaps with the target traffic bounding box; and determine the traffic anomaly detection result according to the candidate stationary object detection result.
6. The method of claim 5, wherein, The determining the traffic anomaly detection result according to the candidate stationary object detection result comprises: determine a candidate stationary time corresponding to the candidate stationary object detection result according to a correlation between the candidate stationary object detection result and the second image capturing time; determine a stationary frequency of an object related to the candidate stationary object detection result in a preset stationary time period according to the candidate stationary time; and determine the traffic anomaly detection result according to the stationary frequency.
7. The method of claim 5, wherein, The target traffic bounding box contains a lane detection region, and the lane detection region is associated with a lane mark; The determining the candidate stationary object detection result from the second object detection result comprises: determine a stationary lane mark related to the second object detection result according to a positional relationship between the second object detection result and the lane detection region; and label the second object detection result according to the stationary lane mark related to each of the second object detection results to obtain the candidate stationary object detection result.
8. The method of claim 1, further comprising: performing road surface mark detection on the target first image to obtain a road surface mark detection result, the road surface mark detection result representing a road surface mark related to a target passing path, wherein the target passing path is related to the preset traffic intersection; and determine the initial traffic bounding box according to the road surface mark detection result.
9. The method of claim 8, wherein, The road surface mark comprises at least one of: a pedestrian passing path mark, an object turning waiting area mark, and a passing direction indication mark.
10. A traffic signal control method, comprising: updating traffic signal control information related to a preset traffic intersection according to a traffic anomaly detection result to obtain target traffic signal control information; and controlling a traffic signal device related to the preset traffic intersection to emit a traffic signal according to the target traffic signal control information; wherein the traffic anomaly detection result is obtained according to any one of claims 1 to 9.
11. A traffic anomaly detection device, comprising: a first object detection result obtaining module configured to detect a first image in a first image set to obtain a first object detection result, wherein the first image set is related to a preset traffic intersection, the first image set comprises at least one target first image, the target first image has at least one initial traffic bounding box, the initial traffic bounding box is determined by a road surface mark detection result detected from the target first image, and the first object detection result represents an object size of an object in the first image; a target traffic bounding box obtaining module configured to update a size of the initial traffic bounding box according to the object size represented by the first object detection result to obtain a target traffic bounding box; and The traffic anomaly detection result obtaining module is configured to perform traffic anomaly detection on the preset traffic intersection according to the target traffic detection frame to obtain a traffic anomaly detection result.
12. The apparatus of claim 11, wherein, The first object detection result includes a plurality of; The target traffic detection frame obtaining module includes: The first intermediate detection result obtaining submodule is configured to determine a first-level intermediate detection result from the plurality of first object detection results, where a distance between the first-level intermediate detection result and the initial traffic detection frame is less than or equal to a first preset distance threshold. The first target traffic detection frame obtaining submodule is configured to update the initial traffic detection frame according to a first-level object size of an object corresponding to the first-level intermediate detection result to obtain the target traffic detection frame.
13. The apparatus of claim 11, wherein, The first object detection result includes a plurality of; The target traffic detection frame obtaining module includes: The second intermediate detection result obtaining submodule is configured to determine an nth-level intermediate detection result from the plurality of first object detection results, where a distance between the nth-level intermediate detection result and an (n-1)th-level intermediate traffic detection frame is less than or equal to an nth preset distance threshold. The intermediate traffic detection frame obtaining submodule is configured to update the (n-1)th-level intermediate traffic detection frame according to an nth-level object size of an object corresponding to the nth-level intermediate detection result to obtain an nth-level intermediate traffic detection frame. The second target traffic detection frame obtaining submodule is configured to determine the target traffic detection frame according to the Nth-level intermediate traffic detection frame when n=N, where N≥n>1, and N and n are integers. The first-level intermediate traffic detection frame is obtained by updating the initial traffic detection frame according to the first-level object size.
14. The apparatus of claim 11, further comprising: An image acquisition module is configured to acquire images of the preset traffic intersection by using an image acquisition device arranged at a preset detection position to obtain a second image set containing a second image, where a second image acquisition time of the second image is later than a first image acquisition time of a first image in the first image set. A first updating module is configured to update the first image set according to the second image to obtain a new first image set. The camera parameters of the image acquisition device are obtained by calibrating the image acquisition device based on the preset detection position.
15. The apparatus of claim 14, wherein, The traffic anomaly detection result obtaining module includes: A second object detection result obtaining submodule is configured to detect a second image in the second image set to obtain a second object detection result. A candidate stationary object detection result obtaining submodule is configured to determine a candidate stationary object detection result from the second object detection result, where the candidate stationary object detection result at least partially overlaps with the target traffic detection frame. A traffic anomaly detection result obtaining submodule is configured to determine the traffic anomaly detection result according to the candidate stationary object detection result.
16. The apparatus of claim 15, wherein, The traffic anomaly detection result obtaining submodule includes: The candidate stay time obtaining unit is configured to determine a candidate stay time corresponding to the candidate stay object detection result according to an association relationship between the candidate stay object detection result and the second image capturing time. The stay frequency obtaining unit is configured to determine a stay frequency of an object related to the candidate stay object detection result in a preset stay time period according to the candidate stay time; and The traffic anomaly detection result obtaining unit is configured to determine the traffic anomaly detection result according to the stay frequency.
17. The apparatus of claim 15, wherein, The target traffic detection frame contains a lane detection region, and the lane detection region is associated with a lane mark; The candidate stay object detection result obtaining sub-module includes: The stay lane mark obtaining unit is configured to determine a stay lane mark related to the second object detection result according to a positional relationship between the second object detection result and the lane detection region; and The candidate stay object detection result obtaining unit is configured to label the second object detection result according to the stay lane mark related to each of the second object detection results to obtain the candidate stay object detection result.
18. The apparatus of claim 11, further comprising: The road mark detection result obtaining module is configured to perform road mark detection on the target first image to obtain a road mark detection result, the road mark detection result representing a road mark related to a target traffic path, and the target traffic path being related to the preset traffic intersection; and The initial traffic detection frame obtaining module is configured to determine the initial traffic detection frame according to the road mark detection result.
19. The apparatus of claim 18, wherein, The road mark includes at least one of the following: A pedestrian traffic path mark, an object turning waiting area mark, and a traffic direction indication mark.
20. A traffic signal control apparatus, comprising: The target traffic signal control information obtaining module is configured to update traffic signal control information related to a preset traffic intersection according to a traffic anomaly detection result to obtain target traffic signal control information; and The control module is configured to control a traffic signal device related to the preset traffic intersection to emit a traffic signal according to the target traffic signal control information. The traffic anomaly detection result is obtained according to the method in any one of claims 1 to 9.
21. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method in any one of claims 1 to 10. The computer instructions are used to enable the computer to execute the method in any one of claims 1 to 10.
23. A computer program product comprising a computer program which, when executed by a processor, implements the method in any one of claims 1 to 10.
22. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein,
Citation Information
Patent Citations
Congestion detection method and device
CN112163471A