Advertisement

LoANs: Weakly Supervised Object Detection with Localizer Assessor Networks

  • Christian BartzEmail author
  • Haojin Yang
  • Joseph Bethge
  • Christoph Meinel
Conference paper
  • 530 Downloads
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11367)

Abstract

Recently, deep neural networks have achieved remarkable performance on the task of object detection and recognition. The reason for this success is mainly grounded in the availability of large scale, fully annotated datasets, but the creation of such a dataset is a complicated and costly task. In this paper, we propose a novel method for weakly supervised object detection that simplifies the process of gathering data for training an object detector. We train an ensemble of two models that work together in a student-teacher fashion. Our student (localizer) is a model that learns to localize an object, the teacher (assessor) assesses the quality of the localization and provides feedback to the student. The student uses this feedback to learn how to localize objects and is thus entirely supervised by the teacher, as we are using no labels for training the localizer. In our experiments, we show that our model is very robust to noise and reaches competitive performance compared to a state-of-the-art fully supervised approach. We also show the simplicity of creating a new dataset, based on a few videos (e.g. downloaded from YouTube) and artificially generated data.

1 Introduction

One of the main factors for the success of Deep Neural Networks (DNNs), in the recent years [1, 2, 3], is the availability of large-scale labeled datasets like the ImageNet dataset [4]. In the domain of object detection, fully annotated datasets like Pascal VOC [5] enabled several breakthroughs for object detectors [3, 6, 7]. These methods heavily rely on annotated bounding boxes for each object in an image. Semi-supervised/weakly supervised methods for object detection [8, 9, 10, 11] try to overcome the high costs of labeling by using less annotations. We review these and more methods related to our work in Sect. 2. All mentioned methods have in common that they do need some form of annotation for each input image. Creating these annotated datasets incurs a high amount of manual labor that has to be performed in order to label the data and make it available for creating a computer vision model. Having the possibility to get enough annotated training data for a specialized application without the high annotation costs would be ideal. To this end, we propose a novel approach for weakly supervised object detection. We use an ensemble of two independent neural networks that are jointly trained. The first network (localizer) is trained by the second network and learns to perform the task of object localization in a given input image. The second network (assessor) is trained to regress the Intersection over Union (IOU) (also known as Jaccard Index) of the bounding box of an object and an image crop. The assessor is trained in a fully supervised way on purely artificially generated data. We describe the architecture of our system in more detail in Sect. 3. The basic data necessary for generating the training set for the assessor consists of a few template images of the objects that shall be localized and a few different natural background images. In our experiments, we used 25 template images and 8 background images to train an assessor for the task of localizing figure skaters. The localizer, on the contrary, does not need any annotations, as it is entirely trained by the supervision of the assessor. The data used for training the localizer could, for instance, come from a 5 to 10 min long video that has been downloaded from the internet, or especially created for this task. We provide further information about the datasets we used and also the experiments we performed in Sect. 4 and conclude our work in Sect. 5.

The contributions of our work can be summarized as follows: (1) we propose a novel (end-to-end) training method for weakly supervised object detection, based on knowledge transfer between two jointly trained, but independent neural networks. (2) Our proposed model can successfully be trained, even if more than 50% of the images in the train dataset are noisy images (i.e. images that do not contain an object we are looking for, or contain only a partial view of the object). (3) We show that our model reaches competitive performance compared to a state-of-the-art fully supervised object detection system. (4) In our experiments, we show that short video clips, plus a few template and background images that were gathered from the internet, are sufficient to create a new dataset and successfully train a model. (5) We release our code, our models, and the generated data sets to the community.1

2 Related Work

Object detection has been intensively studied in the past years. Thanks to the availability of huge amounts of labeled data it is possible to create fully supervised systems that achieve incredible results for object detection and recognition [3, 6, 7, 12, 13]. Those methods are fully-supervised, meaning that they need annotations for the location of objects (bounding boxes) and also annotations for the class of each object in the image. Getting fully annotated images is a costly process, especially for applications beyond academic use cases.

