Giter VIP home page Giter VIP logo

crossloc-benchmark-datasets's Introduction

CrossLoc Benchmark Datasets Setup

This repository contains CrossLoc Benchmark Datasets setup and splitting scripts. Please make sure you have access to the CrossLoc Benchmark Raw Datasets before proceeding. The raw datasets could be found as follows:

We present the Urbanscape and Naturescape datasets, each consiting of multi-modal synthetic data and real images with accurate geo-tags captured by drone. See below for a preview!

Ideally, you may want to use this repository as the starting template of your own project, as the python dependency, dataset and basic dataloader have already been developed.

Happy coding! :)

  • 3D textured models used to render the benchmark datasets. The dots and boxes denote the camera position distribution. Please check the paper for details!

The CrossLoc Benchmark datasets are officially presented in the paper accepted to CVPR 2022
CrossLoc: Scalable Aerial Localization Assisted by Multimodal Synthetic Data
Qi Yan, Jianhao Zheng, Simon Reding, Shanci Li, Iordan Doytchinov
École Polytechnique Fédérale de Lausanne (EPFL)
Links: website | arXiv | code repos | datasets

Install dependencies

  • If conda environment is available:
conda env create -f setup/environment.yml
conda activate crossloc
  • Otherwise, if conda environment is not readily available:
python3 -m venv venvcrossloc
source venvcrossloc/bin/activate
pip3 install pip -U && pip3 install -r setup/requirements.txt

open3d==0.9.0 may raise an error at some environment. You may remove the version limit to proceed.

Setup datasets

  • Setup datasets: we adopt some DSAC* resources and keep its dataset convention.
cd datasets
echo $DATA_DIR # point to the CrossLoc Benchmark Raw Datasets

export OUT_DIR=$(pwd)/urbanscape
python setup_urbanscape.py --dataset_dir $DATA_DIR/urbanscape --output_dir $OUT_DIR

export OUT_DIR=$(pwd)/naturescape
python setup_naturescape.py --dataset_dir $DATA_DIR/naturescape --output_dir $OUT_DIR

Please note that all RGB images are linked to the DATA_DIR directory using symbolic link.

  • When you have the raw dataset locally preserved, please don't move it elsewhere after setting up. Otherwise, the symbolic links to raw RGB images don't work.
  • Use --ignore_3d_label flag to omit 3D label generation such as coordinate, depth and normal, i.e., python setup_urbanscape.py --dataset_dir $DATA_DIR --output_dir $OUT_DIR --ignore_3d_label. In this case, only lightweight calibration, poses, rgb, and semantics folders will be generated (see next section for what they exactly mean).

Dataset structure

After setting up the dataset successfully, you would see such directory structure:

├── test_drone_real               # drone-trajectory **in-place** real data, for testing
│   ├── calibration                 # focal length
│   ├── depth                       # (possibly) down-sampled z-buffer depth
│   ├── init                        # (possibly) down-sampled scene coordiante
│   ├── normal                      # (possibly) down-sampled surface normal
│   ├── poses                       # 4x4 homogeneous cam-to-world transformation matrix
│   ├── rgb                         # RGB image (symbolic link)
│   └── semantics                   # (possibly) full-size semantics map
├── test_drone_sim                # drone-trajectory **in-place** equivalent synthetic data, for testing
├── test_oop_drone_real           # drone-trajectory **out-of-place** real data, for testing
├── test_oop_drone_sim            # drone-trajectory **out-of-place** equivalent synthetic data, for testing
├── train_drone_real              # drone-trajectory **in-place** real data, for training
├── train_drone_sim               # drone-trajectory **in-place** equivalent synthetic data, for training
├── train_oop_drone_real          # drone-trajectory **out-of-place** real data, for training
├── train_oop_drone_sim           # drone-trajectory **out-of-place** equivalent synthetic data, for training
├── train_sim                     # LHS synthetic data, for training
├── train_sim_plus_drone_sim      # combination of LHS and drone-trajectory **in-place** synthetic data, for training
├── train_sim_plus_oop_drone_sim  # combination of LHS and drone-trajectory **out-of-place** synthetic data, for training
├── val_drone_real                # drone-trajectory **in-place** real data, for validation
├── val_drone_sim                 # drone-trajectory **in-place** equivalent synthetic data, for validation
├── val_oop_drone_real            # drone-trajectory **out-of-place** real data, for validation
├── val_oop_drone_sim             # drone-trajectory **out-of-place** equivalent synthetic data, for validation
└── val_sim                       # LHS synthetic data, for validation

