A road target detection method for traffic road scenes

By semantic segmentation and rectangular segmentation frame segmentation of traffic road scene images, the inefficiency and computing power consumption caused by the excessively large existing object detection model is solved, and more efficient and lightweight road surface object detection is achieved.

CN114973186BActive Publication Date: 2025-04-08BEIJING WENAN INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The object detection model of existing traffic road scene images is too large, resulting in low work efficiency and huge computing power consumption.

Method used

By semantic segmentation of the image to be tested, the masked image is obtained and the road area is divided into multiple parts using multiple rectangular segmentation boxes. Each part is input to the road surface object detection model for detection as an independent image to be tested.

Benefits of technology

It reduces the complexity of the network structure of the pavement object detection model, improves the working efficiency and lightweight design of the model, and significantly reduces the computing power demand and computing volume.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114973186B_ABST
    Figure CN114973186B_ABST
Patent Text Reader

Abstract

The present invention provides a road target detection method for a traffic road scene, comprising: collecting traffic road scene images to form a training set, obtaining a road target detection model; obtaining a mask image, identifying the driving road area therein, obtaining multiple rectangular segmentation frames for segmenting the driving road area according to the characteristic information of the road target detection model and the image information of the driving road area, and obtaining the zoom ratio Rn corresponding to each rectangular segmentation frame; cutting off all the rectangular segmentation frames in the mask image and scaling them according to the zoom ratio Rn corresponding to each rectangular segmentation frame to form multiple images to be tested, and inputting the multiple images to be tested into the road target detection model respectively for road target recognition and detection. The present invention solves the problem that the target detection model is too large in the existing target detection task of traffic road scene images, resulting in low work efficiency and huge consumption of computing power.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision image processing, and in particular to a method for detecting road targets in traffic road scenes. Background Art

[0002] In the existing computer vision field, scene understanding is the process of perceiving, analyzing and interpreting observed 3D dynamic scenes through sensors, matching the signal information from sensors that perceive the environment with trained models used to understand the scene.

[0003] The application of computer vision technology in traffic road scenes is mainly based on deep learning methods, relying on the semantic segmentation results of traffic road scene images to perceive road information, which is conducive to accurately identifying traffic violations, improving the control of traffic violations, and efficiently detecting spilled objects on traffic roads so as to deal with them in time and improve traffic road driving safety; therefore, the widespread application of computer vision technology in traffic road scenes can greatly improve the intelligence level of traffic control.

[0004] For the target detection task of traffic road scene images, the existing technology is to input the entire image to be detected into the target detection model to perform target recognition and detection. However, when the target detection model is required to achieve high-resolution range detection or massive negative sample filtering for the image to be detected, the target detection model is required to have a deeper network structure, which makes the target detection model too large, seriously affecting its work efficiency. Moreover, the operation of the large target detection model requires huge computing power. Therefore, in the process of completing the target detection task of traffic road scene images, the existing technology does not consider the control of computing power cost through optimization algorithm, so there is unnecessary waste of resources.

[0005] For example, in the related art, an invention patent application with publication number CN111797774A discloses a road target recognition method based on radar images and similarity weights. During the detection task, feature extraction is performed on the entire image to be tested, and the entire sample image to be tested is input into the trained CNNs model to extract image features that can remove the translation sensitivity and attitude sensitivity of the SAR image; finally, the classification result of the road target is obtained by combining the similarity weight of the image features and the sample distance. Summary of the invention

[0006] The main purpose of the present invention is to provide a road surface target detection method for traffic road scenes, so as to solve the problem that in the existing target detection tasks of traffic road scene images, the target detection model is too large, resulting in low working efficiency and huge computing power consumption.

