Mountain road vision field obstacle image segmentation and image enhancement processing method

By using multimodal image correction and an improved U-Net model, the problem of low obstacle segmentation accuracy in visual obstacle detection on mountain roads was solved, achieving high-precision and robust obstacle detection in complex environments.

CN120997067APending Publication Date: 2025-11-21SHANDONG LUQIAO GROUP CO LTD

Patent Information

Application Number
CN202511177005.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively integrate multimodal information in visual obstacle detection on mountain roads, and cannot adapt to changes in terrain and lighting, resulting in low obstacle segmentation accuracy. In particular, they are unable to achieve real-time and reliable obstacle recognition under extreme weather or complex terrain conditions.

Method used

By acquiring visible light and infrared images, multimodal illumination correction and adaptive perspective correction are performed. An improved U-Net model is then used for obstacle detection. Hybrid dilated convolution, channel importance recalibration, spatial-channel dual-path attention gating mechanism, and iterative enhancement strategy are employed to optimize the detection results.

Benefits of technology

It improves the accuracy of obstacle detection and the robustness of the model to obstacle detection, reduces the sensitivity to complex environments, and improves the segmentation accuracy of small targets and the generalization ability of the model in varying lighting and terrain environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997067A_ABST
    Figure CN120997067A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a mountainous area road vision field obstacle image segmentation and image enhancement processing method, which specifically comprises the following steps: collecting a mountainous area road scene image, and carrying out labeling and data set division; performing multi-modal illumination correction and adaptive perspective correction based on the acquired image, and then extracting amplitude images of the frequency domain gradient and the space gradient of the corrected image for adaptive fusion to generate a fusion enhanced gradient image; a mountainous area road visual impairment detection model is constructed based on the improved U-Net, a mixed cavity convolution module and channel importance re-calibration mechanism, a space-channel double-path attention gating mechanism and an iterative enhancement strategy are adopted in the improved U-Net, sub-pixel convolution operation is adopted at each level of a decoder, and a detection result is calibrated through an example transformation weighting mechanism. Optimizing a detection result by calculating a loss function; and finally, through training, verification and testing, outputting a most important detection result. According to the method, the detection accuracy can be improved, and the sensitivity of the model to obstacle degree detection is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method for image segmentation and image enhancement processing of visual obstacles on mountain roads. Background Technology

[0002] Mountain roads, due to their complex terrain and variable natural conditions, have long been considered high-risk sections of road traffic. Steep slopes, sharp bends, tunnel entrances, and dense foliage not only limit the driver's field of vision but also, due to sudden changes in lighting, fog, and perspective distortion, traditional video surveillance systems struggle to accurately identify sudden obstacles such as falling rocks, landslides, and fallen trees. Especially during extreme weather or day-night cycles, visible light cameras are susceptible to interference from strong light, shadows, and low illumination. While infrared thermal imagers can penetrate some obstructions, they lack texture details, and single-modal data cannot simultaneously guarantee all-weather robustness and precise obstacle segmentation. Furthermore, the three-dimensional topographical undulations of mountain roads cause significant perspective distortion in geometric correction methods based on planar assumptions on curves and slopes, often compressing or stretching small obstacles in the distance to the point of being indistinguishable. Meteorological factors such as fog and dust further weaken the contrast of obstacle edges, causing gradient-based detection operators to frequently fail under noise interference. Existing segmentation networks often suffer from problems such as edge fragmentation, false positives, and false negatives in scenarios with extremely imbalanced classes and small targets. This is because the loss function is biased towards the background and the data augmentation strategy is static and singular. As a result, they are unable to meet the stringent requirements of real-time performance and reliability for mountainous roads. Therefore, there is an urgent need for a visual obstacle detection technology that can integrate multimodal information, adapt to changes in terrain and lighting, and be optimized for small targets, in order to fill the gap in safety monitoring of mountainous roads.

[0003] Chinese invention patent CN114648690A discloses an obstacle recognition method, device, equipment, medium, and weeding robot. The method includes: acquiring chromaticity and brightness information of a candidate weeding area image; generating a target chromaticity histogram of the candidate weeding area image based on the chromaticity information, and acquiring peak information of the target chromaticity histogram; determining whether an obstacle exists in the candidate weeding area image based on the peak information and the brightness information. By implementing the technical solution provided by this invention, the problem of using buried boundary lines to mark the boundary of the weeding area of ​​a weeding robot in the prior art can be solved, which consumes a lot of manpower and resources and increases costs. Furthermore, the limitation of burying boundary lines restricts the shape of the weeding area to a certain extent, thus improving the efficiency and accuracy of obstacle recognition in the candidate weeding area of ​​the weeding robot.

[0004] Existing technologies still have the following objective defects: linear normalization such as Min-Max / Z-Score cannot compensate for physical lighting distortion, resulting in irreversible loss of obstacle texture; affine / homography transformations assume flat ground, causing compression or stretching of distant targets on steep slopes / curves, severely reducing segmentation accuracy; spatial operators such as Sobel are sensitive to fog noise and cannot utilize global information in the frequency domain, leading to missed detection of weak edges in low-contrast scenes; static data augmentation cannot simulate dynamic interference in mountainous areas, and cross-entropy loss easily ignores small targets due to class imbalance, and edge continuity lacks constraints.

[0005] Therefore, this invention proposes a method for visual obstacle image segmentation and image enhancement processing in mountainous highways to solve the above problems. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention develops a method for image segmentation and image enhancement of visual obstacles on mountain roads. This invention corrects and enhances the features of the acquired images and uses an improved U-Net model to detect visual obstacles on mountain roads, thereby improving detection accuracy and reducing the model's sensitivity to obstacle detection.

[0007] The technical solution of this invention to solve the technical problem is a method for image segmentation and image enhancement processing of visual obstacles in mountainous highways, as detailed below: Visible light and infrared images of mountain road scenes are collected, and GPS elevation data of each frame of the image is recorded. Spatial registration is performed on the infrared images to generate registered infrared images. Real labels are labeled on the mountain road scene images. Then, the labeled images are divided into training set, validation set and test set according to the proportion. By simultaneously deploying a dual-mode acquisition system with visible light cameras and infrared thermal imagers, data is collected in multiple time periods, scenarios, and weather conditions, capturing visible light and infrared images of mountainous road scenes. Spatial registration is performed on the infrared image to precisely align its pixel positions with those of the visible light image, thus generating a registered infrared image. Obstacles in the original mountain road scene image were annotated at the pixel level by professional annotators in this field, generating a binary segmentation label map, with obstacle areas marked as 1 and background as 0.

[0008] Multimodal illumination correction is performed on the registered infrared images to generate corrected images of mountain road scenes. Then, adaptive perspective correction is performed with GPS elevation data to generate terrain-corrected images. (1) Multimodal illumination correction: Based on the thermal radiation intensity information of the registered infrared image, the local block mean and global mean are calculated to construct a local illumination correction factor. Then, the local illumination correction factor is used to perform nonlinear enhancement on the mountain road scene image, and combined with logarithmic compensation for extremely dark areas, to obtain the corrected image of the mountain road scene. (2) Adaptive perspective correction: A terrain curvature map is generated based on GPS elevation data. The spatial offset of each sampling point of the deformable convolution kernel is dynamically generated according to the value of the terrain curvature map at the coordinates. The offset intensity away from the center of the convolution kernel is constrained by a Gaussian attenuation term. The sampling coordinates of the input image are adjusted using the calculated sampling point offsets, and adaptive perspective correction is performed through a weighted summation operation to generate a terrain-corrected image.

