DECO: Depth-Guided Co-Visibility Reasoning for UAV Visual Localization (Paper)
If you find our work useful, please consider giving us a ⭐️. Your support means a lot to us! 🥰🥰🥰
DECO is a training-free, depth-guided co-visibility reasoning framework for low-altitude UAV visual localization. Low-altitude UAV images often contain visually salient vertical structures such as façades and walls, while orthographic reference maps mainly preserve roofs and ground surfaces. This creates a **co-visibility gap**: many strong UAV keypoints do not have valid counterparts in the reference map.DECO uses monocular depth to recover local surface geometry, estimates whether UAV keypoints are geometrically co-visible with the orthographic map, and couples this geometric prior with detector saliency through the Geometry-Saliency Coupled Co-visibility Score (GS-CoVis). Keypoints are ranked before feature matching, reducing geometrically invalid correspondences and improving downstream PnP-RANSAC localization.
Overview of the proposed DECO framework.
- Plug-and-play: DECO is inserted before feature matching and does not require retraining the detector or matcher.
- Geometry-aware keypoint selection: monocular depth is used to suppress visually salient but geometrically non-co-visible regions.
- Model-agnostic design: we evaluated DECO with five monocular depth models — Depth Anything 3 (DA3), UniDepthV2, Depth Pro, MoGe2, and MoGe2-Aerial.
- Compatible with different local-feature pipelines: experiments cover SuperPoint, ALIKED, XFeat, and DISK detectors together with MNN, LightGlue, and SuperGlue matchers. DECO improves localization performance for almost all evaluated detector–matcher configurations.
- Evaluated on both AnyVisLoc and OrthoLoC under low-altitude UAV-to-orthographic-map localization settings.
Qualitative visualization of SP+LG+DECO. Rows (a)–(d) correspond to AnyVisLoc Scene1–Scene4, (e)–(f) to OrthoLoC same-domain examples, and (g)–(h) to OrthoLoC cross-domain examples. From left to right: UAV image, monocular depth, GS-CoVis score, DECO-retained keypoints, and DECO/baseline matching and localization results.
The released code covers the components used in our experiments. Method names below link to their public implementations.
| Component | Supported / evaluated models |
|---|---|
| Monocular depth | Depth Anything 3 (DA3), UniDepthV2, Depth Pro, MoGe2, MoGe2-Aerial |
| Feature detector | SuperPoint, ALIKED, XFeat, DISK |
| Feature matcher | MNN, LightGlue, SuperGlue |
Not every detector–matcher pair is implemented. Use the combinations supported by the corresponding helper modules and runner arguments.
Show repository structure
.
├── run_anyvisloc_depth_guided_localization.py # AnyVisLoc DECO evaluation
├── run_ortholoc_depth_guided_localization.py # OrthoLoC DECO evaluation
├── summarize_deco_results.py # summarize localization metrics
│
├── sp_lg_match.py # SuperPoint + LightGlue
├── sp_mnn_match.py # SuperPoint + MNN
├── sp_sg_match.py # SuperPoint + SuperGlue
├── aliked_feature.py # ALIKED backend
├── disk_feature.py # DISK backend
├── xfeat_feature.py # XFeat backend
├── liftfeat_feature.py # LiftFeat backend
├── avl_data.py # AnyVisLoc dataset loader
├── avl_utils.py # AnyVisLoc utilities
├── requirements_DECO.txt # DECO evaluation environment
│
├── LightGlue_main/ # LightGlue source; external
├── models/ # SuperGlue models folder; external
├── LiftFeat/ # LiftFeat source and weights; external
├── ortholoc/ # OrthoLoC package; external
│
└── DA3/ # DA3 depth-generation scripts
├── generate_anyvisloc_da3_depth.py # AnyVisLoc depth generation
├── generate_ortholoc_da3_depth.py # OrthoLoC depth generation
└── avl_data.py # AnyVisLoc loader used by DA3 script
Third-party repositories, pretrained models, and datasets are not redistributed. Obtain them from their official sources and follow the corresponding licenses and citation requirements.
Important: use separate environments for DA3 depth generation and DECO localization. Their dependency stacks should not be mixed.
DECO evaluation environment
conda create -n deco python=3.10 -y
conda activate deco
# Install PyTorch for your CUDA version first.
pip install -r requirements_DECO.txtOur tested environment used Python 3.10, PyTorch 2.5.1, and torchvision 0.20.1.
DA3 depth-generation environment
We recommend following the official Depth Anything 3 installation instructions.
conda create -n da3 python=3.10 -y
conda activate da3
git clone https://github.com/ByteDance-Seed/Depth-Anything-3.git ../Depth-Anything-3
pip install -e ../Depth-Anything-3Keep the upstream DA3 repository outside DECO:
workspace/
├── DECO/
└── Depth-Anything-3/
The released generation scripts use depth-anything/DA3NESTED-GIANT-LARGE by default. A local model directory can be provided with --model.
Third-party repositories are not redistributed. Prepare only the backends required by your selected configuration.
Show third-party setup instructions
Clone the official LightGlue repository directly to LightGlue_main/:
git clone https://github.com/cvg/LightGlue.git LightGlue_mainSuperPoint + SuperGlue requires the models/ folder from the official SuperGluePretrainedNetwork repository. Place that folder directly at the DECO repository root:
git clone https://github.com/magicleap/SuperGluePretrainedNetwork.git ../SuperGluePretrainedNetwork
cp -r ../SuperGluePretrainedNetwork/models ./modelsThe expected layout is:
DECO/
├── models/
│ ├── matching.py
│ ├── superglue.py
│ ├── superpoint.py
│ └── ...
├── sp_sg_match.py
└── ...
For the optional LiftFeat + MNN experiment, clone the official LiftFeat repository at the DECO root and install its dependencies in the DECO environment:
git clone https://github.com/lyp-deeplearning/LiftFeat.git LiftFeat
pip install -r LiftFeat/requirements.txtThe pretrained weights are provided by the LiftFeat repository under LiftFeat/weights/. Before running, make sure the weight path in liftfeat_feature.py points to your local checkpoint, for example:
'LF': './LiftFeat/weights/LiftFeat.pth'LiftFeat is used only with MNN in the released runner:
--feature_type liftfeat --matcher_type mnnClone the official OrthoLoC repository to a temporary/external location and expose its ortholoc Python package at the DECO repository root:
git clone https://github.com/deepscenario/OrthoLoC.git ../OrthoLoC
ln -s ../OrthoLoC/ortholoc ./ortholocAfter preparation, the following import should work in the DECO environment:
python -c "from ortholoc.dataset import OrthoLoC; print('OrthoLoC import OK')"Download AnyVisLoc by following the instructions in the official benchmark repository: https://github.com/UAV-AVL/Benchmark
Only Scene_03, Scene_15, Scene_19, and Scene_20 are required to reproduce the experiments from our paper.
A recommended local layout is:
data/
└── AnyVisLoc/
├── Scene_03/
├── Scene_15/
├── Scene_19/
├── Scene_20/
└── ...
The four scenes used in the DECO experiments are:
| Paper | Public AnyVisLoc scene |
|---|---|
| Scene 1 | Scene_15 |
| Scene 2 | Scene_19 |
| Scene 3 | Scene_20 |
| Scene 4 | Scene_03 |
Generate DA3 depth maps for AnyVisLoc
Generate depth maps in the DA3 environment:
conda activate da3
python DA3/generate_anyvisloc_da3_depth.py \
--dataset_root /path/to/AnyVisLoc \
--save_dir /path/to/anyvisloc_da3_depth \
--device cuda:0To use a local DA3 model directory:
python DA3/generate_anyvisloc_da3_depth.py \
--dataset_root /path/to/AnyVisLoc \
--save_dir /path/to/anyvisloc_da3_depth \
--model /path/to/DA3NESTED-GIANT-LARGE \
--device cuda:0Typical output:
anyvisloc_da3_depth/
├── Scene_15/
├── Scene_19/
├── Scene_20/
└── Scene_03/
Each sample directory contains depth.npy, depth_colormap.png, and meta.json.
Check backend files and external dependencies
Switch to the DECO environment:
conda activate decoBefore running AnyVisLoc, verify that the required backend code is available at the repository root. avl_data.py and avl_utils.py are already included in this release.
DECO/
├── avl_data.py
├── avl_utils.py
├── LightGlue_main/ # for LightGlue configurations
├── models/ # for SuperPoint + SuperGlue
├── LiftFeat/ # for LiftFeat + MNN
└── ...
Only the directories required by your selected detector–matcher combination need to be prepared.
Example with SuperPoint + LightGlue:
python run_anyvisloc_depth_guided_localization.py \
--dataset_root /path/to/AnyVisLoc \
--depth_root /path/to/anyvisloc_da3_depth \
--scenes Scene_15 Scene_19 Scene_20 Scene_03 \
--feature_type sp \
--matcher_type lg \
--device cuda:0Other feature–matcher configurations and smoke test
Select another local-feature pipeline by changing only --feature_type and --matcher_type:
| Feature | MNN | LightGlue | SuperGlue |
|---|---|---|---|
SuperPoint (sp) |
✓ | ✓ | ✓ |
ALIKED (aliked) |
✓ | ✓ | — |
DISK (disk) |
✓ | ✓ | — |
XFeat (xfeat) |
✓ | ✓ | — |
LiftFeat (liftfeat) |
✓ | — | — |
For example:
# ALIKED + LightGlue
--feature_type aliked --matcher_type lg
# XFeat + MNN
--feature_type xfeat --matcher_type mnn
# SuperPoint + SuperGlue
--feature_type sp --matcher_type sg
# LiftFeat + MNN
--feature_type liftfeat --matcher_type mnnThe same detector–matcher arguments are used by the OrthoLoC runner.
For a quick installation check, use --limit:
python run_anyvisloc_depth_guided_localization.py \
--dataset_root /path/to/AnyVisLoc \
--depth_root /path/to/anyvisloc_da3_depth \
--feature_type sp \
--matcher_type lg \
--limit 3 \
--device cuda:0The AnyVisLoc evaluation follows the paper protocol: localization is evaluated with a ground-truth-centered reference region so that the experiment focuses on cross-view matching and PnP localization rather than image retrieval.
Download the dataset by following the official OrthoLoC repository.
A recommended local layout is:
data/
└── OrthoLoC/
└── full/
├── train/
├── val/
├── test_inPlace/
└── test_outPlace/
Use the full/ directory as --dataset_root for depth generation and as --dataset_dir for localization.
Generate DA3 depth maps for OrthoLoC
Generate depth maps in the DA3 environment:
conda activate da3
python DA3/generate_ortholoc_da3_depth.py \
--dataset_root /path/to/OrthoLoC/full \
--save_dir /path/to/ortholoc_da3_depth \
--device cuda:0To generate depth for selected splits only:
python DA3/generate_ortholoc_da3_depth.py \
--dataset_root /path/to/OrthoLoC/full \
--save_dir /path/to/ortholoc_da3_depth \
--splits train val \
--device cuda:0Check OrthoLoC package and backend dependencies
Switch to the DECO environment:
conda activate decoBefore running OrthoLoC, verify that the official package is available at the expected location:
DECO/
├── ortholoc/
├── LightGlue_main/ # for LightGlue configurations
├── models/ # for SuperPoint + SuperGlue
├── LiftFeat/ # for LiftFeat + MNN
└── ...
A simple import check is:
python -c "from ortholoc.dataset import OrthoLoC; print('OrthoLoC import OK')"Example with SuperPoint + LightGlue:
python run_ortholoc_depth_guided_localization.py \
--dataset_dir /path/to/OrthoLoC/full \
--depth_root /path/to/ortholoc_da3_depth \
--output_dir /path/to/ortholoc_results \
--set_name all \
--feature_type sp \
--matcher_type lg \
--gpu_id 0Use the same --feature_type / --matcher_type combinations listed in the AnyVisLoc evaluation.
Smoke test
For a quick test:
python run_ortholoc_depth_guided_localization.py \
--dataset_dir /path/to/OrthoLoC/full \
--depth_root /path/to/ortholoc_da3_depth \
--output_dir /path/to/ortholoc_smoke_test \
--set_name test_inPlace \
--feature_type sp \
--matcher_type lg \
--limit 3 \
--gpu_id 0The runner executes the official train, val, test_inPlace, and test_outPlace splits. For paper-style reporting, samples are subsequently grouped into same-domain and cross-domain categories according to the OrthoLoC domain labels; these categories should not be identified directly with test_inPlace and test_outPlace.
Use summarize_deco_results.py to aggregate localization results.
Show result aggregation commands
python summarize_deco_results.py \
--dataset_type anyvisloc \
--result_root /path/to/anyvisloc_resultspython summarize_deco_results.py \
--dataset_type ortholoc \
--result_root /path/to/ortholoc_results \
--ortholoc_group_by domainThe script produces group-wise and overall summaries in JSON/CSV form.
The DECO code in this repository is licensed under the PolyForm Noncommercial License 1.0.0.
It may be used, modified, and redistributed for non-commercial purposes, including academic research and education, subject to the license terms. Commercial use is not permitted without separate permission from the copyright holders.
Third-party code, models, and datasets remain subject to their respective licenses.
If you find DECO useful in your research, please cite our paper:
@article{ye2026deco,
title={DECO: Depth-Guided Co-Visibility Reasoning for Low-Altitude UAV Visual Localization},
author={Yibin Ye and Xichao Teng and Shuo Chen and Xiaokai Song, Dongdong Guan and Qifeng Yu and Zhang Li},
journal={arXiv preprint arXiv:2608.22289},
year={2026}
}Acknowledgement and third-party projects
We thank the authors of the datasets, models, and open-source projects used in this work. Please cite the corresponding papers and comply with their licenses when using these resources.
Datasets / benchmarks: AnyVisLoc Benchmark, OrthoLoC
Monocular depth: Depth Anything 3, UniDepthV2, Depth Pro, MoGe2, MoGe2-Aerial
Local features / matching: SuperPoint, ALIKED, XFeat, DISK, LightGlue, SuperGlue, LiftFeat

