Vehicle-mounted camera visibility inversion method, device, medium and electronic equipment

By using a deep learning model with a dynamic attention mechanism of the dual-branch backbone texture in visibility detection in vehicle cameras, the problem of low visibility detection accuracy under complex scenarios and low visibility conditions is solved, and efficient and accurate visibility inversion is achieved.

CN119313717BActive Publication Date: 2025-04-18WUXI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411858244.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-18
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

The prior art has low visibility detection accuracy when dealing with complex scenarios (such as shadows, light changes, rainy and foggy weather, etc.), and it is difficult to provide accurate and reliable detection results especially under low visibility conditions.

Method used

The visibility inversion method of on-board cameras based on deep learning is used to construct a model using the dynamic attention mechanism of the dual-branch backbone texture, and the visibility information is inverted in real time through the pictures taken by the on-board cameras.

Benefits of technology

Accurate visibility detection in complex scenarios and low visibility conditions is achieved, the robustness and adaptability of the model are improved, and the real-time processing needs are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313717B_ABST
    Figure CN119313717B_ABST
Patent Text Reader

Abstract

The present invention discloses a vehicle-mounted camera visibility inversion method, device, medium and electronic equipment, wherein the vehicle-mounted camera visibility inversion method comprises: obtaining an image frame data set shot by a vehicle-mounted camera, performing preprocessing, and constructing a visibility inversion data set; constructing a visibility inversion model, the visibility inversion model outputs a true value of visibility, and is obtained by training and optimizing network weights; inputting photos shot in real time by the vehicle-mounted camera into the optimized visibility inversion model to obtain the current true value of visibility. The present invention can estimate the corresponding visibility more accurately and realize high-precision real-time visibility inversion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer image processing technology, and in particular to a vehicle-mounted camera visibility inversion method, device, medium and electronic equipment based on a dual-branch trunk texture dynamic attention mechanism. Background Art

[0002] Visibility is a common indicator in meteorology, road driving, and airplane flight, and the unit is usually meters. The definition of visibility usually refers to the maximum distance at which a person with normal vision can identify the target object from the background. Image visibility detection plays an important role in the fields of autonomous driving, monitoring systems, and environmental recognition. In autonomous driving, accurate visibility detection can help vehicles better perceive road conditions and improve driving safety. At present, there are three commonly used methods for visibility detection on roads: manual observation method, instrument measurement method, and detection method based on image recognition.

[0003] As traditional detection methods, both manual observation and instrument measurement methods have certain drawbacks. The current research focus is mainly on image recognition. For visibility detection methods, the probability model-driven method was initially used to detect visibility. By analyzing the relationship between scene contrast and sensor-estimated viewing distance, and collecting a large amount of data for linear regression, a camera-based visibility estimation model was found, and visibility calculation was performed based on this. This was the first time that machine learning methods were used for visibility detection. Later, the ASG and DCR features in the image were extracted, and the visibility was fitted with these two features, and a rough calculation model for visibility was established. The advantage of this method is that it has a strong tolerance for noise, but it can only predict the visibility level, and the specific and accurate visibility value is not easy to measure.

[0004] With the rise of deep learning, some scholars have proposed applying the concept of deep learning to visibility detection. The main idea is to extract feature quantities such as temperature, humidity, and wind speed, and import them into the MLP deep model for network training. The visibility detection model established in this way has a certain stability and high reliability, but it has a certain lag for detection when visibility is very good or very poor. Summary of the invention

[0005] The present invention aims to solve one of the technical problems existing in the related art at least to a certain extent.

[0006] One object of the present invention is to provide a vehicle camera visibility inversion method based on deep learning, establish a model based on a dual-branch trunk texture dynamic attention mechanism, and use the images taken by the vehicle camera to invert the visibility information outside the vehicle in real time.

[0007] Another object of the present invention is to provide a visibility inversion device for a vehicle-mounted camera.

[0008] In order to achieve the above-mentioned object, the present invention provides a method for inverting visibility of a vehicle-mounted camera, comprising:

[0009] Obtain the image frame dataset captured by the vehicle camera and perform data augmentation, normalization and standardization pre-processing

[0010] Build visibility inversion dataset;