[0007] In order to achieve the above-mentioned purpose, the present invention provides a road target detection method for a traffic road scene, comprising: step S1, collecting multiple traffic road scene images as training samples and forming a training set, obtaining a road target detection model based on a CenterNet neural network through the training set, and obtaining its characteristic information; step S2, performing semantic segmentation on the image to be tested to obtain a mask image, identifying a driving road area in the mask image, and sequentially obtaining multiple rectangular segmentation frames for segmenting the driving road area in a direction away from an imaging device in a lane extension direction of the driving road area according to the characteristic information of the road target detection model and the image information of the driving road area, and obtaining a zoom ratio Rn corresponding to each rectangular segmentation frame, wherein n is the ordinal number of the rectangular segmentation frame; step S3, cutting out all the rectangular segmentation frames in the mask image and scaling them according to the zoom ratio Rn corresponding to each rectangular segmentation frame to form multiple images to be tested, and inputting the multiple images to be tested into the road target detection model for road target recognition and detection.

[0008] Furthermore, the characteristic information of the road target detection model includes: the minimum actual detection width W of the target 目标实际最小 、The maximum actual detection width of the target W 目标实际最大 、Minimum pixel detection width of target W 目标像素最小 and the maximum pixel detection width W of the target 目标像素最大 ; Image information of the driving road area includes: actual lane width W' 车道实际 and the lane pixel width at each position in the lane extension direction of the driving road area.

[0009] Further, in step S2, sequentially obtaining the rectangular segmentation frames of the plurality of driving road regions includes step S21, obtaining the lower boundary and the upper boundary of the first rectangular segmentation frame, that is, when n=1, including: step S211, picking up the bottom edge of the driving road region as the lower boundary of the first rectangular segmentation frame, obtaining its corresponding vertical coordinate as Y b Step S212, starting from the lower boundary of the first rectangular segmentation frame, through the pre-segmentation frame with a preset step length ΔY step Traverse the segmentation mask image in the height direction. When the loop condition is not met in the m+1th loop, take the upper edge of the pre-segmentation frame after the mth loop as the upper boundary of the first rectangular segmentation frame, and obtain its corresponding ordinate as Y temp =Y b -m×ΔY step ,in,

[0010] The loop conditions are:

[0011] (Wx'' 车道像速 / W' 车道实际 ×W 目标实际最小 ) / R1 ≥W 目标像素最小 (1)

[0012] Wx’’ 车道像速 When obtaining the first rectangular segmentation box, the upper edge of the pre-segmentation box during the x-th traversal is the lane pixel width corresponding to the mask image, and R1 is the scaling ratio corresponding to the first rectangular segmentation box; in step S213, compare the pixel width of the driving lane area at the lower boundary position of the first rectangular segmentation box and the pixel width of the driving lane area at the upper boundary position of the first rectangular segmentation box, and use the larger of the two as the side length width of the first rectangular segmentation box, and use 丨Y b -Y temp 丨 as the side length height of the first rectangular segmentation box, and draw the first rectangular segmentation box in the mask image.

[0013] Further, in step S2, sequentially obtaining the rectangular segmentation boxes of multiple driving lane areas includes step S22 of obtaining the lower boundary and the upper boundary of the n-th rectangular segmentation box, that is, when n≥2, it includes: in step S221, pick up the upper boundary of the (n - 1)-th rectangular segmentation box and retreat a preset height Δh, and use it as the lower boundary of the n-th rectangular segmentation box, and obtain its corresponding ordinate as Y n ; in step S222, starting from the lower boundary of the n-th rectangular segmentation box, traverse and segment the mask image in the height direction through the pre-segmentation box with a preset step length ΔY step When the (m + 1)-th loop does not meet the loop condition, use the upper edge of the pre-segmentation box after the m-th loop as the upper boundary of the n-th rectangular segmentation box, and obtain its corresponding ordinate as Y temp =Y n -m×ΔY step where,

[0014] The loop condition is:

[0015] (Wx’’ 车道像速 / W’ 车道实际 ×W 目标实际最小 ) / Rn ≥W 目标像素最小 (2)

[0016] Wx’’ 车道像速 When obtaining the n-th rectangular segmentation box, the upper edge of the pre-segmentation box during the x-th traversal is the lane pixel width corresponding to the mask image, and Rn is the scaling ratio corresponding to the n-th rectangular segmentation box; in step S223, compare the pixel width of the driving lane area at the lower boundary position of the n-th rectangular segmentation box and the pixel width of the driving lane area at the upper boundary position of the n-th rectangular segmentation box, and use the larger of the two as the side length width of the n-th rectangular segmentation box, and use 丨Y n -Y tempLet 丨 be the side length and height of the nth rectangular segmentation box, and draw the nth rectangular segmentation box in the mask image; Step S224, repeat Step S221 to Step S223 until multiple rectangular segmentation boxes cover the driving road area.

[0017] Further, the calculation formula for the scaling ratio Rn corresponding to the nth rectangular segmentation box is:

[0018] Rn = (Wn’ 车道像速 / W’ 车道实际 ) × (W 目标实际最大 / W 目标像素最大 ) (3)

[0019] Where, Wn’ 车道像速 is the lane pixel width corresponding to the lower boundary of the nth rectangular segmentation box, n ≥ 1.

[0020] Further, the preset height Δh is: W 目标实际最大 ×Rn, where, n ≥ 1.

[0021] Further, the preset step ΔYstep is: W 目标像素最小 ×Rn, where, n ≥ 1.

[0022] Further, in Step S2, use a contour box to enclose the recognized driving road area in the mask image.

[0023] Further, the contour box is a polygon contour box, and the polygon contour box is formed by sequentially connecting multiple boundary pixel points picked along the outer periphery of the driving road area.

[0024] Further, the road surface target detection method further includes Step S4, merging the output results of the road surface target detection model for performing road surface target recognition and detection on multiple to-be-detected pictures, so as to obtain the road surface target recognition and detection result of the road surface target detection model for the to-be-detected image.

[0025] By applying the technical solution of the present invention, the mask image obtained after the semantic segmentation of the image to be tested is subjected to fine regional screening and deep optimization processing. The fine screening of the mask image can quickly pick up the key detection area, i.e., the driving road area, from multiple masks, thereby facilitating targeted pedestrian detection, vehicle detection or spilled obstacle detection in the driving road area, filtering out useless background areas in the mask image, avoiding invalid detection of non-key areas, and greatly improving the efficiency of road target detection. Deep optimization processing of the mask image, that is, using multiple rectangular segmentation frames to divide the entire driving road area into multiple parts in the direction of lane extension in the driving road area and away from the imaging device, and the part selected by each rectangular segmentation frame is provided to the road target detection model as an independent test image for road target detection, so as to realize the decomposition of the road target detection task. In this way, while ensuring that the complete target detection of the driving road area can be carried out without affecting the accuracy of the result, the complexity of the network structure of the road target detection model is reduced, the road target detection model is easier to train and obtain, and becomes a lightweight model. Its working computing power requirement is significantly reduced. At the same time, the amount of calculation of the entire target detection task is reduced, and the work efficiency can be significantly improved.

[0026] In addition, by scaling the cropped test images according to the scaling ratio Rn corresponding to each rectangular segmentation frame, the resolutions of multiple test images can be unified within a small resolution range. Since traffic road scene images have specific properties, that is, the size of target images captured in the direction away from the imaging device in the lane extension direction of the driving road area gradually decreases, the road target detection model is required to have a wider image resolution detection range. By appropriately scaling the cropped test images through the scaling ratio Rn, the image resolution range detection capability requirements of the road target detection model are effectively reduced, which is conducive to the lightweight and miniaturized design of the road target detection model. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings constituting a part of the present application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0028] Figure 1 A flow chart showing a method for detecting road surface objects in a traffic road scene according to an optional embodiment of the present invention is shown;

[0029] Figure 2 An optional traffic road scene image in a training set according to an optional embodiment of the present invention is shown;

[0030] Figure 3 An image to be tested of a traffic road scene according to an optional embodiment of the present invention is shown;

