Place recognition in gardens by learning visual representations: data set and benchmark analysis

06/28/2019 ∙ by Maria Leyva-Vallina, et al. ∙ University of Groningen 2

Visual place recognition is an important component of systems for camera localization and loop closure detection. It concerns the recognition of a previously visited place based on visual cues only. Although it is a widely studied problem for indoor and urban environments, the recent use of robots for automation of agricultural and gardening tasks has created new problems, due to the challenging appearance of garden-like environments. Garden scenes predominantly contain green colors, as well as repetitive patterns and textures. The lack of available data recorded in gardens and natural environments makes the improvement of visual localization algorithms difficult. In this paper we propose an extended version of the TB-Places data set, which is designed for testing algorithms for visual place recognition. It contains images with ground truth camera pose recorded in real gardens in different seasons, with varying light conditions. We constructed and released a ground truth for all possible pairs of images, indicating whether they depict the same place or not. We present the results of a benchmark analysis of methods based on convolutional neural networks for holistic image description and place recognition. We train existing networks (i.e. ResNet, DenseNet and VGG NetVLAD) as backbone of a two-way architecture with a contrastive loss function. The results that we obtained demonstrate that learning garden-tailored representations contribute to an improvement of performance, although the generalization capabilities are limited.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 3

page 5

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Visual place recognition is a widely studied problem in Computer Vision and concerns the recognition of a previously seen scene based on the analysis of visual features only 

[11, 12]. The problem gained great interest among researchers in the fields of robotics and computer vision due to its applications to autonomous driving [13], robot navigation [4, 14, 6, 22, 11]

, camera localization based on image retrieval 

[16] and loop-closure detection [23]

. It is a key component for visual localization based on image retrieval algorithms. Given a query image, a reference image with known camera pose that depicts the same place has to be retrieved from a database. Subsequently, the relative pose between query and reference image can be calculated, and the camera pose in the reference system corresponding to the query image can be estimated. In this work, treat place recognition as distinguishing between pairs of similar and dissimilar images.

Visual place recognition algorithms face challenges when appearance changes occur due to variations of illumination, weather, season, camera viewpoint or when repetitive textures are present [24]. However, depending on the particular environments where place recognition algorithms are applied, the specific problem and challenges can vary. For instance, in outdoor environments, large changes in illumination (day and night) [17, 14] and weather conditions (sun and rain) [22] are often present. In addition, urban scenes are subject to partial or total occlusions due to obstacles (i.e. vehicles or pedestrians), while countryside environments are affected by seasonal changes [3, 22].

Holistic image descriptors were proposed to face these challenges, such as SeqSLAM [14, 22] and NetVLAD [1]. The former performs place recognition by matching sequences of images, while the latter is a CNN-based method that employs a new orderless pooling VLAD layer, trained with weakly-labeled image triplets (one reference, a set of positive matches, and a set of negative matches). Outdoor environments are usually large, therefore high spatial precision for recognition or localization is not required. In contrast, indoor environments are typically smaller, and a more accurate localization is necessary. In addition, indoor place recognition methods are required to be able to recognize a scene even under substantial viewpoint variations, and are usually faced with repetitive patterns [18]. Algorithms based on local features like FAB-MAP have been successfully implemented for visual localization in indoor environments [4] [5].

With the raise of interest in gardening and agricultural robotics [2, 15, 25, 21], new challenges and problems have become relevant for place recognition algorithms. Gardens are affected by illumination and seasonal changes, and localization algorithms are required to also be robust to viewpoint variations, while faced with very similar and repetitive textures. Moreover, gardens have a lot of internal similarity, i.e. a bush can look similar to all the other bushes in the garden. Thus, for a localization algorithm to be successful, it is required to capture and describe the relevant parts of the scene and their relative arrangement, while ignoring irrelevant elements (i.e. the common background).

In [10], we released the first version of the TB-Places data set for bechmarking the performance of existing algorithms in garden environments, and recorded low recognition results. Existing algorithms and CNN-based models for place recognition are not robust to the challenges provided by garden-like environments. Thus, more data and garden-specialized place recognition methods are needed to advance the state-of-the-art of computer vision applied to gardening and agricultural robotics.

In this paper, we propose an extended version of the TB-Places data set, with more than 23K new images. We learn garden-specific feature descriptors by training several models of deep Convolutional Neural Networks as backbone for a siamese architecture with a contrastive loss function. We carried out experiments with ResNet [7], DenseNet [8] and a VGG [19] pre-trained with a VLAD [1] layer as backbone for the place recognition architecture. The results that we obtained demonstrate that learning garden-specific representations contributes better recognition, but the generalization capabilities are still limited.