Weakly Supervised Localization. Weakly supervised object detection systems try to overcome the annotation problem, by learning to detect objects with partial bounding box annotations or even without the need for this kind of annotations [8, 9, 10, 11]. The approach introduced by Deselaers et al. [8] uses object detectors already trained on certain classes to annotate the locations of objects in new classes. Those labeled images can then be used to train a fully supervised detector on the new class. Liang et al. [9] propose a method that adapts a pre-trained classification model for object detection on new and unseen classes, while needing only a few fully annotated instances and videos that are likely to contain objects of the new class. Misra et al. [10] follow a similar approach by starting with a small set of annotated bounding boxes and iteratively extracting more annotations from unannotated video sequences. Tang et al. [11] propose a system that uses information from fully annotated visually and semantically similar classes to train an object detector on classes that are only partially annotated. Most of these approaches rely on images that at least have a category label, which is in contrast to our proposed method. For training the localizer, we do not need any labels at all, as the localizer is trained by the assessor. The assessor, on the contrary, only needs annotations in form of template images that are placed randomly in natural images.

Knowledge Transfer Between Neural Networks. Knowledge transfer has also been intensively studied in the recent years [14, 15, 16, 17, 18, 19]. Existing work mostly concentrates on using one network (the teacher) to teach another network (the student), to perform the same task, but either increasing the performance of the model [17, 18], or compressing the model, while keeping the same level of performance [14, 15]. Those approaches use a pre-trained model and try to distill or adapt this model into the other. Other approaches train both models at the same time. Jiang et al. [19] make the teacher network behave like a ‘real’ teacher that provides a curriculum learning strategy for the student. This curriculum helps the student to successfully learn to perform its task on noisy data. In this setting, knowledge transfer is also used for training an image generator, where the teacher acts as an advisor that refines the images generated by the student, while getting additional feeback from the outside world [16]. Apart from the approach by Jiang et al. [19], all knowledge transfer approaches have in common that teacher and student deal with problems from the same domain (i.e. computing the same function, or teacher and student work on image generation). In our proposed method, teacher and student (or assessor and localizer) work in different problem domains. Our assessor is a model that is used to predict the IOU between an image crop and the bounding box of an object in this crop, while the localizer is trained to find and crop objects from an image, by using the feedback of the assessor.

Generative Adversarial Networks. Our approach is, to some extent, inspired by Generative Adversarial Networks (GANs) that have been introduced by Goodfellow et al. [20]. In a GAN, two networks (generator and discriminator) are trained simultaneously, and the goal of both networks is to work against each other. The generator is trying to produce images that are indistinguishable from real-world images. At the same time, the discriminator is trying to decide whether an analyzed sample is a real sample or has been generated by the generator. In our method, the assessor (discriminator in the GAN setting) and localizer (generator in the GAN setting) are two independent networks that are trained simultaneously. The objective of the localizer is not to fool the assessor, but to maximize the output of the assessor. This leads to the situation that the localizer is trained by the supervision of the assessor, while the assessor does not even know that it is used to train another neural network.

3 Proposed System

When humans first see a new object they memorize certain aspects of the object and create a template that is matched against new occurences of the same object class. We mimic a similar behavior, by creating a system that can be trained to localize an object, using only a few template images of the object, which are placed randomly in a natural image and also unlabeled images that are likely to contain the object, which is to be detected (we refer to this kind of object as the “target object” for the remainder of this paper). Our proposed system consists of two independent DNNs (localizer and assessor) that are trained at the same time. In this section, we start with explaining the assessor, followed by an explanation of the localizer, and how both networks are jointly trained.

3.1 Assessor

The first network is the assessor. The assessor receives an input image \(I_A\) and produces a value \(y \in [0,1]\). The value y provides a measure of the ratio of an object contained in the image \(I_A\). In other words, the assessor predicts the IOU of the bounding box of an object and the input image. The prediction of this IOU is trained in a fully-supervised fashion based on purely artificially generated data. The assessor consists of a DNN that computes a function \(f_{as}(I_A)\). The function computed by the assessor is defined as follows:
$$\begin{aligned} f_{as}(I_A) = y = \sigma (f_{dnn}(I_A)). \end{aligned}$$
(1)
\(f_{dnn}(I_A)\) is a DNN that produces a scalar value, and \(\sigma \) denotes the logistic sigmoid function, which forces the values of y to be in the interval [0, 1]. While training, the assessor minimizes the mean squared error between the prediction y and the groundtruth label \(l \in [0,1]\) (n denotes the batch size used during training):
$$\begin{aligned} \mathcal {L}_{assessor} = \frac{1}{n} \sum _{i=1}^n (f_{as}(I_A^i) - l^i)^2. \end{aligned}$$
(2)
Data Generation. The assessor is trained on an entirely synthetic dataset. This dataset can be created by using some template images of the target object. For us, a template is an object that has been cropped from a natural image and can be pasted into other natural images. Figure 1 shows some examples of template images that we used for our experiments. The number of template images that are necessary to create a good model depends on the number of pose variants the type of object may have. Besides the template images of the target objects, we also need some background images that do not contain the target object. The template images are pasted onto the background images at random locations, with random sizes. We then select a random box from the image and calculate the IOU of the object bounding box and the random box and save this as annotation for the generated image. Figure 2 shows some generated images that are used for training the assessor.
Fig. 1.

