Method and system for constructing position identification model for rainy day scene
By combining image enhancement and multi-stage feature aggregation technology position recognition model, the problem of combining multi-scale information in rainy environments is solved, and high-rootability visual positioning and precise positioning are achieved, which is suitable for fields such as unmanned systems and autonomous driving.
Patent Information
- Application Number
- CN202411959703.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-29
AI Technical Summary
Existing location recognition technology is difficult to effectively combine multi-scale information in the scene in rainy environments, resulting in image quality decline, feature extraction and matching failure, and positioning errors increase.
Using a position recognition model combining image enhancement and multi-stage feature aggregation technology, a rain removal image and depth map are generated through a multi-scale sampling network and a deep attention network, a multi-scale local features are extracted using a feature pyramid network and a multi-head attention mechanism, and a global descriptor is generated through a differentiable VLAD layer and a context gating mechanism, and finally a triple comparison learning network is optimized for feature embedding.
It realizes highly robust visual positioning in rainy scenes, significantly improving the system's adaptability in bad weather conditions, and improving positioning accuracy and computing efficiency.
Smart Images

Figure CN119904516A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of unmanned autonomous systems and computer vision, and in particular to a method and system for constructing a position recognition model for rainy day scenes, which is applicable to the fields of unmanned system positioning, navigation and automatic driving. Background Art
[0002] Visual Place Recognition (VPR) is a core technology in the fields of autonomous navigation, autonomous driving and augmented reality for unmanned systems such as robots, drones and self-driving vehicles. Its goal is to identify the specific location of unmanned systems in the environment by analyzing images captured by cameras. Traditional VPR methods mainly rely on the extraction and matching of image features, and are divided into local feature-based and deep learning-based methods. Local feature-based methods (such as SIFT and ORB) extract key points, edges and other information for feature description and matching, and have certain perspective and scale robustness, but perform poorly in complex environments such as lighting changes and weather interference. Deep learning-based methods (such as NetVLAD and Patch-NetVLAD) extract visual features through convolutional neural networks (CNN) and generate global descriptors using feature aggregation, which improves the performance in dynamic scenes. However, current methods still face significant challenges in rainy environments: raindrops and rain traces will seriously degrade image quality, interfere with the feature extraction process, and lead to matching failures and positioning errors. In addition, the difficulties of multi-scale feature extraction and feature aggregation in complex environments also limit the adaptability of existing methods.
[0003] From the above analysis, we can see that the existing location recognition technology has certain shortcomings:
[0004] (1) Existing methods are difficult to effectively combine multi-scale information in the scene. They cannot fully capture local texture details and lack an accurate description of the global geometric layout. At the same time, the global feature aggregation calculation complexity is high, which makes it difficult to meet efficiency requirements in tasks with high real-time requirements.
[0005] (2) Raindrops and rain marks interfere with image quality, causing blur, occlusion, and distortion, which significantly affects feature extraction and matching. Traditional methods based on local features are prone to failure due to feature point loss, while global feature descriptors based on deep learning are prone to reduced discrimination in rainy scenes, resulting in reduced positioning accuracy. Summary of the invention
[0006] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a method and system for constructing a position recognition model for rainy scenes, which realizes highly robust visual positioning of unmanned systems in rainy scenes by combining image enhancement and multi-stage feature aggregation technology.
[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0008] In a first aspect, a method for constructing a location recognition model for rainy day scenes is disclosed, comprising:
[0009] The images collected in rainy scenes are divided into anchor samples, positive samples and negative samples to form triplets, which are then input into the rain removal network to generate fine-grained rain-free images.
[0010] As a further technology, a coarse-grained derained image and a depth map are generated through a multi-scale sampling network (MSSN) and a deep attention network, and a fine-grained derained image is generated by fusing the coarse-grained image and the depth map.
[0011] The derained image is input into the Multi-scale Feature Pyramid Network (MSFPN), which processes the image hierarchically and extracts multi-scale local features at different levels.
[0012] As a further technique, the Multi-head Attention (MHA) mechanism is used to perform context-aware processing on each layer of features, capture the spatial dependencies between features, and achieve feature fusion at multiple scales through up- and down-sampling operations.
[0013] The features of different levels are transferred to the bottom layer through the top layer in the feature pyramid, and the discriminative power of the bottom layer features is enhanced by using channel splicing and multi-layer perceptron (MLP) to generate more robust multi-scale feature descriptors.
[0014] The multi-scale feature descriptors are input into the Vector of Locally Aggregated Descriptors (VLAD) layer to aggregate local features and generate a compact global image descriptor.
[0015] As a further technique, a context gating mechanism is introduced to optimize the descriptor, enhance the discriminability of features through activation functions and linear transformations, and compress redundant information of features;
[0016] The global descriptor is input into the triple contrastive learning network, the feature embedding is optimized through the positive and negative sample contrast strategy, and the distance weight between positive and negative samples is adjusted using the dynamic temperature coefficient to maximize the distinguishability of the features;
[0017] As a further technique, a positive and negative sample comparison strategy is adopted in the training stage, and the distance weights between positive and negative samples are adjusted using a dynamic temperature coefficient to maximize the discriminative feature interval;
[0018] The optimized global descriptor is matched with the descriptors in the reference database, and the target position is determined by calculating the similarity to achieve location recognition.
[0019] In a second aspect, a location recognition model construction system for rainy day scenes is disclosed, comprising:
[0020] A data input module, used to group the acquired rainy day images into triplets, wherein the triplets are composed of an anchor sample, a positive sample, and a negative sample;
[0021] The rain removal module is used to generate a coarse-grained de-rained image and a depth map, and fuse the two to generate a fine-grained de-rained image;
[0022] Feature extraction module, used to perform layered processing on the derained image and extract multi-scale local features and global geometric information;
[0023] The global descriptor generation module is used to aggregate multi-scale features through the differentiable VLAD layer to generate a global image descriptor and introduce a context gating mechanism to optimize features;
[0024] Contrastive learning module, used to optimize the global descriptor and adjust the distance weights of positive and negative sample features through dynamic temperature coefficients;
[0025] The matching and location recognition module is used to match the optimized global descriptor with the descriptors in the reference database, calculate the similarity and determine the target location.
[0026] The third aspect of the present invention is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.
[0027] A fourth aspect of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, which executes the steps of the above method when executed by a processor.
[0028] A fifth aspect of the present invention is to provide a computer program product, comprising a computer program, which performs the above-described method when executed by a processor.
[0029] One or more of the above technical solutions have the following beneficial effects:
[0030] In this example, by combining rain removal technology with multi-scale feature extraction, high precision and high robustness of visual position recognition in rainy scenes are achieved, significantly improving the system's adaptability under adverse weather conditions. The joint optimization of the image and depth information after rain removal effectively restores the geometric features of the scene and reduces the impact of rain interference on feature extraction and matching performance. The introduction of multi-scale feature pyramids and differentiable VLAD layers makes the fusion of local features and global features more accurate, while reducing feature redundancy and improving computational efficiency. The dynamic temperature coefficient combined with the triple contrast learning strategy further optimizes the feature interval of positive and negative samples and enhances the discriminative ability of the descriptor. The system supports complex scenes and database matching tasks, significantly improving the positioning accuracy under adverse conditions. It can be widely used in unmanned system positioning, navigation, and autonomous driving, meeting the needs of efficient and accurate positioning in rainy environments.
[0031] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0033] Figure 1 This is a flow chart of a location recognition model for rainy day scenes in this embodiment.
[0034] Figure 2 It is the storage format of the location image dataset.
[0035] Figure 3-1 The figure shows the comparison results between the method of this embodiment and the advanced method on the Pitts30k dataset.
[0036] Figure 3-2 The figure shows the comparison results between the method of this embodiment and the advanced methods on the Tokyo 24 / 7 dataset.
[0037] Figure 3-3 The figure shows the comparison results between the method of this embodiment and the advanced method on the VPRI CE dataset.
[0038] Figure 3-4 The figure shows the comparison results between the method of this embodiment and the advanced method on the NordLand dataset.
[0039] Figure 3-5 The figure shows the comparison results between the method of this embodiment and the advanced methods on the RainPlace dataset.
[0040] Figure 3-6 The figure shows the comparison results between the method of this embodiment and the advanced method on the RainSim dataset.
[0041] Figure 4 This is a position matching diagram of the rainy day oriented position recognition model in the first embodiment in a rainy day scene. DETAILED DESCRIPTION
[0042] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0043] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.
[0044] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0045] The overall idea proposed by the present invention is as follows: the present invention performs coarse-grained and fine-grained rain removal on rainy images through MSSN to generate clear images and depth information of geometric consistency; MSFPN is used to extract multi-scale local features and global geometric information, and the feature representation is optimized in combination with MHA; local features are aggregated through a differentiable VLAD layer to generate a compact global image descriptor, and a context gating mechanism is introduced to enhance the discriminative ability of features; in the contrastive learning stage, the embedding space of the global descriptor is optimized through a triplet learning method, and the distance weight between positive and negative samples is adjusted using a dynamic temperature coefficient; in the matching and recognition stage, the optimized global descriptor is matched for similarity, combined with multi-scale feature fusion to achieve accurate image position recognition, thereby ensuring the high precision and high robustness of the system in complex rainy scenes.
[0046] Embodiment 1
[0047] This embodiment discloses a method for constructing a location recognition model for rainy day scenes.
[0048] In order to more clearly illustrate this embodiment, the implementation process of a location recognition model construction method for rainy day scenes can be specifically described as follows:
[0049] A method for constructing a location recognition model for rainy day scenes, comprising:
[0050] S1. Acquire a triplet image, where the triplet image includes a continuous anchor point image, a positive sample image, and a negative sample image;
[0051] S2, input the triplet image into MSSN to generate a coarse-grained image; at the same time, use the deep attention network to generate the corresponding depth map, and fuse the coarse-grained image and the depth map to obtain a fine-grained derained image;
[0052] S3, input the fine-grained derained image into MSFPN, extract multi-scale local features and global geometric information, perform context-aware processing on each layer of features through MHA, and capture the spatial dependencies between features;
[0053] S4, through the multi-scale fusion strategy of the feature pyramid network, the top-level features are transferred to the bottom layer, and the discriminative power of the bottom-level features is enhanced by channel splicing and MLP to generate a more robust multi-scale feature descriptor;
[0054] S5, input the multi-scale feature descriptor into the differentiable VLAD layer, aggregate local features to generate a compact global image descriptor, and introduce a context gating mechanism to optimize the discriminative power of the descriptor and compress feature redundant information;
[0055] S6. Input the global descriptor into the triple contrastive learning network, optimize the feature embedding through the positive and negative sample contrast strategy, and use the dynamic temperature coefficient to adjust the distance weight between positive and negative samples to maximize the distinguishability of the features;
[0056] S7, matching the optimized global image descriptor with the descriptors in the reference database, and filtering out candidate positions by calculating similarity;
[0057] S8. Determine the most matching position based on the similarity ranking to complete the accurate rainy scene position recognition task.
[0058] like Figure 1 As shown, in step S1, a triplet image is obtained, and the triplet image includes continuous anchor point images, positive sample images and negative sample images.
[0059] In this embodiment, a position image data set is selected, and the position image data set is divided into three parts, such as Figure 2 The storage form of the position image dataset is shown in the figure, where place A is used to store anchor sample images, place B is used to store positive sample images, and place C is the image in the negative sample. Here, we define the anchor point, positive and negative sample sets as Ω respectively. a ,Ω p ,Ω n .
[0060] Sequentially obtain one image from each of the three parts of the position image dataset in order to form a triplet. For example, when obtaining for the first time, take out the first anchor sample image in place A, the first positive sample image in place B, and the first negative sample image in place C to form a triplet I. a,p,n =(I a , I p , I n ), where I a ∈Ω a , I p ∈Ω p , I n ∈Ω n .
[0061] like Figure 1 As shown in Figure 2, after step S1, the process of inputting the triplet image into MSSN to generate a coarse-grained derained image is as follows:
[0062] First, in order to effectively process rain traces of different scales, the input image I a,p,n Through the convolution kernel K = (k1, k2, ..., k n ) extracts multi-scale features, the formula is:
[0063]
[0064] Among them, F i ∈R W×H×C represents the features extracted by the i-th convolution kernel, Indicates the use of convolution kernel k i The convolution operation is Relu (·) which is an activation function used to enhance the nonlinear representation capability.
[0065] Secondly, all multi-scale features are integrated into a fusion feature F through channel splicing m , the formula is:
[0066] F m =Concat(F1, F2, ..., F m ) (3)
[0067] Among them, Concat(·) represents the concatenation operation on the channel dimension, F m ∈R W×H×C (Among them ).
[0068] Then, the concatenated multi-scale features F m Input 1×1 convolution for channel integration to generate the fused feature F f , the formula is:
[0069] Ff =Relu(Conv 1×1 (F m )) (4)
[0070] Next, the multi-scale attention mechanism is introduced into feature fusion to strengthen important feature channels by assigning weights to different channels. For fused features, channel attention is expressed as:
[0071] F CA =σ(W C F f +b c )⊙F f (5)
[0072] Among them, W C ∈R C×C is the linear transformation weight, b c ∈R C is the bias term, σ is the Sigma activation function, ⊙ is the element-wise multiplication, F CA ∈R W×H×C is the feature processed by channel attention.
[0073] The spatial attention mechanism is also introduced into feature fusion to extract the key areas in the image and perform weighted processing on the spatial information. The spatial attention is expressed as:
[0074]
[0075] in, Indicates the use of convolution kernel k s The convolution operation is used to capture the spatial context relationship, F SA are the features processed by spatial attention.
[0076] Then, the result of channel attention and spatial attention processing F CA and F SA Perform weighted fusion to obtain the final attention-enhanced feature F atten , the formula is:
[0077] F atten =F CA +F SA (7)
[0078] Feature F based on multi-scale attention optimization atten , through the residual module G res Residual map ΔI for predicting rain disturbance a,p,n , the formula is:
[0079] ΔI a,p,n =G res (F atten ) (8)
[0080] The residual module above is composed of several 3×3 convolution stacks, so the above formula is further expressed as:
[0081] ΔI a,p,n =Relu(n·Conv 3×3 (F atten )) (9)
[0082] Finally, the preliminary image is superimposed on the input image I a,p,n and the prediction residual map ΔI a,p,n Get the final coarse-grained derained image I c , the formula is:
[0083]
[0084] Generating triplet images using deep convolutional networks I a,p,n The depth map D∈R W×H×C , the coarse-grained derained image And the depth map D is input into the fusion network G fuse , Generate fine-grained derained images through feature fusion The formula is:
[0085]
[0086] like Figure 1 As shown, after step S2, the fine-grained derained image Input MSFPN, and the process of extracting multi-scale local features and global geometric information at different levels is as follows:
[0087] First, use L layers of convolution operation to operate on the input Processing layer by layer, the features of each layer are extracted as follows:
[0088]
[0089] in, is the l-th layer feature, k l is the convolution kernel size of the lth layer.
[0090] Secondly, the resolution is downsampled by convolution or pooling operations with a stride of 2, and finally multi-scale features are obtained.
[0091] Then, MHA is used to analyze each layer of features. Processing is performed to capture the contextual dependencies between features and output the processed feature representation The formula is:
[0092]
[0093] Next, in order to integrate information between different levels, a top-down feature fusion strategy is introduced. The top-level features are upsampled layer by layer and fused with the bottom-level features. Based on the fused features, channel splicing and nonlinear mapping are further used for enhancement. The formula is:
[0094]
[0095] in, represents the channel concatenation operation, and MLP(·) is the multi-layer perceptron function.
[0096] Finally, after multi-scale fusion and context-aware processing, the final output multi-scale feature is
[0097] like Figure 1 As shown, after steps S3 and S4, the multi-scale feature descriptor The differentiable VLAD layer is input to aggregate local features to generate a compact global image descriptor. At the same time, the context gating mechanism is introduced to optimize the discriminative power of the descriptor. The process of compressing feature redundant information is as follows:
[0098] First, the multi-scale feature descriptor is input into the differentiable VLAD layer to aggregate local features to generate a compact global image descriptor v, which is formulated as:
[0099]
[0100] Among them, K is the cluster center, c j is the jth cluster center, α ij is the feature attribution weight.
[0101] Then, the global descriptor v is optimized by context gating to reduce redundant information and enhance the discriminative power. The formula is:
[0102] v′ a,p,n =σ(Wv a,p,n +b)⊙v a,p,n
[0103] where σ(·) is the activation function, W and b are learnable parameters, and ⊙ represents element-wise multiplication.
[0104] Through the above steps, we can get the global feature descriptors of anchor images, positive sample images and negative sample images: v′ a,p,n = {v′ a , v′ p , v′ n}, where v′ a , v′ p , v′ ndenote the global descriptors of anchor, positive and negative sample images respectively.
[0105] like Figure 1 As shown, after step S5, the global descriptor of the triple {v′ a , v′ p , v′ n The process of input contrast learning network optimization is:
[0106] First, in the triplet contrastive learning network, the global descriptor is optimized by triplet loss, as follows:
[0107] L triplet =max(0,d(v′ a , v′ p )-d(v′ a , v′ n )+α) (17)
[0108] Here, d(·,·) represents the Euclidean distance between samples and α is the loss threshold.
[0109] Secondly, the dynamic temperature coefficient τ is introduced to enhance the distinguishability of positive and negative sample features:
[0110]
[0111] Through the above steps, we can get the optimized global descriptor v″ a,p,n ={v″ a ,v″ p ,v″ n}, the optimized global descriptor v″ q (q∈a) and the descriptor v″ in the reference database r (r∈q) to calculate the similarity, the formula is:
[0112] Sim(v″ q ,v″ r )=-||v″ q -v″ r || (19)
[0113] Among them, Sim(·,·) represents the similarity calculation function, and ||·|| represents the norm between two vectors.
[0114] like Figure 1 As shown, after step S6, the similarity is calculated using the similarity calculation formula, and the most matching position feature vector v″ is determined based on the similarity ranking. r , the formula is:
[0115] r = argmax Sim(v″) q ,v″r ) (20)
[0116] Finally, in Figure 1 In step S8 shown, the target position r corresponding to the most matching position feature vector is output to complete the accurate rainy scene position recognition task.
[0117] The location recognition method in this embodiment is compared with the most advanced methods. Figure 3 presents the precision-recall curves on six rain-added datasets. It can be seen that when comparing the recognition accuracy under the same recall rate, the recognition accuracy of the method in this embodiment is higher than that of other methods, especially significantly higher than that of methods based on convolutional neural networks, such as NetVLAD and Patch-NetVLAD. Compared with Transformer-based methods such as R2Former and AnyLoc, the recognition accuracy of the method in this embodiment is also significantly higher than them. Combined with the actual numerical results on the six rain-added datasets in Table 1, it can also be seen that when the number of candidate locations is 1 and 5 respectively, the recall rates of Top1 and Top5 of the method in the embodiment are significantly higher than those of several other advanced methods. This is mainly because the method in this embodiment is specially designed for rainy scenes. The rain removal enhancement network can be used to remove rain before feature extraction to obtain fine-grained rain-free images, while other methods do not have similar rain removal enhancement modules.
[0118] Table 1 Performance comparison of this method with other advanced methods on various datasets
[0119]
[0120] The method in the embodiment is applied to the scene location recognition in rainy days, including multiple scene location retrieval modes (where "morning vs afternoon" means the morning scene is used as the query location and the afternoon scene is used as the reference database location). The model in this embodiment successfully matches the location pair. Figure 4 As shown, from top to bottom, they represent rain image, fine-grained image, depth map, attention feature map, and correct position recognition based on correct feature matching.
[0121] Embodiment 2
[0122] The purpose of this embodiment is to provide a location recognition model construction system for rainy day scenes, including:
[0123] A data input module, used to group the acquired rainy day images into triplets, wherein the triplets are composed of an anchor sample, a positive sample, and a negative sample;
[0124] The rain removal module is used to generate a coarse-grained de-rained image and a depth map, and fuse the two to generate a fine-grained de-rained image;
[0125] Feature extraction module, used to perform layered processing on the derained image and extract multi-scale local features and global geometric information;
[0126] The global descriptor generation module is used to aggregate multi-scale features through the differentiable VLAD layer to generate a global image descriptor and introduce a context gating mechanism to optimize features;
[0127] Contrastive learning module, used to optimize the global descriptor and adjust the distance weights of positive and negative sample features through dynamic temperature coefficients;
[0128] The matching and location recognition module is used to match the optimized global descriptor with the descriptors in the reference database, calculate the similarity and determine the target location.
[0129] Embodiment 3
[0130] The purpose of this embodiment is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the above method are implemented when the processor executes the program.
[0131] Embodiment 4
[0132] The purpose of this embodiment is to provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the above method are performed.
[0133] Embodiment 5
[0134] The purpose of this embodiment is to provide a computer program product containing instructions, which, when running on a computer, enables the computer to execute the methods and functions involved in any of the above embodiments.
[0135] The steps involved in the apparatus of the above embodiment correspond to the method embodiment 1, and the specific implementation method can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0136] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0137] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A method for constructing a location recognition model for rainy day scenes, characterized in that: The specific steps are as follows: Step S1: The images collected in the rainy scene are divided into anchor samples, positive samples and negative samples to form triplets, and input into the rain removal network to generate a fine-grained rain-free image; Step S2: Input the derained image into MSFPN, perform hierarchical processing on the image, and extract multi-scale local features at different levels; Step S3: The features of different levels are transferred to the bottom layer through the top layer in the feature pyramid, and the discriminative power of the bottom layer features is enhanced by using channel concatenation and MLP to generate a more robust multi-scale feature descriptor; Step S4: Input the multi-scale feature descriptor into the differentiable VLAD layer to aggregate the local features and generate a compact global image descriptor; Step S5: input the global descriptor into the triple contrastive learning network, optimize the feature embedding through the positive and negative sample contrast strategy, and use the dynamic temperature coefficient to adjust the distance weight between positive and negative samples to maximize the distinguishability of the features; The triplet global image descriptor is optimized for positive and negative samples through contrastive learning; Step S6: Match the optimized global descriptor with the descriptor in the reference database, determine the target position by calculating the similarity, and realize position recognition; The similarity calculation function is used to calculate the similarity between the query image and the reference image.
2. A method for constructing a location recognition model for rainy day scenes as claimed in claim 1, characterized in that: In step S2, the fine-grained image generation process is as follows: Multi-scale convolution is used to extract features from the input image; Generate rain-interference residual map using residual connection; The channel attention mechanism and the spatial attention mechanism are used to enhance feature expression and generate coarse-grained derained images. Generate a depth map of the image through a deep attention network; The coarse-grained derained image is fused with the depth map to generate a fine-grained derained image.
3. The method for constructing a location recognition model for rainy day scenes according to claim 1, characterized in that: The process of extracting multi-scale local features and global geometric information at different levels in step S3 is as follows: Use L layers of convolution operations to process the input layer by layer and output the features of each layer; The resolution is downsampled through convolution or pooling operations with a stride of 2, and multi-scale features are finally obtained; A top-down feature fusion strategy is introduced to upsample the top-level features layer by layer and fuse them with the bottom-level features. Based on the fused features, channel splicing and nonlinear mapping are further used for enhancement. After multi-scale fusion and context-aware processing, the final output multi-scale features are:
4. The method for constructing a location recognition model for rainy day scenes according to claim 1, characterized in that: In step S5, the formula for aggregating multi-scale features using a differentiable VLAD layer is:
5. The method for constructing a location recognition model for rainy day scenes according to claim 1, characterized in that: The formula for context gating optimization after aggregating local features in step 4 is: v′ a,p,n =σ(Wv a,p,n +b)⊙v a,p,n 。 6. The method for constructing a location recognition model for rainy day scenes according to claim 1, characterized in that: In step 6, the dynamic temperature coefficient is adjusted by weighted optimization of the distance between positive and negative samples:
7. A location recognition model construction system for rainy day scenes, using a location recognition model construction method for rainy day scenes as claimed in any one of claims 1 to 6, characterized in that: include: A data input module, used to group the acquired rainy day images into triplets, wherein the triplets are composed of an anchor sample, a positive sample, and a negative sample; The rain removal module is used to generate a coarse-grained de-rained image and a depth map, and fuse the two to generate a fine-grained de-rained image; Feature extraction module, used to perform layered processing on the derained image and extract multi-scale local features and global geometric information; The global descriptor generation module is used to aggregate multi-scale features through the differentiable VLAD layer to generate a global image descriptor and introduce a context gating mechanism to optimize features; Contrastive learning module, used to optimize the global descriptor and adjust the distance weights of positive and negative sample features through dynamic temperature coefficients; The matching and location recognition module is used to match the optimized global descriptor with the descriptors in the reference database, calculate the similarity and determine the target location.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, a method for constructing a location recognition model for rainy scenes as described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for constructing a location recognition model for rainy day scenes as described in any one of claims 1 to 6 is performed.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, a method for constructing a location recognition model for rainy day scenes according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Image defogging method based on multi-scale deep learning
CN117078553A
Arrhythmia classification method based on comparative learning
CN117530699A
Asteroid landing section location identification method based on 3D-NetVLAD
CN118537530A