Vehicle speed detection method, device and equipment

By identifying the target and calculating the images collected by the drone, and calculating the vehicle speed in combination with the time difference, the problem of insufficient vehicle speed estimation accuracy and real-time performance in the prior art is solved, and high-precision and real-time vehicle speed detection is achieved.

CN120148259AInactive Publication Date: 2025-06-13WUHAN OPTICS VALLEY INFORMATION TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510626849.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-06-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing drone technology lacks accuracy and real-time performance in vehicle speed estimation, making it difficult to use in real-time traffic detection, and cannot provide timely and accurate decision-making basis for traffic management.

Method used

By identifying the target image to be identified, image data of the vehicle and lane lines are obtained, the actual relative displacement of the vehicle and lane lines are calculated based on the actual relative displacement and the vehicle driving time interval.

Benefits of technology

It realizes high-precision and real-time vehicle speed detection, which is suitable for real-time traffic monitoring, autonomous driving and intelligent monitoring systems, improving the accuracy and robustness of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120148259A_ABST
    Figure CN120148259A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle speed detection method, device and equipment, and the method comprises the steps: carrying out the target recognition of a to-be-recognized image, and obtaining the first position information of a vehicle, and the second position information and size information of a lane line; determining a pixel real object proportion parameter based on the pixel length corresponding to the size information of the lane line and the actual length of the lane line; determining the pixel position and the pixel relative displacement of the vehicle and the lane line in each frame of image according to the first position information and the second position information, and determining the actual relative displacement of the vehicle and the lane line in combination with the pixel real object proportion parameter; an actual driving speed of the vehicle is determined based on the actual relative displacement and the vehicle driving time interval. The relative displacement of the vehicle is calculated through the vehicle displacement and the lane line displacement, and continuous data missing caused by target tracking failure is complemented by using a multi-target tracking algorithm combined with linear fitting, so that the accuracy and reliability of vehicle speed detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and particularly to a vehicle speed detection method, device and equipment. Background Art

[0002] With the acceleration of urbanization and the increase in traffic flow, traffic congestion and road safety issues have become challenges that need to be addressed urgently in major cities across the country. Traditional traffic monitoring and management systems usually rely on fixed cameras and sensors for data collection. Although this method can monitor and manage traffic flow to a certain extent, there are problems such as insufficient flexibility, limited coverage, and high costs. In addition, the position and angle of fixed cameras also limit the monitoring of some complex traffic scenarios, especially the monitoring and response to traffic accidents and emergencies. In recent years, the rapid development of unmanned aerial vehicle (UAV) technology has provided a new solution for traffic monitoring. Compared with traditional fixed cameras, UAVs have flexible mobility and can monitor large-area traffic scenarios in real time in the air, thus improving the comprehensiveness and accuracy of data collection. It can provide more comprehensive traffic flow and road condition information, especially in scenarios such as large traffic accidents, traffic congestion, and emergencies, showing unique advantages.

[0003] Although existing UAV technologies have conducted research on vehicle speed estimation, they often directly estimate the speed based on the video captured by the UAV. However, this kind of estimation lacks accuracy and real-time performance and is difficult to be used in real-time traffic detection, and cannot provide timely and accurate decision-making basis for traffic management. Summary of the Invention

[0004] In view of this, the present invention proposes a vehicle speed detection method, device and equipment.

[0005] The technical solution of the present invention is realized as follows: In the first aspect of the present invention, a vehicle speed detection method is provided, including: Performing target recognition on the image to be recognized to obtain vehicle image data and lane line image data in each frame of the image; the vehicle image data includes the first position information of the vehicle, and the lane line image data includes the second position information and size information of the lane line; Determining a pixel-physical proportion parameter based on the pixel length corresponding to the size information of the lane line and the actual length of the lane line; Determining the pixel positions and pixel relative displacements of the vehicle and the lane line in each frame of the image according to the first position information and the second position information, and determining the actual relative displacement of the vehicle and the lane line in combination with the pixel-physical proportion parameter; Determining the actual driving speed of the vehicle based on the actual relative displacement and the vehicle driving time interval.

[0006] Based on the above technical solutions, preferably, before performing target recognition on the image to be recognized to obtain vehicle image data and lane line image data in each frame of the image, the method further includes: Controlling the drone to perform vertical shooting along the lane line in the vehicle driving area to obtain the image to be recognized.

