├── README.md
├── asset
├── architecture_for_loc.png
└── flight_example_in_field_test.gif
├── datasets
└── DATASET.md
├── main.py
├── models
└── MODELS.md
├── scripts
└── SCRIPTS.md
├── setup
└── environment.yml
└── utility
└── config.py
/README.md:
--------------------------------------------------------------------------------
1 | # Leveraging Map Retrieval and Alignment for Robust UAV Visual Geo-Localization
2 | * [Introduction](#Introduction)
3 | * [Get Started](#Get-Started)
4 | * [Absolut Localization Flow](#Absolute-Localization-Flow)
5 | * [Code Structure](#Code-Structure)
6 | * [Resources Download](#Resources-Download)
7 | * [Acknowledgements](#Acknowledgements)
8 | * [Citation](#Citation)
9 |
10 | ## Introduction
11 | This project focuses on development of a robust geo-localization system on aerial platform leveraging deep-learning based map retrieval and alignment.
12 | Two public datasets from [Ageagle](https://ageagle.com/resources/?filter_by=data-set) have been re-organized to evaluate the proposed algorithms.
13 | A field test in Beijing Haidian has been also conducted to demonstrate the effectiveness of the localization system.
14 |
15 | **Input data:** orthophoto and the target referenced map
16 |
17 | **Output data:** extracted geo-coordinates
18 |
19 |
20 |
21 |
22 |
23 | ## Get-Started
24 |
25 | **Install dependencies:**
26 |
27 | The environment we use can be seen in `setup/environment.yml`.
28 | Note this project is mainly built based on the `pytorch` without many additional dependencies.
29 | And this environment list can be referred if there is any conflicts of dependencies.
30 |
31 | **Prepare the dataset:**
32 |
33 | We use the pre-stored images to represent the scenes captured during the flight.
34 |
35 | * Our datasets: please download the datasets and input in the `dataset` directory.
36 | * Custom dataset: please make sure the map contains the actual geo-coordinates and the file of the query images should be re-named as such format: `@index@longitude@latitude@`.
37 |
38 | **Test on the dataset:**
39 |
40 | Please make sure the paths for the pretrained weights and the datasets are correct.
41 | With the evaluation for the Ageagle dataset, simply run:
42 |
43 | ```
44 | python main.py
45 | ```
46 |
47 | If other datasets need to be tested, please change the configuration in `utility/config.py`.
48 |
49 | ## Absolute-Localization-Flow
50 |
51 |
52 |
53 |
54 | The fine localization is achieve with frame-to-map alignment. For more details, please refer to the `main.py` and files in `scripts/`.
55 |
56 | ## Code-Structure
57 | The file structure is shown as the following.
58 | At present, we only provide the main files, and all the related files will be released after the article is published.
59 |
60 | ```
61 | .
62 | +--- asset # asset for this repository
63 | +--- datasets # path to save the geo-referenced map and captured frames
64 | +--- models # path to save the pretrained network weights
65 | +--- scripts # essential scripts for network models
66 | +--- setup # statement for the dependencies
67 | +--- utility # essential utilities to load image and visualize
68 | +--- main.py # main programme
69 | +--- README.md
70 |
71 | ```
72 |
73 | ## Resources-Download
74 |
75 | * DATASETS: All the datasets for this research have been open-sourced at the [this link](https://cloud.tsinghua.edu.cn/d/eebd9d4c83eb4fe2b20c/).
76 |
77 | * WEIGHTS: The model checkpoints have been also given at the [this link](https://cloud.tsinghua.edu.cn/d/eebd9d4c83eb4fe2b20c/).
78 |
79 | (only the Ageagle datasets are available at present.)
80 |
81 | ## Acknowledgements
82 |
83 | In particular, we appreciate the following online resources to support the training and testing in this work.
84 |
85 | * [Ageagle](https://ageagle.com/resources/?filter_by=data-set)
86 | * [USGS](https://earthexplorer.usgs.gov/)
87 |
88 | We also express our gratitude for these open-sourced researches and parts of this work are inspired by them.
89 |
90 | * [HF-Net](https://github.com/ethz-asl/hfnet)
91 | * [2019 ICRA Goforth](https://github.com/hmgoforth/gps-denied-uav-localization)
92 | * [DVGL Benchmark](https://github.com/gmberton/deep-visual-geo-localization-benchmark)
93 | * [NetVLAD](https://github.com/lyakaap/NetVLAD-pytorch)
94 |
95 | ## Citation
96 |
97 | (related publication waiting for reviewing)
98 |
--------------------------------------------------------------------------------
/asset/architecture_for_loc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmf21/UAVLocalization/e0f674cd1a39fa49b7be6dc484e5a53f58872714/asset/architecture_for_loc.png
--------------------------------------------------------------------------------
/asset/flight_example_in_field_test.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmf21/UAVLocalization/e0f674cd1a39fa49b7be6dc484e5a53f58872714/asset/flight_example_in_field_test.gif
--------------------------------------------------------------------------------
/datasets/DATASET.md:
--------------------------------------------------------------------------------
1 | # The Instruction of dataset for evaluation
2 |
3 | * geo-referenced map;
4 |
5 | * a directory for restoring the captured frames;
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | import os
2 | import sys
3 | import warnings
4 | import autograd.numpy as np
5 | import matplotlib.pyplot as plt
6 | import torch
7 | from torch.autograd import Variable
8 | from torchvision import transforms
9 | from utility import config
10 | import glob
11 | import time
12 |
13 | os.environ['CUDA_VISIBLE_DEVICES'] = '0'
14 | USE_CUDA = torch.cuda.is_available()
15 | device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
16 | sys.path.insert(0, './deep_feat') # for model loading
17 |
18 | # control the result visualize and record
19 | show_fig = True
20 | show_error = True
21 | record_data = True * show_error
22 |
23 |
24 | def UAV_loc(Init_UAV_info):
25 | return 0
26 |
27 |
28 | def main():
29 | # setting parameters for showing the result
30 | warnings.filterwarnings("ignore")
31 | plt.rcParams['font.sans-serif'] = ['Tahoma']
32 | plt.rcParams['axes.unicode_minus'] = False
33 | plt.figure(figsize = (10, 5))
34 | np.set_printoptions(precision = 4)
35 |
36 | # parameters setting of localization
37 | # we can set the initial position of UAV if it is available
38 | Init_UAV_info = {
39 | 'image_list': None,
40 | 'trans_x': config.init_x,
41 | 'trans_y': config.init_y,
42 | 'angle': config.init_angle,
43 | 'scale': config.init_scale,
44 | 'altitude': None,
45 | 'd_x': 0,
46 | 'd_y': 0,
47 | 'd_angle': 0,
48 | 'd_scale': 0,
49 | 'curr_image': None,
50 | 'prev_image': None,
51 | 'curr_image_for_rel_loc': None,
52 | 'prev_image_for_rel_loc': None,
53 | 'curr_image_for_match_loc': None,
54 | 'prev_image_for_match_loc': None,
55 | 'extract_map_patch': None,
56 | 'curr_GPS': None,
57 | 'is_located': False,
58 | 'image_idx': 0,
59 | }
60 | print("Testing image directory is : ", os.path.join(config.image_dir, config.image_dir_ext))
61 | image_list = sorted(glob.glob(os.path.join(config.image_dir, config.image_dir_ext)))
62 | Init_UAV_info['image_idx'] = config.image_idx
63 | Init_UAV_info['curr_image'] = image_list[Init_UAV_info['image_idx']]
64 |
65 | # start localization process
66 | Curr_UAV_info = Init_UAV_info
67 | while True:
68 | start_ts = time.time()
69 | Curr_UAV_info = UAV_loc(Curr_UAV_info)
70 | print("totally spent time: ", time.time() - start_ts)
71 | return 0
72 |
73 |
74 | if __name__ == "__main__":
75 | xy_cor_list = []
76 | xy_gps_list_opt = []
77 | xy_cor_list_opt = []
78 | xy_cor_list_gt = []
79 | loc_img_list = []
80 | main()
81 |
--------------------------------------------------------------------------------
/models/MODELS.md:
--------------------------------------------------------------------------------
1 | * path to save the pretrained network weights
--------------------------------------------------------------------------------
/scripts/SCRIPTS.md:
--------------------------------------------------------------------------------
1 | * essential scripts for network models
--------------------------------------------------------------------------------
/setup/environment.yml:
--------------------------------------------------------------------------------
1 | name: pytorch
2 | channels:
3 | - pytorch
4 | - conda-forge
5 | - defaults
6 | dependencies:
7 | - appdirs=1.4.4=pyhd3eb1b0_0
8 | - blas=1.0=mkl
9 | - blosc=1.21.3=h6c2663c_0
10 | - boost-cpp=1.74.0=h5b4e17d_6
11 | - brotli=1.0.9=h2bbff1b_7
12 | - brotli-bin=1.0.9=h2bbff1b_7
13 | - brotlipy=0.7.0=py310h2bbff1b_1002
14 | - bzip2=1.0.8=he774522_0
15 | - ca-certificates=2023.7.22=h56e8100_0
16 | - cairo=1.16.0=h63a05c6_1001
17 | - certifi=2023.7.22=pyhd8ed1ab_0
18 | - cffi=1.15.1=py310h2bbff1b_3
19 | - cfitsio=3.470=h2bbff1b_7
20 | - charset-normalizer=2.0.4=pyhd3eb1b0_0
21 | - contourpy=1.0.5=py310h59b6b97_0
22 | - cryptography=39.0.1=py310h21b164f_0
23 | - cudatoolkit=11.3.1=h59b6b97_2
24 | - cycler=0.11.0=pyhd3eb1b0_0
25 | - expat=2.5.0=h63175ca_1
26 | - faiss-gpu=1.7.4=h949689a_0
27 | - fontconfig=2.14.1=h9c4af85_2
28 | - fonttools=4.25.0=pyhd3eb1b0_0
29 | - freetype=2.12.1=ha860e81_0
30 | - freexl=1.0.6=ha8e266a_0
31 | - geos=3.8.0=h33f27b4_0
32 | - geotiff=1.7.0=h4545760_1
33 | - giflib=5.2.1=h8cc25b3_3
34 | - glib=2.69.1=h5dc1a3c_2
35 | - gst-plugins-base=1.18.5=h9e645db_0
36 | - gstreamer=1.18.5=hd78058f_0
37 | - hdf4=4.2.13=h712560f_2
38 | - hdf5=1.12.1=nompi_h2a0e4a3_100
39 | - icc_rt=2022.1.0=h6049295_2
40 | - icu=58.2=ha925a31_3
41 | - idna=3.4=py310haa95532_0
42 | - intel-openmp=2023.1.0=h59b6b97_46319
43 | - joblib=1.2.0=py310haa95532_0
44 | - jpeg=9e=h2bbff1b_1
45 | - kealib=1.5.0=hde4a422_1
46 | - kiwisolver=1.4.4=py310hd77b12b_0
47 | - krb5=1.20.1=h6609f42_0
48 | - lcms2=2.15=ha5c8aab_0
49 | - lerc=3.0=hd77b12b_0
50 | - libblas=3.9.0=1_h8933c1f_netlib
51 | - libbrotlicommon=1.0.9=h2bbff1b_7
52 | - libbrotlidec=1.0.9=h2bbff1b_7
53 | - libbrotlienc=1.0.9=h2bbff1b_7
54 | - libcblas=3.9.0=5_hd5c7e75_netlib
55 | - libclang13=14.0.6=default_h8e68704_1
56 | - libcurl=8.2.1=h86230a5_0
57 | - libdeflate=1.17=h2bbff1b_0
58 | - libexpat=2.5.0=h63175ca_1
59 | - libfaiss=1.7.4=cuda112h33bf9e0_0_cuda
60 | - libfaiss-avx2=1.7.4=cuda112h1234567_0_cuda
61 | - libffi=3.4.4=hd77b12b_0
62 | - libgdal=3.6.2=hd879e17_3
63 | - libiconv=1.16=h2bbff1b_2
64 | - libkml=1.3.0=h9859afa_1014
65 | - liblapack=3.9.0=5_hd5c7e75_netlib
66 | - libnetcdf=4.8.1=h6685c40_4
67 | - libogg=1.3.5=h2bbff1b_1
68 | - libpng=1.6.39=h8cc25b3_0
69 | - libpq=12.15=hb652d5d_1
70 | - libspatialite=4.3.0a=h6ec8781_23
71 | - libssh2=1.10.0=hcd4344a_2
72 | - libuv=1.44.2=h2bbff1b_0
73 | - libvorbis=1.3.7=he774522_0
74 | - libwebp=1.2.4=hbc33d0d_1
75 | - libwebp-base=1.2.4=h2bbff1b_1
76 | - libxml2=2.10.3=h0ad7f3c_0
77 | - libxslt=1.1.37=h2bbff1b_0
78 | - libzip=1.8.0=h49b8836_0
79 | - lz4-c=1.9.4=h2bbff1b_0
80 | - m2w64-gcc-libgfortran=5.3.0=6
81 | - m2w64-gcc-libs=5.3.0=7
82 | - m2w64-gcc-libs-core=5.3.0=7
83 | - m2w64-gmp=6.1.0=2
84 | - m2w64-libwinpthread-git=5.0.0.4634.697f757=2
85 | - matplotlib=3.7.1=py310haa95532_1
86 | - matplotlib-base=3.7.1=py310h4ed8f06_1
87 | - mkl=2023.1.0=h8bd8f75_46356
88 | - mkl-service=2.4.0=py310h2bbff1b_1
89 | - mkl_fft=1.3.6=py310h4ed8f06_1
90 | - mkl_random=1.2.2=py310h4ed8f06_1
91 | - msys2-conda-epoch=20160418=1
92 | - munkres=1.1.4=py_0
93 | - numpy=1.26.0=py310hf667824_0
94 | - openjpeg=2.4.0=h4fc8c34_0
95 | - openssl=1.1.1w=hcfcfb64_0
96 | - packaging=23.0=py310haa95532_0
97 | - pcre=8.45=hd77b12b_0
98 | - pcre2=10.42=h0ff8eda_0
99 | - pillow=9.4.0=py310hd77b12b_0
100 | - pip=23.1.2=py310haa95532_0
101 | - pixman=0.38.0=hfa6e2cd_1003
102 | - ply=3.11=py310haa95532_0
103 | - pooch=1.4.0=pyhd3eb1b0_0
104 | - poppler=22.12.0=h0bf3bde_2
105 | - poppler-data=0.4.12=hd8ed1ab_0
106 | - proj=6.2.1=h3758d61_0
107 | - pycparser=2.21=pyhd3eb1b0_0
108 | - pyopenssl=23.0.0=py310haa95532_0
109 | - pyparsing=3.0.9=py310haa95532_0
110 | - pyqt=5.15.7=py310hd77b12b_0
111 | - pyqt5-sip=12.11.0=py310hd77b12b_0
112 | - pysocks=1.7.1=py310haa95532_0
113 | - python=3.10.12=h966fe2a_0
114 | - python-dateutil=2.8.2=pyhd3eb1b0_0
115 | - python_abi=3.10=2_cp310
116 | - pytorch=1.12.1=py3.10_cuda11.3_cudnn8_0
117 | - pytorch-mutex=1.0=cuda
118 | - qhull=2020.2=h70d2c02_2
119 | - qt-main=5.15.2=h6072711_9
120 | - qt-webengine=5.15.9=hb9a9bb5_5
121 | - qtwebkit=5.212=h2bbfb41_5
122 | - scikit-learn=1.2.2=py310hd77b12b_1
123 | - scipy=1.10.1=py310h309d312_1
124 | - sip=6.6.2=py310hd77b12b_0
125 | - six=1.16.0=pyhd3eb1b0_1
126 | - sqlite=3.41.2=h2bbff1b_0
127 | - tbb=2021.8.0=h59b6b97_0
128 | - threadpoolctl=2.2.0=pyh0d69192_0
129 | - tiledb=2.3.3=h3649cd2_2
130 | - tk=8.6.12=h2bbff1b_0
131 | - toml=0.10.2=pyhd3eb1b0_0
132 | - torchaudio=0.12.1=py310_cu113
133 | - torchvision=0.13.1=py310_cu113
134 | - tornado=6.2=py310h2bbff1b_0
135 | - ucrt=10.0.22621.0=h57928b3_0
136 | - urllib3=1.26.16=py310haa95532_0
137 | - vc=14.2=h21ff451_1
138 | - vc14_runtime=14.36.32532=hfdfe4a8_17
139 | - vs2015_runtime=14.36.32532=h05e6639_17
140 | - wheel=0.38.4=py310haa95532_0
141 | - win_inet_pton=1.1.0=py310haa95532_0
142 | - xerces-c=3.2.4=h63175ca_3
143 | - xz=5.4.2=h8cc25b3_0
144 | - zlib=1.2.13=h8cc25b3_0
145 | - pip:
146 | - absl-py==1.4.0
147 | - aermanager==0.3.0
148 | - aiofiles==23.2.1
149 | - aiohttp==3.9.3
150 | - aiosignal==1.3.1
151 | - altair==5.2.0
152 | - annotated-types==0.6.0
153 | - ansi2html==1.8.0
154 | - antlr4-python3-runtime==4.13.1
155 | - anyio==4.2.0
156 | - apptools==5.2.1
157 | - argon2-cffi==23.1.0
158 | - argon2-cffi-bindings==21.2.0
159 | - arrow==1.3.0
160 | - asttokens==2.2.1
161 | - astunparse==1.6.3
162 | - async-lru==2.0.4
163 | - async-timeout==4.0.3
164 | - attrs==23.1.0
165 | - autograd==1.6.2
166 | - babel==2.14.0
167 | - backcall==0.2.0
168 | - beautifulsoup4==4.12.2
169 | - bleach==6.1.0
170 | - cachetools==5.3.3
171 | - chex==0.1.85
172 | - click==8.1.6
173 | - clu==0.0.11
174 | - colorama==0.4.6
175 | - comm==0.1.3
176 | - configargparse==1.7
177 | - configobj==5.0.8
178 | - contextlib2==21.6.0
179 | - dash==2.11.1
180 | - dash-core-components==2.0.0
181 | - dash-html-components==2.0.0
182 | - dash-table==5.0.0
183 | - dataclass-array==1.5.1
184 | - debugpy==1.6.7
185 | - decorator==5.1.1
186 | - defusedxml==0.7.1
187 | - deprecated==1.2.14
188 | - distinctipy==1.3.4
189 | - dm-tree==0.1.8
190 | - docstring-parser==0.15
191 | - dotmap==1.3.30
192 | - dv==1.0.12
193 | - einops==0.7.0
194 | - envisage==7.0.3
195 | - et-xmlfile==1.1.0
196 | - etils==1.7.0
197 | - exceptiongroup==1.2.0
198 | - executing==1.2.0
199 | - exifread==3.0.0
200 | - faiss-cpu==1.7.4
201 | - fast-pytorch-kmeans==0.2.0.1
202 | - fastapi==0.109.0
203 | - fastjsonschema==2.18.0
204 | - ffmpy==0.3.1
205 | - filelock==3.13.1
206 | - flask==2.2.5
207 | - flatbuffers==23.5.26
208 | - flax==0.8.1
209 | - fqdn==1.5.1
210 | - frozenlist==1.4.1
211 | - fsspec==2023.12.2
212 | - future==0.18.3
213 | - gast==0.5.4
214 | - gdal==3.4.3
215 | - google-auth==2.28.1
216 | - google-auth-oauthlib==1.2.0
217 | - google-pasta==0.2.0
218 | - googleapis-common-protos==1.62.0
219 | - googledrivedownloader==0.4
220 | - gradio==3.41.2
221 | - gradio-client==0.5.0
222 | - grpcio==1.62.0
223 | - h11==0.14.0
224 | - h5py==3.10.0
225 | - haversine==2.8.0
226 | - httpcore==1.0.2
227 | - httpx==0.26.0
228 | - huggingface-hub==0.20.2
229 | - imageio==2.31.1
230 | - imageio-ffmpeg==0.4.9
231 | - immutabledict==4.1.0
232 | - importlib-resources==6.1.1
233 | - ipykernel==6.25.0
234 | - ipython==8.14.0
235 | - ipywidgets==8.0.7
236 | - isoduration==20.11.0
237 | - itsdangerous==2.1.2
238 | - jax==0.4.25
239 | - jaxlib==0.4.25
240 | - jedi==0.18.2
241 | - jinja2==3.1.2
242 | - json5==0.9.14
243 | - jsonpointer==2.4
244 | - jsonschema==4.18.4
245 | - jsonschema-specifications==2023.7.1
246 | - jupyter==1.0.0
247 | - jupyter-client==8.3.0
248 | - jupyter-console==6.6.3
249 | - jupyter-core==5.3.1
250 | - jupyter-events==0.9.0
251 | - jupyter-lsp==2.2.1
252 | - jupyter-server==2.12.4
253 | - jupyter-server-terminals==0.5.1
254 | - jupyterlab==4.0.10
255 | - jupyterlab-pygments==0.3.0
256 | - jupyterlab-server==2.25.2
257 | - jupyterlab-widgets==3.0.8
258 | - keras==2.15.0
259 | - lark==1.1.9
260 | - lazy-loader==0.3
261 | - libclang==16.0.6
262 | - libtiff==0.4.2
263 | - lightning-utilities==0.10.1
264 | - lxml==4.9.3
265 | - lz4==4.3.3
266 | - mapbox-earcut==1.0.1
267 | - markdown==3.5.2
268 | - markdown-it-py==3.0.0
269 | - markupsafe==2.1.3
270 | - matplotlib-inline==0.1.6
271 | - mayavi==4.8.1
272 | - mdurl==0.1.2
273 | - mistune==3.0.2
274 | - ml-collections==0.1.1
275 | - ml-dtypes==0.2.0
276 | - msgpack==1.0.7
277 | - multidict==6.0.5
278 | - natsort==8.4.0
279 | - nbclient==0.9.0
280 | - nbconvert==7.14.1
281 | - nbformat==5.7.0
282 | - nest-asyncio==1.5.6
283 | - networkx==3.2.1
284 | - notebook==7.0.6
285 | - notebook-shim==0.2.3
286 | - oauthlib==3.2.2
287 | - onedrivedownloader==1.1.3
288 | - open3d==0.17.0
289 | - opencv-contrib-python==4.8.0.74
290 | - opencv-python==4.9.0.80
291 | - openpyxl==3.1.2
292 | - opt-einsum==3.3.0
293 | - optax==0.2.0.dev0
294 | - orbax-checkpoint==0.4.4
295 | - orjson==3.9.10
296 | - overrides==7.4.0
297 | - pandas==2.1.1
298 | - pandocfilters==1.5.0
299 | - parso==0.8.3
300 | - pickleshare==0.7.5
301 | - platformdirs==3.9.1
302 | - plotly==5.15.0
303 | - prettytable==3.10.0
304 | - prometheus-client==0.19.0
305 | - promise==2.3
306 | - prompt-toolkit==3.0.39
307 | - protobuf==3.20.3
308 | - psutil==5.9.5
309 | - pure-eval==0.2.2
310 | - pyasn1==0.5.1
311 | - pyasn1-modules==0.3.0
312 | - pydantic==2.5.3
313 | - pydantic-core==2.14.6
314 | - pydub==0.25.1
315 | - pyface==8.0.0
316 | - pygame==2.5.2
317 | - pygments==2.15.1
318 | - pykml==0.2.0
319 | - pymap3d==3.0.1
320 | - pynvml==11.5.0
321 | - pyproject-toml==0.0.10
322 | - pyshp==2.3.1
323 | - python-json-logger==2.0.7
324 | - python-multipart==0.0.6
325 | - pytorch-lightning==2.1.0
326 | - pytorch-metric-learning==2.4.1
327 | - pytz==2023.3.post1
328 | - pywin32==306
329 | - pywinpty==2.0.12
330 | - pyyaml==6.0.1
331 | - pyzmq==25.1.0
332 | - qtconsole==5.5.1
333 | - qtpy==2.4.1
334 | - referencing==0.30.0
335 | - requests==2.31.0
336 | - requests-oauthlib==1.3.1
337 | - retrying==1.3.4
338 | - rfc3339-validator==0.1.4
339 | - rfc3986-validator==0.1.1
340 | - rich==13.7.0
341 | - rpds-py==0.9.2
342 | - rsa==4.9
343 | - safetensors==0.4.2
344 | - scenic==0.0.1
345 | - scikit-image==0.22.0
346 | - semantic-version==2.10.0
347 | - send2trash==1.8.2
348 | - setuptools==68.2.2
349 | - shapely==1.8.5.post1
350 | - shellingham==1.5.4
351 | - shtab==1.7.0
352 | - sniffio==1.3.0
353 | - soupsieve==2.5
354 | - stack-data==0.6.2
355 | - starlette==0.35.1
356 | - tenacity==8.2.2
357 | - tensorboard==2.15.2
358 | - tensorboard-data-server==0.7.2
359 | - tensorboardx==2.6.2.2
360 | - tensorflow==2.15.0
361 | - tensorflow-addons==0.22.0
362 | - tensorflow-datasets==4.9.4
363 | - tensorflow-estimator==2.15.0
364 | - tensorflow-intel==2.15.0
365 | - tensorflow-io-gcs-filesystem==0.31.0
366 | - tensorflow-metadata==1.14.0
367 | - tensorstore==0.1.45
368 | - termcolor==2.4.0
369 | - terminado==0.18.0
370 | - tf==1.0.0
371 | - tifffile==2023.9.26
372 | - timm==0.9.16
373 | - tinycss2==1.2.1
374 | - tomli==2.0.1
375 | - tomlkit==0.12.0
376 | - toolz==0.12.0
377 | - torchcam==0.3.2
378 | - torchgeometry==0.1.2
379 | - torchmetrics==1.3.1
380 | - tqdm==4.65.0
381 | - traitlets==5.9.0
382 | - traits==6.4.1
383 | - traitsui==8.0.0
384 | - transformations==2022.9.26
385 | - typeguard==2.13.3
386 | - typer==0.9.0
387 | - types-python-dateutil==2.8.19.20240106
388 | - typing-extensions==4.9.0
389 | - tyro==0.7.3
390 | - tzdata==2023.3
391 | - uri-template==1.3.0
392 | - uvicorn==0.25.0
393 | - vtk==9.2.6
394 | - wcwidth==0.2.6
395 | - webcolors==1.13
396 | - webencodings==0.5.1
397 | - websocket-client==1.7.0
398 | - websockets==11.0.3
399 | - werkzeug==2.2.3
400 | - widgetsnbextension==4.0.8
401 | - wrapt==1.14.1
402 | - yarl==1.9.4
403 | - zipp==3.17.0
404 | - zstd==1.5.5.1
405 | prefix: D:\miniconda\envs\pytorch
406 |
--------------------------------------------------------------------------------
/utility/config.py:
--------------------------------------------------------------------------------
1 | # 测试的数据集
2 | test_dataset = "Gravel_Pit"
3 |
4 | # general parameters
5 | tol = 1e-3
6 | max_itr = 10
7 | lam1 = 1
8 | lam2 = 0.01
9 | scaling_for_disp = 1
10 | max_itr_dlk = 150
11 |
12 | if test_dataset == "haidian_airport":
13 | image_dir = "./haidian_airport/camera1/" # TODO: the directory of the captured frames
14 | image_dir_ext = "*.png"
15 | satellite_map_name = 'haidian_airport'
16 | heading_dct = 'east'
17 | map_width = 4870
18 | map_height = 2910
19 | map_loc = "./haidian_airport/map_airport.tif"
20 | model_path = "./models/best_dlk_model_res18_new.pth"
21 | opt_param_save_loc = "../haidian_airport/test_out.mat"
22 | image_idx = 30
23 | interval = 5
24 |
25 | img_height_opt_net = 100
26 | img_height_rel_pose = 600
27 | map_resolution = 0.465
28 | scale_img_to_map = map_height / img_height_rel_pose
29 |
30 | init_x = 3780 # TODO: initial x coordinate in image plane
31 | init_y = 1800 # TODO: initial y coordinate in image plane
32 | init_scale = 1 / 6 # TODO: initial scale
33 | init_angle = 0 # TODO: initial angle
34 |
35 | Map_GPS_1 = [116.116820683836, 40.0856287594884]
36 | Map_GPS_2 = [116.10104906676413, 40.0652127940419]
37 |
38 |
39 | elif test_dataset == "village":
40 | # Village Dataset
41 | image_dir = "./village/frames_with_geotag_1/"
42 | image_dir_ext = "*.JPG"
43 | satellite_map_name = 'village'
44 | map_loc = "./village/map_village.jpg"
45 | heading_dct = 'north'
46 | map_width = 4800
47 | map_height = 2861
48 |
49 | model_path = "./models/best_dlk_model_raw.pth"
50 | img_height_opt_net = 100
51 | img_height_rel_pose = 600
52 | opt_param_save_loc = "./village/test_out.mat"
53 | map_resolution = 0.45
54 | scale_img_to_map = map_height / img_height_rel_pose
55 | image_idx = 0
56 | interval = 1
57 |
58 | init_x = 2837
59 | init_y = 841
60 | init_scale = 1 / 6
61 | init_angle = - 135
62 |
63 | Map_GPS_1 = [8.39368611111111, 47.0705666666667]
64 | Map_GPS_2 = [8.42165833333333, 47.0591972222222]
65 |
66 | elif test_dataset == "Gravel_Pit":
67 | # Gravel-Pit Dataset
68 | image_dir = "./gravel_pit/frames_with_geotag/"
69 | image_dir_ext = "*.JPG"
70 | satellite_map_name = 'gravel-pit'
71 | map_loc = "./gravel_pit/map_gravel_pit.jpg"
72 | heading_dct = 'north'
73 | map_width = 3355
74 | map_height = 1852
75 |
76 | model_path = "./models/best_dlk_model_res18_new.pth"
77 | img_height_opt_net = 100
78 | img_height_rel_pose = 800
79 | opt_param_save_loc = "../gravel_pit/test_out.mat"
80 | map_resolution = 0.32
81 | scale_img_to_map = map_height / img_height_rel_pose
82 | image_idx = 0
83 | interval = 1
84 |
85 | init_x = 2500
86 | init_y = 1050
87 | init_scale = 1 / 4.3
88 | init_angle = -70
89 |
90 | Map_GPS_1 = [7.90523333333333, 47.1148611111111]
91 | Map_GPS_2 = [7.91988055555556, 47.1093700000000]
92 |
93 | else:
94 | raise NameError('Can\'t the dataset')
95 |
--------------------------------------------------------------------------------