All directories have the same sub-folders (calibration, depth, init and others). To make the folder tree concise, only the sub-folders in the very first directory test_drone_sim is shown.

Dataset statistics

Raw data statistics

Dataset splits

We randomly split the In-place and Out-of-place scene data into training (40%), validation (10%) and testing (50%) sections. As for the LHS-sim scene data, it is split into training (90%) and validation (10%) sets. We intentionally formulate a challenging visual localization task by using more real data for testing than for training to better study the real data scarcity mitigation.

Getting started

See dataset_rollout.ipynb to have a preview on the dataset!

See dataset_statistics.ipynb to compute some statistics of the dataset.

Citation

If you find our code useful for your research, please cite the paper:

@article{yan2021crossloc,
  title={CrossLoc: Scalable Aerial Localization Assisted by Multimodal Synthetic Data},
  author={Yan, Qi and Zheng, Jianhao and Reding, Simon and Li, Shanci and Doytchinov, Iordan},
  journal={arXiv preprint arXiv:2112.09081},
  year={2021}
}
@misc{iordan2022crossloc, 
	title={CrossLoc Benchmark Datasets}, 
	author={Doytchinov, Iordan and Yan, Qi and Zheng, Jianhao and Reding, Simon and Li, Shanci}, 
	publisher={Dryad}, 
	doi={10.5061/DRYAD.MGQNK991C}, 
	url={http://datadryad.org/stash/dataset/doi:10.5061/dryad.mgqnk991c},
	year={2022}
}

crossloc-benchmark-datasets's People

Contributors

qiyan98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

shanci-li

crossloc-benchmark-datasets's Issues

About Pose Matrix (extrinsic camera matrix) Caculation

Hi,

I noticed that when converting rotation matrices, it is necessary to use the rotation in the END (East-North-Down) coordinate system in the ECEF (Earth-Centered, Earth-Fixed) coordinate system as a bridge for the conversion. I would like to ask, how should I perform the conversion if my current model is in the EPSG:32632 coordinate system? The reference links you provided are no longer accessible (https://www.fossen.biz/wiley/ed2/Ch2.pdf).

I would greatly appreciate it if you could reply to me.

Best regards
VictorZoo

Some question about the pre-computed camera coordinate files (/eye/)

Hi Qi,
Sorry to bother you again. I noticed that there are 2 modes to estimate camera pose (RGB and RGB-D) shown in dataloader.py. And I found that the RGB-D mode needs the pre-computed camera coordinate files (/eye/) which is not provided in datasets. I also read the codes of DSAC* and found it offers an implement to get the pre-computed camera coordinate files from depth maps and RGB images. However, it seems that it can't be directly apply to your dataset. Do you have any idea to generate the pre-computed camera coordinate files?
Besides, do you use wechat? If possible, I would like to add a wechat friend with you to facilitate subsequent communication. Thanks a lot!

Best wishes,
Tu

About the Ground-truth Poses for UAV real images.

Hi Yan Qi,

I noticed that in CrossLoc-Benchmark-Datasets, you provided "xxx_poses.npy", for example, "urbanscape-2020-11-11-planned_poses.npy", as poses file.

  1. Is that the Ground-Truth (GT) poses for real images?
  2. As I considered, GT poses is the RTK poses? Directly from the DJI Phantom 4?
  3. Why not using the photogrammetry results as GT? Cause I noticed that there are differences between real images and synthetic images.

Thank you very much.

Victor

About the depth label of real images

Hi Yan Qi,

Thanks for your outstanding work. I wonder that how did you get the depth label of real images and how accurate they are. Could you please tell me the general process? Looking forward to your reply.

Yours sincerely,
Tu.

Something wrong when set up the naturescape dataset

Hi,

Thanks for the dataset, I'm very interested in your outstanding work!!!
However, when I set up the naturescape dataset following your instructions, the program produced the following error:
image
Looking forward to your reply.

Intrinsic and extrinsic parameters of the UAV

Hi Yan Qi,

I have some questions to ask as we are interested in rendering images on our own models, so we are particularly concerned about the intrinsic and extrinsic parameters of the UAV.

  1. May I know the model of the UAV? DJI 100?
  2. I noticed that in the urban data, there is an origin set at [6.5668, 46.5191, 390]. Is the value of z=390 a self-defined value or does it represent the ground elevation?
  3. Since we are dealing with precise rendering, could you please provide the relative altitude at which the UAV captures images? Is it around 100m or 200m?
  4. It would be great if the 3D models could be made publicly available.

Thank you very much.

Victor

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.