Vehicle detection image processing method and device suitable for severe environment

By using dark channel prior fog removal algorithm and YOLOv7-tiny network and other technical means in the vehicle detection system, the problem of poor detection effect of vehicle detection system in severe weather is solved, and high-precision target detection in harsh environments is achieved.

CN119580200APending Publication Date: 2025-03-07ZHONGBEI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411606298.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In severe weather conditions, traditional vehicle detection systems are difficult to ensure stable detection results, especially in weather conditions such as rain, snow, and fog, the camera is easily affected by blurred vision and light reflection, resulting in a decline in image quality and the inability to accurately identify the target object.

Method used

The dark channel prior fog removal algorithm is used to preprocess the images captured in bad weather. Combined with the YOLOv7-tiny network and feature extraction modules SPPCSP, RCSOSA module, etc., multi-scale feature information is captured through multi-layer convolution, spatial pyramid pooling and feature stitching, and the image processing model is trained through Focal-EIOU loss function.

Benefits of technology

It effectively improves the vehicle's target detection accuracy and reliability in harsh environments, ensures safe driving under complex weather conditions, and reduces the impact of bad weather on vehicle images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119580200A_ABST
    Figure CN119580200A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle detection image processing method and device suitable for a severe environment, and the method comprises the steps: carrying out the detection through a detection network, respectively outputting three groups of first feature maps with different sizes, and enabling the three groups of first feature maps with different sizes to be used for recognizing a large target, a medium target and a small target in an image; processing the three groups of first feature maps with different sizes through a feature extraction module SPPCSP to obtain three groups of second feature maps with different sizes; the feature extraction module SPPCSP is used for carrying out pooling on different spatial resolutions and capturing feature information under various scales; and processing the three groups of second feature maps with different sizes through an RCSOSA module and a convolutional layer CBL to obtain three groups of third feature maps with different sizes, namely detection images. The target detection effect of the vehicle in a severe environment can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a vehicle detection image processing method and device suitable for harsh environments. Background Art

[0002] With the rapid development of autonomous driving, intelligent transportation and intelligent vehicle systems, vehicle detection technology plays a vital role in improving driving safety and road monitoring efficiency. In various driving scenarios, vehicle detection systems need to accurately identify and analyze vehicles and their surroundings, especially in urban traffic management, highway monitoring and complex traffic environments. Such systems usually rely on a variety of technical means such as sensors, cameras, radars, etc., combined with computer vision and deep learning algorithms to obtain and process environmental information in real time.

[0003] However, in adverse weather conditions (such as rain, snow, fog, strong light, night, etc.), environmental factors will significantly affect the detection effect of the system. Traditional single sensor systems are prone to failure due to environmental changes and cannot guarantee stable detection in complex environments. Specifically, the camera is easily affected by problems such as blurred line of sight and light reflection in weather conditions such as rain, snow, and fog, resulting in reduced image quality and inability to accurately identify the target object. At night or in strong light conditions, the camera is easily limited by changes in light intensity, resulting in overexposure or underexposure, affecting the detection effect. Summary of the invention

[0004] The object of the present invention is to provide a vehicle detection image processing method and device suitable for harsh environments, which can effectively improve the target detection effect of vehicles in harsh environments.

[0005] Based on the same inventive concept, the present invention has two independent technical solutions:

[0006] 1. A vehicle detection image processing method suitable for harsh environments, comprising the following steps:

[0007] Step 1: Use the dark channel prior defogging algorithm to process the image captured by the vehicle visual sensor in bad weather to obtain a preprocessed image;

[0008] Step 2: Based on the preprocessed image, the detection network is used to perform detection, and three groups of first feature maps of different sizes are output respectively, wherein the three groups of first feature maps of different sizes are used to identify large targets, medium targets, and small targets in the image respectively;

[0009] Step 3: After the three groups of first feature maps of different sizes are processed by a feature extraction module SPPCSP, three groups of second feature maps of different sizes are obtained; the feature extraction module SPPCSP is used to perform pooling at different spatial resolutions to capture feature information at multiple scales;

[0010] Step 4: After the three groups of second feature maps of different sizes are processed by the RCSOSA module and the convolution layer CBL, three groups of third feature maps of different sizes, i.e., detection images, are obtained;

