Bidirectional traffic flow recognition method and device based on target detection and tracking algorithm

By analyzing vehicle object information through target detection and tracking algorithm models, the problem of inability to accurately identify two-way traffic flow in existing technologies is solved, and real-time, accurate and efficient identification of traffic flow is achieved.

CN119445832BActive Publication Date: 2025-10-03GUANGZHOU DESAY SV INTELLIGENT TRANSPORTATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411392269.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-10-03
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

Existing one-way traffic flow identification methods cannot accurately reflect the two-way traffic conditions on the road. The LSTM-based method is sensitive to noise and relies on a large amount of training data, while the millimeter-wave radar-based method has low vehicle identification accuracy and efficiency.

Method used

A two-way traffic flow recognition method based on target detection and tracking algorithm is adopted. The vehicle object information is analyzed through the target detection model, and the vehicle's traffic status is determined using the tracking algorithm model. The traffic flow results are calculated in combination with the traffic data set.

Benefits of technology

The accuracy and efficiency of two-way traffic flow identification are improved, and real-time and low-cost detection of traffic flow is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445832B_ABST
    Figure CN119445832B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of vehicle flow detection technology, and discloses a two-way vehicle flow identification method and device based on target detection and tracking algorithms, the method comprising: including one or more target vehicle objects in a current road section image; inputting the current road section image into a target detection model for analysis to obtain object information of the target vehicle object, inputting the object information into a tracking algorithm model for analysis to obtain a tracking sequence number of the target vehicle object; determining the traffic status result of each target vehicle object based on the object information and tracking sequence number of each target vehicle object and a traffic data set; determining the traffic flow result based on the traffic status result of the identified vehicle objects in the traffic data set, and all identified vehicle objects include the target vehicle object. It can be seen that the present invention can improve the accuracy and reliability of the determined traffic flow result, the determination efficiency and the determination convenience, thereby improving the accuracy, efficiency and timeliness of traffic flow identification of the target road section.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle flow detection, and in particular to a method and device for identifying bidirectional vehicle flow based on a target detection and tracking algorithm. Background Art

[0002] With the acceleration of urbanization and the continuous improvement of transportation infrastructure, road traffic volume has increased dramatically, which has put forward higher requirements for traffic management and planning. Among them, vehicle flow identification, as an important link in traffic management, plays an important role in alleviating traffic congestion, optimizing the allocation of road resources and ensuring traffic safety.

[0003] Currently, most methods for identifying road traffic flow provide one-way traffic flow data, which cannot accurately reflect the two-way traffic conditions. Furthermore, existing methods for determining one-way traffic flow data generally use traffic flow prediction methods based on long short-term memory networks (LSTMs) or traffic flow detection methods based on millimeter-wave radar. The LSTM-based traffic flow prediction method captures the temporal dependencies in traffic flow data to predict traffic flow, but is sensitive to noise and outliers, making traffic flow data annotation difficult and requiring a large amount of training data, making it impossible to achieve real-time traffic flow detection. Millimeter-wave radar-based traffic flow detection methods, on the other hand, use millimeter-wave radar to detect vehicle speed and other information to detect traffic flow. However, millimeter-wave radar has high reflectivity requirements for target objects, resulting in low vehicle recognition accuracy and efficiency. Therefore, it is particularly important to provide a new two-way traffic flow identification method to improve the accuracy and efficiency of two-way traffic flow recognition. Summary of the Invention

[0004] The present invention provides a two-way traffic flow recognition method and device based on target detection and tracking algorithm, which can improve the recognition accuracy and recognition efficiency of two-way traffic flow.

[0005] In order to solve the above technical problems, the first aspect of the present invention discloses a method for identifying bidirectional traffic flow based on a target detection and tracking algorithm, the method comprising:

[0006] Determining a current road section image of a target road section for which traffic flow identification is required, wherein the current road section image includes one or more target vehicle objects;

[0007] Inputting the current road section image into a converged target detection model for analysis to obtain object information of each target vehicle object, and inputting the object information of each target vehicle object into a converged tracking algorithm model for analysis to obtain a tracking sequence number of each target vehicle object;

[0008] Determine the traffic status result of each target vehicle object according to the object information and tracking sequence number of each target vehicle object and the determined traffic data set corresponding to the target road section;

[0009] The traffic flow result of the target road section within the target time is determined according to the traffic status result of each identified vehicle object in the traffic data set, and all the identified vehicle objects include the target vehicle object.

[0010] As an optional implementation manner, in the first aspect of the present invention, the object information of the target vehicle object at least includes positioning frame coordinate information, confidence information and object category information of the target vehicle object;

[0011] Furthermore, determining the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the determined traffic data set corresponding to the target road section includes:

[0012] Determining a tracking number of each identified vehicle object in the traffic data set according to the determined traffic data set corresponding to the target road segment;

[0013] For each target vehicle object, determining whether the target vehicle object meets a preset identification condition based on the tracking numbers of all the identified vehicle objects and the tracking number of the target vehicle object;

[0014] When it is determined that the target vehicle object meets the identified conditions, the traffic status result of the target vehicle object is determined based on the current center point coordinate information and the previous center point coordinate information corresponding to the determined target vehicle object and the preset traffic flow baseline coordinate information;

[0015] When it is determined that the target vehicle object does not meet the identified conditions, the corresponding element addition and data update operations are performed on the traffic data set based on the positioning frame information, object category information and tracking number corresponding to the target vehicle object, and the set basic traffic status result, and the traffic status result of the target vehicle object is determined.

[0016] As an optional embodiment, in the first aspect of the present invention, determining the traffic status result of the target vehicle object based on the determined current center point coordinate information and previous center point coordinate information corresponding to the target vehicle object and the preset traffic flow baseline coordinate information includes:

[0017] Determining a first ordinate value based on the determined current center point coordinate information corresponding to the target vehicle object, determining a second ordinate value based on the previous center point coordinate information corresponding to the target vehicle object, and determining a reference ordinate value based on preset vehicle flow reference line coordinate information;

[0018] Determining a traffic state type of the target vehicle object according to the first ordinate value, the second ordinate value, and the reference ordinate value; the traffic state type includes one of an upward state type, a downward state type, and other state types;

[0019] Determine the traffic status result of the target vehicle object according to the traffic status type;

[0020] And, determining the traffic state type of the target vehicle object according to the first ordinate value, the second ordinate value, and the reference ordinate value includes:

[0021] When the first ordinate value is greater than the second ordinate value and the first ordinate value is greater than the reference ordinate value, determining that the traffic state type of the target vehicle object is a down state type;

[0022] When the first ordinate value is smaller than the second ordinate value and the first ordinate value is smaller than the reference ordinate value, it is determined that the traffic state type of the target vehicle object is an upward state type.

[0023] As an optional embodiment, in the first aspect of the present invention, determining the traffic flow result of the target road section within the target time based on the traffic status result of each identified vehicle object in the traffic data set includes:

[0024] When the traffic flow identification requirement type of the target road section is a two-way traffic flow identification type, a first target object that meets a preset traffic state matching condition is determined from all the identified vehicle objects based on the determined target traffic state information requiring two-way traffic flow identification and the traffic state result of each identified vehicle object in the traffic data set; the number of first vehicles corresponding to all the first target objects is calculated; and the traffic flow result of the target road section within a target time is determined based on the first vehicle number;

[0025] When the traffic flow identification requirement type of the target road section is an exclusive category traffic flow identification type, based on the target vehicle category that needs to be targeted for traffic flow identification and the object category information of each identified vehicle object in the traffic data set, a second target object that meets the preset vehicle category matching conditions is determined from all the identified vehicle objects; the number of second vehicles corresponding to all the second target objects is calculated; and based on the second number of vehicles, the traffic flow result of the target road section within the target time is determined.

[0026] As an optional embodiment, in the first aspect of the present invention, before determining the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the determined traffic data set corresponding to the target road section, the method further includes:

[0027] Determining, based on the current road section image, whether the target road section meets a preset data set establishment condition;

[0028] When it is determined that the target road section meets the data set establishment conditions, a traffic data set is established; and corresponding element addition and data update operations are performed on the traffic data set according to the object information and tracking sequence number of each target vehicle object and the set basic traffic status result;

[0029] When it is determined that the target road section does not meet the data set establishment conditions, the operation of determining the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the traffic data set corresponding to the target road section is performed.

[0030] As an optional implementation manner, in the first aspect of the present invention, determining whether the target road section meets a preset data set establishment condition based on the current road section image includes:

[0031] Determining whether the current road section image meets a preset first-frame tracking image condition based on the historical tracking image information of the target road section;

[0032] When it is determined that the current road section image meets the first frame tracking image condition, determining that the target road section meets the preset data set establishment condition;

[0033] When it is determined that the current road section image does not meet the first frame tracking image condition, determining that the target road section does not meet the preset data set establishment condition;

[0034] Furthermore, the corresponding element addition and data update operations are performed on the traffic data set according to the object information and tracking sequence number of each target vehicle object and the set basic traffic status result, including:

[0035] Determining the center point coordinate information of each target vehicle object according to the positioning frame coordinate information included in the object information of each target vehicle object;

