Skip to content

YaxuanLi-cn/PairUAV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

30 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Last-Meter Precision Navigation for UAVs: A Diffusion-Refined Aerial Visual Servoing Approach

arXiv Dataset Workshop Email


Last-Meter Precision Navigation

From coarse aerial localization to fine-grained last-meter navigation: a diffusion-refined visual servoing framework for precise UAV landing and delivery.

Project Structure

UAVM_2026/
โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ dino_resnet/
โ”‚   โ””โ”€โ”€ controlnet/
โ”œโ”€โ”€ pairUAV/
โ”‚   โ”œโ”€โ”€ data_process.sh
โ”‚   โ””โ”€โ”€ University-Release.zip
โ”œโ”€โ”€ baseline/
โ”‚   โ”œโ”€โ”€ SuperGlue/
โ”‚   โ”œโ”€โ”€ train.py
โ”‚   โ””โ”€โ”€ run.sh
โ””โ”€โ”€ step2_refine/
    โ”œโ”€โ”€ train_rgb_loss.py
    โ”œโ”€โ”€ train_rgb_condition_predictor.py
    โ”œโ”€โ”€ tutorial_dataset.py
    โ”œโ”€โ”€ cldm/
    โ”œโ”€โ”€ ldm/
    โ”œโ”€โ”€ cldm_v15_pose_hybrid.yaml
    โ”œโ”€โ”€ train_step2_example.sh
    โ””โ”€โ”€ train_rgb_condition_predictor_example.sh

1. Environment Setup

Create a unified conda environment for the baseline:

conda create -n uavm python=3.9
conda activate uavm

pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128
pip install -r requirements.txt

huggingface-cli download Ramos-Ramos/dino-resnet-50 --local-dir models/dino_resnet

For Stage-II diffusion training, additional dependencies from latent diffusion / ControlNet may be required. Please install the dependencies listed in the Step-II environment file if provided.


2. Data Preparation

2.1 Download University-1652 Dataset

Download University-1652 upon request. You may use the request template.

2.2 Download and Process PairUAV Dataset

Download and process the PairUAV dataset:

cd pairUAV/
bash data_process.sh
cd ..

This script downloads the dataset from HuggingFace and extracts train/test/tours data to the pairUAV/ directory.


3. Stage-I: SuperGlue-Based Coarse Pose Estimation

3.1 Run SuperGlue Feature Matching

First, perform feature matching on image pairs:

cd baseline/SuperGlue

# Option 1: download precomputed matching results.
bash download_results.sh
cd ..

# Option 2: run feature matching.
python gen_test_pairs.py
bash run_train.sh
bash run_test.sh
cd ..

This generates matching results in train_matches_data/ and test_matches_data/.

3.2 Train Stage-I Model

cd baseline/
bash run.sh
cd ..

The Stage-I model predicts coarse heading and range from an image pair. The predicted pose can be exported as a JSON file and used as the condition input for Stage-II diffusion refinement.

3.3 Evaluate Stage-I Results

The final evaluation is conducted on CodaBench. After generating your test predictions, package the submission files according to the competition requirements and upload them to:

https://www.codabench.org/competitions/15251/

Note:

  • The official test results are only available through the CodaBench evaluation server.
  • Please make sure your submission file strictly follows the format required by the competition page.
  • Local validation can be used for debugging, but the leaderboard scores on CodaBench are the final results used for comparison.

4. Stage-II: Diffusion-Based Next Observation Generation

Stage-II trains a diffusion refinement model for next-observation generation. The model is a ControlNet-style latent diffusion model conditioned on:

  • a source RGB image through the ControlNet hint pathway;
  • a numeric pose condition, including heading and range, through a trainable pose encoder;
  • optionally, a frozen RGB pose predictor used as an auxiliary pose-consistency loss.

4.1 Main Files

step2_refine/
โ”œโ”€โ”€ train_rgb_loss.py
โ”œโ”€โ”€ train_rgb_condition_predictor.py
โ”œโ”€โ”€ tutorial_dataset.py
โ”œโ”€โ”€ cldm/
โ”œโ”€โ”€ ldm/
โ”œโ”€โ”€ cldm_v15_pose_hybrid.yaml
โ”œโ”€โ”€ train_step2_example.sh
โ””โ”€โ”€ train_rgb_condition_predictor_example.sh
  • train_rgb_loss.py: main Stage-II diffusion training script.
  • train_rgb_condition_predictor.py: trains the frozen RGB pose predictor used by the auxiliary RGB pose-consistency loss.
  • tutorial_dataset.py: PairUAV dataset loader for Stage-II training.
  • cldm/: ControlNet and DreamNav model components.
  • ldm/: latent diffusion model components.
  • cldm_v15_pose_hybrid.yaml: Stage-II model configuration.
  • train_step2_example.sh: example Stage-II training script.
  • train_rgb_condition_predictor_example.sh: example RGB pose predictor training script.