[0009] The amplitude maps of the frequency domain gradient and spatial gradient of the terrain-corrected image are extracted, and then adaptive fusion is performed to generate a fused enhanced gradient map; (1) Perform a two-dimensional Fourier transform on the terrain-corrected image, apply the adaptive high-pass filter transfer function to extract the high-frequency components in the frequency domain, and then generate a frequency domain gradient magnitude map through inverse Fourier transform. (2) Perform Sobel convolution operations in the horizontal and vertical directions on the terrain correction image respectively, and generate a spatial gradient magnitude map by calculating the modulus; (3) The frequency domain gradient magnitude map and the spatial gradient magnitude map are weighted and fused according to the preset weight coefficients to generate a fused enhanced gradient map.

[0010] A visual obstacle detection model for mountain roads is constructed based on the improved U-Net. The detection results of the conventional U-Net are corrected by the improved U-Net. The improved U-Net adopts a hybrid dilated convolution module and a channel importance recalibration mechanism, a spatial-channel dual-path attention gating mechanism, an iterative enhancement strategy, sub-pixel convolution operation at each level of the decoder, and a weighted mechanism through example transformation to calibrate the detection results. The detection results are optimized by calculating the loss function. The specific process of the hybrid dilated convolution module and the channel importance recalibration mechanism is as follows: (1) At each level of the encoder of the model, the input fusion enhancement gradient map is processed by dilated convolution operation with exponentially increasing dilation rate. The dilation rate increases with the depth of the layer. The dilated convolution outputs the dilated convolution feature map after the hierarchical dilated convolution of the last layer of the encoder. (2) Global average pooling compression is performed on the dilated convolution feature map. The importance weights of each channel are learned through a two-layer fully connected network. The weights are used to perform channel-level adaptive weighting on the feature map to generate the output of the last layer of the recalibrated encoder, i.e. the output feature map of the encoder.

[0011] The specific process of the spatial-channel dual-path attention gating mechanism is as follows: (1) The upsampled decoder feature map generated by the decoder through bilinear interpolation or subpixel convolution upsampling operation at the previous level is then concatenated with the output feature map of the encoder, and the channels are compressed through the convolutional layer to generate a spatial attention map. (2) Global average pooling is performed on the output feature map of the encoder, and channel attention vectors are generated through a two-layer fully connected network; (3) The encoder features are double-weighted by combining the spatial attention map and the channel attention vector, and the encoder features are replaced by decoder features in the background region to generate gated fusion features.

[0012] Subpixel convolution operations are used at each level of the decoder: (1) Perform a convolution operation on the input feature map of the decoder to expand its number of channels to 4 times the original number of channels, and generate an expanded feature map. The input feature map of the decoder is the output feature map of the encoder. (2) Perform pixel recombination operation on the extended feature map to convert the channel dimension information into spatial resolution and generate an upsampled output feature map with a resolution increased by 2 times.

[0013] The specific process of the iterative enhancement strategy is as follows: (1) Compare the pixel-wise absolute error between the original prediction map generated based on the conventional U-Net model and the real label, determine the significant missegmented regions by thresholding, and generate a weak point mask map by superimposing uniformly distributed random noise. (2) Multiply the two-dimensional noise texture output by the Perlin noise generator with the weakness mask image element by element, and then weight it according to the perturbation intensity coefficient and superimpose it onto the collected unprocessed mountain road scene image to generate an enhanced mountain road scene image.

[0014] The test results are calibrated by transforming the weighting mechanism through an example: (1) Based on the real set of obstacle pixel positions, calculate the Euclidean distance from each coordinate to the nearest obstacle, and generate a distance transformation map through exponential mapping; (2) The result of activating the original prediction map of the conventional U-Net network with the Sigmoid activation function is fused with the distance transformation map according to the preset weighting coefficient to generate the calibration probability map.

[0015] The specific process of the loss function is as follows: (1) Calculate the dynamic weight coefficients based on the category pixel frequency, and weight the cross-entropy loss to obtain the frequency-weighted cross-entropy loss; (2) Calculate the gradient maps of the calibration probability map and the true label map in the horizontal and vertical directions respectively, and measure the gradient difference between the predicted edge and the true edge by the L1 norm to obtain the edge loss; (3) The frequency-weighted cross-entropy loss and the edge gradient matching loss are added together by a preset weight coefficient to form the total loss that guides the optimization of the model.

[0016] The visual obstacle detection model for mountain roads was trained, validated, and tested using image data from the training, validation, and test sets, and the heaviest detection result was output.

[0017] The effects described in the invention are merely those of the embodiments, and not all the effects of the invention. The above technical solutions have the following advantages or beneficial effects: This invention discloses a method for visual obstacle image segmentation and image enhancement processing in mountainous highways. The method corrects the acquired images by sequentially performing multimodal illumination correction and adaptive perspective correction. Multimodal illumination correction constructs a local nonlinear correction factor based on infrared thermal radiation intensity, combined with logarithmic compensation for extremely dark areas, which can solve the overexposure / underexposure distortion problem of traditional normalization methods in scenes such as tree shadows / tunnel entrances. Adaptive perspective correction generates a terrain curvature map based on GPS elevation data and dynamically adjusts the sampling position of the convolution kernel to compensate for perspective distortion on steep slopes / curves, breaking through the "flat ground" assumption limitation of traditional affine transformations. Then, frequency domain high-pass filtering and Sobel spatial gradient are fused, and the signal-to-noise ratio of weak edges in thin fog is enhanced through adaptive weights, overcoming the problem of single gradient operators being sensitive to noise. An improved U-Net-based obstacle detection model for mountainous highways employs a hybrid dilated convolution module and a channel importance recalibration mechanism. Through hierarchical dilation and adaptive channel weighting, it optimizes encoder feature extraction capabilities, avoiding insufficient segmentation accuracy for small obstacles in complex mountainous backgrounds. A spatial-channel dual-path attention gating mechanism dynamically filters key obstacle-related information from encoder features, suppressing background interference. Weakness masks are generated from mis-segmented regions, and Perlin noise is superimposed to simulate real-world interference, mimicking varying lighting and terrain conditions in mountainous areas. This specifically enhances the model's generalization ability in challenging regions such as shadow occlusion and fog interference, achieving targeted data augmentation and replacing the inefficient static rotation / scaling strategy. Subpixel convolution operations are used at each decoder level, with channel expansion and recombination improving resolution. A distance transform weighting mechanism calibrates the predicted probability map, strengthening confidence in obstacle center regions and suppressing edge noise. Combining frequency-sensitive loss and edge-constrained loss, dynamic class weight adjustment and gradient matching mechanisms optimize the segmentation accuracy of small target obstacles. In summary, this invention can improve the accuracy of detection and reduce the model's sensitivity to obstacle detection. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0019] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0020] Figure 2 This is an image of a scene from a mountainous highway.