[0011] Step 5: Calculate the loss function and train the image processing model.

[0012] Furthermore, in step 2, the detection network uses the YOLOv7-tiny network as a reference framework, including a first ELAN module, a second ELAN module, a third ELAN module, and a fourth ELAN module that are connected in sequence, and a maximum pooling layer MP is provided between each ELAN module. The preprocessed image is sequentially input into the first ELAN module, the second ELAN module, the third ELAN module, and the fourth ELAN module through the convolution layer CBL, and then three groups of first feature maps of different sizes are output respectively.

[0013] Furthermore, in step 2, the ELAN module includes three convolution branches, which are respectively a common convolution layer CBL, a deformable convolution layer DCNv4, and a combination of the common convolution layer CBL and the deformable convolution layer DCNv4; the three convolution branches are fused through a connection layer Connet.

[0014] Furthermore, in step 3, the feature extraction module SPPCSP includes three pooling branches, which are respectively maximum pooling layers MP with three different pooling kernels, and the three different pooling kernels are respectively used to identify large targets, medium targets, and small targets in the image; the three pooling branches are fused through the connection layer Connet.

[0015] Further, in step 3, the three groups of first characteristic maps of different sizes are respectively a large-size first characteristic map, a medium-size first characteristic map, and a small-size first characteristic map, and the three groups of second characteristic maps of different sizes are respectively a large-size second characteristic map, a medium-size second characteristic map, and a small-size second characteristic map,

[0016] The small-size first feature map is processed by the feature extraction module SPPCSP to obtain a small-size second feature map, and the small-size second feature map is processed by the convolution layer CBL and up-sampled to obtain a small-size first feature map; the medium-size first feature map is processed by the CBL convolution layer to obtain a medium-size first feature map, and the small-size first feature map is fused with the medium-size first feature map to obtain a medium-size second feature map.

[0017] Further, in step 3, the medium-sized second feature map is processed by the first RCSOSA module and the convolution layer CBL and upsampled to obtain a medium-sized first-second feature map; the large-sized first feature map is processed by the CBL convolution layer to obtain a large-sized first-first feature map, and the large-sized first-first feature map is fused with the medium-sized first-second feature map to obtain a large-sized second feature map.

[0018] Further, in step 4, the three groups of third characteristic maps of different sizes are respectively a large-size third characteristic map, a medium-size third characteristic map, and a small-size third characteristic map;

[0019] The medium-sized second feature map is processed by the first RCSOSA module, the second RCSOSA module, and the second convolutional layer CBL in sequence to obtain a medium-sized second feature map; the small-sized second feature map is fused with the medium-sized second feature map, and then processed by the third RCSOSA module and the third convolutional layer CBL in sequence to obtain a small-sized third feature map;

[0020] The large-sized second feature map is processed by the fourth RCSOSA module and the fourth convolutional layer CBL in sequence to obtain a large-sized third feature map.

[0021] Further, in step 4, the large-size second feature map is processed by the fourth RCSOSA module and the fifth convolutional layer CBL in sequence to obtain a large-size second-first feature map; the medium-size second feature map is processed by the first RCSOSA module to obtain a medium-size second-first feature map; the medium-size second-first feature map is fused with the large-size second-first feature map, and then processed by the second RCSOSA module and the first convolutional layer CBL to obtain a medium-size third feature map.

[0022] Furthermore, in step 5, the loss function adopts the Focal-EIOU loss function.

[0023] 2. A vehicle detection image processing device suitable for harsh environments, used to execute the above method.

[0024] The present invention has the beneficial effects:

[0025] The present invention uses a dark channel prior defogging algorithm to process images captured by a vehicle visual sensor in bad weather to obtain a preprocessed image; based on the preprocessed image, a detection network is used to detect and output three groups of first feature maps of different sizes, respectively, and the three groups of first feature maps of different sizes are used to identify large targets, medium targets, and small targets in the image; the three groups of first feature maps of different sizes are processed by a feature extraction module SPPCSP to obtain three groups of second feature maps of different sizes; the feature extraction module SPPCSP is used to perform pooling at different spatial resolutions to capture feature information at multiple scales; the three groups of second feature maps of different sizes are processed by an RCSOSA module and a convolutional layer CBL to obtain three groups of third feature maps of different sizes, namely, detection images; the loss function is calculated to train an image processing model. The present invention effectively improves the accuracy and reliability of vehicle target detection by combining multimodal sensors, intelligent data fusion algorithms, and image processing technology to ensure safe driving under complex weather conditions.

