1 Introduction
Deep learning offers a powerful framework for learning increasingly complex representations for visual recognition tasks. The work of Krizhevsky et al. [18]
convincingly demonstrated that deep neural networks can be very effective in classifying images in the challenging Imagenet benchmark
[5], significantly outperforming computer vision systems built on top of engineered features like SIFT
[22]. Their success spurred a lot of interest in the machine learning and computer vision communities. Subsequent work has improved our understanding and has refined certain aspects of this class of models
[39]. A number of different studies have further shown that the features learned by deep neural networks are generic and can be successfully employed in a blackbox fashion in other datasets or tasks such as image detection [39, 26, 32, 9, 30, 4].The deep learning models that so far have proven most successful in image recognition tasks, e.g. [34, 21, 33], are feedforward convolutional neural networks trained in a supervised fashion to minimize a regularized training set classification error by backpropagation. Their recent success is partly due to the availability of large annotated datasets and fast GPU computing, and partly due to some important methodological developments such as dropout regularization and rectifier linear activations [18]. However, the key building blocks of deep neural networks for images have been around for many years [19]: (1) Deep Convolutional Neural Networks (DCNNs) with small receptive fields that spatially share parameters within each layer. (2) Gradual abstraction and spatial resolution reduction after each convolutional layer as we ascend the network hierarchy, typically via maxpooling [31, 15]
This paper examines several aspects of invariance to deformations in the context of DCNNs for visual recognition. We treat both locally defined (nonrigid) and global deformations, demonstrating that a more refined treatment yields improved classification performance.
Our first main contribution is to build a deep neural network around the epitomic representation [17]. The image epitome, illustrated in Figure 1, is a data structure appropriate for learning translationaware image representations, naturally disentagling appearance and position modeling of visual patterns. While originally developped for generative image modelling, we show here that the epitome data structure can be used to train DCCNs discrimatively.
For this, we substitute every pair of convolution and maxpooling layers typically used in DCNNs with an ‘Epitomic Convolution’ layer. As illustrated in Fig. 2, Epitomic Convolution in an inputcentered dual alternative to the filtercentered standard maxpooling. Namely, rather than searching in the input image (or layer) for the strongest response of a filter, we search across the set of filters encapsuled in a epitome for the strongest response to an image patch. Our Epitomic Convolution is designed to have the same computational and model complexity as MaxPooling, while similar filters to share parameters.
We use a dictionary of ‘miniepitomes’ at each network layer: each miniepitome is only slightly larger than the corresponding input data patch, just enough to accomodate for the desired extent of position invariance. For each input data patch, the miniepitome layer outputs a single value per miniepitome, which is the maximum response across all filters in the miniepitome. In [28] we discuss another deep epitomic network variant built on top of large epitomes which learns topographically organized features.
Our second main contribution is to explicitly deal with object scale and position when applying DCNNs to image classification. We show that this can be done efficiently using a patchwork data structure in a principled, consistent manner during both training and testing. While fusing classification results extracted from multiple image windows is standard practice, we show that when incorporating multiple windows during training in a Multiple Instance Learning (MIL) framework we obtain substantially larger gains.
Finally, we explore to what extent we can push scale and position search towards developing efficient and effective sliding window object detectors on top of DCNNs. We accelerate sliding window detection by introducing a simple method to reduce the effective size and receptive field of a DCNN pretrained on ImageNet and show that by performing an explicit search over position, scale, and aspect ratios we can obtain results that are comparable to the currentstateoftheart while being substantially simpler and easier to train, as well as more efficient.
We quantitatively evaluate the proposed models primarily in image classification experiments on the Imagenet ILSVRC2012 largescale image classification task. We train the model by error backpropagation to minimize the classification loss, similarly to [18]. We have experimented with deep miniepitomic networks of different architectures (Class A, B, and C). We have carried out the bulk of our comparisons between epitomes and maxpooling using comparable midsized networks having 6 convolutional and 3 fully connected layers whose structure closely follows that in [32] (ClassA). In these evaluations the deep epitomic network achieves 13.6% top5 error on the validation set, which is 0.6% better than the corresponding conventional maxpooled convolutional network whose error rate is 14.2%, with both networks having the same computational cost. Note that the error rate of the original model in [18]
is 18.2%, using however a smaller network. We have also more recently experimented with larger deep miniepitomic networks (ClassB), which have the same number of levels but more neurons per layer than those in ClassA. The plain deep epitomic net in ClassB achieves an error rate of 11.9%. When accompanied with explicit scale and position search (patchwork variant), its error drops further down to 10.0%. Finally, following
[33], we have most recently experimented with a very deep epitomic network with 13 convolutional and 3 fully connected layers (ClassC). This achieves an even lower error rate of 10.0% (without scale and position search). All these performance numbers refer to classification with a single network. We also find that the proposed epitomic model converges faster, especially when the filters in the dictionary are mean and contrastnormalized, which is related to [39]. We have found this normalization to also accelerate convergence of standard maxpooled networks.In [28] we further report additional sets of experiments. First, we show that a deep epitomic network trained on Imagenet can be effectively used as blackbox feature extractor for tasks such as Caltech101 image classification. Second, we report excellent image classification results on the MNIST and CIFAR10 benchmarks with smaller deep epitomic networks trained from scratch on these smallimage datasets.
Related work
Our model builds on the epitomic image representation [17], which was initially geared towards image and video modeling tasks. Singlelevel dictionaries of image epitomes learned in an unsupervised fashion for image denoising have been explored in [1, 3]
. Recently, singlelevel miniepitomes learned by a variant of Kmeans have been proposed as an alternative to SIFT for image classification
[29]. To our knowledge, epitomes have not been studied before in conjunction with deep models or learned to optimize a supervised objective.The proposed epitomic model is closely related to maxout networks [12]. Similarly to epitomic matching, the response of a maxout layer is the maximum across filter responses. The critical difference is that the epitomic layer is hardwired to model position invariance, since filters extracted from an epitome share values in their area of overlap. This parameter sharing significantly reduces the number of free parameters that need to be learned. Maxout is typically used in conjunction with maxpooling [12], while epitomes fully substitute for it. Moreover, maxout requires random input perturbations with dropout during model training, otherwise it is prone to creating inactive features. On the contrary, we have found that learning deep epitomic networks does not require dropout in the convolutional layers – similarly to [18], we only use dropout regularization in the fully connected layers of our network.
Other variants of max pooling have been explored before. Stochastic pooling [38]
has been proposed in conjunction with supervised learning. Probabilistic pooling
[20] and deconvolutional networks [40]have been proposed before in conjunction with unsupervised learning, avoiding the theoretical and practical difficulties associated with building probabilistic models on top of maxpooling. While we do not explore it in this paper, we are also very interested in pursuing unsupervised learning methods appropriate for the deep epitomic representation.
2 Deep Epitomic Convolutional Networks
(a)  (b) 
2.1 MiniEpitomic deep networks
(a)  (b) 
We first describe a single layer of the miniepitome variant of the proposed model, with reference to Fig. 2. In standard maxpooled convolution, we have a dictionary of filters of spatial size pixels spanning
channels, which we represent as realvalued vectors
with elements. We apply each of them in a convolutional fashion to every input patch densely extracted from each position in the input layer which also has channels. A reduced resolution output map is produced by computing the maximum response within a small window of displacements around positions in the input map which are pixels apart from each other. The output map of standard maxpooled convolution has spatial resolution reduced by a factor of across each dimension and will consist of channels, one for each of the filters. Specifically:(1) 
where points to the input layer position where the maximum is attained (argmax).
In the proposed epitomic convolution scheme we replace the filters with larger miniepitomes of spatial size pixels, where . Each miniepitome contains filters of size , one for each of the displacements in the epitome. We sparsely extract patches
from the input layer on a regular grid with stride
pixels. In the proposed epitomic convolution model we reverse the role of filters and input layer patches, computing the maximum response over epitomic positions rather than input layer positions:(2) 
where now points to the position in the epitome where the maximum is attained. Since the input position is fixed, we can think of epitomic matching as an inputcentered dual alternative to the filtercentered standard maxpooling.
Computing the maximum response over filters rather than image positions resembles the maxout scheme of [12], yet in the proposed model the filters within the epitome are constrained to share values in their area of overlap.
Similarly to maxpooled convolution, the epitomic convolution output map has channels and is subsampled by a factor of across each spatial dimension. Epitomic convolution has the same computational cost as maxpooled convolution. For each output map value, they both require computing inner products followed by finding the maximum response. Epitomic convolution requires times more work per input patch, but this is exactly compensated by the fact that we extract input patches sparsely with a stride of pixels.
Similarly to standard maxpooling, the main computational primitive is multichannel convolution with the set of filters in the epitomic dictionary, which we implement as matrixmatrix multiplication and carry out on the GPU, using the cuBLAS library.
It is noteworthy that conventional maxpooled convolution can be cast as special case of epitomic convolution. More specifically, we can exactly replicate maxpooled convolution with filters of size and
maxpooling using as epitomes zeropadded versions of the original filters (with padding equal to
pixels on each side of the filter) and epitomic filter size equal to . In that sense, epitomic convolution is a generalization of maxpooling.To build a deep epitomic model, we stack multiple epitomic convolution layers on top of each other. The output of each layer passes through a rectified linear activation unit and fed as input to the subsequent layer, where is the bias. Similarly to [18], the final two layers of our network for Imagenet image classification are fully connected and are regularized by dropout. We learn the model parameters (epitomic weights and biases for each layer) in a supervised fashion by error back propagation. We present full details of our model architecture and training methodology in the experimental section.
2.2 Optional mean and contrast normalization
Motivated by [39], we have explored the effect of filter mean and contrast normalization on deep epitomic network training. More specifically, we considered a variant of the model where the epitomic convolution responses are computed as:
(3) 
where is a meannormalized version of the filters and is their contrast, with
a small positive constant. This normalization requires only a slight modification of the stochastic gradient descent update formula and incurs negligible computational overhead. Note that the contrast normalization explored here is slightly different than the one in
[39], who only scale down the filters whenever their contrast exceeds a predefined threshold.We have found the mean and contrast normalization of Eq. (3) to significantly accelerate training not only of epitomic but also maxpooled convolutional nets.
2.3 Image Classification Experiments
Image classification tasks
We have performed most of our experimental investigation with epitomes on the Imagenet ILSVRC2012 dataset [5], focusing on the task of image classification. This dataset contains more than 1.2 million training images, 50,000 validation images, and 100,000 test images. Each image is assigned to one out of 1,000 possible object categories. Performance is evaluated using the top5 classification error. Such largescale image datasets have proven so far essential to successfully train big deep neural networks with supervised criteria.
Network architecture and training methodology
For our Imagenet experiments, we compare the proposed deep epitomic networks with deep maxpooled convolutional networks. For fair comparison, we use as similar architectures as possible, involving in both cases six convolutional layers, followed by two fullyconnected layers and a 1000way softmax layer. We use rectified linear activation units throughout the network. Similarly to
[18], we apply local response normalization (LRN) to the output of the first two convolutional layers and dropout to the output of the two fullyconnected layers. This is the ClassA of the models we considered.The architecture of our baseline MaxPool network is specified on Table 1. It employs maxpooling in the convolutional layers 1, 2, and 6. To accelerate computation, it uses an image stride equal to 2 pixels in the first layer. It has a similar structure with the Overfeat model [32], yet significantly fewer neurons in the convolutional layers 2 to 6. Another difference with [32] is the use of LRN, which to our experience facilitates training.
The architecture of the proposed Epitomic network is specified on Table 2. It has exactly the same number of neurons at each layer as the MaxPool model but it uses miniepitomes in place of convolution + max pooling at layers 1, 2, and 6. It uses the same filter sizes with the MaxPool model and the miniepitome sizes have been selected so as to allow the same extent of translation invariance as the corresponding layers in the baseline model. We use input image stride equal to 4 pixels and further perform epitomic search with stride equal to 2 pixels in the first layer to also accelerate computation.
We have also tried variants of the two models above where we activate the mean and contrast normalization scheme of Section 2.2 in layers 1, 2, and 6 of the network.
We followed the methodology of [18] in training our models. We used stochastic gradient ascent with learning rate initialized to 0.01 and decreased by a factor of 10 each time the validation error stopped improving. We used momentum equal to 0.9 and minibatches of 128 images. The weight decay factor was equal to . Importantly, weight decay needs to be turned off for the layers that use mean and contrast normalization. Training each of the three models takes two weeks using a single NVIDIA Titan GPU. Similarly to [4], we resized the training images to have small dimension equal to 256 pixels while preserving their aspect ratio and not cropping their large dimension. We also subtracted for each image pixel the global mean RGB color values computed over the whole Imagenet training set. During training, we presented the networks with
crops randomly sampled from the resized image area, flipped lefttoright with probability 0.5, also injecting global color noise exactly as in
[18]. During evaluation, we presented the networks with 10 regularly sampled image crops (center + 4 corners, as well as their lefttoright flipped versions).Weight visualization
We visualize in Figure 3 the layer weights at the first layer of the networks above. The networks learn receptive fields sensitive to edge, blob, texture, and color patterns.
Classification results
We report at Table 3 our results on the Imagenet ILSVRC2012 benchmark, also including results previously reported in the literature [18, 39, 32]. These all refer to the top5 error on the validation set and are obtained with a single network. Our best result at 13.6% with the proposed EpitomicNorm network is 0.6% better than the baseline MaxPool result at 14.2% error. The improved performance that we got with the MaxPool baseline network compared to Overfeat [32] is most likely due to our use of LRN and aspect ratio preserving image resizing.
Further experimental results with the epitomic model on the Caltech101 task and on the MNIST and CIDAR10 datasets are described in [28].
Meancontrast normalization and convergence speed
We comment on the learning speed and convergence properties of the different models we experimented with on Imagenet. We show in Figure 4 how the top5 validation error improves as learning progresses for the different models we tested, with or without mean+contrast normalization. For reference, we also include a corresponding plot we reproduced for the original model of Krizhevsky et al. [18]. We observe that mean+contrast normalization significantly accelerates convergence of both epitomic and maxpooled models, without however significantly influencing the final model quality. The epitomic models converge faster and are stabler during learning compared to the maxpooled baselines, whose performance fluctuates more.
Experiments with larger and deeper epitomic networks
We have also experimented with larger (ClassB) and very deep (ClassC) versions of the proposed deep epitomic networks. The large ClassB network has the same number of levels but more neurons per layer than the networks in ClassA. It achieves an error rate of 11.9%.
Inspired by the success of the topperforming methods in this year’s Imagenet competition, we have also very recently experimented with a very deep network having 13 convolutional and 3 fully connected layers, which roughly follows the architecture of the 16 layer net in [33]. Our ClassC deep epitomic network achieves 10.0% error rate in the Imagenet task. The stateofart 16 layer net in [33] (without multiscale training/testing) achieves an even lower 9.0% error rate, but using a more sophisticated procedure for aggregating the results of multiple image crops (in place of our simple 10view testing procedure). As extra evidence to the improved robustness of training our deep epitomic networks, it is noteworthy to mention that we managed to train our very deep epitomic net starting from a random initialization, while [33] had to bootstrap their very deep networks from shallower ones.
3 Explicit Scale and Position Search in DCNNs
The effects of object translation and scaling impede the training of accurate classifiers from datasets that lack bounding box annotations  as is the case in the ImageNet classification Challenge. The Epitomic Convolution/MaxPooling modules allow us to extract an image representation that is invariant to signal deformations taking place at the pooling region’s scale; when used in alternation with feature downsampling (‘striding’) this can result in invariance to increasingly largescale signal transformations, eventually dealing with global position and scale changes.
A better treatment of deformations can be achieved by factoring deformations into local (nonrigid) and global (translation/scale) changes. We can then simulate the effect of the latter during training and testing, by transforming the input images, obtaining us an additional hold on the problem. We now describe how this idea can be exploited in the setting of Multiple Instance Learning (MIL).
3.1 MILbased training of DCNNs
Considering a binary classification problem with imagelabel pairs , training aims at minimizing the following criterion:
(4) 
where is the classifier,
is the loss function and
is a regularizer.Dataset augmentation amounts to turning an image into a set of images by transforming synthetically; e.g. considering translations and scalings yields a set with elements. The most common approach to using Dataset augmentation consists in treating each element of as a new training sample, i.e. substituting the loss in by the sum of the classifier’s loss on all images:
(5) 
This corresponds to the dataset augmentation technique use e.g. in [14]. A recently introduced alternative is the ‘sumpooling’ technique used in [33], which can be understood as using the following loss:
(6) 
which averages the classifier’s score over translated versions of the input image. The summation used in both of these approaches favors classifiers that consistently score highly on positive samples, irrespective of the object’s position and scale  this is when the loss is minimized. As such, these classifiers can be seen as pursuing the invariance of .
There is however a tradeoff between invariance and classification accuracy [36]. Even though pursuing invariance accounts for the effects of transformations, it does not make the classification task any easier: the training objective aims at a classifier that would allow all transformed images to make it through its ‘sieve’. Understandably, a classifier that only considers centered objects of a fixed scale can acchieve higher accuracy: this would allow us to devotes all modelling resources to the treatment of local deformations.
For this, we let our classifier ‘choose’ its preferred transformation In particular, we define the loss function to be:
(7) 
which amounts to letting the classifier choose the transformation that maximizes its response on a persample basis, and then accordingly penalizing that response. In particular the loss function requires that the classifier’s response is large on at least one position for a positive sample  and small everywhere for a negative.
This idea amounts to the simplest case of Multiple Instance Learning [6]: can be seen as a bag of features and the individual elements of can be seen as instances. For the particular case of the hinge loss function, this would lead us to the latentSVM training objective [8, 2].
Using this loss function during training amounts to treating the object’s position and scale as a latent variable, and performing alternating optimization over the classifier’s score function. During testing we perform a search over transformations and keep the best classifier score, which can be understood as maximizing over the latent transformation variables. The resulting score is transformationinvariant, but is built on top of a classifier tuned for a single scale and translation combination. The MIL setting allows us to train and test our classifiers consistently, using the same set of image translations and scalings.
Model  Epitomic  Epitomic 
(ClassB)  (patchwork)  
Top5 Error  11.9%  10.0% 
3.2 Efficient Convolutional Implementation
We now turn to practical aspects of integrating MIL into DCNN training. DCNNs are commonly trained with input images of a fixed size, . For an arbitrarilysized input image , if we denote by its image pyramid, naively computing the maximization in Eq. 7 would require to cropping many boxes from , evaluating on them, yielding , and then penalizing during training (we ignore downsampling and boundary effects for simplicity). Doing this would require a large amount of GPU memory, communication and computation time. Instead, by properly modifying the input and architecture of our network we can share computation to efficently implement exhaustive search during training and testing.
For this, we first draw inspiration from the ‘image patchwork’ technique introduced in [7] and exploited in DCNNs by [10]. The technique consists in embedding a whole image pyramid , into a single, larger, patchwork image ; any position in corresponds to a combination in . This was originally conceived as a means of accelerating multiscale FFTbased convolutions in [7]
and convolutional feature extraction in
[10]. Instead we view it a stepping stone to implementing scale and position search during DCNN training.In particular, we treat the last, fullyconnected, layers of a DCNN as convolution kernels; we can then obtain the score described above by providing as input to our network, since the output of our network’s final layer at any position will correspond to the output corresponding to a square cropped around . This allows us to incorporate the operation used in MIL’s training criterion, Eq. 7, as an additional maxpooling layer situated on top of the network’s original score function. This makes it possible to efficiently incorporate global scale and position search in a seamless manner within DCNN training.
3.3 Image Classification Results
We have experimented with the scheme outlined above in combination with our Deep Epitomic Network (ClassB variant) presented in the previous Section. We use a
patchwork formed from 6 different image scales (square boxes with size 400, 300, 220, 160, 120, and 90 pixels). We have resized all train/test images to square size, changing their aspect ratio if needed. We have initialized this scale/position search net with the parameters of our standard ClassB epitomic net. We finetuned the network parameters for about an epoch on the Imagenet train set, following the training methodology outlined earlier.
We have obtained a substantial further decrease in the testing error rates, cutting the top5 error rate from 11.9% down to 10.0%, as shown in Table 4. This reduction in error rate is competitive with the best reduction obtained by more complicated techniques involving many views for evaluation [33, 33], while also allowing for consistent endtoend training and testing.
The network outlined above also provides cues for the scale and position of the dominant object in the image. A simple fixed mapping of the “argmax” patchwork position in the last maxpooling layer (computed by averaging the bounding box positions in the training set) yields 48.3% error rate in the Imagenet 2012 localization task without incurring any extra computation.
4 Sliding Window Object Detection with DCNNs
The success of explicit position and scale search in image classification suggests using DCNNs for slidingwindow detection; even though for pedestrians excellent results have been reported in [25] recent works on combining convolutional networks [32], or sliding window detectors with CNN features [10, 27] still lag behind the current stateoftheart techniques [9, 13, 24].
Starting from the RCNN work of [9], all such techniques compute DCNN features ‘ondemand’ for a set of 10002000 image regions delivered by selective search [35], and apply a separately trained SVM detection on top. This approach has recently been shown to deliver compelling detection results; most recently, [9] have shown that combining RCNNs with the network of [33] pushes the mean AP performance on Pascal VOC 2007 to ( without bounding box regression), but at the cost of 60 seconds per image (acceleration techniques such as Spatial Pyramid Pooling [13] can still be applied, though).
Despite the performance gap of sliding window detection to RCNNs, we consider sliding window detection simpler, and potentially more amenable to analysis and improvement.
4.1 Explicit search over aspect ratios
Our basic object detection system uses as input to a DCNN an image patchwork that includes 11 scales logarithmically sampled, from 2 times down to 1/6 of the image size. Unlike recent works [10, 27] that only operate with the first five, ‘convolutional’ layers of a deeper network, in our case we set the fullyconnected layers operate convolutionally, and use the DCNN class scores for proposing square bounding boxes as object detection proposals. This processes a typical PASCAL VOC 2007 image in less than 1 sec on a Titan Tesla K40.
This square bounding box detector (without any bounding box regression postprocessing) yields a mean Average Precision of on Pascal VOC 2007. To further analyze which of this system’s errors are due to constraining the bounding box proposals to be square, we investigated the system’s performance in the presence of an ‘oracle’ that provides the optimal aspect ratio (using the ground truth annotations) for any given square bounding box proposal. We found this oracle bounding box prediction to increase performance to . This indicates that square box prediction is insufficient for achieving competitive object detection results.
Once again, we pursue an explicit search approach to directly estimate the aspect ratio of bounding box proposals without needing to resort to an oracle. We account for aspect ratio variability by scaling the image along a single dimension. For instance, scaling an image by
vertically means that a verticallyelongated region appears as a square region in the transformed image. Our square detector can then find this preferable to other, differently scaled versions of the same region, and thereby hint at the right object ratio. Aspect ratios that receive a lower score are eliminated at the final nonmaximum suppression stage. We account for aspect ratio during both testing and training (see below).We perform this operation for 5 distinct aspect ratios, spanning the range of with a geometric progression, as illustrated in Figure 6. This is applied at the whole patchwork level – sliding window detection on these patchworks then amounts to a joint search over scale, position, and aspect ratio. This is more timedemanding (requiring 5 times more computation) but still quite fast, requiring about 5 secs on a Tesla K40 for an average Pascal VOC 2007 image, and yields nonsquare bounding box predictions without resorting to an oracle.
The related detection results are shown in Table 5. Aspect ratio search yields a very competitive mean Average Precision score of (without any bounding box regression postprocessing). This is only slightly lower than the oraclebased score , indicating that also normalizing for aspect ratio during training leads to better object models.
It is noteworthy that our mAP result is significantly better than the mAP result reported very recently by [37]. Our better results should be attributed to our different training procedure (detailed below), our explicit search over aspect ratios, and the use of a more powerful DCNN classifier. Our system is also significantly simpler than [37] (which also integrates deformable part models and includes non maximum suppression during training). We anticipate that integrating these components into our system could further increase performance at a higher computational cost.
We observe that our system’s average performance ( mAP) is still below the one obtained by [9] when using the network of [33] ( mAP without bounding box regression). This can be attributed to several aspects of our system, including (i) using a smaller number of network parameters (detailed below) (ii) performing the detection with smaller windows (detailed below) (iii) not using a retraining stage with the hinge loss and hardnegative mining, as [9] do, and (iv) missing out on regions found by Selective Search. We are confident that factor (iv) is the least important  having experimentally verified that the recall of bounding boxes is systematically better according to our pyramid’s hypothesized positions, rather than the boxes delivered by Selective Search. We are currently investigating the effects of factors (i)(iii). Still, we consider that our system has an edge on the efficiency side: our detector requires approximately 5 seconds to consider all position, scale and aspect ratio combinations, while the system of [9] with the network of [33] requires approximately 60 seconds, on identical hardware (a Tesla K40 GPU).
VOC 2007 test  aero  bike  bird  boat  bottle  bus  car  cat  chair  cow  table  dog  horse  mbike  person  plant  sheep  sofa  train  tv  mAP 