Template images of objects used for creating the train dataset of the assessor. These template images have been created by cropping the object from real images.

Fig. 2.

Sample input images and their corresponding labels for the assessor. Each image contains some portion of an object. The label is the Intersection over Union of the image with the bounding box of the object. In other words, it is the proportion of the object that covers the image.

3.2 Localizer

The second network is the localizer. The localizer receives a natural image as input and tries to crop a region from the input image that is likely to contain an object. The localizer uses a spatial transformer [21] to crop the region from the image. A spatial transformer is a differentiable module for DNNs that applies a spatial transformation on an input feature map \(I_L\) and produces an output feature map O. Such a spatial transformer module consists of three different parts: Localization Network, Grid Generator, and Image Sampler.

Localization Network. The localization network is a neural network that computes a set of parameters \(\theta \). These parameters define the spatial transformation that is to be applied on the input feature map. These parameters can describe different types of spatial transformations, such as affine or thin plate spline transformations. In our work, we only use affine transformations that allow us to attend to different regions of the input image \(I_{L}\), by using the transformation to zoom into a region of interest. The localization network learns a function \(g_{dnn}(I_{L})\) that predicts the parameters \(\theta _{i}\) of an affine transformation matrix \(A_{\theta }\) that is conditioned on the input image \(I_{L}\) and the parameters of the neural network. The result of this function is defined as follows:
$$\begin{aligned} g_{dnn}(I_L) = A_{\theta } = \begin{bmatrix} \theta _1&0&\theta _2 \\ 0&\theta _3&\theta _4 \\ \end{bmatrix}. \end{aligned}$$
(3)
\(\theta _1\) to \(\theta _4\) are the transformation parameters, regressed by the deep neural network. We constrain the parameters of the affine transformation to only allow cropping, translation, and scaling.
Grid Generator. After the prediction of the affine transformation matrix, the grid generator is used to create a regularly spaced grid consisting of coordinates \(x_{w_o}, y_{h_o}\), with height \(H_o\) and width \(W_o\) being the spatial size of the output feature map O. The regularly spaced grid is used together with the already predicted transformation matrix to produce a regular grid G of sampling coordinates \(u_{i}, v_{j}\), with \(i \in [0, \dots , W_o]\) and \(j \in [0, \dots , H_o]\).
$$\begin{aligned} \begin{pmatrix} u_{i} \\ v_{j} \end{pmatrix} = A_{\theta } \begin{pmatrix} x_{w_o} \\ y_{h_o} \\ 1 \end{pmatrix} = \begin{bmatrix} \theta _1&0&\theta _2 \\ 0&\theta _3&\theta _4 \\ \end{bmatrix} \begin{pmatrix} x_{w_o} \\ y_{h_o} \\ 1 \end{pmatrix}. \end{aligned}$$
(4)
We can use these coordinates to determine the bounding box of the region of interest, which we want to extract from the image. This bounding box is the intended output of our localizer and is used to display the detection result of the network.
Image Sampler. In order to provide an input image to our assessor, the sampling grid produced by the grid generator is used to sample the input image \(I_{L}\) at the sampling points \(u_{i}, v_{j}\) of the generated sampling grid G. As the generated sampling grid will not perfectly align with the values in the discrete grid of the input image, we use bilinear sampling and define the values of each pixel ij (\(i \in [0, \dots , W_o]\) and \(j \in [0, \dots , H_o]\)) of the output image O as:This formulation of bilinear sampling is (sub-)differentiable, thus allowing us to propagate error gradients from the assessor to the localization network, using standard backpropagation. The output of the bilinear sampling operation is also the final output of the localizer that represents the function \(f_{loc}(I_L)\).

The combination of the three modules Localization Network, Grid Generator, and Image Sampler forms our localizer. During training we extract the output image, produced by the Image Sampler and hand it over to the assessor to assess the quality of the detection.