[0031] Figure 4 Shows the Figure 3 A mask image obtained after semantic segmentation of the image to be tested;

[0032] Figure 5 Shows the Figure 4 Schematic diagram of segmenting the driving road area in the mask image using multiple rectangular segmentation boxes. DETAILED DESCRIPTION

[0033] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including", "and", "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0036] In order to solve the problem that in the existing target detection tasks of traffic road scene images, the target detection model is too large, resulting in low working efficiency and huge computing power consumption, the present invention provides a road surface target detection method for traffic road scenes.

[0037] Figure 1 FIG. 1 is a flow chart of a method for detecting road targets in a traffic road scene according to an embodiment of the present invention. Figure 1As shown, the method includes the following steps: step S1, collecting multiple traffic road scene images as training samples and forming a training set, obtaining a road target detection model based on the CenterNet neural network through the training set, and obtaining its characteristic information; step S2, performing semantic segmentation on the image to be tested to obtain a mask image, identifying the driving road area in the mask image, and according to the characteristic information of the road target detection model and the image information of the driving road area, sequentially obtaining multiple rectangular segmentation frames for segmenting the driving road area in the direction away from the imaging device in the lane extension direction of the driving road area, and obtaining the zoom ratio Rn corresponding to each rectangular segmentation frame, wherein n is the ordinal number of the rectangular segmentation frame; step S3, cutting out all the rectangular segmentation frames in the mask image and scaling them according to the zoom ratio Rn corresponding to each rectangular segmentation frame to form multiple images to be tested, and inputting the multiple images to be tested into the road target detection model for road target recognition detection.

[0038] The mask image obtained after semantic segmentation of the image to be tested is subjected to fine regional screening and deep optimization processing. The fine screening of the mask image can quickly pick up the key detection area, i.e., the driving road area, from multiple masks, thereby facilitating targeted pedestrian detection, vehicle detection or spilled obstacle detection in the driving road area, filtering out useless background areas in the mask image, avoiding invalid detection of non-key areas, and greatly improving the efficiency of road target detection. Deep optimization processing of the mask image, that is, using multiple rectangular segmentation frames to divide the entire driving road area into multiple parts in the direction of lane extension in the driving road area and away from the imaging device, and the part selected by each rectangular segmentation frame is provided to the road target detection model as an independent test image for road target detection, so as to realize the decomposition of the road target detection task. In this way, while ensuring that the complete target detection of the driving road area can be carried out without affecting the accuracy of the result, the complexity of the network structure of the road target detection model is reduced, the road target detection model is easier to train and obtain, and becomes a lightweight model. Its working computing power requirement is significantly reduced. At the same time, the amount of calculation of the entire target detection task is reduced, and the work efficiency can be significantly improved.

[0039] In addition, by scaling the cropped test images according to the scaling ratio Rn corresponding to each rectangular segmentation frame, the resolutions of multiple test images can be unified within a small resolution range. Since traffic road scene images have specific properties, that is, the size of target images captured in the direction away from the imaging device in the lane extension direction of the driving road area gradually decreases, the road target detection model is required to have a wider image resolution detection range. By appropriately scaling the cropped test images through the scaling ratio Rn, the image resolution range detection capability requirements of the road target detection model are effectively reduced, which is conducive to the lightweight and miniaturized design of the road target detection model.

[0040] Optionally, the pixel resolutions of the multiple images to be tested can be unified within a range of 20*20 to 100*100.

[0041] Figure 2 is an optional traffic road scene image in a training set of an optional embodiment of the present invention; Figure 2 As shown, a rectangular frame T is used to select and mark the vehicle on the target road to facilitate the training and learning of the road target detection model; Figure 2 In the figure, the range marked by the line segment VL is a lane on the driving road.