[0036] According to the center point coordinate information, tracking sequence number, object category information included in the object information, and the set basic traffic status result corresponding to each target vehicle object, corresponding element addition and data update operations are performed on the traffic data set.

[0037] As an optional embodiment, in the first aspect of the present invention, before determining the traffic status result of the target vehicle object based on the determined current center point coordinate information and previous center point coordinate information corresponding to the target vehicle object and the preset traffic flow baseline coordinate information, the method further includes:

[0038] Determining the current center point coordinate information of the target vehicle object according to the positioning frame coordinate information of the target vehicle object, and determining the previous center point coordinate information of the target vehicle object according to the traffic data set;

[0039] Furthermore, after determining the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the determined traffic data set corresponding to the target road section, the method further includes:

[0040] According to the determined current center point coordinate information, tracking sequence number, traffic status result and object category information included in the object information corresponding to each target vehicle object, a corresponding data update operation is performed on the traffic data set.

[0041] A second aspect of the present invention discloses a bidirectional traffic flow identification device based on a target detection and tracking algorithm, the device comprising:

[0042] An image determination module is used to determine a current road section image of a target road section for which traffic flow identification is required, wherein the current road section image includes one or more target vehicle objects;

[0043] a vehicle tracking module, configured to input the current road section image into a converged target detection model for analysis to obtain object information of each target vehicle object, and input the object information of each target vehicle object into a converged tracking algorithm model for analysis to obtain a tracking sequence number of each target vehicle object;

[0044] a state determination module, configured to determine a traffic state result of each target vehicle object based on the object information and tracking sequence number of each target vehicle object and the determined traffic data set corresponding to the target road section;

[0045] The vehicle flow determination module is used to determine the vehicle flow result of the target road section within the target time based on the traffic status result of each identified vehicle object in the traffic data set, and all the identified vehicle objects include the target vehicle object.

[0046] As an optional implementation, in the second aspect of the present invention, the object information of the target vehicle object includes at least positioning frame coordinate information, confidence information and object category information of the target vehicle object;

[0047] Furthermore, the state determination module determines the traffic state result of each target vehicle object according to the object information and tracking number of each target vehicle object and the determined traffic data set corresponding to the target road section, specifically including:

[0048] Determining a tracking number of each identified vehicle object in the traffic data set according to the determined traffic data set corresponding to the target road segment;

[0049] For each target vehicle object, determining whether the target vehicle object meets a preset identification condition based on the tracking numbers of all the identified vehicle objects and the tracking number of the target vehicle object;

[0050] When it is determined that the target vehicle object meets the identified conditions, the traffic status result of the target vehicle object is determined based on the current center point coordinate information and the previous center point coordinate information corresponding to the determined target vehicle object and the preset traffic flow baseline coordinate information;

[0051] When it is determined that the target vehicle object does not meet the identified conditions, the corresponding element addition and data update operations are performed on the traffic data set based on the positioning frame information, object category information and tracking number corresponding to the target vehicle object, and the set basic traffic status result, and the traffic status result of the target vehicle object is determined.

[0052] As an optional embodiment, in the second aspect of the present invention, the state determination module determines the traffic state result of the target vehicle object based on the current center point coordinate information and the previous center point coordinate information corresponding to the target vehicle object and the preset traffic flow baseline coordinate information, specifically including:

[0053] Determining a first ordinate value based on the determined current center point coordinate information corresponding to the target vehicle object, determining a second ordinate value based on the previous center point coordinate information corresponding to the target vehicle object, and determining a reference ordinate value based on preset vehicle flow reference line coordinate information;

[0054] Determining a traffic state type of the target vehicle object according to the first ordinate value, the second ordinate value, and the reference ordinate value; the traffic state type includes one of an upward state type, a downward state type, and other state types;

[0055] Determine the traffic status result of the target vehicle object according to the traffic status type;

[0056] Furthermore, the state determination module determines the traffic state type of the target vehicle object according to the first ordinate value, the second ordinate value, and the reference ordinate value in a manner that specifically includes:

[0057] When the first ordinate value is greater than the second ordinate value and the first ordinate value is greater than the reference ordinate value, determining that the traffic state type of the target vehicle object is a down state type;

[0058] When the first ordinate value is smaller than the second ordinate value and the first ordinate value is smaller than the reference ordinate value, it is determined that the traffic state type of the target vehicle object is an upward state type.

[0059] As an optional embodiment, in the second aspect of the present invention, the vehicle flow determination module determines the vehicle flow result of the target road section within the target time based on the traffic status result of each identified vehicle object in the traffic data set, specifically including:

[0060] When the traffic flow identification requirement type of the target road section is a two-way traffic flow identification type, a first target object that meets a preset traffic state matching condition is determined from all the identified vehicle objects based on the determined target traffic state information requiring two-way traffic flow identification and the traffic state result of each identified vehicle object in the traffic data set; the number of first vehicles corresponding to all the first target objects is calculated; and the traffic flow result of the target road section within a target time is determined based on the first vehicle number;

[0061] When the traffic flow identification requirement type of the target road section is an exclusive category traffic flow identification type, based on the target vehicle category that needs to be targeted for traffic flow identification and the object category information of each identified vehicle object in the traffic data set, a second target object that meets the preset vehicle category matching conditions is determined from all the identified vehicle objects; the number of second vehicles corresponding to all the second target objects is calculated; and based on the second number of vehicles, the traffic flow result of the target road section within the target time is determined.

[0062] As an optional embodiment, in the second aspect of the present invention, the device further includes:

[0063] a judgment module configured to judge, based on the current road section image, whether the target road section satisfies a preset data set establishment condition before the state determination module determines the traffic state result of each target vehicle object based on the object information and tracking number of each target vehicle object and the traffic data set corresponding to the target road section; when it is determined that the target road section does not satisfy the data set establishment condition, the state determination module performs the operation of determining the traffic state result of each target vehicle object based on the object information and tracking number of each target vehicle object and the traffic data set corresponding to the target road section;

[0064] a set establishing module, configured to establish a traffic data set when the judging module determines that the target road section meets the data set establishing condition;

[0065] The first set data updating module is used to perform corresponding element addition and data updating operations on the traffic data set according to the object information and tracking sequence number of each target vehicle object and the set basic traffic status result.

[0066] As an optional implementation, in the second aspect of the present invention, the judgment module judges whether the target road section meets the preset data set establishment conditions based on the current road section image in a manner specifically including:

[0067] Determining whether the current road section image meets a preset first-frame tracking image condition based on the historical tracking image information of the target road section;

[0068] When it is determined that the current road section image meets the first frame tracking image condition, determining that the target road section meets the preset data set establishment condition;

[0069] When it is determined that the current road section image does not meet the first frame tracking image condition, determining that the target road section does not meet the preset data set establishment condition;

[0070] Furthermore, the first set data update module performs corresponding element addition and data update operations on the traffic data set according to the object information and tracking sequence number of each target vehicle object and the set basic traffic status result, specifically including:

[0071] Determining the center point coordinate information of each target vehicle object according to the positioning frame coordinate information included in the object information of each target vehicle object;

[0072] According to the center point coordinate information, tracking sequence number, object category information included in the object information, and the set basic traffic status result corresponding to each target vehicle object, corresponding element addition and data update operations are performed on the traffic data set.

[0073] As an optional embodiment, in the second aspect of the present invention, the device further includes:

[0074] a coordinate determination module for determining the current center point coordinate information of the target vehicle object based on the positioning frame coordinate information of the target vehicle object, and determining the previous center point coordinate information of the target vehicle object based on the traffic data set, before the state determination module determines the traffic state result of the target vehicle object based on the current center point coordinate information and the previous center point coordinate information corresponding to the target vehicle object determined and the preset traffic flow baseline coordinate information;

[0075] The second set data update module is used to perform corresponding data update operations on the traffic data set after the state determination module determines the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the traffic data set corresponding to the determined target road section.

[0076] The third aspect of the present invention discloses another bidirectional traffic flow identification device based on a target detection and tracking algorithm, the device comprising:

[0077] a memory storing executable program code;

[0078] a processor coupled to the memory;

[0079] The processor calls the executable program code stored in the memory to execute the two-way vehicle flow recognition method based on target detection and tracking algorithm disclosed in the first aspect of the present invention.

[0080] The fourth aspect of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the two-way vehicle flow identification method based on target detection and tracking algorithm disclosed in the first aspect of the present invention.

[0081] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0082] In an embodiment of the present invention, a current road section image of a target road section requiring traffic flow identification is determined, the current road section image including one or more target vehicle objects; the current road section image is input into a converged target detection model for analysis to obtain object information of each target vehicle object, and the object information of each target vehicle object is input into a converged tracking algorithm model for analysis to obtain a tracking number of each target vehicle object; based on the object information and tracking number of each target vehicle object and the determined traffic data set corresponding to the target road section, a traffic status result of each target vehicle object is determined; based on the traffic status result of each identified vehicle object in the traffic data set, a traffic flow result of the target road section within the target time is determined, and all the identified vehicle objects include the target vehicle object. It can be seen that the present invention can obtain the object information and tracking number of the target vehicle object through the target detection model and the tracking algorithm model, determine the traffic status result of the target vehicle object according to the object information and the tracking number, and then determine the traffic flow result of the target section within the target time, which is conducive to improving the comprehensiveness and rationality of the two-way traffic flow identification method, and thus is conducive to improving the accuracy and reliability of the determined traffic flow results, and is also conducive to improving the determination efficiency and convenience of the traffic flow results, thereby helping to improve the traffic flow identification accuracy, recognition efficiency and recognition timeliness of the target section, and further helping to realize real-time and low-cost detection of traffic flow on the section. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0084] Figure 1 This is a flow chart of a method for identifying bidirectional traffic flow based on a target detection and tracking algorithm disclosed in an embodiment of the present invention;

[0085] Figure 2 This is a flow chart of another method for identifying bidirectional traffic flow based on a target detection and tracking algorithm disclosed in an embodiment of the present invention;

[0086] Figure 3 This is a schematic structural diagram of a two-way vehicle flow recognition device based on a target detection and tracking algorithm disclosed in an embodiment of the present invention;

[0087] Figure 4 2 is a schematic structural diagram of another bidirectional vehicle flow recognition device based on target detection and tracking algorithm disclosed in an embodiment of the present invention;

[0088] Figure 5 This is a schematic structural diagram of another bidirectional vehicle flow recognition device based on target detection and tracking algorithm disclosed in an embodiment of the present invention;

[0089] Figure 6 1 is a schematic diagram of a scenario of a two-way traffic flow recognition method based on a target detection and tracking algorithm disclosed in an embodiment of the present invention;

[0090] Figure 7 This is a flow chart of another method for identifying bidirectional traffic flow based on target detection and tracking algorithms disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0091] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0092] The terms "first," "second," and so on, in the description and claims of the present invention and the accompanying drawings are used to distinguish between different items, not to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or end comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed therein, or may optionally include other steps or elements inherent to such process, method, product, or end.

[0093] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0094] The present invention discloses a two-way traffic flow identification method and device based on target detection and tracking algorithms. The method can obtain the object information and tracking sequence number of the target vehicle object through the target detection model and tracking algorithm model, determine the traffic status result of the target vehicle object based on the object information and tracking sequence number, and then determine the traffic flow result of the target road section within the target time. This method is conducive to improving the comprehensiveness and rationality of the two-way traffic flow identification method, thereby improving the accuracy and reliability of the determined traffic flow results, and also helping to improve the efficiency and convenience of determining the traffic flow results, thereby helping to improve the accuracy, efficiency and timeliness of traffic flow identification on the target road section, and further helping to achieve real-time and low-cost detection of traffic flow on the road section. Detailed descriptions are given below.

[0095] Example 1

[0096] See also Figure 1 , Figure 1 This is a flow chart of a two-way traffic flow identification method based on target detection and tracking algorithm disclosed in an embodiment of the present invention. Figure 1 The described method can be applied to a bidirectional vehicle flow identification device, wherein the device may include a server, wherein the server includes a local server or a cloud server, which is not limited in the embodiment of the present invention. Figure 1 As shown in FIG, the two-way traffic flow recognition method based on target detection and tracking algorithm includes the following operations:

[0097] 101. Determine a current road section image of a target road section requiring traffic flow recognition, wherein the current road section image includes one or more target vehicle objects.

[0098] Optionally, the preliminary preparation of this solution may include but is not limited to training a target detection model based on the yolov5 target detection algorithm, where the detection objects are common motor vehicles on the road, such as cars, trucks, tankers, trailers, etc.; based on on-site debugging of the camera, setting the traffic flow baseline flow_line of the image, and recording the vertical coordinate of the traffic flow baseline as flow_line_y, such as Figure 1 As shown; further, the position setting of the vehicle baseline can avoid obstructions as much as possible, such as traffic lights, telephone poles, green belts, etc., which are not limited in the embodiments of the present invention.

[0099] Optionally, the object type of the target vehicle object may include but is not limited to one or more of a car type, a truck type, a tanker type, a trailer type, a non-motor vehicle type and other motor vehicle types, and is not limited in this embodiment of the present invention.

[0100] Optionally, the target vehicle object may include one or more vehicles, which is not limited in this embodiment of the present invention.

[0101] 102. Input the current road section image into the converged target detection model for analysis to obtain object information of each target vehicle object. The object information of the target vehicle object at least includes positioning frame coordinate information, confidence information and object category information of the target vehicle object.

[0102] Optionally, the current road section image is input into the converged target detection model for analysis to obtain the object information of each target vehicle object. For example: the target detection model is used to perform inference detection on each target vehicle object in the current road section image to obtain the positioning frame coordinate information, confidence information and object category information of the target vehicle object. This is not limited in the embodiment of the present invention.

[0103] Optionally, the target vehicle object may be understood as a motor vehicle object or a pedestrian object in the current road section image, etc., which is not limited in the embodiment of the present invention.

[0104] Optionally, the target detection model may be determined by first starting a target detection algorithm and then calling the target detection model through the target detection algorithm, which is not limited in the embodiment of the present invention.

[0105] Optionally, the coordinate information of the positioning frame of the target vehicle object may include but is not limited to the coordinates of the upper left vertex of the positioning frame of the target vehicle object (x l ,y l ) and the coordinates of the lower right vertex (x r ,y r ), which is not limited in the embodiments of the present invention.

[0106] Optionally, the object category information of the target vehicle object can be understood as the target category class_id of the target vehicle object, which is not limited in this embodiment of the present invention.

[0107] Optionally, the target detection model may be a yolov5 model or other models capable of realizing the target vehicle object detection function, which is not limited in the embodiment of the present invention.

[0108] Optional object category information, for example: large motor vehicles, small motor vehicles, non-motor vehicles, pedestrians, etc., is not limited in the embodiment of the present invention.

[0109] 103. Input the object information of each target vehicle object into the converged tracking algorithm model for analysis to obtain the tracking sequence number of each target vehicle object.

[0110] Optionally, the object information of each target vehicle object is input into the convergent tracking algorithm model for analysis to obtain the tracking number of each target vehicle object. For example: for each target vehicle object, the positioning frame coordinate information, confidence information and object category information of the target vehicle object are input into the convergent tracking algorithm model for analysis to obtain the tracking number of each target vehicle object. This embodiment of the present invention is not limited to this.

[0111] Further optionally, the tracking number of the target vehicle object can be understood as the tracking number track_id of the target vehicle object, which is not limited in this embodiment of the present invention.

[0112] Optionally, for the tracking number of the target vehicle object, an example is given: the tracking algorithm model will record the information of all target vehicle objects detected in the previous image (such as the positioning frame coordinate information, confidence information, object category information and tracking number assigned to each target vehicle object of the target vehicle object), and use the target vehicle object information detected in the current image to match the target vehicle object information detected in the previous image. The tracking number of the target vehicle object that can be matched remains unchanged; for example, the current image detects a car A through the target detection algorithm, and it is also detected in the previous image matched through the tracking algorithm model, and the "tracking number" is 0, then the "tracking number" of the car A detected in the current image is 0, and this is not limited in the embodiments of the present invention.

[0113] Optionally, the tracking algorithm model may be a tracking algorithm API interface of ByteTrack, or other models capable of implementing the vehicle object tracking function, which is not limited in the embodiment of the present invention.

[0114] 104. Determine the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the traffic data set corresponding to the determined target road section.

[0115] Optionally, the traffic data set can be understood as a VehicleTrafficInfo queue; further, the traffic data set is used to record the traffic data of each detected vehicle object, such as the tracking number, object category, vehicle center point coordinates, vehicle traffic status results, etc. of a certain vehicle object, which is not limited in the embodiment of the present invention.

[0116] Optionally, the traffic status result can be represented by state=1, state=2, state=0, etc.; further, when the target vehicle object passes through the vehicle baseline and is in the downlink direction, its traffic status result is determined to be state=1, when the target vehicle object passes through the vehicle baseline and is in the uplink direction, its traffic status result is determined to be state=2, and when the target vehicle object is in other situations, its traffic status result is determined to be state=0, which is not limited in the embodiment of the present invention.

[0117] 105. Determine the traffic flow result of the target road section within the target time based on the traffic status result of each identified vehicle object in the traffic data set, and all identified vehicle objects include the target vehicle object.

[0118] Further optionally, after determining the traffic flow result of the target road section within the target time, a data clearing operation may be performed on the traffic data set, which is not limited in the embodiment of the present invention.

[0119] Optionally, the detection results of the current frame and the previous frame image are matched through a tracking algorithm model. If the target matching is successful, the tracking number remains unchanged, that is, within the same target time, a target vehicle object corresponds to an exclusive tracking number, which is not limited in the embodiment of the present invention.

[0120] Optionally, the above method determines the traffic flow results of the target road section within the target time based on the traffic status results of each identified vehicle object in the traffic data set. For example: the traffic status results of each element in the traffic data set (each element corresponds to a vehicle object) are judged to count the up and down traffic flows of all categories of motor vehicles within a unit time (such as 1 minute, etc.). The traffic flow of a single category of motor vehicles can also be counted according to the object category, which is not limited in the embodiments of the present invention.