[0011] Construct a visibility inversion model, which uses a pre-trained dual-branch backbone model as a feature extractor, takes the constructed visibility inversion dataset as input, and takes the true visibility value as output, and is obtained by training and optimizing the network weights;

[0012] The dual-branch backbone model contains two branches. The first branch contains two C2f modules and a convolutional block, and the second branch contains two HGblock modules and a DWblock module. The outputs of the two branches are dynamically fused through the DAF module.

[0013] The photos taken by the on-board camera in real time are input into the optimized visibility inversion model to obtain the current true value of visibility.

[0014] A further preferred technical solution of the present invention is that the image frame data set captured by the vehicle-mounted camera is obtained, and preprocessed to construct a visibility inversion data set; comprising:

[0015] Get the image frame dataset captured by the vehicle camera;

[0016] Adjust each frame image to the same resolution;

[0017] Perform data augmentation on the adjusted image;

[0018] Perform normalization processing;

[0019] Finally, the image is normalized.

[0020] Preferably, the data enhancement is performed by randomly cropping, randomly horizontally flipping and adjusting the brightness of the original image;

[0021] The normalization process is performed by dividing the pixel value of the image by 255;

[0022] The standardization process is to subtract the mean value of each channel from the pixels of the image and divide the pixels by the standard deviation.

[0023] Preferably, while obtaining the image frame data set captured by the vehicle-mounted camera, the corresponding mechanical lidar point cloud diagram is obtained, and the visibility information of the corresponding image is obtained based on this, which is used as a test set and verification set for visibility inversion model training.

[0024] Preferably, the visibility inversion model is constructed as follows:

[0025] After the feature extractor extracts the high-level features of the input image, the obtained feature map is converted into the sequence format required by the decoder;

[0026] Add a cross-feature pyramid structure to superimpose the original input and transformed features;

[0027] Add texture dynamic self-attention mechanism to capture long-range dependencies between features;

[0028] Use 6-layer Transformer as decoder;

[0029] Perform global average pooling on the output of the Transformer decoder to generate a fixed-length feature vector, compressing the high-dimensional feature map into a fixed-length vector;

[0030] The pooled feature vector is input into the fully connected layer for regression task to obtain the inverted true value of visibility.

[0031] Preferably, the cross feature pyramid structure comprises two branches, the first branch consists of four RepHELAN modules, and the second branch consists of three SAF modules and three AAF modules.

[0032] Preferably, the texture dynamic self-attention mechanism includes a Sort branch and two Gather branches.

[0033] Another aspect of the present invention provides a vehicle-mounted camera visibility inversion device, which is deployed on an edge device or a cloud, and includes:

[0034] The data acquisition module is used to acquire the image frame data set captured by the vehicle-mounted camera, perform preprocessing, and construct a visibility inversion data set;

[0035] Model building module, used to build visibility inversion model and conduct training;

[0036] The visibility inversion module is used to obtain photos taken by the vehicle-mounted camera in real time and call the trained visibility inversion model to obtain the current true value of visibility.

[0037] Yet another aspect of the present invention provides a non-transitory computer-readable storage medium having computer instructions stored thereon, the computer instructions enabling a computer to execute the above-mentioned vehicle-mounted camera visibility inversion method.

[0038] Yet another aspect of the present invention provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, and the processor calls the logic instructions in the memory to execute the above-mentioned vehicle-mounted camera visibility inversion method.

[0039] Yet another aspect of the present invention provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer executes the above-mentioned vehicle camera visibility inversion method.

[0040] Beneficial effects: The present invention proposes a vehicle camera visibility inversion method based on deep learning, which can completely invert the visibility outside the vehicle in real time based on the images taken by the vehicle camera. Compared with the prior art, the present invention can output the true value of visibility by collecting the images taken by the vehicle camera, without adding additional vehicle sensor equipment; the present invention only needs to adjust a small number of hyperparameters of the deep learning model in the experimental stage. According to the input data and labels, the deep learning model automatically learns the image features under different visibility and automatically saves the best model parameters. After the best model is saved, it only needs to call the model to realize the real-time inversion of visibility, which is convenient for user operation.