4.2 External Files Required

The following files are not included in this repository:

  • PairUAV dataset;
  • base ControlNet checkpoint, e.g. control_sd15_ini.ckpt;
  • Stage-I pose JSON, e.g. step1_train_truepose.json or predicted pose JSON;
  • frozen RGB pose predictor checkpoint, e.g. best.pt.

4.3 Train RGB Pose Predictor

The RGB pose predictor takes a source RGB image and a target/generated RGB image as a 6-channel input pair, and predicts:

[sin(heading), cos(heading), range / range_scale]

Train it with:

cd step2_refine/
bash train_rgb_condition_predictor_example.sh

The generated best.pt can be used as a frozen auxiliary model during Stage-II diffusion training.

4.4 Train Stage-II Diffusion Model

After preparing the dataset, base checkpoint, Stage-I pose JSON, and optional RGB predictor checkpoint, run:

cd step2_refine/
bash train_step2_example.sh

Please edit dataset paths, checkpoint paths, and output paths in the bash scripts before running.

4.5 Default Trainable Scope

For the default train_mode=lora_control_decoder_hint setting:

  • the VAE is frozen;
  • most pretrained diffusion backbone weights are frozen;
  • the pose encoder is trainable;
  • LoRA adapters are trained in selected ControlNet and UNet decoder linear layers;
  • the ControlNet hint pathway is trainable;
  • the RGB pose predictor is frozen and used only for auxiliary pose-consistency loss.

5. Files Not Included

Do not commit large datasets, checkpoints, or generated outputs:

*.ckpt
*.pt
*.pth
*.safetensors
outputs*/
checkpoints/
pairUAV/
matches_data/
train_matches_data/
test_matches_data/
step1_*.json
lightning_logs/
wandb/
__pycache__/
*.pyc

๐Ÿ”— Ecosystem

Explore our ecosystem for UAV & Spatial Intelligence ๐Ÿš

๐Ÿš UAV & Spatial Intelligence

๐ŸŽ“ The University-1652 Family

University-1652
Multi-view Multi-source Benchmark
Ground ยท Drone ยท Satellite ยท ACM MM'20


GitHub stars
University-WX
Multi-Weather Extension on the Fly
Pattern Recognition'24


GitHub stars
GeoText-1652
Dense Text Extension
ECCV'24


GitHub stars

๐Ÿš€ New Open-Source Releases

GeoFuse
Road Maps as Free Geometric Priors

GitHub stars
UAVReason
Aerial Scene Reasoning & Generation Benchmark

GitHub stars
Video2BEV
Drone Video โ†’ Bird's-Eye-View

GitHub stars
PairUAV
Paired UAV Data for Matching

GitHub stars

โญ If you find our projects helpful, a star is the best support! โญ

๐Ÿ“– Citation

If you find this project useful, please consider citing our work:

arXiv Preprint

@misc{li2026lastmeterprecisionnavigationuavs,
      title={Last-Meter Precision Navigation for UAVs: A Diffusion-Refined Aerial Visual Servoing Approach}, 
      author={Yaxuan Li and Jiarui Zeng and Shaofei Huang and Zhedong Zheng},
      year={2026},
      eprint={2607.04352},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2607.04352}, 
}

ACM Multimedia Workshop

@inproceedings{deuser2026UVA,
  title={The 4th Workshop on UAVs in Multimedia: Capturing the World from a New Perspective},
  author={Deuser, Fabian and Li, Yaxuan and Wang, Tingyu and Shi, Yujiao and BรถรŸendรถrfer, Anna and Huang, Shaofei and Pan, Xiao and Zheng, Zhedong and Zimmermann, Roger},
  booktitle={Proceedings of the 34th ACM International Conference on Multimedia Workshop},
  year={2026}
}

About

๐Ÿ“Œ Official baseline implementation of 'Last-Meter Precision Navigation for UAVs: A Diffusion-Refined Aerial Visual Servoing Approachโ€˜, serving as the baseline for the UAVM @ ACM MM 2026 Workshop Challenge.

Topics

Resources

Stars

46 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors