Visual position identification method for guiding receptive field adaptation based on context semantics

By generating semantic weight maps using the Grounding-DINO model and combining depthwise separable convolution with the Sinkhorn algorithm, the problem of visual position recognition in complex scenarios is solved, achieving high-precision and robust visual position recognition, which is suitable for mobile robots and autonomous driving.

CN121921480APending Publication Date: 2026-04-24SHENZHEN POLYTECHNIC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN POLYTECHNIC
Filing Date
2025-12-10
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing visual position recognition technologies lack semantic understanding capabilities in complex scenarios, resulting in low matching accuracy under conditions such as changes in viewpoint, dynamic occlusion, and lighting. They are unable to effectively integrate semantic information and achieve efficient feature calibration and aggregation.

Method used

A semantic weight map is generated using the Grounding-DINO model. The receptive field is dynamically adjusted by combining depthwise separable convolution and adaptive kernel modulation. Feature aggregation is performed using the Sinkhorn algorithm, and the system is trained using joint stochastic attraction-repulsion loss to achieve visual position recognition.

Benefits of technology

It improves the accuracy and robustness of visual position recognition in complex environments, meets the real-time requirements of mobile robots and autonomous driving, effectively distinguishes between static landmarks and dynamic interference, and enhances the intelligence and adaptability of feature extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921480A_ABST
    Figure CN121921480A_ABST
Patent Text Reader

Abstract

The invention is applicable to the technical field of visual identification, and particularly relates to a visual position identification method based on context semantic guidance receptive field adaptation, which comprises the following steps: inputting an image and two types of text prompt sets through a Grouping-DINO model, detecting and outputting a bounding box and confidence thereof, and generating a semantic weight map; the semantic weight map and the image are subjected to channel superposition and then input into a backbone network, a preliminary feature map is obtained, and a receptive field is dynamically adjusted through combination of depth separable convolution and adaptive kernel modulation; calculating an optimal distribution probability, carrying out weighted aggregation, generating a global descriptor, and carrying out normalization; and carrying out comparative learning to obtain a visual position identification model. According to the method, the semantic weight map is generated through open vocabulary detection to directly modulate the visual features, the receptive field adapter dynamically controlled by semantic content is utilized to realize intelligence and self-adaption of feature extraction, and finally the accuracy and robustness of visual position recognition in a complex environment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of visual recognition technology, and in particular relates to a visual position recognition method based on contextual semantic guidance for receptive field adaptation. Background Technology

[0002] Visual location recognition is a key technology for autonomous driving and service robots, aiming to achieve localization by matching query images with images in a geotagged database. Existing methods mainly rely on global descriptors or local feature detection, but their performance degrades significantly in complex scenarios such as changing viewpoints, dynamic occlusion, lighting changes, and seasonal changes. While mainstream deep learning methods such as NetVLAD and CosPlace have made some progress, they lack the ability to semantically distinguish between static structures and dynamic interference in images, resulting in low matching accuracy.

[0003] In recent years, large-scale vision-language models such as CLIP and Grounding-DINO have demonstrated powerful open-vocabulary understanding capabilities, providing constructive solutions for introducing semantic priors into visual location recognition tasks. However, how to effectively integrate semantic information and achieve efficient feature calibration and aggregation remains a pressing issue in this field. Summary of the Invention

[0004] The purpose of this invention is to provide a visual position recognition method based on contextual semantic guidance receptive field adaptation, which aims to solve the problem that existing technologies cannot effectively integrate semantic information and achieve efficient feature calibration and aggregation.

[0005] This invention is implemented as follows: a visual position recognition method based on contextual semantic-guided receptive field adaptation, the method comprising: Using the Grounding-DINO model, the input image and two sets of text prompts are used to detect and output bounding boxes and their confidence scores, generating a semantic weight map in which different regions are assigned different weights. The semantic weight map is superimposed on the image channels and then input into the backbone network to obtain a preliminary feature map. The receptive field is dynamically adjusted according to the local semantic weights through depthwise separable convolution combined with adaptive kernel modulation. The pre-trained DINOv2 is used as the backbone network. The Sinkhorn algorithm is used to calculate the optimal allocation probability between the feature map and the cluster center. Based on the allocation probability, the features are weighted and aggregated to generate a global descriptor and then L2 normalized. A visual location recognition model is obtained by using a joint random attraction-repulsion loss for contrastive learning and a semi-hard sample mining strategy for training. The visual location is then located using the visual recognition model.

[0006] Preferably, in the step of using the Grounding-DINO model to input an image and two types of text cue sets, detect and output bounding boxes and their confidence scores, and generate a semantic weight map, the Grounding-DINO model is used as an open vocabulary detector, the Swin Transformer backbone network is used, and the detection box confidence threshold and text-region association threshold are both within [0.2, 0.5].

[0007] Preferably, the two types of text cue sets are a static positive cue set and a dynamic negative cue set. The static positive cue set corresponds to fixed landmark objects in the scene, while the dynamic negative cue set corresponds to non-fixed interference objects in the scene. The output of the Grounding-DINO model includes the detection bounding box, the center coordinates of the detection bounding box, the length and width of the detection bounding box, the category, and the confidence score.

[0008] Preferably, in the step of generating the semantic weight map, based on the output of the Grounding-DINO model, the type of the detection box corresponding to each pixel and the corresponding cue set are determined, and the pixel is assigned a corresponding weight based on the preset mapping rules. If it belongs to the static positive cue set, the pixel is assigned a positive weight; if it belongs to the dynamic negative cue set, the pixel is assigned a negative weight; and the weights of other pixels are set to 0.

[0009] Preferably, in the step of generating the semantic weight graph, the weights of each point in the semantic weight graph are weighted and averaged, using the following formula: in, Let be the coordinates of the pixel, h and w be the length and width of the image, respectively, and n and i be the total number and ordinal number of the detected bounding boxes, respectively. and Let be the length and width of the i-th detection bounding box, respectively. Score its confidence level. This corresponds to the weight value.

[0010] Preferably, after channel-wise superposition of the semantic weight map and the image, the image is input into the backbone network to obtain a preliminary feature map. In the step of dynamically adjusting the receptive field according to the local semantic weights through depthwise separable convolution combined with adaptive kernel modulation, DINOv2 ViT-L / 14 is used as the basic network for image feature extraction. The original image is multiplied element-wise with the three-channel semantic weight map obtained by channel copying, and the result is input into the block embedding layer and subsequent Transformer layer of DINOv2 to obtain the initial feature map F.

[0011] Preferably, in the step of dynamically adjusting the receptive field based on local semantic weights, for each spatial location (i, j) on the initial feature map F, the receptive field is adjusted according to its local average semantic weight w. ij Through a small multilayer perceptron f mlp (·) Dynamically generate convolution parameters: Where, k ij d is the kernel size. ij g is the expansion factor. ij This is the gate threshold; Use the generated k ij and d ij Perform depthwise separable convolution on F to obtain the features F under the dynamic receptive field. d (i, j); Use the generated k ij and d ij Perform depthwise separable convolution on the initial feature map F to obtain the intermediate feature map F under the dynamic receptive field. d , for g ij A (0,1) mapping transformation is performed as a gating signal, and the original features are adaptively fused with the dynamically convolutional features to obtain the final recalibrated features F': Where (i,j) are the pixel coordinates, and σ(·) is the Sigmoid function.

[0012] Preferably, in the steps of using the Sinkhorn algorithm to calculate the optimal allocation probability between the feature map and the cluster centers, weighting and aggregating the features based on the allocation probability, generating a global descriptor and performing L2 normalization, the recalibrated feature map F' is regarded as a set of feature vectors, and the optimal transfer plan P between it and a set of learnable cluster centers C is solved by the Sinkhorn algorithm. The optimal allocation probability P is used to perform a weighted summation on F' to generate a global descriptor v.

[0013] Preferably, the operation process of the global descriptor v is as follows: Weighted aggregation: Using the optimal allocation probability matrix P, each feature vector F' i Based on the probability P that it belongs to each cluster center i The weighted features are summed and then summed up to the corresponding cluster center dimension. The resulting global descriptor v is the aggregation result of weighted features across all cluster center dimensions, expressed by the formula: Where c and i are the total number and ordinal number of cluster centers, respectively, and ⊗ represents element-wise multiplication; L2 normalization: The generated descriptor v is subjected to L2 normalization to obtain the final unit vector.

