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 , robot navigation [4, 14, 6, 22, 11]
, camera localization based on image retrieval and loop-closure detection 
. 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 . 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)  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 . 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 . Algorithms based on local features like FAB-MAP have been successfully implemented for visual localization in indoor environments  .
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 , 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 , DenseNet  and a VGG  pre-trained with a VLAD  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
We propose an extended version of the TB-Places data set , which consists of images recorded in the test gardens of the TrimBot2020 project . 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 . 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 .
|Garden||Set||# imgs||# similar pairs||% similar pairs|
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 . Some examples of images in the W18 set are included in Fig. 3.
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:
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 , DenseNet-161  and NetVLAD 
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 , while the baseline NetVLAD model was trained on the Pittsburg30k data set. 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|
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 hyperparameteris 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 byevery 5 epochs.
As stated in , 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) , 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.
|NetVLAD AvgPool + Global MaxPool||512||7.5|
|DenseNet norm5 + Global AvgPool||2208||69.278|
4 Results and discussion
|W17||W18||W17 (train)||W18 (test)|
|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 + 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 + Global AvgPool||0.1590||0.1301||0.6749||0.1655|
|NetVLAD pool5 + Global MaxPool||0.1323||0.0972||0.4230||0.1011|
|DenseNet norm5 + Global AvgPool||0.1288||0.1078||0.7055||0.2339|
|DenseNet norm5 + Global MaxPool||0.1040||0.0724||0.6591||0.2318|
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].
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.
This work was funded by the European Horizon 2020 program, under the project TrimBot2020 (grant No. 688007).
-  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.
-  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.
-  Hernán Badino, D Huber, and Takeo Kanade. Visual topometric localization. In Intelligent Vehicles Symposium (IV), 2011 IEEE, pages 794–799, 2011.
-  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.
-  Mark Cummins and Paul Newman. Highly scalable appearance-only slam-fab-map 2.0. In Robotics: Science and Systems, volume 5, page 17, 2009.
-  Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. Int. J. Rob. Res., 32(11):1231–1237, 2013.
-  Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE CVPR, pages 770–778, 2016.
-  Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In IEEE CVPR, pages 4700–4708, 2017.
-  Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097–1105, 2012.
-  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.
-  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.
-  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.
-  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.
-  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.
-  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.
-  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.
-  Torsten Sattler, Tobias Weyand, Bastian Leibe, and Leif Kobbelt. Image retrieval for image-based localization revisited. In BMVC, volume 1, page 4, 2012.
-  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.
-  Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
-  Nicola Strisciuglio, Manuel Lopez-Antequera, and Nicolai Petkov. A push-pull layer improves robustness of convolutional neural networks. arXiv preprint arXiv:1901.10208, 2019.
-  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.
-  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.
-  Niko Sünderhauf and Peter Protzel. Brief-gist-closing the loop by simple means. In IEEE IROS, pages 1234–1241. IEEE, 2011.
-  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.
-  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.
-  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.