[0007] Based on the above technical solutions, preferably, performing target recognition on the image to be recognized to obtain vehicle image data and lane line image data in each frame of the image includes: Training the original detection model with sample images to obtain a target detection model; the sample images are images containing vehicles and lane lines; the original detection model is a YOLOv8 network model containing a CBAM attention module; Inputting the image to be recognized into the target detection model for target recognition to obtain vehicle image data and lane line image data in each frame of the image.

[0008] Based on the above technical solutions, preferably, performing target recognition on the image to be recognized to obtain vehicle image data and lane line image data in each frame of the image includes: Performing target recognition on the image to be recognized, and screening out invalid image frames with tracking failures from multiple frames of images; Using linear fitting to supplement the vehicle image data and lane line image data in the invalid image frames to obtain vehicle image data and lane line image data in continuous image frames.

[0009] Based on the above technical solutions, preferably, combining the pixel physical proportion parameter to determine the actual relative displacement between the vehicle and the lane line includes using the following formula to determine the actual relative displacement:

[0010] where m is the pixel relative displacement, is the actual relative displacement, is the size information of the detected lane line, and L is the actual length of the lane line.

[0011] Based on the above technical solutions, preferably, determining the actual driving speed of the vehicle based on the actual relative displacement and the vehicle driving time interval includes using the following formula to determine the actual driving speed of the vehicle: ; where, is the actual driving speed of the upstream vehicle, is the actual driving speed of the downstream vehicle, is the true displacement of the vehicle in two different frames of images, is the true displacement of the lane line in two different frames of images, is the time interval between two different frames of images.

[0012] Based on the above technical solutions, preferably, after determining the actual driving speed of the vehicle based on the actual relative displacement and the vehicle driving time interval, the method further includes: Determining the traffic conditions of the current area based on the actual driving speed and the vehicle image data.

[0013] Even more preferably, a second aspect of the present invention provides a vehicle speed detection device, including: a target recognition module, a ratio determination module, a displacement determination module, and a speed determination module; wherein, The target recognition module is configured to perform target recognition on the image to be recognized, and obtain vehicle image data and lane line image data in each frame of image; the vehicle image data includes the first position information of the vehicle, and the lane line image data includes the second position information and size information of the lane line; The ratio determination module is configured to determine a pixel-physical ratio parameter based on the pixel length corresponding to the size information of the lane line and the actual length of the lane line; The displacement determination module is configured to determine the pixel positions and pixel relative displacements of the vehicle and the lane line in each frame of image according to the first position information and the second position information, and combine the pixel-physical ratio parameter to determine the actual relative displacements of the vehicle and the lane line; The speed determination module is configured to determine the actual driving speed of the vehicle based on the actual relative displacement and the vehicle driving time interval.

[0014] Even more preferably, a third aspect of the present invention provides an electronic device, including a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the vehicle speed detection method described in the first aspect.

[0015] Even more preferably, a fourth aspect of the present invention provides a computer storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the vehicle speed detection method described in the first aspect.

[0016] A vehicle speed detection method of the present invention has the following beneficial effects compared with the prior art: 1. Through high-precision object detection and tracking algorithms, vehicles and lane lines in the image to be recognized can be accurately identified, and their displacements can be calculated. By combining the time difference for speed calculation, the speed information of the vehicle can be obtained in real time with relatively small errors. Additionally, by processing consecutive video frames and calculating the vehicle speed in real time for each frame, it is very suitable for application scenarios such as real-time traffic monitoring, autonomous driving, and intelligent monitoring systems.

[0017] 2. By introducing the CBAM attention module into YOLOv8, YOLOv8 can more accurately focus on the key regions in the image, reduce the influence of noise and interference information, thereby improving the accuracy and robustness of detection. At the same time, for targets of different shapes and sizes, the CBAM attention module can adaptively adjust the attention region, thus better adapting to the diversity of targets, which helps the model maintain stable detection performance when facing targets of different sizes and shapes.