[0026] The present invention uses a dark channel priori defogging algorithm to process images captured by a vehicle visual sensor in bad weather to obtain a preprocessed image, thereby effectively reducing the impact of bad weather on vehicle images.

[0027] The detection network of the present invention uses the YOLOv7-tiny network as a reference framework, including a first ELAN module, a second ELAN module, a third ELAN module, and a fourth ELAN module connected in sequence, and a maximum pooling layer MP is provided between each ELAN module. The pre-processed image is sequentially input to the first ELAN module, the second ELAN module, the third ELAN module, and the fourth ELAN module through the convolution layer CBL, and then three groups of first feature maps of different sizes are output respectively; the ELAN module includes three convolution branches, and the three convolution branches are respectively a common convolution layer CBL, a deformable convolution layer DCNv4, and a combination of a common convolution layer CBL and a deformable convolution layer DCNv4; the three convolution branches are fused through a connection layer Connet. The detection network of the present invention is improved based on YOLOv7-tiny, and efficient detection of the target is achieved. YOLOv7-tiny has fewer parameters and calculation amount, is suitable for running on devices with limited resources, and has a fast inference speed, which meets the lightweight deployment requirements of this detection task. The ELAN module of the present invention includes a deformable convolution layer DCNv4, the characteristics of which enable it to dynamically adjust the convolution kernel to adapt to the deformation of the vehicle and different viewing angles under adverse weather conditions. This adaptability helps to detect targets more accurately in environments such as rain, snow or fog. At the same time, DCNv4 enhances the ability to capture detailed information and improves the robustness of the model under interference such as lighting changes, blur and reflection. In addition, its flexibility allows small targets and partially occluded vehicles to be effectively detected, and the adaptive convolution kernel can handle the impact of lighting changes on target recognition, further ensuring the accuracy and reliability of vehicle target detection.

[0028] The feature extraction module SPPCSP in step 3 of the present invention includes three pooling branches, which are respectively the maximum pooling layers MP of three different pooling cores, and the three different pooling cores are respectively used to identify large targets, medium targets, and small targets in the image; the three pooling branches are fused through the connection layer Connet. The three groups of first feature maps of different sizes are respectively large-size first feature maps, medium-size first feature maps, and small-size first feature maps, and the three groups of second feature maps of different sizes are respectively large-size second feature maps, medium-size second feature maps, and small-size second feature maps. The small-size first feature map is processed by the feature extraction module SPPCSP to obtain a small-size second feature map, and the small-size second feature map is processed by the convolution layer CBL and up-sampled to obtain a small-size first feature map; the medium-size first feature map is processed by the CBL convolution layer to obtain a medium-size first feature map, and the small-size first feature map is fused with the medium-size first feature map to obtain a medium-size second feature map. After the medium-sized second feature map is processed by the first RCSOSA module and the convolution layer CBL and upsampled, a medium-sized first-second feature map is obtained; after the large-sized first feature map is processed by the CBL convolution layer, a large-sized first-first feature map is obtained, and the large-sized first-first feature map is fused with the medium-sized first-second feature map to obtain a large-sized second feature map. The feature extraction module SPPCSP of the present invention enhances the feature representation capability through a combination of multi-layer convolution, spatial pyramid pooling and feature splicing. The final output feature map combines information of different scales, thereby improving the model's ability to recognize and detect objects. By splicing features of different pooling scales, the SPPCSP module can provide rich contextual information, enhance the detection capability of objects of different sizes, and further ensure the accuracy and reliability of vehicle target detection.