The paper is structured as follows. We introduce the extended version of the TB-Places data set in Section 2. In Section 3, we explain the network architecture that we employ to compute the image descriptors and the training procedure, while in Section 4 we present and compare the results that we achieved. Finally, we draw conclusions in Section 5.

2 Data set

(a)
(b)
Figure 1: (a) Robot platform in the Wageningen garden of TrimBot2020 project. (b) Camera rig employed for the recording sessions.

We propose an extended version of the TB-Places data set [10], which consists of images recorded in the test gardens of the TrimBot2020 project [21]. The gardens are located at the campus of the Wageningen University and Research (Netherlands) and at the Bosch Research Center in Renningen (Germany). The original TB-Places data set is composed of three sub sets, corresponding to two recording sessions that took place in Wageningen in 2016 and 2017 (W16 and W17), and one recording session in the garden in Renningen in 2017 (R17). The data was recorded using a modified Bosch Indego lawn mower robot, with a camera rig with 5 pairs of stereo cameras, which have field of view (see Fig. 1). The cameras in the rig are synchronized by means of an FPGA and record pictures at a resolution of pixels [21]. Each image has an associated ground truth camera pose in the garden reference system, recorded with a TopCon laser tracker and an inertial measurement unit (IMU). Additionally, we constructed a place recognition ground truth, labelling all the possible pairs of images indicating whether they depict similar or dissimilar scenes. For details about the labelling process, we refer the reader to [10].

Garden Set # imgs # similar pairs % similar pairs
Wageningen W16 40752 5.12M 0.6168
Wageningen W17 10948 330K 0.5441
Wageningen W18 23043 1.03M 0.3877
Renningen R17 7999 150K 0.4822
Table 1: Details on the composition of the extended TB-Places data set with the new W18 set of images. We report, for each subset, the number of image pairs labelled as similar and their percentage among all the possible image pairs.
(a)
(b)
Figure 2: Top-view of the trajectories followed by the robot during the recording sessions in the Wageningen garden in (a) 2018 (W18) and (b) 2017 (W17).

We expanded the TB-Places data set with a new subset of 23K images (which we name W18), corresponding to a new recording session that took place in the garden in Wageningen during the summer of 2018. In Table 1, we report details on the composition of the data set. For the recording of the new set of images, the camera lenses where setup with an exposure value that allows to capture clearer details in the lower part of the image (i.e. closer objects and possible reference points) rather than in the upper part of the image (mostly sky). This provides visual localization algorithms with landmarks of finer quality for more precise camera pose estimation. The W18 set consists of 16 sequences, the trajectories of which are shown in Fig. 2a. As displayed in Fig. 2a and Fig. 2b, W18 data set covers parts of the environment that are not recorded in W17. Similarly to the rest of the data set, these additional images are provided with an associated camera pose in the garden reference system and a pair-wise similarity ground truth, which we constructed with the method proposed in [10]. Some examples of images in the W18 set are included in Fig. 3.

Figure 3: Examples of TB-Places W18 data set. The left column shows reference images, while the center shows positive matches (green squares), and the right column shows negative matches (dashed red squares).

3 Evaluation

For the experiments, we used the W17 set as training set and the W18 set as test set. This setting allows to evaluate the robustness of image descriptors for place recognition against seasonal changes of the garden, color variations, as well as generalization to parts of the garden that are not seen during training.

We carried out experiments to evaluate the performance of state-of-the-art holistic image descriptors that we took as the baseline, and show that garden-specific descriptors can be developed by learning suitable representations using the garden images contained in the TB-Places data set. In the rest of the section, we provide details about the employed baseline descriptors and the learning process that we implemented.

3.1 Performance measures

We evaluated the performance of the considered descriptors (see Section 3.2 for details) by computing the precision (P), recall (R) and -score for the classification of pairs of images as depicting similar or dissimilar places:

where TP stands for true positives, TN is true negatives and FN means false negatives. A positive sample corresponds to a pair of images depicting the same scene. We present the results that we achieved in the form of a precision-recall curve, that we constructed by varying a threshold on the Euclidean distance of the computed image descriptors. All pairs with distance lower or equal to

are classified as similar (positive).

Moreover, as an overall performance measure, we compute the Average Precision (AP), defined as:

3.2 Baseline

We selected three state-of-the-art holistic image descriptors as the baseline descriptors for evaluation of place recognition performance on the extended TB-Places data set. We considered the representation computed at the last layer of the ResNet-152 [7], DenseNet-161 [8] and NetVLAD [1]