[0018] 3. The multi-object tracking method using linear fitting effectively addresses and compensates for the continuous data loss caused by target tracking failure, improving the robustness of the multi-object tracking algorithm and enabling it to maintain stable tracking performance in complex and changing traffic scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0020] Figure 1 It is a schematic flowchart of a vehicle speed detection method provided by an embodiment of the present invention; Figure 2 It is a schematic structural diagram of the YOLOv8 network model provided by an embodiment of the present invention; Figure 3 It is a schematic diagram of the application scenario of the vehicle speed detection method provided by an embodiment of the present invention; Figure 4 It is a schematic structural diagram of a vehicle speed detection device provided by an embodiment of the present invention; Figure 5 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] Next, in combination with the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0022] In some embodiments, as Figure 1 shown, Figure 1 is a schematic flow chart of a vehicle speed detection method provided by an embodiment of the present invention; a vehicle speed detection method provided by the present invention includes: S110, perform target recognition on the image to be recognized, and obtain vehicle image data and lane line image data in each frame of the image; the vehicle image data includes the first position information of the vehicle, and the lane line image data includes the second position information and size information of the lane line.

[0023] In this embodiment, after obtaining the image to be recognized, preprocessing can be performed on the image to be recognized, including denoising, enhancing contrast, adjusting the size, etc., to improve the accuracy of subsequent target recognition. On this basis, feature information is extracted from the image to be recognized, and the vehicle and lane lines are detected and located. For the vehicle, the first position information (such as the center point coordinates, bounding box, etc.) can be extracted; for the lane line, the second position information (such as the center line or edge line coordinates of the lane line) and size information (such as the length and width of the lane line) can be extracted, and direction information, etc. can also be included.

[0024] In some embodiments, before S110, performing target recognition on the image to be recognized and obtaining vehicle image data and lane line image data in each frame of the image, the method further includes: Controlling the drone to perform vertical shooting along the lane line of the vehicle driving area to obtain the image to be recognized.

[0025] Exemplarily, a drone device with a high-definition camera and stable flight performance can be used to perform vertical shooting along the road with white lane lines, configure the camera parameters of the drone, such as resolution (such as 1920×1080), frame rate (such as 30 frames per second), etc., to ensure that the video quality meets the requirements of subsequent processing. The real-time video stream is captured by the camera according to the preset parameters and transmitted to the server or edge device for real-time frame extraction processing. The video decoding technology (such as the FFmpeg tool) is used to perform format conversion and frame decoding on the video data, so as to obtain the image to be recognized containing a sequence of continuous image frames. By using the drone to perform vertical shooting along the lane line of the vehicle driving area, the intuitive position relationship between the vehicle and the lane line is ensured, the data conversion link and detection error are reduced, the data processing difficulty is reduced, and the detection efficiency of the vehicle speed and the reliability of the detection result are improved.

[0026] In some embodiments, in S110, target recognition is performed on the image to be recognized, and vehicle image data and lane line image data in each frame of the image are obtained, including: The original detection model is trained using the sample image to obtain a target detection model; the sample image is an image containing vehicles and lane lines; the original detection model is a YOLOv8 network model containing a CBAM attention module; The image to be recognized is input into the target detection model for target recognition, and vehicle image data and lane line image data in each frame of the image are obtained.

[0027] In this embodiment, by collecting rich sample images containing vehicles and white lane lines, annotating the image frames, and then training the original detection model using the annotated image frames, a target detection model with high precision and high real-time performance is obtained. Here, data augmentation techniques such as image rotation, scaling, and illumination adjustment can be introduced to enhance the robustness of the model. When the target detection model receives a frame of video image, it can quickly extract the deep features of the image and recognize all the vehicles and lane lines in it, accurately calibrate the positions and sizes of each vehicle and lane line in the image, so as to realize the recognition of lane lines in the video stream, as well as the recognition and classification of vehicles.

[0028] Exemplarily, as Figure 2 shown Figure 2Schematic diagram of the structure of the YOLOv8 network model provided by the embodiments of the present invention; the YOLOv8 network model applies advanced object detection algorithms. Here, a CBAM attention module is added to the YOLOv8 network. The CBAM attention module helps the convolutional neural network better understand the local and global information in the image, which can improve the overall detection performance and reduce the false detection and missed detection of vehicles and lane lines in each frame of the image. CBAM combines the channel attention and spatial attention mechanisms. The channel attention mechanism weights each channel of the feature map, emphasizes the channels useful for object detection, and suppresses irrelevant channels. This helps the model focus on the features that contribute most to the detection task. The spatial attention mechanism weights the feature map in the spatial dimension, emphasizes the location of the target object, and reduces the interference of background noise. This helps the model more accurately locate the target. In the figure, Conv, C2f, SPPF, Concat, Upsample, C2f-CBAM, and Detect are the convolutional layer, the CSP (Cross Stage Partial Networks) layer with two convolutional modules, the improved pooling module, the splicing layer, the upsampling layer, the feature enhancement module, and the detection head, respectively. Among them, SPPF is applied in the neck network, which can effectively fuse feature information of different scales, thereby improving the model's ability to recognize targets. C2f-CBAM is a network structure that combines the C2f structure with the CBAM attention mechanism and can be used as an enhancement module in the YOLOv8 Backbone or neck module to improve the performance of feature extraction and detection tasks. The Detect part is responsible for the final object detection and classification tasks, including generating detection results and classification results.

