On-the-fly learning offers a way to overcome the ‘closed world’ problem in computer vision, where object category recognition systems are restricted to only those pre-defined classes that occur in the carefully curated datasets available for training – for example ImageNet for object categories or UCF-101  for human actions in videos. What is more, it offers the tantalising prospect of developing large-scale general purpose object category retrieval systems which can operate over millions of images in a few seconds, as is possible in the specific instance retrieval systems [3, 4, 5, 6, 7] which have reached the point of commercialisation in products such as Google Goggles, Kooaba and Amazon’s SnapTell.
Current on-the-fly systems typically proceed in three stages [8, 9, 10, 11]: first, training data for the user query are compiled, commonly by bootstrapping the process via text-to-image search using e.g. Google Image Search as a source of training images; second, a classifier or ranker is learnt for that category; third, all images/videos in a dataset are ranked in order to retrieve those containing the category. The aim is for these stages to happen on-line in a matter of seconds, rather than hours.
Previous methods for on-the-fly learning have been limited by the retrieval-performance/memory/speed trade off. In particular, very high-dimensional feature vectors were required for state-of-the-art classification performance[12, 13, 14], but this incurred both a severe memory penalty (as features for the dataset need to be in memory for fast retrieval) and also a severe speed penalty (as computing a scalar product for high-dimensional features is costly) both in training and ranking. Despite the excellent progress in compression methods for nearest neighbour search by using product quantization  or binary encoding [16, 17], compromises still had to be made.
In this paper we show that in the context of on-the-fly category retrieval, Convolutional Networks (ConvNets)  with GPU training  can significantly improve on all three of: retrieval precision, memory requirements, and ranking speed. The whole pipeline, from computing the training image features and learning the model to scoring and ranking the dataset images is implemented on the GPU and runs in a highly-parallel, online manner. We thus demonstrate a system that is able to go from a cold-query to results in a matter of second(s) on a dataset of million(s) of images (some screenshots of our live on-the-fly retrieval system and web frontend are shown in Figure 1).
In terms of retrieval performance, we build on the recent research that shows that deep ConvNet features significantly outperform shallow features, such as Fisher Vectors [13, 12], on the image classification task [19, 20, 21]. However, our contributions go further than simply using ConvNet features in an on-the-fly architecture: we take full advantage of the GPU computation for all retrieval stages, in parallel with downloading the new training images on the CPU. This novel GPU-based architecture allows a time budget to be set, so that an SVM, trained on the available images within the time limit, can be used to (re-)rank the dataset images at any stage of the process (for instance, every s). This architecture is in strong contrast to the standard on-the-fly architectures , where SVM training only begins once all training images have been downloaded and processed, and ranking follows after that.
We start by conducting a comprehensive evaluation of the performance of ConvNet-based image features for category-based image retrieval. Given the lack of evaluation data suitable for the assessment of large-scale retrieval performance, we compose our own by taking a standard medium-scale object category recognition benchmark (PASCAL VOC 2007) and then optionally adding a large number of distractor images to take the dataset size to 1M+ images. We evaluate over these two datasets under variation in training data – either using VOC training images (i.e. a curated dataset) or using images from Google Image search (i.e. the type of images, possibly with label noise, that will be available for the real-world on-the-fly system). Full details are given in Section 2.
With our goal being ranking of millions of images on a conventional GPU-equipped PC, we then investigate, in Section 3, how retrieval performance is affected by using low-dimensional features (still originating from a ConvNet) over these scenarios. Low-dimensional features (e.g. hundreds of components rather than thousands) have two advantages: they use less memory, and scalar products are faster, both in training and ranking. We cover a spectrum of methods for achieving a low-dimensional descriptor, namely: (i) reducing the dimensionality of the last ConvNet layer; (ii) product quantization of the ConvNet features and (iii) binarization of the ConvNet features. It is shown that a combination of a low-dimensional final ConvNet feature layer with product quantization produces features that are both highly-compact and incredibly performant.
Finally, based on these investigations, we propose a GPU architecture for on-the-fly object category retrieval in Section 4, highly scalable, capable of adapting to varying query complexity and all running on a single commodity GPU.
2 Evaluating Large-scale Object Category Retrieval
This section describes the evaluation protocol used to assess the performance of the image representations described in Section 3 and of the on-the-fly training architecture introduced in Section 4. We begin by describing the datasets used for evaluation, and then describe the three different scenarios in which these datasets are used, with each subsequent scenario moving closer to modelling the conditions experienced by a real-world large-scale object category retrieval system.
One difficulty of evaluating a large-scale object category retrieval system is the lack of large-scale datasets with sufficient annotation to assess retrieval performance fully, in particular to measure recall. The PASCAL VOC dataset  provides full annotation for a set of twenty common object classes, facilitating evaluation using common ranking performance measures such as mean average precision (mAP), but is much too small (10k images) to evaluate the performance of a real-world system. Conversely, the ILSVRC dataset , while being much larger (1M+ images), does not have complete annotation of all object categories in each image. Therefore, ranking performance (e.g. recall or mAP) cannot be measured without further annotation, and only object category classification metrics (such as top-N classification error per image), which do not accurately reflect the performance of an object category retrieval
scenario, can be used. Additionally, in this work we use the ImageNet ILSVRC-2012 dataset to pre-train the ConvNet, so can not also use that for assessing retrieval performance.
As a result, for evaluation in this paper, we use a custom combination of datasets, carefully tailored to be representative of the data that could be expected in a typical collection of web-based consumer photographs:
Pascal Voc 2007
 is used as our base dataset, with assessment over seventeen of its twenty classes (‘people’, ‘cats’ and ‘birds’ are excluded for reasons explained below). We use the provided train, validation and test splits.
