Vehicle speeding detection method and system based on Haar-like features and frame matching

Through the combination of the YOLO model based on Haar-like features and the Hungarian matching algorithm, the real-time and accuracy of vehicle speed detection are achieved, the problem of vehicle matching failure in complex environments is solved, and the accuracy and real-timeness of vehicle detection are improved.

CN115050009BActive Publication Date: 2025-08-12QINGDAO WINDAKA TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210795826.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-07
Publication Date
2025-08-12
Estimated Expiration
2042-07-07

AI Technical Summary

Technical Problem

The existing vehicle speed detection technology is difficult to achieve both real-time and accuracy in complex environments, especially in the case of ambient light changes and occlusion, which makes it difficult for the vehicle to calculate distance in continuous frame images.

Method used

Vehicle detection is performed using the YOLO model based on Haar-like features, and inter-frame matching is performed in combination with the Hungarian matching algorithm. The vehicle position information is used for fast and accurate matching, and the vehicle tracking strategy is improved to achieve real-time accurate tracking and speed judgment.

Benefits of technology

It improves the accuracy and real-timeness of vehicle detection, and can accurately determine whether the vehicle is speeding in complex scenarios, reduces the computational complexity and enhances noise immunity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115050009B_ABST
    Figure CN115050009B_ABST
Patent Text Reader

Abstract

The present disclosure proposes a vehicle speeding detection method and system based on Haar-like features and frame matching, which obtains a vehicle image to be detected; inputs the obtained image into a trained Haar-YOLO model to extract candidate regions of the target vehicle and the corresponding Haar-like features; uses the Hungarian matching algorithm to match the vehicle frame by frame based on the candidate regions or Haar-like features, obtains a matching result of the position of the target vehicle in each frame image, and determines whether the vehicle is speeding; the present disclosure detects the vehicle based on the YOLO model of Haar-like features, and uses the Hungarian assignment algorithm to quickly and accurately match the target vehicle between each frame image during the tracking process. In complex community scenarios, the method can realize real-time and accurate tracking of the vehicle and determine whether it is speeding by combining the position relationship of the vehicle in consecutive frame images, thereby achieving real-time and accuracy of vehicle speed detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field related to intelligent monitoring, and more specifically, to a vehicle speeding detection method and system based on Haar-like features and frame matching. Background Art