Our work (VGG)  64.4  72.1  54.6  40.4  46.5  66.2  72.9  58.2  31.8  69.8  31.8  59.3  71.1  68.3  64.7  31.0  55.0  49.8  55.3  64.4  56.4 
RCNN7 [9] (VGG)  71.6  73.5  58.1  42.2  39.4  70.7  76.0  74.5  38.7  71.0  56.9  74.5  67.9  69.6  59.3  35.7  62.1  64.0  66.5  71.2  62.2 
RCNN7 [9] (UoT)  64.2  69.7  50.0  41.9  32.0  62.6  71.0  60.7  32.7  58.5  46.5  56.1  60.6  66.8  54.2  31.5  52.8  48.9  57.9  64.7  54.2 
DPM [37] (UoT)  49.3  69.5  31.9  28.7  40.4  61.5  61.5  41.5  25.5  44.5  47.8  32.0  67.5  61.8  46.7  25.9  40.5  46.0  57.1  58.2  46.9 
Input image  Patchwork,  Patchwork, 
‘car’ score,  ‘car’ score,  
Patchwork,  Patchwork,  Patchwork, 
‘car’ score,  ‘car’ score,  ‘car’ score, 
Patchwork images (even rows) and car detector scores (odd rows) used for explicit position, scale, and aspect ratio (‘
’) search. We observe that the score is maximized at patchwork positions (i.e. image positions, scale, and aspect ratio combinations) corresponding to squareshaped cars.4.2 DCNN training for sliding window detection
We deviate from the newtork finetuning used in the RCNN system [9] in two ways: firstly, we do not rely on the Selective Search [35] region proposals to gather training samples; and, secondly, we modify the network’s structure to process smaller images, and, resultantly, include less parameters. We detail these two modifications below.
4.2.1 Model Training
The RCNN system of [9] adapts a network trained for the Imagenet classification task to object detection on Pascal VOC. For this, the authors use the regions proposed by selective search to generate positive and negative training samples, for each of the 20 categories of Pascal VOC; if a region has an IntersectionoverUnion (IoU) above for any bounding box of a class it is declared as being a positive example for that class, or else it is a negative example. These examples are used in a network ‘finetuning’ stage, which amounts to running backpropagation with these training samples.
Rather than relying on Selective Search to provide training samples, we exploit the dense sampling of positions, scales, and aspect ratios of our algorithm. This allows us to use substantially cleaner examples, and train with a higher IoU threshold for positives.
In particular, as illustrated in Figure 7, we keep track of all the windows that would be visited by our sliding window detector; given a groundtruth bounding box, we randomly pick 30 of those that have an IoU score above with it; if we have less than 30, we decrease the threshold to and if we still cannot find as many we set the threshold finally to . Similarily, for every positive bounding box we sample 200 negative boxes that have an IoU score between and  aiming at ‘teaching’ our classifier what a poor localization looks like.
We have verified that doing this, rather than using selective search windows gives us clearly better detector scores, both visually and quantitatively. We consider this to be one of the advantages of using a sliding window detector, namely that we do not need to rely on an external region proposal module for training.
a  b  c  d 
Sliding window positives (left) and negatives (right)  Selective search positives (left) and negatives (right). 
4.2.2 Repurposing Classification Networks for Image Detection
Herein we describe how we have repurposed the publicly available stateofart 16 layer classification network of [33] (VGG16) into an efficient and effective component of our sliding window detector.
Dense sliding window feature extraction with the hole algorithm
Dense spatial score evaluation is instrumental in the success of our CNN sliding window detector.
As a first step to implement this, we convert the fullyconnected layers of VGG16 into convolutional ones and run the network in a convolutional fashion on the patchwork. However this is not enough as it yields very sparsely computed detection scores (with a stride of 32 pixels). To compute scores more densely at our target stride of 8 pixels, we develop a variation of the method previously employed by [11, 32]. We skip subsampling after the last two maxpooling layers in the network of [33] and modify the convolutional filters in the layers that follow them by introducing zeros to increase their length ( in the last three convolutional layers and in the first fully connected layer). We can implement this more efficiently by keeping the filters intact and instead sparsely sample the feature maps on which they are applied on using a stride of 2 or 4 pixels, respectively. This approach is known as the ‘hole algorithm’ (‘atrous algorithm’) and has been developed before for efficient computation of the undecimated wavelet transform [23]
. We have implemented this within the Caffe framework by adding to the
im2col function (it converts multichannel feature maps to vectorized patches) the option to sparsely sample the underlying feature map.Shrinking the receptive field of neural networks
Most recent DCNNbased image recognition methods rely on networks pretrained on the Imagenet largescale classification task. These networks typically have large receptive field size, in the case of the VGG16 net we consider. We have found this receptive field size to be too large to allow good localization accuracy (unless one uses heavily zoomedin versions of the image). Moreover, after converting the network to a fully convolutional one, the first fully connected layer has 4,096 filters of large spatial size and becomes the computational bottleneck in our sliding window detector system.
We have addressed both of these serious practical problems by spatially subsampling the first FC layer to spatial size. This has reduced the receptive field of the network down to pixels and has reduced computation time for the first FC layer by 3 times.
5 Conclusions
This paper examines multiple facets of invariance in the context of deep convolutional networks for visual recognition. First, we have proposed a new epitomic convolutional layer which acts as a substitute to a pair of consecutive convolution and maxpooling layers, and shown that it brings performance improvements and exhibits better behavior during training. Second, we have demonstrated that treating scale and position as latent variables and optimizing over them during both training and testing yields significant image classification performance gains. Pushing scale and position search further, we have shown promising results which suggest that DCNNs can be efficient and effective for dense sliding window based object detection. Further pursuing this topic is the main direction of our future work.
Reproducibility
We implemented the proposed methods by extending the excellent Caffe software framework [16]. When this work gets published we will publicly share our source code and configuration files with exact parameters fully reproducing the results reported in this paper.
Acknowledgments
We gratefully acknowledge the support of NVIDIA Corporation with the donation of GPUs used for this research.
References
 [1] M. Aharon and M. Elad. Sparse and redundant modeling of image content using an imagesignaturedictionary. SIAM J. Imaging Sci., 1(3):228–247, 2008.
 [2] S. Andrews, T. Hofmann, and I. Tsochantaridis. Support vector machines for multiple instance learning. In NIPS, 2002.
 [3] L. Benoît, J. Mairal, F. Bach, and J. Ponce. Sparse image representation with epitomes. In Proc. CVPR, pages 2913–2920, 2011.
 [4] K. Chatfield, K. Simonyan, A. Vedaldi, and A. Zisserman. Return of the devil in the details: Delving deep into convolutional nets. arXiv, 2014.
 [5] J. Deng, W. Dong, R. Socher, L. LiJia, K. Li, and L. FeiFei. Imagenet: A largescale hierarchical image database. In Proc. CVPR, 2009.
 [6] T. G. Dietterich, R. H. Lathrop, and T. Lozanoperez. Solving the multipleinstance problem with axisparallel rectangles. Artificial Intelligence, 89:31–71, 1997.
 [7] C. Dubout and F. Fleuret. Exact acceleration of linear object detectors. In Computer Vision–ECCV 2012, pages 301–311. Springer Berlin Heidelberg, 2012.
 [8] P. Felzenszwalb, R. Girshick, D. McAllester, and D. Ramanan. Object detection with discriminatively trained partbased models. IEEE Trans. PAMI, 32(9):1627–1645, 2010.
 [9] R. Girshick, J. Donahue, T. Darrell, and J. Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proc. CVPR, 2014.
 [10] R. Girshick, F. Iandola, T. Darrell, and J. Malik. Deformable part models are convolutional neural networks. arXiv preprint arXiv:1409.5403, 2014.
 [11] A. Giusti, D. Ciresan, J. Masci, L. Gambardella, and J. Schmidhuber. Fast image scanning with deep maxpooling convolutional neural networks. In Proc. IEEE Int. Conf. on Image Processing, 2013.
 [12] I. Goodfellow, D. WardeFarley, M. Mirza, A. Courville, and Y. Bengio. Maxout networks. In Proc. ICML, 2013.
 [13] K. He, X. Zhang, S. Ren, and J. Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. In ECCV, 2014.
 [14] A. G. Howard. Some improvements on deep convolutional neural network based image classification, 2013. arXiv:1409.0575.
 [15] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y. LeCun. What is the best multistage architecture for object recognition? In Proc. ICCV, pages 2146–2153, 2009.
 [16] Y. Jia. Caffe: An open source convolutional architecture for fast feature embedding, 2013.
 [17] N. Jojic, B. Frey, and A. Kannan. Epitomic analysis of appearance and shape. In Proc. ICCV, pages 34–41, 2003.
 [18] A. Krizhevsky, I. Sutskever, and G. Hinton. ImageNet classification with deep convolutional neural networks. In Proc. NIPS, 2013.
 [19] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradientbased learning applied to document recognition. Proc. IEEE, 86(11):2278–2324, 1998.