[0042] Figure 3 The image to be tested is a traffic road scene of an optional embodiment of the present invention, specifically a tunnel scene in a highway; Figure 4 For Figure 3 The mask image obtained after semantic segmentation of the image to be tested; Figure 4 As shown, the mask image is divided into five areas, among which A1 is the driving road area, A2 on both sides thereof are the pedestrian road areas, and A3 on both sides thereof are the background areas; the driving road area A1 can be easily acquired by using the road surface target detection model of the present application. In the present embodiment, the driving road area A1 includes lanes and lane lines with different labels, and the portion between the two lane lines is a lane.

[0043] It should be noted that the characteristic information of the road target detection model includes: the minimum actual detection width W of the target 目标实际最小 、The maximum actual detection width of the target W 目标实际最大 、Minimum pixel detection width of target W 目标像素最小 and the maximum pixel detection width W of the target 目标像素最大 ; Image information of the driving road area includes: actual lane width W' 车道实际 and the lane pixel width at each position in the lane extension direction of the driving road area. According to the actual traffic road scene and based on practical considerations, in the preferred embodiment of the present invention, the target minimum actual detection width W 目标实际最小 The maximum actual detection width of the target is 0.5 meters. 目标实际最大 The minimum pixel detection width of the target is 5 meters. 目标像素最小 The maximum pixel detection width of the target is W. 目标像素最大 It is 300dpi.

[0044] In step S2, sequentially obtaining rectangular segmentation frames of multiple road areas includes step S21, obtaining the lower boundary and upper boundary of the first rectangular segmentation frame, that is, when n=1, including: step S211, picking up the bottom edge of the road area as the lower boundary of the first rectangular segmentation frame, obtaining its corresponding vertical coordinate as Yb ; Step S212, starting from the lower boundary of the first rectangular segmentation box, traverse the segmentation mask image in the height direction through the pre-segmentation box with a preset step size ΔY step When the (m + 1)-th loop does not meet the loop condition, take the upper edge of the pre-segmentation box after the m-th loop as the upper boundary of the first rectangular segmentation box, and obtain its corresponding ordinate as Y temp =Y b -m×ΔY step , where

[0045] The loop condition is:

[0046] (Wx’’ 车道像速 / W’ 车道实际 ×W 目标实际最小 ) / R1 ≥W 目标像素最小 (1)

[0047] Wx’’ 车道像速 is the lane pixel width corresponding to the upper edge of the pre-segmentation box during the x-th traversal when obtaining the first rectangular segmentation box, and R1 is the scaling ratio corresponding to the first rectangular segmentation box; Step S213, compare the pixel width of the driving road area at the lower boundary position of the first rectangular segmentation box and the pixel width of the driving road area at the upper boundary position of the first rectangular segmentation box, take the larger of the two as the side length width of the first rectangular segmentation box, and take 丨Y b -Y temp 丨 as the side length height of the first rectangular segmentation box, and draw the first rectangular segmentation box in the mask image.

[0048] Figure 5 is a schematic diagram of using multiple rectangular segmentation boxes to segment the driving road area in the mask image of Figure 4 , as shown in Figure 5 , the driving road area A1 is segmented using four rectangular segmentation boxes. Along the direction away from the imaging device in the lane extension direction of the driving road area A1, they are the rectangular segmentation box K1, the rectangular segmentation box K2, the rectangular segmentation box K3, and the rectangular segmentation box K4 respectively.

[0049] To ensure the complete segmentation of the driving road area and not miss the targets in the driving road area, optionally, in Step S2, sequentially obtaining the rectangular segmentation boxes of multiple driving road areas includes Step S22, obtaining the lower boundary and the upper boundary of the n-th rectangular segmentation box, that is, when n≥2, it includes: Step S221, pick up the upper boundary of the (n - 1)-th rectangular segmentation box and retreat a preset height Δh, and use it as the lower boundary of the n-th rectangular segmentation box, and obtain its corresponding ordinate as Y n ; Step S222, starting from the lower boundary of the n-th rectangular segmentation box, traverse through the pre-segmentation box with a preset step size ΔY stepTraverse the segmented mask image in the height direction. When the (m + 1)-th loop does not meet the loop condition, use the upper edge of the pre-segmented box after the m-th loop as the upper boundary of the n-th rectangular segmentation box, and obtain its corresponding ordinate as Y temp = Y n − m × ΔY step , where

