Giter VIP home page Giter VIP logo

gps-denied-uav-localization's Introduction

GPS-Denied UAV Localization using Pre-existing Satellite Imagery

This is the repo for our paper, GPS-Denied UAV Localization using Pre-existing Satellite Imagery.

Dependencies

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.

Training and Testing Deep Features

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

Testing Alignment on UAV Datasets

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.

gps-denied-uav-localization's People

Contributors

hmgoforth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gps-denied-uav-localization's Issues

Details about motion parameter '.csv' file in the provided Dataset

In the provided dataset, we're given with a '.csv' file for each datasets of UAV frames. It seems to contain information about every frame present in the UAV dataset. How do we generate that information (or the '.csv' file ) for our own dataset? Also, shouldn't we provide the information only for one frame ( initial frame ) of UAV flight? and the model should itself predict information about other frames?

Warp parameters in feature space vs. image space?

Hi, I have a question about how you're computing p_{M,k} and also the corner loss during training. Specifically, if we're using a CNN with say a 2x2 max-pooling layer, then the output feature maps (i.e. channels) will effectively be resized to half the dimensions of the original image. And so I would expect we'd have to rescale the ground-truth warp parameters accordingly before computing the corner loss during training, but it doesn't seem like that's actually happening anywhere. Similarly, there also doesn't seem to be any rescaling going on when computing p_{M,k}.

Am I misunderstanding what's going on? I think I might be confused as to the relationship between warp parameters in image space and those in feature space. Would very much appreciate if you could help clarify.

AttributeError: 'function' object has no attribute 'Variable'

Running the code with the recent versions of the libraries gives me an error

AttributeError: 'function' object has no attribute 'Variable'

in DeepLKBatch on the lines like

if isinstance(p, torch.autograd.variable.Variable):

The problem is fixed by converting the reference to torch.autograd.Variable. See lanpa/tensorboardX#100

Even if the original authors are not going to fix it, I hope the information will help those who try to use their code.

How to convert the GPS coordinates?

Hi! I've noticed that some codes might be missing, which are 'decompose_rel_hmg.py' and 'combine_relative_pose_small_seq.m' mentioned in the comments. I have tried to convert the motion parameters to GPS coordinates by simply decomposing the homography matrixes between the village map and the UAV images in origin resolution (4608*3456). However, the results are not good as they should be.

What goes wrong with it? Would you please show how the homographies are converted? Look forward to your reply.

How to find initial Motion?

I want to run this code with different data. Hence, i should find initial motion of image sequences (frames). I found 4 satellite map points in GIMP which corresponds to UAV frame. I replaced homography values in warp_hmg(img, p) with cv2.getPerspectiveTransform() homography as an initial motion. cv2.warpPerspective() works well, but when i put my H to "xy_warp = H.bmm(xy)", it gives a black image. How can i calculate initial motion.

Note: i tried this experiment in Village.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.