[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.

[0003] Object tracking technology, a branch of computer vision research, is widely used across numerous industries. It is a technique capable of identifying and capturing identical objects that appear over time within complex environments. It is primarily used to characterize the motion trajectory of visible objects within a surveillance area. Object tracking technology has broad application: any visible object can be captured through appropriate detection and tracking mechanisms. However, the specific detection methods and tracking strategies often depend on the unique properties of the object being tracked.

[0004] Among them, technical achievements related to vehicle tracking are also widely used in the transportation industry. The accuracy and real-time performance of vehicle tracking technology are also affected by the vehicle detection method and vehicle tracking strategy. Unlike general tracking targets, the speed and trajectory characteristics of the vehicle determine that the tracking method for the vehicle must be both real-time and accurate. At the same time, based on vehicle tracking technology, methods related to license plate violation detection have also been proposed, among which vehicle speeding detection is more widely used. During the vehicle tracking process, changes in ambient lighting and occlusion are likely to cause the vehicle to fail to match in consecutive frame images, causing the vehicle to temporarily disappear for a period of time and making it impossible to calculate the distance to the vehicle. Summary of the Invention

[0005] In order to solve the above problems, the present disclosure proposes a vehicle speeding detection method and system based on Haar-like features and frame matching. The vehicle is detected based on the YOLO model of Haar-like features, and the Hungarian assignment algorithm is used to quickly and accurately match the target vehicle between each frame image during the tracking process. Compared with other improved tracking methods based solely on texture analysis and shape models, the proposed method can realize real-time and accurate tracking of vehicles and determine whether they are speeding in complex community scenes by combining the position relationship of vehicles in continuous frame images, thereby achieving real-time and accuracy of vehicle speed detection.

[0006] In order to achieve the above objectives, the present disclosure adopts the following technical solutions:

[0007] One or more embodiments provide a vehicle speeding detection method based on Haar-like features and frame matching, comprising the following steps:

[0008] Obtaining an image of a vehicle to be detected;

[0009] Input the acquired image into the trained Haar-YOLO model to extract the candidate area of the target vehicle and the corresponding Haar-like features;

[0010] The Hungarian matching algorithm is used to match the vehicle frame by frame based on the candidate region or Haar-like features to obtain the matching results of the target vehicle's position in each frame image and determine whether the vehicle is speeding;

[0011] The Haar-YOLO model is trained with the target vehicle image as input and the target vehicle candidate region and Haar-like features as output.

[0012] One or more embodiments provide a vehicle speeding detection system based on Haar-like features and frame matching, including:

[0013] Data acquisition module: configured to acquire an image of a vehicle to be detected;

[0014] Calibration and feature extraction module: configured to input the acquired image into the trained Haar-YOLO model to extract the candidate region of the target vehicle and the corresponding Haar-like features;

[0015] Judgment module: configured to match the vehicle frame by frame using the Hungarian matching algorithm based on the candidate region or Haar-like features, obtain the matching result of the position of the target vehicle in each frame image, and judge whether the vehicle is speeding;

[0016] The Haar-YOLO model is trained with the target vehicle image as input and the target vehicle candidate region and Haar-like features as output.

[0017] An electronic device, characterized in that it includes a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the steps described in the above method are completed.

[0018] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps of the above method are completed.

[0019] Compared with the prior art, the present invention has the following beneficial effects:

[0020] The detection method of the YOLO model based on Haar-like features proposed in this disclosure has good noise resistance and can accurately locate the vehicle. The Hungarian matching algorithm used in the tracking process can effectively utilize the target's position information for fast and accurate matching, is not restricted by the similarity judgment standard, and has lower computational complexity.

[0021] The advantages of the present disclosure and additional advantages will be described in detail in the following specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings, which constitute a part of the present disclosure, are used to provide a further understanding of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure but do not constitute a limitation of the present disclosure.

[0023] Figure 1 is a flow chart of the detection method of Example 1 of the present disclosure;

[0024] Figure 2 This is a specific implementation process of the detection method of Example 1 of the present disclosure;

[0025] Figure 3 Schematic diagram of the Haar-YOLO model structure of Example 1 of the present disclosure; DETAILED DESCRIPTION

[0026] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0027] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present disclosure belongs.

[0028] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof. It should be noted that, in the absence of conflict, the various embodiments in the present disclosure and the features in the embodiments can be combined with each other. The embodiments will be described in detail below with reference to the accompanying drawings.

[0029] Example 1

[0030] In the technical solutions disclosed in one or more embodiments, Figure 1-3 As shown in FIG, the vehicle speeding detection method based on Haar-like features and frame matching includes the following steps:

[0031] S1: Acquire the vehicle image to be detected;

[0032] S2: Input the acquired image into the trained Haar-YOLO model to extract the candidate region of the target vehicle and the corresponding Haar-like features;

[0033] S3: Based on the candidate regions or Haar-like features, the Hungarian matching algorithm is used to match the vehicles frame by frame to obtain the matching results of the target vehicle's position in each frame image and determine whether the vehicle is speeding.

[0034] The Haar-YOLO model is trained with the target vehicle image as input and the target vehicle candidate region and Haar-like features as output.

[0035] The speeding detection method of this embodiment improves the problems existing in the existing vehicle speeding detection technology from two aspects: vehicle detection and vehicle tracking strategy, so as to meet the real-time and accuracy requirements of detection.

[0036] The detection method of the YOLO model based on Haar-like features proposed in this embodiment has good noise resistance and can accurately locate the vehicle. The Hungarian matching algorithm used in the tracking process can effectively use the target's position information for fast and accurate matching. Compared with the matching algorithm based on texture analysis, it is not restricted by the similarity judgment standard and has lower computational complexity.

[0037] Optionally, the Haar-like features include edge features, linear features, center features, and diagonal features.