[0050] The loop condition is:

[0051] (Wx’’ 车道像速 / W’ 车道实际 × W 目标实际最小 ) / Rn ≥ W 目标像素最小 (2)

[0052] Wx’’ 车道像速 is the upper edge of the pre-segmented box at the x-th traversal when obtaining the n-th rectangular segmentation box, and the lane pixel width corresponding to the mask image. Rn is the scaling ratio corresponding to the n-th rectangular segmentation box; Step S223, compare the pixel width of the driving road area at the lower boundary position of the n-th rectangular segmentation box and the pixel width of the driving road area at the upper boundary position of the n-th rectangular segmentation box, and use the larger of the two as the side length width of the n-th rectangular segmentation box. Take 丨Y n − Y temp 丨 as the side length height of the n-th rectangular segmentation box, and draw the n-th rectangular segmentation box in the mask image; Step S224, repeat Step S221 to Step S223 until multiple rectangular segmentation boxes cover the driving road area.

[0053] As Figure 5 shown, for the first rectangular segmentation box K1 of the driving road area A1, two pre-segmented boxes k1 and k2 are used with a preset step size ΔY step to traverse and segment the mask image in the height direction, that is, when the 3rd loop does not meet the loop condition, use the upper edge of the pre-segmented box after the 2nd loop as the upper boundary of the first rectangular segmentation box K1.

[0054] In the present invention, the calculation formula for the scaling ratio Rn corresponding to the n-th rectangular segmentation box is:

[0055] Rn = (Wn’ 车道像速 / W’ 车道实际 ) × (W 目标实际最大 / W 目标像素最大 ) (3)

[0056] where Wn’ 车道像速 is the lane pixel width corresponding to the lower boundary of the n-th rectangular segmentation box, n ≥ 1.

[0057] Optionally, the preset height Δh is: W 目标实际最大×Rn, where n≥1.

[0058] Optionally, the preset step length ΔYstep is: W 目标像素最小 ×Rn, where n≥1.

[0059] Optionally, in step S2, the road area identified in the mask image is framed using a contour line frame. Figure 5 As shown, the contour frame C frames the driving road area A1 identified in the mask image.

[0060] Optionally, the contour frame is a polygonal contour frame, which is formed by sequentially connecting a plurality of boundary pixel points picked up along the periphery of the driving road area. In this way, since the edges of the polygonal contour frame are smooth, it is helpful to reduce the computational complexity of the target detection task.

[0061] Optionally, the road target detection method further includes step S4, combining output results of the road target detection model performing road target recognition detection on multiple images to be tested, so as to obtain the road target recognition detection results of the road target detection model on the images to be tested.

[0062] By using the road target detection method for traffic road scenes of the present invention, the parameter amount of a traditional road target detection model with a network structure of CenterNet+ResNet18 for road target detection tasks can be reduced from 14.1M to 0.57M; thus, the computing power requirement of the model is significantly reduced. In the analysis and detection of the image to be tested with a resolution of 512*512, the computational amount of the target detection model of the road target detection model with a network structure of CenterNet+ResNet18 can be reduced from 17.37GFLops to 3.9GFlops, which greatly reduces the model computational amount while ensuring the efficiency of target detection.

[0063] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0064] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention.