[0029] In step 4 of the present invention, the three groups of third feature maps of different sizes are respectively a large-size third feature map, a medium-size third feature map, and a small-size third feature map; the medium-size second feature map is processed by the first RCSOSA module, the second RCSOSA module, and the second convolutional layer CBL in sequence to obtain a medium-size second feature map; the small-size second feature map is fused with the medium-size second feature map, and then processed by the third RCSOSA module and the third convolutional layer CBL in sequence to obtain a small-size third feature map; the large-size second feature map is processed by the fourth RCSOSA module and the fourth convolutional layer CBL in sequence to obtain a large-size third feature map. The large-size second feature map is processed by the fourth RCSOSA module and the fifth convolutional layer CBL in sequence to obtain a large-size second feature map; the medium-size second feature map is processed by the first RCSOSA module to obtain a medium-size second feature map; the medium-size second feature map is fused with the large-size second feature map, and then processed by the second RCSOSA module and the first convolutional layer CBL to obtain a medium-size third feature map. The present invention adopts the RCSOSA module to process images, in which the RCS module combines the channel shuffling strategy and re-parameterized convolution to enhance the feature extraction capability, and the OSA module aggregates multiple features to ensure feature reuse, enhance information flow, reduce the computational burden, and further ensure the accuracy and reliability of vehicle target detection.

[0030] The loss function of the present invention adopts the Focal-EIOU loss function. The present invention introduces the Focal-EIOU loss function in the training process to evaluate the difference between the model prediction and the actual annotation, and guide the optimization of the model parameters, effectively improve the model performance, and further ensure the accuracy and reliability of vehicle target detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a schematic diagram of the overall structure of a vehicle detection image processing network suitable for harsh environments of the present invention;

[0032] Figure 2 is a schematic diagram of the structure of the ELAN module (ELAN-D) of the present invention;

[0033] Figure 3 It is a schematic diagram of the structure of the existing ELAN module;

[0034] Figure 4 It is a schematic diagram of the structure of the SPPCSP module of the present invention. DETAILED DESCRIPTION

[0035] The present invention is described in detail below in conjunction with the various embodiments shown in the accompanying drawings, but it should be noted that these embodiments are not limitations of the present invention, and any equivalent transformations or substitutions in functions, methods, or structures made by ordinary technicians in the field based on these embodiments are all within the scope of protection of the present invention.

[0036] Embodiment 1:

[0037] Image processing method for vehicle detection in harsh environments

[0038] like Figure 1 As shown, the vehicle detection image processing method applicable to harsh environments of the present invention comprises the following steps:

[0039] Step 1: Use the dark channel prior dehazing algorithm to process the image captured by the vehicle vision sensor in bad weather to obtain a preprocessed image.

[0040] The dark channel prior dehazing model is as follows:

[0041] I(x)=J(x)t(x)+A(-t(x)) (1)

[0042] Transform equation (1) to get equation (2):

[0043]

[0044] Where: I(x) is the image to be dehazed; J(x) is the restored haze-free image; t(x) is the transmittance; A is the global atmospheric light component; c is the R, G, and B channels.

[0045] Because in an image without weather interference such as fog, snow, and rain, there will always be a channel with a low value in the RGB channel of the image, and the minimum value of this area is a very small value, close to 0. The fog-free image J(y) is converted into a grayscale image through the RGB minimum value, and the minimum channel filtering is performed on it to obtain the corresponding dark channel image J dark , J dark →0. As shown in the following formula:

[0046]

[0047] Where: Ω(x) is the window centered at x.

[0048] Perform the above operation on equation (2) and know J dark →0, we can get t(x) and A C The relationship is as follows:

[0049]

[0050] Where: ω is the defogging parameter. Then, we take the top 0.1% brightest pixels from the dark channel image according to the brightness, and then find the corresponding point with the highest brightness in the original foggy image in these positions as A. C Finally, the haze-free image of the chemical caustic soda workshop after processing is restored as follows:

[0051]

[0052] Where: t0 represents the minimum threshold of transmittance.

[0053] Step 2: Based on the preprocessed image, detection is performed through the detection network, and three groups of first feature maps of different sizes are output respectively. The three groups of first feature maps of different sizes are used to identify large targets, medium targets, and small targets in the image respectively.

