Vehicle front view image acquisition device and pavement disease calculation method
By improving the YOLOv7 algorithm and vehicle front-view image acquisition device, the problems of low efficiency and high computing requirements of traditional road patrol are solved, low-cost and efficient road disease identification and calculation are achieved, and the real-time and adaptability of the system are improved.
Patent Information
- Application Number
- CN202410920542.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-11-01
AI Technical Summary
Traditional road patrols rely on manual inspections with low efficiency and high cost. The binocular vision system has high calculation requirements and poor real-time performance when dealing with road diseases. The YOLO algorithm has limitations in detecting extremely small targets, and the road diseases are under different lighting and materials. Different performances make it difficult to achieve high adaptability and generalization ability.
Provide a vehicle forward-view image acquisition device and road surface disease calculation method, adopting a short-focus camera, mobile terminal and industrial control machine, and by improving the YOLOv7 algorithm, including DSConv, ELAN-DSC network, SPPCSPC-FAST structure and SimAM attention mechanism, combined with Wireless network module and data acquisition control module realize road surface disease identification and calculation.
The network computing volume is reduced, the model operation speed and accuracy is improved, and the low-cost road disease identification and calculation is achieved. The system reliability and adaptability are improved. It can identify multiple urban road disease types and calculate disease volume.
Smart Images