[0029] In some embodiments, S110, perform object recognition on the image to be recognized, and obtain vehicle image data and lane line image data in each frame of the image, including: Perform object recognition on the image to be recognized, and screen out invalid image frames with tracking failures from multiple frames of images; Use linear fitting to supplement the vehicle image data and lane line image data in the invalid image frames, and obtain the vehicle image data and lane line image data in consecutive image frames.

[0030] Due to the non-100% accuracy of object detection and multi-object tracking algorithms, tracking failures may occur. Whether it is a vehicle or a lane line tracking failure, it will affect the calculation of displacement. Therefore, it is necessary to supplement the position data of the tracking failure data. Since the displacement of the vehicle or the lane line caused by the flight of the drone is relatively stable and will not have a numerical mutation in a short time, the method of linear fitting can be used to numerically supplement the failed tracking target.

[0031] Linear fitting is used to describe the linear relationship between two variables through a straight line. Its goal is to find the straight line that best fits the data points, so that the error between the predicted value and the actual observed value is minimized. This straight line can be determined by using the least squares method, which minimizes the sum of the squares of the perpendicular distances from all data points to the straight line. The least squares formula is as follows: ; where, is the slope, is the intercept, is the number of data points, is the sum of all independent variables, is the sum of all dependent variables, is each and the sum of the products, is each the sum of the squares.

[0032] Through linear fitting, based on the data of the front and back valid image frames, the data in the invalid image frames can be reasonably estimated, so as to maintain the continuity of the data, and it can also make the object tracking algorithm maintain a high accuracy in continuous image frames.

[0033] S120, determine the pixel-physical proportion parameter based on the pixel length corresponding to the size information of the lane line and the actual length of the lane line.

[0034] In this embodiment, the pixel-physical proportion parameter can be calculated by the following formula: pixel-physical proportion parameter = pixel length of the lane line / actual length of the lane line. Assume that the actual width of the lane line is 6 cm, and the measured pixel width in the image is 96 pixels, then the pixel-physical proportion parameter is 0.0625 cm / pixel, that is, each pixel represents approximately 0.0625 cm of the actual length.

[0035] S130, determine the pixel position and pixel relative displacement of the vehicle and the lane line in each frame of the image according to the first position information and the second position information, and combine the pixel-physical proportion parameter to determine the actual relative displacement of the vehicle and the lane line.

[0036] After obtaining the pixel positions of the vehicle and the lane lines in each frame of the image, the relative pixel displacement between them can be calculated by comparing the position coordinates between consecutive frames. The pixel-to-physical ratio parameter represents the length corresponding to each pixel in the real world, from which the actual relative displacement between the vehicle and the lane lines can be obtained.

[0037] In some embodiments, in S130, determining the actual relative displacement between the vehicle and the lane lines in combination with the pixel-to-physical ratio parameter includes determining the actual relative displacement using the following formula:

[0038] where m is the relative pixel displacement, is the actual relative displacement, is the size information of the detected lane line, and L is the actual length of the lane line.

[0039] S140, determining the actual driving speed of the vehicle based on the actual relative displacement and the vehicle driving time interval.

[0040] In this embodiment, a high-precision multi-object tracking algorithm can be selected. According to the vehicle detection results, the tracking trajectories of each vehicle and each lane line are generated. By extracting the pixel positions of the vehicle and the lane lines in each frame, the relative displacement of the vehicle is calculated separately according to the different up and down directions, and the actual relative displacement is obtained in combination with the pixel-to-physical ratio parameter. Finally, the actual driving speed of the vehicle is determined according to the actual displacement between two frames and the vehicle driving time interval. Here, the up direction and the down direction are opposite to each other.

[0041] In some embodiments, in S140, determining the actual driving speed of the vehicle based on the actual relative displacement and the vehicle driving time interval includes determining the actual driving speed of the vehicle using the following formula: ; where is the actual driving speed of the vehicle moving upward, is the actual driving speed of the vehicle moving downward, is the true displacement of the vehicle in two different frames of the image, is the true displacement of the lane line in two different frames of the image, is the time interval between two different frames of the image.

[0042] In some embodiments, after S140, determining the actual driving speed of the vehicle based on the actual relative displacement and the vehicle driving time interval, the method further includes: Determining the traffic condition of the current area based on the actual driving speed and the vehicle image data.

[0043] Based on information such as vehicle speed, quantity, and direction, different traffic scenarios can be defined by setting different thresholds and logical conditions, including smooth traffic, slow traffic, congestion, reverse driving, speeding, illegal parking, etc. Timely warnings are given for illegal traffic behaviors and output to the monitoring system in real time, providing a basis for auxiliary decision-making for traffic management departments.

[0044] In one example, for the speeding and extremely slow driving scenarios: According to the different driving characteristics of vehicle models, maximum speed thresholds are set for multiple types of vehicle models. If the threshold is exceeded, it is determined that the vehicle is speeding. Considering that the speed limits of different vehicles are inconsistent, three categories of small cars, medium-sized cars, and large trucks are divided. Similarly, a minimum speed threshold is set. If the vehicle speed is lower than this threshold and greater than 0, it is extremely slow driving. For the traffic congestion state scenario: The traffic congestion state is mainly judged based on the average vehicle speed and the number of vehicles within the current field of view. By setting threshold parameters, the traffic congestion state can be divided into three states: smooth, slow, and congested. Through drone patrol, the traffic state of the road can be monitored in real time, significantly improving the efficiency and accuracy of urban traffic management. For the reverse driving scenario: Reverse driving can easily cause serious traffic accidents, such as chain-reaction rear-end collisions, and will also lead to traffic chaos, affecting normal traffic order and posing a serious threat to the lives of passengers and pedestrians. By judging whether the driving direction of the vehicle changes in the opposite direction on the specified lane, vehicles with reverse driving can be effectively detected. For the illegal parking and traffic rear-end collision scenarios: The vehicle speed in illegal parking and traffic rear-end collision accidents (already occurred) is 0. By setting the speed parameter, vehicles with a speed of 0 or close to 0 may be illegally parked or in a traffic rear-end collision. When the number of such vehicles is 1, it is determined as a suspected illegal parking; when the number of such vehicles is not less than 2, it is determined as a suspected traffic rear-end collision.

[0045] In an alternative embodiment, please refer to Figure 3 , Figure 3Schematic diagram of the application scenario of the vehicle speed detection method provided by the embodiment of the present invention; as a whole, it can be divided into three modules: (1) identifying vehicles and lane lines based on the improved YOLOv8 algorithm with CBAM; (2) calculating the vehicle speed by combining the Bot-SORT multi-object tracking algorithm with linear fitting; (3) designing various traffic application scenarios based on vehicle speed, quantity, and direction information. By processing the video captured by the drone frame by frame and using the YOLOv8 network model for feature extraction, vehicle information and lane line information are obtained. Furthermore, by combining the Bot-SORT multi-object tracking algorithm with linear fitting, the true displacement of the vehicle is determined using the vehicle displacement and lane line displacement, and the true vehicle speed is obtained. On this basis, the driving state of the vehicle can be judged according to the vehicle speed, such as speeding or crawling. The traffic congestion condition can be judged using the average vehicle speed and the number of vehicles, such as smooth, slow, or congested. Whether the vehicle is driving in reverse can be judged according to the vehicle speed direction. Illegal parking and traffic rear-end collisions can be judged according to the vehicle speed magnitude and vehicle speed.