[0054] like Figure 1 As shown, the detection network uses the YOLOv7-tiny network as a reference framework, including a first ELAN module, a second ELAN module, a third ELAN module, and a fourth ELAN module connected in sequence, and a maximum pooling layer MP is provided between each ELAN module (ELAN-D). The preprocessed image is sequentially input into the first ELAN module, the second ELAN module, the third ELAN module, and the fourth ELAN module through the convolution layer CBL, and then three groups of first feature maps of different sizes are output respectively.

[0055] like Figure 2 As shown in the figure, the ELAN module (ELAN-D) includes three convolution branches, which are respectively a normal convolution layer CBL, a deformable convolution layer DCNv4, and a combination of a normal convolution layer CBL and a deformable convolution layer DCNv4; the three convolution branches are fused through a connection layer Connet. The convolution kernel of the deformable convolution DCNv4 can obtain offsets through learning, and these offsets will dynamically adjust the position of the convolution kernel according to the features of the input feature map, which enables the network to better adapt to the deformation of the object and capture richer and more detailed features.

[0056] like Figure 1As shown in the figure, the image size after preprocessing is 640x640x3. After the first CBL processing, the image becomes 320*320*32 (the convolution kernel size of this step is 3*3, and the step size is 2). After another CBL processing, the image obtained is 160*160*64. After the first ELAN module and the maximum pooling layer MP processing, the size becomes 80*80*128. The ELAN module further refines and integrates the features instead of increasing the number of channels. By keeping the number of channels unchanged, the network can focus on the existing features and improve the expressiveness of the features. The size of the first feature map output by the second ELAN module is 80*80*128. Similarly, the size of the first feature map output by the third ELAN module is 40*40*256, and the size of the first feature map output by the fourth ELAN module is 20*20*512.

[0057] Step 3: After the three groups of first feature maps of different sizes are processed by the feature extraction module SPPCSP, three groups of second feature maps of different sizes are obtained; the feature extraction module SPPCSP is used to perform pooling at different spatial resolutions to capture feature information at multiple scales.

[0058] like Figure 4 As shown, the feature extraction module SPPCSP includes three pooling branches, which are respectively the maximum pooling layers MP of three different pooling kernels, and the three different pooling kernels are used to identify large targets, medium targets and small targets in the image respectively; the three pooling branches are fused through the connection layer Connet. The three maximum pooling layers MP correspond to different pooling kernels, which can capture context information of different scales. The small pooling kernel (pooling kernel size is 5, the same below) can capture the detail information of a smaller receptive field, which is suitable for identifying small targets in the image; the medium pooling kernel (9) is used to capture the context information of a medium range, which is helpful for detecting medium-sized targets; the large pooling kernel (13) can cover a larger range of features and capture the information of a larger receptive field, which is very effective for detecting large targets. Through these pooling operations of different scales, the model can simultaneously obtain features of different scales in the image, enhancing its ability to detect multi-scale targets.

[0059] like Figure 1 As shown, the three groups of first characteristic graphs of different sizes are respectively a large-size first characteristic graph, a medium-size first characteristic graph, and a small-size first characteristic graph, and the three groups of second characteristic graphs of different sizes are respectively a large-size second characteristic graph, a medium-size second characteristic graph, and a small-size second characteristic graph,

[0060] The small-sized first feature map is processed by the feature extraction module SPPCSP to obtain the small-sized second feature map, and the small-sized second feature map is processed by the convolution layer CBL and up-sampled to obtain the small-sized first feature map; the medium-sized first feature map is processed by the CBL convolution layer to obtain the medium-sized first feature map, and the small-sized first feature map is fused with the medium-sized first feature map to obtain the medium-sized second feature map. The UP operation is upsampling, which doubles the image size, but the number of channels remains unchanged.

[0061] After the medium-sized second feature map is processed by the first RCSOSA module and the convolution layer CBL and up-sampled, a medium-sized first-second feature map is obtained; after the large-sized first feature map is processed by the CBL convolution layer, a large-sized first-first feature map is obtained, and the large-sized first-first feature map is fused with the medium-sized first-second feature map to obtain a large-sized second feature map.

[0062] Step 4: After the three groups of second feature maps of different sizes are processed by the RCSOSA module and the convolution layer CBL, three groups of third feature maps of different sizes, i.e., detection images, are obtained.