[0065] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0066] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0067] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0068] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0069] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A road surface target detection method for a traffic road scene, characterized in that: include: Collect multiple traffic road scene images as training samples and form a training set, obtain a road target detection model based on the CenterNet neural network through the training set, and obtain characteristic information of the road target detection model; the characteristic information includes the minimum actual detection width of the target and the minimum pixel detection width of the target; Performing semantic segmentation on the image to be tested to obtain a mask image, identifying a driving road area in the mask image, and sequentially obtaining a plurality of rectangular segmentation frames for segmenting the driving road area in a direction away from an imaging device in a lane extension direction of the driving road area according to characteristic information of the road surface target detection model and image information of the driving road area, and obtaining a zoom ratio of each rectangular segmentation frame; the image information includes an actual lane width and a lane pixel width at each position in the lane extension direction of the driving road area; All the rectangular segmentation frames in the mask image are cut out and scaled according to the scaling ratio of each rectangular segmentation frame to form a plurality of images to be tested, and the plurality of images to be tested are respectively input into the road surface target detection model for road surface target recognition detection; The method of sequentially acquiring a plurality of rectangular segmentation frames for segmenting the driving road area in a direction away from an imaging device in a lane extension direction of the driving road area according to the characteristic information of the road surface object detection model and the image information of the driving road area comprises: For each rectangular segmentation frame sequentially acquired in the direction away from the imaging device in the lane extension direction of the driving road area, the position of the difference between the height of the upper boundary of the previous rectangular segmentation frame and the preset height is used as the lower boundary of the rectangular segmentation frame, wherein the lower boundary of the first rectangular segmentation frame is the bottom edge of the driving road area; Starting from the lower boundary of the rectangular segmentation frame, the mask image is segmented by traversing upward in the height direction multiple times with a preset step length through the pre-segmentation frame until the last traversal does not meet the loop condition, and the upper edge of the pre-segmentation frame after the previous traversal of the last time is used as the upper boundary of the rectangular segmentation frame, wherein the loop condition is: the upper edge of the pre-segmentation frame at each traversal is not less than the target minimum pixel detection width when the product of the lane pixel width corresponding to the mask image divided by the actual lane width and the target minimum actual detection width is divided by the zoom ratio of the rectangular segmentation frame; The larger lane pixel width of the lane pixel width of the driving road area at the lower boundary and the upper boundary of the rectangular segmentation frame is used as the side length width of the rectangular segmentation frame, and the product of the difference between the total number of traversal times and 1 and the preset step length is used as the side length height of the rectangular segmentation frame. Finally, the multiple rectangular segmentation frames obtained cover the driving road area.

2. The road target detection method according to claim 1, characterized in that: The characteristic information of the road target detection model also includes: a maximum actual detection width of the target and a maximum pixel detection width of the target.