architectures. For NetVLAD, we also evaluated the feature vectors computed at two intermediate layers, namely relu5_2 and pool5. In the case of ResNet and DenseNet, the baseline models were trained on ImageNet [6], while the baseline NetVLAD model was trained on the Pittsburg30k data set 

[24]. When the output descriptor is three dimensional, we apply a AvgPool operation, which outputs the average of the activation of each kernel, and a MaxPool, which computes the maximum. In Table 2 we report further details about the dimensionality of the considered image descriptors.

Model Layer Feature Pooling Descriptor size
NetVLAD VLAD - 4096
AvgPool - (512x7x7)=25088
MaxPool 512
AvgPool 512
relu5_2 - (512x7x10)=35840
MaxPool 512
AvgPool 512
pool5 - (512x7x10)=35840
MaxPool 512
AvgPool 512
ResNet AvgPool - 2048
DenseNet norm5 - (2208x7x11)=170016
MaxPool 2208
AvgPool 2208
Table 2: Details on the descriptors that we considered in the benchmark analysis.

3.3 Learning garden-specific representations

We employed a siamese CNN architecture where two backbone networks that share their weights to compute the descriptors of two input images (see Fig. 4). During training, the weights of the networks are updated so as to optimize a Contrastive Loss function that compares the computed descriptors, and . As initial conditions for the learning process, we selected the ResNet and DenseNet models pre-trained on ImageNet, which we consider good initialization for place recognition, and NetVLAD, which is pre-trained on the Pittsburgh30k data set. We learn garden-specific representations by training the considered models with images of the TB-Places data set.

For all models, we evaluate the descriptor that we compute by means of a global AvgPool layer that we add in the end of the network. We use these descriptors to optimize a Contrastive Loss function , formally defined as:

where is the Euclidean distance between the feature vectors and ,

is the ground truth label (0: dissimilar, 1: similar). The hyperparameter

is the loss margin, i.e. a threshold value of the descriptor distance above which a pair of images is not considered as depicting the same place. We set as the value of the threshold that contributes to the highest -score on the training set (W17). The selected values are reported in Table 3.

We trained the considered models, for 15 epochs, using the 10K images included in the W17 set, which contain 330K image pairs with positive class label. We set the batch size equal to 16 pairs and included in each training epoch the 330k positive pairs and an equal number of negative pairs, in order to avoid class unbalance while training. The total amount of training iterations is thus approximately 620k. We trained with Stochastic Gradient Descent, with one initial learning rate of 0.01, that was decreased by

every 5 epochs.

As stated in [1], fine-tuning all the convolutional kernels in a CNN is not necessary to learn effective descriptors for visual place recognition. Early layers of a CNN, indeed, learn low level visual features (i.e. gabor-like filters) [9], while upper deeper learn to detect more complex, task-specific features. We thus train the parameters of layers deeper layers, which compute semantically rich features. In particular, for the ResNet-152 and DenseNet-161 backbone CNNs, we train the last residual block (block5), and for the VGG network of NetVLAD, we trained the last convolutional block (conv5). This choice allows to learn the value of a reduced set of parameters, i.e. only those of the deeper convolutional layers, simplifying the optimization problem and reducing the training time.

Figure 4: Sketch of the employed architecture for learning garden-specific descriptors for place recognition. We feed a pair of images to a siamese CNN architecture and compute their representation with a Global Average Pool layer. The training is guided by optimizing a contrastive loss function .
Model Feature length
NetVLAD AvgPool + Global MaxPool 512 7.5
ResNet152 AvgPool 2048 12.7
DenseNet norm5 + Global AvgPool 2208 69.278
Table 3: Details on the trained models. The second column displays the number of features of the learned holistic descriptors. The selected values correspond to the threshold that produces the best -score in the training set.

4 Results and discussion