[0063] like Figure 1 As shown, the three groups of third characteristic graphs of different sizes are respectively a large-sized third characteristic graph, a medium-sized third characteristic graph, and a small-sized third characteristic graph;

[0064] The medium-sized second feature map is processed by the first RCSOSA module, the second RCSOSA module, and the second convolutional layer CBL in sequence to obtain a medium-sized second feature map; the small-sized second feature map is fused with the medium-sized second feature map, and then processed by the third RCSOSA module and the third convolutional layer CBL in sequence to obtain a small-sized third feature map;

[0065] The large-sized second feature map is processed by the fourth RCSOSA module and the fourth convolutional layer CBL in sequence to obtain a large-sized third feature map.

[0066] The large-size second feature map is processed by the fourth RCSOSA module and the fifth convolutional layer CBL in sequence to obtain a large-size second-first feature map; the medium-size second feature map is processed by the first RCSOSA module to obtain a medium-size second-first feature map; the medium-size second-first feature map is fused with the large-size second-first feature map, and then processed by the second RCSOSA module and the first convolutional layer CBL to obtain a medium-size third feature map.

[0067] The RCSOSA module is divided into two parts: the RCS module and the OSA module. The RCS module combines the channel shuffling strategy and enhances the network's feature extraction capability through re-parameterized convolution. In the training phase, a multi-branch structure is used to learn rich feature representations; in the inference phase, it is simplified to a single branch through structured re-parameterization to reduce memory consumption. The OSA module can aggregate multiple feature cascades at one time to form an RCS-OSA structure. By stacking RCS modules, feature reuse is ensured and information flow between different layers is strengthened. It can also reduce the network computing burden and improve computing efficiency.

[0068] The sizes of the large-scale third feature map, medium-scale third feature map, and small-scale third feature map generated are 80x80x64, 40x40x128, and 20x20x256, respectively, which are used to detect large targets, medium targets, and small targets. Each scale feature map contains multiple anchor boxes, predicting the bounding box position, confidence, and category of each target. The final target detection result is obtained by decoding the prediction results and performing non-maximum suppression (NMS), thereby achieving efficient detection of targets of different sizes.

[0069] Step 5: Calculate the loss function and train the image processing model.

[0070] The loss function adopts the Focal-EIOU loss function.

[0071] The Focal-EIOU loss function uses the aspect ratio instead of the width and height in confidence judgment, which leads to the inability to optimize the similarity problem. The Focal-EIOU loss function separates the aspect ratio and introduces Focal clustering high-quality anchor boxes to improve the performance of the model.

[0072] The EIOU expression is as follows:

[0074]

[0075] IOU represents the intersection-over-union ratio between the predicted box and the true box; ρ represents the Euclidean distance between two points; b and b gt Represent the center points of the predicted box and the real box respectively; w c and h c The width and height of the minimum bounding rectangle of the predicted bounding box and the true bounding box; w and h represent the length and width of the predicted box respectively; w gt and h gt Represent the length and width of the real box respectively;

[0076] The Focal-EIOU loss function expression is as follows:

[0077] LFocal-EIOU =IOU γ L EIOU (7)

[0078] Where γ is a hyperparameter used to control the curvature of the curve.

[0079] Embodiment 2:

[0080] Vehicle detection image processing device suitable for harsh environments

[0081] The vehicle detection image processing device suitable for harsh environments is used to execute the above-mentioned vehicle detection image processing method suitable for harsh environments.

[0082] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. Any equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.

[0083] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be considered exemplary and non-restrictive in all respects, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present invention.

Claims

1. A vehicle detection image processing method suitable for harsh environments, characterized in that: The steps include: Step 1: Use the dark channel prior defogging algorithm to process the image captured by the vehicle visual sensor in bad weather to obtain a preprocessed image; Step 2: Based on the preprocessed image, the detection network is used to perform detection, and three groups of first feature maps of different sizes are output respectively, wherein the three groups of first feature maps of different sizes are used to identify large targets, medium targets, and small targets in the image respectively; Step 3: After the three groups of first feature maps of different sizes are processed by a feature extraction module SPPCSP, three groups of second feature maps of different sizes are obtained; the feature extraction module SPPCSP is used to perform pooling at different spatial resolutions to capture feature information at multiple scales; Step 4: After the three groups of second feature maps of different sizes are processed by the RCSOSA module and the convolution layer CBL, three groups of third feature maps of different sizes, i.e., detection images, are obtained; Step 5: Calculate the loss function and train the image processing model.