[0046] In some embodiments, please refer to Figure 4 , Figure 4 Schematic diagram of the structure of a vehicle speed detection device provided by the embodiment of the present invention. The present invention provides a vehicle speed detection device 400, including: a target recognition module 410, a ratio determination module 420, a displacement determination module 430, and a speed determination module 440; wherein, The target recognition module 410 is configured to perform target recognition on the image to be recognized, and obtain vehicle image data and lane line image data in each frame of the image; the vehicle image data includes the first position information of the vehicle, and the lane line image data includes the second position information and size information of the lane line; The ratio determination module 420 is configured to determine the pixel-physical ratio parameter based on the pixel length corresponding to the size information of the lane line and the actual length of the lane line; The displacement determination module 430 is configured to determine the pixel positions and pixel relative displacements of the vehicle and the lane line in each frame of the image according to the first position information and the second position information, and combine the pixel-physical ratio parameter to determine the actual relative displacement of the vehicle and the lane line; The speed determination module 440 is configured to determine the actual driving speed of the vehicle based on the actual relative displacement and the vehicle driving time interval.

[0047] In some embodiments, the vehicle speed detection device 400 further includes a control module; the control module is specifically configured to: Control the drone to perform vertical shooting along the lane line in the vehicle driving area to obtain the image to be recognized.

[0048] In some embodiments, the target recognition module 410 is specifically configured to: The original detection model is trained using sample images to obtain the target detection model; the sample images are images containing vehicles and lane lines; the original detection model is a YOLOv8 network model containing a CBAM attention module. The image to be recognized is input into the target detection model for target recognition to obtain vehicle image data and lane line image data in each frame of the image.

[0049] In some embodiments, the target recognition module 410 is specifically further configured to: Perform target recognition on the image to be recognized, and screen out invalid image frames with tracking failures from multiple frames of images; Use linear fitting to supplement the vehicle image data and lane line image data in the invalid image frames to obtain the vehicle image data and lane line image data in consecutive image frames.

[0050] In some embodiments, the displacement determination module 430 is specifically configured to determine the actual relative displacement using the following formula:

[0051] where m is the pixel relative displacement, is the actual relative displacement, is the size information of the detected lane line, and L is the actual length of the lane line.

[0052] In some embodiments, the speed determination module 440 is specifically configured to determine the actual driving speed of the vehicle using the following formula: ; where, is the actual driving speed of the upstream vehicle, is the actual driving speed of the downstream vehicle, is the true displacement of the vehicle in two different frames of images, is the true displacement of the lane line in two different frames of images, is the time interval between two different frames of images.

[0053] In some embodiments, the speed determination module 440 is specifically further configured to: Determine the traffic condition of the current area based on the actual driving speed and vehicle image data.

[0054] It should be noted that the vehicle speed detection device provided in the embodiments of the present application and the vehicle speed detection method provided in the embodiments of the present application are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned vehicle speed detection method, and repeated parts will not be elaborated.

[0055] In some embodiments, please refer to Figure 5 , Figure 5A schematic structural diagram of an electronic device provided by an embodiment of the present application. An electronic device 500 provided by an embodiment of the present application includes a processor 510 and a memory 520; the memory 520 stores a computer program, wherein the computer program, when executed by the processor, implements the above-mentioned vehicle speed detection method.

[0056] Specifically, the processor 510 may include, for example, a general microprocessor, an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application-specific integrated circuit (ASIC)), etc. The processor 510 may also include on-board memory for caching purposes. The processor 510 may be a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.

[0057] The memory 520 may be, for example, any medium capable of containing, storing, transmitting, propagating, or transporting instructions. For example, the memory 520 may include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, components, or propagation media. Specific examples of the memory 520 include: magnetic storage devices, such as magnetic tapes or hard disk drives (HDDs); optical storage devices, such as compact discs (CD-ROMs); may also be, for example, random access memory (RAM) or flash memory; and / or wired / wireless communication links.

[0058] The present application also provides a computer-readable medium having a computer program stored thereon, and the program, when executed by the processor, implements the above-mentioned vehicle speed detection method. The computer-readable medium may be included in the device / device / system described in the above embodiment; or may exist separately and not be assembled into the device / device / system. The above computer-readable medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiment of the present application is implemented.

[0059] According to an embodiment of the present application, a computer-readable medium may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted by any appropriate medium, including but not limited to: wireless, wired, optical fiber cable, radio frequency signal, etc., or any suitable combination of the above.