[0121] Optionally, all identified vehicle objects in the traffic data set may include but are not limited to all target vehicle objects, which is not limited in this embodiment of the present invention.

[0122] Optionally, the difference between the identified vehicle object in the traffic data set and the target vehicle object in the aforementioned step can be understood as follows: when the tracking number of the target vehicle object does not exist in the traffic data set, a traffic data element representing the target vehicle object is added to the traffic data set and the object information and traffic status result of the target vehicle object are recorded based on the traffic data element. At this time, the target vehicle object is determined to be the identified vehicle object in the traffic data set; that is, when the tracking number of the target vehicle object does not exist in the traffic data set, it is determined that the identified vehicle objects in the traffic data set do not include the target vehicle object; when the tracking number of the target vehicle object exists in the traffic data set, it is determined that the identified vehicle objects in the traffic data set include the target vehicle object. This embodiment of the present invention does not limit this.

[0123] Optional, such as Figure 7 As shown, the vehicle flow statistics method of this solution can be specifically as follows: preliminary preparation, which can specifically include training the target detection model, on-site debugging of the camera, setting the vehicle flow baseline, etc.; further, collecting the current section image of the target section; further, inputting the current section image into the target detection model for analysis to obtain the object information of the target vehicle object, and the object information can specifically include the information on the left side of the positioning box, confidence information and object category information; further, inputting the object information of the target vehicle object into the tracking algorithm model for analysis to obtain the tracking sequence number of the target vehicle object; further, judging whether the current section image is the first frame input to the model image, if it is the first frame, then according to The tracking result information constructs a traffic data set, and subsequent operations are performed based on the constructed traffic data set; if it is not the first frame, the uplink and downlink status of the target vehicle object are determined through the current tracking result corresponding to the current road section image and the determined traffic data set, and the traffic data set is updated. The tracking result information may include object information and tracking sequence number; further, it is determined whether the current moment has reached the preset traffic flow identification and statistical time. If the traffic flow identification and statistical time has been reached, the motor vehicle traffic flow results of the target road section within unit time are counted; if the traffic flow identification and statistical time has not been reached, the road section image collection and identification of the target road section continue, which is not limited in the embodiment of the present invention.

[0124] It can be seen that the two-way traffic flow identification method based on target detection and tracking algorithm described in the embodiment of the present invention can obtain the object information and tracking number of the target vehicle object through the target detection model and tracking algorithm model, determine its traffic status result according to the object information and tracking number of the target vehicle object, and then determine the traffic flow result of the target section within the target time, which is conducive to improving the comprehensiveness and rationality of the two-way traffic flow identification method, and thus is conducive to improving the accuracy and reliability of the determined traffic flow results, and is also conducive to improving the determination efficiency and convenience of the traffic flow results, thereby helping to improve the accuracy, efficiency and timeliness of traffic flow identification of the target section, and further helping to realize real-time and low-cost detection of traffic flow on the section.

[0125] In an optional embodiment, the above-mentioned determination of the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the determined traffic data set corresponding to the target road section may include:

[0126] Determining a tracking sequence number for each identified vehicle object in the traffic data set based on the determined traffic data set corresponding to the target road segment;

[0127] For each target vehicle object, determining whether the target vehicle object meets a preset identification condition based on the tracking serial numbers of all identified vehicle objects and the tracking serial number of the target vehicle object;

[0128] When it is determined that the target vehicle object meets the recognition conditions, the traffic status result of the target vehicle object is determined based on the current center point coordinate information and the previous center point coordinate information corresponding to the determined target vehicle object and the preset traffic flow baseline coordinate information;

[0129] When it is determined that the target vehicle object does not meet the identification conditions, the corresponding element addition and data update operations are performed on the traffic data set based on the positioning frame information, object category information and tracking number corresponding to the target vehicle object, and the set basic traffic status result, and the traffic status result of the target vehicle object is determined.

[0130] Optionally, the above-mentioned determination of the traffic status result of the target vehicle object can refer to but is not limited to the above-mentioned specific operation steps for determining the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the traffic data set corresponding to the determined target road section, and the embodiment of the present invention does not limit this.

[0131] Further optionally, the above-mentioned determination of whether the target vehicle object meets the preset identification condition based on the tracking numbers of all identified vehicle objects and the tracking number of the target vehicle object may include:

[0132] Determining whether the tracking serial numbers of all identified vehicle objects include the tracking serial number of the target vehicle object;

[0133] When it is determined that the tracking serial numbers of all identified vehicle objects include the tracking serial number of the target vehicle object, determining that the target vehicle object meets the preset identification condition;

[0134] When it is determined that the tracking serial numbers of all identified vehicle objects do not include the tracking serial number of the target vehicle object, it is determined that the target vehicle object does not meet the preset identification condition.

[0135] Optionally, the current center point coordinate information and the previous center point coordinate information corresponding to the target vehicle object can be understood as: the current center point coordinate information is the center point coordinate information of the target vehicle object obtained through the currently input road section image (current frame); the previous center point coordinate information is the center point coordinate information of the target vehicle object obtained through the last input road section image (previous frame), which is not limited in the embodiment of the present invention.

[0136] Further optionally, the above-mentioned method judges whether the target vehicle object meets the preset identification condition based on the tracking numbers of all identified vehicle objects and the tracking number of the target vehicle object. For example: the current tracking result information and the traffic data set corresponding to the previous frame of the road section image are used to judge whether the tracking number of the target vehicle object (current) is consistent with the tracking number in the traffic data set (previous frame). If they are consistent, it is determined that the target vehicle object meets the identification condition; if they are inconsistent, it is determined that the target vehicle object does not meet the identification condition. This embodiment of the present invention does not limit this.

[0137] Optionally, the above-mentioned element addition and data update operations are performed on the traffic data set according to the positioning frame information, object category information and tracking number, and the set basic traffic status result corresponding to the target vehicle object. For example: a new exclusive traffic data element for the target vehicle object is added to the traffic data set to record the center point coordinate information, object category information and tracking number, and traffic status result information of the target vehicle object. Further, the center point coordinate information is determined by the positioning frame coordinate information; further, a new exclusive traffic data element for the target vehicle object is added. For example: whenever a new target vehicle object appears, a VehicleTrafficInfo variable is added to the traffic data set, and an element is added to the traffic data set to represent the target vehicle object. This is not limited in the embodiment of the present invention.

[0138] Optionally, the set basic traffic state result can be understood as the traffic state result defaulting to state=0, which is used to indicate that it has not yet been determined whether the target vehicle object is going up or down, and the embodiment of the present invention does not limit this.

[0139] It can be seen that this optional embodiment can match the corresponding traffic status result determination operations according to the results of the identified conditions of the target vehicle object, which is conducive to improving the comprehensiveness, integrity and rationality of the traffic status result determination method, and thus is conducive to improving the diversity and flexibility of the traffic status result determination method, thereby helping to improve the accuracy and reliability of the determined traffic status results, and also helping to improve the execution accuracy and execution rationality of the traffic status determination operation. In addition, it also provides a method for adding elements to the traffic data set and updating data, which is conducive to improving the comprehensiveness and rationality of the method for adding elements to the traffic data set and updating data, and thus is conducive to improving the data update accuracy, timeliness and efficiency of the traffic data set, thereby helping to improve the data accuracy and integrity of the traffic data set, and further helping to improve the accuracy and reliability of the traffic status results and traffic flow results subsequently determined based on the traffic data set.

[0140] In another optional embodiment, the above-mentioned determination of the traffic status result of the target vehicle object based on the current center point coordinate information and the previous center point coordinate information corresponding to the target vehicle object and the preset traffic flow baseline coordinate information may include:

[0141] Determining a first ordinate value based on the determined current center point coordinate information corresponding to the target vehicle object, determining a second ordinate value based on the previous center point coordinate information corresponding to the target vehicle object, and determining a reference ordinate value based on preset vehicle flow reference line coordinate information;

[0142] Determining a traffic state type of the target vehicle object according to the first ordinate value, the second ordinate value, and the reference ordinate value; the traffic state type includes an upward state type, a downward state type, and other state types;

[0143] According to the traffic status type, the traffic status result of the target vehicle object is determined.

[0144] Optionally, the traffic state type includes an upward state type, which can be understood as the target vehicle object passing through the vehicle baseline and being in an upward state, which is not limited in the embodiment of the present invention.

[0145] Optionally, the traffic state type includes a downlink state type, which can be understood as the target vehicle object passing through the vehicle baseline and being in a downlink state, which is not limited in the embodiment of the present invention.

[0146] Further optionally, the above-mentioned determination of the traffic status result of the target vehicle object according to the traffic status type may include:

[0147] When the traffic state type includes an up state type, determining the traffic state result of the target vehicle object is state=2;

[0148] When the traffic state type includes a downlink state type, determining the traffic state result of the target vehicle object is state=1;

[0149] When the traffic state type includes other state types, the traffic state result of the target vehicle object is determined to be state=0.

[0150] Optionally, when it is not determined that the target vehicle object is of the uplink state type or the downlink state type, the default passage state result is state=0, that is, the passage state type is other state types; when it is determined that the target vehicle object is not of the uplink state type and the downlink state type, the passage state result is determined to be state=0, which is not limited in the embodiment of the present invention.

[0151] It can be seen that this optional embodiment can determine the corresponding vertical coordinate value through the current center point coordinate information, the previous center point coordinate information and the vehicle flow baseline coordinate information, and then determine the traffic status type of the target vehicle object, and determine the traffic status result according to the traffic status type, which is conducive to improving the comprehensiveness and rationality of the traffic status result determination method, and thus is conducive to improving the diversity, pertinence and rationality of the determination parameters used to determine the traffic status result, thereby helping to improve the accuracy and reliability of the determined traffic status result.

[0152] In yet another optional embodiment, the determining of the traffic state type of the target vehicle object based on the first ordinate value, the second ordinate value, and the reference ordinate value may include:

[0153] When the first ordinate value is greater than the second ordinate value and the first ordinate value is greater than the reference ordinate value, determining that the traffic state type of the target vehicle object is a down state type;

[0154] When the first ordinate value is smaller than the second ordinate value and the first ordinate value is smaller than the reference ordinate value, it is determined that the traffic state type of the target vehicle object is an upward state type.

[0155] It can be seen that this optional embodiment can determine the traffic status type of the target vehicle object through the size comparison relationship between the first ordinate value and the second ordinate value and the size comparison relationship between the first ordinate value and the reference ordinate value, which is beneficial to improving the comprehensiveness, integrity and rationality of the traffic status type determination method, and thus is beneficial to improving the accuracy and reliability of the determined traffic status type.

[0156] In yet another optional embodiment, the above-mentioned determination of the traffic flow result of the target road section within the target time based on the traffic status result of each identified vehicle object in the traffic data set may include:

[0157] When the traffic flow identification requirement type of the target road section is a two-way traffic flow identification type, based on the target traffic state information for which two-way traffic flow identification is determined and the traffic state result of each identified vehicle object in the traffic data set, a first target object that meets a preset traffic state matching condition is determined from all identified vehicle objects; the number of first vehicles corresponding to all first target objects is calculated; and the traffic flow result of the target road section within the target time is determined based on the first vehicle number;

[0158] When the traffic flow identification requirement type of the target road section is an exclusive category traffic flow identification type, based on the target vehicle category that needs to be targeted for traffic flow identification and the object category information of each identified vehicle object in the traffic data set, a second target object that meets the preset vehicle category matching conditions is determined from all identified vehicle objects; the number of second vehicles corresponding to all second target objects is calculated; and based on the number of second vehicles, the traffic flow result of the target road section within the target time is determined.

[0159] Optionally, the target traffic state information required for bidirectional traffic flow identification can be understood as traffic state results of state=1 and state=2, which is not limited in the embodiment of the present invention.

[0160] Further optionally, the above-mentioned determining the first target object that meets the preset traffic state matching condition from all identified vehicle objects may include:

[0161] A target identified vehicle object with a traffic state result of state=1 or state=2 is determined from all identified vehicle objects as a first target object that meets a preset traffic state matching condition.

[0162] Optionally, the object category information may be represented by class_id=0 for a small car and class_id=1 for a large car, or may be represented in other forms, which is not limited in the embodiment of the present invention.

[0163] Further optionally, the above-mentioned determining the second target object that meets the preset vehicle category matching condition from all identified vehicle objects may include:

[0164] A target identified vehicle object whose vehicle category matches the target vehicle category is determined from all identified vehicle objects as a second target object that meets a preset vehicle category matching condition.

[0165] Further optionally, a method for statistically analyzing the traffic flow of a single vehicle category is provided as follows: all identified vehicle objects are screened for traffic status conditions, and further, the identified vehicle objects that meet the traffic status conditions are screened for vehicle category conditions to obtain traffic flow statistics for a single vehicle category. This is not limited in the embodiments of the present invention.

[0166] Optionally, it may also include:

[0167] When the traffic flow identification requirement type of the target road section is the category and direction traffic flow identification type, based on the second target traffic status information that requires specific direction traffic flow identification and the traffic status result of each identified vehicle object in the traffic data set, a third target object that meets the preset specific direction traffic state matching condition is determined from all identified vehicle objects; based on the target vehicle category that requires targeted traffic flow identification and the object category information of each third target object, a fourth target object that meets the preset second vehicle category matching condition is determined from all third target objects; the number of third vehicles corresponding to all fourth target objects is calculated; and based on the number of third vehicles, the traffic flow result of the target road section within the target time is determined.

[0168] It can be seen that this optional embodiment can match the corresponding traffic flow result determination method for the two-way traffic flow identification type and the exclusive category traffic flow identification type respectively, which is conducive to improving the comprehensiveness, integrity and rationality of the traffic flow result determination method, and then conducive to improving the pertinence, diversity and flexibility of the traffic flow result determination method, thereby helping to improve the accuracy and reliability of the determined traffic flow results.

[0169] In another optional embodiment, before determining the traffic status result of the target vehicle object based on the determined current center point coordinate information and previous center point coordinate information corresponding to the target vehicle object and the preset traffic flow baseline coordinate information, the method may further include the following operations:

[0170] The current center point coordinate information of the target vehicle object is determined according to the positioning frame coordinate information of the target vehicle object, and the previous center point coordinate information of the target vehicle object is determined according to the traffic data set.

[0171] Further optionally, the determining of the current center point coordinate information of the target vehicle object based on the positioning frame coordinate information of the target vehicle object may include:

[0172] Determine the upper left horizontal coordinate value, upper left vertical coordinate value, lower right horizontal coordinate value, and lower right vertical coordinate value of the positioning frame of the target vehicle object according to the positioning frame coordinate information of the target vehicle object;

[0173] Calculate a first difference (absolute value) between the upper left horizontal coordinate value and the lower right horizontal coordinate value, calculate a first average value corresponding to the first difference, calculate a first addition value corresponding to the upper left horizontal coordinate value and the first average value, and determine the first addition value as the horizontal coordinate value of the current center point;

[0174] Calculate a second difference (absolute value) between the upper left ordinate value and the lower right ordinate value, calculate a second average value corresponding to the second difference, calculate a second addition value corresponding to the upper left ordinate value and the second average value, and determine the second addition value as the ordinate value of the current center point;

[0175] The current center point coordinate information of the target vehicle object is determined according to the current center point horizontal coordinate value and the current center point vertical coordinate value.

[0176] Optionally, the current horizontal coordinate value of the center point of the target vehicle object can be obtained by the following formula: c =x l +(x r -x l ) / 2, which is not limited in the embodiments of the present invention.

[0177] Optionally, the current vertical coordinate value of the center point of the target vehicle object can be obtained by the following formula: c =y l +(y r -y l ) / 2, which is not limited in the embodiments of the present invention.

[0178] Optionally, the traffic data set records the center point coordinate information of the identified vehicle objects. Therefore, when the identified vehicle objects in the traffic data set include the target vehicle object, the center point coordinate information of the target vehicle object based on the previous frame of the road section image can be directly obtained from the traffic data set, and then the previous center point coordinate information of the target vehicle object can be determined; in addition, the positioning frame coordinate information of the target vehicle object based on the previous frame of the road section image can be determined through the traffic data set, and the previous center point coordinate information of the target vehicle object can be further determined by referring to but not limited to the above-mentioned method for determining the current center point coordinate information of the target vehicle object, which is not limited in the embodiments of the present invention.

[0179] It can be seen that this optional embodiment can provide a method for determining the current center point coordinate information and the previous center point coordinate information, which is conducive to improving the comprehensiveness and rationality of the method for determining the current center point coordinate information and the previous center point coordinate information, and thus is conducive to improving the accuracy and reliability of the determined current center point coordinate information and the previous center point coordinate information.

[0180] Example 2

[0181] See also Figure 2 , Figure 2 This is a flow chart of another method for identifying bidirectional traffic flow based on target detection and tracking algorithms disclosed in an embodiment of the present invention. Figure 2 The described method can be applied to a bidirectional vehicle flow identification device, wherein the device may include a server, wherein the server includes a local server or a cloud server, which is not limited in the embodiment of the present invention. Figure 2 As shown in FIG, the two-way traffic flow recognition method based on target detection and tracking algorithm includes the following operations:

[0182] 201. Determine a current road section image of a target road section requiring traffic flow recognition, wherein the current road section image includes one or more target vehicle objects.

[0183] 202. Input the current road section image into the converged target detection model for analysis to obtain the object information of each target vehicle object, and input the object information of each target vehicle object into the converged tracking algorithm model for analysis to obtain the tracking sequence number of each target vehicle object.

[0184] 203. Based on the current road section image, determine whether the target road section meets the preset data set establishment conditions. When the judgment result is yes, execute step 204; when the judgment result is no, execute step 205.

[0185] 204. Establish a traffic data set, and perform corresponding element addition and data update operations on the traffic data set based on the object information and tracking sequence number of each target vehicle object and the set basic traffic status result.

