Single-lane-level traffic flow passing data acquisition method in intelligent traffic operation system
By using generator and discriminator models in intelligent transportation systems to convert the original vehicle image into brightness information and reverse conversion, the existing vehicle counting methods are solved, and the accuracy and robustness of vehicle counting are achieved. , adapt to different environments and scenarios, and provides real-time monitoring and analysis capabilities.
Patent Information
- Application Number
- CN202411096357.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-22
AI Technical Summary
The existing vehicle counting methods rely on physical sensors or traditional image processing technology, are costly, sensitive in the environment and consume high computing resources, and cannot meet the rapidly developing traffic environment needs, especially in environments with limited resources, which are difficult to effectively apply.
In the intelligent transportation computing system, by setting independent lanes to enter and leave areas, the original vehicle image is converted into brightness information and reversely converted by using generator and discriminator models to realize the superimposed count of bicycles, reduce computing resource consumption, and improve counting accuracy and robustness.
It realizes the accuracy and robustness of vehicle counting in intelligent traffic control, reduces computing resource consumption, adapts to different environments and scenarios, provides real-time monitoring and analysis capabilities, reduces dependence on hardware and labeled data, and improves the system. flexibility and scalability.
Smart Images

Figure CN119007462A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent traffic flow collection, and relates to a single lane level traffic flow data collection method in an intelligent traffic calculation system, a traffic flow data collection method for superimposed counting of effective vehicles in independent lanes. Background Art
[0002] With the acceleration of urbanization, road traffic volume is increasing. Traffic flow detection algorithms play a vital role in intelligent transportation systems. Traffic flow detection algorithms can accurately obtain the number and flow of road vehicles in real time, providing important data support for traffic management departments, helping to scientifically manage urban roads, reduce traffic congestion, and improve road use efficiency.
[0003] In intelligent transportation systems, accurate statistics of vehicle flow is the key to traffic management and control. Intelligent transportation systems need to obtain detailed road information in real time and transmit this information to traffic control departments through the network to help them manage urban roads scientifically. Vehicle flow information is a key component of road traffic information and provides basic data for subsequent processing. Therefore, obtaining accurate vehicle flow information is crucial.
[0004] Vehicle detection is a prerequisite for achieving traffic flow statistics. The vehicles on the road are detected and identified through target detection methods, and the results obtained are used for traffic flow statistics. In the front-end process of data collection, it is particularly important to accurately detect and identify vehicles. This is because the intelligent transportation system uses terminal devices as a means of communication and exchanges information with operators for a long time. The data collected from vehicle detection is an important basis and guarantee for the intelligent transportation system to alleviate traffic congestion and determine whether the vehicle violates traffic rules.
[0005] Existing vehicle counting methods mostly rely on physical sensors or traditional image processing techniques, such as background subtraction and inter-frame difference methods, but these methods are limited by high hardware costs, sensitivity to the environment, and large environmental impacts. In addition, traditional vehicle flow statistics methods rely on manual operations. However, in today's rapidly developing era, this method can no longer meet the needs of increasingly dense traffic environments. With the advancement of surveillance video technology and computer technology, vehicle detection has gradually been achieved using computer vision. In recent years, the development of deep learning technology has provided new solutions for vehicle counting, but the existing methods of using deep learning for vehicle counting often require a large amount of labeled data and consume a large amount of computing resources, especially in data operations. The data processing volume is large, which limits its application in resource-limited environments.
[0006] Therefore, it is of practical significance and application value to study and find more efficient traffic flow statistics solutions for independent lanes. Summary of the invention
[0007] The present invention provides a method for collecting traffic data of single-lane level in an intelligent traffic operation system, by setting independent lane entry and exit areas, and using a training model to convert the original vehicle image into a numerical image of brightness information, and then inversely converting it back to the vehicle image through a generator, thereby realizing the superposition counting of the number of single vehicles. The present invention improves the accuracy and robustness of vehicle counting, reduces the consumption of computing resources, and provides effective basic traffic data for intelligent traffic control operations.
[0008] The technical solution of the present invention is achieved in this way: The single lane level traffic flow data collection method in the intelligent traffic operation system includes: S1. Set independent lane entry and exit areas, and mark the entry and exit areas in the area of interest in the monitoring image, preferably a road section or an intersection.
[0009] Specifically, the position of the entry area can cover the entry path of vehicles in the independent lane and can accurately capture the vehicle passing through the entry area; the position of the exit area can cover the exit path of vehicles in the independent lane and can accurately capture the vehicle passing through the exit area.
[0010] S2. Define a training model, including generator G1, generator G2 and discriminator D1, discriminator D2; generator G1 is used to generate vehicle position and count information from the original image, and generator G2 is used to reconstruct the vehicle position and count information into an assigned original image; discriminator D1 is used to distinguish between the generated vehicle count information and the real vehicle count information, and discriminator D2 is used to distinguish between the reconstructed assigned original image and the real vehicle original image.
[0011] Specifically, the discriminator D1 is used to evaluate the authenticity of the generated vehicle counting information y, and the output is the true probability; satisfying D1(y)∈[0,1].
[0012] Specifically, the discriminator D2 is used to evaluate the authenticity of the reconstructed assigned original image x, and the output is the true probability; satisfying D2(x)∈[0,1].
[0013] S3, convert the original image of the vehicle into the value x of the brightness information by the dwell time, assign a value to the vehicle to generate a virtual assigned image y=G1(x), and the virtual assigned image y is inversely generated by the generator G2 to generate the assigned original image G2(y). The accuracy of vehicle counting is optimized through the competition between the generator and the discriminator.
[0014] Specifically, for the generator G1, the vehicle position and count information y satisfies y=G1(x), where x represents the original image of the vehicle converted into a numerical value of brightness information by dwell time, and y represents the vehicle position and count information.
[0015] Specifically, for the generator G2, the assigned original image x′ satisfies x′=G2(y), where y represents the vehicle position and count information, and x′ represents the reconstructed assigned original image.
[0016] S4. When a vehicle enters the entry area, it is counted as an entering vehicle; when a vehicle leaves the exit area, it is counted as a leaving vehicle.
[0017] Specifically, the steps of the G1 generator and the G2 generator for the position information and counting results of vehicles entering the entry area and leaving the exit area are as follows: When a vehicle enters the entry area, the G1 generator is used to extract the vehicle’s location information and convert it into a vehicle count result, represented as y enter =G1(x enter ), where x enter ∈x,y enter ∈y.
[0018] When a vehicle leaves the exit area, the G1 generator is used to extract the vehicle’s location information and convert it into a vehicle count result, represented as y exit =G1(x exit ), where x exit ∈x,y exit ∈y.
[0019] The vehicle counting result is reconstructed into the assigned original image using generator G2, expressed as .
[0020] S5. Superimpose the number of bicycles, calculate the vehicle flow in the area of interest, and obtain the vehicle flow data in different time periods.
[0021] Apply generator G1 to the vehicles entering the area and count the number of vehicles entering the area, N enter =G1(x enter ), where N enter Count the number of vehicles entering the area; apply generator G1 to the vehicles leaving the area to count the number of vehicles leaving the area, N exit =G1(x exit ), where N exit Count vehicles leaving; Calculate the total traffic flow by adding the number of vehicles entering the area to the number of vehicles leaving the area .
[0022] The net traffic volume is calculated by calculating the difference between the number of vehicles entering the area and the number of vehicles leaving the area.
[0023] S6. Use the loss function to optimize the performance of the training model to ensure the accuracy of the judgment of effective vehicle traffic flow in different time periods.
[0024] Design loss function , train the generators G1, G2 and the discriminators D1, D2 to optimize the accuracy of vehicle counting; enable them to accurately convert and identify vehicle information in different environments, thereby improving the accuracy and robustness of vehicle flow statistics, where L GAN represents the adversarial loss function, L cycle represents the cycle consistency loss function, λ GAN , cycle , T and λ J is the weight of each loss term.
[0025] Specifically, for G1 and G2, the adversarial loss function is satisfied , train D1 and D2 so that D1 and D2 can distinguish between true and false data.
[0026] Specifically, satisfy the cycle consistency loss function , ensuring that the image reconstructed by G2 can generate results similar to the original vehicle counting information again through G1, thereby achieving effective vehicle flow judgment.
[0027] S7. Deploy models on edge devices to run in real time.
[0028] Edge devices can be computing devices located near the data source, such as small servers, dedicated computers, or embedded devices with powerful computing capabilities. Edge deployment not only improves data processing speed and reliability, but also enhances the flexibility and scalability of the system. During peak traffic hours, the system is able to seamlessly process large amounts of data without being affected by network delays or bandwidth limitations. In addition, since data processing is mainly performed locally, this also improves data privacy and security.
[0029] The beneficial effects of the present invention are: Data reconstruction verification: The generator G2 is defined to reconstruct the vehicle position and counting information into the assigned original image, which is then verified by the discriminator D2. Traffic flow monitoring without hardware sensors reduces the dependence on expensive hardware, improves the accuracy of vehicle counting under various environmental conditions, and reduces the dependence on labeled data. This double verification mechanism enhances the robustness of the system and reduces the possibility of erroneous counting.
[0030] Innovative application of time-to-brightness conversion: Converting the vehicle's dwell time into brightness information, this innovative method uses a virtual valued image y=G1(x) to represent the presence and dwell time of the vehicle, recording the vehicle's dwell time while realizing vehicle counting, thus providing a new dimension for traffic management and scheduling.
[0031] Real-time monitoring and analysis: The system can monitor the entry and exit of vehicles in real time and update traffic flow data in a timely manner, making traffic management more dynamic and responsive. This is especially important for traffic management during peak hours and traffic dispatch in emergency situations.
[0032] Strong adaptability: Because the system uses a machine learning model, it can adapt to different monitoring environments and scenarios through training, and can effectively count traffic flow whether it is a city intersection or a highway.
[0033] Loss function optimization: The performance of the training model is optimized through the loss function, ensuring that the model can accurately count the traffic data in different time periods and improving the generalization ability of the model.
[0034] Cost-effectiveness: Once the model is trained and deployed, it can run automatically, reducing the need for human intervention, thereby reducing long-term operating costs. It reduces computing resource consumption, achieves real-time operation capabilities on edge devices, and improves the operating efficiency and real-time performance of the system.
[0035] Data richness: The system not only provides vehicle counts, but also provides indirect measurements of vehicle dwell time through brightness information, which can be used for further traffic flow studies and planning.
[0036] Privacy protection: Compared with the method of identifying license plates or people in the car, this method focuses on the overall flow of vehicles and does not involve personal identification information, so it better protects personal privacy. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0038] Figure 1 It is an overall flow chart of the single lane level traffic flow data collection method in the intelligent traffic operation system; Figure 2 It is a workflow diagram of a generator for collecting traffic data of single lane level in an intelligent traffic operation system; Figure 3 It is a schematic diagram showing the principle of the single lane level traffic flow data collection method in the intelligent traffic calculation system; Description of the numbers in the figure: 1. Stop line; 2. First lane; 3. Second lane; 01. First lane enters the area; 02. First lane leaves the area; 11. Second lane enters the area; 12. Second lane leaves the area; 001. Vehicles entering the first lane enter the area; 002. Vehicles entering the first lane leave the area; 003. Vehicles entering the second lane enter the area; 004. Vehicles entering the second lane leave the area; DETAILED DESCRIPTION
[0039] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Figure 1 As shown, the single lane level traffic flow data collection method in the intelligent traffic operation system includes: S1. Set independent lane entry and exit areas, and mark the entry and exit areas in the area of interest in the monitoring image, preferably a road section or an intersection.
[0040] Specifically, the position of the entry area can cover the entry path of vehicles in the independent lane and can accurately capture the vehicle passing through the entry area; the position of the exit area can cover the exit path of vehicles in the independent lane and can accurately capture the vehicle passing through the exit area.
[0041] Specifically, a specific embodiment provided by the present application is that, in order to ensure accurate capture of vehicle dynamics, the entry area is set at the entrance of the intersection in the shape of a rectangular frame, covering all entry lanes; the exit area is also set as a rectangular frame, covering all exit lanes. The location and size of these areas are determined through field research and video analysis to ensure that they can cover the complete path of the vehicle. By accurately setting the entry and exit areas, the system can effectively distinguish and count vehicles entering and leaving the intersection, thereby improving the accuracy and reliability of traffic flow statistics.
[0042] S2. Define a training model, including generator G1, generator G2 and discriminator D1, discriminator D2; generator G1 is used to generate vehicle position and count information from the original image, and generator G2 is used to reconstruct the vehicle position and count information into an assigned original image; discriminator D1 is used to distinguish between the generated vehicle count information and the real vehicle count information, and discriminator D2 is used to distinguish between the reconstructed assigned original image and the real vehicle original image.
[0043] Specifically, the discriminator D1 is used to evaluate the authenticity of the generated vehicle counting information y, and the output is the true probability, satisfying D1(y)∈[0,1].
[0044] Specifically, the discriminator D2 is used to evaluate the authenticity of the reconstructed assigned original image x, and the output is the true probability, satisfying D2(x)∈[0,1].
[0045] For step S2, a more specific explanation is to define two generators (G1 and G2) and two discriminators (D1 and D2). G1 is responsible for converting the original traffic image into a numerical image containing vehicle position and counting information, while G2 reconstructs this numerical image into an image of original quality. Discriminator D1 is used to distinguish the vehicle counting information generated by G1 from the real vehicle counting information, and D2 is used to judge the authenticity of the image reconstructed by G2 and the original image. The model design of the present application can be effectively trained without paired data, so that the model can better adapt to vehicle detection and counting in different scenes and lighting conditions. Specifically, a training model of an embodiment provided by the present application is to use the generator G1 in the training model to convert the original vehicle image into a numerical image of brightness information, and then reversely convert the numerical image back to a vehicle image through the generator G2. Discriminators D1 and D2 are responsible for judging whether the input image is a real vehicle image and an assigned image, respectively.
[0046] S3, convert the original image of the vehicle into the value x of the brightness information by the dwell time, assign a value to the vehicle to generate a virtual assigned image y=G1(x), and the virtual assigned image y is inversely generated by the generator G2 to generate the assigned original image G2(y). The accuracy of vehicle counting is optimized through the competition between the generator and the discriminator.
[0047] Specifically, for the generator G1, the vehicle position and count information y satisfies y=G1(x), where x represents the original image of the vehicle converted into a numerical value of brightness information by dwell time, and y represents the vehicle position and count information.
[0048] Specifically, for generator G2, the assigned original image x′ satisfies x′=G2(y), where y represents the vehicle position and count information, and x′ represents the reconstructed assigned original image. That is, the vehicle count information is converted back to the assigned original image x′=G2(y) by generator G2, the vehicle's residence time is captured and converted into the brightness information of the virtual assigned image, and the accuracy of vehicle counting is further optimized, where the brightness information of x′ reflects the vehicle's residence time.
[0049] An embodiment provided in this application is used to illustrate the present principle. Figure 2As shown, a schematic diagram of a two-lane vehicle layout is provided, in which a first lane departure area 02 is set in the first lane 2 close to the vehicle stop line 1, a first lane entry area 01 is set at the end far from the vehicle stop line 1 in the solid line area of the first lane 2, a second lane departure area 12 is set in the second lane 3 close to the vehicle stop line 1, and a second lane entry area 11 is set at the end far from the vehicle stop line 1 in the solid line area of the second lane 3. During the vehicle entry and exit process, its stay time is converted into image brightness information. The original vehicle image is first converted into a virtual valued image by the generator G1, in which the brightness value of each pixel represents the length of time the vehicle exists at that point. Assuming that a vehicle stays in the monitoring area for 5 seconds, this time period is converted into a pixel brightness value, and the brightness range is set to 0-255 according to the pixel brightness value range, where 0 indicates that the vehicle has no stay time, such as Figure 2 The vehicle 003 entering the second lane entry area in the second lane 3 shown; 255 indicates that the vehicle stays for more than the preset maximum period (such as 30 seconds). Therefore, assuming that the vehicle 004 entering the second lane exit area stays in the second lane exit area 12 for 5 seconds, the corresponding pixel brightness value in the virtual valued image can be calculated by linear mapping, that is, 5 / 30×255≈42.5. This conversion is implemented using the G1 generator in the training model to ensure the accurate conversion of time information to brightness information.
[0050] In order to verify the accuracy of the counting information, the G2 generator reconstructs these virtual assigned images with brightness information into the assigned original images with original quality. If G2 can accurately reverse the brightness information to the specific location of the vehicle, it means that both G1 and G2 have been effectively trained. More specifically, if Figure 2 Take the two-lane road map shown in the figure for example. If, during a peak hour, five vehicles in the first lane 2 enter the first lane into area 01 almost at the same time and stay at the intersection waiting for the traffic light, as shown in the figure below: Figure 2 The first lane 2 shown in FIG. 2 includes five motor vehicles between vehicle 001 entering the first lane and vehicle 002 leaving the first lane. These vehicles will be presented with different brightness information in the virtual assigned image according to their respective stay time. When G2 reconstructs these data into the assigned original image, it should be able to clearly display the five vehicles in different positions, and the position of each vehicle accurately corresponds to the position in the original image.
[0051] This step not only improves the accuracy of vehicle counting, but also provides an intuitive way to represent the dwell time of vehicles, which is of great significance for analyzing the causes of traffic congestion and optimizing the management of traffic flow. In this way, traffic planners can more easily identify traffic bottlenecks and formulate more effective solutions.
[0052] S4. When a vehicle enters the entry area, it is counted as an entering vehicle; when a vehicle leaves the exit area, it is counted as a leaving vehicle. This can be achieved by comparing the position of the vehicle in the previous and next frames. If the vehicle disappears from the entry area and appears in the exit area, it is counted as a leaving vehicle. The system's automatic vehicle counting function reduces the need for manual intervention, improves counting efficiency and accuracy, and also reduces long-term operating costs.
[0053] Specifically, the steps of the G1 generator and the G2 generator for the position information and counting results of vehicles entering the entry area and leaving the exit area are as follows: Vehicle entry counting: When a vehicle enters the entry area, the counting is achieved by detecting the changes in the vehicle's position and direction of movement. When a vehicle enters the entry area, the G1 generator is used to extract the vehicle's position information and convert it into a vehicle counting result, represented as y enter =G1(x enter ), where x enter ∈x,y enter ∈y.
[0054] Vehicle departure count: When a vehicle leaves the departure area, count the changes in the vehicle position and direction of movement. When a vehicle leaves the departure area, use the G1 generator to extract the vehicle's position information and convert it into a vehicle count result, represented as y exit =G1(x exit ), where x exit ∈x,y exit ∈y.
[0055] The vehicle counting result is reconstructed into the assigned original image using generator G2, expressed as .
[0056] S5. Superimpose the number of bicycles, calculate the vehicle flow in the area of interest, and obtain the vehicle flow data in different time periods.
[0057] Apply generator G1 to the vehicles entering the area and count the number of vehicles entering the area, N enter =G1(x enter ), where N enter Count the number of vehicles entering the area; apply generator G1 to the vehicles leaving the area to count the number of vehicles leaving the area, N exit =G1(x exit ), where N exit Count the number of vehicles leaving.
[0058] Calculate the total traffic flow by adding the number of vehicles entering the area to the number of vehicles leaving the area .
[0059] The net traffic volume is calculated by calculating the difference between the number of vehicles entering the area and the number of vehicles leaving the area. .
[0060] Data is stored in hourly units, making it easier to analyze peak and trough periods of the day. Detailed time period analysis helps urban traffic management departments better understand traffic flow patterns, thereby optimizing traffic signal control and road design to reduce congestion.
[0061] S6. Use loss functions to optimize the performance of the training model and ensure the accuracy of the judgment of effective vehicle traffic flow in different time periods. The loss function includes adversarial loss, cycle consistency loss, and error loss of the number of vehicles entering and exiting and net traffic flow. The design of the loss function ensures that the model can maintain stable and accurate performance under various conditions, so that the system can be reliably used for long-term traffic monitoring and management.
[0062] Design loss function , train the generators G1, G2 and the discriminators D1, D2 to optimize the accuracy of vehicle counting; make the generated vehicle counting results and the reconstructed original images as close to the real data as possible, so that they can accurately convert and identify vehicle information in different environments, thereby improving the accuracy and robustness of vehicle flow statistics. GAN represents the adversarial loss function, L cycle represents the cycle consistency loss function, λ GAN , cycle , T and λ J is the weight of each loss term.
[0063] Specifically, for G1 and G2, the adversarial loss function is satisfied , train D1 and D2 so that D1 and D2 can distinguish between true and false data.
[0064] Specifically, satisfy the cycle consistency loss function , ensuring that the image reconstructed by G2 can generate a result similar to the original vehicle counting information again through G1, so that the generated vehicle counting result and the reconstructed assigned original image are as close to the real data as possible, realizing effective vehicle flow judgment.
[0065] Effectively counting the traffic volume on the road and feeding the information back to the intelligent transportation platform can provide a basis for intelligent management and dispatching of roads and reduce traffic congestion. Providing road information to navigation software can provide guidance for drivers to find the best driving route, reduce the pressure of evacuating congested sections, and save travel time. The traffic flow information is transmitted to the traffic control department, which can regulate vehicles based on this information to alleviate congestion.
[0066] S7. Deploy models on edge devices to run in real time.
[0067] Edge devices can be computing devices located near the data source, such as small servers, dedicated computers, or embedded devices with powerful computing capabilities. Edge deployment not only improves data processing speed and reliability, but also enhances the flexibility and scalability of the system. During peak traffic hours, the system is able to seamlessly process large amounts of data without being affected by network delays or bandwidth limitations. In addition, since data processing is mainly performed locally, this also improves data privacy and security.
[0068] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made according to design requirements and other factors. Although the present invention has been described in detail with reference to the aforementioned embodiments, those of ordinary skill in the art should understand that it is still possible to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein; and these modifications or substitutions 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, and should all be included in the protection scope of the present invention.
[0069] It should be understood that the size of the sequence number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. It is worth noting that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in this disclosure can be achieved. This document does not limit it. Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
Claims
1. A method for collecting traffic flow data at a single lane level in an intelligent traffic operation system, characterized in that: include S1. Set up independent lane entry and exit areas, and mark the entry and exit areas in the area of interest in the monitoring image; S2. Define a training model, including generators G1 and G2 and discriminators D1 and D2. Generator G1 is used to generate vehicle position and count information from the original image, and generator G2 is used to reconstruct the vehicle position and count information into an assigned original image. Discriminator D1 is used to distinguish the generated vehicle count information from the actual vehicle count information, and discriminator D2 is used to distinguish the reconstructed assigned original image from the actual vehicle original image. S3, converting the original image of the vehicle into a brightness value x based on the dwell time, assigning a value to the vehicle to generate a virtual assigned image y=G1(x), and inversely generating the assigned original image G2(y) from the virtual assigned image y through the generator G2; S4. When a vehicle enters the entry area, it is counted as an entering vehicle; when a vehicle leaves the exit area, it is counted as a leaving vehicle; S5. Superimpose the number of bicycles and calculate the vehicle flow in the area of interest to obtain the vehicle flow data in different time periods; S6. Use the loss function to optimize the training model performance and ensure the accuracy of the effective vehicle traffic flow judgment in different time periods; S7. Deploy the model on edge devices to run in real time.
2. The method for collecting traffic flow data at a single lane level in an intelligent traffic operation system according to claim 1, characterized in that: Step S1 includes, The position of the entry area can cover the entry path of vehicles in independent lanes and can accurately capture the vehicles passing through the entry area; The position of the exit area can cover the exit path of the vehicle in the independent lane and can accurately capture the vehicle passing through the exit area.
3. The method for collecting traffic flow data at a single lane level in an intelligent traffic operation system according to claim 1, characterized in that: Step S2 includes For the discriminator D1, it is used to evaluate the authenticity of the generated vehicle counting information y, and the output is the true probability; satisfying D1(y)∈[0,1]; For the discriminator D2, it is used to evaluate the authenticity of the reconstructed assigned original image x, and the output is the true probability; satisfying D2(x)∈[0,1].
4. The method for collecting traffic flow data at a single lane level in an intelligent traffic operation system according to claim 1, characterized in that: Step S3 includes For the generator G1, the vehicle position and count information y satisfies y=G1(x), where x represents the original image of the vehicle converted into the value of brightness information by the dwell time, and y represents the vehicle position and count information; For the generator G2, the assigned original image x′ satisfies x′=G2(y), where y represents the vehicle position and count information, and x′ represents the reconstructed assigned original image.
5. The method for collecting traffic flow data at a single lane level in an intelligent traffic operation system according to claim 1, characterized in that: Step S4 includes When a vehicle enters the entry area, the G1 generator is used to extract the vehicle’s location information and convert it into a vehicle count result, represented as y enter =G1(x enter ), where x enter ∈x,y enter ∈y; When a vehicle leaves the exit area, the G1 generator is used to extract the vehicle’s location information and convert it into a vehicle count result, represented as y exit =G1(x exit ), where x exit ∈x,y exit ∈y; The generator G2 is used to reconstruct the vehicle counting result into the assigned original image, which is expressed as .
6. The method for collecting traffic flow data at a single lane level in an intelligent traffic operation system according to claim 1, characterized in that: Step S5 includes, Apply generator G1 to the vehicles entering the area, count the number of vehicles entering the area, , where N enter Count the number of vehicles entering the area; apply generator G1 to the vehicles leaving the area, and count the number of vehicles leaving the area, N exit =G1(x exit ), where N exit Counting vehicles as they leave; Calculate the total traffic flow by adding the number of vehicles entering the area and the number of vehicles leaving the area ; The net traffic flow is calculated by calculating the difference between the number of vehicles entering the area and the number of vehicles leaving the area. .
7. The method for collecting traffic flow data at a single lane level in an intelligent traffic operation system according to claim 1, characterized in that: Step S6 includes According to the loss function The generators G1, G2 and the discriminators D1, D2 are trained to optimize the accuracy of vehicle counting; they can accurately convert and identify vehicle information in different environments; where L GAN Denotes the adversarial loss function, L cycle represents the cycle consistency loss function, λ GAN ,λ cycle ,λ T and λ J is the weight of each loss term.
8. The method for collecting traffic flow data at a single lane level in an intelligent traffic operation system according to claim 7, characterized in that: The adversarial loss function satisfies , train D1 and D2 so that D1 and D2 can distinguish between true and false data.
9. The method for collecting traffic flow data at a single lane level in an intelligent traffic operation system according to claim 7, characterized in that: The cycle consistency loss function satisfies , ensuring that the image reconstructed by G2 can regenerate a result similar to the original vehicle counting information through G1, thus achieving effective vehicle flow judgment.