3. The road target detection method according to claim 2, characterized in that: The step of sequentially acquiring a plurality of rectangular segmentation frames of the driving road area in a direction away from an imaging device in a lane extension direction of the driving road area according to the characteristic information of the road surface object detection model and the image information of the driving road area comprises step S21, acquiring a lower boundary and an upper boundary of a first rectangular segmentation frame, including: Step S211, picking up the bottom edge of the driving road area as the lower boundary of the first rectangular segmentation frame, and obtaining its corresponding vertical coordinate as Y b ; Step S212, starting from the lower boundary of the first rectangular segmentation frame, through the pre-segmentation frame with a preset step length ΔY step The mask image is segmented in the height direction. When the loop condition is not satisfied in the m+1th loop, the upper edge of the pre-segmented frame after the mth loop is used as the upper boundary of the first rectangular segmented frame, and its corresponding vertical coordinate is obtained as Y temp =Y b -m×ΔY step ,in, The cycle conditions are: (Wx" 车道像速 / W' 车道实际 ×W 目标实际最小 ) / R1≥W 目标像素最小 (2)Wx” 车道像速 is the lane pixel width corresponding to the upper edge of the pre-segmentation frame in the xth traversal in the mask image when the first rectangular segmentation frame is obtained; W' 车道实际 is the actual lane width, W 目标实际最小 is the minimum actual detection width of the target, W 目标像素最小 is the minimum pixel detection width of the target; R1 is the scaling ratio corresponding to the first rectangular segmentation frame; Step S213, compare the pixel width of the driving lane area at the lower boundary position of the first rectangular segmentation box and the pixel width of the driving lane area at the upper boundary position of the first rectangular segmentation box, and use the larger of the two as the side length width of the first rectangular segmentation box. Use |Y b -Y temp | as the side length height of the first rectangular segmentation box, and draw the first rectangular segmentation box in the mask image.

4. The road target detection method according to claim 3, characterized in that: The step of sequentially acquiring a plurality of rectangular segmentation frames of the driving road area in a direction away from an imaging device in a lane extension direction of the driving road area according to the characteristic information of the road target detection model and the image information of the driving road area comprises step S22, acquiring a lower boundary and an upper boundary of the nth rectangular segmentation frame, that is, when n≥2, comprising: Step S221, picking up the upper boundary of the n-1th rectangular segmentation frame and retracting it by a preset height Δh, and taking it as the lower boundary of the nth rectangular segmentation frame, and obtaining its corresponding ordinate as Y n ; Step S222, starting from the lower boundary of the nth rectangular segmentation frame, through the pre-segmentation frame with a preset step length ΔY step The mask image is segmented in the height direction. When the loop condition is not satisfied in the (m+1)th loop, the upper edge of the pre-segmentation frame after the (m)th loop is used as the upper boundary of the (n)th rectangular segmentation frame, and its corresponding ordinate is obtained as Y temp =Y n -m×ΔY step ,in, The cycle conditions are: (Wx" 车道像速 / W' 车道实际 ×W 目标实际最小 ) / Rn≥W 目标像素最小 (3)Wx” 车道像速 is the lane pixel width corresponding to the upper edge of the pre-segmentation frame in the mask image during the x-th traversal when obtaining the n-th rectangular segmentation frame, Rn is the scaling ratio corresponding to the nth rectangular segmentation frame; Step S223: Compare the pixel width of the driving lane area at the lower boundary position of the nth rectangular division box with the pixel width of the driving lane area at the upper boundary position of the nth rectangular division box, and use the larger of the two as the side length width of the nth rectangular division box. Take 丨Y n -Y temp 丨 as the side length height of the nth rectangular division box, and draw the nth rectangular division box in the mask image; Step S224 , repeating the steps S221 to S223 until a plurality of the rectangular segmentation frames cover the driving road area.

5. The road target detection method according to claim 4, characterized in that: The calculation formula of the scaling ratio Rn corresponding to the nth rectangular segmentation frame is: Rn=(Wn' 车道像速 / W' 车道实际 )×(W 目标实际最大 / W 目标像素最大 ) (4) Among them, Wn' 车道像速 is the lane pixel width corresponding to the lower boundary of the nth rectangular segmentation box, n≥1; W 目标实际最大 is the maximum actual detection width of the target, W 目标像素最大 The maximum pixel detection width of the target.

6. The road target detection method according to claim 4, characterized in that: The preset height Δh is: 目标实际最大 ×Rn, where n≥1.

7. The road target detection method according to claim 4, characterized in that: The preset step length ΔYstep is: 目标像素最小 ×Rn, where n≥1.

8. The road target detection method according to claim 1, characterized in that: In the step of identifying the driving road area in the mask image, a contour line frame is used to frame the driving road area identified in the mask image.

9. The road target detection method according to claim 8, characterized in that: The contour line frame is a polygonal contour frame, and the polygonal contour frame is formed by sequentially connecting a plurality of boundary pixel points picked up along the periphery of the driving road area.

10. The road target detection method according to claim 1, characterized in that: The road target detection method further includes merging output results of the road target detection model performing road target recognition detection on a plurality of the images to be tested, so as to obtain the road target recognition detection results of the road target detection model on the images to be tested.

Citation Information

Patent Citations

  • Pavement target identification method based on radar images and similarity weights

    CN111797774A

  • Traffic scene analysis method and device, and storage medium

    CN111814593A

  • Video-based motor vehicle illegal manned detection method

    CN114120250A