[0014] Preferably, the static positive cue set includes buildings, houses, buildings, shops, landmarks, traffic signs, streetlights, and tree trunks, while the dynamic negative cue set includes vehicles, cars, buses, trucks, bicycles, motorcycles, people, pedestrians, and leaves.

[0015] This invention provides a visual position recognition method based on contextual semantic guidance and receptive field adaptation, which solves the core problem of visual position recognition in complex environments and effectively meets the real-time requirements of scenarios such as mobile robots and autonomous driving. By generating a semantic weight map through open vocabulary detection to directly modulate visual features, and by using a receptive field adapter dynamically controlled by semantic content, intelligent and adaptive feature extraction is achieved, ultimately improving the accuracy and robustness of visual position recognition in complex environments. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating a visual position recognition method based on contextual semantic guidance for receptive field adaptation, provided in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the results of a visual position recognition method based on contextual semantic guidance and receptive field adaptation provided in an embodiment of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0018] The processing flow of this invention can be represented as follows: receiving an input scene image, guiding the detection module to generate a semantic weight map through semantic prompts, then inputting the weight map and the original image together into an adaptive feature recalibration module for feature extraction and recalibration, then aggregating them into a global descriptor through an optimal transmission aggregation module, and finally training the model or using it for online retrieval under the supervision of a comparative clustering distillation module.

[0019] like Figure 1 and Figure 2 As shown, this invention provides a visual location recognition method based on contextual semantic-guided receptive field adaptation, the method comprising: S100, using the Grounding-DINO model, takes an input image and two sets of text prompts, detects and outputs bounding boxes and their confidence scores, and generates a semantic weight map. Different regions in the semantic weight map are assigned different weights.

[0020] In this step, S101, open vocabulary target detection: Core Components: The Grounding-DINO model is used as an open vocabulary detector. In a preferred embodiment, its Swing Transformer backbone network version is used.

[0021] Parameter settings: The detection box confidence threshold is set to 0.35, and the text-region association threshold is set to 0.25. These two parameters can be adjusted within the range of [0.2, 0.5] according to the detection sensitivity requirements of the actual scenario.

[0022] Cue word design: Define two sets of text cues: The static positive cue set T+ consists of {"building", "house", "skyscraper", "store", "landmark", "traffic sign", "street lamp", "trunk"}, corresponding to object categories such as buildings, houses, buildings, shops, landmarks, traffic signs, streetlights, and tree trunks, respectively. This set aims to identify stable and unchanging landmark objects in a scene.

[0023] The dynamic negative cue set T- consists of {"vehicle", "car", "bus", "truck", "bicycle", "motorcycle", "person", "pedestrian", "leaves"}, corresponding to the object categories of vehicles, cars, buses, trucks, bicycles, motorcycles, people, pedestrians, and leaves, respectively. This set aims to identify interfering objects that may cause occlusion or seasonal changes.

[0024] Output: For input image I, Grounding-DINO outputs a set of detection bounding boxes B = {b i}, each box b i Includes center coordinates (u) i , v i ), length and width (l i , d i Category c) i and confidence score s i .

[0025] S102, Semantic weight graph generation: Weight allocation rule: Initialize a weight map Wi corresponding to the image spatial resolution based on the detection results. The specific rules are as follows: If a pixel (x, y) is located within a detection box bi and its category ci belongs to the static positive cue set T+, then the pixel is assigned a positive weight α.

[0026] If a pixel (x, y) is located within a detection box bi and its category ci belongs to the dynamic negative cue set T-, then the pixel is assigned a negative weight β.

[0027] The weights of the remaining pixels are set to 0.

[0028] Optimal weighting factor selection: Extensive experimental verification shows that optimal results are achieved when α = 0.8 and β = -1.2. These two scaling factors asymmetrically amplify the contribution of static features while strongly suppressing interference from dynamic features. Their specific values ​​can be adjusted within the range of α ∈ [0.5, 1.5] and β ∈ [-2.0, -0.5] based on the specific dataset.

[0029] Weighted Graph Refinement: To obtain a smoother weighted graph that takes into account target size and detection reliability, a weighted average is performed using the following formula: in, Let be the coordinates of the pixel, h and w be the length and width of the image, respectively, and n and i be the total number and ordinal number of the detected bounding boxes, respectively. and Let be the length and width of the i-th detection bounding box, respectively. Score its confidence level. This corresponds to the weight value.