[0021] Figure 3 This is the image after multimodal illumination correction.

[0022] Figure 4 This is a comparison chart showing the ability of the multimodal illumination correction method in this invention to preserve details in dark areas compared to different illumination correction methods.

[0023] Figure 5 This is the image after adaptive perspective correction.

[0024] Figure 6 The line graph showing the segmentation accuracy of the adaptive perspective correction method and different perspective correction methods in this invention as a function of terrain curvature.

[0025] Figure 7 This is a frequency domain gradient magnitude plot.

[0026] Figure 8 This is a spatial gradient magnitude map.

[0027] Figure 9 Fusion enhancement gradient map.

[0028] Figure 10 This is a feature map of shallow cavities when the void ratio is 1.

[0029] Figure 11 This is a spatial attention map.

[0030] Figure 12 This is a gating fusion feature map.

[0031] Figure 13 This is a schematic diagram illustrating the impact of different upsampling methods on obstacle segmentation accuracy. Detailed Implementation

[0032] To clearly illustrate the technical features of this solution, the invention will be described in detail below through specific implementation methods and in conjunction with the accompanying drawings.

[0033] Example 1 like Figure 1 As shown, a method for visual obstacle image segmentation and image enhancement processing in mountainous highway areas is as follows: Visible light and infrared images of mountain road scenes are collected, and GPS elevation data of each frame of the image is recorded. Spatial registration is performed on the infrared images to generate registered infrared images. Real labels are labeled on the mountain road scene images. Then, the labeled images are divided into training set, validation set and test set according to the proportion. Multimodal illumination correction is performed on the registered infrared images to generate corrected images of mountain road scenes. Then, adaptive perspective correction is performed with GPS elevation data to generate terrain-corrected images. The amplitude maps of the frequency domain gradient and spatial gradient of the terrain-corrected image are extracted, and then adaptive fusion is performed to generate a fused enhanced gradient map; A visual obstacle detection model for mountain roads is constructed based on the improved U-Net. The detection results of the conventional U-Net are corrected by the improved U-Net. The improved U-Net adopts a hybrid dilated convolution module and a channel importance recalibration mechanism, a spatial-channel dual-path attention gating mechanism, an iterative enhancement strategy, sub-pixel convolution operation at each level of the decoder, and a weighted mechanism through example transformation to calibrate the detection results. The detection results are optimized by calculating the loss function. The visual obstacle detection model for mountain roads was trained, validated, and tested using image data from the training, validation, and test sets, and the heaviest detection result was output.

[0034] In a specific implementation, a dual-mode acquisition system that simultaneously deploys visible light cameras and infrared thermal imagers is adopted to collect data under multiple time periods and weather conditions in typical mountainous road scenarios such as steep slopes, curves, tunnel entrances, and dense shady areas. Hardware triggering ensures millisecond-level time synchronization between visible light images and infrared thermal radiation data, while simultaneously recording GPS elevation data for each frame of the image; After data acquisition, the infrared image is spatially registered to precisely align its pixel positions with the visible light image, generating a registered infrared image. The original mountain road scene images were annotated at the pixel level by professional annotators in the field, including obstacles such as falling rocks, landslide mounds, fallen trees, and guardrails on curves. Binary segmentation label maps were generated, with obstacle areas marked as 1 and background areas as 0. The collected images were divided into training, validation, and test sets in a 7:2:1 ratio.

[0035] In specific implementation, since mountain road scene image data is often affected by strong lighting changes, such as tree shadows and sudden changes in tunnel brightness, as well as fog interference, these factors cause local overexposed or underexposed areas in the image, resulting in loss of texture information. Conventional normalization methods such as Min-Max or Z-Score are difficult to effectively correct such physical lighting distortion, often leading to the annihilation of details in dark areas and irreversible loss of information in overexposed areas. Therefore, this invention calculates the local block mean and global mean based on the thermal radiation intensity information of the registered infrared image, constructs a local illumination correction factor, and then uses the local illumination correction factor to perform nonlinear enhancement on the original mountain road scene image. Combined with logarithmic compensation for extremely dark areas, a corrected mountain road scene image is obtained, thereby correcting optical illumination distortion and suppressing overexposed areas while preserving details in dark areas. The calculation formula is as follows: , In the formula, The image is an original scene of a mountain road, and it is an RGB three-channel image. To correct images of mountain road scenes, preserve details in dark areas while suppressing overexposed areas; The mean value of a local block in the registered infrared image reflects the true thermal radiation intensity to correct optical illumination distortion; The global mean of the registered infrared image is obtained by calculating the arithmetic mean of all pixels in the registered infrared image, providing an illumination reference. The nonlinear enhancement coefficient controls the compensation intensity of infrared information for the visible light channel. ; To adjust several weights that affect the ability to restore details in extremely dark areas such as tree shadows, set... ; It is a logarithmic function, with the default base being the natural constant; To prevent division by zero errors, a very small constant is set. ; like Figure 2 The image shown is a raw, unprocessed image of a mountain road scene. Figure 3 The image is after multimodal illumination correction; It should be noted that the mean value of local blocks in the registered infrared image The calculation is based on the registered infrared image, specifically by dividing the registered infrared image into blocks, for example, dividing it into... The local blocks are then identified, and the average value of all pixels within each block is calculated to obtain the mean value of the local blocks in the registered infrared image. ; The term characterizes the local illumination correction factor, where Controlling the compensation intensity of infrared information for the visible light channel; if the value is too small, such as... If the value is too high, it can easily lead to insufficient compensation, and details in the dark areas will still be lost. This can easily lead to overexposure noise, therefore, setting... A balance is struck between preserving details in dark areas and suppressing noise. Images of primitive mountain roads It is an RGB three-channel image. and The infrared correction terms are based on a single-channel format of infrared images and need to be broadcast to all RGB channels. Apply independently to each channel; The registered infrared image is acquired through a dual-mode acquisition system that simultaneously deploys a visible light camera and an infrared thermal imager. The two devices maintain a close spatial relationship during installation and achieve millisecond-level time synchronization through hardware triggering to ensure that visible light images and infrared thermal radiation data of the same scene are captured simultaneously. After acquisition, computer vision technology is used to perform spatial transformation processing on the infrared image to make its pixel position accurately aligned with the visible light image, and finally generate an infrared image that perfectly matches the visible light image. For extremely dark areas where infrared compensation is not fully covered, such as those with dense foliage, the following approach is adopted: The term undergoes local brightness stretching, forming orthogonal enhancement with the infrared compensation term, and... The term acts independently on the entire image, using a logarithmic function to enhance the grayscale values ​​of dark areas through nonlinear mapping, and incorporating the weights of the logarithmic term. By constraining the amplitude and avoiding the use of noise, the visibility of obstacles in dark areas can be significantly improved without affecting overexposed areas.

[0036] In a specific implementation, the steep slopes and curves of mountain roads cause perspective distortion in the imaging. Conventional affine transformation methods assume that the ground is flat. Under complex terrain conditions, distant obstacles, such as guardrails and falling rocks, will be severely deformed, thereby reducing the accuracy of subsequent segmentation. Therefore, this invention generates a terrain curvature map based on GPS elevation data, drives deformable convolution for geometric correction, and dynamically adjusts the sampling position of the convolution kernel to compensate for perspective distortion caused by terrain. The specific steps are as follows: (1) Based on the values ​​of the terrain curvature map at the coordinates, the spatial offset of each sampling point of the deformable convolution kernel is dynamically generated. The offset amplitude is positively correlated with the terrain curvature value, and the offset intensity away from the center of the convolution kernel is constrained by the Gaussian attenuation term. The calculation formula is as follows: , In the formula, For topographic curvature maps in coordinates The value at that location is generated from GPS elevation data. To indicate a convex slope, such as a mountaintop. This represents concave terrain, such as valleys. The value reflects the curvature intensity and drives the offset calculation. This represents the horizontal offset of the convolution kernel sampling points; This represents the vertical offset of the convolution kernel sampling points; This represents the index offset of the deformable convolution kernel in the x-direction; x refers to the horizontal coordinate index. y represents the index offset of the deformable convolution kernel in the y-direction; y refers to the vertical coordinate index; e is the natural constant. The curvature sensitivity coefficient controls the scaling factor of terrain curvature with respect to offset. ; The Gaussian decay coefficient constrains the offset of sampling points far from the center of the convolution kernel. ; It should be noted that, The term characterizes the Gaussian decay term, used to ensure that the offset of small targets at a distance is more significant; this exponential term follows... The term increases and decreases, when or When the value is large, it corresponds to the edge of the convolution kernel, where small targets at a distance are processed. The value of the term is small, the decay is large, and the offset is small. The smaller the relative size, the larger the deviation of nearby targets; The horizontal offset of the convolution kernel sampling points The vertical offset of the convolution kernel sampling points Used to adjust and correct images of mountainous highway scenes. The sampling coordinates, in deformable convolution, the sampling points from Adjusted to This compensates for and corrects images of mountainous highway scenes. Distortions caused by terrain, such as compression due to steep slopes and stretching due to curves; (2) Adjust the sampling coordinates of the input image using the calculated sampling point offset, and generate a terrain-adaptive perspective correction image through a weighted summation operation. This dynamically compensates for the compression of distant targets caused by steep slopes and the lateral stretching distortion caused by curves. The calculation formula is as follows: , In the formula, Terrain-adaptive perspective correction image in coordinates The eigenvalues ​​at, where This represents the pixel position on the feature map, where x is the horizontal index and y is the vertical index; For deformable convolution kernels in relative positions The weight value at that location, The elements that make up the sampling points inside the convolution kernel; The kernel radius determines the kernel size, and the kernel size is... ,set up correspond Convolution kernel; like Figure 5 The image shown is the one after adaptive perspective correction. It should be noted that, The dynamically adjusted sampling coordinates enable adaptive spatial transformation based on terrain curvature. Because terrain curvature causes imaging distortion (e.g., convex slopes compressing distant targets), static sampling cannot adapt. Dynamically adjusting the sampling coordinates allows for adaptation based on terrain curvature. Real-time offset, in The convex slope region, as characterized, increases positive offset, stretching and compressing the target. In concave slope areas, a negative offset is added to correct stretching distortion, thereby achieving terrain-adaptive geometric correction and improving the segmentation accuracy of small targets at a distance.

[0037] In a specific implementation, since foggy and low-contrast scenes cause obstacle edges to be blurred, conventional edge detection operators such as the Sobel operator are sensitive to noise and cannot effectively enhance the weak edge contours of small obstacles, such as fallen rocks and fallen trees. Therefore, this invention fuses frequency domain gradients and spatial gradients, and strengthens obstacle edge features through a complementary enhancement mechanism. The specific steps are as follows: (1) Perform a two-dimensional Fourier transform on the terrain-corrected image, apply an adaptive high-pass filter transfer function to extract high-frequency components in the frequency domain, and then generate a frequency domain gradient magnitude map through an inverse Fourier transform. The generated frequency domain gradient magnitude map is shown below. Figure 7 As shown, the formula for enhancing high-frequency edge features and suppressing low-frequency background interference is as follows: , In the formula, For terrain-adaptive perspective-corrected images, their coordinates The eigenvalue at that location is ; This is a two-dimensional Fourier transform, which converts the spatial domain image to the frequency domain; This is a two-dimensional inverse Fourier transform, which converts the frequency domain result back to the spatial domain; The absolute value symbol is equivalent to performing a modulo operation on a vector / matrix. Here is the transfer function of the high-pass filter, and the parameters of the high-pass filter are configured as follows: ; The transfer function of the high-pass filter in frequency coordinates The value at; The coordinates are in the frequency domain, representing two-dimensional frequency components, with values ​​ranging from 1 to 2. ; This is the horizontal frequency index, corresponding to the image width direction; This is the vertical frequency index, corresponding to the image height direction; This is a frequency domain gradient magnitude map, highlighting high-frequency edge components in the image; The cutoff frequency control parameter is adaptive to the image size and is calculated as follows: ; Indicates the image height With width The minimum value is used to ensure the consistency of the cutoff frequency under different resolutions; The height of the image is equal to the height of the terrain-adaptive perspective-corrected image, and also equal to the height of the original mountain road scene image; The width of the image is equal to the width of the terrain-adaptive perspective-corrected image, and also equal to the width of the original mountain road scene image; It should be noted that, The term represents the conversion of the spatial domain image into a frequency domain representation through a two-dimensional Fourier transform, facilitating global analysis of frequency components, based on the high-pass filter transfer function. After applying a high-pass filter, The term indicates that by using inverse Fourier transform to restore the filtered frequency domain result to the spatial domain image, converting the spatial domain image to the frequency domain for high-pass filtering, and then inversely transforming it back to the spatial domain, it can effectively separate and enhance high-frequency edge features, such as obstacle contour features, while suppressing low-frequency background interference, such as fog or uniform areas, and improving the edge signal-to-noise ratio. (2) Perform Sobel convolution operations in the horizontal and vertical directions on the terrain-corrected image respectively, and generate a spatial gradient magnitude map by calculating the modulus. The generated spatial gradient magnitude map is shown below. Figure 8 As shown, direction-sensitive local edge information is preserved, and the calculation formula is as follows: , In the formula, For terrain-adaptive perspective correction images in The results of directional Sobel convolution are obtained through... convolution kernel calculate; For terrain-adaptive perspective correction images in The results of directional Sobel convolution are obtained through... convolution kernel calculate; This is a spatial gradient magnitude map that preserves orientation-sensitive local edge information. It should be noted that, Represents terrain-adaptive perspective-corrected images Perform horizontal Sobel convolution operations using kernels. Calculate the gradient approximation for each pixel to obtain the terrain-adaptive perspective-corrected image. The results of directional Sobel convolution emphasize vertical edges; similarly, Indicates the use of core Calculate the gradient approximation for each pixel to obtain the terrain-adaptive perspective-corrected image. The Sobel convolution result emphasizes horizontal edges. It's important to note the kernel... With nuclear The center row weight is 0 to reduce the smoothing effect. In addition, the outer row weights of both increase to enhance edge response and noise robustness, thereby effectively capturing directional edges. (3) The frequency domain gradient magnitude map and the spatial gradient magnitude map are weighted and fused according to the preset weight coefficients to generate a fused enhanced gradient map, as shown in the figure. Figure 9 As shown, the frequency domain components enhance the global contour, while the spatial components supplement local details, jointly improving the signal-to-noise ratio at weak edges. The calculation formula is as follows: , In the formula, To enhance the gradient map through fusion; These are frequency domain gradient weighting coefficients, which enhance the global outline of obstacles in the fog. These are spatial gradient weight coefficients, preserving local directional details; It should be noted that the frequency domain gradient weight coefficients are set to... This strengthens the frequency domain gradient representing the global contour. Because the frequency domain method is more effective in foggy and low-contrast scenes, it has a high weight, while the spatial gradient weight coefficient is set to... This is used to supplement the spatial gradient that represents local details. To avoid noise amplification, the weight is low.

