Object detection is one of the fundamental vision problems. It provides basic information for semantic understanding of images and videos. Therefore, it has attracted a lot of attentions. Detection is regarded as a problem of classifying candidate boxes. Due to large variations in viewpoints, poses, occlusions, lighting conditions and background, object detection is challenging. Recently, since the seminal work in , convolutional neural networks (CNNs) [2, 3, 4, 5, 6] have been proved to be effective for object detection because of its power in learning features.
In object detection, a candidate box is counted as true-positive for an object category if the intersection-over-union (IoU) between the candidate box and the ground-truth box is greater than a threshold. When a candidate box covers only a part of the./ ground-truth regions, there are some potential problems.
Visual cues in this candidate box may not be sufficient to distinguish object categories. Take the candidate boxes in Fig. 1(a) for example, they cover parts of animal bodies and have similar visual cues, but with different ground-truth class labels. It is hard to distinguish their class labels without information from larger surrounding regions of the candidate boxes.
Classification on the candidate boxes depends on how much an object is occluded, which has to be inferred from larger surrounding regions. Because of occlusion, the candidate box covering a rabbit head in Fig. 1(b1) should be considered as a true positive of rabbit, because of large IoU with the ground truth. Without occlusion, however, the candidate box covering a rabbit head in Fig. 1(b2) should not be considered as a true positive because of small IoU with the ground truth.
To handle these problems, contextual regions surrounding candidate boxes are naturally helpful. Besides, surrounding regions also provide contextual information about background and other nearby objects to help detection. Therefore, in our deep model design and some existing works , information from surrounding regions are used to improve classification of a candidate box.
On the other hand, when CNN takes a large region as input, it sacrifices the ability in describing local details, which are sometimes critical in discriminating object classes, since CNN encodes input to a fixed-length feature vector. For example, the sizes and shapes of ears are critical details in discriminating rabbits from hamsters. But they may not be identified when they are in a very small part of the CNN input. It is desirable to have a network structure that takes both surrounding regions and local part regions into consideration. Besides, it is well-known that features from different resolutions are complementary.
One of our motivations is that features from different resolutions and support regions validate the existence of one another. For example, the existence of rabbit ears in a local region helps to strengthen the existence of a rabbit head, while the existence of the upper body of a rabbit in a larger contextual region also helps to validate the existence of a rabbit head. Therefore, we propose that features with different resolutions and support regions should pass messages to each other in multiple layers in order to validate their existences jointly during both feature learning and feature extraction. This is different from the naive way of learning a separate CNN for each support region and concatenating feature vectors or scores from different support regions for classification.
Our further motivation is that care should be taken when passing messages among contextual and local regions. The messages are not always useful. Taking Fig. 1(c) as an example, the local details of the rabbit ear is helpful in recognizing the rabbit head, and therefore, its existence has a large weight in determining the existence of the rabbit head. However, when this rabbit ear is artificial and worn on a girl’s head in Fig. 1(d), it should not be used as the evidence to support the existence of a rabbit head. Extra information is needed to determine whether the message of a contextual visual pattern, e.g. rabbit ear, should be transmitted to support the existence of a target visual pattern, e.g. rabbit head. In Fig. 1(d), for example, the extra human-face visual cues indicates that the message of the rabbit ear should not be transmitted to strengthen the evidence of seeing the rabbit head. Taking this observation into account, we design a network that uses extra information from the input image region to adaptively control message transmission.
In this paper, we propose a gated bi-directional CNN (GBD-Net) architecture that adaptively models interactions of contextual and local visual cues during feature learning and feature extraction. Our contributions are in three-fold.
A bi-directional network structure is proposed to pass messages among features from multiple support regions of different resolutions. With this design, local patterns pass detailed visual messages to larger patterns and large patterns passes contextual visual messages in both directions. Therefore, local and contextual features cooperate with each other on improving detection accuracy. We implement message passing by convolution.
We propose to control message passing with gate functions. With such gate functions, message from a found pattern is transmitted only when it is useful for some samples, but is blocked for others.
A new deep learning pipeline for object detection. It effectively integrates region proposal, feature representation learning, context modeling, and model averaging into the detection system. Detailed component-wise analysis is provided through extensive experimental evaluation. This paper also investigates the influence of CNN structures for the large-scale object detection task under the same setting. The details of our submission to the ImageNet Object Detection Challenge is provided in this paper, with source code provided online.
The proposed GBD-Net is implemented under the fast RCNN detection frameworks . The effectiveness is validated through the experiments on three datasets, ImageNet , PASCAL VOC2007  and Microsoft COCO .
Ii Related work
Impressive improvements have been achieved on object detection in recent years. They mainly come from better region proposals, detection pipeline, feature learning algorithms and CNN structures, iterative bounding box regression and making better use of local and contextual visual cues.
Region proposal. Selective search  obtained region proposals by hierarchically grouping segmentation results. Edgeboxes  evaluated the number of contours enclosed by a bounding box to indicate the likelihood of an object. Faster RCNN  and CRAFT  obtained region proposals with the help of convolutional neural networks. Pont-Tuest and Van Gool  studied the statistical difference between the Pascal-VOC dataset  to Microsoft CoCo dataset  to obtain better object proposals. Region proposal can be considered as a cascade of classifiers. At the first stage, millions of windows that are highly confident of being background are removed by region proposal methods and the remaining hundreds or southands are then used for classification. In this paper, we adopt an improved version of the CRAFT in providing the region proposals.
Iterative regression. Since the candidate regions are not very accurate in locating objects, multi-region CNN , LocNet  and AttractioNet  are proposed for more accurate localization of the objects. These approaches conduct bounding box regression iteratively so that the candidate regions gradually move towards the ground truth object.
Object detection pipeline. The state-of-the-art deep learning based object detection pipeline RCNN  extracted CNN features from the warped image regions and applied a linear SVM as the classifier. By pre-training on the ImageNet classification dataset, it achieved great improvement in detection accuracy compared with previous sliding-window approaches that used handcrafted features on PASCAL-VOC and the large-scale ImageNet object detection dataset. In order to obtain a higher speed, Fast RCNN  shared the computational cost among candidate boxes in the same image and proposed a novel roi-pooling operation to extract feature vectors for each region proposal. Faster RCNN  combined the region proposal step with the region classification step by sharing the same convolution layers for both tasks. Region proposal is not necessary. Some recent approaches, e.g. Deep MultiBox , YOLO  and SSD 
, directly estimate the object classes from predefined sliding windows.
Learning and design of CNN. A large number of works [3, 4, 5, 6, 23, 24] aimed at designing network structures and they are shown to be effective in the detection task. The works in [3, 4, 5, 6, 24] proposed deeper networks. People [25, 5, 26] also investigated how to effectively train deep networks. Simonyan et al.  learn deeper networks based on the parameters in shallow networks. Ioffe et al.  normalized each layer inputs for each training mini-batch in order to avoid internal covariate shift. He et al. 
investigated parameter initialization approaches and proposed parameterized RELU. Liet al.  proposed multi-bias non-linear activation (MBA) layer to explore the information hidden in the magnitudes of responses.
Our contributions focus on a novel bi-directional network structure to effectively make use of multi-scale and multi-context regions. Our design is complementary to above region proposals, pipelines, CNN layer designs, and training approaches. There are many works on using visual cues from object parts [28, 17, 29] and contextual information [28, 17]. Gidaris et al.  adopted a multi-region CNN model and manually selected multiple image regions. Girshick et al.  and Ouyang et al.  learned the deformable parts from CNNs. In order to use the contextual information, multiple image regions surrounding the candidate box were cropped in  and whole-image classification scores were used in . These works simply concatenated features or scores from object parts or context while we pass message among features representing local and contextual visual patterns so that they validate the existence of each other by non-linear relationship learning. Experimental results show that GBD-Net is complementary to the approaches in [17, 28]. As a step further, we propose to use gate functions for controlling message passing, which was not investigated in existing works.
Passing messages and gate functions.
Message passing at the feature level was studied in Recurrent neural network (RNN) and gate functions are used to control message passing in long short-term memory (LSTM) networks. However, both techniques have not been used to investigate feature extraction from multi-resolution and multi-context regions yet, which is fundamental in object detection. Our message passing mechanism and gate functions are specifically designed for this problem setting. GBD-Net is also different from RCNN and LSTM in the sense that it does not share parameters across resolutions/contexts.
Iii Gated Bi-directional CNN
We briefly introduce the fast RCNN pipeline in Section III-A and then provide an overview of our approach in Section III-B. Our use of roi-pooling is discussed in SectionIII-C. SectionIII-D focuses on the proposed bi-directional network structure and its gate function. Section III-E introduces the modified GBD structure. SectionIII-F explains the details of the training scheme.
Iii-a Fast RCNN pipeline
We adopt the Fast RCNN as the object detection pipeline with four steps.
Step 1) Candidate box generation. Thousands or hundreds of candidate boxes are selected from a large pool of boxes.
Step 2) Feature map generation. Given an input as the input of CNN, feature maps are generated.
Step 3) Roi-pooling. Each candidate box is considered as a region-of-interest (roi) and a pooling function is operated on the CNN feature maps generated in the step 2. After roi-pooling, candidate boxes of different sizes are pooled to have the same feature vector size.
Step 4) Classification. CNN features after roi-pooling go through several convolutions, pooling and fully connected layers to predict the class label and location refinement of candidate boxes.
Iii-B Framework overview
An overview of the GBD-Net is shown in Fig. 2. Based on the fast RCNN pipeline, our proposed model takes an image as input, uses roi-pooling operations to obtain features with different resolutions and different support regions for each candidate box, and then the gated bi-direction layer is used for passing messages among features, and final classification is made. We use the BN-net  as the baseline network structure, i.e. if only one support region and one branch is considered, Fig. 2 becomes a BN-net. Currently, messages are passed between features in one layer. It can be extended by adding more layers between the roi-pooled feature and refined feature for passing messages in these layers.
We use the same candidate box generation and feature map generation steps as the fast RCNN introduced in Section III-A. In order to take advantage of complementary visual cues in the surrounding/inner regions, the major modifications of fast RCNN are as follows.
In the roi-pooling step, regions with the same center location but different sizes are pooled from the same feature maps for a single candidate box. The regions with different sizes before roi-pooling have the same size after roi-pooling. In this way, the pooled features corresponds to different support regions and have different resolutions.
Features with different resolutions optionally go through several CNN layers to extract their high-level features.
The bi-directional structure is designed to pass messages among the roi-pooled features with different resolutions and support regions. In this way, features corresponding to different resolutions and support regions verify each other by passing messages to each other.
Gate functions are used to control message transmission.
After message passing, the features for different resolutions and support regions are then passed through several CNN layers for classification.
An exemplar implementation of our model is shown in Fig. 3
. There are 9 inception modules in the BN-net. Roi-pooling of multiple resolutions and support regions is conducted after the 6th inception module, which is inception (4d). Then the gated bi-directional network is used for passing messages among features and outputs , , , and . After message passing, , , and go through the 7th, 8th, 9th inception modules and the average pooling layers separately and then used for classification. There is option to place roi-pooling and GBD-Net after different layers of the BN-net. In Fig. 3, they are placed after inception (4e). In the experiment, we also tried to place them after the input image.
Iii-C Roi-pooling of features with different resolutions and support regions
We use the roi-pooling layer designed in  to obtain features with different resolutions and support regions. Given a candidate box with center location , width and height
, its padded bounding box is denoted by. is obtained by enlarging the original box along both and directions with scale as follows:
In RCNN , is 0.2 by default and the input to CNN is obtained by warping all the pixels in the enlarged bounding box to a fixed size , where for the BN-net . In fast RCNN , warping is done on feature maps instead of pixels. For a box , its corresponding feature box
on the feature maps is calculated and roi-pooling uses max pooling to convert the features into feature maps with a fixed size.
In our implementation, a set of padded bounding boxes with different are generated for each candidate box . By roi-pooling on the CNN features, these boxes are warped into the same size, which is for BN-net. The CNN features of these padded boxes have different resolutions and support regions. In the roi-pooling step, regions corresponding to and are warped into features and respectively. Figure 4 illustrates this procedure.
Since features and after roi-pooling are of the same size, the context scale value determines both the amount of padded context and also the resolution of the features. A larger value means a lower resolution for the original box but more contextual information around the original box, while a small means a higher resolution for the original box but less context.
Iii-D Gated Bi-directional network structure (GBD-v1)
Iii-D1 Bi-direction structure
Figure 5 shows the architecture of our proposed bi-directional network. It takes features and as input and outputs features , , and for a single candidate box. In order to have features with different resolutions and support regions cooperate with each other, this new structure builds two directional connections among them. One directional connection starts from features with the smallest region size and ends at features with the largest region size. The other is the opposite.
For a single candidate box , representing features with context pad value . The forward propagation for the proposed bi-directional structure can be summarized as follows:
There are four different resolutions/contexts, .
represents the updated features after receiving message from with a higher resolution and a smaller support region. It is assumed that , since has the smallest support region and receives no message.
represents the updated features after receiving message from with a lower resolution and a larger support region. It is assumed that , since has the largest support region and receives no message.
concatenates CNN features maps along the channel direction.
The features and after message passing are integrated into using the convolutional filters .
represents the convolution operation. The biases and filters of convolutional layers are respectively denoted by and .
Element-wise RELU is used as the non-linear function .
From the equations above, the features in receive the messages from the high-resolution/small-context features and the features receive messages from the low-resolution/large-context features. Then collects messages from both directions to have a better representation of the th resolution/context. For example, the visual pattern of a rabbit ear is obtained from features with a higher resolution and a smaller support region, and its existence (high responses in these features) can be used for validating the existence of a rabbit head, which corresponds to features with a lower resolution and a larger support region. This corresponds to message passing from high resolution to low resolution in (2). Similarly, the existence of the rabbit head at the low resolution also helps to validate the existence of the rabbit ear at the high resolution by using (3). and are learned to control how strong the existence of a feature with one resolution/context influences the existence of a feature with another resolution/context. Even after bi-directional message passing, are complementary and will be jointly used for classification in later layers.
Our bi-directional structure is different from the bi-direction recurrent neural network (RNN). RNN aims to capture dynamic temporal/spatial behavior with a directed cycle. It is assumed that parameters are shared among directed connections. Since our inputs differ in both resolutions and contextual regions, convolutions layers connecting them should learn different relationships at different resolution/context levels. Therefore, the convolutional parameters for message passing are not shared in our bi-directional structure.
Iii-D2 Gate functions for message passing
Instead of passing messages in the same way for all the candidate boxes, gate functions are introduced to adapt message passing for individual candidate boxes. Gate functions are also implemented as convolution. The design of gate filters considers the following aspects.
has multiple feature channels. A different gate filter is learned for each channel.
The message passing rates should be controlled by the responses to particular visual patterns which are captured by gate filters.
The message passing rates can be determined by visual cues from nearby regions, e.g. in Fig. 1, a girl’s face indicates that the rabbit ear is artificial and should not pass message to the rabbit head. Therefore, the size of gate filters should not be and is used in our implementation.
We design gate functions as convolution layers with the sigmoid non-linearity to make the message passing rate in the range of (0,1). With gate functions, message passing in (2) and (3) for the bi-directional structure is changed:
is the element-wise sigmoid function anddenotes element-wise product. is the gate function to control message passing. It contains learnable convolutional parameters and uses features from the co-located regions to determine the rates of message passing. When is 0, the message is not passed. The formulation for obtaining is unchanged. Fig. 6 illustrates the bi-directional structure with gate functions.
Iii-E The modified GBD structure (GBD-v2)
For the models submitted to ImageNet challenge, the GBD-v1 is modified. The modified GBD-Net structure has the following formulation:
where and are defined in (7) and (8). Fig. 7 shows the modified GBD structure. The operations requried for obtaining and are the same as before. The main changes are in obtaining . The changes made are as follows.
First, in the previous GBD structure, and are concatenated and then convoled by filters to produce the output . In the modified sturcture, a max pooling is used for merging the information from and . This saves the memory and computation required by the convolution in the previous GBD structure.
Second, we add an identity mapping layer in the struture, which corresoponds to the in (12). The aim of the GBD structure is to refine the input by using the messages from other contextual features. Since the parameters for the layers after the output are from pretrained model, a drastic change of the output from the input would cause difficulty in training the layers after the layer to adapt at the training stage. Therefore, this drastic change would lead to difficulty in learning a good model. When we train the previous GBD structure, careful initialization of the convolution parameters and the gate functions has to be done in order to learn well. For example, we have to set the gate function close 0 and the convolution parameter close to identity mapping for initialization. With the identity mapping layer, however, a simple initialization using the approach in  works well.
Third, a constant is multiplied with the merged messages from other contextual regions. We empirically found that it improves detection accuracy by using to control the magnitude of the messages from other contextual features.
Iii-F Implementation details, training scheme, and loss function
For the state-of-the-art fast RCNN object detection framework, CNN is first pre-trained with the ImageNet image classification data, and then utilized as the initial point for fine-tuning the CNN to learn both object confidence scores and bounding-box regression offsets for each candidate box. Our proposed framework also follows this strategy and randomly initialize the filters in the gated bi-direction structure while the other layers are initialized from the pre-trained CNN. The final prediction on classification and bounding box regression is based on the representations in equation (4). For a training sample with class label and ground-truth bounding box offsets
, the loss function of our framework is a summation of the cross-entropy loss for classification and the smoothedloss for bounding box regression as follows:
where the predicted classification probability for classis denoted by , and the predicted offset is denoted by , if and otherwise. in our implementation. Parameters in the networks are learned by back-propagation.
Our GBD-Net builds upon the features of different resolutions and contexts. Its placement is independent of the place of roi-pooling. In an extreme setting, roi-pooling can be directly applied on raw pixels to obtain features of multiple resolutions and contexts, and in the meanwhile GBD-Net can be placed in the last convolution layer for message passing. In this implementation, fast RCNN is reduced to RCNN where multiple regions surrounding a candidate box are cropped from raw pixels instead of feature maps.
Iv The object detection framework on ImageNet 2016
In this section, we describe object detection framework used for our submission to the 2016 ImageNet Detection Challenge.
Iv-a Overview at the testing stage
Step 1) Candidate box generation. An improved version of CRAFT in  is used for generating the region proposal.
Step 2) Box classification. The GBD-Net predicts the class of candidate boxes.
Step 3) Average of multiple deep model outputs is used to improve the detection accuracy.
Step 4) Postprocessing. The whole-image classification scores are used as contextual scores for refining the detection scores. The bounding box voting scheme in  is adopted for adjusting the box locations based on its neigbouring boxes.
Iv-B Candidate box generation
We use two versions of object proposal. In early version of our method, we use the solutions published in  which is denoted as Craft-v2. In the final ImageNet submission, we further improve the results and denote it as Craft-v3. A brief review of Craft-v2 and details of Craft-v3 are described as follows.
Iv-B1 Craft-V1 and V2
In Craft , the RPN  is extended to be a two-stage cascade structure, following the “divide and conquer ” strategy in detection task. In the first stage, the standard RPN is used to generated about 300 proposals for each image, which is similar to the setting in . While in the second stage, a two-category classifier is further used to distinguish objects from background. Specially in the paper, we use a two-category fast RCNN . It provides fewer and better localized object proposals than the standard RPN. Craft-V1, which was used in our preliminary version , and Craft-V2 can be found it our early paper . Craft-V1 and Craft-V2 are only different in pre-training. Craft-V1 is pre-trained from 1000-class image classification, Craft-V2 is pre-trained from RPN .
Compared with Craft-v2, the differences in Craft-v3 includes:
Random crop is used in model training, to ensure objects in different scales are roughly trained equally.
Multi-scale pyramid is used in model testing, in order to improve recall of small objects.
The positive and negative samples in RPN training are balanced to be 1:1.
LocNet  object proposals are added, which we found are complementary to the Craft based proposals.
Implementation details and experimental comparison can be found it Section V-E1.
Iv-C Box classification with GBD-Net
The GBD-Net is used for predicting the object category of the given candidate boxes. The preliminary GBD-Net structure in  was based on the BN-net. In the challenge we make the following modifications:
The baseline network is pretrained on ImageNet 1000-class data with object-centric labels without adapting to fas RCNN. In the challenge, we learn the baseline network with object-centric labels by adapting it to fas RCNN.
A ResNet with 269 layers is used as the baseline model for the best performing GBD-Net.
The structure of GBD-Net is changed from GBD-v1 to GBD-v2, with details in Section III-E.
Iv-D Pretraining the baseline
Iv-D1 The baseline ResNet-269 model
The network structure of baseline ResNet with 269 layers is shown in Fig. 9. Compared with the ResNet  with 152 layers, we simply increase the number of stacked blocks for conv3_x, conv4_x, and conv5_x. The basic blocks adopt the identity mapping used in . At the training stage, the stochastic depth in  is used. Stochastic depth is found to reduce training time and test error in . For fast RCNN, we place the roi-pooling after the 234th layer, which is in the stacked blocks conv4_x.
Iv-D2 Adapt the pretraining for roi-pooling
Pretraining can be done on the ImageNet 1000-class image classification data by taking the whole image as the input of CNN, this is called image-centric pretraining. On the other hand, since bounding box labels are provided for these classes in ImageNet, the input of CNN can be obtained from warping image patches in the bounding boxes, which is called object-centric pretraining. For the RCNN framework, it is found by our previous work  that object-centric pretraining performs better than image-centric pretraining. For fast RCNN, however, we found that the CNN with object-centric pretraining does not perform better than the 1000-class image-centric pretraining. Take the BN-net as an exmaple, after finetuning on the ImageNet train+val1 data, the BN-net from the image-centric pretraining has 49.4% mAP on the ImageNet val2 while the BN-net from the object-centric pretraining has 48.4% mAP. This is caused by the following two reasons:
Change from constant relative contextual region in RCNN to variant relative contextual region fast RCNN. The receptive field of a neuron refers to the image region that influences the value of a neuron. In RCNN, the a contextual region with 0.2 the size of the bounding box is defined. Image patch within this contextual region is warped into a target size and then used as the input of CNN. Take BN-net for example, this target size is. The CNN only takes the visual cues in this contextual region into consideration. The number of pixels for the contextual region changes as the bounding box size changes. When pretraining the network for object-centric classification in , we adopted the RCNN scheme. The contextual region size changes as the bounding box changes. For fast RCNN, however, the contextual region size is the same for bounding boxes of different sizes. In this case, the relative contextual region changes as bounding box size changes. Take the BN-net with roi-pooling at inception (4d) for example. Because of the convolution and pooling in multiple layers, a neuron in inception (4d) has receptive field being 379. Therefore, the contextual region with 378 pixels influences the neurons after roi-pooling for bounding box of any size. For a bounding box with size , the contextual region used in the roi-pooled features has 378 pixels. On the other hand, for a bounding box with size , the contextual region used in the roi-pooled features also has 378 pixels. An example is shown in Fig. 8. This is caused by the convolution on the whole image in fast RCNN compared with the convolution on image patch in RCNN. The padded zeros in convolutional layers for the image patch in RCNN are replaced by contextual image region in fast RCNN. Therefore, the object-centric pretraining in  for RCNN does not match fast RCNN in terms of relative contextual region.
Change from image warping in RCNN to feature warping in fast RCNN. In order to obtain features of the same size for candidate regions of different sizes, RCNN warp the candidate image region. Fast RCNN keeps the image size unchanged and uses roi-pooling for warping features. Warping at image level for RCNN and roi-pooling at feature level are not equivalent operations.
In order to have the pretrained CNN aware of the differences mentioned above, we pretrain on object-centric task with roi-pooling layer included. Let denote the bounding box of an object. When pretraining the BN-net with the roi-pooling layer, we include 32 pixels as the contextual region for this object. Therefore, the target box is . To augment data, we randomly shake the target box as follows:
where and are respectively the width and height of the bounding box. , , , and are randomly sampled from independently. The image region within the box in (17) is warped into an image with shorter side randomly sampled from and the longer side constrained to be no greater than 597. Batch size is set as 256 with other settings the same as BN-net. We observe 1.5% mAP gain for BN-net and around 1.0% mAP gain for ResNet-101 with this pretraining when compared with pretraining by image-centric classification.
Iv-E Technical details on improving performance
Iv-E1 Multi-scale testing
Multi-scale training/testing has been developed in [8, 34] by selecting from a feature pyramid. We only use the multi-scale input at the testing stage. With a trained model, we compute feature maps on an image pyramid, with the shorter side of the image being and longer size being no greater than 1000. Roi-pooling and its subsequent layers are performed on the feature map of one scale. We did not observe obvious improvement by averaging the scores of a bounding box using its features pooled from multiple scales.
Iv-E2 Left-right flip
We adopt left-right flip at both the training stage and testing stage. At the training stage, the training images are augmented by flipping them. The candidate boxes are flipped accordingly. At the testing stage, an image and its corresponding candidate boxes are flipped and treated as the input of the CNN to obtained the detection scores for these boxes. The scores and estimated box locations from the original image and the flipped image are averaged.
Iv-E3 Bounding box voting
The bounding box voting scheme in  is adopted. After finding the peaked box with the highest score on its neighborhood, the final object location is obtained by having each of the boxes that overlap with the peaked one by more than a threshold to vote for the bounding box location using its score as weight. This threshold is set as 0.5 for IoU.
Iv-E4 Non-maximum suppression (NMS) threshold
For ImageNet, the NMS threshold was set as 0.3 by default. We empirically found 0.4 to be a better threshold. Setting this threshold from 0.3 to 0.4 provides 0.4-0.7% mAP gain, with variation for different models.
Iv-E5 Global context
From the pretrained image-centric CNN model, we finetune on the ImageNet detection data by treating it as an image classification problem. The 200-class image classification score is then used for combining with the 200-class object detection scores by weighted averaging. The weight are obtained by greedy search from the val1 data.
Iv-E6 Model ensemble
For model ensemble, 6 models are automatically selected by greedy search on ImageNet Det val2 from 10 models. The average of scores and bounding box regression results of these 6 models are used for obtaining the model averaging results.
V Experimental Results
V-a Implementation details
The GBD-net is implemented based on the fast RCNN pipeline. The BN-net will be used for ablation study and our submission to the challenge is based on the ResNet with identity mapping  and the model from the team of CU-DeepLink. The gated bi-directional structure is added after the 6th inception module (4d) of BN-net and after the 234th layer for ResNet-269. In the GBD-Net, layers belonging to the baseline networks are initialized by these baseline networks pre-trained on the ImageNet 1000-class classification and localization dataset. The parameters in the GBD layers as shown in Fig. 5, which are not present in the pre-trained models, are randomly initialized when finetuning on the detection task. In our implementation of GBD-Net, the feature maps for in (2)-(4) have the same width, height and number of channels as the input for .
We evaluate our method on three public datasets, ImageNet object detection dataset , Pascal VOC 2007 dataset  and Microsoft COCO object detection dataset . Since the ImageNet object detection task contains a sufficiently large number of images and object categories to reach a conclusion, evaluations on component analysis of our training method are conducted on this dataset. This dataset has 200 object categories and consists of three subsets. i.e., train, validation and test data. In order to have a fair comparison with other methods, we follow the same setting in 
and split the whole validation subset into two subsets, val1 and val2. The network finetuning step uses training samples from train and val1 subsets. The val2 subset is used for evaluating components and the performance on test data is from the results submitted to the ImageNet challenge. Because the input for fast RCNN is an image from which both positive and negative samples are sampled, we discard images with no ground-truth boxes in the val1. Considering that lots of images in the train subset do not annotate all object instances, we reduce the number of images from this subset in the batch. For all networks, the learning rate and weight decay are fixed to 0.0005 during training, the batch size is 192. We use batch-based stochastic gradient descent to learn the network and the batch size is 192. The overhead time at inference due to gated connections is less than 40%.
V-B Overall performance
V-B1 PASCAL VOC2007 dataset
It contains 20 object categories. Following the most commonly used approach in , we finetune the BN-net with the 07+12 trainval set and evaluate the performance on the test set. Our GBD-net obtains 77.2% mAP while the baseline BN+FRCN is only 73.1%.
V-B2 Microsoft COCO object detection dataset
We use MCG  for region proposal and report both the overall AP and AP on the closed-test data. The baseline BN+FRCN implemented by us obtains 24.4% AP and 39.3% AP, which is comparable with Faster RCNN (24.2% AP) on COCO detection leadboard. With our proposal gated bi-directional structure, the network is improved by 2.6% AP points and reaches 27.0% AP and 45.8% AP, which further proves the effectiveness of our model.
V-B3 ImageNet object detection dataset
We compare our framework with several other state-of-art approaches [1, 6, 25, 28, 36, 24]. The mean average precision for these approaches are shown in Table I. Our work is trained using the provided data of ImageNet. Compared with the published results and recent results in the provided data track on ImageNet 2015 challenge, our single model result performs better than the ResNet  by 4.5% in mAP for single-model result.
Table II shows the experimental results for UvA, GoogleNet, ResNet, which are best performing approaches in the ImageNet challenge 2013, 2014 and 2015 respectively. The top-10 approaches attending the challenge 2016 are also shown in Table II. Our approach has the similar mAP as Hikvision in single model and performs better for averaged model. Among the 200 categories, our submission wins 109 categories in detection accuracy.
V-C Investigation on different settings in GBD-v1
V-C1 Investigation on placing roi-pooling at different layers
The placement of roi-pooling is independent of the placement of the GBD-Net. Experimental results on placing the roi-pooling after the image pixels and after the 6th inception module are reported in this section. If the roi-pooling is placed after the 6th inception module (4d) for generating features of multiple resolutions, the model is faster in both training and testing stages. If the roi-pooling is placed after the image pixels for generating features of multiple resolutions, the model is slower because the computation in CNN layers up to the 6th inception module cannot be shared. Compared with the GBD-Net placing roi-pooling after the 6th inception module with mAP 48.9%, the GBD-Net placing the roi-pooling after the pixel values with mAP 51.4% has better detection accuracy. This is because the features for GBD-Net are more diverse and more complementary to each other when roi-pooling is placed after pixel values.
V-C2 Investigation on gate functions
Gate functions are introduced to control message passing for individual candidate boxes. Without gate functions, it is hard to train the network with message passing layers in our implementation. It is because nonlinearity increases significantly by message passing layers and gradients explode or vanish, just like it is hard to train RNN without LSTM (gating). In order to verify it, we tried different initializations. The network with message passing layers but without gate functions has 42.3% mAP if those message passing layers are randomly initialized. However, if those layers are initialized from a well-trained GBD-net, the network without gate functions reaches 48.2% mAP. Both two results also show the effectiveness of gate functions.
V-C3 Investigation on using different feature region sizes
|Padding value||Single resolution||Multiple resolutions|
The goal of our proposed gated bi-directional structure is to pass messages among features with different resolutions and contexts. In order to investigate the influence from different settings of resolutions and contexts, we conduct a series of experiments. In these experiments, features of a particular padding value is added one by one.The experimental results for these settings are shown in Table III. When single padding value is used, it can be seen that simply enlarging the support region of CNN by increasing the padding value from 0.2 to 1.7 does harm to detection performance because it loses resolution and is influenced by background clutter. On the other hand, integrating features with multiple resolutions and contexts using our GBD-Net substantially improves the detection performance as the number of resolutions/contexts increases. Therefore, with the GBD-Net, features with different resolutions and contexts help to validate the existence of each other in learning features and improve detection accuracy.
V-C4 Investigation on combination with multi-region
This section investigates experimental results when combing our gated bi-directional structure with the multi-region approach. We adopt the simple straightforward method and average the detection scores of the two approaches. The baseline BN model has mAP 46.3%. With our GBD-Net the mAP is 48.9%. The multi-region approach based on BN-net has mAP 47.3%. The performance of combining our GBD-Net with mutli-region BN is 51.2%, which has 2.3% mAP improvement compared with the GBD-Net and 3.9% mAP improvement compared with the multi-region BN-net. This experiment shows that the improvement brought by our GBD-Net is complementary to the multi-region approach in .
V-D Investigation on GBD and GBD-v2
This section investigates the experimental results for the GBD in Section III-D and the GBD-v2 introduced in Section III-E. For the same BN-net, the GBD-v1 introduced in Section III improves the BN-net by 2.6% in mAP. The GBD-v2 structure introduced in Section III-E improves mAP by 3.7%. Therefore, the GBD-v2 is better in improving the detection accuracy. Since GBD-v2 has better performance and is easier to train, we use the GBD-v2 as the default GBD structure in the following part of this paper if not specified. Since the components investigated in Section V-C are not different for GBD-v1 and GBD-v2, we directly adopt the settings found to be effective in GBD-v1 for GBD-v2. In GBD-v2, roi-pooling is placed at the module (4d) for BN-net and the 234th layer for ResNet-269. Gate function is used. We use feature regions with padding values -0.2, 0.2, 0.8, 1.7.
V-E Investigation on other components in the detection framework
In the component-wise study, none of the techniques in Section IV-E is included if not specified. We adopt the left-right flip at the the training stage for data augmentation for all of the evaluated approaches but did not use flip at the testing stage if not specified.
V-E1 Region proposal
We list the improvements on top of our early work Craft-v2  in Table IV. Random crop in training and multi-scale testing also helps and they leads to 0.74% and 1.1% gain in recall, respectively. In multi-scale training, we want to keep the distribution of image size after log operation is uniform. To this end, in each iteration, for each image, we randomly select a scale number in range of and randomly select an object in this image with the length . Then the resize scale is set to be . This multi-scale training improves recall by 0.7%.
In the testing stage, we densely resize the longer side of each image to and found that it is necessary to achieve high enough recall for objects range in pixels for longer side.
To balance the positive and negative samples, we implement a new multi-GPU implementation, where 50% of the GPUs only train positive samples while the other 50% GPUs only train the negative ones. Balancing the positive and negative samples to in training leads to 0.6% gain in recall.
We use 150 proposals for each image generated by the Craft framework. We combine two methods to get 300 proposals for each image and named it as Craft-v3. For the Craft-v3, the recall on ImageNet val2 is 95.30%, and the average recall 111please refer more details of the proposal average recall to . is 1.59.
Use the same BN-net as the baseline on ImageNet val2, Craft-V1, V2 and V3 have mAP 46.3, 48.4, and 49.4 respectively. Compared to the Craft-v2 on ImageNet val2, the Craft-v3 leads to 1.9% gain in final detection AP for ResNet-269+GBD-Net.
|Components.||baseline (Craft-v2) ||+Random Crop training||+Multi-scale testing||+Balancing positive and negative samples||+ensemble|
|Recall @ 150 proposals||92.37%||93.11%||94.21%||94.81%|
|Recall @ 300 proposals||95.30%|
V-E2 Pretraining scheme
There are three pretraining schemes evaluated in the experimental results shown in Table V. The BN-net is used as the network for evaluation. The pretraining on the 1000-class image-centric classification task without using the box annotation of these objects, which is denoted by image in Table V. The pretraining on the 1000-class object-centric classification task using the box annotations without including the roi-pooling at the pretraining stage, which is denoted by object w/o roi in Table V. The pretraining for the 1000-class object-centric classification task with the box annotations and with the roi-pooling included at the pretraining stage, which is denoted by object+roi in Table V. Without using the roi-pooling at the pretraining stage, the object-centric pretraining performs worse than image-centric pretraining. The inclusion of roi-pooling at the pretraining stage improves the effectiveness of object centric pretraining for finetuning in object detection, with 1.5% increase in absolute mAP.
|Pretraining scheme||Image||Object w/o roi||Object+roi|
V-E3 The GBD structure
We evaluate the GBD structure for different baseline models. Fig. VI shows the experimental results for different baseline networks with the GBD structure. The GBD structure introduced in Section III-E improves the BN-net by 3.7% in mAP for Craft-V2 and by 4.2% in mAP for Craft-V3. With GBD and the better region proposal, BN-net+GBD with mAP 53.6% is close to ResNet-152 with mAP 54% in detection accuracy. The modified GBD structure improves the mAP by 2.5% and 2.2% for ResNet-152 and ResNet-269 respectively.
|Pretrain||Object w/o roi||Object w/o roi||Image||Image|
|+ new GBD||52.1||53.6||56.5||58.8|
It is mentioned in Section III-E the magnitude of the messages from other contextual features influences the detection accuracy. Table VII shows the experimental results for messages with different magnitudes. In the experiments, the BN-net pretrained with bounding box label without roi-pooling is used as the baseline model. It can be seen that the scalar has the best performance when it is 0.1. Setting to be 1, i.e. not scaling messages, results in 1.6% mAP drop.
|Network config.||=0 ( without GBD)|
|Pretrain||Object w/o roi||Object w/o roi||Object w/o roi||Object w/o roi||Object w/o roi|
|mAP on val2||52||53.2||53.3||53.6||49.4|
V-E4 Baseline deep models
In this section, we evaluate the influence of baseline deep models for the detection accuray on the ImageNet. Table VIII shows the experimental results for different baseline network structures. All models evaluated are pretrained from ImageNet 1000-class training data without using the bounding box label. None of the model uses the stochastic depth  at the finetuning stage. If stochastic depth is included, it is only used at the pretraining stage. From the results in VIII, it can be seen that ResNet-101 with identity mapping  and stochastic depth has 1.1% mAP improvement compared with the ResNet-101 without them. Because of time limit and the evidence in ResNet-101, we have used the stochastic depth and identity mapping for the ResNet-269 baseline model.
V-E5 Model ensemble
For model ensemble, we have used six models and the averge of their scores are used as the result for model ensemble. As shown in Table IX, these models vary in baseline model, pretraining scheme, use of GBD or not and region proposal for training the model. Note that the region proposal for training could be different, but they are tested using the same region proposal. Without context, the averaged model has mAP 66.9%. With global contextual scores, the model has mAP 68%.
|Pretraining scheme||Object + roi||Image||Object + roi||Image||Image||Image|
|Region proposal for training||Craft-V3||Craft-V2||Craft-V3||Craft-V2||Craft-V3||Craft-V3|
V-E6 Components improving performance
Table X summarizes experimental results for the components that improve the performance. The baseline ResNet-269 has mAP 56.6%. With GBD-net, the mAP is 58.8%. Changing the region proposal from Craft-v2 to Craft-v3 improves the mAP to 60.7%. In the experimental results for the settings above, single-scale testing is used, in which the shorter side of the is constrained to be no greater than 600 and the longer is constrain to be no greater than 700 at the testing and training stage. When the same model is used for multi-scale testing, we set scales to be [400, 500, 600, 700, 800] and the longer side constrain to be no greater than 1000. This multi-scale testing provides 1.3% mAP improvement. Left-right flip provides 0.7 mAP gain. Bounding box voting leads to 1.3 % mAP gain. Changing the NMS threshold from 0.3 to 0.4 leads to 0.4 mAP gain. The use of context provides 1.3% mAP improvement. The final single model result has 65% mAP on the val2 data. Ensemble of six models improves the mAP by 3% and the final result has 68% mAP.
|Use GBD||✓||✓||✓||✓||✓||✓||✓||✓||Use GBD|
|Multi-scale testing||✓||✓||✓||✓||✓||✓||Multi-scale testing|
|Left-right flip||✓||✓||✓||✓||✓||Left-right flip|
|Box voting||✓||✓||✓||✓||Box voting|
|NMS threshold||0.3||0.3||0.3||0.3||0.3||0.3||0.4||0.4||0.4||NMS threshold|
|mAP gain||-||2.2||1.9||1.3||0.7||1.3||0.4||1.3||3||mAP gain|
V-F Analysis of false positive types
Fig. 10 shows the fraction of false positives on ImageNet Val2 that are caused by confusion with background, poor localization and confusion with other objects. It can be seen that, the majority of false positives are from background, which is different from the results in  for Pascal VOC, where the majority of false positives are from poor localization. This is possibly from a better region proposal used in our approach.
In this paper, we propose a gated bi-directional CNN (GBD-Net) for object detection. In this CNN, features of different resolutions and support regions pass messages to each other to validate their existence through the bi-directional structure. And the gate function is used for controlling the message passing rate among these features. Our GBD-Net is a general layer design which can be used for any network architecture and placed after any convolutional layer for utilizing the relationship among features of different resolutions and support regions. The effectiveness of the proposed approach is validated on three object detection datasets, ImageNet, Pascal VOC2007 and Microsoft COCO.
This work is supported by SenseTime Group Limited and the General Research Fund sponsored by the Research Grants Council of Hong Kong (Project Nos. CUHK14206114, CUHK14205615, CUHK417011, and CUHK14207814).
-  Girshick, R., Donahue, J., Darrell, T., Malik, J.: Rich feature hierarchies for accurate object detection and semantic segmentation. In: CVPR. (2014)
-  LeCun, Y., Bottou, L., Bengio, Y., Haffner, P.: Gradient-based learning applied to document recognition. Proceedings of the IEEE 86(11) (1998) 2278–2324
-  Krizhevsky, A., Sutskever, I., Hinton, G.: Imagenet classification with deep convolutional neural networks. In: NIPS. (2012)
-  Sermanet, P., Eigen, D., Zhang, X., Mathieu, M., Fergus, R., LeCun, Y.: Overfeat: Integrated recognition, localization and detection using convolutional networks. arXiv preprint arXiv:1312.6229 (2013)
-  Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556 (2014)
-  Szegedy, C., Liu, W., Jia, Y., Sermanet, P., Reed, S., Anguelov, D., Erhan, D., Vanhoucke, V., Rabinovich, A.: Going deeper with convolutions. In: CVPR. (2015)
-  Farabet, C., Couprie, C., Najman, L., LeCun, Y.: Learning hierarchical features for scene labeling. IEEE Trans. PAMI 30 (2013) 1915–1929
-  Girshick, R.: Fast r-cnn. ICCV (2015)
-  Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S., Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein, M., Berg, A.C., Fei-Fei, L.: Imagenet large scale visual recognition challenge (2014)
-  Everingham, M., Gool, L.V., I.Williams, C.K., J.Winn, Zisserman, A.: The pascal visual object classes (voc) challenge. IJCV 88(2) (2010) 303–338
-  Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., Zitnick, C.L.: Microsoft coco: Common objects in context. In: ECCV. (2014) 740–755
-  Smeulders, A., Gevers, T., Sebe, N., Snoek, C.: Segmentation as selective search for object recognition. In: ICCV. (2011)
-  Zitnick, C.L., Dollár, P.: Edge boxes: Locating object proposals from edges. In: ECCV. (2014)
-  Ren, S., He, K., Girshick, R., Sun, J.: Faster r-cnn: Towards real-time object detection with region proposal networks. NIPS (2015)
-  Yang, B., Yan, J., Lei, Z., Li, S.Z.: Craft objects from images. In: CVPR. (2016)
-  Pont-Tuset, J., Van Gool, L.: Boosting object proposals: From pascal to coco. In: ICCV. (2015)
-  Gidaris, S., Komodakis, N.: Object detection via a multi-region and semantic segmentation-aware cnn model. In: ICCV. (2015)
-  Gidaris, S., Komodakis, N.: Locnet: Improving localization accuracy for object detection. In: CVPR. (2016)
-  Gidaris, S., Komodakis, N.: Attend refine repeat: Active box proposal generation via in-out localization. In: BMVC. (2016)
-  Szegedy, C., Reed, S., Erhan, D., Anguelov, D.: Scalable, high-quality object detection. arXiv preprint arXiv:1412.1441 (2014)
-  Redmon, J., Divvala, S., Girshick, R., Farhadi, A.: You only look once: Unified, real-time object detection. arXiv preprint arXiv:1506.02640 (2015)
-  Liu, W., Anguelov, D., Erhan, D., Szegedy, C., Reed, S.: Ssd: Single shot multibox detector. In: ECCV. (2016)
-  Zagoruyko, S., Lerer, A., Lin, T.Y., Pinheiro, P.O., Gross, S., Chintala, S., Dollár, P.: A multipath network for object detection. arXiv preprint arXiv:1604.02135 (2016)
-  He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: CVPR. (2016)
-  Ioffe, S., Szegedy, C.: Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167 (2015)
-  He, K., Zhang, X., Ren, S., Sun, J.: Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. arXiv preprint arXiv:1502.01852 (2015)
-  Li, H., Ouyang, W., Wang, X.: Multi-bias non-linear activation in deep neural networks. In: ICML. (2016)
-  Ouyang, W., Wang, X., Zeng, X., Qiu, S., Luo, P., Tian, Y., Li, H., Yang, S., Wang, Z., Loy, C.C., et al.: Deepid-net: Deformable deep convolutional neural networks for object detection. In: CVPR. (2015)
-  Girshick, R., Iandola, F., Darrell, T., Malik, J.: Deformable part models are convolutional neural networks. In: CVPR. (2015)
-  Bengio, Y., Glorot, X.: Understanding the difficulty of training deep feedforward neuralnetworks. In: AISTATS. (2010)
-  Zeng, X., Ouyang, W., Yang, B., Yan, J., Wang, X.: Gated bi-directional cnn for object detection. In: ECCV, Springer (2016) 354–369
-  He, K., Zhang, X., Ren, S., Sun, J.: Identity mappings in deep residual networks. In: ECCV. (2016)
-  Huang, G., Sun, Y., Liu, Z., Sedra, D., Weinberger, K.: Deep networks with stochastic depth. arXiv preprint arXiv:1603.09382 (2016)
-  He, K., Zhang, X., Ren, S., Sun, J.: Spatial pyramid pooling in deep convolutional networks for visual recognition. In: ECCV. (2014)
-  Arbeláez, P., Pont-Tuset, J., Barron, J.T., Marques, F., Malik, J.: Multiscale combinatorial grouping. In: CVPR. (2014)
-  Yan, J., Yu, Y., Zhu, X., Lei, Z., Li, S.Z.: Object detection by labeling superpixels. In: CVPR. (2015)
-  Hosang, J., Benenson, R., Dollár, P., Schiele, B.: What makes for effective detection proposals? IEEE transactions on pattern analysis and machine intelligence 38(4) (2016) 814–830
-  Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., Wojna, Z.: Rethinking the inception architecture for computer vision. arXiv preprint arXiv:1512.00567 (2015)