[0041] The present invention increases the diversity of data and improves the generalization ability of the model by randomly cropping, flipping, adjusting the brightness and other techniques on the images taken by the vehicle-mounted camera. After feature extraction, a deep learning inversion model is established, and the optimal model parameters are obtained by continuously training the model. Finally, it can be deployed on edge devices (such as vehicle-mounted computing platforms) or in the cloud. The model can process road images in real time, detect visibility, and provide corresponding warnings or assisted driving suggestions. Before training the model, the preprocessed data can be normalized. First, the average value of each channel of all data is calculated, and then the average value is subtracted from each data, which is more conducive to improving the convergence speed of the model.

[0042] The present invention can invert visibility more accurately and estimate the corresponding visibility, avoiding the shortcomings of traditional manual visual measurement and instrument measurement, and effectively solving the problem that traditional methods perform poorly when dealing with complex scenes (such as shadows, lighting changes, rainy and foggy weather, etc.). In the past, it was difficult to provide accurate and reliable detection results under low visibility conditions (such as dense fog or heavy rain), and it was easy to produce misjudgments or missed detections. The dual-branch trunk structure, cross-feature pyramid and texture self-attention mechanism are used to improve the robustness of the model in complex scenes. The features are automatically learned through end-to-end training, which reduces the dependence on artificially designed features and improves the adaptability of the model. High-level feature extraction and global relationship modeling improve detection accuracy and reliability, especially under low visibility conditions. The combination of efficient network architecture and modern hardware enables the model to meet the needs of real-time processing. These advantages enable the deep learning model to perform well in road visibility detection tasks, providing reliable solutions for fields such as autonomous driving, intelligent transportation and driving assistance. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a schematic diagram of the flow of the visibility inversion method of the vehicle-mounted camera of the present invention.

[0044] Figure 2 Schematic diagram of an image frame of a driving dataset product in an embodiment of the present invention.

[0045] Figure 3 Schematic diagram of the laser radar point cloud of the driving data set product in an embodiment of the present invention.

[0046] Figure 4 Schematic diagram of the network structure of the visibility inversion model in an embodiment of the present invention.

[0047] Figure 5 Schematic diagram of the structure of a dual-branch trunk model in an embodiment of the present invention.

[0048] Figure 6 Schematic diagram of the structure of the texture dynamic self-attention mechanism in an embodiment of the present invention.

[0049] Figure 7 Schematic diagram of the structure of the residual module in an embodiment of the present invention.

[0050] Figure 8 Schematic diagram of the structure of the cross-feature pyramid structure in an embodiment of the present invention.

[0051] Fig. 9 Schematic diagram of visibility inversion results in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments, and they should not be understood as limitations on the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0053] Combine the following Figure 1-Figure 9 The invention describes a vehicle-mounted camera visibility inversion method, device, medium and electronic equipment.

[0054] Embodiment 1: This embodiment provides a method for inverting visibility of a vehicle-mounted camera, and the overall process includes:

[0055] Obtain the image frame dataset captured by the vehicle-mounted camera, perform preprocessing, and construct a visibility inversion dataset;

[0056] Construct a visibility inversion model, take the constructed visibility inversion dataset as input, take the true visibility value as output, and obtain the final visibility inversion model by training and optimizing the network weights;

[0057] The photos taken by the on-board camera in real time are input into the optimized visibility inversion model to obtain the current true value of visibility.

[0058] The visibility inversion model training process and the process of obtaining the true value of visibility are as follows: Figure 1 As shown, including:

[0059] Step 1: Convert the photos taken by the onboard camera into RGB images of size 224*224*3 as network input;

[0060] Step 2: Use the pre-trained two-branch backbone model as a feature extractor to extract high-level features of the image;

[0061] Step 3: Convert the feature map into the sequence format required by the decoder;

[0062] Step 4: Add a cross feature pyramid structure to superimpose the original input and transformed features;

[0063] Step 5: Add a texture dynamic self-attention mechanism to capture long-range dependencies between features;

[0064] Step 6: Based on the features extracted by the dual-branch backbone model, six layers of Transformer decoder layers are superimposed;

[0065] Step 7: Perform global average pooling on the output of the Transformer decoder to generate a fixed-length feature vector, compressing the high-dimensional feature map into a fixed-length vector;

[0066] Step 8: Input the pooled feature vector into the fully connected layer to perform the regression task and obtain the inverted true value of visibility.

[0067] In this embodiment, the above steps are described in detail by taking the image frame dataset captured by the vehicle exterior camera on the Nuscenes official website as an example.