[0038] In this embodiment, Haar-like features are selected as feature representations of vehicles to improve the accuracy and efficiency of vehicle detection.

[0039] Existing vehicle detection methods generally include optical flow method, frame difference method and background difference method, but these methods cannot take into account both detection accuracy and real-time performance at the same time. This embodiment builds a YOLO model based on the Haar-like features of vehicles to detect vehicles. The grayscale value changes of each point in the target candidate area are reflected from multiple angles and levels. Since the vehicle has the characteristics of unchanged shape and regular shape edges during driving, and the Haar-like features can carefully reflect the illumination changes on the surface of the detection object, it has strong robustness for objects that are not easy to deform and difficult to change the motion trajectory, and is therefore suitable for representing the characteristics of the vehicle.

[0040] Optionally, step S3 includes the following steps:

[0041] S31: Match vehicles frame by frame using the Hungarian matching algorithm based on the candidate regions;

[0042] S32: When the matching fails in step S31, the vehicle for which the matching fails is matched again using the Hungarian matching algorithm based on the associated paths and Haar-like features.

[0043] A specific implementation method, the matching method in step S3, may include the following steps:

[0044] Step 3-1: Build the current tracking list and temporary tracking list, and add the target vehicle appearing in the image as the target vehicle to the current tracking list;

[0045] Specifically, the detected targets are tracked, and new targets appearing in the first frame of the image are added to the tracking list.

[0046] Step 3-2: Iterate the continuous frame images, select two adjacent images in sequence in each iteration, and use the Hungarian algorithm to match the target vehicle objects detected in the images; if the match fails, the corresponding target vehicle is added to the temporary tracking list.

[0047] Match the vehicles in the temporary tracking list based on Haar-like features.

[0048] Step 3-3: For vehicles in the temporary tracking list, images are collected again from areas where the vehicle may pass based on the vehicle's motion characteristics and road conditions, and the vehicle is detected using the Haar-YOLO model, and the detected vehicle is matched with Haar-like features.

[0049] After the above steps, if the target vehicle matching still fails, the target vehicle can be deleted from the tracking list. The tracking list can also be divided into a current tracking list and a temporary tracking list. The vehicle with failed matching is deleted from the current tracking list and added to the temporary tracking list, and the corresponding failed matching frame count is increased by 1.

[0050] Step 3-4: For successfully matched vehicles, the instantaneous speed of the current vehicle is calculated through the frame time and the displacement generated within the monitoring range through the conversion of the coordinate scale to determine whether the vehicle is speeding.

[0051] Optionally, the instantaneous speed of the current vehicle can be calculated by converting the relative displacement generated within the monitoring range within a single frame time into a real coordinate scale to determine whether the vehicle is speeding.

[0052] Specifically, for a successfully matched vehicle object, the corresponding failed frame count is set to 0. According to the failed frame count and the change in relative position, the actual instantaneous speed is obtained through scale conversion.

[0053] If the speed of a vehicle exceeds the set speed threshold, it is considered that the vehicle has exceeded the speed limit, and the community monitoring will promptly issue a warning through the alarm.

[0054] Repeat steps 3-1 to 3-3 to continuously update the vehicle information in the current tracking list and the temporary tracking list, and determine whether the vehicle has left the monitoring range based on the matching failure frame count corresponding to the vehicle object. If the vehicle has exceeded the monitoring field of view, the vehicle will be deleted from the temporary tracking list.

[0055] In this embodiment, for vehicles with failed matching, this method sets up a temporary to-be-tracked list to record the vehicle object. When the object reappears, it can calculate the distance to the target vehicle based on the cumulative count of failed matching frames and the change in the relative position of the vehicle. This method detects speeding vehicles within a community and issues a prompt alarm to prevent vehicle accidents within the community.

[0056] Furthermore, the specific structure of the Haar-YOLO model is as follows Figure 3 As shown in Figure 1, it includes multiple cascaded convolutional layers, and the last convolutional layer is connected in parallel to two fully connected layers.