[20]
H. Lee, R. Grosse, R. Ranganath, and A. Y. Ng.
Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations.
In Proc. ICML, 2009.  [21] M. Lin, Q. Chen, and S. Yan. Network in network. In ICLR, 2014.
 [22] D. Lowe. Distinctive image features from scaleinvariant keypoints. IJCV, 60(2):91–110, 2004.
 [23] S. Mallat. A Wavelet Tour of Signal Processing. Acad. Press, 2 edition, 1999.
 [24] W. Ouyang, P. Luo, X. Zeng, S. Qiu, Y. Tian, H. Li, S. Yang, Z. Wang, Y. Xiong, C. Qian, Z. Zhu, R. Wang, C. C. Loy, X. Wang, and X. Tang. Deepidnet: multistage and deformable deep convolutional neural networks for object detection. CoRR, abs/1409.3505, 2014.
 [25] W. Ouyang and X. Wang. Joint deep learning for pedestrian detection. In ICCV.
 [26] W. Ouyang and X. Wang. Joint deep learning for pedestrian detection. In Proc. ICCV, 2013.
 [27] P.A. Savalle and S. Tsogkas and G. Papandreou and I. Kokkinos. Deformable part models with cnn features. In 3rd Parts and Attributes Workshop, ECCV.
 [28] G. Papandreou. Deep epitomic convolutional neural networks. arXiv, 2014.
 [29] G. Papandreou, L.C. Chen, and A. Yuille. Modeling image patches with a generic dictionary of miniepitomes. In Proc. CVPR, 2014.
 [30] A. Razavian, H. Azizpour, J. Sullivan, and S. Carlsson. CNN features offtheshelf: An astounding baseline for recognition. In Proc. CVPR Workshop, 2014.
 [31] M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature neuroscience, 2(11):1019–1025, 1999.
 [32] P. Sermanet, D. Eigen, X. Zhang, M. Mathieu, R. Fergus, and Y. LeCun. Overfeat: Integrated recognition, localization and detection using convolutional networks. 2014.
 [33] K. Simonyan and A. Zisserman. Very deep convolutional networks for largescale image recognition, 2014. http://arxiv.org/abs/1409.1556/.
 [34] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. CoRR, abs/1409.4842, 2014.
 [35] J. R. R. Uijlings, K. E. A. van de Sande, T. Gevers, and A. W. M. Smeulders. Selective search for object recognition. 2013.
 [36] M. Varma and D. Ray. Learning the discriminative powerinvariance tradeoff. In ICCV, 2007.
 [37] L. Wan, D. Eigen, and R. Fergus. Endtoend integration of a convolutional network, deformable parts model and nonmaximum suppression. arXiv, 2014.
 [38] M. Zeiler and R. Fergus. Stochastic pooling for regularization of deep convolutional neural networks. 2013.
 [39] M. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. arXiv, 2013.
 [40] M. Zeiler, D. Krishnan, G. Taylor, and R. Fergus. Deconvolutional networks. In Proc. CVPR, 2010.
Comments
There are no comments yet.