[0038] In a specific implementation, an improved U-Net is used to construct a visual obstacle detection model for mountain roads; The standard U-Net consists of an encoder and a decoder with a bottleneck layer in between, forming a typical U-shaped structure. The encoder has a 3-channel input, which increases in channel number and decreases in spatial resolution through multiple convolutions and downsampling. The standard U-Net uses skip connections, where features before each downsampling are directly concatenated to the corresponding layer in the decoder, preserving low-level spatial details and preventing image blurring after upsampling. The decoder first upsamples, then concatenates features with the encoder at the same resolution, followed by convolutional refinement, gradually reducing the number of channels. However, the standard U-Net encoder loses small object features during continuous downsampling, such as distant rocks. Furthermore, standard convolutional operations cannot effectively balance shallow details with deep semantic information, easily leading to insufficient segmentation accuracy for small obstacles in complex mountainous backgrounds. The standard U-Net skip connections directly concatenate encoder and decoder features; however, mountainous backgrounds, such as exposed rock walls, and obstacles like landslide mounds present challenges. Similar textures lead to false activations, causing background features to contaminate the decoding process and thus reducing obstacle segmentation accuracy. Static data augmentation methods such as rotation and scaling are difficult to simulate the variable lighting and terrain environment in mountainous areas, and cannot specifically improve the model's generalization ability in difficult areas such as shadow occlusion and fog interference, easily leading to mis-segmented regions, such as obstacles in shadows, which persist. Conventional bilinear interpolation upsampling methods result in blurred edges and loss of high-frequency details for small targets, such as distant rocks and barbed wire. The standard sigmoid output does not accurately estimate the confidence of pixel-level small targets, such as distant rocks and barbed wire nodes, and discrete noise points are easily misclassified as obstacles, while the confidence of the central region of real small targets is often insufficient. Obstacles such as rocks and landslides usually account for a small proportion in the image, causing the standard cross-entropy loss to be severely biased towards the background category. At the same time, the edge continuity of thin obstacles such as barbed wire is difficult to maintain, and conventional loss functions cannot effectively constrain pixel-level edge structures. Therefore, the U-Net model is improved by adopting a hybrid dilated convolution module and a channel importance recalibration mechanism, a spatial-channel dual-path attention gating mechanism, an iterative enhancement strategy, sub-pixel convolution operations at each level of the decoder, and a weighted mechanism for exemplification transformation to calibrate the detection results. The detection results are optimized by calculating the loss function. The detection process of the improved U-Net model is the same as that of the conventional U-Net model. The detection accuracy is improved through the above improvements.

[0039] In a specific implementation, a hybrid dilated convolution module and a channel importance recalibration mechanism are adopted. Through hierarchical dilation and adaptive channel weighting, the encoder's feature extraction capability is optimized. The specific steps are as follows: (1) At each level of the encoder, dilated convolution operations with exponentially increasing dilation rate are used to process the input feature map. The dilation rate increases with the depth of the layer, thereby expanding the receptive field and reducing the loss of small target features caused by pooling operations. The calculation formula is as follows: , In the formula, For encoder number The layer encoder outputs a feature map when hour, These are the input features of the encoder. ; void ratio The dilated convolution operation expands the receptive field by inserting zero values. Control the sampling interval; The hole rate controls the interval between sampling points of the convolution kernel. The shallow hole feature map representing standard convolution with d=1 is shown below. Figure 10 As shown, This indicates that the sampling points are spaced one pixel apart; For encoder level index, , Corresponding to the high-resolution details in the shallow layer, Corresponding to the intermediate semantics of the middle layer, Corresponding to deeper, higher-level semantics, the layer is deepened, and the feature map resolution is reduced; For encoder number The hierarchical dilated convolution module outputs dilated convolutional feature maps when... When, input Output shallow hole features, when When inputting the previous level's output, the output is either a mid-level or deep-level void feature; It should be noted that the settings It can effectively achieve an increase in the receptive field index. hour, Capture detailed features hour, Expand the sensory field hour, This covers a larger area, thus preventing small targets from being lost in deeper layers, while also reducing pooling operations; (2) Global average pooling compression is performed on the dilated convolution feature map. The importance weights of each channel are learned through a two-layer fully connected network. The weights are then used to perform channel-level adaptive weighting on the feature map to enhance the obstacle-related feature channels. The calculation formula is as follows: , In the formula, For the first The importance weights of each channel are used to achieve adaptive weighting at the channel level, which is used to enhance key feature channels, such as obstacle-related channels, and suppress irrelevant channels. The calculation method is expressed as follows: ; This is a global average pooling operation. Xiang Jiang Compress to vector; This represents the number of channels in the dilated convolution feature map; the specific value is determined by the dilated convolution feature map. Decision, such as, when hour, It may be 64, which is set during network initialization and changes with the layer; This is the weight matrix for the first fully connected layer, used to compress the number of channels. It is the ReLU activation function; The weight matrix of the second fully connected layer is used to restore the original number of channels; Use the Sigmoid activation function; The output feature map of the l-th layer for recalibration is the output feature map of the encoder. The output feature map of the last layer of the encoder is defined as follows: Then the recalibrated third layer output feature map .

