Traffic target identification optimization method
Through road area recognition, cutting and recombining images, combined with the yolov5 model, the problem of poor small and small target detection performance in deep learning object detection technology is solved, and the accuracy and efficiency of traffic target recognition is improved. It is suitable for computing power in complex traffic environments. Limited scenes.
Patent Information
- Application Number
- CN202411227662.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-01-10
AI Technical Summary
Deep learning object detection technology has poor performance in small and medium-sized target detection in the transportation field, resulting in high computational complexity and processing delays, making it difficult to apply in actual traffic scenarios with limited computing capabilities.
Through road area identification, cutting and reorganization of images, non-road background interference is reduced, target size ratio is optimized, and feature information retention rate of small targets is improved. Lane detection algorithm and perspective transformation are used, and traffic target detection is combined with the yolov5 model.
It improves the accuracy and efficiency of the target recognition model, reduces the demand for computing resources, and allows reliable detection results to be obtained in complex traffic environments, and is suitable for actual traffic scenarios with limited computing capabilities.
Smart Images

Figure CN119296049A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of intelligent transportation technology, and in particular to a traffic target recognition optimization method. Background Art
[0002] In modern society, with the rapid increase in the number of cars and the acceleration of urbanization, efficient and accurate traffic management systems have become particularly important. The core of traffic management systems lies in high-performance target detection technology, which is used to identify and classify various traffic targets such as vehicles and pedestrians in complex traffic flows to support key tasks such as traffic flow analysis, accident prevention and road network optimization.
[0003] With the development of deep learning technology in recent years, deep learning-based target detection algorithms have made significant progress in the field of transportation. However, deep learning target detection technology still has certain shortcomings in practical applications in the field of transportation, and the problem of small target detection is one of the important challenges. In traffic scenes, small targets refer to traffic targets that occupy a small number of pixels in the monitoring image, such as vehicles or pedestrians in the distance. These targets occupy a limited number of pixels, and it is difficult to extract high-quality and high-discrimination features, resulting in a significant decrease in the performance and accuracy of the algorithm in identifying and classifying small targets.
[0004] To solve this problem, existing solutions include image pyramids, multi-scale processing technology, and attention mechanisms. These methods all optimize the network model to a certain extent. Although they improve the recognition ability of small targets to a certain extent, they also introduce higher computational complexity and processing delays, and usually require more computing resources, making them difficult to apply in actual traffic scenarios with limited computing power.
[0005] Therefore, it is urgent to develop a traffic target recognition optimization technology to improve the performance of deep learning model target detection technology in small target detection, ensure reliable detection results in complex traffic environments, and provide strong technical support for the further development of traffic management and intelligent transportation systems. Summary of the invention
[0006] The purpose of the present invention is to provide a traffic target recognition optimization method, which can solve the problems of poor small target detection and recognition performance in deep learning target detection technology, and processing delays caused by complex algorithms occupying more computing resources.
[0007] To achieve the above object, the present invention provides a traffic target recognition optimization method, comprising:
[0008] S1: Road area recognition, i.e. collecting high-definition traffic monitoring images and using lane detection algorithms to identify lane lines in the road area in the monitoring images;
[0009] S2: road area cutting, that is, based on the road area image identified by the lane detection algorithm, the road area image is cut into several road sub-images of equal proportions;
[0010] S3: road sub-image reorganization, that is, scaling the several road sub-images obtained by cutting according to the input requirements of the target recognition model, and rearranging them in a certain order to generate a reorganized image suitable for processing by the target recognition model;
[0011] S4: Traffic target detection and processing, that is, inputting the reconstructed image into the target recognition model to obtain the target detection frame, and then converting the target detection frame from the reconstructed image back to the original high-definition traffic monitoring image, and removing the repeated detection part in the target detection frame to obtain the final traffic target.
[0012] Optionally, the step S1 of identifying the road area includes:
[0013] S1.1: Collect high-definition traffic monitoring images;
[0014] S1.2: Detect lane lines in the collected high-definition traffic monitoring image; wherein the lane lines are realized by a SegNet model established by a lane detection algorithm.
[0015] Optionally, the step S1.2 of detecting lane lines in the collected high-definition traffic monitoring image includes:
[0016] S1.2.1: Process the high-definition traffic monitoring image using the SegNet model and convert it into a binary image;
[0017] S1.2.2: Perform image dilation processing on the binary image, and obtain a set of pixel points belonging to the same lane line through Hough transform processing;
[0018] S1.2.3: Use the least squares method to fit the plurality of pixel point sets belonging to the same lane line.
[0019] Optionally, the step S2 of road area cutting includes:
[0020] S2.1: Mapping the lane lines obtained after the road area recognition by the perspective transformation method; wherein the mapping is generated by the perspective transformation matrix H, when a point P (x1, y1, 1) on the lane line is defined, the point P is transformed by the perspective transformation to form P' = H·(x1, y1, 1);
[0021] In the formula, x1, y1 represent the horizontal and vertical coordinates of point P;
[0022] S2.2: Divide the mapped lane line into N equal parts to form N sub-images that can completely cover the lane line;
[0023] S2.3: Overlapping the above sub-images that can completely cover the lane lines is designed to obtain sub-images that can completely cover the lanes and traffic targets.
[0024] Optionally, the length L of the sub-image that can completely cover the lane line in step S2.2 sub for: The length L of the sub-image that can completely cover the lane and traffic targets in step S2.3 s ' ub For: L s ' ub =L sub +δ; where L is the total length of the lane line.
[0025] Optionally, the step S3 of road sub-image reorganization comprises:
[0026] S3.1: scaling the several road sub-images with equal proportions formed by cutting to meet the size requirement of the input image for the target recognition model;
[0027] S3.2: Combine the above scaled sub-images.
[0028] Optionally, in step S3.1, the scaling factor for scaling the sub-image is:
[0029]
[0030] Where W model is the input length required by the target recognition model, H model is the input width required by the target recognition model; W sub is the actual length of the sub-image, H sub is the actual width of the sub-image; S w , S h is the scaling factor.
[0031] Optionally, the step S4 of traffic target detection and processing includes:
[0032] S4.1: input the generated recombined image into the target recognition model to perform traffic target detection, and obtain target detection frames and corresponding confidences of different traffic targets after being input into the target recognition model;
[0033] Wherein, the target recognition model is the yolov5 model;
[0034] The target detection frame B, B = (x, y, w, h) represents the location information of the traffic target; different traffic targets correspond to different target detection frames; wherein x, y represent the pixel coordinates of the target center in the image, w is the width of the target detection frame, and h is the height of the target detection frame;
[0035] The confidence level indicates the reliability of the test result;
[0036] S4.2: Perform coordinate transformation on the target detection frame B to obtain the transformed target detection frame B corresponding to different traffic targets ori , B ori =(x ori ,y ori ,w ori ,h ori ); x ori ,y ori represents the pixel coordinates of the target center in the transformed image, w ori is the width of the converted target detection box, h ori is the height of the converted target detection box;
[0037] S4.3: Remove the repeatedly detected traffic targets and detect the final traffic target.
[0038] Optionally, the target detection frame in step S4.2 is subjected to the following coordinate transformation:
[0039]
[0040] Where Δx, Δy are the offsets of the image relative to the original high-definition traffic monitoring image; S w , S h is the scaling factor.
[0041] Optionally, the step S4.3 removes the repeatedly detected traffic targets and detects the final traffic target, comprising the following steps:
[0042] S4.3.1: Use the non-maximum suppression algorithm to transform the target detection box B ori The repeated frames in are removed to obtain different conversion target detection frames B i , B j , B k , B w wait;
[0043] S4.3.2: Calculate the intersection over union (IoU) of any two converted target detection boxes using the following formula:
[0044]
[0045] In the formula, Bi and B j Represents any two conversion target detection boxes, area(B i ∩B j ) represents the intersection area of any two conversion target detection frames, and area(B i ∪B j ) represents the union area of any two conversion target detection frames;
[0046] S4.3.3: Arrange the different conversion target detection boxes in descending order according to the corresponding confidence levels;
[0047] S4.3.4: Calculate the IoU between the conversion target detection box with the highest confidence and other conversion target detection boxes, and detect the final traffic target by comparing with the preset threshold θ.
[0048] In summary, compared with the prior art, the present invention has the following beneficial effects:
[0049] 1. The traffic target recognition optimization method provided by the present invention enables small targets to retain more feature information, thereby improving the accuracy and efficiency of the target recognition model, and providing an efficient and reliable target detection solution for the traffic monitoring system.
[0050] 2. Compared with the computationally complex image pyramid, multi-scale processing technology, attention mechanism, etc., the traffic target recognition optimization method provided by the present invention requires fewer computing resources and is easier to apply in actual traffic scenarios with limited computing power. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is the original traffic monitoring image of the present invention;
[0052] Figure 2 is the lane line detection result of the present invention;
[0053] Figure 3 The combined image of the present invention;
[0054] Figure 4 The flowchart of the traffic target recognition optimization method of the present invention. DETAILED DESCRIPTION
[0055] The following will be combined with the attached Figures 1 to 4 , the technical content, structural features, objectives achieved and effects of the present invention are described in detail through preferred embodiments.
[0056] It should be noted that the drawings are in a very simplified form and use non-precise proportions. They are only used to conveniently and clearly assist in explaining the embodiments of the present invention, and are not used to limit the conditions for the implementation of the present invention. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size, without affecting the effects and purposes that can be achieved by the present invention, should still fall within the scope of the technical content disclosed by the present invention.
[0057] In the description of the present invention, it should be noted that the terms "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0058] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0059] Currently, there are problems with low recognition accuracy and low processing efficiency in monitoring small targets in complex traffic conditions. It is urgent to develop a traffic target recognition optimization method to improve the performance of deep learning model target detection technology in small target detection, and provide an efficient and reliable target detection technology support for the development of traffic monitoring and intelligent transportation systems.
[0060] Based on the above, the present invention provides a traffic target recognition optimization method, which focuses on the key road area by identifying, cutting and reorganizing the road area in the image, reduces the interference of the non-road background, and optimizes the target size ratio by reorganizing the image, so that small targets can retain more feature information, thereby improving the accuracy and efficiency of the target recognition model, and providing a traffic monitoring system with an efficient and reliable target detection solution.
[0061] The present invention provides a traffic target recognition optimization method, using Figure 4 The process of the traffic target recognition optimization technology shown in the figure includes:
[0062] Step S1, road area recognition, that is, collecting high-definition traffic monitoring images, and using a lane detection algorithm to recognize lane lines in the road area in the monitoring image.
[0063] Step S2, road area cutting, that is, based on the road area image identified by the lane detection algorithm, cutting the road area image into a number of road sub-images of equal proportions.
[0064] Step S3, recombining the road sub-images, that is, scaling the multiple road sub-images obtained by cutting according to the input requirements of the target recognition model, and rearranging them in a certain order to generate a recombined image suitable for processing by the target recognition model.
[0065] Step S4, traffic target detection and processing, is to input the reconstructed image into the target recognition model to obtain the target detection frame, and then convert the target detection frame from the reconstructed image back to the original high-definition traffic monitoring image, and remove the repeated detection part in the target detection frame to obtain the final traffic target.
[0066] In order to obtain better implementation results, the traffic target recognition technology provided by the present invention needs to be carried out under conditions of stable lighting and weather to ensure the quality of recognition, that is, to more accurately obtain the road and its boundaries.
[0067] The step S1 of road area identification comprises:
[0068] S1.1 collects high-definition traffic monitoring images;
[0069] In this embodiment, ultra-high-definition cameras placed at key locations on the roadside are used to capture and monitor traffic conditions in real time. Figure 1 That is, the road traffic conditions at a certain moment captured by the ultra-high-definition camera.
[0070] S1.2 detects lane lines in the collected high-definition traffic monitoring images;
[0071] This embodiment adopts a lane detection algorithm that can segment an image and effectively capture the hierarchical features of the image, and uses the lane detection algorithm to detect lane lines. The lane detection algorithm is specifically a SegNet model (i.e., a semantic segmentation model) that can identify lane lines.
[0072] Furthermore, the step S1.2 detects lane lines of the collected high-definition traffic monitoring image, including:
[0073] S1.2.1 Use the SegNet model to process the high-definition traffic monitoring image and convert it into a binary image.
[0074] S1.2.1.1 Adjust the size of the collected high-definition traffic monitoring image to make it meet the resolution requirement of the SegNet model for the input image.
[0075] S1.2.1.2 Import the high-definition traffic monitoring image that meets the input requirements into the trained SegNet model, analyze the features of the image, and obtain the probability map of each pixel belonging to the lane line.
[0076] S1.2.1.3 Convert the probability map of lane lines output by the SegNet model into a 0 (black) -1 (white) binary image, that is, by setting a threshold σ, divide the probability map of lane lines output by the model into 0-value images and 1-value images, where the 1-value image represents the lane lines whose probability is greater than the threshold, and the 0-value image represents the background area whose probability is less than the threshold.
[0077] S1.2.2 Perform image dilation processing on the above binary image, and obtain a set of pixel points belonging to the same lane line through Hough transform processing.
[0078] S1.2.2.1 Perform morphological image processing of image dilation on the pixel information of the binary image to obtain multiple connected domains generated by different lane lines after image dilation, and remove the connected domains in which the number of pixels is less than a certain threshold N. Through this step, noise, small isolated points or other details irrelevant to the required content can be filtered out, and the main features in the expanded image can be better obtained.
[0079] S1.2.2.2 Perform Hough transform on the expanded image, that is, perform Hough transform on the multiple connected domains obtained in step S1.2.2.1. Through Hough transform, straight lines are detected, and then the average distance from the pixel points in the connected domain where the straight line is not detected to the detected straight line is calculated;
[0080] S1.2.2.3 By specifying the threshold T n , process different connected domain pixel points. If the average distance from the points in the connected domain where no straight line is detected in step S1.2.2.2 to the detected straight line is less than T n , then the two connected domain pixels are merged into the same lane line pixel set, and all pixels in this set are considered to be on the same lane line.
[0081] S1.2.3 Fit the lane line.
[0082] S1.2.3.1 Approximate the lane line as a straight line and use the least squares method to fit the same lane line pixel point set in the above set.
[0083] Among them, for each lane line pixel set {(x1, y1), (x2, y2,)…, (x n ,y n ), where (x i ,y i ) represents the horizontal and vertical coordinates of the ith point, and n represents the number of pixels in the connected domain.
[0084] S1.2.3.2 Obtain the lane line function using the least squares method.
[0085] The least squares error is defined as Calculate the partial derivatives of a and b in the error calculation formula, and let That is, when the partial derivative is 0, the error S is the smallest, and the values of a and b are obtained at this time; the values of a and b obtained are substituted into the linear expression of y=ax+b to obtain the lane line function extracted and fitted from the original high-definition traffic monitoring image. Figure 2 That is, the lane line is marked after the lane line function is obtained by the above calculation method. Through the above calculation method, the lane line in the road area in the high-definition traffic monitoring image is finally obtained.
[0086] The step S2 of road area cutting comprises:
[0087] S2.1 maps the above lane lines through perspective transformation method.
[0088] In this step, the perspective transformation method is specifically to apply the perspective transformation matrix H to map the lane line to the bird's-eye view. Among them, the lane lines mapped to the bird's-eye view are parallel to each other. Among them, the application of the perspective transformation matrix H to map the lane line to the bird's-eye view is specifically to map the points on the lane line through the perspective transformation matrix H, and the mapping rule is: define a point on the lane line identified in S1 as point P, and express the coordinates of the point in the form of homogeneous coordinates as P(x1, y1, 1), and through the perspective transformation matrix H, obtain the coordinates P'=H·(x1, y1, 1) mapped on the bird's-eye view.
[0089] S2.2 divides the lane lines mapped above evenly.
[0090] In this step, the mapped lane line is evenly divided along the length direction of the lane line to obtain N parts. Each sub-image needs to completely cover the length L of the lane line. sub for: Wherein, L is the total length of the lane line. In a specific embodiment of the present invention, N is equal to 4.
[0091] S2.3 performs overlapping design on the above sub-images to obtain sub-images that can completely cover the lane lines and traffic targets.
[0092] In this step, the final coverage area of the sub-image is calculated. In order to ensure that the traffic target can be detected continuously and completely during the movement, the detection and tracking of the traffic target is avoided to be interrupted when the traffic target moves to the boundary of two sub-images. An overlapping part δ is set between the sub-images. The overlapping part δ means that two adjacent sub-images cover the same area in the original image, which can ensure that the target at the boundary of the two sub-images can remain intact in at least one sub-image, thereby improving the detection accuracy. Therefore, the length L of the sub-image that can completely cover the lane line and the traffic target is s ' ub for:
[0093]
[0094] The step S3 of road sub-image reorganization comprises:
[0095] S3.1 scales the sub-image segmented in step S2.4.
[0096] In this step, each of the segmented sub-images mentioned above needs to be scaled to meet the input requirements of the target recognition model for the input image.
[0097] Specifically, in this embodiment, the length and width of the sub-image are reduced to 1 / 2 of the length and width of the input image required by the target recognition model. The input image size required by the target recognition model is W model ×H model , the original size of the sub-image is W sub ×H sub , the scaling factor is and Among them, W model is the input length required by the target recognition model, H model The input width required for the object recognition model.
[0098] S3.2 combines the above scaled sub-images.
[0099] In this embodiment, the scaled sub-images are combined in a 2x2 arrangement to obtain a new recombined image, such as Figure 3 The reconstructed image after stitching should contain all the information of the original road area and be presented in a structured form to facilitate subsequent image processing and analysis.
[0100] The step S4 of traffic target detection and processing comprises:
[0101] S4.1 Input the reconstructed image obtained by stitching the above sub-images into the target recognition model to perform traffic target detection, and obtain the position information of different traffic targets in the image after inputting into the target recognition model and the credibility of the detection result.
[0102] Among them, the target detection model is specifically the yolov5 model, which is an efficient and accurate single-stage target detection model, particularly suitable for real-time traffic monitoring scenarios.
[0103] In this step, the stitched recombined image is input into the yolov5 model to obtain multiple target detection frames B = (x, y, w, h) corresponding to different traffic targets and corresponding confidence C. Among them, x, y represent the pixel coordinates of the target center in the image, w is the width of the target detection frame, and h is the height of the target detection frame. The confidence indicates the credibility of the detection result. The higher the confidence, the more credible the detection result is, and the lower the confidence, the higher the possibility of the result being a false detection.
[0104] S4.2 performs coordinate transformation on the target detection frame B mentioned above.
[0105] In this step, the target detection frame detected by the yolov5 model is converted from the coordinate system of the reconstructed image obtained in step S3.2 back to the coordinate system of the original high-definition traffic monitoring image, so that the detection result is consistent with the actual scene.
[0106] The specific conversion rules are as follows:
[0107] The target center coordinates of each target detection frame B are transformed as follows:
[0108] The height and width of the target detection frame are converted as follows: Get multiple converted target detection boxes B corresponding to each target detection box B ori =(x ori ,y ori ,w ori ,h ori ). Among them, S w , S h is the scaling factor in step S3; Δx, Δy are the offsets of the image relative to the original high-definition traffic monitoring image; x ori ,y ori represents the pixel coordinates of the target center in the transformed image, w ori is the width of the converted target detection box, h ori is the height of the converted target detection box.
[0109] S4.3 removes the repeatedly detected traffic targets.
[0110] S4.3.1 The non-maximum suppression (NMS) algorithm is used to remove the repeatedly detected traffic targets, that is, the same traffic targets in the sub-image that completely covers the lanes and traffic targets are removed. Specifically, the multiple conversion target detection frames B ori The same conversion target detection frame in is removed to obtain the conversion target detection frame B without repeated detection. i , B j , B k , B w wait.
[0111] S4.3.2 Calculate the intersection over union (IoU) of any two of the above conversion target detection boxes, and use B i , B j For example:
[0112]
[0113] Among them, B i and B j Represents any two conversion target detection boxes, area(B i ∩B j ) represents the intersection area of any two conversion target detection frames, and area(B i ∪B j ) represents the union area of any two conversion target detection boxes.
[0114] S4.3.3 According to step S4.1, the confidence C of the target detection frame for different traffic targets is obtained, and multiple conversion target detection frames are arranged in descending order.
[0115] S4.3.4 Set an IoU threshold θ for each conversion target detection frame after the descending order. First calculate the IoU between the conversion target detection frame with the highest confidence and other conversion target detection frames. If the IoU value is greater than the threshold θ, delete the conversion target detection frame compared with the conversion target detection frame with the highest confidence. Then calculate the IoU between the conversion target detection frame with the highest confidence and other conversion target detection frames among the remaining conversion target detection frames. If the IoU value is greater than the threshold θ, delete the conversion target detection frame compared with it. And so on, until all the conversion target detection frames are calculated, and the remaining conversion target detection frame is the final traffic target detected.
[0116] The above is a traffic target recognition optimization method provided by the present invention.
[0117] In summary, the traffic target recognition optimization method provided by the present invention improves the performance of deep learning model target detection technology in small target detection, ensures reliable detection results in complex traffic environments, and provides strong technical support for the further development of traffic management and intelligent transportation systems.
[0118] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the invention. After reading the above content, it will be obvious to those skilled in the art for various modifications and substitutions of the present invention. Therefore, the protection scope of the present invention should be limited by the attached claims.
Claims
1. A traffic target recognition optimization method, characterized in that: The method comprises: S1: Road area recognition, i.e. collecting high-definition traffic monitoring images and using lane detection algorithms to identify lane lines in the road area in the monitoring images; S2: road area cutting, that is, based on the road area image identified by the lane detection algorithm, the road area image is cut into several road sub-images of equal proportions; S3: road sub-image reorganization, that is, scaling the several road sub-images obtained by cutting according to the input requirements of the target recognition model, and rearranging them in a certain order to generate a reorganized image suitable for processing by the target recognition model; S4: Traffic target detection and processing, that is, inputting the reconstructed image into the target recognition model to obtain the target detection frame, and then converting the target detection frame from the reconstructed image back to the original high-definition traffic monitoring image, and removing the repeated detection part in the target detection frame to obtain the final traffic target.
2. The traffic target identification optimization method according to claim 1, characterized in that: The step S1 of road area identification comprises: S1.1: Collect high-definition traffic monitoring images; S1.2: Detect lane lines in the collected high-definition traffic monitoring image; wherein the lane lines are realized by the SegNet model established by the lane detection algorithm.
3. The traffic target identification optimization method according to claim 2, characterized in that: The step S1.2 of detecting lane lines in the collected high-definition traffic monitoring image includes: S1.2.1: Process the high-definition traffic monitoring image using the SegNet model and convert it into a binary image; S1.2.2: Perform image dilation processing on the binary image, and obtain a set of pixel points belonging to the same lane line through Hough transform processing; S1.2.3: Use the least squares method to fit the plurality of pixel point sets belonging to the same lane line.
4. The traffic target identification optimization method according to claim 1, characterized in that: The step S2 of road area cutting comprises: S2.1: Mapping the lane lines obtained after the road area recognition by the perspective transformation method; wherein the mapping is generated by the perspective transformation matrix H, when a point P (x1, y1, 1) on the lane line is defined, the point P is transformed by the perspective transformation to form P' = H·(x1, y1, 1); In the formula, x1, y1 represent the horizontal and vertical coordinates of point P; S2.2: Divide the mapped lane line into N equal parts to form N sub-images that can completely cover the lane line; S2.3: Overlapping the above sub-images that can completely cover the lane lines is designed to obtain sub-images that can completely cover the lanes and traffic targets.
5. The traffic target identification optimization method according to claim 4, characterized in that: The length L of the sub-image that can completely cover the lane line in step S2.2 sub for: The length L of the sub-image that can completely cover the lane and traffic targets in step S2.3 s ' ub For: L s ' ub =L sub +δ; where L is the total length of the lane line.
6. The traffic target identification optimization method according to claim 1, characterized in that: The step S3 of road sub-image reorganization comprises: S3.1: scaling the several road sub-images with equal proportions formed by cutting to meet the size requirement of the input image for the target recognition model; S3.2: Combine the above scaled sub-images.
7. The traffic target identification optimization method according to claim 6, characterized in that: In step S3.1, the scaling factor for scaling the sub-image is: Where W model is the input length required by the target recognition model, H model is the input width required by the target recognition model; W sub is the actual length of the sub-image, H sub is the actual width of the sub-image; S w , S h is the scaling factor.
8. The traffic target identification optimization method according to claim 1, characterized in that: The step S4 of traffic target detection and processing comprises: S4.1: input the generated recombined image into the target recognition model to perform traffic target detection, and obtain target detection frames and corresponding confidences of different traffic targets after being input into the target recognition model; Wherein, the target recognition model is the yolov5 model; The target detection frame B, B = (x, y, w, h) represents the location information of the traffic target; different traffic targets correspond to different target detection frames; wherein x, y represent the pixel coordinates of the target center in the image, w is the width of the target detection frame, and h is the height of the target detection frame; The confidence level indicates the reliability of the test result; S4.2: Perform coordinate transformation on the target detection frame B to obtain the transformed target detection frame B corresponding to different traffic targets ori , B ori =(x ori ,y ori ,w ori ,h ori ); x ori ,y ori represents the pixel coordinates of the target center in the transformed image, w ori is the width of the converted target detection box, h ori is the height of the converted target detection box; S4.3: Remove the repeatedly detected traffic targets and detect the final traffic target.
9. The traffic target identification optimization method according to claim 8, characterized in that: The target detection frame in step S4.2 is transformed into the following coordinates: Where Δx, Δy are the offsets of the image relative to the original high-definition traffic monitoring image; S w , S h is the scaling factor.
10. The traffic target identification optimization method according to claim 8, characterized in that: The step S4.3 removes the repeatedly detected traffic targets and detects the final traffic target, comprising the following steps: S4.3.1: using a non-maximum suppression algorithm to convert the target detection frame B ori The repeated frames in are removed to obtain different conversion target detection frames B i , B j , B k , B w wait; S4.3.2: Calculate the intersection over union (IoU) of any two converted target detection boxes using the following formula: In the formula, B i and B j Represents any two conversion target detection boxes, area(B i ∩B j ) represents the intersection area of any two conversion target detection frames, and area(B i ∪B j ) represents the union area of any two conversion target detection frames; S4.3.3: Arrange the different conversion target detection boxes in descending order according to the corresponding confidence levels; S4.3.4: Calculate the IoU between the conversion target detection box with the highest confidence and other conversion target detection boxes, and detect the final traffic target by comparing with the preset threshold θ.