Training Data. We do not need annotated data for training the localizer, as the training of the localizer is supervised by the assessor. This property of the localizer makes it very easy to generate a large scale database of training images. One possibility for getting training data is to extract frames that might contain the target object from a video clip. The frames can directly be used as input to the localizer and creating them does not include any manual labor, except from choosing appropriate videos. Those videos could contain noisy frames, such as frames that do not show any target object, or only some parts of a target object. In our experiments (Sect. 4), we show that a noisy dataset does not necessarily degrade the performance of our approach, it might even improve the performance of our model on a test dataset.
Fig. 3.

We use two networks for training our model, each with its own optimizer. The first network is the localizer and the second network is the assessor. The input to the localizer is an image containing the target object. The localizer utilizes a spatial transformer module [21] to crop the object from the image and provide it to the assessor as an input. The assessor predicts the Intersection over Union of the object and the image crop and is used by the localizer to learn its task. The striped lines indicate which parts of the two networks are handled by which optimizer.

3.3 Optimization of Both Networks

The two parts of our model, as such, are independent neural networks. It is possible to train both networks at the same time, but they can also be trained consecutively. It is important that the assessor is at some time able to provide meaningful feedback to the localizer, thus it does not make sense to train the localizer without an assessor that is either pretrained or is learning to regress the IOU of an object and the image crop at the same time. For our experiments (see Sect. 4), we always trained both networks at the same time.

While training both networks at the same time, we use two independent optimizers. One optimizer handles the weight updates of the assessor. The second optimizer handles the weight updates of the localizer. Figure 3 provides a structural overview of our proposed system. The localizer learns to localize objects, by using the assessor to assess the quality of the object that has been localized by the localizer. This means that the cost \(\mathcal {L}\) of the localizer is the cost assigned by the assessor to the part of the image cropped by the localizer, plus two localizer specific regularizers:
$$\begin{aligned} \mathcal {L}_{localizer} = \frac{1}{n} \sum _{i=1}^n (f_{as}(f_{loc}(I_L^i)) - 1.0)^2 + \mathcal {L}_{di}(G^i) + \mathcal {L}_{out}(G^i). \end{aligned}$$
(6)
where \(\mathcal {L}_{di}(G)\) is a regularization term based on the direction of the predicted sampling grid G. This regularization term penalizes grids that are mirrored along the x- or y-axis. \(\mathcal {L}_{out}(G)\) is a regularization term that penalizes predicted grids with coordinates that lie outside of the image coordinates. The label for the mean squared error loss in Eq. (6) is constant for every input image. We set this constant to 1, as we want our localizer to crop regions of interest that fully contain the target object with as little extra space as possible. It would also be possible to set this value to any other value in the interval [0, 1]. Setting this value to 0, for instance, results in a localizer that deliberately chooses regions without the target object.

The most important part of training both networks at the same time, is the actual weight update process. Once we obtain the cost for the assessor (as described in Eq. (2)), we calculate gradients using standard backpropagation and update the weights of the assessor. Updating weights for the localizer works in a similar fashion. Here, we also calculate the gradients with backpropagation and let the gradients flow through the assessor to the localizer and to the first neural network layer. Once we obtained the gradients, we only update the weights of the localizer and leave the weights of the assessor untouched, hence the localizer is trained by the assessor to find a good region of interest.

4 Experiments

In this section we evaluate our proposed system on two different real-world datasets. We performed our experiments, in order to answer the following questions: (1) can we use the error information obtained by one network to train a second network on a different task, while the first network does not know that it is used in such a way? (2) Is it feasible to train the assessor on totally synthetic data, where we do not care whether the samples are realistic or not, and at the same time use unlabeled data for training an object localizer? (3) Can we hold our promise that it is simple to create a new dataset, using our proposed approach? (4) Is our model able to reach competitive performance, compared to a fully supervised model?

In order to answer these questions, we performed experiments on two different datasets, we created ourselves. The first dataset, contains images of an automated lawn-mower that has an orange sheep on top. The second dataset contains images of figure skaters giving a performance, for instance at the Olympic Games.

We begin this section, by introducing the datasets we used throughout our experiments in detail. This description is followed by an explanation of our experimental setup. We conclude the section with showing and discussing the results of our experiments.

4.1 Datasets

We created two challenging real-world datasets, which we tested our method on. In the first dataset we are trying to localize an automated lawn-mower that has an orange sheep on top. This dataset is challenging, because it contains patches where the object is only a few pixels high and wide. We refer to this object for the remainder of the paper as “sheep”. In the second dataset we tried to localize figure skaters while they are giving a performance. The figure skater dataset contains a lot of pose variations for each of the skaters, making it challenging for a model to generalize.