[0040] In a specific implementation, a spatial-channel dual-path attention gating mechanism is adopted to dynamically filter key information related to obstacles in the encoder features and suppress background interference. The specific operation is as follows: (1) The encoder output feature map and the upsampled decoder feature map are concatenated by channels, and the channels are compressed by a convolutional layer to generate a spatial attention map, as shown in the figure. Figure 11 As shown, the importance weights of each spatial location in the feature map are then quantified, and the calculation formula is as follows: , In the formula, This is a spatial attention map, which is in two-dimensional matrix format, representing the importance weight of each spatial location in the feature map. High-value regions correspond to obstacles. This is the output feature map of the encoder; For the upsampled decoder feature map, and Spatial size alignment refers to the feature map generated by the decoder at the previous level through bilinear interpolation or subpixel convolution upsampling operations. For example, in the UNet architecture, after the decoder processes deep features, upsampling restores its resolution to match that of the encoder output. Same size; Indicates a channel splicing operation; for Convolutional layers are used to compress the number of channels to... ; (2) Global average pooling is performed on the encoder output feature map, and channel attention vectors are generated through a two-layer fully connected network to quantify the importance weight of each channel of the feature map. The calculation formula is as follows: , In the formula, The channel attention vector is a one-dimensional vector that represents the importance weight of each channel in the feature map. Channels with higher weights correspond to obstacle-related features. It is a two-layer fully connected network; (3) The encoder features are double-weighted by the joint spatial attention map and channel attention vector, and the encoder features are replaced with decoder features in the background region to generate gated fusion features. The generated gated fusion feature map is shown below. Figure 12 As shown, this enhances the effective features in the obstacle region and blocks interference in the background region. The calculation formula is as follows: , In the formula, This is element-wise multiplication; These are gated fusion features, corresponding to the output features of skip connections, used to replace the direct concatenation in standard UNet. These features are then input to the next layer of the decoder, such as the... Layer, serving as the input features for that layer, where This is the hierarchical index of the decoder. During the decoding process, it is combined with the current decoding features and further processed through convolution, represented as... ,in It is the decoder number Layer output features, It is the decoder number Layer output features, It is a convolution operation; It should be noted that, This involves a double-weighting process of encoder features to enhance obstacle features and improve key passages in obstacle regions. It is the process of replacing encoder features with decoder features in the background region, representing the background feature replacement, and the gated fusion features obtained based on the two. Encoder details are preserved and enhanced in obstacle areas, while semantic information from the decoder is relied upon in background areas, thereby improving segmentation accuracy.

[0041] In a specific implementation, adversarial examples are dynamically generated based on the model's current predicted weaknesses. An iterative enhancement strategy is then used to specifically strengthen the learning of missegmented regions. The specific operations are as follows: (1) Compare the pixel-wise absolute error between the original predicted image of the model and the real label, determine the significantly mis-segmented regions by thresholding, and generate a weak point mask image by superimposing uniformly distributed random noise. The calculation formula is as follows: , In the formula, For the first The original prediction map output by the model in the next iteration; This represents the pixel-by-pixel absolute error map; The error threshold is the critical value used to determine significant missegmentation. ; For indicator functions, when Time output Otherwise output ; To obey A random noise matrix with uniform distribution across an interval; This is a weakness mask image; high-value regions indicate missegmented regions that need enhancement. (2) Multiply the two-dimensional noise texture output by the Perlin noise generator element by element with the weakness mask image, weight the result by the perturbation intensity coefficient, and then superimpose it onto the original mountain road scene image to generate an enhanced mountain road scene image. The calculation formula is as follows: , In the formula, The two-dimensional noise texture output by the Perlin noise generator simulates natural phenomena such as fog and dust. It creates continuous, non-repeating random patterns through gradient interpolation algorithm, which are similar to real mountain environments. To set the disturbance intensity coefficient and control the noise amplitude, set... ; For mask weighting operations, they can be defined as element-wise multiplication, i.e., The two-dimensional noise texture output by the Perlin noise generator Each pixel value and the weakness mask map The weights at corresponding positions are multiplied to ensure that noise is only present at the same location. Add the missegmented weak regions, while keeping other regions unchanged; To enhance images of mountainous highway scenes; Weakness mask diagram Updated on the entire training set every certain number of training epochs, e.g., every 10 training epochs, based on the vulnerability mask image. The obtained enhanced mountain road scene image Adding them as independent samples to the training batch forces the model to continuously adapt to dynamic challenges, while improving generalization ability through full-scale iteration.

[0042] In a specific implementation, sub-pixel convolution operations are used at each level of the decoder, and resolution improvement is achieved through channel expansion and recombination. The specific steps are as follows: (1) Perform a convolution operation on the input feature map of the decoder to expand its number of channels to 4 times the original number of channels, generating an expanded feature map. The calculation formula is as follows: , In the formula, For decoder number Layer input feature map, when hour, It is the decoder number The layer input feature map is also the encoder output feature map, i.e. ; This is the decoder's hierarchical index; for Convolutional layers, the number of output channels is the feature map Four times the number of input channels; For decoder number Extended feature map of the layer; (2) Perform pixel recombination on the extended feature map to convert the channel dimension information into spatial resolution and generate an upsampled output feature map with a resolution increased by 2 times. The calculation formula is as follows: , In the formula, For pixel recombination operation; This is the upsampled output feature map; It should be noted that, The term represents the feature map being reconstructed through pixel recombination operations. Each The values ​​of the local region are rearranged into spatial values. Pixel blocks, such as the size of the input feature map , For decoder number Extended feature map of the layer The number of channels increases, and the resolution of the reconstructed feature map is improved to [number missing]. .

[0043] In a specific implementation, the predicted probability map is calibrated using a distance transformation weighting mechanism to enhance the confidence level of the obstacle's central region and suppress edge noise. The specific steps are as follows: (1) Based on the set of real obstacle pixel positions, calculate the Euclidean distance from each coordinate to the nearest obstacle, and generate a distance transformation map through exponential mapping. The calculation formula is as follows: , In the formula, This is the set of actual obstacle pixel locations; Set of real obstacle pixel locations Pixel coordinates within; Set of real obstacle pixel locations The pixel coordinate x-axis position index within; Set of real obstacle pixel locations The pixel coordinate y-axis position index within; It is the L2 norm, calculated in the same way as the Euclidean distance; The Gaussian decay coefficient controls the rate at which the weight decays with increasing distance. ; It is a natural exponential function; Coordinates of the distance transformation graph The feature value at a given location represents the distance weight of the pixel from the center of the nearest obstacle. The value in the obstacle center region is close to... The value is close to the center area. ; The result of activating the original model prediction map using the Sigmoid activation function is fused with the distance transformation map using preset weighting coefficients to generate a calibration probability map. This improves the confidence level of the obstacle center region and suppresses discrete noise points. The calculation formula is as follows: , In the formula, The weighting coefficients control the enhancement intensity of the distance transformation. ; This is a distance transformation graph; The original predicted image output by the model; To calibrate the probability map.

[0044] In a specific implementation, frequency-sensitive loss and edge constraint loss are combined, and the segmentation accuracy of small target obstacles is optimized through dynamic class weight adjustment and gradient matching mechanisms. The specific operations are as follows: (1) Calculate the dynamic weight coefficient based on the pixel frequency of the category, and weight the cross-entropy loss accordingly. The dynamic weight coefficient reduces the weight of high-frequency background class and increases the weight of low-frequency obstacle class to alleviate class imbalance. The calculation formula is as follows: , In the formula, Category labels; For a set of category labels, where This represents background elements, such as roads and vegetation. This indicates obstacles, such as falling rocks or landslides. The first in the real label image The one-hot encoded mask for each category comes from the manual annotations of the training dataset: each pixel is labeled as bg or obj and converted into a one-hot encoded mask, such as 1 for obstacle regions and 0 for background. The model predicts the first Category probability map, based on calibration output definition, when hour, , ; The dynamic weighting coefficient is calculated as follows: ; For the first The pixel frequency of a category in the training set is denoted as ; For the first Total number of pixels in each category; Images of original mountain road scenes The total number of pixels, i.e. ; Frequency-weighted cross-entropy loss; (2) Calculate the gradient maps of the calibration probability map and the true label map in the horizontal and vertical directions respectively. Use the L1 norm to measure the gradient difference between the predicted edge and the true edge, and constrain the continuity of the obstacle edge. The calculation formula is as follows: , In the formula, The image is a true binary segmentation label map, and the obstacle region value is... The background is ; The horizontal gradient operator used for edge matching loss calculation emphasizes horizontal edges and is applied via a convolution kernel. Calculate the horizontal gradient; The vertical gradient operator used for edge matching loss calculation emphasizes vertical edges and is implemented through convolution kernels. Calculate the vertical gradient; Given the L1 norm, calculate the sum of absolute errors; For edge matching loss; (3) The frequency-weighted cross-entropy loss and the edge gradient matching loss are added together with preset weight coefficients to form the total loss that guides the model optimization. The high weight of the edge loss strengthens the constraint on the edge structure of the obstacle. The calculation formula is as follows: , In the formula, To strengthen edge constraints, set the edge loss weight coefficients. ; This represents the total loss.

[0045] In a specific implementation, the visual obstacle detection model for mountain roads is trained, validated, and tested using image data from the training set, validation set, and test set, respectively, and the heaviest detection result is output. The specific process is as follows: Model training is based on the training set. The inputs are the original mountain road scene images, registered infrared images and GPS elevation data, and the output is the calibration probability map. An improved UNet architecture is adopted, which includes hierarchical dilated convolution, channel recalibration, spatial-channel dual attention-gated skip connections, and subpixel convolutional upsampling module. The total loss is used as the optimization objective, and an adaptive moment estimation optimizer is used to update the parameters. The training process employs an iterative data augmentation strategy: every 10 training cycles, a weakness mask map is generated based on the pixel-wise absolute error between the model's current prediction map and the real label. After overlaying Perlin noise texture, an enhanced mountain road scene image is generated and added to the training batch. Training continues until the accuracy of the validation set converges, and finally the model parameters with the best obstacle segmentation performance are saved. Based on the data in the test set, detection was performed on real-time collected mountain road scene data. First, the original mountain road scene image and infrared image were acquired simultaneously through a dual-mode acquisition system, while GPS elevation data was recorded. Spatial registration processing was performed on the infrared image to generate a registered infrared image, followed by the following preprocessing steps: (1) Multimodal illumination correction is performed based on the registered infrared images. Correction factors are constructed using local block mean and global mean, and logarithmic compensation is combined to generate corrected mountain road scene images. (2) Generate a terrain curvature map based on GPS elevation data, drive deformable convolution to complete terrain adaptive perspective correction, and output a geometrically corrected image; (3) Fuse the frequency domain gradient and spatial gradient to generate a multi-scale gradient fusion enhancement map.

[0046] Then, the enhanced image is input into the trained improved UNet model, and after the encoder dilated convolution feature extraction, the decoder subpixel convolution upsampling and attention-gated skip connections, the original prediction image is output. Finally, the probability map is calibrated through a distance transformation weighting mechanism, and the binarized obstacle segmentation results are extracted to achieve real-time detection of obstacles such as falling rocks and landslides.

[0047] Example 2 like Figure 4 As shown, a comparative analysis of illumination correction capabilities was conducted to verify the detail preservation ability of the multimodal illumination correction method in this invention under extreme illumination conditions. By using data from five typical mountainous scenes—dense shade, tunnel entrance, morning fog section, mountain shade, and strong light and tree shadow—the performance of minimum-maximum normalization, standard deviation normalization, histogram equalization, multi-scale retinal enhancement, and this technology was compared. Figure 4The vertical axis, "Dark Area Detail Retention Rate," is expressed as a percentage, quantifying the recognizability of obstacle textures in shadowed areas. As can be seen from the histogram distribution, conventional methods exhibit a precipitous performance degradation in strong light and shadow scenes, especially the minimum-maximum normalization, which completely loses details in dense shady areas because its linear mapping cannot compensate for physical lighting distortion. The bars of the technology of this invention remain high and have minimal fluctuations in all scenes, especially forming a significant peak at the tunnel entrance. This indicates that the lighting model reconstructed by infrared thermal radiation intensity corrects optical distortion through local block mean correction, combined with logarithmic nonlinear compensation for extremely dark areas, so that the texture of fallen rocks in the shadow-interlacing area can be completely preserved.

[0048] like Figure 6 As shown, terrain-adaptive perspective correction analysis was performed to test the stability of the adaptive perspective correction method of this invention and different perspective correction methods in complex terrain. The horizontal axis "terrain curvature" quantifies slope changes (negative values ​​for concave slopes / valleys, positive values ​​for convex slopes / mountains), and the vertical axis "segmentation accuracy" uses the average intersection-union ratio (OCR) index. The experiment compared four schemes: conventional affine transformation, homography transformation, deformable convolution without terrain guidance, and this technique. The experimental results show that the accuracy of the conventional method drops sharply when the absolute value of curvature increases because its assumption of a flat ground leads to severe deformation of the guardrails on curves. Deformable convolution without terrain guidance performs reasonably well in the zero curvature region, but still shows significant attenuation in the steep slope region. The technique of this invention maintains a high-level smooth curve throughout the entire range, demonstrating the advantage of the terrain curvature-driven dynamic sampling mechanism. When convex terrain compresses distant targets, the convolution kernel produces a positive offset stretching feature; when concave terrain causes lateral stretching, a negative offset compensates for distortion.

[0049] Example 3 like Figure 13 As shown, the impact of upsampling on small target segmentation is analyzed, exploring the sensitivity of upsampling technology to obstacle size. The horizontal axis, "obstacle pixel area," is in pixels, and the vertical axis, "segmentation accuracy," uses the average intersection-over-union ratio (IoU). Scatter points are divided into three groups based on size: small targets (≤100 pixels), medium targets (100-500 pixels), and large targets (≥500 pixels). Bilinear interpolation (blue scatter points) is densely distributed in the accuracy trough in the small target region because its smooth interpolation causes the wire mesh nodes to be obliterated. Although transposed convolution (orange scatter points) improves the accuracy of medium targets, small targets still have discrete noise points (abnormally low-value scatter points). The core advantage of this technique (red scatter points) lies in the highest cluster position of small targets, the preservation of high-frequency components by sub-pixel convolution recombination, the formation of independent high-density clusters for targets below 100 pixels, a significant improvement over bilinear interpolation, the smoothest trend line, and the minimal impact of size changes.

[0050] Although the specific embodiments of the invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the invention. Based on the technical solutions of the invention, various modifications or variations that can be made by those skilled in the art without creative effort are still within the scope of protection of the invention.

Claims

1. A method for image segmentation and image enhancement processing of visual obstacles on mountain roads, characterized in that, include: Visible light and infrared images of mountain road scenes are collected, and GPS elevation data of each frame of the image is recorded. Spatial registration is performed on the infrared images to generate registered infrared images. Real labels are labeled on the mountain road scene images. Then, the labeled images are divided into training set, validation set and test set according to the proportion. Multimodal illumination correction is performed on the registered infrared images to generate a corrected image of a mountain road scene. Then, adaptive perspective correction is performed with GPS elevation data to generate a terrain-corrected image. The amplitude maps of the frequency domain gradient and spatial gradient of the terrain-corrected image are extracted, and then adaptive fusion is performed to generate a fused enhanced gradient map. A visual obstacle detection model for mountain roads is constructed based on the improved U-Net. The detection results of the conventional U-Net are corrected by the improved U-Net. The improved U-Net adopts a hybrid dilated convolution module and a channel importance recalibration mechanism, a spatial-channel dual-path attention gating mechanism, an iterative enhancement strategy, sub-pixel convolution operation at each level of the decoder, and a weighted mechanism through example transformation to calibrate the detection results. The detection results are optimized by calculating the loss function. The visual obstacle detection model for mountain roads was trained, validated, and tested using image data from the training, validation, and test sets, and the heaviest detection result was output.