[0068] Step 1: Get the image frame dataset captured by the external camera from the Nuscenes official website. The image frames are as follows: Figure 2 As shown, a schematic diagram of the mechanical laser radar point cloud is obtained at the same time, as shown Figure 3 As shown, the visibility information of the corresponding image can be obtained from it. Matching the true visibility information with the corresponding image frame can be used as a test set and validation set when training the model to optimize the network parameters.

[0069] The original image is adjusted to a size of 224*224 pixels. After the image size is adjusted, data enhancement operations are performed, including but not limited to random cropping of the original image, random horizontal flipping and brightness adjustment, so as to improve the generalization ability of the model. Then normalization is performed, which can be achieved by dividing the pixel value by 255. The image is then standardized, that is, the mean value of each channel is subtracted and divided by the standard deviation. For the ImageNet pre-training model of the present invention, the parameters are: the mean value is [0.485, 0.456, 0.406], and the standard deviation is [0.229, 0.224, 0.225].

[0070] Step 2: Establish visibility inversion model, such as Figure 4 In the feature extraction process, a pre-trained dual-branch backbone model is used, and the structure is as follows Figure 5As shown in the figure, it contains two branches. The first branch includes two C2f modules and a convolution block, and the second branch includes two HGblock modules and a DWblock module. The two branches are dynamically fused using the DAF module at the end. The pre-trained model is trained on the ImageNet dataset and has strong feature extraction capabilities. By using pre-trained weights, the learned features can be used during the training process, which can not only speed up the training process but also improve the performance of the model. The data to be feature extracted is input, and the input data is preliminarily processed and feature extracted through the HGstem module to reduce the dimension of the input data and extract primary features. The modules C2f, Conv, HGBlock and DWBlock are responsible for higher-level feature extraction. C2f is used to increase the depth of the network while maintaining information flow. Conv is a standard convolution layer used to further extract features. HGBlock is used to capture information at different scales. DWBlock is a depthwise separable convolution block used to improve computational efficiency while maintaining good performance. After passing through the above modules, the features are passed to the DAF (Deformable Alignment Feature) module, which is used to dynamically adjust the weights of the two branches to better meet the requirements of subsequent tasks.

[0071] Step 3: After feature extraction by the dual-branch backbone model, the output high-dimensional feature map is converted to a sequence format. The input expected by the Transformer decoder is a two-dimensional feature sequence. Assume that the feature map size output by the dual-branch backbone is (2048, 7, 7), 2048 represents the feature dimension, and 7*7 represents the spatial dimension of the feature map. First, flatten the feature map. The feature map output by the dual-branch backbone is flattened into a two-dimensional feature sequence. The feature map is transformed from (2048, 7, 7) to (batch_size, 2048, 49), where 49 is the flattened result of 7*7, and then the flattened features are transposed. Transpose [batch_size,2048, 49] to (batch_size, 49, 2048), where 49 is the sequence length and 2048 is the feature dimension.

[0072] Step 4: Based on the features extracted by the dual-branch backbone model, a cross feature pyramid structure is added to superimpose the original input and transformed features. The cross feature pyramid structure is as follows: Figure 8As shown in the figure, it includes two branches. The first branch includes four RepHELAN modules, and the second branch includes three SAF modules and three AAF modules. The input is initially feature extracted through four different sizes of RepHELAN convolution kernels (3x3, 5x5, 7x7, 9x9). Each convolution kernel produces a set of feature maps, which contain local information at different scales. Feature maps of each size are processed by the SAF module. The role of the SAF module is to dynamically adjust the feature weights based on the importance of spatial position, so that the network can focus on more meaningful areas. After the feature map is processed by SAF, it will be sent to the AAF module. The AAF module is responsible for weighted averaging of features from different paths to achieve cross-scale information fusion. The above process is repeated at different levels of the network. At each iteration, the feature map will pass through the RepHELAN, SAF and AAF modules again to continuously enrich and optimize the feature representation. In the last stage, each branch will have a separate output head for specific tasks. Since each branch has its own receptive field size, they can provide complementary information.