[0057] Optionally, the size of the image area extracted by multiple cascaded convolutional layers is reduced in sequence, and a retention parameter is set between each level. The retention parameter represents the degree of retention of the analysis results from the previous layer during each information transmission process, and the value is 0 to 1.

[0058] This embodiment selectively integrates the analysis results of the current layer with the information carried by the previous layer by setting retention parameters. The improved Haar-YOLO model can selectively integrate the feature analysis information of each layer according to the detection accuracy requirements while maintaining detection efficiency, thereby accurately calibrating the vehicle and extracting its Haar-like features.

[0059] The feature extraction of the convolutional layer of Haar-YOLO is as follows:

[0060] T k =φ(T k-1 )+w k-1 T k-1

[0061] Where T k represents the information of the kth layer, and T k-1 represents the information of the previous layer (i.e., k-1 layer), φ represents the convolution operation and the activation function taken, and w k-1 It indicates the degree of retention of the previous layer of information, with a value of 0 to 1.

[0062] The information retention parameters for each layer need to be learned using an appropriate objective function. The resulting YOLO-CM model selectively integrates feature information across layers while meeting the corresponding objective function requirements. This model maintains accuracy without excessive computational complexity due to excessive feature analysis layers, thus meeting the accuracy and real-time requirements for vehicle detection and recognition.

[0063] Compared with R-CNN and the improved model based on R-CNN, although the YOLO model has improved the efficiency of locating the target candidate area, the detection accuracy has decreased. Therefore, in order to fully utilize the feature analysis information generated by each convolutional layer in the YOLO model, this embodiment uses the idea of memory network to improve the information transmission process of the YOLO model. In each information transmission process, the Haar-YOLO model proposed in the present invention selectively integrates the analysis results of the current layer with the information carried by the previous layer, thereby ensuring that the feature information generated by each convolutional layer is fully utilized to improve the accuracy of target detection.

[0064] The objective function of the Haar-YOLO model includes the weighted integration of the decision losses generated by the two fully connected layers to form a global loss function, where the error of the candidate region is measured in the form of the intersection-in-union ratio, and the decision loss generated by the Haar feature is calculated as softmax.

[0065] The loss function used by the Haar-YOLO model is as follows:

[0066]

[0067] Among them, P R represents the calibration result of the vehicle candidate area, P Haar represents the extraction result of the Haar-like feature of the vehicle, and w R With w Haar Represent the weights of the two respectively, and L is the loss function used for each attribute. In the community monitoring scenario, the accuracy of the vehicle's calibration position and the accuracy of its Haar-like feature extraction are equally important, so their corresponding weights are the same. Set w R With w Haar Similarly, it can be adjusted according to needs.

[0068] The improved Haar-YOLO model of this embodiment can selectively integrate feature analysis information of each layer according to the detection accuracy requirement while ensuring detection efficiency, so as to accurately calibrate the vehicle and extract its Haar-like features at the same time.

[0069] In order to make the candidate area positioning and Haar-like feature representation of the vehicle more accurate at the same time, in this embodiment, two corresponding fully connected layers are designed respectively, and the judgment losses generated by the two fully connected layers are weighted and integrated to form a global loss function. With this global loss function as the objective function, the Haar-YOLO model takes the community vehicle image as input, and at the same time trains the actual candidate area corresponding to the vehicle and the Haar-like feature vector as output. The trained Haar-YOLO model can accurately locate the vehicle in the image to be detected and accurately extract its Haar-like features, without losing the judgment of another indicator due to excessive focus on the accuracy of a certain detection indicator.

[0070] In some embodiments, a method for training a Haar-YOLO model is also included, comprising the following steps:

[0071] Step 21: Get vehicle dataset;

[0072] Collect a vehicle dataset from the community and annotate the vehicles with appropriate candidate regions. In the community monitoring scenario, collect a vehicle dataset from community monitoring and use it as a training set to train the YOLO detection model.

[0073] Optionally, the method of this embodiment can be used for detection in a community scenario, and vehicle driving data in the community to be detected can be collected. The time span for collecting data in the community vehicle data set can be set to 6 months, and vehicles appearing on various roads between 6 am and 10 pm every day can be recorded.

