This is the repo for our paper, GPS-Denied UAV Localization using Pre-existing Satellite Imagery.
To train the deep features from satellite images, and to test on the flight datasets, we used
- Python 3.6.2,
- PyTorch 0.3.0
- OpenCV 3.3.0-dev
- SciPy 0.19.1
- Matplotlib 2.0.2
Download dataset folders from this Google Drive and add to top level of repo after downloading.
In deep_feat/
, fine-tune VGG16 conv3 block with New Jersey dataset ('woodbridge'):
python3 evaluate.py train woodbridge ../sat_data/ trained_model_output.pth ../models/vgg16_model.pth
In optimize/
, testing alignment on Village dataset using trained model, aligning every UAV image in dataset sequentially with the map:
python3 pose_opt.py sliding_window -image_dir ../village/frames/ -image_dir_ext *.JPG -motion_param_loc ../village/P_village.csv -map_loc ../village/map_village.jpg -model_path ../models/conv_02_17_18_1833.pth -opt_img_height 100 -img_h_rel_pose 1036.8 -opt_param_save_loc ../village/test_out.mat
Testing alignment on Gravel-Pit dataset using trained model:
python3 pose_opt.py sliding_window -image_dir ../gravel_pit/frames/ -image_dir_ext *.JPG -motion_param_loc ../gravel_pit/P_gravel_pit.csv -map_loc ../gravel_pit/map_gravel_pit.jpg -model_path ../models/conv_02_17_18_1833.pth -opt_img_height 100 -img_h_rel_pose 864 -opt_param_save_loc ../gravel_pit/test_out.mat
See argparse
help for argument documentation.