[0030] This step ensures that large and high-confidence targets dominate the weight graph, making the semantic prior distribution more reasonable.

[0031] To verify the effectiveness of the present invention, other alternative solutions were used for comparison: (A) Alternative 1: Instead of using Grounding-DINO, adopt a semantic segmentation model with a closed vocabulary (such as DeepLabV3+). Disadvantages: It cannot flexibly adapt to unknown categories, fails when encountering objects not present in the training set (such as a certain type of road sign), and its generalization ability is far inferior to the open vocabulary solution of this invention.

[0032] (B) Alternative 2: Instead of using a weight map, the object bounding box coordinates output by Grounding-DINO are directly used as the input to the location encoding network. Disadvantages: The coarse bounding box information cannot provide pixel-level fine guidance and is incompatible with DINOv2's block embedding mechanism.

[0033] (C) Comparative Example: No semantic prompts are used at all, i.e., M(x,y) is always equal to 1. Disadvantage: This setting causes a significant drop in the recall rate of this invention on the MSLS-challenge dataset, demonstrating the important role of semantic prompts in improving robustness.

[0034] S200 inputs the semantic weight map and the image through channel overlay into the backbone network to obtain a preliminary feature map. The receptive field is dynamically adjusted according to the local semantic weights by using depthwise separable convolution combined with adaptive kernel modulation. The pre-trained DINOv2 is used as the backbone network.

[0035] In this step, step S201: semantically enhanced feature extraction: Visual backbone network: DINOv2 ViT-L / 14 is preferred as the base network for image feature extraction because it learns strong visual basic representations in unsupervised pre-training.

[0036] Feature extraction process: The original image I is multiplied element-wise with the three-channel semantic weight map [M]3 obtained by channel copying, and the result is then input into the block embedding layer of DINOv2 and subsequent Transformer layers to obtain the initial feature map F. This operation incorporates semantic prior at the input level.

[0037] Step S200 includes dynamic receptive field adaptation: Core operation: Spatial domain smoothing of the feature map F is performed using depthwise separable convolution. This is one of the key innovations of this invention, and its calculation is as follows: For each spatial location (i, j) on the feature map F, based on its local average semantic weight w ij Through a small multilayer perceptron f mlp (·) Dynamically generate convolution parameters: Where, k ij d is the kernel size. ij g is the expansion factor. ij This is the gating threshold.

[0038] Use the generated k ij and d ij Perform depthwise separable convolution on F to obtain the features F under the dynamic receptive field. d (i, j).

[0039] Using the Sigmoid function σ(·) on g ij The transformation is performed as a gating signal, combining the original feature F with the dynamically convolutional feature F. d Adaptive fusion is performed to obtain the final recalibrated feature F': This mechanism enables the network to use a larger receptive field in static regions with high semantic weights (such as building facades) to capture more macroscopic contextual information, while in regions with low or negative semantic weights, it preserves the original features or suppresses them, thus achieving content adaptation in feature extraction.

[0040] To verify the effectiveness of the present invention, other alternative solutions were used for comparison: (A) Alternative: Use standard, fixed-kernel convolutions or dilated convolutions instead of dynamically generated convolutions. Disadvantages: They cannot be flexibly adjusted according to semantic content; in complex scenes, they either become too smooth and lose details, or their receptive field is insufficient to establish effective spatial relationships.

[0041] (B) Failure Case: Directly using attention mechanisms (such as non-local self-attention) to establish long-range dependencies is computationally expensive and prone to generating incorrect associations between dynamically disturbed regions, thus reducing performance. The dynamic depthwise convolution of this invention achieves the best balance between performance and efficiency.

[0042] S300 uses the Sinkhorn algorithm to calculate the optimal allocation probability between the feature map and the cluster center, performs weighted aggregation on the features based on the allocation probability, generates a global descriptor, and performs L2 normalization.

[0043] In this step, S300 involves treating the recalibrated feature map F' as a set of feature vectors and solving for the optimal transport plan P between it and a set of learnable cluster centers C using the Sinkhorn algorithm. This algorithm introduces entropy regularization into the standard optimal transport problem, enabling it to be solved quickly through iterative matrix scaling. The entropy regularization strength λ is initialized to 3.0.