[0073] Step 5: Add a texture self-attention mechanism to capture the long-range dependencies between features. Its structure is as follows Figure 6 As shown in the figure, it includes a Sort branch and two Gather branches; the texture self-attention mechanism can dynamically adjust the focus of attention according to the weak texture details in the image features, which plays a key role in the accuracy of visibility estimation. The input data first undergoes two sorting operations (Sort along C), where C refers to the number of channels (Channels), which means sorting by dimension. The sorted data is subjected to feature extraction and nonlinear transformation through a 1*1 convolution layer (1*1 Conv) and a 3*3 depth-separable convolution layer (3*3DConv). The output result is divided into two paths, one is directly connected to the final Scatter module, and the other enters the self-attention module. There are three R units inside the self-attention module, each of which represents a residual block (Residual Block), which is used to add residual connections to improve gradient propagation. The output of the R unit is collected through the Gather module, then sorted (Sort), and then collected through another Gather module. The collected results are fused through two addition operations and then connected to the Scatter module. The integrated features are scattered through the Scatter module to map the features back to their original shape or perform some form of reorganization. Finally, the output results are passed through a 1*1 convolution layer (1*1 Conv) again for further feature fusion or dimensionality reduction to obtain the final feature representation.

[0074] Step 6: Keep the superposition of the original input and the transformed features, and add a residual connection similar to ResNet to help solve the gradient disappearance problem. The structure is as follows Figure 7 As shown in Figure 2. In each decoder layer, residual connections and layer normalization are added between each sub-layer, specifically including the following parts: adding residual connections between the input and output of the multi-head self-attention mechanism so that the input features are directly superimposed on the output features; adding residual connections between the input and output of the feedforward neural network so that the input features are directly superimposed on the output features. Through the residual connection, the input features can be directly passed to the output end, thereby alleviating the gradient vanishing problem.

[0075] Step 7: After the multi-layer processing of the Transformer decoder, the output feature sequence is still a three-dimensional tensor with a certain length and feature dimension. In order to convert these high-dimensional feature maps into fixed-length feature vectors for subsequent fully connected layer processing, a global average pooling operation is used. The output feature sequence size of the Transformer decoder is [batch_size, sequence_length, feature_dimension], where sequence_length represents the sequence length and feature_dimension represents the feature dimension. Through global average pooling, we can average the features of each sequence element to generate a fixed-length feature vector [batch_size, feature_dimension].

[0076] Step 8: After global average pooling, the fixed-length feature vector [batch_size, feature_dimension] is input into the fully connected layer for regression task to obtain the inverted true value of visibility. The result is as follows Fig. 9 shown.

[0077] Although there are precedents for using convolutional neural networks, such as the Inception network, to detect visibility, the large number of samples required for deep learning adds difficulty to the establishment of the model, and the quality of the input image also affects the quality of the established model. Therefore, the accuracy of the visibility inversion results is still low. The present invention can invert visibility more accurately, avoiding the shortcomings of traditional manual visual measurement and instrument measurement, and effectively solving the problem that traditional methods perform poorly when dealing with complex scenes (such as shadows, lighting changes, rainy and foggy weather, etc.). These methods usually rely on fixed thresholds or rules, and are difficult to adapt to changing environments. In the past, it was difficult to provide accurate and reliable detection results under low visibility conditions (such as dense fog or heavy rain), and it was easy to cause misjudgment or missed detection.

[0078] The present invention utilizes the powerful feature extraction and global relationship modeling capabilities of the dual-branch feature extraction backbone, texture self-attention mechanism, and cross-feature pyramid structure to improve the robustness of the model in complex scenarios. Features are automatically learned through end-to-end training, which reduces the dependence on manually designed features and improves the adaptability of the model. High-level feature extraction and global relationship modeling improve detection accuracy and reliability, especially in low visibility conditions. The combination of efficient network architecture and modern hardware enables the model to meet the needs of real-time processing. These advantages enable the deep learning model to perform well in road visibility detection tasks, providing a reliable solution for fields such as autonomous driving, intelligent transportation, and driver assistance.

[0079] Embodiment 2: This embodiment provides a vehicle camera visibility inversion device, which is deployed on an edge device or in the cloud, and includes:

[0080] The data acquisition module is used to acquire the image frame data set captured by the vehicle-mounted camera, perform preprocessing, and construct a visibility inversion data set;

[0081] A model building module is used to build a visibility inversion model. The visibility inversion model training process and the visibility true value acquisition process are the same as those in Example 1.