Descriptor Baseline Trained
W17 W18 W17 (train) W18 (test)
NetVLAD VLAD 0.1470 0.1383 - -
NetVLAD AvgPool 0.1438 0.1018 0.4627 0.1921
NetVLAD AvgPool + Global AvgPool 0.1610 0.1264 0.7016 0.1230
NetVLAD AvgPool + Global MaxPool 0.1215 0.0844 0.4273 0.0893
NetVLAD relu5_2 0.1185 0.0812 0.4256 0.1470
NetVLAD relu5_2 + Global AvgPool 0.1671 0.1330 0.6978 0.1252
NetVLAD relu5_2 + Global MaxPool 0.1241 0.0894 0.4052 0.0879
NetVLAD pool5 0.1169 0.0899 0.4087 0.0996
NetVLAD pool5 + Global AvgPool 0.1590 0.1301 0.6749 0.1655
NetVLAD pool5 + Global MaxPool 0.1323 0.0972 0.4230 0.1011
ResNet152 AvgPool 0.0991 0.0891 0.6616 0.1605
DenseNet norm5 + Global AvgPool 0.1288 0.1078 0.7055 0.2339
DenseNet norm5 + Global MaxPool 0.1040 0.0724 0.6591 0.2318
Table 4: Achieved performance (Average Precision) in W17 and W18 data sets before (Baseline) and after training the models.
(a)
(b)
Figure 5: Precision-recall curves achieved on train (W17) and test (W18) by the considered descriptors (a) before and (b) after training the models.
Figure 6: Train and test performance vs training epoch. The bullet indicates the best test AP achieved by each method, corresponding to epoch 6 for DenseNet, epoch 0 for NetVLAD VGG, and epoch 1 for ResNet.

In Table 4, we report the results that we achieved using the baseline descriptors and the ones that we learned from the images of the TB-Places data set. The highest value of the AP is obtained by NetVLAD both on the training set (W17) and on the test set (W18). More specifically, the descriptor computed with global average pooling on the relu5_2 layer of NetVLAD achieved the best performance results (AP=0.1671) on the W17 set. On the W18 set, instead, the highest AP value (AP=0.1383) was obtained by using as image descriptor the output of the VLAD layer of NetVLAD. After training the models using the siamese architecture described in Section 3, we observed an overall improvement of results as the networks are able to learn garden-specific features that contribute to improve the place recognition performance. The model that best performs after training is DenseNet, which achieves AP values of 0.7055 and 0.2339 on the train set (W17) and (W18) test set, respectively. In Fig. 5a and 5b, we show the Precision-Recall curves before and after training, respectively. All models improve their performance on the train and test set. The best results were obtained by DenseNet.

We observed that, although training the considered networks on the garden images contained in the TB-places data set contributes to improve place recognition results, the resulting models suffer from a certain degree of specialization. In Fig. 6, we show a plot that illustrate the effect of the training process on the specialization of the models. In the case of VGG NetVLAD, this happens right after the end of the first epoch, while for ResNet it happens after the second epoch ( 80K iterations). The DenseNet model reaches its best performance in epoch six. This indicates that the methods, although able to learn effective garden descriptors, have a tendency to overfit after a certain number of iterations. We conjecture that this is due to the fact that the W18 data set images are captured with modified exposure setting of the camera, and CNNs are very sensitive to variations in the input, producing unstable outputs [26, 20].

5 Conclusions

We proposed an extended version of the TB-Places data set, that includes more than 23k additional images recorded in a real garden of the Trimbot2020 project. The data set is designed to stimulate the benchmark of place recognition algorithms in garden environments.

We compared the performance of several CNN-based holistic image descriptors, namely those computed by ResNet, DenseNet and NetVLAD architecture, on the task of place recognition in garden scenes. We learned garden-specific image descriptors and demonstrated that garden-scene representations can be learned and improve the recognition results. However, their performance is affected by variations of the appearance of the environment due to changing light and weather conditions, or to color variations caused by modifications of exposure settings of the cameras. Thus, their generalization capabilities are limited. Therefore, the design of new robust image descriptors is required for effective visual localization or navigation systems for gardening and agricultural robotics.

Acknowledgements

This work was funded by the European Horizon 2020 program, under the project TrimBot2020 (grant No. 688007).