[23, 24] is used to augment the data from the PASCAL VOC 2007 test set in our later experiments, and comprises 1M unannotated images (aside from quite noisy image tags). The dataset represents a snapshot of images taken by popularity from the image sharing site Flickr, and thus is more representative of typical web-based consumer photography than ImageNet, which although also sourced from Flickr was collected through queries for often very specific terms from WordNet. In addition, MIRFLICKR-1M has been confirmed to contain many images of the twenty PASCAL VOC classes.
2.1 Evaluation Protocol
A linear SVM is trained for all classes, and used to rank all images in the target dataset. We are interested in evaluating the performance within an object category retrieval setting, and so measuring the ‘goodness’ of the first few pages of retrieved results is critical. We therefore evaluate using precision @ , where , on the basis that the larger the proportion of true positives for a given object category at the top of a ranked list the better the perceived performance.
Adopting such an evaluation protocol also has the advantage that we are able to use the 1M images from the MIRFLICKR-1M dataset despite the fact that full annotations are not provided. Since we only need to consider the top of the ranked list for each class during evaluation, we take can take a ‘lazy’ approach to annotating the MIRFLICKR-1M dataset, annotating class instances only as far down the ranked list as necessary to generate a complete annotation for the top- results (for more details of this procedure, refer to scenario 2 below). This avoids having to generate a full set of annotation for all 1M images.
2.2 Experimental Scenarios
2.2.1 Scenario 1: PASCAL VOC.
We train models for seventeen of the twenty VOC object classes (excluding ‘people’, ‘cats’ and ‘birds’) using both the training and validation sets. Following this, a ranked list for each class is generated using images from the test set and precision @ evaluated.
2.2.2 Scenario 2: Large-scale Retrieval.
Training is undertaken in the same manner as scenario 1, but during testing images are added from the MIRFLICKR-1M dataset. There are two sub-scenarios (using different subsets of the test data, summarised in Figure 2).
Scenario 2a –
we test using images from the PASCAL VOC test set (as in scenario 1) with the addition of the entirety of the MIRFLICKR-1M dataset. For each class, we remove all positive class occurrences in the ranked list which are retrieved from the MIRFLICKR-1M dataset using the lazy annotation described in Section 2.3, as the purpose of this scenario is to test how our features perform when attempting to retrieve a small, known number of class occurrences from a very large number of non-class ‘distractor’ images.111The prevalence of the PASCAL VOC classes ‘people’, ‘cats’ and ‘birds’ in the MIRFLICKR-1M data explains why we exclude them, as restricting the annotation of these classes to reasonable levels proved to be impossible.
Scenario 2b –
this time we exclude all images from the PASCAL VOC dataset, and instead evaluate precision @ solely over the MIRFLICKR-1M dataset, lazily annotating the retrieved ranked lists in each case as before. The purpose of this scenario is to test how our features perform over a real-world dataset with unknown statistics. In practice, it is an easier scenario than scenario 2a, since the MIRFLICKR-1M dataset contains many instances of all of the PASCAL VOC classes.
2.2.3 Scenario 3: Google Training.
Testing is the same as in scenario 2b, but instead of using PASCAL data for training, a query is issued to Google Image search for each of the PASCAL VOC classes, and the top images are used in each case as training data. This scenario assesses the tolerance to training on images that differ from the VOC and MIRFLICKR-1M test images: the Google images may be noisy and typically contain the object in the centre. It also mirrors most closely a real-world on-the-fly object category retrieval setting, as the queries in practice do not need to be limited to the PASCAL VOC classes. There are again two sub-scenarios, with different data used for the negative training samples in each case:
Scenario 3a –
the images downloaded from Google Image Search for all other classes, except for the current class, are used as negative training data (this mirrors the PASCAL VOC setup).
Scenario 3b –
a fixed pool of negative training images is used. These training images are sourced from the web by issuing queries for a set of fixed ‘negative’ query terms222miscellanea, random selection, photo random selection, random objects, random things, nothing in particular, photos of stuff, random photos, random stuff, things to both Google and Bing image search, and attempting to download the first results in each case. This same pool of negative training data is also used in Section 4.
2.3 Dataset Ground Truth Preparation
As described in Section 2.2, we use a combination of the PASCAL VOC 2007 dataset and MIRFLICKR1M dataset for evaluation. MIRFLICKR1M does not come with any annotation, apart from noisy flickr image tags, and so we add our own annotations for the twenty PASCAL VOC classes.
Despite the dataset containing 1M images, we can get away with annotating far less than this number given our chosen evaluation metric, precision @with , which only requires the ground truth for the first items in the ranked list of each target class to compute. We therefore adopt a ‘lazy’ approach to annotation using our result ranked lists as a starting point.
The evaluation set (and thus the meaning of the ‘first images’) is different for each scenario, as shown in Figure 1 of the paper. Therefore, given any raw ranked list for class (which is a combination of results from both the PASCAL VOC and MIRFLICKR1M datasets) it suffices to annotate images which fall within the following ranges:
For Scenario 2a – the top images from: the PASCAL VOC dataset combined with all images from MIRFLICKR1M annotated as negative for the target class (these are ‘distractors’)
…excluding annotated positives for class from MIRFLICKR1M.
For Scenario 2b/3 – the top images from the MIRFLICKR1M dataset
…excluding all PASCAL VOC images.
The annotations we make for any particular method/scenario should be stored so that images do not need to be annotated more than once for different methods. We developed a web-based annotation tool to facilitate this processwhich allows positive annotations for a class to be shared across both methods and scenarios.
In total, 46,770 images from the MIRFLICKR1M dataset were annotated, with an average of annotations per class. These annotations will be made publicly available.
3 Retrieval Performance over Image Representations
In this section, we perform an evaluation of recent state-of-the-art image representations for the object category retrieval scenarios described in Section 2.2.
ConvNet-based features, which form the basis of our on-the-fly system described in Section 4, have been shown to perform excellently on standard image classification benchmarks such as PASCAL VOC and ImageNet ILSVRC [20, 25] [21, 26]. We therefore focus our evaluation on these features, employing 2048-dimensional ‘CNN M 2048’ image features of  as the baseline. We compare them to a more traditional shallow feature encoding in the form of the Improved Fisher Vector (IFV) . Implementation details for ConvNets and IFV are given in Section 3.2. We explore the effects of reducing the dimensionality of our features on their retrieval performance using the following methods:
Lower-dimensional ConvNet output layer –
One way of reducing the dimensionality of ConvNet features consists in retraining the network so that the last fully-connected (feature) layer has a lower dimensionality. Following , we consider the ‘CNN M 128’ network configuration with a 128-dimensional feature layer. Using such network in place of the baseline ‘CNN M 2048’ can be seen as discriminative dimensionality reduction by a factor of 16.
Product quantization (PQ)
has been widely used as a compression method for image features [15, 27], and works by splitting the original feature into -dimensional sub-blocks, each of which is encoded using a separate vocabulary of cluster centres pre-learned from a training set. Here we explore compression using -dimensional sub-blocks.
is performed using the tight frame expansion method of , which has been recently successfully applied to local patch and face descriptors [29, 30]. The binarization of zero-centred descriptors to binary codes is performed as follows:
where is the sign function: iff and otherwise, and the Parseval tight frame is computed by keeping the firstmatrix.
3.1 Results and Analysis
The results for all three experimental scenarios are presented in Table I. We discuss the results for each scenario below.
3.1.1 Scenario 1 (VOC Train/VOC Test).
The PASCAL VOC dataset does not pose any major challenges for any of our features, which is not surprising given the close to decade of research on representations which perform well on this dataset. Even for the most challenging classes (e.g. ‘potted plant’) IFV produces fairly good results, with the top 12 images being true positives (Prec @ 100 = 0.58), and the top 92 images being true positives in the case of our 2048-dimensional ConvNet features (Prec @ 100 = 0.83).
3.1.2 Scenario 2a (VOC Train/VOC+distractors Test).
Adding 1M distractor images from the MIRFLICKR-1M dataset has a significant impact on the results, with the task now being to retrieve true positives that constitute less than of the dataset. This is a more challenging scenario, and under this setting the superior performance of the ConvNet-based features, when compared to the state-of-the-art shallow representation (IFV), is much clearer to see. Some sample precision-rank curves for two queries, one particularly challenging (‘sheep’) and another less so (‘motorbike’) are shown in Figure 3. We can make the following observations:
IFV Performance –
It can be seen that IFV (I in Table I) performs the worst of all methods, despite being much higher dimensional () and taking much longer to compute () compared to our CNN-128 method (I). Nonetheless, even for challenging classes such as ‘sheep’ IFV manages to pull out a few true positives at the top of the ranked list. However, the relative performance drop with rank is much sharper than with the ConvNet-based methods.
Bursty Images –
comparing the top-ranked negatives of the FK-512 method (I) for ‘sheep’ to those of the CNN-2048 method (I), it can be seen that IFV appears to mistakenly rank highly ‘bursty’ images comprising repeating patterns or textures. This phenomenon is particularly evident for natural, outdoor scenes which explains why the performance drop of IFV is particularly severe in the ‘sheep’, ‘cow’ and ‘horses’ classes, as it appears that the ConvNet-based features are much more robust to such textured images, although the use of heavy PQ compression (e.g. the CNN-128-PQ-8 method I) starts to show some deterioration as a consequence of the retrieval of a smaller number of similarly ‘bursty’ images.
The diversity of the retrieved results is also much greater for ConvNet-based representations than for IFV, indicating that the classifier is able to make better generalisations using these features. For example, as seen in Figure 3, whereas the top four retrieved results for the query ‘motorbike’ for the FK-512 method (I) all show a rider in a similar pose, on a racing bike on a race track, the top four retrieved results for the CNN-2048 method (I) depict a variety of different motorcycles (road, racing, off-road) from several different angles.
For the most part, compression of the ConvNet features does not appear to reduce their diversity appreciably, with the top-ranked results for all ConvNet methods, whether compressed or not, appearing to exhibit a similar diversity of results.
As mentioned above, the drop in performance in moving from ConvNet-based features to IFV is much greater than that incurred by any of the compression methods, and this seems to be strongly connected with the robustness of the ConvNet-based features, whether compressed or not, to the kind of ‘bursty’ textured images which IFV is susceptible to. This is remarkable given that comparing the size of the largest uncompressed ConvNet representation CNN-2048 (I) to the smallest PQ-compressed one, CNN-128-PQ-8 (I), there is a size difference. In the case of the CNN-128-BIN-2K method (I), the mPrec @ 100 actually increases marginally when compared to the non-compressed codes (I) which, when visually inspecting the rankings, again can be explained by the additional robustness brought by compression.
The binary representations (I & I), combined with a linear SVM, also exhibit competitive performance despite a memory footprint lower even than the PQ-compressed codes. The ranking of such features can also be significantly sped-up using hardware-accelerated Hamming distance computation. Nonetheless, the use of binary features requires a different ranking model, and so its application is left for future work. The fact that the ConvNet features are very sparse, with the CNN-128 representation typically being over zeros, is one reason why they are so amenable to compression, and it is possible that with compression methods geared specifically to capitalise on this sparsity even higher compression ratios could be achieved.
3.1.3 Scenario 2b (VOC Train/MIRFLICKR Test).
Given that the MIRFLICKR-1M dataset contains many instances of all of the PASCAL VOC classes, moving to testing solely on MIRFLICKR leads to a jump in performance of the results across all methods. Nonetheless, this scenario provides a closer representation of the performance of a real-world on-the-fly object category retrieval system, given that the image statistics of the MIRFLICKR-1M dataset are not known in advance.
3.1.4 Scenario 3a (Google Train/MIRFLICKR Test).
Switching to noisy training images from Google rather than the pre-curated PASCAL VOC training images as expected results in a small drop () across the board for all methods. However, the precision at the top of the ranking remains subjectively very good. Nonetheless, as shown in Figure 4, the actual images returned from the dataset are very different, which reflects the differences in the training data sourced from Google Image search versus that from the curated dataset. For example, a query for ‘chair’ returns predominantly indoor scenes with regular dining-table chairs when using VOC training data, and more avant-garde, modern designs, generally centred in the frame when using Google training data.
3.1.5 Scenario 3b (Google Train + negative pool/MIRFLICKR Test).
In this scenario, we switch to using a fixed pool of negative data sourced from a set of ‘negative’ queries, and it can be seen how this improves the results by up to . This may be a result of the larger negative training pool size ( images vs. images when using queries for all other VOC classes to provide the negative data as we do in Scenario 3a). Given the assumed lack of coverage in the fixed negative image pool (as it is sourced by issuing queries for deliberately non-specific terms to facilitate its application to as broad a range of queries as possible), this suggests that to a certain extent lack of diversity can be made up for by using a larger number of negative training images.
3.2 Implementation Details
Our implementation of IFV and ConvNet image representations follows that of . In more detail, for IFV computation we use their setting ‘FK IN 512 (x,y)’, which corresponds to: (i) dense rootSIFT  local features with spatial extension , extracted with 3 pixel step over 7 scales ( scaling factor); (ii) Improved Fisher vector encoding  using a GMM codebook with 512 Gaussians; (iii) intra normalisation  of the Fisher vector.
Our ConvNet training and computation framework is based on the publicly available Caffe toolbox. The two ConvNet configurations, considered in this paper (‘CNN M 2048’ and ‘CNN M 128’) are pre-trained on the ImageNet ILSVRC-2012 dataset using the configurations described in 333http://www.robots.ox.ac.uk/~vgg/software/deep_eval/
. Namely, they contain 5 convolutional and 2 fully-connected layers, interleaved with rectification non-linearities and max-pooling. The stack of layers is followed by a 1000-way soft-max classifier, which is removed after pre-training is finished (turning a ConvNet from an ImageNet classifier to a generic image descriptor). The only difference between the two ConvNets is the dimensionality of the second fully-connected layer, which is 2048 for ‘CNN M 2048’ and 128 for ‘CNN M 128’.
In order to provide a similar setup to our on-the-fly architecture in Section 4, which uses a linear predictor
learnt using SVM hinge loss and a quadratic regulariser, as our learning stage we use a standard linear support vector machine implementation. Theparameter is determined using the VOC validation set for scenario 1, and fixed at 0.25 for all other experiments.
4 On-the-fly Architecture
Having evaluated various image representations in Sect. 3, we now describe the architecture of the object category retrieval system, which fully exploits the advantages of ConvNet image representations. From the user experience point of view, the main requirement to our system is instant response: the first ranking of the repository images should be obtained immediately (in under a second), with a potential improvement over time. This dictates the following design choice: downloading the training images from the Internet should be carried out in parallel with training a model on the already downloaded images in the on-line fashion. As a result, at any point of time, the current model can be used to perform ranking of the dataset images.
For this approach to work, however, image representation should satisfy the following requirements: (i) highly discriminative, so that even a handful of training samples are sufficient to learn a linear ranking model; (ii) fast-to-compute, to maximise the amount of training data processed within the allocated time budget; (iii) low memory footprint, to allow for storing large-scale datasets in the main memory, and ranking them efficiently. As has been demonstrated in Sect. 3, a ConvNet image representation is a perfect match for these requirements. Indeed, pre-training on a large image collection (ImageNet) leads to highly discriminative representation, and even a few training samples are sufficient for training an accurate linear model; ConvNet features can be computed very quickly on the highly-parallel GPU hardware; they have low dimensionality (even without PQ compression) and can be instantly scored using a linear model on the GPU.
Our on-the-fly architecture is illustrated in Fig. 5. It is divided into the CPU-based front-end (which controls the graphical user interface and downloads the training images from the Internet) and the GPU-based back-end, which continually trains the ranking model on the downloaded images and periodically applies it to the repository. The category retrieval is carried out as follows.
Off-line (pre-processing). To allow for fast processing, the ConvNet features for the target dataset images are pre-computed off-line, using the CNN-128 architecture. We also prepare the fixed negative image pool for all queries by issuing our negative pool queries (see Section 2.2) to both Bing and Google image search, and downloading the returned URLs. The negative image feature features are also pre-computed. The memory requirements for storing the pre-computed features are as follows: 488 MB for the MIRFLICKR-1M dataset and 78 MB for the pool of 16K negative features. It is thus feasible to permanently store the features of both negative and dataset images in the high-speed GPU memory even without compression of any kind (a consumer-grade NVIDIA GTX Titan GPU, used in our experiments, is equipped with 6GB RAM). As noted in Section 2, the ConvNet features can be compressed further by up to using product quantization without significant degradation in performance, making datasets of up to 160M images storable in GPU memory, setting 1GB aside for storage of the model (compared to 10M images without compression), and more if multiple GPUs are used. Many recent laptops are fitted with a GPU containing similar amounts of memory, making our system theoretically runnable on a single laptop. Furthermore, whilst storing the target repository on the GPU is preferable in terms of the ranking time, in the case of datasets of 1B+ images, it can be placed in the CPU memory, which typically has larger capacity.
On-line (CPU front-end). Given a textual query, provided by a user (e.g. in a browser window), the front-end starts by downloading relevant images, which will be used as positive samples for the queried category and fed to the GPU back-end. At regular time intervals, the front-end receives a ranked list of dataset images from the back-end, and displays them in the user interface.
On-line (GPU back-end). The GPU back-end runs in parallel with the front-end, and is responsible for both training the ranking model and applying it to the dataset. Training an -regularised linear SVM model is carried out using the mini-batch SGD with Pegasos updates : at iteration , the learning rate is , where is the -norm regularisation constant, set to in our experiments. Each batch contains an equal amount of positive and negative samples; the total batch size was set to in our experiments. The training commences as soon as the first positive image has been downloaded and is received from the front-end, after which random crops are taken each iteration from the pool of positive training images downloaded so far. The front-end in the meantime will continue downloading new images from the Internet, constantly increasing the size of the positive image pool and the diversity of the extracted crops. We note that while the positive image features need to be computed on-the-fly, this is very quick in the case of ConvNets. Ranking takes place using the current SVM model every seconds (we used ). As mentioned above, the pre-computed dataset features are pre-stored on a GPU, so the scores for 1M images are computed in s. The 1M scores are then ranked (also on GPU, s) and the list of the top-ranked images is passed to the front-end to be displayed to the user. All components of the GPU back-end are implemented within the same framework, derived from Caffe .
4.1 System Performance
In order to evaluate the real-world performance of the system, we ran queries for several PASCAL VOC classes and tracked how the performance (measured in terms of Precision @ 100) evolved over time. To simulate the latency introduced by downloading images from the Internet, we limited the rate of positive images entering the network to 12 images/second (which is what we found to be a typical average real-world rate on our test system). These images were sampled randomly from the top-50 image URLs returned from Google Image search.
The results of these experiments for four classes are shown in Figure 6. Even for some of the most challenging PASCAL VOC classes ‘sheep’ and ‘softa’, the performance converged to its final value in seconds, and as can be seen from the evolving ranking at each time-step the ordering at the top of the ranking generally stabilizes within a second, showing a good diversity of results. For easier classes such as ‘aeroplane’, convergence and stabilization occurs even faster.
In real terms, this results in a typical query time for our on-the-fly architecture, from entering the text query to viewing the ranked retrieved images, of 1–2 seconds and often less to complete convergence and stabilization of results. However, one of the advantages of our proposed architecture is that it is adaptable to differing query complexity, and we can return good results early whilst still continuing to train in the background if necessary, exposing the classifier to an expanding pool of training data as it is downloaded from the web and updating the ranked list on-the-fly.
4.2 Impact of Training Image Count
In this section, we present further more detailed analysis of the changes that occur as more training images are fed into the network, to supplement those described above for the two most challenging classes ‘sheep’ and ‘sofa’. The motivation is to determine the role of the size of the positive training image pool in the performance of the system. Note that to this end the experimental setup is slightly different to the previous section, as after inputting each training image into the system we waited for the output classifier to stabilize. We analyse the impact on each class in turn, referring to Figure 7.
Considering first the ‘sheep’ class, with only a single training image 70% of the final performance (as measured by precision @ 100) is reached, and the top of the ranked list contains many sheep. However, most of the highly ranked images are of horned sheep, suggestive of the bias introduced by training only on a single image. As the number of training images is increased to 2, the top-ranked images become much more diverse, with this translating into a further final small jump in performance as the third training image is fed into the network.
The ‘sofa’ class provides an example of how the architecture deals with a more challenging query, with a larger degree of intra-class appearance variation. In this case, a single training image clearly does not suffice, as the ranked list returned for a single training image has performance close to random, with no sofas retrieved. However, this very quickly changes as a second image is fed into the network, with 35 new true positives entering the top 100. Following this exposure, the top retrieved images are greatly improved, mostly being of sofas. Feeding five images into the network yields a further modest increase in diversity at the top of the ranked list.
In both cases, for this dataset any new true positives introduced to the top 100 after the introduction of the third or fourth training images have a very high initial position () and the mean change in ranking position is very low () suggesting that a coarse model can be trained with relatively few images, and improvements after this time predominantly effect the tail of the ranked list. This suggests that even when initially a very small number of training images are available, a user interface where the head of the ranked list is presented to the user almost immediately (trained on the small amount of training data which is available) whilst training continues in the background to refine the tail of the ranked results is possible. Such a restriction does not apply in our case, since as mentioned in Section 4.1 in general we have 30+ training images available to us within a few seconds of launching a query.
4.3 Novel On-the-fly Queries
Although experimental results have thusfar only been presented for the PASCAL VOC classes, the advantage of an on-the-fly architecture is that no limitation is imposed on the object categories which can be queried for, as a new classifier can be trained on demand (in our case using Google Image search as a ‘live’ source of training data). We present some additional selected results of the on-the-fly system in Figure8, using the same setup as in Scenario 3b and query terms disjunct from the twenty PASCAL VOC classes to test its performance for such novel on-the-fly queries. It can be seen that the architecture is very much generalisable to query terms outside of the PASCAL category hierarchy.
Some queries such as ‘lion’ were particularly challenging for shallow feature representations such as Fisher Kernel, due to the repeating thick fur pattern and bushes present in many of the training images retrieving a large number of the bursty images described in Section 3.1. However, ConvNet-based features appear to be much more robust to this effect, with precision @ 100 of 1.0. The architecture is also capable of returning more abstract concepts such as ‘cityscape’ or ‘forest’ in addition to more concrete objects such as ‘cake’ and ‘truck’ (shown in the figure).
Finally, even when querying MIRFLICKR1M for the relatively obscure ‘capybara’ (Figure 8), the returned false positives all fit within a tight configuration of classes of very similar appearance (‘otter’, ‘squirrel’, ‘meercat’) and, of course, the composition of the MIRFLICKR1M dataset is unknown, so it could be that there are very few images of ‘capybara’ in the dataset.
In this paper we have presented a system for on-the-fly object category retrieval, which builds upon the recent advances in deep convolutional image representations. We demonstrated how such representations can be efficiently compressed and used in a novel incremental learning architecture, capable of retrieval across datasets of 1M+ images within seconds and running entirely on a single GPU.
For larger datasets the CPU, or multiple GPU cards, could be employed for ranking once the classifier has been learnt on the GPU. Along with further investigation of how the diversity of the ranked results changes over time, this is the subject of future work.
This work was supported by the EPSRC and ERC grant VisRec no. 228180. We gratefully acknowledge the support of NVIDIA Corporation with the donation of the GPUs used for this research.
-  J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei, “Imagenet: A large-scale hierarchical image database,” in Proc. CVPR, 2009.
-  K. Soomro, A. R. Zamir, and M. Shah, “UCF101: A dataset of 101 human actions classes from videos in the wild,” CoRR, vol. abs/1212.0402, 2012.
-  J. Sivic and A. Zisserman, “Video Google: A text retrieval approach to object matching in videos,” in Proc. ICCV, vol. 2, 2003, pp. 1470–1477.
-  D. Nister and H. Stewenius, “Scalable recognition with a vocabulary tree,” in Proc. CVPR, 2006, pp. 2161–2168.
-  J. Philbin, O. Chum, M. Isard, J. Sivic, and A. Zisserman, “Object retrieval with large vocabularies and fast spatial matching,” in Proc. CVPR, 2007.
-  H. Jégou, M. Douze, and C. Schmid, “Hamming embedding and weak geometric consistency for large scale image search,” in Proc. ECCV, 2008, pp. 304–317.
-  H. Jégou, M. Douze, C. Schmid, and P. Pérez, “Aggregating local descriptors into a compact image representation,” in Proc. CVPR, 2010.
-  K. Chatfield and A. Zisserman, “Visor: Towards on-the-fly large-scale object category retrieval,” in Proc. ACCV, ser. Lecture Notes in Computer Science. Springer, 2012.
-  B. Fernando and T. Tuytelaars, “Mining multiple queries for image retrieval: On-the-fly learning of an object-specific mid-level representation,” in Proc. ICCV, 2013.
-  Y. Liu, D. Xu, I. W. Tsang, and J. Luo, “Using large-scale web data to facilitate textual query based retrieval of consumer photos,” in Proceedings of the 17th ACM International Conference on Multimedia, ser. MM ’09, 2009, pp. 55–64.
-  O. M. Parkhi, A. Vedaldi, and A. Zisserman, “On-the-fly specific person retrieval,” in International Workshop on Image Analysis for Multimedia Interactive Services. IEEE, 2012.
-  K. Chatfield, V. Lempitsky, A. Vedaldi, and A. Zisserman, “The devil is in the details: an evaluation of recent feature encoding methods,” in Proc. BMVC., 2011.
-  F. Perronnin, J. Sánchez, and T. Mensink, “Improving the Fisher kernel for large-scale image classification,” in Proc. ECCV, 2010.
-  F. Perronnin, Z. Akata, Z. Harchaoui, and C. Schmid, “Towards good practice in large-scale learning for image classification,” in Proc. CVPR, 2012, pp. 3482–3489.
-  H. Jégou, M. Douze, and C. Schmid, “Product quantization for nearest neighbor search,” IEEE PAMI, 2011.
A. Torralba, R. Fergus, and W. T. Freeman, “80 million tiny images: a large dataset for non-parametric object and scene recognition,”IEEE PAMI, 2008.
-  M. Raginsky and S. Lazebnik, “Locality sensitive binary codes from shift-invariant kernels,” in NIPS, 2009.
-  Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2324, 1998.
A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet classification with deep convolutional neural networks,” inNIPS, 2012, pp. 1106–1114.
-  M. D. Zeiler and R. Fergus, “Visualizing and understanding convolutional networks,” CoRR, vol. abs/1311.2901, 2013.
-  K. Chatfield, K. Simonyan, A. Vedaldi, and A. Zisserman, “Return of the devil in the details: Delving deep into convolutional nets,” in Proc. BMVC., 2014.
-  M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman, “The PASCAL Visual Object Classes (VOC) challenge,” IJCV, vol. 88, no. 2, pp. 303–338, 2010.
-  M. J. Huiskes and M. S. Lew, “The mir flickr retrieval evaluation,” in MIR ’08: Proceedings of the 2008 ACM International Conference on Multimedia Information Retrieval, 2008.
-  M. J. Huiskes, B. Thomee, and M. S. Lew, “New trends and ideas in visual concept detection: The mir flickr retrieval evaluation initiative,” in MIR ’10: Proceedings of the 2010 ACM International Conference on Multimedia Information Retrieval, 2010, pp. 527–536.
-  J. Donahue, Y. Jia, O. Vinyals, J. Hoffman, N. Zhang, E. Tzeng, and T. Darrell, “Decaf: A deep convolutional activation feature for generic visual recognition,” CoRR, vol. abs/1310.1531, 2013.
-  A. Razavian, H. Azizpour, J. Sullivan, and S. Carlsson, “CNN Features off-the-shelf: an Astounding Baseline for Recognition,” CoRR, vol. abs/1403.6382, 2014.
-  J. Sánchez and F. Perronnin, “High-dimensional signature compression for large-scale image classification,” in Proc. CVPR, 2011.
-  H. Jégou, T. Furon, and J.-J. Fuchs, “Anti-sparse coding for approximate nearest neighbor search,” in Proc. ICASSP, 2012, pp. 2029–2032.
-  K. Simonyan, A. Vedaldi, and A. Zisserman, “Learning local feature descriptors using convex optimisation,” IEEE PAMI, 2014.
-  O. M. Parkhi, K. Simonyan, A. Vedaldi, and A. Zisserman, “A compact and discriminative face track descriptor,” in Proc. CVPR. IEEE, 2014.
-  R. Arandjelović and A. Zisserman, “Three things everyone should know to improve object retrieval,” in Proc. CVPR, 2012.
-  J. Sánchez, F. Perronnin, and T. Emídio de Campos, “Modeling the spatial layout of images beyond spatial pyramids,” Pattern Recognition Letters, vol. 33, no. 16, pp. 2216–2223, 2012.
-  R. Arandjelović and A. Zisserman, “All about VLAD,” in Proc. CVPR, 2013.
Y. Jia, “Caffe: An open source convolutional architecture for fast feature embedding,”http://caffe.berkeleyvision.org/, 2013.
S. Shalev-Shwartz, Y. Singer, and N. Srebro, “Pegasos: Primal estimated sub-gradient SOlver for SVM,” inProc. ICML, vol. 227, 2007.