Sheep Dataset. We created this dataset by taking 158 different images that we used as background images for the assessor dataset. Besides the backgrounds, we took 10 pictures of the sheep from different angles that are used as template images. We used 8 template images to randomly paste them onto the background images for the assessor dataset. Using this data, we generated 10 000 different images for training the assessor.

Out of the 158 backgrounds, we used 121 randomly chosen backgrounds and the same 8 template images to create a train dataset for the localizer. We pasted the template images onto the background images using positions of hand-crafted bounding boxes, rendering those images as similar to real-world images as possible. We did not use the bounding box information for training the model with our approach, but for training the model with the fully supervised baseline approach. All in all, we have been able to generate 8320 images for training the localizer.

We used the remaining 37 backgrounds and the last two template images to create a test dataset where we also pasted the sheep onto the background images using hand-crafted bounding boxes. Using this approach, we were able to obtain 560 images for testing the localizer.

Figure Skating Dataset. In order to create this dataset we downloaded 5 videos from Youtube, downloaded 8 background images, and created 25 template images. Using the 8 background images and 25 template images, we generated 10000 images for training the assessor.

For the train dataset of the localizer, we took two videos from the Olympic Games in Pyeong Chang 2018 with the performance of Alina Zagitova2 and Yuzuru Hanyu.3 We took one video from the Olympic Games of Sochi in 2014 with the performance of Yulia Lipnitskaya.4 Last, we took the performance of Jason Brown at the US Open in 2014.5 After extracting all frames from the videos we were left with 68985 images for training the localizer. As these images still contain a lot of noise, where the figure skater is either not entirely, or not at all present in an image, we created a second train dataset without images containing this kind of noise. The second, noise free, dataset contains 33125 images, which is roughly 48% of the original number of images. For testing the localizer, we used the performance of Yuna Kim at the Olympic Games in Sochi 2014.6 We extracted 100 images from this video that shows Yuna Kim in different positions and manually annotated them with bounding boxes for testing our model.

We were able to very quickly generate the train datasets, for both assessor and localizer, as it only took roughly 1.5 h. This shows that our proposed system makes it possible to create a new dataset for object localization with minimal effort.

4.2 Experimental Setup

In the following we explain the exact configuration of the neural network achitectures that we used during our experiments and also provide some implementation details.

Localizer. We use two different network architectures for training our localizer (ResNet-18 and ResNet-50). Both architectures are based on the ResNet architecture proposed by He et al. [2]. The input to the localizer is the image where the target object shall be localized. Before passing the image to the network, we normalize the image, by subtracting each channel with a mean value obtained from the Imagenet dataset. Before the first residual block of the network, we perform a \(3 \times 3\) convolution with 64 output channels and stride 1, followed by batch normalization [22], ReLU [23], and a \(3 \times 3\) max pooling layer with stride 2. After these layers, 4 residual blocks follow. Each block consists of at least 6 \(3 \times 3\) convolutional layers with stride 1, the first convolutional layer of the second, third, and fourth residual block uses a stride of 2. Each convolutional layer is followed by batch normalization and ReLU. The number of convolutional filters is 64, 128, 256, 512, or 256, 512, 1024, 2048 for ResNet-18 and ResNet-50, respectively. We perform global average pooling after the last residual block. The last residual feature map, is fed to a fully connected layer with 6 neurons that predicts the affine transformation parameters that are used to generate the sampling grid. We always set the parameters that are responsible for rotating the input image to zero.

Assessor. We based the architecture of the assessor network on the ResNet architecture, too. We explicitly chose the ResNet architecture in order to mitigate the vanishing gradient problem and keep a strong gradient throughout both of our networks. The input to the assessor is an image that resembles a crop from a larger image, which contains an object. The assessor consists of four residual blocks, where the first and second block consist of three convolutional layers. The first layer, is a \(3\,\times \,3\) convolutional layer. The last two layers are \(4 \times 4\) convolutional layers with a stride of 2. The second layer is followed by the ReLU activation function. The last two residual blocks consist of two \(3 \times 3\) convolutional layers, followed by the ReLU activation function, each. The number of convolutional feature maps for each residual block is 128, 128, 128, 128, respectively. A fully connected layer with 1 neuron and the sigmoid activation function \(\sigma \) follows after the residual blocks. We do not use a bias term for any of the layers in the assessor.