2. The vehicle detection image processing method suitable for harsh environments according to claim 1 is characterized in that: In step 2, the detection network uses the YOLOv7-tiny network as a reference framework, including a first ELAN module, a second ELAN module, a third ELAN module, and a fourth ELAN module connected in sequence, and a maximum pooling layer MP is provided between each ELAN module. The preprocessed image is sequentially input into the first ELAN module, the second ELAN module, the third ELAN module, and the fourth ELAN module through the convolution layer CBL, and then three groups of first feature maps of different sizes are output respectively.

3. The vehicle detection image processing method suitable for harsh environments according to claim 2 is characterized in that: In step 2, the ELAN module includes three convolution branches, which are respectively a common convolution layer CBL, a deformable convolution layer DCNv4, and a combination of the common convolution layer CBL and the deformable convolution layer DCNv4; the three convolution branches are fused through the connection layer Connet.

4. The vehicle detection image processing method suitable for harsh environments according to claim 1 is characterized in that: In step 3, the feature extraction module SPPCSP includes three pooling branches, which are respectively maximum pooling layers MP with three different pooling kernels. The three different pooling kernels are respectively used to identify large targets, medium targets and small targets in the image; the three pooling branches are fused through the connection layer Connet.

5. The vehicle detection image processing method suitable for harsh environments according to claim 4 is characterized in that: In step 3, the three groups of first characteristic maps of different sizes are respectively a large-size first characteristic map, a medium-size first characteristic map, and a small-size first characteristic map, and the three groups of second characteristic maps of different sizes are respectively a large-size second characteristic map, a medium-size second characteristic map, and a small-size second characteristic map. The small-size first feature map is processed by the feature extraction module SPPCSP to obtain a small-size second feature map, and the small-size second feature map is processed by the convolution layer CBL and up-sampled to obtain a small-size first feature map; the medium-size first feature map is processed by the CBL convolution layer to obtain a medium-size first feature map, and the small-size first feature map is fused with the medium-size first feature map to obtain a medium-size second feature map.

6. The vehicle detection image processing method suitable for harsh environments according to claim 5 is characterized in that: In step 3, the medium-sized second feature map is processed by the first RCSOSA module and the convolution layer CBL and upsampled to obtain a medium-sized first-second feature map; the large-sized first feature map is processed by the CBL convolution layer to obtain a large-sized first-first feature map, and the large-sized first-first feature map is fused with the medium-sized first-second feature map to obtain a large-sized second feature map.

7. The vehicle detection image processing method suitable for harsh environments according to claim 1 is characterized in that: In step 4, the three groups of third characteristic maps of different sizes are respectively a large-size third characteristic map, a medium-size third characteristic map, and a small-size third characteristic map; The medium-sized second feature map is processed by the first RCSOSA module, the second RCSOSA module, and the second convolutional layer CBL in sequence to obtain a medium-sized second feature map; the small-sized second feature map is fused with the medium-sized second feature map, and then processed by the third RCSOSA module and the third convolutional layer CBL in sequence to obtain a small-sized third feature map; The large-sized second feature map is processed by the fourth RCSOSA module and the fourth convolutional layer CBL in sequence to obtain a large-sized third feature map.

8. The vehicle detection image processing method suitable for harsh environments according to claim 7 is characterized in that: In step 4, the large-size second feature map is processed by the fourth RCSOSA module and the fifth convolutional layer CBL in sequence to obtain a large-size second-first feature map; the medium-size second feature map is processed by the first RCSOSA module to obtain a medium-size second-first feature map; the medium-size second-first feature map is fused with the large-size second-first feature map, and then processed by the second RCSOSA module and the first convolutional layer CBL to obtain a medium-size third feature map.

9. The vehicle detection image processing method suitable for harsh environments according to claim 1, characterized in that: In step 5, the loss function adopts the Focal-EIOU loss function.

10. A vehicle detection image processing device suitable for harsh environments, characterized in that: Used to perform the method according to any one of claims 1 to 9.