[0074] Before model training, the vehicles in the dataset need to be calibrated with appropriate candidate regions, and their Haar-like features need to be calculated and represented as feature vectors.

[0075] Step 22: Calibrate the target vehicle in the dataset image with a suitable candidate region, and extract Haar-like features from the calibrated candidate region;

[0076] Step 23: Train the YOLO model using the vehicle image as input and the vehicle's Haar-like features and vehicle candidate regions as output;

[0077] Step 24: Correct the model parameters based on the candidate region positioning error and Haar-like feature judgment error of each training cycle.

[0078] In addition, in order to accurately and in real time track the vehicle and calculate its instantaneous speed, this method uses the Hungarian matching algorithm to optimize the tracking matching process, and formulates a series of compensatory measures for matching failures. The specific matching process is as follows: Figure 2As shown in the figure, in the frame-by-frame matching process of vehicles, the Haar-like features are not directly used to compare the similarity. Instead, the position information of the detected target vehicle, i.e., the vehicle candidate area, is first used for matching to further improve the matching efficiency.

[0079] Since the movement of vehicles is directionally invariant, the target vehicle is often unable to overtake or change direction within a few frames, especially in community application scenarios. Therefore, the Hungarian algorithm is used to transform the frame-by-frame matching problem of the target vehicle into an assignment problem and solve it. The purpose of the Hungarian algorithm is to establish a one-to-one mapping relationship between the target vehicles in two consecutive frames of images, and to minimize the sum of the distances generated by these mapping relationships. Compared with the matching method based on the similarity of texture features, it has higher accuracy and efficiency. The comparison of Haar-like features is usually used in cases where matching fails. Haar-like features analyze the vehicle from multiple angles. Even if the target vehicle has only a part of the visible area due to occlusion or lighting changes, it can still be matched to a certain extent based on the features corresponding to that area.

[0080] When the target vehicle matching fails, this method can make full use of the road conditions to predict the area where the vehicle is likely to appear, and use the Haar-YOLO model again to detect the vehicles in the area and extract their Haar-like features. By comparing the Haar-like features, the vehicle that meets the conditions is associated with the target vehicle to be matched in the previous frame, that is, vehicle matching is performed. If no qualified vehicle is found in the predicted area, scanning Haar feature matching is performed on the remaining area of the entire image. Although the direct use of the scanning Haar feature matching strategy can also achieve the same effect, this method uses road condition information to narrow the vehicle matching range to reduce the time complexity of the tracking algorithm. If the target vehicle is still not successfully matched after the above steps, the corresponding matching failure frame count is increased by one, and the target vehicle is deleted from the tracking list and added to the temporary list to be tracked.

[0081] When all the target vehicles that can be matched have been matched, the instantaneous speed of each target vehicle will be calculated. The instantaneous speed of the successfully matched vehicles will be calculated.

[0082] First, the successful matching of a vehicle can be divided into two cases: the target vehicle is successfully matched in two consecutive frames of images, and the target vehicle is successfully matched in images after more than two frames.

[0083] For the first case, the position of the target vehicle in the previous frame image and the next frame image is directly subtracted and divided by the time corresponding to one frame. The corresponding instantaneous speed can be calculated by converting the scale.

[0084] The second case indicates that the target vehicle is successfully matched again after being blocked or the lighting changes. The speed calculation of the vehicle needs to be based on the time elapsed in the failed frame. Other than that, the calculation method is the same as the first frame.

[0085] For the target vehicle that is successfully re-matched, its match failure frame count is reset to zero, and it is deleted from the temporary tracking list and added to the current tracking list. Finally, the calculated instantaneous speed of the target vehicle is compared with the set speed threshold to determine whether the vehicle is speeding. If the vehicle is speeding, the community monitoring will issue a warning through the alarm and promptly notify the community security personnel to deal with the speeding behavior. The following is the formula for calculating the instantaneous speed of the target vehicle:

[0086]