[0082] The visibility inversion module is used to obtain photos taken by the vehicle-mounted camera in real time and call the trained visibility inversion model to obtain the current true value of visibility.

[0083] Embodiment 3: This embodiment provides a non-transitory computer-readable storage medium on which computer instructions are stored. The computer instructions enable a computer to execute the vehicle camera visibility inversion method in Embodiment 1.

[0084] Embodiment 4: This embodiment provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. The processor may call the logic instructions in the memory to execute the vehicle camera visibility inversion method in Embodiment 1.

[0085] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the 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 a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0086] Embodiment 5: This embodiment provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the vehicle-mounted camera visibility inversion method in Embodiment 1.

[0087] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0088] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for inverting visibility of a vehicle-mounted camera, characterized in that: include: Obtain the image frame dataset captured by the vehicle-mounted camera, perform data enhancement, normalization and standardization preprocessing, and construct a visibility inversion dataset; Construct a visibility inversion model, which uses a pre-trained dual-branch backbone model as a feature extractor, takes the constructed visibility inversion dataset as input, and takes the true visibility value as output, and is obtained by training and optimizing the network weights; The dual-branch backbone model contains two branches. The first branch includes two C2f modules and a convolutional block, and the second branch includes two HGblock modules and a DWblock module. The outputs of the two branches are dynamically fused through the DAF module. The visibility inversion model is constructed as: After the feature extractor extracts the high-level features of the input image, the obtained feature map is converted into the sequence format required by the decoder; A cross feature pyramid structure is added to superimpose the original input and the transformed features; the cross feature pyramid structure includes two branches, the first branch consists of four RepHELAN modules, and the second branch consists of three SAF modules and three AAF modules; Add a texture dynamic self-attention mechanism to capture the long-range dependencies between features; the texture dynamic self-attention mechanism includes a Sort branch and two Gather branches; Use 6-layer Transformer as decoder; Perform global average pooling on the output of the Transformer decoder to generate a fixed-length feature vector, compressing the high-dimensional feature map into a fixed-length vector; The pooled feature vector is input into the fully connected layer for regression task to obtain the inverted true value of visibility; The photos taken by the on-board camera in real time are input into the optimized visibility inversion model to obtain the current true value of visibility.

2. The vehicle camera visibility inversion method according to claim 1, characterized in that: The method of obtaining an image frame data set captured by a vehicle-mounted camera and performing preprocessing to construct a visibility inversion data set includes: Get the image frame dataset captured by the vehicle camera; Adjust each frame image to the same resolution; Perform data augmentation on the adjusted image; Perform normalization processing; Finally, the image is normalized.

3. The vehicle camera visibility inversion method according to claim 2, characterized in that: The data enhancement is performed by randomly cropping, randomly horizontally flipping and adjusting the brightness of the original image; The normalization process is performed by dividing the pixel value of the image by 255; The standardization process is to subtract the mean value of each channel from the pixels of the image and divide the pixels by the standard deviation.

4. The vehicle camera visibility inversion method according to claim 2, characterized in that: While obtaining the image frame data set taken by the vehicle-mounted camera, the corresponding mechanical lidar point cloud diagram is obtained, and the visibility information of the corresponding image is obtained based on it, which is used as the test set and verification set for the visibility inversion model training.

5. A vehicle-mounted camera visibility inversion device using the vehicle-mounted camera visibility inversion method of claim 1, characterized in that: The device is deployed on edge devices or in the cloud and includes: The data acquisition module is used to acquire the image frame data set captured by the vehicle-mounted camera, perform preprocessing, and construct a visibility inversion data set; Model building module, used to build visibility inversion model and conduct training; The visibility inversion module is used to obtain photos taken by the vehicle-mounted camera in real time and call the trained visibility inversion model to obtain the current true value of visibility.

6. A non-transitory computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and the computer instructions enable the computer to execute the vehicle-mounted camera visibility inversion method described in any one of claims 1-4.

7. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, and the processor calls the logic instructions in the memory to execute the vehicle camera visibility inversion method described in any one of claims 1-4.

Citation Information

Patent Citations

  • Highway foggy weather visibility detection method combined with road line geometric priori

    CN114627382A

  • Inversion method based on visibility of inclined range in any direction of unmanned aerial vehicle platform

    CN116719046A