Figure CN118890532A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of road surface detection, and relates to a vehicle front view image acquisition device and a road surface disease calculation method. Background Art
[0002] With the development of intelligent transportation systems, road monitoring and maintenance has become a key issue. Traditional road inspections rely on manual regular inspections, which is inefficient and costly. In recent years, the application of visual sensors and artificial intelligence algorithms has provided new solutions for road monitoring. Although binocular vision systems and object detection algorithms have shown potential in road monitoring, there are still some challenges in practical applications:
[0003] The original YOLO algorithm may face high computational requirements when processing large amounts of image data generated by a binocular camera, which may affect the real-time and responsiveness of the system. Road surface defects such as cracks and potholes vary in shape and size and may behave differently under different lighting conditions, which requires the algorithm to be highly adaptable and robust. Road surface defects often appear as smaller features, such as tiny cracks or shallow potholes, which places higher demands on the detection accuracy of the algorithm. Although the YOLO algorithm is powerful, it still has limitations when dealing with extremely small targets. Different road surface materials and environmental conditions may cause the same type of defect to appear different in the image, which tests the generalization and adaptability of the model. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a low-cost vehicle front view image acquisition device and a road surface damage calculation method.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] In one aspect, the present invention provides a vehicle front view image acquisition device, comprising:
[0007] Short-focus camera: installed on the front side of the vehicle to capture the front view of the vehicle;
[0008] Mobile terminal: used by people in the car to hold and control the short-focus camera to collect images;
[0009] Industrial computer: used to receive and save images collected by the short-focus camera;
[0010] Wireless network module: used to provide a wireless local area network for the vehicle, so that the industrial computer and the mobile terminal are in the same local area network.
[0011] Furthermore, the wireless network module is a portable WiFi.
[0012] Furthermore, the mobile terminal is a tablet device.
[0013] Furthermore, the mobile terminal and the industrial computer are both equipped with a data acquisition control module, and the data acquisition control module is used to control the short-focus camera to acquire and save images.
[0014] Furthermore, the short-focus camera is fixed to the rearview mirror inside the vehicle through a bracket.
[0015] In another aspect, the present invention provides a vehicle front view image acquisition method, comprising the following steps:
[0016] S1: Connect the industrial computer and mobile terminal to the same local area network;
[0017] S2: Fix the short-focus camera at the front of the car and connect it to the industrial computer via a video cable;
[0018] S3: Use the mobile terminal to control the short-focus camera to collect road videos from the vehicle's front angle, and store the video data in the industrial computer;
[0019] S4: The video data stored in the industrial computer is used to identify road defects based on the improved YOLOv7 algorithm and obtain key frames;
[0020] S5: Calculate the pavement damage volume based on the image of the short-focus camera on the key frame.
[0021] Further, the improved YOLOv7 algorithm includes:
[0022] Use DSConv convolution instead of ordinary convolution;
[0023] Simplify the ELAN high-efficiency aggregation network and build the ELAN-DSC high-efficiency aggregation network;
[0024] Build the YOLOv7-RDD network model based on the YOLOv7 network;
[0025] Construct a new feature pyramid structure, SPPCSPC-FAST, based on the spatial pyramid pooling structure SPPCSPC in YOLOv7;
[0026] The SimAM attention mechanism is integrated into the model, and SIoU loss is selected as the loss function;
[0027] In the detection stage, NMS non-maximum suppression is added to remove redundant detection boxes.
[0028] Furthermore, DSConv is used to replace Conv in YOLOv7. Each DBL module consists of DSConv, BN and leakyReLu. The activation layer of YOLOv7 is replaced from Silu to leaky ReLu activation function, which is expressed as follows:
[0029]
[0030] In the backbone network layer, the ELAN network in YOLOv7 is optimized to build the ELAN-DSC network, and the DBL layer is used for convolution;
[0031] In the head layer, the SPPCSPC-FAST structure is used to replace the original SPPCSPC structure of YOLOv7. For the texture damage information in the road surface damage, continuous pooling is used in the SPP layer to reduce the spatial size of the feature map by stacking multiple maximum pools.
[0032] Integrate the SimAM attention mechanism, calculate the local self-similarity of the feature map, generate attention weights, and focus on the key areas of the image;
[0033] The non-maximum suppression (NMS) process is used to retain high-confidence target detection boxes and exclude low-confidence error boxes. SIOU loss is used as the loss function, and the overlap degree is estimated through SIOU-NMS to process bounding box targets with different sizes and shapes and high overlap. The calculation formula is as follows:
[0034]
[0035] Where S i Represents the confidence scores of all detection boxes except the highest confidence detection box H. When the detection box B i intersects with H, they overlap and their IoU value is within the overlap threshold ε, B i The score is set to 0.
[0036] Furthermore, the improved YOLOv7 algorithm was trained through the urban road disease dataset CQRDD to obtain an urban road disease recognition model, which can identify various types of urban road diseases including longitudinal cracks, transverse cracks, cracks, potholes, blurred zebra crossings, blurred solid lines, manhole cover subsidence, block repairs, strip repairs, and bagging diseases.
[0037] Further, the calculation of the road surface damage volume based on the short-focus camera on the key frame in step S5 specifically includes the following steps:
[0038] S51: Correcting the short-focus viewing angle image;
[0039] The computer image obtained by the short-focus camera has a size of M rows and N columns, which is transformed into a calibrated image with q rows and s columns; the angle θ between the camera mirror and the ground, the vertical height h of the lens optical center from the ground, the actual length p0 corresponding to the bottom edge of the image, and the actual length q0 corresponding to the vertical direction of the image are measured;
[0040] (1) Calculate fixed parameters:
[0041]
[0042] (3) Calculate the coordinates of the corresponding points according to the coordinate transformation formula. For the pixel point in the i-th row and j-th column of the original image, the pixel point in the m-th row and n-th column after the correction transformation is calculated. The coordinate transformation is performed according to the following formula:
[0043] ①
[0044] ②
[0045] ③
[0046] Substitute ① and ② into ③ to get the final short-focus viewing angle coordinate transformation formula:
[0047]
[0048] S52: measuring the area conversion relationship of the short focal viewing angle;
[0049] Place a white standard plate on the road, take a photo with a short-focus camera, perform image correction according to the method in S51, and calculate the number of pixels ω occupied by the white standard plate;
[0050] S53: Calculate the measured pavement damage area;
[0051] The detected disease image is marked with pixel grids, and then the number of pixels occupied by the disease is calculated to obtain the disease area. The area calculation formula is:
[0052] S = λ·ω.
[0053] The beneficial effects of the present invention are as follows: the present invention identifies the type of pavement damage and extracts key frames through the improved YOLOv7 network, which greatly reduces the amount of network calculation and speeds up the operation of the network model compared to the traditional YOLOv7 algorithm; through SPPCSPC-FAST, the network model is accelerated while the receptive field remains unchanged; the improved algorithm further improves the model accuracy without introducing additional parameters; the system provided by the present invention is low-cost, the method can calculate the damage volume, and has high calculation efficiency and accuracy.
[0054] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0056] Figure 1 This is a structural diagram of the vehicle front view image acquisition device described in Example 1;
[0057] Figure 2 This is the network structure diagram of the improved algorithm YOLOv7-RDD described in Example 2;
[0058] Figure 3 This is the YOLOv7 disease recognition flow chart;
[0059] Figure 4 This is the ELAN-DSC network structure diagram;
[0060] Figure 5 Schematic diagram of the maximum pooling operation;
[0061] Figure 6 It is the schematic diagram of the SPPCSPC-FAST structure;
[0062] Figure 7 (a) and (b) are schematic diagrams of viewing angle transformation at 8mm focal length. DETAILED DESCRIPTION
[0063] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0064] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0065] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is 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 operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0066] Embodiment 1:
[0067] like Figure 1 As shown, this embodiment provides a vehicle front view image acquisition device, which is composed of an 8mm focal length camera, an industrial computer, a portable WiFi, a tablet device, and a data acquisition control module. It has low cost and is easy to install and disassemble.
[0068] 8mm focal length camera: captures the front view of the vehicle. Industrial computer: Ubuntu system, receives instructions from the data acquisition control module, and stores image data for a long time. Portable WiFi: provides local area network. Tablet device: Windows system, equipped with data acquisition control module. Data acquisition control module: installed in the industrial computer and tablet device, the industrial computer and tablet device need to be connected to the same local area network, control the 8mm focal length camera to collect and save images.
[0069] Embodiment 2:
[0070] This embodiment provides a vehicle front view image acquisition method, comprising the following steps:
[0071] S1. Turn on the portable WiFi to provide a local area network, and connect the industrial computer and tablet device to the same local area network.
[0072] The S2, 8mm focal length camera is fixed to the rearview mirror inside the car through a bracket and connected to the industrial computer through a video cable.
[0073] S3. Open the data acquisition control module in the tablet device, control the 8mm focal length camera to collect road video from the vehicle's front angle, and store the video data in the industrial computer.
[0074] S4, the road surface video collected from the vehicle's front view angle is used to identify the target of the disease by using the improved YOLOv7 algorithm, and obtain the key frame image. Figure 2-3 As shown, compared with the traditional YOLOv7 algorithm, the present invention has the following improvements:
[0075] DSConv is used to replace the Conv in YOLOv7. DSConv divides the traditional convolution layer into two components, variable quantization kernel (VQK) and distribution offset, which reduces the computational complexity and further enhances the ability of early network features using an efficient aggregation network structure. Each DBL module consists of DSConv, BN, and leaky ReLu. The activation layer of YOLOv7 is replaced from Silu to leaky ReLu. The leaky ReLu activation function structure is as follows: Figure 1 , it remains linear in the non-negative part to alleviate the problem of vanishing gradient of ReLu activation function, and negative_slope is 0.01.
[0076]
[0077] In the backbone network layer, the ELAN network in YOLOv7 is optimized to construct the ELAN-DSC network, the structure of which is as follows: Figure 4 , the above-mentioned DBL layer is used for convolution.
[0078] In the head layer, the SPPCSPC-FAST structure is used to replace the original SPPCSPC structure of YOLOv7. The original SPPCSPC structure performs multiple maximum pooling operations on the feature map, such as Figure 5 shown.
[0079] Different pooling layer sizes are used to obtain different receptive fields to distinguish large and small targets. When the pool size window is small, more accurate features can be extracted, and smaller windows contain more detailed information. The present invention proposes the SPP-FAST structure for texture damage information in pavement damage. Continuous pooling is used in the SPP layer. The pooling operation can effectively reduce the spatial size of the input data, thereby reducing the calculation and storage space, while retaining the main feature information. By stacking multiple maximum pools, such as Figure 6 , further reducing the spatial size of the feature map to speed up modeling and extract key features, making the model run faster.
[0080] The SimAM attention mechanism is integrated into the model. SimAM is a lightweight, parameter-free convolutional neural network attention mechanism that generates attention weights by calculating the local self-similarity of feature maps. SimAM does not require any additional parameters and can effectively improve the performance of convolutional neural networks. The invention of the SimAM attention mechanism can help the model focus on the key areas of the image and improve model performance.
[0081] NMS (non-maximum suppression) is a post-processing process for target detection. Because there may be more than one prediction box when detecting a specific target, the NMS process retains the target detection box with high confidence and excludes the error box with low confidence. The present invention uses SIOU loss as the loss function, SIOU-NMS to more accurately estimate the degree of overlap, so as to better handle bounding box targets with different sizes and shapes and high overlap. The calculation formula is as follows: Figure 5 , S i Represents the confidence scores of all detection boxes except the highest confidence detection box H. When the detection box B i intersects with H, they overlap and their IoU value is within the overlap threshold ε, B i The score of is set to 0, thereby improving the accuracy and efficiency of target detection.
[0082]
[0083] The present invention constructs a town road disease dataset CQRDD for model training, which includes various types of town road disease including longitudinal cracks, transverse cracks, cracks, potholes, zebra crossing blur, solid line blur, manhole cover subsidence, block repair, strip repair, and bagging. The key frame image acquisition operation steps of the present invention are: the front view image data in the industrial control computer is transferred to the improved YOLOv7 algorithm for recognition, and the algorithm will capture the type of road disease in the video and its confidence, and form a key frame.
[0084] S5, step S5, based on the image of the 8mm focal length viewing angle on the key frame, calculates the road surface damage area, specifically comprising the following steps:
[0085] S51: Correct the image with a focal length of 8 mm;
[0086] like Figure 7 In (a)-(b), the computer image obtained by the 8mm focal length camera has a size of M rows and N columns, and needs to be transformed into a calibrated image with q rows and s columns. The angle θ between the camera mirror and the ground, the vertical height h of the lens optical center from the ground, the actual length p0 corresponding to the bottom edge of the image, and the actual length q0 corresponding to the vertical direction of the image can be obtained by measurement.
[0087] (1) Calculate fixed parameters:
[0088]
[0089] (4) Calculate the coordinates of the corresponding points according to the coordinate transformation formula. For the pixel point in the i-th row and j-th column of the original image, after correction transformation, it corresponds to the pixel point in the m-th row and n-th column. Perform coordinate transformation according to the following formula:
[0090] ①
[0091] ②
[0092] ③
[0093] Substitute ① and ② into ③ to get the final 8mm focal length viewing angle coordinate transformation formula:
[0094]
[0095] S52: measure the area conversion relationship of 8mm focal length viewing angle;
[0096] Place a 1m×1m white standard plate on the road, take a photo with a camera of 8mm focal length, perform image correction according to the method of S51, and calculate the number of pixels ω occupied by the 1m×1m white standard plate.
[0097] S53: Calculate the measured road surface damage area.
[0098] The detected disease image is marked by pixel gridding, and then the number of pixels occupied by the disease is calculated to obtain the disease area. The area calculation formula is:
[0099] S=λ·ω
[0100] A person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. When the program is executed, the steps of the method can be implemented. The storage medium, such as ROM / RAM, a disk, an optical disk, etc.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A vehicle front view image acquisition device, characterized in that: include: Short-focus camera: installed on the front side of the vehicle to capture the front view of the vehicle; Mobile terminal: used by people in the car to hold and control the short-focus camera to collect images; Industrial computer: used to receive and save images collected by the short-focus camera; Wireless network module: used to provide a wireless local area network for the vehicle, so that the industrial computer and the mobile terminal are in the same local area network.
2. The vehicle front view image acquisition device according to claim 1, characterized in that: The wireless network module is a portable WiFi.
3. The vehicle front view image acquisition device according to claim 1, characterized in that: The mobile terminal is a tablet device.
4. The vehicle front view image acquisition device according to claim 1, characterized in that: The mobile terminal and the industrial computer are both equipped with a data acquisition control module, and the data acquisition control module is used to control the short-focus camera to acquire and save images.
5. The vehicle front view image acquisition device according to claim 1, characterized in that: The short-focus camera is fixed to the rearview mirror inside the vehicle through a bracket.
6. A vehicle front view image acquisition method, characterized in that: The following steps are involved: S1: Connect the industrial computer and mobile terminal to the same local area network; S2: Fix the short-focus camera at the front of the car and connect it to the industrial computer via a video cable; S3: Use the mobile terminal to control the short-focus camera to collect road videos from the vehicle's front angle, and store the video data in the industrial computer; S4: The video data stored in the industrial computer is used to identify road defects based on the improved YOLOv7 algorithm and obtain key frames; S5: Calculate the pavement damage volume based on the image of the short-focus camera on the key frame.
7. The vehicle front view image acquisition method according to claim 6, characterized in that: The improved YOLOv7 algorithm includes: Use DSConv convolution instead of ordinary convolution; Simplify the ELAN high-efficiency aggregation network and build the ELAN-DSC high-efficiency aggregation network; Build the YOLOv7-RDD network model based on the YOLOv7 network; Construct a new feature pyramid structure based on the spatial pyramid pooling structure SPPCSPC in YOLOv7— SPPCSPC-FAST; The SimAM attention mechanism is integrated into the model, and SIoU loss is selected as the loss function; In the detection stage, NMS non-maximum suppression is added to remove redundant detection boxes.
8. The vehicle front view image acquisition method according to claim 6, characterized in that: DSConv is used to replace Conv in YOLOv7. Each DBL module consists of DSConv, BN and leaky ReLu. The activation layer of YOLOv7 is replaced from Silu to leaky ReLu activation function, as shown below: In the backbone network layer, the ELAN network in YOLOv7 is optimized to build the ELAN-DSC network, and the DBL layer is used for convolution; In the head layer, the SPPCSPC-FAST structure is used to replace the original SPPCSPC structure of YOLOv7. For the texture damage information in the road surface damage, continuous pooling is used in the SPP layer to reduce the spatial size of the feature map by stacking multiple maximum pools. Integrate the SimAM attention mechanism, calculate the local self-similarity of the feature map, generate attention weights, and focus on the key areas of the image; The non-maximum suppression (NMS) process is used to retain high-confidence target detection boxes and exclude low-confidence error boxes. SIOU loss is used as the loss function, and the overlap degree is estimated through SIOU-NMS to process bounding box targets with different sizes and shapes and high overlap. The calculation formula is as follows: Where S i Represents the confidence scores of all detection boxes except the highest confidence detection box H. When the detection box B i intersects with H, they overlap and their IoU value is within the overlap threshold ε, B i The score is set to 0.
9. The vehicle front view image acquisition method according to claim 6, characterized in that: The improved YOLOv7 algorithm was trained by using the urban road disease dataset CQRDD to obtain an urban road disease recognition model that can identify various types of urban road diseases including longitudinal cracks, transverse cracks, cracks, potholes, blurred zebra crossings, blurred solid lines, manhole cover subsidence, block repairs, strip repairs, and bagging diseases.
10. The vehicle front view image acquisition method according to claim 6, characterized in that: The step S5 calculates the road surface damage volume based on the short-focus camera on the key frame, which specifically includes the following steps: S51: Correcting the short-focus viewing angle image; The computer image obtained by the short-focus camera has a size of M rows and N columns, which is transformed into a calibrated image with q rows and s columns; the angle θ between the camera mirror and the ground, the vertical height h of the lens optical center from the ground, the actual length p0 corresponding to the bottom edge of the image, and the actual length q0 corresponding to the vertical direction of the image are measured; (1) Calculate fixed parameters: (2) Calculate the coordinates of the corresponding points according to the coordinate transformation formula. For the pixel point in the i-th row and j-th column of the original image, the pixel point in the m-th row and n-th column after the correction transformation is calculated. The coordinate transformation is performed according to the following formula: Substitute ① and ② into ③ to get the final short-focus viewing angle coordinate transformation formula: S52: measuring the area conversion relationship of the short focal viewing angle; Place a white standard plate on the road, take a photo with a short-focus camera, perform image correction according to the method in S51, and calculate the number of pixels ω occupied by the white standard plate; S53: Calculate the measured pavement damage area; The detected disease image is marked with pixel grids, and then the number of pixels occupied by the disease is calculated to obtain the disease area. The area calculation formula is: S = λ·ω.
Citation Information
Cited By
Parking positioning method, parking method and parking device based on image key frame
CN120047921A