Hyperparameters. For all of our experiments, we use Adam [24] as optimizer for both localizer and assessor and set the learning rate (alpha) to \(10^{-4}\). We use a batch size of 32 for each experiment, and let the training run for 300 epochs. We train the localizer with data augmentation. We apply a random combination of horizontal flipping, color jittering, and random cropping/padding to 50% of the images in each batch.

Implementation. We implemented all of our experiments using Chainer [25] and ChainerCV [26]. We used one NVIDIA 1080Ti GPU for each experiment.

Evaluation Metrics. We follow the evaluation procedure of the Pascal VOC 2012 challenge [27], where we calculate the average precision, based on the IOU of the predicted bounding box and the ground truth bounding box.
Table 1.

Results of our experiments on the sheep dataset. We show the average precision for each model and the respective input sizes. The first row (SSD) shows the results of our trained baseline model. The other rows show the results of our models based on different ResNet architectures.

Method

\(224 \times 224\)

\(300 \times 300\)

\(512 \times 512\)

SSD [7]

-

0.887

0.969

ResNet-18

0.887

0.937

0.967

ResNet-50

0.959

0.958

0.976

4.3 Sheep Experiments

We performed our first experiments on the sheep dataset, which we introduced in Sect. 4.1, to prove that our localizer-assessor concept works. Since we have a fully annotated dataset for training and testing the localizer, we trained a baseline model following the SSD approach of Liu et al. [7], using different input sizes, i.e. images with \(300 \times 300\) and \(512 \times 512\) pixels. We then used the same dataset (without bounding box annotations) for training the localizer, and the dataset we created for the assessor to train different models, based on our approach. We trained models, with different input sizes (\(224 \times 224\), \(300 \times 300\), and \(512 \times 512\) pixels), using different network architectures for the localizer (ResNet-18, or ResNet-50), and with an output size of \(75 \times 75\) pixels for the localizer. We always initialized each ResNet model with convolutional layers that have been pre-trained on the Imagenet dataset. Table 1 shows the results of our different experiments. We also show some samples from the dataset including the predictions of our localizer in the left column of Fig. 5. From the results in Table 1 we can clearly see that our model reaches competitive performance compared to a fully supervised model that was trained on the same dataset. This is remarkable, as we do not use any labels for the location of the sheep while training our model. We note, however, that our approach is currently not able to work with multiple objects in one image and also only supports the localization of objects of one class and not multiple classes, yet. Another interesting observation is that our ResNet-18 based model significantly increases its localization performance across the different input sizes, while the ResNet-50 based model only does so in a smaller margin. We think that this is because the ResNet-50 model has a better representational capability, because it is deeper and that this is already enough to extract meaningful features, even at a low spatial resolution.
Fig. 4.

Results of our experiments on the figure skating dataset. We show the average precision for each model and directly compare the models with and without noise in the train dataset for the localizer. We also compare the results across two different feature extractors and assessors trained with and without augmentation.

4.4 Figure Skating Experiments

Following our experiments on the sheep dataset, we performed further experiments on the figure skating dataset, which we introduced in Sect. 4.1. With these experiments, we wanted to achieve the following goals: (1) show that our approach works well across a range of different objects, (2) show that it is easy to create a new dataset for training a model that performs very well, and (3) show that our model is robust to noise in the localization training set. Since we have no fully annotated dataset and also no access to the code of other weakly supervised object localization methods, we were not able to train a baseline model. Instead, we trained a range of different models and examine the influence of different settings for training the model. We trained all models on an input size of \(224 \times 224\) pixels for the localizer, but we varied the following properties of the network: (1) the base model. We use ResNet-18 and a ResNet-50 that was pre-trained on Imagenet. (2) The output size of the localizer/input size of the assessor (\(50 \times 100\) pixels, or \(75 \times 100\) pixels). (3) The input dataset for the localizer. We either used the train dataset without noise, or the dataset with noise, as described in Sect. 4.1. (4) We applied data augmentation on the train images of the assessor, by randomly adding horizontal flipping to 50% of the train images.

Figure 4 shows the results of our experiments with the figure skating dataset, you can also find some samples of the dataset in Fig. 5 in the middle and right columns. From the results, we can see that adding noise to our train dataset does not (necessarily) degrade the performance of the model. Instead, it might even help the model to achieve better performance than before. We argue that this due to the fact that the dataset with noise also contains images that show parts of a figure skater and the model uses this information to learn to localize the figure skater. We also note that using data augmentation in the assessor leads to better results. This shows that the training success of the localizer (student) depends on the assessor (teacher) and also shows us parallels to the behavior of human students and their teachers.
Fig. 5.