[0044] Weighted aggregation: Using the optimal allocation probability matrix P, each feature vector F'i is weighted according to its probability Pi, belonging to each cluster center, and the summation is applied to the corresponding cluster center dimension. The final global descriptor v is the aggregation result of weighted features across all cluster center dimensions. The formula is expressed as: v = Σ_i (P_i,: ⊗ F'_i,: ), where ⊗ represents weighted summation.

[0045] L2 normalization: The generated descriptor v is subjected to L2 normalization to obtain the final unit vector. This step maps the descriptor to a hypersphere space, making subsequent similarity comparisons (cosine similarity) more effective.

[0046] To verify the effectiveness of the present invention, other alternative solutions were used for comparison: (A) Alternative Solution: Employ the classic NetVLAD structure or its modern variant based on DINOv2, generating descriptors by calculating and aggregating the residuals between feature points and cluster centers. Disadvantages: NetVLAD is essentially a "hard allocation" or "soft allocation" clustering aggregation, but its allocation logic is relatively simple and sensitive to the initialization of cluster centers. OTA, based on optimal transport theory, provides an optimal allocation scheme with minimal overall cost, better handling complex situations such as uneven feature point distribution and semantic noise. It also has a higher compatibility with the semantically recalibrated feature map F' in this invention, thus achieving superior aggregation results.

[0047] (B) Failure Case: Directly performing global average pooling or max pooling on the feature map F' in the spatial dimensions (H, W) to generate a global descriptor. Disadvantage: Pooling operations cannot distinguish the semantic importance of different regions in the feature map. For example, it assigns the same aggregation weight to suppressed dynamic interference regions (such as vehicles) and enhanced static landmark regions (such as buildings), resulting in the generated descriptor containing a large amount of invalid or negative information, thus reducing discriminative power.

[0048] S400 employs a joint random attraction-repulsion loss for contrastive learning and a semi-hard sample mining strategy for training to obtain a visual location recognition model, which is then used for visual location localization.

[0049] In this step, (A) the loss function is: Stochastic Attraction-Repulsion Embedding (SARE) loss. This loss encourages positive sample pairs (images describing the same location) to move closer together in the embedding space, while pushing negative sample pairs away from each other. The "cluster distillation" idea of ​​SARE loss is more in line with the inherent needs of visual location recognition tasks.

[0050] (B) Sampling strategy: A "semi-difficult" sample mining strategy is adopted, that is, in each training batch, not only the most difficult negative samples are considered, but also the medium-difficulty negative samples are considered, which helps to improve the generalization ability of the model.

[0051] (C) Hyperparameters: The marginal hyperparameter η is set to 0.5.

[0052] To verify the effectiveness of the present invention, other alternative solutions were used for comparison: (A) Alternative: Use supervised contrastive losses that only consider the relationship between sample pairs. These bring samples of the same class closer together and push samples of different classes further apart. Disadvantages: In visual location recognition tasks, a single anchor point may correspond to a large number of positive samples (different viewpoints at the same location, different times), while the number and diversity of negative samples are even greater. When constructing positive-negative pairs, supervised contrastive losses fail to explicitly and jointly optimize the relationship between an anchor point and the entire cluster of positive and negative samples as they do with SARE losses. Therefore, the gradient signals they construct are not as concentrated and powerful as those of SARE, resulting in poor discriminative power in the learned embedding space.

[0053] (B) Comparative Example: Using standard triplet loss, each training sample consists of (anchor, positive sample, and one negative sample), typically employing online hard sample mining. Disadvantages: Triplet loss considers only one negative sample at a time, especially hard negative samples, which leads to unstable training and a tendency to get trapped in local optima. Furthermore, it fails to fully utilize the information provided by all negative samples within a batch, resulting in lower learning efficiency than SARE loss.

[0054] In this invention, the corresponding hardware and software environment standard for the method described herein is: 1) Hardware environment: The minimum configuration for the graphics processor is a single NVIDIA GeForce RTX 3090, and the CPU can be an Intel i5-13400F or higher.

[0055] (2) Software environment: Based on UBuntu20.04 operating system, install Python 3.8, CUDA 12.1 and PyTorch 1.11.7 in sequence.