References

  • [1] Relja Arandjelovic, Petr Gronat, Akihiko Torii, Tomas Pajdla, and Josef Sivic. Netvlad: Cnn architecture for weakly supervised place recognition. In IEEE CVPR, pages 5297–5307, 2016.
  • [2] C Wouter Bac, Eldert J van Henten, Jochen Hemming, and Yael Edan. Harvesting robots for high-value crops: State-of-the-art review and challenges ahead. Journal of Field Robotics, 31(6):888–911, 2014.
  • [3] Hernán Badino, D Huber, and Takeo Kanade. Visual topometric localization. In Intelligent Vehicles Symposium (IV), 2011 IEEE, pages 794–799, 2011.
  • [4] Mark Cummins and Paul Newman. Fab-map: Probabilistic localization and mapping in the space of appearance. Int. J. Rob. Res., 27(6):647–665, 2008.
  • [5] Mark Cummins and Paul Newman. Highly scalable appearance-only slam-fab-map 2.0. In Robotics: Science and Systems, volume 5, page 17, 2009.
  • [6] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. Int. J. Rob. Res., 32(11):1231–1237, 2013.
  • [7] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE CVPR, pages 770–778, 2016.
  • [8] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In IEEE CVPR, pages 4700–4708, 2017.
  • [9] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097–1105, 2012.
  • [10] María Leyva-Vallina, Nicola Strisciuglio, Manuel López-Antequera, Radim Tylecek, Michael Blaich, and Nicolai Petkov. Tb-places: a data set for visual place recognition in garden environments. IEEE Access, 2019.
  • [11] Manuel Lopez-Antequera, Ruben Gomez-Ojeda, Nicolai Petkov, and Javier Gonzalez-Jimenez. Appearance-invariant place recognition by discriminatively training a convolutional neural network. Pattern Recognit. Lett., 92:89–95, 2017.
  • [12] Stephanie Lowry, Niko Sünderhauf, Paul Newman, John J Leonard, David Cox, Peter Corke, and Michael J Milford. Visual place recognition: A survey. IEEE Transactions on Robotics, 32(1):1–19, 2016.
  • [13] Colin McManus, Winston Churchill, Will Maddern, Alexander D. Stewart, and Paul Newman. Shady dealings: Robust, long-term visual localisation using illumination invariance. In IEEE ICRA, pages 901–906, 2014.
  • [14] Michael J Milford and Gordon F Wyeth. Seqslam: Visual route-based navigation for sunny summer days and stormy winter nights. In IEEE ICRA, pages 1643–1649, 2012.
  • [15] Nicholas Ohi, Kyle Lassak, Ryan Watson, Jared Strader, Yixin Du, Chizhao Yang, Gabrielle Hedrick, Jennifer Nguyen, Scott Harper, Dylan Reynolds, et al. Design of an autonomous precision pollination robot. In IEEE IROS, 2018.
  • [16] Torsten Sattler, Will Maddern, Carl Toft, Akihiko Torii, Lars Hammarstrand, Erik Stenborg, Daniel Safari, Masatoshi Okutomi, Marc Pollefeys, Josef Sivic, et al. Benchmarking 6dof outdoor visual localization in changing conditions. In IEEE CVPR, volume 1, 2018.
  • [17] Torsten Sattler, Tobias Weyand, Bastian Leibe, and Leif Kobbelt. Image retrieval for image-based localization revisited. In BMVC, volume 1, page 4, 2012.
  • [18] Jamie Shotton, Ben Glocker, Christopher Zach, Shahram Izadi, Antonio Criminisi, and Andrew Fitzgibbon. Scene coordinate regression forests for camera relocalization in rgb-d images. In IEEE CVPR, pages 2930–2937, 2013.
  • [19] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
  • [20] Nicola Strisciuglio, Manuel Lopez-Antequera, and Nicolai Petkov. A push-pull layer improves robustness of convolutional neural networks. arXiv preprint arXiv:1901.10208, 2019.
  • [21] Nicola Strisciuglio, Radim Tylecek, Michael Blaich, Nicolai Petkov, Peter Bieber, Jochen Hemming, Eldert van Henten, Torsten Sattler, Marc Pollefeys, Theo Gevers, Thomas Brox, and Robert B. Fisher. Trimbot2020: an outdoor robot for automatic gardening. ISR, 2018.
  • [22] Niko Sünderhauf, Peer Neubert, and Peter Protzel. Are we there yet? challenging seqslam on a 3000 km journey across all four seasons. In IEEE ICRA, page 2013, 2013.
  • [23] Niko Sünderhauf and Peter Protzel. Brief-gist-closing the loop by simple means. In IEEE IROS, pages 1234–1241. IEEE, 2011.
  • [24] Akihiko Torii, Josef Sivic, Masatoshi Okutomi, and Tomas Pajdla. Visual place recognition with repetitive structures. IEEE Trans. Pattern Anal. Mach. Intell., pages 2346–2359, 2015.
  • [25] Achim Walter, Raghav Khanna, Philipp Lottes, Cyrill Stachniss, Roland Siegwart, Juan Nieto, and Frank Liebisch. Flourish-a robotic approach for automation in crop management. In ICPA, 2018.
  • [26] Stephan Zheng, Yang Song, Thomas Leung, and Ian Goodfellow. Improving the robustness of deep neural networks via stability training. In IEEE CVPR, pages 4480–4488, 2016.