[0087] Where d(x,y) represents the distance between coordinates x and y, which can be calculated using the Euclidean distance function, and position(i,k) represents the position of target vehicle i in the kth frame, and m is the count of failed matching frames.

[0088] If m is 0, it means that the vehicle is successfully matched in two consecutive frames of images, otherwise it means that the vehicle appears in the monitoring range again after the matching fails after m frames of images. s The scale that maps image pixel coordinates to the actual vehicle position can convert pixel distance into real distance and calculate instantaneous speed.

[0089] Finally, if the number of matching failure frames corresponding to the target vehicle exceeds a set threshold, the target vehicle is considered to have left the monitoring range and is removed from the temporary tracking list. Setting the threshold requires multiple experiments and adjustments. If the threshold is too low, it will lead to repeated detection of the same target, while if the threshold is too high, it will lead to missed detections and an increase in redundant targets in the temporary tracking list, affecting the efficiency of vehicle matching.

[0090] Example 2

[0091] Based on Example 1, this embodiment provides a vehicle speeding detection system based on Haar-like features and frame matching, including:

[0092] Data acquisition module: configured to acquire an image of a vehicle to be detected;

[0093] Calibration and feature extraction module: configured to input the acquired image into the trained Haar-YOLO model to extract the candidate region of the target vehicle and the corresponding Haar-like features;

[0094] Judgment module: configured to match the vehicle frame by frame using the Hungarian matching algorithm based on the candidate region or Haar-like features, obtain the matching result of the position of the target vehicle in each frame image, and judge whether the vehicle is speeding;

[0095] The Haar-YOLO model is trained with the target vehicle image as input and the target vehicle candidate region and Haar-like features as output.

[0096] Example 3

[0097] This embodiment provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and running on the processor. When the computer instructions are run by the processor, the steps described in the method of embodiment 1 are completed.

[0098] Example 4

[0099] This embodiment provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps described in the method of embodiment 1 are completed.

[0100] The foregoing description is merely a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Those skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present disclosure shall be included within the scope of protection of the present disclosure.

[0101] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Those skilled in the art should understand that, based on the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.

Claims

1. A vehicle speeding detection method based on Haar-like features and frame matching, characterized in that: The steps include: Obtaining an image of a vehicle to be detected; Input the acquired image into the trained Haar-YOLO model to extract the candidate area of the target vehicle and the corresponding Haar-like features; The Hungarian matching algorithm is used to match the vehicle frame by frame based on the candidate region or Haar-like features to obtain the matching results of the target vehicle's position in each frame image and determine whether the vehicle is speeding; The Haar-YOLO model training method includes the following steps: Get the vehicle dataset; The target vehicle in the dataset image is calibrated with a suitable candidate region, and Haar-like features are extracted from the calibrated candidate region; The YOLO model is trained with vehicle images as input and Haar-like features and candidate vehicle regions as output. According to the objective function determined by the candidate region positioning error and the Haar-like feature judgment error in each training cycle, the model parameters are corrected to obtain the optimal parameters to obtain the trained Haar-YOLO model; The method for matching vehicles frame by frame using the Hungarian matching algorithm according to candidate regions or Haar-like features to obtain matching results of the position of the target vehicle in each frame image includes the following steps: The Hungarian matching algorithm is used to match vehicles frame by frame based on the candidate regions; If the match fails, the corresponding target vehicle is added to the temporary tracking list. Based on the vehicle's motion characteristics and road conditions, images are collected again from areas where the vehicle may pass. The Haar-YOLO model is used to detect the vehicles in the temporary tracking list, and the detected vehicles are matched with Haar-like features. The specific structure of the Haar-YOLO model includes multiple cascaded convolutional layers. The last convolutional layer is connected in parallel to two fully connected layers. The two fully connected layers output candidate regions and Haar-like features respectively. The objective function of the Haar-YOLO model includes the weighted integration of the decision losses generated by the two fully connected layers to form a global loss function.

2. The vehicle speeding detection method based on Haar-like features and frame matching according to claim 1, wherein: The size of the image area extracted by multiple cascaded convolutional layers is reduced in sequence, and a retention parameter is set between each level. The retention parameter represents the degree of retention of the analysis results from the previous layer during each information transmission process.