[0060] Those skilled in the art can understand that the features recited in the various embodiments and / or claims of the present application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly recited in the present application. In particular, without departing from the spirit and teachings of the present application, the features recited in the various embodiments and / or claims of the present application can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present application. Therefore, the scope of the present application should not be limited to the above embodiments, but should be determined not only by the appended claims, but also by the equivalents of the appended claims. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A vehicle speed detection method, characterized in that: include: Performing target recognition on the image to be recognized, obtaining vehicle image data and lane line image data in each frame of the image; the vehicle image data includes first position information of the vehicle, and the lane line image data includes second position information and size information of the lane line; Determine a pixel-to-object ratio parameter based on a pixel length corresponding to the size information of the lane line and an actual length of the lane line; Determine the pixel position and pixel relative displacement of the vehicle and the lane line in each frame of the image according to the first position information and the second position information, and determine the actual relative displacement of the vehicle and the lane line in combination with the pixel physical object ratio parameter; An actual travel speed of the vehicle is determined based on the actual relative displacement and a vehicle travel time interval.

2. The vehicle speed detection method according to claim 1, characterized in that: Before performing target recognition on the image to be recognized and obtaining vehicle image data and lane line image data in each frame of the image, the method further includes: The drone is controlled to shoot vertically along the lane line of the vehicle driving area to obtain the image to be identified.

3. The vehicle speed detection method according to claim 1, characterized in that: The target recognition of the image to be recognized and the acquisition of vehicle image data and lane line image data in each frame of the image include: The original detection model is trained using sample images to obtain a target detection model; the sample images are images containing vehicles and lane lines; the original detection model is a YOLOv8 network model containing a CBAM attention module; The image to be identified is input into the target detection model for target recognition, and the vehicle image data and lane line image data in each frame of the image are obtained.

4. The vehicle speed detection method according to claim 1, characterized in that: The target recognition of the image to be recognized and the acquisition of vehicle image data and lane line image data in each frame of the image include: Perform target recognition on the image to be recognized, and filter out invalid image frames that fail to track from multiple frames of images; The vehicle image data and lane line image data in the invalid image frame are supplemented by linear fitting to obtain the vehicle image data and lane line image data in the continuous image frame.

5. The vehicle speed detection method according to claim 1, characterized in that: The determining the actual relative displacement between the vehicle and the lane line in combination with the pixel-to-object ratio parameter includes determining the actual relative displacement using the following formula: ; Where m is the relative displacement of pixels, is the actual relative displacement, is the size information of the detected lane line, and L is the actual length of the lane line.

6. The vehicle speed detection method according to claim 5, characterized in that: The determining the actual driving speed of the vehicle based on the actual relative displacement and the vehicle driving time interval includes determining the actual driving speed of the vehicle using the following formula: ; in, is the actual speed of the uplink vehicle, is the actual speed of the downlink vehicle, is the actual displacement of the vehicle in two different images, is the actual displacement of the lane line in two different images, is the time interval between two different image frames.

7. The vehicle speed detection method according to claim 1, characterized in that: After determining the actual travel speed of the vehicle based on the actual relative displacement and the vehicle travel time interval, the method further includes: The traffic condition of the current area is determined based on the actual driving speed and the vehicle image data.

8. A vehicle speed detection device, characterized in that: include: target recognition module, ratio determination module, displacement determination module and speed determination module; wherein, The target recognition module is configured to perform target recognition on the image to be recognized, and obtain vehicle image data and lane line image data in each frame of the image; the vehicle image data includes first position information of the vehicle, and the lane line image data includes second position information and size information of the lane line; The ratio determination module is configured to determine a pixel-to-object ratio parameter based on a pixel length corresponding to the size information of the lane line and an actual length of the lane line; The displacement determination module is configured to determine the pixel position and pixel relative displacement of the vehicle and the lane line in each frame of the image according to the first position information and the second position information, and determine the actual relative displacement of the vehicle and the lane line in combination with the pixel physical object ratio parameter; The speed determination module is configured to determine the actual driving speed of the vehicle based on the actual relative displacement and the vehicle driving time interval.

9. An electronic device comprising a processor and a memory; the memory stores a computer program, wherein: When the computer program is executed by the processor, the vehicle speed detection method according to any one of claims 1 to 7 is implemented.

10. A computer storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the vehicle speed detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method for monitoring overspeed driving by using unmanned aerial vehicle, monitoring system and unmanned aerial vehicle

    CN111583670A

  • High-risk road section identification system and method based on driving video

    CN114926729A

  • Method, system and equipment for measuring width of slow road

    CN117745793A

  • Vehicle length determination method, distance measurement model training method, equipment and storage medium

    CN117765056A

  • Vehicle speed recognition method, device and equipment based on deep learning and medium

    CN117934555A