Samples from our test datasets, including localizations of our network from the sheep dataset (left column) and the figure skating dataset (middle and right column). The bottom-right image shows a failure case of our system, where our model is not able to accurately find the target object. The left part of each image is the input to the localizer and the right part the input to the assessor. The samples show that our model is capable of handling objects of different size, objects in different challenging positions, and also images that contain several distractors.

5 Conclusion and Future Work

In this paper, we presented a novel approach for weakly supervised object detection, based on knowledge transfer between a teacher (assessor) and a student (localizer). We evaluated our approach on two different datasets, showed that we can reach a performance that is on par to a fully supervised model, and that our approach is robust to noise in the training data. Gathering training data for our approach is simple and does not need a lot of time. For training the localizer, we can use real-world training data that has, for example, been extracted from a video. We do not need any further annotation for training the localizer. The train set for the assessor is an entirely synthetic dataset that can be created using a small amount of background and template images. These properties should make it easy to use our approach for specialized object detection systems where it might be very expensive to fully annotate the training data. Instead, taking a video and some pictures suffices for creating a dataset and training a very well performing model.

Our approach has some limitations that we want to address in our future work. Our approach is currently not able to localize more than one object at the same time in an image. We think that it is very important to further develop our idea and make it possible to detect multiple objects of different classes in the same image, in order to be able apply this approach to a broader class of problems. Furthermore, we want to assess whether a model trained with our approach can be trained to work as a general object detector. Preliminary experiments already showed that our model trained on the sheep dataset is able to localize other objects, such as a football. Our model trained on the figure skating dataset works very well in localizing humans that are standing upright in an image, hence we see this as a good starting point to further investigate the generalization capabilities of our approach.

Footnotes

