Home

Awesome

TB-Places

TB-Places is a data set of garden images for testing algorithms for visual place recognition. It contains images with ground truth camera pose recorded in two real gardens at different times, with a total of four different recording sessions, with varying light conditions. We also provide ground truth for all possible pairs of images, indicating whether they depict the same place or not.

The poses of the images are included in the [datasetname].json files (i.e. W17.json), and come in the format of a 7 feature vector (t_x, t_y, t_z, q_x, q_y, q_z, q_w), with t corresponding to the translation vector and q to the rotation expressed in form of a quaternion.

Here is an example on how to load the poses:

import json
import numpy as np

with open("W17.json", "r") as f:
    data = json.load(f)
im_paths = data["im_paths"] #list of image paths, length = n
poses = np.array(data["poses"]) #pose matrix of shape = (n, 7)

The similarity matrix is provided with the [datasetname]_similarity.h5 files (i.e. W17_similarity.h5). It consists of a condensed binary similarity matrix in a vector form (see here), where 0 values indicate dissimiliar image pairs and 1 indicate similar scenes.

Here is an example on how to load a similarity matrix:

import h5py
from scipy.spatial.distance import squareform

with h5py.File("W17_similarity.h5", "r") as f:
    gt_labels = f["sim"][:].flatten() #similarity labels in condensed form (shape=(1,n * (n-1) / 2))
    gt_labels = squareform(gt_labels) #similarity labels in matrix form (shape=(n, n))

GardenSet# imgs# similar pairs% similar pairs
WageningenW16 407525.12M0.6168
WageningenW1710948330K0.5441
RenningenR177999150K0.4822
WageningenW18230431.03M0.4822

W16, W17 and W18 are available for dowload here.

Test scripts

We also provide some scripts to evaluate proposed models. The usage is as follows:

python3 test.py idx_file weights_file feature_length output_file
python3 evaluate.py similarity_file features_file

For instance:

python3 test.py W17.json weights/densenet161_w17.pth 2208 features/densenet161_w17.npy
python3 evaluate.py W17_similarity.h5 features/densenet161_w17.npy

Please cite the following IEEE Access or Computer Analysis of Images and Patterns papers if you use the data.

 @article{leyvavallina2019tbplaces,
 title={TB-Places: A Data Set for Visual Place Recognition in Garden Environments}, 
 author={Leyva-Vallina, Maria and Strisciuglio, Nicola and López Antequera, Manuel and Tylecek, Radim and Blaich, Michael and Petkov, Nicolai}, 
   journal={IEEE Access}, 
   year={2019},
   publisher={IEEE}
 }
 
 @inproceedings{leyvavallina2019place,
  title={Place recognition in gardens by learning visual representations: data set and benchmark analysis},
  author={Leyva-Vallina, Mar{\'\i}a and Strisciuglio, Nicola and Petkov, Nicolai},
  booktitle={International Conference on Computer Analysis of Images and Patterns},
  pages={324--335},
  year={2019},
  organization={Springer}
}