[0056] 4. Parameter Configuration (1) Image size: The original size is 640×480, and the edge is cropped to 630×476 to adapt to DINOv2 input; (2) Static prompts: {buildings, houses, skyscrapers, shops, landmarks, traffic signs, streetlights, tree trunks}; (3) Dynamic prompt words: {vehicle, car, bus, truck, bicycle, motorcycle, person, pedestrian, leaf}; (4) Weighting factors: α = 0.8 (static), β = -1.2 (dynamic); (5) Training cycle: 100, batch size: 32, learning rate: 1e-4, optimizer: AdamW.

[0057] In summary, this invention achieves complementary advantages through the close collaboration of four steps, jointly solving the core challenge of visual position recognition in complex environments and effectively meeting the real-time requirements of scenarios such as mobile robots and autonomous driving. Any specific implementation that omits key steps (such as dynamic receptive field adaptation) or replaces them with suboptimal solutions (such as using closed-vocabulary segmentation) will not achieve the technical effects obtained by this invention.

[0058] The significant advantages of this invention are: 1. Semantic-guided feature enhancement: By introducing semantic priors through open vocabulary detection, the focus on static landmarks is significantly improved and dynamic interference is suppressed.

[0059] 2. Dynamic visual receptive field adaptation: The receptive field is adaptively adjusted by using depthwise separable convolution and local semantic weights to improve the spatial adaptability of features.

[0060] 3. Optimal Global Feature Aggregation: The optimal transfer theory is used to achieve soft allocation of feature vectors and cluster centers, thereby enhancing the discriminative power of global descriptors.

[0061] 4. Strong robustness and real-time performance: It achieves optimal performance on multiple benchmark datasets, especially in complex scenarios such as occlusion and seasonal changes, and its inference speed meets the requirements of real-time applications.

[0062] This invention solves the following problems: 1. Semantic insensitivity leads to mismatches: Existing methods lack semantic understanding capabilities and cannot effectively distinguish between stable static landmarks (such as buildings and road signs) and volatile dynamic interference (such as vehicles and pedestrians) in a scene, resulting in a significant performance drop when there is occlusion or seasonal changes.

[0063] 2. Limitations of fixed receptive field perception: Traditional models use a fixed receptive field, which makes it difficult to adaptively capture features at different scales and spatial contexts, and cannot take into account both the global structure of the distant view and the details of the near view.

[0064] 3. Closed-vocabulary semantic models have weak generalization ability: Semantic segmentation methods based on predefined categories degrade in performance when encountering unknown categories and lack adaptability to open scenarios.

[0065] Therefore, this invention constructs an integrated framework of "semantic guidance-feature recalibration-receptive field dynamic adaptation". It directly modulates visual features by generating a semantic weight map through open vocabulary detection, and uses a receptive field adapter dynamically controlled by semantic content to achieve intelligent and adaptive feature extraction, ultimately improving the accuracy and robustness of visual position recognition in complex environments.

[0066] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A visual position recognition method based on contextual semantic-guided receptive field adaptation, characterized in that, The method includes: Using the Grounding-DINO model, the input image and two sets of text prompts are used to detect and output bounding boxes and their confidence scores, generating a semantic weight map in which different regions are assigned different weights. The semantic weight map is superimposed on the image channels and then input into the backbone network to obtain a preliminary feature map. The receptive field is dynamically adjusted according to the local semantic weights through depthwise separable convolution combined with adaptive kernel modulation. The pre-trained DINOv2 is used as the backbone network. The Sinkhorn algorithm is used to calculate the optimal allocation probability between the feature map and the cluster center. Based on the allocation probability, the features are weighted and aggregated to generate a global descriptor and then L2 normalized. A visual location recognition model is obtained by using a joint random attraction-repulsion loss for contrastive learning and a semi-hard sample mining strategy for training. The visual location is then located using the visual recognition model.

2. The visual position recognition method based on contextual semantic-guided receptive field adaptation according to claim 1, characterized in that, In the step of using the Grounding-DINO model to input an image and two types of text cue sets, detect and output bounding boxes and their confidence scores, and generate a semantic weight map, the Grounding-DINO model is used as an open vocabulary detector, the Swin Transformer backbone network is used, and the detection box confidence threshold and text-region association threshold are both within [0.2, 0.5].