2. The method for image segmentation and image enhancement of visual obstacles in mountainous highways according to claim 1, characterized in that, The image correction process is as follows: (1) Multimodal illumination correction: Based on the thermal radiation intensity information of the registered infrared image, the local block mean and global mean are calculated to construct a local illumination correction factor. Then, the local illumination correction factor is used to perform nonlinear enhancement on the mountain road scene image, and combined with logarithmic compensation for extremely dark areas, to obtain the corrected image of the mountain road scene. (2) Adaptive perspective correction: A terrain curvature map is generated based on GPS elevation data. The spatial offset of each sampling point of the deformable convolution kernel is dynamically generated according to the value of the terrain curvature map at the coordinates. The offset intensity away from the center of the convolution kernel is constrained by a Gaussian attenuation term. The sampling coordinates of the input image are adjusted using the calculated sampling point offsets, and adaptive perspective correction is performed through a weighted summation operation to generate a terrain-corrected image.

3. The method for image segmentation and image enhancement of visual obstacles in mountainous highways according to claim 2, characterized in that, The process of generating the fusion enhancement gradient map is as follows: (1) Perform a two-dimensional Fourier transform on the terrain-corrected image, apply the adaptive high-pass filter transfer function to extract the high-frequency components in the frequency domain, and then generate a frequency domain gradient magnitude map through inverse Fourier transform. (2) Perform Sobel convolution operations in the horizontal and vertical directions on the terrain correction image respectively, and generate a spatial gradient magnitude map by calculating the modulus; (3) The frequency domain gradient magnitude map and the spatial gradient magnitude map are weighted and fused according to the preset weight coefficients to generate a fused enhanced gradient map.

4. The method for image segmentation and image enhancement of visual obstacles in mountainous highways according to claim 1, characterized in that, The specific process of the hybrid dilated convolution module and the channel importance recalibration mechanism is as follows: (1) At each level of the encoder of the model, the input fusion enhancement gradient map is processed by dilated convolution operation with exponentially increasing dilation rate. The dilation rate increases with the depth of the layer. The dilated convolution outputs the dilated convolution feature map after the hierarchical dilated convolution of the last layer of the encoder. (2) Global average pooling compression is performed on the dilated convolution feature map. The importance weights of each channel are learned through a two-layer fully connected network. The weights are used to perform channel-level adaptive weighting on the feature map to generate the output of the last layer of the recalibrated encoder, i.e. the output feature map of the encoder.

5. The method for image segmentation and image enhancement of visual obstacles in mountainous highways according to claim 4, characterized in that, spatial... The specific process of the dual-channel attention gating mechanism is as follows: (1) The upsampled decoder feature map generated by the decoder through bilinear interpolation or subpixel convolution upsampling operation at the previous level is then concatenated with the output feature map of the encoder, and the channels are compressed through the convolutional layer to generate a spatial attention map. (2) Global average pooling is performed on the output feature map of the encoder, and channel attention vectors are generated through a two-layer fully connected network; (3) The encoder features are double-weighted by combining the spatial attention map and the channel attention vector, and the encoder features are replaced by decoder features in the background region to generate gated fusion features.

6. The method for image segmentation and image enhancement of visual obstacles on mountain roads according to claim 4, characterized in that, in The decoder employs subpixel convolution operations at each level: (1) Perform a convolution operation on the input feature map of the decoder to expand its number of channels to 4 times the original number of channels, and generate an expanded feature map. The input feature map of the decoder is the output feature map of the encoder. (2) Perform pixel recombination operation on the extended feature map to convert the channel dimension information into spatial resolution and generate an upsampled output feature map with a resolution increased by 2 times.

7. The method for image segmentation and image enhancement of visual obstacles in mountainous highways according to claim 1, characterized in that, The specific process of the iterative enhancement strategy is as follows: (1) Compare the pixel-wise absolute error between the original prediction map generated based on the conventional U-Net model and the real label, determine the significant missegmented regions by thresholding, and generate a weak point mask map by superimposing uniformly distributed random noise. (2) Multiply the two-dimensional noise texture output by the Perlin noise generator with the weakness mask image element by element, and then weight it according to the perturbation intensity coefficient and superimpose it onto the collected unprocessed mountain road scene image to generate an enhanced mountain road scene image.

8. The method for image segmentation and image enhancement of visual obstacles in mountainous highways according to claim 1, characterized in that, The test results are calibrated by transforming the weighting mechanism through an example: (1) Based on the real set of obstacle pixel positions, calculate the Euclidean distance from each coordinate to the nearest obstacle, and generate a distance transformation map through exponential mapping; (2) The result of activating the original prediction map of the conventional U-Net network with the Sigmoid activation function is fused with the distance transformation map according to the preset weighting coefficient to generate the calibration probability map.

9. The method for image segmentation and image enhancement of visual obstacles in mountainous highways according to claim 1, characterized in that, The specific process of the loss function is as follows: (1) Calculate the dynamic weight coefficients based on the category pixel frequency, and weight the cross-entropy loss to obtain the frequency-weighted cross-entropy loss; (2) Calculate the gradient maps of the calibration probability map and the true label map in the horizontal and vertical directions respectively, and measure the gradient difference between the predicted edge and the true edge by the L1 norm to obtain the edge loss; (3) The frequency-weighted cross-entropy loss and the edge gradient matching loss are added together by a preset weight coefficient to form the total loss that guides the optimization of the model.

10. The method for image segmentation and image enhancement of visual obstacles in mountainous highways according to claim 1, characterized in that: By simultaneously deploying a dual-mode acquisition system with visible light cameras and infrared thermal imagers, data is collected in multiple time periods, scenarios, and weather conditions, capturing visible light and infrared images of mountainous road scenes. Spatial registration is performed on the infrared image to precisely align its pixel positions with those of the visible light image, thus generating a registered infrared image. Obstacles in the original mountain road scene image were annotated at the pixel level by professional annotators in this field, generating a binary segmentation label map, with obstacle areas marked as 1 and background as 0.

Citation Information

Patent Citations

  • Obstacle recognition method, device and equipment, medium and weeding robot

    CN114648690A

  • House leakage identification method and system based on hyperspectrum and imaging technology

    CN119023173A

  • Geosynchronization of an aerial image using localizing multiple features

    WO2024042508A1

  • Object-level infrared-and-visible-light image fusion method based on fully convolutional neural network

    WO2024174488A1

Cited By

  • Classified detection method for uniformity of cement paste

    CN120451682A

  • A method for detecting the uniformity of a cement paste

    CN120451682B

  • Flying dust pollution source image enhancement processing method and system

    CN121190333A