References

  1. 1.
    Krizhevsky, A., Sutskever, I., Hinton, G.E.: ImageNet classification with deep convolutional neural networks. In: Pereira, F., Burges, C.J.C., Bottou, L., Weinberger, K.Q. (eds.) Advances in Neural Information Processing Systems, vol. 25, pp. 1097–1105. Curran Associates, Inc., New York (2012)Google Scholar
  2. 2.
    He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778 (2016)Google Scholar
  3. 3.
    Ren, S., He, K., Girshick, R., Sun, J.: Faster R-CNN: towards real-time object detection with region proposal networks. In: Cortes, C., Lawrence, N.D., Lee, D.D., Sugiyama, M., Garnett, R. (eds.) Advances in Neural Information Processing Systems, vol. 28, pp. 91–99. Curran Associates, Inc., New York (2015)Google Scholar
  4. 4.
    Deng, J., Dong, W., Socher, R., Li, L., Li, K., Fei-Fei, L.: ImageNet: a large-scale hierarchical image database. In: 2009 IEEE Conference on Computer Vision and Pattern Recognition, pp. 248–255 (2009)Google Scholar
  5. 5.
    Everingham, M., Gool, L.V., Williams, C.K.I., Winn, J., Zisserman, A.: The Pascal visual object classes (VOC) challenge. Int. J. Comput. Vis. 88, 303–338 (2010)CrossRefGoogle Scholar
  6. 6.
    Redmon, J., Divvala, S., Girshick, R., Farhadi, A.: You only look once: unified, real-time object detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 779–788 (2016)Google Scholar
  7. 7.
    Liu, W., et al.: SSD: single shot multibox detector. In: Leibe, B., Matas, J., Sebe, N., Welling, M. (eds.) ECCV 2016. LNCS, vol. 9905, pp. 21–37. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-46448-0_2CrossRefGoogle Scholar
  8. 8.
    Deselaers, T., Alexe, B., Ferrari, V.: Localizing objects while learning their appearance. In: Daniilidis, K., Maragos, P., Paragios, N. (eds.) ECCV 2010. LNCS, vol. 6314, pp. 452–466. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-15561-1_33CrossRefGoogle Scholar
  9. 9.
    Liang, X., Liu, S., Wei, Y., Liu, L., Lin, L., Yan, S.: Towards computational baby learning: a weakly-supervised approach for object detection. In: Proceedings of the IEEE International Conference on Computer Vision, pp. 999–1007 (2015)Google Scholar
  10. 10.
    Misra, I., Shrivastava, A., Hebert, M.: Watch and learn: semi-supervised learning for object detectors from video. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3593–3602 (2015)Google Scholar
  11. 11.
    Tang, Y., Wang, J., Gao, B., Dellandrea, E., Gaizauskas, R., Chen, L.: Large scale semi-supervised object detection using visual and semantic knowledge transfer. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2119–2128. IEEE (2016)Google Scholar
  12. 12.
    Girshick, R.: Fast R-CNN. In: Proceedings of the IEEE International Conference on Computer Vision, pp. 1440–1448 (2015)Google Scholar
  13. 13.
    Singh, B., Najibi, M., Davis, L.S.: Sniper: efficient multi-scale training. arXiv:1805.09300 [cs] (2018)
  14. 14.
    Hinton, G., Vinyals, O., Dean, J.: Distilling the knowledge in a neural network. In: NIPS Deep Learning and Representation Learning Workshop (2015)Google Scholar
  15. 15.
    Tang, Z., Wang, D., Zhang, Z.: Recurrent neural network training with dark knowledge transfer. In: 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 5900–5904 (2016)Google Scholar
  16. 16.
    Xie, J., Lu, Y., Gao, R., Zhu, S.C., Wu, Y.N.: Cooperative training of descriptor and generator networks. arXiv:1609.09408 [cs, stat] (2016)
  17. 17.
    Chen, T., Goodfellow, I., Shlens, J.: Net2Net: accelerating learning via knowledge transfer. In: International Conference on Learning Representations (2016)Google Scholar
  18. 18.
    Li, Y., Yang, J., Song, Y., Cao, L., Luo, J., Li, L.J.: Learning from noisy labels with distillation. In: Proceedings of the IEEE International Conference on Computer Vision, pp. 1910–1918 (2017)Google Scholar
  19. 19.
    Jiang, L., Zhou, Z., Leung, T., Li, L.J., Fei-Fei, L.: MentorNet: learning data-driven curriculum for very deep neural networks on corrupted labels. In: International Conference on Machine Learning, pp. 2309–2318 (2018)Google Scholar
  20. 20.
    Goodfellow, I., et al.: Generative adversarial nets. In: Ghahramani, Z., Welling, M., Cortes, C., Lawrence, N.D., Weinberger, K.Q. (eds.) Advances in Neural Information Processing Systems, vol. 27, pp. 2672–2680. Curran Associates, Inc., New York (2014)Google Scholar
  21. 21.
    Jaderberg, M., Simonyan, K., Zisserman, A., Kavukcuoglu, K.: Spatial transformer networks. In: Advances in Neural Information Processing Systems, vol. 28, pp. 2017–2025. Curran Associates, Inc. (2015)Google Scholar
  22. 22.
    Ioffe, S., Szegedy, C.: Batch normalization: accelerating deep network training by reducing internal covariate shift. In: Proceedings of The 32nd International Conference on Machine Learning, pp. 448–456 (2015)Google Scholar
  23. 23.
    Nair, V., Hinton, G.E.: Rectified linear units improve restricted Boltzmann machines. In: Proceedings of the 27th International Conference on Machine Learning (ICML-10), pp. 807–814 (2010)Google Scholar
  24. 24.
    Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization. In: Proceedings of the 3rd International Conference on Learning Represenations, San Diego (2015)Google Scholar
  25. 25.
    Tokui, S., Oono, K., Hido, S., Clayton, J.: Chainer: a next-generation open source framework for deep learning. In: Proceedings of Workshop on Machine Learning Systems (LearningSys) in The Twenty-ninth Annual Conference on Neural Information Processing Systems (NIPS) (2015)Google Scholar
  26. 26.
    Niitani, Y., Ogawa, T., Saito, S., Saito, M.: ChainerCV: a library for deep learning in computer vision. In: Proceedings of the 2017 ACM on Multimedia Conference, MM 2017, pp. 1217–1220. ACM, New York (2017)Google Scholar
  27. 27.
    Everingham, M., Van Gool, L., Williams, C.K.I., Winn, J., Zisserman, A.: The Pascal visual object classes challenge 2012 (VOC2012) results (2012)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  • Christian Bartz
    • 1
    Email author
  • Haojin Yang
    • 1
  • Joseph Bethge
    • 1
  • Christoph Meinel
    • 1
  1. 1.Hasso Plattner InstituteUniversity of PotsdamPotsdamGermany

Personalised recommendations