3. The visual position recognition method based on contextual semantic-guided receptive field adaptation according to claim 2, characterized in that, The two types of text cue sets are static positive cue sets and dynamic negative cue sets. Static positive cue sets correspond to fixed landmark objects in the scene, while dynamic negative cue sets correspond to non-fixed interference objects in the scene. The output of the Grounding-DINO model includes the detected bounding box, the center coordinates of the detected bounding box, the length and width of the detected bounding box, the category, and the confidence score.

4. The visual position recognition method based on contextual semantic-guided receptive field adaptation according to claim 1, characterized in that, In the step of generating the semantic weight map, based on the output of the Grounding-DINO model, the type of the detection box corresponding to each pixel and the corresponding cue set are determined. Based on the preset mapping rules, the pixel is assigned the corresponding weight. If it belongs to the static positive cue set, the pixel is assigned a positive weight. If it belongs to the dynamic negative cue set, the pixel is assigned a negative weight. The weights of other pixels are set to 0.

5. The visual position recognition method based on contextual semantic-guided receptive field adaptation according to claim 1, characterized in that, In the step of generating the semantic weight graph, the weights of each point in the semantic weight graph are weighted and averaged using the following formula: in, Let be the coordinates of the pixel, h and w be the length and width of the image, respectively, and n and i be the total number and ordinal number of the detected bounding boxes, respectively. and Let be the length and width of the i-th detection bounding box, respectively. Score its confidence level. This corresponds to the weight value.

6. The visual position recognition method based on contextual semantic-guided receptive field adaptation according to claim 1, characterized in that, After the semantic weight map is superimposed on the image through channels, it is input into the backbone network to obtain a preliminary feature map. In the step of dynamically adjusting the receptive field according to the local semantic weights through depthwise separable convolution combined with adaptive kernel modulation, DINOv2ViT-L / 14 is used as the basic network for image feature extraction. The original image is multiplied element-wise with the three-channel semantic weight map obtained by channel duplication, and the result is input into the block embedding layer and subsequent Transformer layer of DINOv2 to obtain the initial feature map F.

7. The visual position recognition method based on contextual semantic-guided receptive field adaptation according to claim 6, characterized in that, In the step of dynamically adjusting the receptive field based on local semantic weights, for each spatial location (i, j) on the initial feature map F, the receptive field is adjusted according to its local average semantic weight w. ij Through a small multilayer perceptron f mlp (·) Dynamically generate convolution parameters: Where, k ij d is the kernel size. ij g is the expansion factor. ij This is the gate threshold; Use the generated k ij and d ij Perform depthwise separable convolution on the initial feature map F to obtain the intermediate feature map F under the dynamic receptive field. d , for g ij A (0,1) mapping transformation is performed as a gating signal, and the original features are adaptively fused with the dynamically convolutional features to obtain the final recalibrated features F': Where (i,j) are the pixel coordinates, and σ(·) is the Sigmoid function.

8. The visual position recognition method based on contextual semantic-guided receptive field adaptation according to claim 7, characterized in that, In the steps of calculating the optimal assignment probability between the feature map and the cluster centers using the Sinkhorn algorithm, weighting and aggregating the features based on the assignment probability, generating a global descriptor, and performing L2 normalization, the recalibrated feature map F' is regarded as a set of feature vectors. The optimal transfer plan P between F' and a set of learnable cluster centers C is solved using the Sinkhorn algorithm. The optimal assignment probability P is used to perform a weighted summation on F' to generate the global descriptor v.

9. The visual position recognition method based on contextual semantic-guided receptive field adaptation according to claim 8, characterized in that, The operation process of the global descriptor v is as follows: Weighted aggregation: Using the optimal allocation probability matrix P, each feature vector F' i Based on the probability P that it belongs to each cluster center i The weighted features are summed and then summed up to the corresponding cluster center dimension. The resulting global descriptor v is the aggregation result of weighted features across all cluster center dimensions, expressed by the formula: Where c and i are the total number and ordinal number of cluster centers, respectively, and ⊗ represents element-wise multiplication; L2 normalization: The generated descriptor v is subjected to L2 normalization to obtain the final unit vector.

10. The visual position recognition method based on contextual semantic-guided receptive field adaptation according to claim 3, characterized in that, The set of static positive cues includes buildings, houses, buildings, shops, landmarks, traffic signs, streetlights, and tree trunks, while the set of dynamic negative cues includes vehicles, cars, buses, trucks, bicycles, motorcycles, people, pedestrians, and leaves.