3. The vehicle speeding detection method based on Haar-like features and frame matching according to claim 1, wherein: The method of matching vehicles frame by frame using the Hungarian matching algorithm based on candidate regions or Haar-like features to obtain the matching results of the target vehicle's position in each frame image is as follows: Build the current tracking list and temporary tracking list, and add the target vehicle appearing in the image as the target vehicle to the current tracking list; Iterate the continuous frame images, select two adjacent images in sequence in each iteration, and use the Hungarian algorithm to match the target vehicle objects detected in the images; If the matching fails, the corresponding target vehicle will be added to the temporary tracking list; based on the vehicle's motion characteristics and road conditions, images will be collected again from the area where the vehicle may pass, and the vehicles in the temporary tracking list will be detected using the Haar-YOLO model, and the detected vehicles will be matched with Haar-like features.

4. The vehicle speeding detection method based on Haar-like features and frame matching as claimed in claim 1, characterized in that: For successfully matched vehicles, the instantaneous speed of the current vehicle is calculated through the frame time and the displacement generated within the monitoring range through the conversion of the coordinate scale to determine whether the vehicle is speeding; Alternatively, Haar-like features include edge features, linear features, center features, and diagonal features.

5. The vehicle speeding detection method based on Haar-like features and frame matching as claimed in claim 1, characterized in that: The objective function of the Haar-YOLO model includes the weighted integration of the decision losses generated by the two fully connected layers to form a global loss function, where the decision loss of the candidate area is calculated in the form of union-intersection ratio, and the decision loss generated by the Haar feature is calculated as softmax.

6. A vehicle speeding detection system based on Haar-like features and frame matching, characterized in that: include: Data acquisition module: configured to acquire an image of a vehicle to be detected; Calibration and feature extraction module: configured to input the acquired image into the trained Haar-YOLO model to extract the candidate region of the target vehicle and the corresponding Haar-like features; Judgment module: configured to match the vehicle frame by frame using the Hungarian matching algorithm based on the candidate region or Haar-like features, obtain the matching result of the position of the target vehicle in each frame image, and judge whether the vehicle is speeding; The Haar-YOLO model training method includes the following steps: Get the vehicle dataset; The target vehicle in the dataset image is calibrated with a suitable candidate region, and Haar-like features are extracted from the calibrated candidate region; The YOLO model is trained with vehicle images as input and Haar-like features and candidate vehicle regions as output. According to the objective function determined by the candidate region positioning error and the Haar-like feature judgment error in each training cycle, the model parameters are corrected to obtain the optimal parameters to obtain the trained Haar-YOLO model; The method for matching vehicles frame by frame using the Hungarian matching algorithm according to candidate regions or Haar-like features to obtain matching results of the position of the target vehicle in each frame image includes the following steps: The Hungarian matching algorithm is used to match vehicles frame by frame based on the candidate regions; If the match fails, the corresponding target vehicle is added to the temporary tracking list. Based on the vehicle's motion characteristics and road conditions, images are collected again from areas where the vehicle may pass. The Haar-YOLO model is used to detect the vehicles in the temporary tracking list, and the detected vehicles are matched with Haar-like features. The specific structure of the Haar-YOLO model includes multiple cascaded convolutional layers. The last convolutional layer is connected in parallel to two fully connected layers. The two fully connected layers output candidate regions and Haar-like features respectively. The objective function of the Haar-YOLO model includes the weighted integration of the decision losses generated by the two fully connected layers to form a global loss function.

7. An electronic device, characterized in that: The method comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the steps of any one of the methods of claims 1 to 5 are completed.

8. A computer-readable storage medium, characterized in that Used to store computer instructions, which, when executed by a processor, complete the steps of any one of the methods of claims 1 to 5.

Citation Information

Patent Citations

  • Traffic flow information perception method based on hybrid characteristic and system thereof

    CN102393901A

  • Highway unmanned aerial vehicle traffic event automatic monitoring method and system

    CN111833598A