###########################################################################
#               THE BAIDU IMAGE-BASED LOCALIZATION DATASET                #
#   Xun Sun*, Yuanfan Xie* (joint first author), Pei Luo and Liang Wang   #
#                  Baidu Autonomous Driving Business Unit                 #
#               Baidu Research - Institute of Deep Learning               #
###########################################################################

Welcome to use Baidu image-based localization dataset! The dataset consists of 689 database images for training and 2292 query images for testing. The database images are structurally captured by professionals using DSLR cameras, and the query images are taken by amateurs with different cell phones. The LiDAR point cloud and all the ground truth camera poses (registered in the LiDAR coordinate system) are provided to quantitativly evaluate the performance of various visual localization algorithms. Hopefully, this dataset could foster future research in the field of image-based place recognition and localization.

File description:
=================

1. The folder 'query_images_undistort' contains the cell phone query images. The corresponding ground truth camera poses can be found in the folder 'query_gt'. For example, for the query data 'cdm_20150523_101338.jpg', its ground truth camera pose is named as 'cdm_20150523_101338.camera' in query_gt. 
Similarly, the folders 'training_images_undistort' and 'training_gt' contain the database images and corresponding camera poses, respectively. Note that both database and query images are undistorted.

2. The point cloud data is provided as 'mall.pcd'. This point cloud is merged from multiple scans and a de-noising pre-processing step has been performed.

Data format:
=================

The camera poses are saved in the following format:

fx 0 cx
0 fy cy
0 0 1
0 0 0
R'
cop
w h

where the first three rows form the 3-by-3 camera matrix K. R and cop (center-of-projection) define the camera pose. If the coordinates of a point P defined in the camera coordinate system is Xc, applying the transformation R * Xc + cop' yields the coordinates of P defined in the point cloud coordinate system.
In the last row, the w and h refer to the image width and height.

The point cloud 'mall.pcd' can be readily loaded using the public available PCL library(http://www.pointclouds.org/). 

We will be happy if you cite us when using our dataset:
@InProceedings{Sun_2017_CVPR,
author = {Sun, Xun and Xie, Yuanfan and Luo, Pei and Wang, Liang},
title = {A Dataset for Benchmarking Image-Based Localization},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {July},
year = {2017}
}