[0186] Optionally, a traffic data set is established. For example, an array with a variable named VehicleTrafficInfo is established to record the traffic data of each detected vehicle object (such as object category information, tracking sequence number, center point coordinate information, traffic status results, etc.); further, "VehicleTrafficInfo" can be understood as a variable defined in this solution, a usage method of the C++ program, and this variable contains multiple variables (i.e., corresponding to different vehicle objects and specific traffic data of vehicle objects), which is not limited in the embodiment of the present invention.

[0187] 205. Determine the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the traffic data set corresponding to the determined target road section; determine the traffic flow result of the target road section within the target time based on the traffic status result of each identified vehicle object in the traffic data set, and all identified vehicle objects include the target vehicle object.

[0188] In the embodiment of the present invention, for other descriptions of steps 201 to 205, please refer to the other detailed descriptions of steps 101 to 105 in the first embodiment, which will not be repeated in the embodiment of the present invention.

[0189] It can be seen that the embodiments of the present invention can obtain the object information and tracking number of the target vehicle object through the target detection model and the tracking algorithm model, determine the traffic status result of the target vehicle object based on the object information and the tracking number, and then determine the traffic flow result of the target road section within the target time. This is conducive to improving the comprehensiveness and rationality of the two-way traffic flow identification method, and thus is conducive to improving the accuracy and reliability of the determined traffic flow result, and is also conducive to improving the efficiency and convenience of determining the traffic flow result, thereby facilitating the improvement of the accuracy, efficiency and timeliness of traffic flow identification of the target road section, and further facilitating the realization of real-time and low-cost traffic flow detection of the road section; and further, it is also possible to determine whether the target road section meets the data set establishment conditions, and match the corresponding operations according to the results of meeting the data set establishment conditions, which is conducive to improving the comprehensiveness and integrity of the two-way traffic flow identification method. In addition, it also provides a traffic data set establishment, element addition and data update method, which is conducive to improving the comprehensiveness and rationality of the traffic data set processing method, and thus is conducive to improving the accuracy, timeliness and rationality of traffic data set establishment, as well as the accuracy, timeliness and rationality of element addition and data update of the traffic data set, thereby facilitating the improvement of the applicability, data integrity and validity of the traffic data set.

[0190] In an optional embodiment, the above-mentioned determining whether the target road section meets the preset data set establishment conditions based on the current road section image may include:

[0191] Based on the historical tracking image information of the target road section, determine whether the current road section image meets the preset first frame tracking image conditions;

[0192] When it is determined that the current road section image meets the first frame tracking image condition, determining that the target road section meets the preset data set establishment condition;

[0193] When it is determined that the current road section image does not meet the first frame tracking image condition, it is determined that the target road section does not meet the preset data set establishment condition.

[0194] Optionally, the historical tracking image information of the target road section may be the historical tracking image information of the target road section within a set time period, or may be all historical tracking image information of the target road section since the road section image acquisition was started in the past, which is not limited in the embodiment of the present invention.

[0195] Further optionally, judging whether the current road section image meets the preset first-frame tracking image condition based on the historical tracking image information of the target road section may include:

[0196] According to the historical tracking image information of the target road section, determine whether the current road section image is the first frame image;

[0197] When it is determined that the current road section image is the first frame image, determining that the current road section image meets a preset first frame tracking image condition;

[0198] When it is determined that the current road section image is not the first frame image, it is determined that the current road section image does not meet the preset first frame tracking image condition.

[0199] It can be seen that this optional embodiment can determine the results of satisfying the conditions for establishing a data set based on the results of satisfying the conditions for the first frame tracking image of the current road section image, which is conducive to improving the comprehensiveness, integrity and rationality of the method for determining the results of satisfying the conditions for establishing a data set, and thus is conducive to improving the accuracy and reliability of the determined results of satisfying the conditions for establishing a data set.

[0200] In another optional embodiment, the above-mentioned operations of adding corresponding elements and updating data on the traffic data set based on the object information and tracking number of each target vehicle object and the set basic traffic status result may include:

[0201] Determine the center point coordinate information of each target vehicle object according to the positioning frame coordinate information included in the object information of each target vehicle object;

[0202] According to the center point coordinate information, tracking number and object category information corresponding to each target vehicle object, and the set basic traffic status results, corresponding element addition and data update operations are performed on the traffic data set.

[0203] It can be seen that this optional embodiment can provide a method for adding elements to a traffic data set and updating data in response to the situation where the target vehicle object has not been recorded in the history of the traffic data set, and perform corresponding element addition and data update operations on the traffic data set based on the center point coordinate information, tracking sequence number and object category information, and basic traffic status results. This is conducive to improving the comprehensiveness, rationality and integrity of the method for adding elements to a traffic data set and updating data, as well as improving the flexibility and pertinence of the method for adding elements to a traffic data set and updating data, and thus helping to improve the accuracy and timeliness of the method for adding elements to a traffic data set and updating data.

[0204] In yet another optional embodiment, after determining the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the determined traffic data set corresponding to the target road section, the method may further include the following operations:

[0205] According to the current center point coordinate information, tracking sequence number, traffic status result and object category information included in the object information corresponding to each determined target vehicle object, a corresponding data update operation is performed on the traffic data set.

[0206] Optionally, the above-mentioned corresponding data update operation on the traffic data set can be to directly add the current center point coordinate information, tracking number, traffic status result and object category information included in the object information corresponding to each determined target vehicle object to the corresponding position of the traffic data set, or to replace the corresponding data originally stored in the traffic data set with the current center point coordinate information, tracking number, traffic status result and object category information included in the object information corresponding to each determined target vehicle object, and the embodiment of the present invention is not limited to this.

[0207] It can be seen that this optional embodiment can provide a data update method for the traffic data set based on the situation where the target vehicle object has been historically recorded in the traffic data set, which is beneficial to improving the pertinence, flexibility and accuracy of the data update method of the traffic data set, and further beneficial to improving the execution accuracy and reliability of the data update operation of the traffic data set, thereby helping to improve the data accuracy of the traffic data set.

[0208] Example 3

[0209] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of a two-way vehicle flow recognition device based on target detection and tracking algorithm disclosed in an embodiment of the present invention. Figure 3 The described device may include a server, wherein the server includes a local server or a cloud server, which is not limited in the embodiment of the present invention. Figure 3 As shown, the bidirectional traffic flow recognition device based on target detection and tracking algorithm may include:

[0210] The image determination module 301 is used to determine a current road section image of a target road section for which traffic flow identification is required, wherein the current road section image includes one or more target vehicle objects.

[0211] The vehicle tracking module 302 is used to input the current road section image into the converged target detection model for analysis to obtain the object information of each target vehicle object, and input the object information of each target vehicle object into the converged tracking algorithm model for analysis to obtain the tracking sequence number of each target vehicle object.

[0212] The state determination module 303 is used to determine the traffic state result of each target vehicle object based on the object information and tracking sequence number of each target vehicle object and the traffic data set corresponding to the determined target road section.

[0213] The traffic flow determination module 304 is configured to determine the traffic flow result of the target road section within the target time based on the traffic status result of each identified vehicle object in the traffic data set, where all identified vehicle objects include the target vehicle object.

[0214] It can be seen that implementation Figure 3 The described two-way traffic flow identification device based on target detection and tracking algorithm can obtain the object information and tracking number of the target vehicle object through the target detection model and tracking algorithm model, determine its traffic status result based on the object information and tracking number of the target vehicle object, and then determine the traffic flow result of the target section within the target time, which is conducive to improving the comprehensiveness and rationality of the two-way traffic flow identification method, and thus is conducive to improving the accuracy and reliability of the determined traffic flow results, and is also conducive to improving the determination efficiency and convenience of the traffic flow results, thereby helping to improve the accuracy, efficiency and timeliness of traffic flow identification in the target section, and further helping to realize real-time and low-cost detection of traffic flow in the section.

[0215] In an optional embodiment, the object information of the target vehicle object includes at least positioning frame coordinate information, confidence information, and object category information of the target vehicle object.

[0216] Furthermore, the state determination module 303 determines the traffic state result of each target vehicle object according to the object information and tracking number of each target vehicle object and the traffic data set corresponding to the determined target road section, specifically including:

[0217] Determining a tracking sequence number for each identified vehicle object in the traffic data set based on the determined traffic data set corresponding to the target road segment;

[0218] For each target vehicle object, determining whether the target vehicle object meets a preset identification condition based on the tracking serial numbers of all identified vehicle objects and the tracking serial number of the target vehicle object;

[0219] When it is determined that the target vehicle object meets the recognition conditions, the traffic status result of the target vehicle object is determined based on the current center point coordinate information and the previous center point coordinate information corresponding to the determined target vehicle object and the preset traffic flow baseline coordinate information;

[0220] When it is determined that the target vehicle object does not meet the identification conditions, the corresponding element addition and data update operations are performed on the traffic data set based on the positioning frame information, object category information and tracking number corresponding to the target vehicle object, and the set basic traffic status result, and the traffic status result of the target vehicle object is determined.

[0221] It can be seen that implementation Figure 4 The described device can match the corresponding traffic status result determination operations according to the results of the identified conditions of the target vehicle object, which is conducive to improving the comprehensiveness, integrity and rationality of the traffic status result determination method, and thus is conducive to improving the diversity and flexibility of the traffic status result determination method, thereby helping to improve the accuracy and reliability of the determined traffic status results, and also helps to improve the execution accuracy and rationality of the traffic status determination operation. In addition, it also provides a method for adding elements to the traffic data set and updating data, which is conducive to improving the comprehensiveness and rationality of the method for adding elements to the traffic data set and updating data, and thus is conducive to improving the data update accuracy, timeliness and efficiency of the traffic data set, thereby helping to improve the data accuracy and integrity of the traffic data set, and further helps to improve the accuracy and reliability of the traffic status results and traffic flow results subsequently determined based on the traffic data set.

[0222] In another optional embodiment, the state determination module 303 determines the traffic state result of the target vehicle object according to the current center point coordinate information and the previous center point coordinate information corresponding to the target vehicle object and the preset traffic flow baseline coordinate information, specifically including:

[0223] Determining a first ordinate value based on the determined current center point coordinate information corresponding to the target vehicle object, determining a second ordinate value based on the previous center point coordinate information corresponding to the target vehicle object, and determining a reference ordinate value based on preset vehicle flow reference line coordinate information;

[0224] Determining a traffic state type of the target vehicle object according to the first ordinate value, the second ordinate value, and the reference ordinate value; the traffic state type includes an upward state type, a downward state type, and other state types;

[0225] According to the traffic status type, the traffic status result of the target vehicle object is determined.

[0226] It can be seen that implementation Figure 4The described device can also determine the corresponding vertical coordinate values ​​through the current center point coordinate information, the previous center point coordinate information and the vehicle flow baseline coordinate information, and then determine the traffic status type of the target vehicle object, and determine the traffic status result according to the traffic status type, which is conducive to improving the comprehensiveness and rationality of the traffic status result determination method, and thus is conducive to improving the diversity, pertinence and rationality of the determination parameters used to determine the traffic status result, thereby helping to improve the accuracy and reliability of the determined traffic status result.

[0227] In another optional embodiment, the state determination module 303 determines the traffic state type of the target vehicle object according to the first ordinate value, the second ordinate value, and the reference ordinate value in a manner that specifically includes:

[0228] When the first ordinate value is greater than the second ordinate value and the first ordinate value is greater than the reference ordinate value, determining that the traffic state type of the target vehicle object is a down state type;

[0229] When the first ordinate value is smaller than the second ordinate value and the first ordinate value is smaller than the reference ordinate value, it is determined that the traffic state type of the target vehicle object is an upward state type.

[0230] It can be seen that implementation Figure 4 The described device can also determine the traffic status type of the target vehicle object by comparing the size relationship between the first ordinate value and the second ordinate value and the size relationship between the first ordinate value and the reference ordinate value, which is conducive to improving the comprehensiveness, integrity and rationality of the traffic status type determination method, and thus is conducive to improving the accuracy and reliability of the determined traffic status type.

[0231] In another optional embodiment, the traffic flow determination module 304 determines the traffic flow result of the target road section within the target time according to the traffic status result of each identified vehicle object in the traffic data set in a manner that specifically includes:

[0232] When the traffic flow identification requirement type of the target road section is a two-way traffic flow identification type, based on the target traffic state information for which two-way traffic flow identification is determined and the traffic state result of each identified vehicle object in the traffic data set, a first target object that meets a preset traffic state matching condition is determined from all identified vehicle objects; the number of first vehicles corresponding to all first target objects is calculated; and the traffic flow result of the target road section within the target time is determined based on the first vehicle number;

[0233] When the traffic flow identification requirement type of the target road section is an exclusive category traffic flow identification type, based on the target vehicle category that needs to be targeted for traffic flow identification and the object category information of each identified vehicle object in the traffic data set, a second target object that meets the preset vehicle category matching conditions is determined from all identified vehicle objects; the number of second vehicles corresponding to all second target objects is calculated; and based on the number of second vehicles, the traffic flow result of the target road section within the target time is determined.

[0234] It can be seen that implementation Figure 4 The described device can also match corresponding traffic flow result determination methods for two-way traffic flow identification types and exclusive category traffic flow identification types, which is conducive to improving the comprehensiveness, integrity and rationality of the traffic flow result determination method, and thus is conducive to improving the pertinence, diversity and flexibility of the traffic flow result determination method, thereby helping to improve the accuracy and reliability of the determined traffic flow results.

[0235] In another optional embodiment, Figure 4 As shown, the device may also include:

[0236] The judgment module 305 is used to judge whether the target road section meets the preset data set establishment conditions based on the current road section image before the state determination module 303 determines the traffic state result of each target vehicle object based on the object information and tracking number of each target vehicle object and the traffic data set corresponding to the determined target road section; when it is judged that the target road section does not meet the data set establishment conditions, the state determination module 303 performs the operation of determining the traffic state result of each target vehicle object based on the object information and tracking number of each target vehicle object and the traffic data set corresponding to the determined target road section.

[0237] The set establishing module 306 is configured to establish a traffic data set when the judging module 305 determines that the target road section meets the data set establishing conditions.

[0238] The first set data updating module 307 is used to perform corresponding element addition and data updating operations on the traffic data set according to the object information and tracking sequence number of each target vehicle object and the set basic traffic status result.

[0239] It can be seen that implementation Figure 4The described device can also determine whether the target road section meets the data set establishment conditions, and match the corresponding operations according to the results of whether the data set establishment conditions are met, which is conducive to improving the comprehensiveness and integrity of the two-way traffic flow identification method. In addition, it also provides traffic data set establishment, element addition and data update methods, which is conducive to improving the comprehensiveness and rationality of the traffic data set processing method, and thus is conducive to improving the accuracy, timeliness and rationality of traffic data set establishment, as well as the accuracy, timeliness and rationality of traffic data set element addition and data update, thereby helping to improve the applicability, data integrity and effectiveness of traffic data sets.

[0240] In another optional embodiment, the determination module 305 determines whether the target road section meets the preset data set establishment conditions based on the current road section image by:

[0241] Based on the historical tracking image information of the target road section, determine whether the current road section image meets the preset first frame tracking image conditions;

[0242] When it is determined that the current road section image meets the first frame tracking image condition, determining that the target road section meets the preset data set establishment condition;

[0243] When it is determined that the current road section image does not meet the first frame tracking image condition, it is determined that the target road section does not meet the preset data set establishment condition.

[0244] It can be seen that implementation Figure 4 The described device can also determine the results of satisfying the data set establishment conditions based on the results of satisfying the conditions of the first frame tracking image of the current road section image, which is conducive to improving the comprehensiveness, integrity and rationality of the method of determining the results of satisfying the data set establishment conditions, and thus is conducive to improving the accuracy and reliability of the determined results of satisfying the data set establishment conditions.

[0245] In another optional embodiment, the first set data updating module 307 performs corresponding element addition and data update operations on the traffic data set according to the object information and tracking sequence number of each target vehicle object and the set basic traffic status result, specifically including:

[0246] Determine the center point coordinate information of each target vehicle object according to the positioning frame coordinate information included in the object information of each target vehicle object;

[0247] According to the center point coordinate information, tracking number and object category information corresponding to each target vehicle object, and the set basic traffic status results, corresponding element addition and data update operations are performed on the traffic data set.

[0248] It can be seen that implementation Figure 4The described device can also provide a method for adding elements to a traffic data set and updating data in response to the situation where the target vehicle object has not been historically recorded in the traffic data set, and perform corresponding element addition and data update operations on the traffic data set based on the center point coordinate information, tracking sequence number and object category information, and basic traffic status results. This is conducive to improving the comprehensiveness, rationality and integrity of the method for adding elements to a traffic data set and updating data, as well as improving the flexibility and pertinence of the method for adding elements to a traffic data set and updating data, thereby helping to improve the accuracy and timeliness of the method for adding elements to a traffic data set and updating data.

[0249] In another optional embodiment, Figure 4 As shown, the device may also include:

[0250] The coordinate determination module 308 is used to determine the current center point coordinate information of the target vehicle object according to the positioning frame coordinate information of the target vehicle object, and to determine the previous center point coordinate information of the target vehicle object according to the traffic data set before the state determination module 303 determines the traffic state result of the target vehicle object according to the current center point coordinate information and the previous center point coordinate information corresponding to the target vehicle object and the preset traffic flow baseline coordinate information.

[0251] It can be seen that implementation Figure 4 The described device can also provide a method for determining the current center point coordinate information and the previous center point coordinate information, which is conducive to improving the comprehensiveness and rationality of the method for determining the current center point coordinate information and the previous center point coordinate information, and thus is conducive to improving the accuracy and reliability of the determined current center point coordinate information and the previous center point coordinate information.

[0252] In another optional embodiment, Figure 4 As shown, the device may also include:

[0253] The second set data update module 309 is used to perform corresponding data update operations on the traffic data set according to the current center point coordinate information, tracking number, traffic status result and object category information included in the object information of each target vehicle object, after the state determination module 303 determines the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the traffic data set corresponding to the determined target road section.

[0254] It can be seen that implementation Figure 4The described device can also provide a data update method for traffic data sets based on the situation of target vehicle objects that have been historically recorded in the traffic data sets, which is conducive to improving the pertinence, flexibility and accuracy of the data update method for traffic data sets, and thus is conducive to improving the execution accuracy and reliability of the data update operation of the traffic data sets, thereby helping to improve the data accuracy of the traffic data sets.

[0255] Example 4

[0256] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of another bidirectional vehicle flow recognition device based on target detection and tracking algorithm disclosed in an embodiment of the present invention. Figure 5 The described device may include a server, wherein the server includes a local server or a cloud server, which is not limited in the embodiment of the present invention. Figure 5 As shown, the device may include:

[0257] A memory 401 storing executable program code;

[0258] a processor 402 coupled to the memory 401;

[0259] Furthermore, it may also include an input interface 403 and an output interface 404 coupled to the processor 402;

[0260] The processor 402 calls the executable program code stored in the memory 401 to execute the steps of the two-way vehicle flow recognition method based on the target detection and tracking algorithm described in the first or second embodiment.

[0261] Example 5

[0262] An embodiment of the present invention discloses a computer storage medium that stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps of the two-way vehicle flow identification method based on target detection and tracking algorithm described in Example 1 or Example 2.

[0263] Example 6

[0264] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps of the two-way vehicle flow identification method based on target detection and tracking algorithm described in Example 1 or Example 2.

[0265] The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Those skilled in the art can understand and implement the present invention without inventive effort.

[0266] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by means of hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, the storage medium including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0267] Finally, it should be noted that the method and device for identifying two-way traffic flow based on target detection and tracking algorithms disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A two-way traffic flow recognition method based on target detection and tracking algorithm, characterized in that: The method comprises: Determining a current road section image of a target road section for which traffic flow identification is required, wherein the current road section image includes one or more target vehicle objects; Inputting the current road section image into a converged target detection model for analysis to obtain object information of each target vehicle object, and inputting the object information of each target vehicle object into a converged tracking algorithm model for analysis to obtain a tracking sequence number of each target vehicle object; the object information of the target vehicle object includes at least positioning frame coordinate information, confidence information, and object category information of the target vehicle object; Determine the traffic status result of each target vehicle object according to the object information and tracking sequence number of each target vehicle object and the determined traffic data set corresponding to the target road section; determining a traffic flow result of the target road section within a target time according to a traffic status result of each identified vehicle object in the traffic data set, wherein all the identified vehicle objects include the target vehicle object; Furthermore, determining the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the determined traffic data set corresponding to the target road section includes: Determining a tracking number of each identified vehicle object in the traffic data set according to the determined traffic data set corresponding to the target road segment; For each target vehicle object, determining whether the target vehicle object meets a preset identification condition based on the tracking numbers of all the identified vehicle objects and the tracking number of the target vehicle object; When it is determined that the target vehicle object meets the identified conditions, the traffic status result of the target vehicle object is determined based on the current center point coordinate information and the previous center point coordinate information corresponding to the determined target vehicle object and the preset traffic flow baseline coordinate information; When it is determined that the target vehicle object does not meet the identified conditions, performing corresponding element addition and data update operations on the traffic data set according to the positioning frame information, object category information and tracking sequence number corresponding to the target vehicle object and the set basic traffic status result, and determining the traffic status result of the target vehicle object; Furthermore, the method of determining the traffic status of the target vehicle object based on the determined current center point coordinate information and the previous center point coordinate information corresponding to the target vehicle object and the preset traffic flow baseline coordinate information includes: Determining a first ordinate value based on the determined current center point coordinate information corresponding to the target vehicle object, determining a second ordinate value based on the previous center point coordinate information corresponding to the target vehicle object, and determining a reference ordinate value based on preset vehicle flow reference line coordinate information; When the first ordinate value is greater than the second ordinate value and the first ordinate value is greater than the reference ordinate value, the traffic state type of the target vehicle object is determined to be a down state type; when the first ordinate value is less than the second ordinate value and the first ordinate value is less than the reference ordinate value, the traffic state type of the target vehicle object is determined to be an up state type; the traffic state type includes one of an up state type, a down state type, and other state types; According to the traffic state type, a traffic state result of the target vehicle object is determined.

2. The method for identifying bidirectional traffic flow based on target detection and tracking algorithm according to claim 1 is characterized in that: The determining of the traffic flow result of the target road section within the target time according to the traffic status result of each identified vehicle object in the traffic data set includes: When the traffic flow identification requirement type of the target road section is a two-way traffic flow identification type, a first target object that meets a preset traffic state matching condition is determined from all the identified vehicle objects based on the determined target traffic state information requiring two-way traffic flow identification and the traffic state result of each identified vehicle object in the traffic data set; the number of first vehicles corresponding to all the first target objects is calculated; and the traffic flow result of the target road section within a target time is determined based on the first vehicle number; When the traffic flow identification requirement type of the target road section is an exclusive category traffic flow identification type, based on the target vehicle category that needs to be targeted for traffic flow identification and the object category information of each identified vehicle object in the traffic data set, a second target object that meets the preset vehicle category matching conditions is determined from all the identified vehicle objects; the number of second vehicles corresponding to all the second target objects is calculated; and based on the second number of vehicles, the traffic flow result of the target road section within the target time is determined.

3. The method for identifying bidirectional traffic flow based on target detection and tracking algorithm according to claim 1 or 2, characterized in that: Before determining the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the determined traffic data set corresponding to the target road section, the method further includes: Determining, based on the current road section image, whether the target road section meets a preset data set establishment condition; When it is determined that the target road section meets the data set establishment conditions, a traffic data set is established; and corresponding element addition and data update operations are performed on the traffic data set according to the object information and tracking sequence number of each target vehicle object and the set basic traffic status result; When it is determined that the target road section does not meet the data set establishment conditions, the operation of determining the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the traffic data set corresponding to the target road section is performed.

4. The method for identifying bidirectional traffic flow based on target detection and tracking algorithm according to claim 3 is characterized in that: The determining, based on the current road section image, whether the target road section satisfies a preset data set establishment condition includes: Determining whether the current road section image meets a preset first-frame tracking image condition based on the historical tracking image information of the target road section; When it is determined that the current road section image meets the first frame tracking image condition, determining that the target road section meets the preset data set establishment condition; When it is determined that the current road section image does not meet the first frame tracking image condition, determining that the target road section does not meet the preset data set establishment condition; Furthermore, the corresponding element addition and data update operations are performed on the traffic data set according to the object information and tracking sequence number of each target vehicle object and the set basic traffic status result, including: Determining the center point coordinate information of each target vehicle object according to the positioning frame coordinate information included in the object information of each target vehicle object; According to the center point coordinate information, tracking sequence number, object category information included in the object information, and the set basic traffic status result corresponding to each target vehicle object, corresponding element addition and data update operations are performed on the traffic data set.

5. The method for identifying bidirectional traffic flow based on target detection and tracking algorithm according to claim 1 or 2, characterized in that: Before determining the traffic status result of the target vehicle object based on the determined current center point coordinate information and previous center point coordinate information corresponding to the target vehicle object and the preset traffic flow baseline coordinate information, the method further includes: Determining the current center point coordinate information of the target vehicle object according to the positioning frame coordinate information of the target vehicle object, and determining the previous center point coordinate information of the target vehicle object according to the traffic data set; Furthermore, after determining the traffic status result of each target vehicle object based on the object information and tracking number of each target vehicle object and the determined traffic data set corresponding to the target road section, the method further includes: According to the determined current center point coordinate information, tracking sequence number, traffic status result and object category information included in the object information corresponding to each target vehicle object, a corresponding data update operation is performed on the traffic data set.

6. A two-way traffic flow recognition device based on target detection and tracking algorithm, characterized in that: The device is used to execute the two-way traffic flow identification method based on the target detection and tracking algorithm according to any one of claims 1 to 5, and the device includes: An image determination module is used to determine a current road section image of a target road section for which traffic flow identification is required, wherein the current road section image includes one or more target vehicle objects; a vehicle tracking module, configured to input the current road section image into a converged target detection model for analysis to obtain object information of each target vehicle object, and input the object information of each target vehicle object into a converged tracking algorithm model for analysis to obtain a tracking sequence number of each target vehicle object; a state determination module, configured to determine a traffic state result of each target vehicle object based on the object information and tracking sequence number of each target vehicle object and the determined traffic data set corresponding to the target road section; The vehicle flow determination module is used to determine the vehicle flow result of the target road section within the target time based on the traffic status result of each identified vehicle object in the traffic data set, and all the identified vehicle objects include the target vehicle object.

7. A two-way traffic flow recognition device based on target detection and tracking algorithm, characterized in that: The device comprises: a memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the two-way traffic flow identification method based on target detection and tracking algorithm as described in any one of claims 1 to 5.

8. A computer storage medium, characterized in that The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the two-way traffic flow identification method based on target detection and tracking algorithm as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Traffic video intelligent analysis method based on target detection and tracking

    CN110472496A

  • Road vehicle tracking method and system based on attention mechanism and multi-target tracking

    CN114627447A