diff --git a/trackingbyinstancedetectionametalearningapproach/36558804-a00b-482f-8981-947eb84624b8_content_list.json b/trackingbyinstancedetectionametalearningapproach/36558804-a00b-482f-8981-947eb84624b8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4656d0fefafb4f91f3735d2385afcb18dfa67880 --- /dev/null +++ b/trackingbyinstancedetectionametalearningapproach/36558804-a00b-482f-8981-947eb84624b8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c220aa34046a60a50e44dbeb2c1eadf591470a1c77613596f3221827941f3e74 +size 73108 diff --git a/trackingbyinstancedetectionametalearningapproach/36558804-a00b-482f-8981-947eb84624b8_model.json b/trackingbyinstancedetectionametalearningapproach/36558804-a00b-482f-8981-947eb84624b8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c4ca83aaf132d9c9aec0bd5de0d15438560c9eae --- /dev/null +++ b/trackingbyinstancedetectionametalearningapproach/36558804-a00b-482f-8981-947eb84624b8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d628fd2a60d7ace1122ebf89597294f1c54078760ab2eead206c86da55c0d03b +size 91981 diff --git a/trackingbyinstancedetectionametalearningapproach/36558804-a00b-482f-8981-947eb84624b8_origin.pdf b/trackingbyinstancedetectionametalearningapproach/36558804-a00b-482f-8981-947eb84624b8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ab875640b8e239e7a209825e76609b8f6ff085b3 --- /dev/null +++ b/trackingbyinstancedetectionametalearningapproach/36558804-a00b-482f-8981-947eb84624b8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98bc8c0f1e797e836666ce99f4aca9d3fb439afef7dc98c038cb70a9ed49a27f +size 517099 diff --git a/trackingbyinstancedetectionametalearningapproach/full.md b/trackingbyinstancedetectionametalearningapproach/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a258bcf0b8b8e7b413c7da90f3897f432a4de0bd --- /dev/null +++ b/trackingbyinstancedetectionametalearningapproach/full.md @@ -0,0 +1,311 @@ +# Tracking by Instance Detection: A Meta-Learning Approach + +Guangting Wang1 Chong Luo2 Xiaoyan Sun2 Zhiwei Xiong1 Wenjun Zeng2 +1 University of Science and Technology of China1 Microsoft Research Asia2 + +wgting96@gmail.com {cluo, xysun, wezeng}@microsoft.com zwxiong@ustc.edu.cn + +# Abstract + +We consider the tracking problem as a special type of object detection problem, which we call instance detection. With proper initialization, a detector can be quickly converted into a tracker by learning the new instance from a single image. We find that model-agnostic meta-learning (MAML) offers a strategy to initialize the detector that satisfies our needs. We propose a principled three-step approach to build a high-performance tracker. First, pick any modern object detector trained with gradient descent. Second, conduct offline training (or initialization) with MAML. Third, perform domain adaptation using the initial frame. We follow this procedure to build two trackers, named Retina-MAML and FCOS-MAML, based on two modern detectors RetinaNet and FCOS. Evaluations on four benchmarks show that both trackers are competitive against state-of-the-art trackers. On OTB-100, Retina-MAML achieves the highest ever AUC of 0.712. On TrackingNet, FCOS-MAML ranks the first on the leader board with an AUC of 0.757 and the normalized precision of 0.822. Both trackers run in real-time at 40 FPS. + +# 1. Introduction + +Given a bounding box defining the target object in the initial frame, the goal of visual object tracking is to automatically determine the location and extent of the object in every frame that follows. The tracking problem is closely related to the detection problem, and it even can be treated as a special type of object detection, which we call instance detection. The major difference is that object detection locates objects of some predefined classes and its output does not differentiate between intra-class instances. But object tracking only looks for a particular instance, which may belong to any known or unknown object class, that is specified in the initial frame. + +Given the similarity between the two tasks, some object detection techniques are used extensively in object tracking. For example, the region proposal network (RPN), which + +![](images/f9d235026d753e04907fac1edfd2166df0bd80e470e27f83d99130634cb83bc4.jpg) +Figure 1: MAML provides an effective way to initialize an instance detector. With a single training image, the detector can be quickly adapted to the new domain (instance). It is capable of locating target object in subsequent frames even when the object has significant appearance changes. + +was proposed in Faster R-CNN detector [30], has been adopted in SiamRPN tracker and its variants [21, 20, 43]. The introduction of multi-aspect-ratio anchors solves the box estimation problem that has been plaguing previous trackers. It has greatly improved the performance of siamese-network-based trackers. More recently, the IoU network [14], which is again an innovation in object detection, is applied to object tracking by ATOM and DiMP [6, 3] and demonstrates powerful capabilities. + +In addition to these approaches that borrow advanced components from object detection to assemble a tracker, we believe that another option is to directly convert a modern object detector into a high-performance tracker. This will allow the tracker to retain not only the advanced components but also the overall design of the base detector. The main challenge is how to obtain a good initialization of the detector so that once a new instance is given, it can efficiently infuse the instance information into the network without overfitting. Fig.1 illustrates the idea. The detector may behave like a general object detector before adaptation. But after domain adaptation with a single training image, it is able to "memorize" the target and correctly locate the target in subsequent frames. A recent work by Huang et al. + +[13] shares a similar vision with us but they still treat tracking as a two-step task, namely class-level object detection and instance-level classification. In the first sub-task, a template image is involved and a separate branch is employed to process the template. + +In this work, we are looking for a neat solution to realize our idea. The constructed tracker will just look like a normal detector, without additional branches or any other modifications to the network architecture. We find that model-agnostic meta learning (MAML) [10] offers a learning strategy with which a detector can be initialized as we desire. Based on MAML, we propose a three-step procedure to convert any modern detector into a high-performance tracker. First, pick any detector which is trained with gradient descent. Second, use MAML to train the detector on a large number of tracking sequences. Third, when the initial frame of a test sequence is given, fine-tune the detector with a few steps of gradient descent. A decent tracker can be obtained after this domain adaptation step. During tracking, when new appearances of the target are collected, the detector can be trained with more samples to achieve an even better adaptation capability. + +Following the proposed procedure, we build two instance detectors, named Retina-MAML and FCOS-MAML, based on advanced object detectors RetinaNet [24] and FCOS [34]. During offline training, we further introduce a kernel-wise learnable learning rate in MAML to improve the expressive ability of gradient based updating. Evaluations of the trackers are carried out on four major benchmarks, including OTB, VOT, TrackingNet and LaSOT. System comparisons show that both trackers achieve competitive performance against state-of-the-art (SOTA) trackers. On OTB-100, Retina-MAML and FCOS-MAML appear to be the best-performing trackers, with AUCs of 0.712 and 0.704, respectively. Retina-MAML achieves an EAO of 0.452 on VOT-2018. FCOS-MAML achieves an AUC of 0.757 on TrackingNet, ranking number one on the leader board. Additionally, both trackers run in real-time at 40 FPS. + +# 2. Related Work + +# 2.1. CNN-based visual object tracking + +With the great success of deep learning and convolutional neural networks (CNN) in various computer vision tasks, there emerge an increasing number of CNN-based trackers. We divide CNN-based trackers into two categories, depending on whether an explicit template is used. + +Most siamese-network-based trackers [2, 21, 20, 36] fall into the first category, which we call template-based methods. The target appearance information is stored in an explicit template. In SiamFC [2], features are extracted from the template and the search region using the same + +offline-trained CNN. A cross-correlation operation is then adopted to compute the matching scores. A main drawback of SiamFC is that it only evaluates the candidates with the same shape as the initial box. SiamRPN [21] solves this problem by borrowing the RPN idea from object detectors. Later, SPM-Tracker [36] borrows the architecture from two-stage detectors and achieves an improved performance. Currently, the best-performing trackers in this category are ATOM [6] and DiMP [3], which leverage the most advanced IoUNet [14] for precise object localization. + +Template-based methods usually run very fast, because the CNN used to extract features does not need to be online updated. However, as the tracking proceeds, new target appearances should be integrated into the template for a better performance. But most methods lack an effective model for template online updating. This limitation has created a performance ceiling for template-based trackers. + +The other category is template-free methods [27, 28, 15], which intend to store the target appearance information within the neural network, in the form of fine-tuned parameters. The challenge in designing template-free trackers is how to quickly infuse the instance information to the network without overfitting. MDNet [28] divides the CNN into shared layers and domain-specific layers. The shared layers provide a reasonable initialization and the domain-specific layers are online trained with the new instance. Due to the limitation of the conventional training strategy, MDNet takes many iterations to converge and fewer iterations cause serious performance degradation. As a result, MDNet is too slow to be used in real-time scenarios. + +We find that template-free trackers are neat solutions. They do not need to maintain an external template and the network architecture looks just like a detector. Domain adaptation and online update can be achieved by a unified online training procedure. However, it is still quite challenging to achieve a good performance-speed tradeoff for this type of trackers. + +# 2.2. Meta learning and its application to tracking + +The goal of meta-learning is to train a model on a variety of learning tasks, such that it can solve new learning tasks using only a small number of training samples [10]. When we view object tracking as an instance detection task, the tracker is trained on a variety of instance detection tasks so that it can quickly learn how to detect a new instance using only one or a few training samples from the initial or previous frames. We find that the tracking task is a perfect example to apply meta-learning. + +Model-agnostic meta-learning (MAML) [10] is an important algorithm for meta learning. It helps the network to learn a set of good initialization parameters that are suitable for fine-tuning. During training, the parameters of the model are explicitly trained such that a small number of + +![](images/8e3b886082b5905ae4963fe1af288f6b72375edf19da1e6e20c261ce75c38b86.jpg) +Figure 2: Illustration of our training pipeline. The first row is the inner training loop. A few steps of SGD optimization is performed on the support images. The updated parameters after each step are used for calculating the meta-gradient based on testing images. Best viewed in colors. + +gradient steps with a small amount of training data from a new task will produce good generalization performance on that task. The most striking merit of MAML is that it is compatible with any model trained with gradient descent and applicable to a variety of different learning problems. Because of this, MAML is a perfect candidate to realize our idea, which is to convert any advanced object detectors (trained with gradient descent) into a tracker. Later, MAML++ [1] introduces a set of tricks to stabilize the training of MAML. MetaSGD [23] proposes to train learnable learning rates for every parameter. In the area of object tracking, Meta-Tracker [29] is the first to use MAML for the domain adaptation step of MDNet. MetaRTT [16] further applies MAML for the online updating step. Basically, their main purpose is to accelerate the online training of existing trackers, including MDNet [28], CREST [31] and RT-MDNet [15]. We argue that, since meta learning provides a mechanism to quickly adapt a deep network to model a particular object and avoid overfitting, why not directly convert a modern object detector into a tracker, instead of making a slow tracker faster? Huang et al. [13] have the same idea. They propose to learn a meta layer in detection head by MAML. However, they still introduce a template in the first part of the tracker called class-level object detection. The complex design results in a slow speed. + +# 3. Learning an Instance Detector with MAML + +The key to convert a detector into an instance detector (a tracker) is to provide a good initialization of the detec + +tor, so that it can quickly adapt to a new instance when only the initial frame is available. In this section, we present the approach to learn an instance detector with MAML. The complete steps to construct a tracker will be detailed in the next section. The training data in this learning step are videos with ground-truth labeling of the target object on each frame. + +Formally, given a video $V_{i}$ , we collect a set of training samples, denoted by $\mathcal{D}_i^s$ . It is also called the support set in meta learning. A detector model is defined as $h(x; \theta_0)$ where $x$ is the input image and $\theta_0$ is the parameters of the detector. We update the detector on the support set by a $k$ -step gradient descent (GD) algorithm: + +$$ +\begin{array}{l} \boldsymbol {\theta} _ {k} \equiv \mathrm {G D} _ {k} (\boldsymbol {\theta} _ {0}, \mathcal {D} _ {i} ^ {s}) \quad , \text {a n d} \\ \boldsymbol {\theta} _ {k} = \boldsymbol {\theta} _ {k - 1} - \alpha \frac {1}{| \mathcal {D} _ {i} ^ {s} |} \sum_ {(x, y) \in \mathcal {D} _ {i} ^ {s}} \nabla_ {\boldsymbol {\theta} _ {k - 1}} \mathcal {L} (h (x; \boldsymbol {\theta} _ {k - 1}), y), \tag {1} \\ \end{array} +$$ + +where $\mathcal{L}$ is the loss function and $(x,y)$ is a data-label pair in the support set. The procedure in Eqn. (1) is called inner-level optimization. To evaluate the generalization ability of the trained detector, we collect another set of samples $\mathcal{D}_i^t$ from the same video $V_{i}$ and they are called the target set. We calculate the loss on the target set by applying the trained detector, which can be written as: + +$$ +F \left(\boldsymbol {\theta} _ {0}, \mathcal {D} _ {i}\right) = \frac {1}{\left| \mathcal {D} _ {i} ^ {t} \right|} \sum_ {(x, y) \in \mathcal {D} _ {i} ^ {t}} \mathcal {L} \left(h \left(x; \boldsymbol {\theta} _ {k}\right), y\right) \tag {2} +$$ + +where $\mathcal{D}_i = \{\mathcal{D}_i^s,\mathcal{D}_i^t\}$ denotes the combined support set and target set. The overall training objective is to find a good initialization status $\theta_0$ for any tracking video. It can be formulated as: + +$$ +\boldsymbol {\theta} ^ {*} = \arg \min _ {\boldsymbol {\theta} _ {0}} \frac {1}{N} \sum_ {i} ^ {N} F \left(\boldsymbol {\theta} _ {0}, \mathcal {D} _ {i}\right), \tag {3} +$$ + +where $N$ is the total number of videos. The procedure in Eqn. (3) is called the outer-level optimization, which can be solved by gradient-based methods like Adam [18]. The outer-level gradients are back-propagated through the inner-level computational graph. The only assumption about the detector $h$ is that it is differentiable. Therefore, this approach is readily applicable to most deep learning based detectors. + +Fig. 2 illustrates this training pipeline. In the training phase, we only sample a pair of images from the dataset. Following the practice in DaSiamRPN [43], these two images may come from either the same sequence or different sequences. The first image will be zoomed in/out by a constant factor (1.08 in our experiments) so that a support set with three images is constructed for the inner-level optimization. The second image is viewed as the target set with single image for calculating the outer-level loss. We use a 4-step GD for the inner-level optimization and Adam solver [18] for the outer-level optimization. To stabilize the training and strengthen the power of detector, we make the following modifications to the original MAML algorithm. + +Multi-step loss optimization. MAML++ [1] proposes to take the parameters after every step of inner-level GD to minimize the loss on target set, instead of only using the parameters after final step. Mathematically, Eqn. (2) can be re-written into: + +$$ +F \left(\boldsymbol {\theta} _ {0}, \mathcal {D} _ {i}\right) = \frac {1}{\left| \mathcal {D} _ {i} ^ {t} \right|} \sum_ {(x, y) \in \mathcal {D} _ {i} ^ {t}} \sum_ {k = 0} ^ {K} \gamma_ {k} \mathcal {L} \left(h (x; \boldsymbol {\theta} _ {k}), y\right), \tag {4} +$$ + +where $K$ is the number of inner-level steps and $\gamma_{k}$ is the loss weight for each step. Note that our formulation is slightly different from that in MAML++. The initialization parameter $\theta_0$ (before updating) also contributes to the outer-level loss. In our experiments, we find this trick is crucial for stabilizing the gradients. + +Kernel-wise learnable learning rate. In standard MAML, the learning rate $\alpha$ in the inner-level optimization is a predefined constant. MetaSGD [23] proposes to specify a learnable learning rate for each parameter in the model. Therefore, the GD algorithm in Eqn. (1) can be re-written into: + +$$ +\boldsymbol {\theta} _ {k + 1} = \boldsymbol {\theta} _ {k} - \boldsymbol {\alpha} \odot \frac {1}{| \mathcal {D} _ {i} ^ {s} |} \sum_ {(x, y) \in \mathcal {D} _ {i} ^ {s}} \nabla_ {\boldsymbol {\theta} _ {k}} \mathcal {L} (h (x; \boldsymbol {\theta} _ {k}), y), \tag {5} +$$ + +where $\alpha$ is a tensor which has the same size as $\theta_{k}$ . Notation $\odot$ denotes the element-wise product. However, setting up a learning rate for every parameter will double the model size. In contrast, we arrange the learnable learning rates in a kernel-wise manner. Specifically, for a convolution layer with $C_{out}$ output channels, we define a learning rate for each convolutional kernel and this only introduces an additional number of $C_{out}$ learnable parameters, which are negligible in the model. + +# 4. Retina-MAML and FCOS-MAML + +This section provides the details of the proposed three-step procedure to build a tracker. Specifically, we will present detector choices, offline training details, and the online tracking process for two trackers named Retina-MAML and FCOS-MAML. + +# 4.1.Detectors + +As MAML is a model-agnostic learning approach, we are free to choose any modern detector trained with gradient descent as the base to build a tracker. As the first attempt in this direction, we choose two single-stage detectors which run faster and are fairly easy to manipulate than their two-stage counterparts. However, we do not see any obstacles in using two-stage detectors in our approach. + +Single-stage detectors are usually composed of a backbone network and two heads, namely classification head and regression head. The backbone network generates feature maps for the input image. Based on the feature maps, the objects are scored and localized. + +RetinaNet [24] is a representative single-stage object detector. Each pixel in the feature maps is associated with several predefined prior boxes, or anchors. The classification head is trained to classify whether each anchor has a sufficient overlap with an object. The regression head is trained to predict the relative differences between each anchor and the corresponding ground-truth box. Similar design can be found in many existing detectors, which are grouped into a family of anchor-based detectors. + +Recently, the concept of anchor-free detection has received a lot of attention. As the name suggests, no anchor is defined. FCOS [34] is a representative detector in this category. After the backbone network generates the feature maps, the classification head is trained to classify whether each pixel in the feature maps is within the central area of an object. Meanwhile, the regression head directly estimates the four offsets from the pixel to the object boundaries. Fig. 3 depicts the core design difference between anchor-free and anchor-based detectors. + +Next, we make some simplifications to the chosen detectors RetinaNet and FCOS. These simplifications improve the tracker's speed but will not affect the tracking performance. We believe so because visual object tracking is per + +![](images/ca97186e661b0606a09e840c63febf24810b6d6f79aa0be0dfeeb0f56d7a1d5a.jpg) +(a) Anchor-based detector + +![](images/7afd14ef1e5d1c20d479a119faa42fd9fe9407c1f1e4a4aab5d09d0b9ae2360e.jpg) +(b) Anchor-free detector + +formed frame-by-frame on a video sequence. Subsequent video frames have strong temporal correlations, so the location and extent of the target object in the previous frame provide a close estimate of those in the current frame. Usually, tracking is performed on a square-shaped search region, which is further scaled to a fixed size before being passed to the tracking network. From the tracker's point of view, the size distribution of target object is very concentrated. Therefore, it is not necessary to use the FPN module, which is mainly adopted to handle large scale variations, in RetinaNet and FCOS. Additionally, the vanilla-version of FCOS uses three network heads, one common regression head and two centerness/classification heads. Since tracking only needs to classify target and non-target, we only keep the centerness branch to produce classification scores. + +The second step is to initialize a detector with offline MAML training. As the detailed algorithm has been introduced in the previous section, we provide implementation details here. + +Network architecture. Fig. 4 depicts the detection network we use for MAML training. In both detectors, the CNN backbone used for feature extraction is ResNet-18. The parameters in the first three blocks are pre-trained with ImageNet and frozen during offline training. The last block (block-5) is discarded so that the stride to output feature maps is 8. We make two independent copies of block-4 and put them to the respective branches. This is not a necessary treatment for our approach to work, just to allow us to analyze the effect of online updating during tracking. For RetinaNet, we pre-define a single anchor box with a size of $64 \times 64$ pixels. In our experiments we find that this single-anchor setting performs slightly better than the multi-anchor setting in SiamRPN [21]. + +![](images/e781cd2a82281300830341bdc9d846543a1d8c20d2816c243aa795c251b6a61d.jpg) +Figure 3: (a) Anchor-based detectors predict the relative differences between the anchor and the ground-truth box. The dotted yellow box represents an anchor. (b) Anchor-free detectors directly estimate four offsets from the pixel to object boundaries. +Figure 4: We adopt ResNet-18 as the backbone. The first three blocks are frozen after ImageNet pre-training and block-5 is removed. Block-4 is independently trained in the classification branch and the regression branch during offline training. Online training only involves a subset of trainable layers. + +# 4.2. Offline MAML training + +Loss definition. For Retina-MAML, an anchor box is assigned a positive (or negative) label when its intersection-over-union (IoU) overlap with the ground-truth box is greater than 0.5 (or less than 0.3). We use focal loss and smooth L1 loss to train the classification branch and regression branch, respectively. For FCOS-MAML, we adopt L2 loss to supervise the training of centerness scores. The loss function in regression branch is L1 loss. + +Training data. Following other modern trackers [6, 3], we use four datasets for offline training, namely MS-COCO [25], GOT10k [12], TrackingNet [26] and LaSOT-train [8]. In LaSOT and TrackingNet, we only sample one frame for every three or ten frames. The training images are cropped and resized into a resolution of $263 \times 263$ . Standard data augmentation mechanisms like random scaling and shifting are adopted. + +Optimization. As noted in Section 3, we use 4-step GD for inner-level optimization during offline training period. The kernel-wise learnable learning rate $\alpha$ is initialized to 0.001. The multi-step loss weights $\gamma_{k}$ are initialized as equal contribution and gradually anneal to (0.05, 0.10, 0.2, 0.30, 0.35), giving more weight and attention to later steps. For the outer-level optimization, we adopt Adam optimizer [18] with a starting learning rate 0.0001. In each iteration, 32 pairs of images are sampled. The detector is trained for 20 epochs, with 10,000 iterations per epoch. To accelerate the training, we use first-order approximation [1] in the first 15 epochs. + +# 4.3. Online training and tracking + +The third step is domain adaptation when a new video sequence is given. In the initial frame, the instance to be + +# Algorithm 1 Online tracking algorithm + +Input: Frame sequence $\{I_i\}_{i=1}^N$ , detector $h(\cdot; \theta)$ , initialization bounding box $B_1$ , update interval $u$ . + +Output: Tracking results $\{B_i\}_{i=1}^N$ + +1: Generate search region image. $S_{1} \gets \mathrm{SR}(I_{1}, B_{1})$ +2: Initialize the support set. $\mathcal{D}^s\gets \{\mathrm{Data}\mathrm{Aug}(S_1)\}$ +3: Model update in Eqn. (1). $\pmb{\theta} \gets \mathrm{GD}_5(\pmb{\theta}, \mathcal{D}^s)$ +4: for $i = 2, \dots, N$ do +5: Detect objects represented in bounding box and score. $\{B_{\mathrm{det}}^j,c_j\}_{j = 1}^M\gets h(\mathsf{SR}(I_i,B_{i - 1});\pmb {\theta})$ +6: if all $c_{j} < 0.1$ then +7: $B_{i}\gets B_{i - 1}$ +8: continue +9: end if +10: Add penalties and window priors to $\{B_{\mathrm{det}}^j, c_j\}_{j=1}^M$ +11: Select the box with the highest score $c^*$ . $B_i \gets B_{\text{det}}^*$ +12: Linear interpolate shape. $B_{i} \gets \operatorname{Inter}(B_{i}, B_{i-1})$ +13: Update the support set $\mathcal{D}^s$ +14: if $i \mod u = 0$ or distractor detected then +15: Model update in Eqn. (1). $\pmb{\theta} \gets \mathrm{GD}_1(\pmb{\theta}, \mathcal{D}^s)$ +16: end if +17: end for + +tracked is indicated by a ground-truth bounding box. We generate a patch with resolution $263 \times 263$ according to the given bounding box. As with the offline training, we also adopt zoom in/out data augmentation to construct the support set. The tracker is updated by a 5-step GD as described in Eqn. (5). + +After domain adaptation, the detector is now capable of tracking the target object in subsequent frames. For each search region patch, the detector locates hundreds of candidate bounding boxes, which are then passed to a standard post-processing pipeline as suggested in SiamRPN [21]. Specifically, shape penalty function and cosine window function are applied to each candidate. Finally, the candidate box with the highest score is selected as the tracking result and its shape is smoothed by a linear interpolation with the result in the previous frame. + +During tracking, the support set is gradually enlarged. The tracker can be online trained at a pre-defined interval based on the updated support set. This process is often called online updating in tracking. If a tracking result has a score above a predefined threshold, it will be added into the support set. We buffer at most 30 training images in the support set. Earlier samples, except the initial one, will be discarded when the number of images exceeds the limit. After every $n$ frames ( $n = 10$ in our implementation) or when a distracting peak is detected (when the peak-to-sidelobe is greater than 0.7), we perform online updating. In this case, we only use 1-step GD to maintain a high tracking speed. On average, our tracker can run at 40 FPS on a single NVIDIA P100 GPU card. The online tracking procedure is summarized in Alg. 1. + +
DetectorDomain AdaptationOTB-100 (AUC)VOT-18 (EAO)LaSOT (AUC)TrackingNet (AUC)
Baselinebefore0.4600.1370.3910.601
after0.4870.1740.3910.634
MAMLbefore0.4640.1620.3870.626
after0.6710.3410.5110.743
+ +![](images/53418ffd0561c565848c63f2123950b9ccd4170522aec3c44d6317c3ce765c21.jpg) +(a) Loss curve + +![](images/44adc0c942a0cc4240d5a7cbef0d69e3fd3e651c151caa44af60e8e547f6b8b8.jpg) + +![](images/7931c6d9441ccc7af7199453e0a09cca1485c4e703ff8305eb5758f94fa2f5cd.jpg) +(b) Visualization + +![](images/1566fb5143c1ec6245dc5b9fb7b99b9b7d262e56b233430a4374f46f922c3766.jpg) +Figure 5: Comparison of the MAML detector and the baseline detector during domain adaptation. (a) Quantitative losses on the training image and a testing image. (b) Visualization of the corresponding score maps. MAML detector convergences quickly and has strong generalization ability. + +Table 1: MAML training allows a detector to quickly adapt to a new domain, and therefore is the key in turning a detector into a tracker. + +
KLLR in +cls. reg.OTB-100 +(AUC)VOT-18 +(EAO)LaSOT +(AUC)TrackingNet +(AUC)
0.6280.3130.4900.733
✓0.6610.3680.5020.737
✓0.6760.3150.5040.744
✓0.7040.3920.5230.757
+ +Table 2: Ablation analysis of kernel-wise learnable learning rate. Cls. and reg. denote the classification branch and the regression branch, respectively. + +# 5. Experiments + +# 5.1. Ablation study + +Meta-learning is the key in turning a detector into a tracker. In a nutshell, an instance detector can be built by of- + +
Online +cls. reg.OTB-100 +(AUC)VOT-18 +(EAO)TrackingNet +(AUC)LaSOT +(AUC)Speed +(FPS)
✓0.6710.3410.7430.51185
0.6900.3940.7470.52358
✓✓0.7040.3920.7570.49642
+ +Table 3: Ablation analysis of the online updating strategy. The baseline tracker without online updating achieves a good performance-speed tradeoff. Online updating both branches is the best choice for tracking short sequences. + +fline MAML training and domain adaptation (online training of the initial frame), and online updating further boosts the performance. In this section, we use FCOS-MAML to carry out the ablation study, which is centered on offline MAML training and online updating. The experiments are conducted on four tracking benchmarks [39, 19, 8, 26], following the official evaluation protocols. + +# 5.1.1 Offline MAML training + +Without MAML training, one could train a general object detector with standard gradient descent. However, such a detector is not capable of domain adaptation with only a few steps of updating using the samples from the initial frame. + +To demonstrate the importance of MAML training, we offline train the FCOS detector with standard GD and MAML on the same dataset. They are called baseline detector and MAML detector in this subsection. The performance is presented in Table 1. Without domain adaptation, both detectors perform poorly in the tracking task. This is natural because they do not remember any information of the tracking target. However, after domain adaptation with a 5-step GD, the MAML detector shows an clear advantage over the baseline detector. The AUC on OTB-100 is greatly improved from 0.464 to 0.671. In contrast, the baseline detector only slightly benefits from domain adaptation. + +We can get a more intuitive impression of the two detectors from Fig. 5. Fig. 5(a) shows the loss curve of the two detectors during domain adaptation. Note that both detectors use the same GD algorithm in this process, but the MAML detector has a much better adaptation capability. For the training image, the loss of the MAML detector quickly drops to a small value after only one-step GD updating. The convergence speed of the baseline detector is much slower and the loss is still large after 20 steps of updating. The right of Fig. 5(a) shows that the loss on the testing image even rises as the training proceeds. Fig. 5(a) visualizes the response maps on the training and testing images generated by the two detectors. The MAML detector clearly locates the tracking target after 5-step GD in both training and testing images, while the baseline detector does not make any progress even after 20 steps of GD. + +![](images/9155e7142aa48747bb954c19ae4dcab2d968fef6fe46a5f63f0e50c41b02458c.jpg) +Figure 6: The success plot and precision plot on OTB-100. + +![](images/7aef31bc52ac9c0248416e6c028f9c030e1dd28e3a9d53e38d7b7c898869bdc8.jpg) + +# 5.1.2 Kernel-wise learnable learning rate + +The model learns information about the target objects from gradients. We propose to use learnable learning rates (KLLR) in a kernel-wise manner. These learning rates guide the directions of gradients and strengthen the power for our model. In this section, we train several FCOS-MAML detectors with or without KLLR. Experimental results in Table 2 show that the model can benefit from KLLR in both classification branch and regression branch. + +# 5.1.3 Online updating strategy + +Our trackers perform two types of online training, one on the initial frame for domain adaptation and the other on the collected samples during tracking. The latter is known as online updating. While domain adaptation is a must-have training procedure for instance detectors, online updating is optional. We first evaluate the simplest baseline, which does not perform online updating at all. Surprisingly, this scheme achieves competitive performance on all the four benchmarks, as shown in Table 3. This version of FCOS-MAML can run very fast at up to 85 FPS. When online updating is adopted, FCOS-MAML achieves increased performance with slightly reduced speed. Comparing the last two rows, we have an interesting finding that is contrary to the conventional wisdom. It was previously believed that online updating the regression branch may harm the tracker's performance due to the aggregated errors. However, our results show that, except for the LaSOT dataset which is composed of very long sequences, online updating both branches seems to be the best choice. + +# 5.2. Comparison with SOTA Trackers + +Evaluation on OTB: We evaluate both our trackers FCOS-MAML and Retina-MAML on OTB 2013/50/100 benchmarks [39]. We follow the one pass evaluation (OPE) protocol, and report the AUC scores of success plot. Table 4 compares our trackers with some recent top-performing trackers. On OTB-100, FCOS-MAML and RetinaNet-MAML achieve striking AUC scores of 0.704 and 0.712, respectively. To the best of our knowledge, Retina-MAML is the best-performing tracker ever on OTB. + +
TrackerAUC score (OPE)Speed(FPS)
OTB-2013OTB-50OTB-100
CFNet [35]0.6110.5300.56875
BACF [17]0.6560.5700.62135
ECO-hc [7]0.6520.5920.64360
MCCT-hc [37]0.664-0.64245
ECO [7]0.7090.6480.6878
RTINet [42]-0.6370.6829
MCCT [37]0.714-0.6958
SiamFC [2]0.6070.5160.58286
SA-Siam [11]0.6770.6100.65750
RASNet [38]0.670-0.64283
SiamRPN [21]0.6580.5920.637200
C-RPN [9]0.675-0.66323
SPM [36]0.6930.6530.687120
SiamRPN++ [20]0.6910.6620.69635
Meta-Tracker [29]0.6840.6270.658-
MemTracker [41]0.6420.6100.62650
UnifiedDet [13]0.656-0.6473
MLT [5]0.621-0.61148
GradNet [22]0.6700.5970.63980
MDNet [28]0.7080.6450.6781
VITAL [32]0.7100.6570.6822
ATOM [6]-0.6280.67130
DiMP [3]0.6910.6540.68443
FCOS-MAML0.7140.6650.70442
Retina-MAML0.7090.6760.71240
+ +Table 4: Comparison with SOTA trackers on OTB dataset. Trackers are grouped into CF-based methods, siamese-network-based methods, meta-learning-based methods, and miscellaneous. Numbers in red and blue are the best and the second best results, respectively. + +
EAOAccuracyRobustness
DRT [33]0.3560.5190.201
SiamRPN++ [20]0.4140.6000.234
UPDT [4]0.3780.5360.184
LADCF [40]0.3890.5030.159
ATOM [6]0.4010.5900.204
DiMP-18 [3]0.4020.5940.182
DiMP-50 [3]0.4400.5970.153
FCOS-MAML0.3920.6350.220
Retina-MAML0.4520.6040.159
+ +In this table, Meta-Tracker and UnifiedDet are two recent trackers which also use MAML to assist online training. Compared with them, our trackers achieve over $8\%$ relative gain in AUC and still run in real-time. For the first time, meta-learning-based methods are shown to be very competitive against the mainstream solutions. The detailed success plot and precision plot on OTB-100 are shown in Fig. 6. + +Table 5: Comparison with SOTA trackers on VOT-2018. The backbone used in our trackers is ResNet-18. + +
TrackingNetLaSOT-test
AUCN-Prec.AUC
C-RPN [9]0.6690.7460.455
SiamRPN++ [20]0.7330.8000.496
SPM [36]0.7120.7790.471
ATOM [6]0.7030.7710.515
DiMP-18 [3]0.7230.7850.532
DiMP-50 [3]0.7400.8010.569
FCOS-MAML0.7570.8220.523
Retina-MAML0.6980.7860.480
+ +Table 6: Comparison with SOTA trackers on TrackingNet and LaSOT. We present the AUC of the success plot and and the normalized precision (N-prec.). + +Evaluation on VOT: Our trackers are tested on the VOT-2018 benchmark [19] in comparison with six SOTA trackers. We follow the official evaluation protocol and adopt Expected Average Overlap (EAO), Accuracy, and Robustness as the metrics. The results are reported in Table 5. RetinamAML achieves the top-ranked performance on EAO criteria and FCOS-MAML also shows a strong performance. Interestingly, FCOS-MAML has the highest accuracy score among all the trackers. We have observed a similar phenomenon in Fig. 6 for OTB dataset. FCOS-MAML gets the highest success rates when the overlap threshold is greater than 0.7. This suggests that anchor-free detectors can predict very precise bounding boxes. + +Evaluation on LaSOT and TrackingNet: TrackingNet [26] and LaSOT [8] are two large-scale datasets for visual tracking. The evaluation results on these two datasets are detailed in Table 6. Results show that FCOS-MAML performs favorably against SOTA trackers, although many of them are using a more powerful backbone ResNet-50. When compared with the recent DiMP-18 tracker which uses the same backbone network as ours, FCOS-MAML shows a significant gain on TrackingNet and a slight loss on LaSOT. We suspect that our straightforward online updating strategy may not be suitable for very long sequences which are often seen in LaSOT. + +# 6. Conclusion + +In this paper, we have proposed a three-step procedure to convert a general object detector into a tracker. Offline MAML training prepares the detector for quick domain adaption as well as efficient online update. The resulting instance detector is an elegant template-free tracker which fully benefits from the advancement in object detection. While the two constructed trackers achieve competitive performance against SOTA trackers in datasets with short videos, their performance on LaSOT still has room for improvement. In the future, we plan to investigate the online updating strategy for long sequences. + +# References + +[1] Antreas Antoniou, Harrison Edwards, and Amos Storkey. How to train your maml. arXiv preprint, 2018. +[2] Luca Bertinetto, Jack Valmadre, Joao F Henriques, Andrea Vedaldi, and Philip HS Torr. Fully-convolutional siamese networks for object tracking. In ECCV, pages 850–865, 2016. +[3] Goutam Bhat, Martin Danelljan, Luc Van Gool, and Radu Timofte. Learning discriminative model prediction for tracking. In ICCV, 2019. +[4] Goutam Bhat, Joakim Johnander, Martin Danelljan, Fahad Shahbaz Khan, and Michael Felsberg. Unveiling the power of deep tracking. In Proceedings of the European Conference on Computer Vision (ECCV), pages 483-498, 2018. +[5] Janghoon Choi, Junseok Kwon, and Kyoung Mu Lee. Deep meta learning for real-time target-aware visual tracking. In ICCV, pages 911-920, 2019. +[6] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. Atom: Accurate tracking by overlap maximization. In CVPR, pages 4660-4669, 2019. +[7] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. Eco: Efficient convolution operators for tracking. In CVPR, pages 6638-6646, 2017. +[8] Heng Fan, Liting Lin, Fan Yang, Peng Chu, Ge Deng, Sijia Yu, Hexin Bai, Yong Xu, Chunyuan Liao, and Haibin Ling. Lasot: A high-quality benchmark for large-scale single object tracking. In CVPR, pages 5374-5383, 2019. +[9] Heng Fan and Haibin Ling. Siamese cascaded region proposal networks for real-time visual tracking. In CVPR, pages 7952-7961, 2019. +[10] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, pages 1126-1135, 2017. +[11] Anfeng He, Chong Luo, Xinmei Tian, and Wenjun Zeng. A twofold siamese network for real-time object tracking. In CVPR, pages 4834-4843, 2018. +[12] Lianghua Huang, Xin Zhao, and Kaiqi Huang. Got-10k: A large high-diversity benchmark for generic object tracking in the wild. arXiv preprint arXiv:1810.11981, 2018. +[13] Lianghua Huang, Xin Zhao, and Kaiqi Huang. Bridging the gap between detection and tracking: A unified approach. In ICCV, pages 3999-4009, 2019. +[14] Borui Jiang, Ruixuan Luo, Jiayuan Mao, Tete Xiao, and Yun-ting Jiang. Acquisition of localization confidence for accurate object detection. In ECCV, pages 784-799, 2018. +[15] Ilchae Jung, Jeany Son, Mooyel Baek, and Bohyung Han. Real-time mdnet. In ECCV, pages 83-98, 2018. +[16] Ilchae Jung, Kihyun You, Hyeonwoo Noh, Minsu Cho, and Bohyung Han. Real-time object tracking via meta-learning: Efficient model adaptation and one-shot channel pruning. arXiv preprint arXiv:1911.11170, 2019. +[17] Hamed Kiani Galoogahi, Ashton Fagg, and Simon Lucey. Learning background-aware correlation filters for visual tracking. In ICCV, pages 1135-1143, 2017. +[18] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. + +[19] Matej Kristan, Ales Leonardis, Jiri Matas, Michael Felsberg, Roman Pflugfelder, Luka Cehovin Zajc, Tomas Vojir, Goutam Bhat, Alan Lukezic, Abdelrahman Eldesokey, et al. The sixth visual object tracking vot2018 challenge results. In Proceedings of the European Conference on Computer Vision (ECCV), pages 0-0, 2018. +[20] Bo Li, Wei Wu, Qiang Wang, Fangyi Zhang, Junliang Xing, and Junjie Yan. Siamprn++: Evolution of siamese visual tracking with very deep networks. In CVPR, pages 4282-4291, 2019. +[21] Bo Li, Junjie Yan, Wei Wu, Zheng Zhu, and Xiaolin Hu. High performance visual tracking with siamese region proposal network. In CVPR, pages 8971-8980, 2018. +[22] Peixia Li, Boyu Chen, Wanli Ouyang, Dong Wang, Xiaoyun Yang, and Huchuan Lu. Gradnet: Gradient-guided network for visual object tracking. In ICCV, pages 6162-6171, 2019. +[23] Zhenguo Li, Fengwei Zhou, Fei Chen, and Hang Li. Metasgd: Learning to learn quickly for few-shot learning. arXiv preprint, 2017. +[24] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In ICCV, pages 2980-2988, 2017. +[25] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, pages 740-755, 2014. +[26] Matthias Muller, Adel Bibi, Silvio Giancola, Salman Alsubaihi, and Bernard Ghanem. Trackingnet: A large-scale dataset and benchmark for object tracking in the wild. In ECCV, pages 300-317, 2018. +[27] Hyeonseob Nam, Mooyeol Baek, and Bohyung Han. Modeling and propagating cnns in a tree structure for visual tracking. arXiv preprint, 2016. +[28] Hyeonseob Nam and Bohyung Han. Learning multi-domain convolutional neural networks for visual tracking. In CVPR, pages 4293-4302, 2016. +[29] Eunbyung Park and Alexander C Berg. Meta-tracker: Fast and robust online adaptation for visual object trackers. In ECCV, pages 569-585, 2018. +[30] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NIPS, pages 91-99, 2015. +[31] Yibing Song, Chao Ma, Lijun Gong, Jiawei Zhang, Rynson WH Lau, and Ming-Hsuan Yang. Crest: Convolutional residual learning for visual tracking. In ICCV, pages 2555-2564, 2017. +[32] Yibing Song, Chao Ma, Xiaohe Wu, Lijun Gong, Linchao Bao, Wangmeng Zuo, Chunhua Shen, Rynson WH Lau, and Ming-Hsuan Yang. Vital: Visual tracking via adversarial learning. In CVPR, pages 8990-8999, 2018. +[33] Chong Sun, Dong Wang, Huchuan Lu, and Ming-Hsuan Yang. Correlation tracking via joint discrimination and reliability learning. In CVPR, pages 489-497, 2018. +[34] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. In ICCV, 2019. + +[35] Jack Valmadre, Luca Bertinetto, João Henriques, Andrea Vedaldi, and Philip HS Torr. End-to-end representation learning for correlation filter based tracking. In CVPR, pages 2805-2813, 2017. +[36] Guangting Wang, Chong Luo, Zhiwei Xiong, and Wenjun Zeng. Spm-tracker: Series-parallel matching for real-time visual object tracking. In CVPR, pages 3643–3652, 2019. +[37] Ning Wang, Wengang Zhou, Qi Tian, Richang Hong, Meng Wang, and Houqiang Li. Multi-cue correlation filters for robust visual tracking. In CVPR, pages 4844-4853, 2018. +[38] Qiang Wang, Zhu Teng, Junliang Xing, Jin Gao, Weiming Hu, and Stephen Maybank. Learning attentions: residual attentional siamese network for high performance online visual tracking. In CVPR, pages 4854-4863, 2018. +[39] Yi Wu, Jongwoo Lim, and Ming-Hsuan Yang. Object tracking benchmark. T-PAMI, 37(9):1834-1848, 2015. +[40] Tianyang Xu, Zhen-Hua Feng, Xiao-Jun Wu, and Josef Kittler. Learning adaptive discriminative correlation filters via temporal consistency preserving spatial feature selection for robust visual object tracking. TIP, 2019. +[41] Tianyu Yang and Antoni B Chan. Learning dynamic memory networks for object tracking. In PECCV, pages 152-167, 2018. +[42] Yingjie Yao, Xiaohe Wu, Lei Zhang, Shiguang Shan, and Wangmeng Zuo. Joint representation and truncated inference learning for correlation filter based tracking. In ECCV, pages 552-567, 2018. +[43] Zheng Zhu, Qiang Wang, Bo Li, Wei Wu, Junjie Yan, and Weiming Hu. Distractor-aware siamese networks for visual object tracking. In ECCV, pages 101-117, 2018. \ No newline at end of file diff --git a/trackingbyinstancedetectionametalearningapproach/images.zip b/trackingbyinstancedetectionametalearningapproach/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b24182b7092eb1f770fa212f38a2eeab4f2bb069 --- /dev/null +++ b/trackingbyinstancedetectionametalearningapproach/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbc60916bd922affd8c4b933c128eae120971a787b500aa698d31fe9513d4490 +size 542233 diff --git a/trackingbyinstancedetectionametalearningapproach/layout.json b/trackingbyinstancedetectionametalearningapproach/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..34bba586e4d819c880a1c88278b9fa5c5b90bf67 --- /dev/null +++ b/trackingbyinstancedetectionametalearningapproach/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23ee8991d3f74fe3606e5c2601d996cfe7abd94b8fa8a6b423399bbc57c5a8c0 +size 338835 diff --git a/trainingasteerablecnnforguidewiredetection/af618680-e671-4f4b-9d2b-dadf3ca3c4ab_content_list.json b/trainingasteerablecnnforguidewiredetection/af618680-e671-4f4b-9d2b-dadf3ca3c4ab_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..da4316a9e110cfbbf75e74fc10e03e0d8786d5d8 --- /dev/null +++ b/trainingasteerablecnnforguidewiredetection/af618680-e671-4f4b-9d2b-dadf3ca3c4ab_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ace6e0283af52b6c58ba8d823624453c1078f65941b398c841ee8d81ef6e729 +size 68663 diff --git a/trainingasteerablecnnforguidewiredetection/af618680-e671-4f4b-9d2b-dadf3ca3c4ab_model.json b/trainingasteerablecnnforguidewiredetection/af618680-e671-4f4b-9d2b-dadf3ca3c4ab_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e8158c1924b4343763e30b8d846f35c76e9242c4 --- /dev/null +++ b/trainingasteerablecnnforguidewiredetection/af618680-e671-4f4b-9d2b-dadf3ca3c4ab_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ac799fff0fd878381dc159c8c7b44a83dc26b7d29b56494c436e9f9bcd6a0a6 +size 80903 diff --git a/trainingasteerablecnnforguidewiredetection/af618680-e671-4f4b-9d2b-dadf3ca3c4ab_origin.pdf b/trainingasteerablecnnforguidewiredetection/af618680-e671-4f4b-9d2b-dadf3ca3c4ab_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8d95f26c5620a616a4af07e738857cb99898dc9f --- /dev/null +++ b/trainingasteerablecnnforguidewiredetection/af618680-e671-4f4b-9d2b-dadf3ca3c4ab_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05ae5dd13104745be13cad11e025f0d2112546f4ad3ec1b7f5191e3ef1c207d7 +size 928814 diff --git a/trainingasteerablecnnforguidewiredetection/full.md b/trainingasteerablecnnforguidewiredetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..051c77ae7b30f0c87c15f59b843e9183259d6d88 --- /dev/null +++ b/trainingasteerablecnnforguidewiredetection/full.md @@ -0,0 +1,347 @@ +# Training a Steerable CNN for Guidewire Detection + +Donghang Li, Adrian Barbu + +Florida State University + +600 W College Ave, Tallahassee, FL 32306, USA + +dl14h@my.fsu.edu, abarbu@stat.fsu.edu + +# Abstract + +Guidewires are thin wires used in coronary angioplasty to guide different tools to access and repair the obstructed artery. The whole procedure is monitored using fluoroscopic (real-time X-ray) images. Due to the guidewire being thin in the low quality fluoroscopic images, it is usually poorly visible. The poor quality of the X-ray images makes the guidewire detection a challenging problem in image-guided interventions. Localizing the guidewire could help in enhancing its visibility and for other automatic procedures. Guidewire localization methods usually contain a first step of computing a pixelwise guidewire response map on the entire image. In this paper, we present a steerable Convolutional Neural Network (CNN), which is a Fully Convolutional Neural Network (FCNN) that can detect objects rotated by an arbitrary 2D angle, without being rotation invariant. In fact, the steerable CNN has an angle parameter that can be changed to make it sensitive to objects rotated by that angle. We present an application of this idea to detecting the guidewire pixels, and compare it with an FCNN trained to be invariant to the guidewire orientation. Results reveal that the proposed method is a good choice, outperforming some popular filter-based and learning-based approaches such as Frangi Filter, Spherical Quadrature Filter, FCNN and a state of the art trained classifier based on hand-crafted feature. + +# 1. Introduction + +Convolutional Neural Networks(CNNs) are widely used and have an impressive performance in detecting and classifying objects. However, the CNNs performance is sensitive to variations in rotation, position or scaling of the objects to be detected. In [14], capsules were proposed as accurate generative models to handle such variations and obtain more accurate representations, with promising results. However, each capsule is trained to handle only a small range of such variations, hence the need for multiple capsules to handle the same object. + +In this paper we propose a steerable CNN that can detect an object rotated by an arbitrary angle without being rotation invariant. The proposed model is discriminative like a regular CNN, but it has a latent parameter representing the object's 2D orientation. For any value of this parameter, the steerable CNN will be sensitive to detect only objects having that orientation. + +We apply the steerable CNN to detect the guidewire in fluoroscopy (real-time X-ray) images. The guidewire is a thin wire used in coronary angioplasty interventions, which are visualized using fluoroscopic images. The fluoroscopic images are usually low-dose in order to limit the amount of radiation received by the patient. Under these conditions, the guidewire is a thin and poorly visible wire-like structure with different orientations, as shown in Figure 1. In this application, knowing the orientation of the guidewire is important for its detection, but the scaling is not important since all guidewires are one or two pixels wide. + +In order to find the entire guidewire, a low level measurement that shows how the guidewire passes through any pixel of the image should be obtained first. More details about this procedure will be explained in Section 2. There are two main approaches to obtain the pixelwise detection map, filter-based approaches and learning-based approaches. For the filter-based approach, one applies a predefined filter (Frangi Filter, Steerable Filters, Spherical Quadrature Filters) to obtain a filtered response map. The learning-based approach is to find a per-pixel probability map by training a classifier with some Haar or hand-crafted features. + +The best performing methods are trained on rotational aligned samples and search for the maximum response rotation angle at detection time. This is done by rotating the image by a number of angles and applying the classifier to the rotated images. + +Recently, a CNN (Convolutional Neural Network) was trained for this purpose, which learned its own features using the training data and obtained an invariant model that can detect guidewires at any orientation. + +In this paper, we are interested in seeing what is to gain by training a CNN that is tuned to the guidewire orientation. + +![](images/82e405ccd0f87bf5ed956395e044fce102e90730102d3befc5d7f9af02f42632.jpg) + +![](images/a2a60b28544cdc4e60ecb89bef5245a436e6acf41b3c5b92a60ded1117527a07.jpg) + +![](images/fef8af27d9cf312baa5012ee2dd908fcc33b667671a35318239393693db107e8.jpg) +Figure 1. Two frames of the guidewire under X-ray images(top two images) and the X-ray frames of the guidewire with annotations(bottom two images) + +![](images/7c337c74ea969d16124d86f2c0bcc2551bdaec1c107c38f0ec523070d9cf8929.jpg) + +However, instead of training a CNN on rotation aligned samples, which would require us to apply it to rotated images for detection, we introduce a steerable CNN that can be trained on the original samples. This steerable CNN has a steering parameter $\theta$ that can be used to make it sensitive to the parts of the guidewire that have orientation $\theta$ . This way, the steerable CNN eliminates the need to rotate the image by many angles at detection time. This paper brings three contributions: + +- It introduces a method for training steerable filters [13] by loss minimization. The steerable filters are rotated filters that can be obtained from a basis using an arbitrary rotation parameter. They were introduced in [13], but they were defined by an equation instead of being trainable. +- It introduces a model for a steerable CNN composed of a number of layers consisting of multiple steerable filters, and a method for training the steerable CNN from training examples. +- It presents an application to guidewire detection in fluoroscopic images. Our experiments indicate that the steerable CNN outperforms the regular CNN and the other guidewire detection methods such as the Frangi Filter and a trained classifier with Haar or hand-crafted features. + +# 1.1. Related Work + +Filter-based approaches include the Frangi Filter [12], which is based on the sorted eigenvalues $(\lambda_1, \lambda_2)$ of the Hessian matrix. It is widely applied to vascular image analysis. The sorted eigenvalues of the Hessian matrix were used to extract and track the guidewire through a spline optimization in [1]. [7] used the Frangi Filter as the data term + +and fitted the guidewire with B-spline model in clinical X-ray videos. The beauty of the filter-based approaches consists in their simplicity and interpretability. [4] proposed a method that votes on many candidate curves through all pixels, and the method was compared with the Frangi Filter. Results showed that the Frangi Filter was inferior to the path voting approach. + +Steerable Filters have been introduced in [13] for detecting edges and ridges in images. A more recent and powerful type of steerable filters are the Spherical Quadrature Filters (SQF) [19] that were used by [17] for guidewire detection. + +Learning-based approaches include [5, 2, 20, 26, 15, 22, 8]. In [2], the pixel detection step was trained with examples that were rotated for alignment, using a Probabilistic Boosting Tree (PBT) [24] and Haar features. The trained classifier was applied to rotated images by many angles to obtain the guidewire detection result. A user-constrained algorithm with PBT was proposed in [20] to localize the guidewire. The PBT and hand-crafted features were also employed to track the guidewire in [26] and detecting vessels in [8]. [5] introduced a framework using Boosting and Haar features for catheter detection, and the method was compared with the Frangi Filter. The tracking error results obtained by the learning-based approach were smaller than the results of the filter-based approach. A boosted classifier was used to obtain the low-level detection of the guidewire in [15]. It was trained on ridge and edge features. [9] detected the catheter and vascular structures using a Random Forest classifier of curvilinear structures trained on hand-crafted features. A method used the Region Proposal Network to detect the guidewire was presented in [25]. Different from our method which is aimed at obtaining a pixelwise detection map using CNNs, their work is to place bounding boxes around the guidwires. + +A Fully Convolutional Neural Network was trained in [17] for guidewire detection. The CNN was invariant to the guidewire orientation, and difficulties in training were reported. In contrast, the steerable CNN is sensitive to the guidewire orientation, alleviating some of the training difficulties and obtaining better detection results. + +A steerable CNN theory was presented in [11]. The theory is very generic and only discusses rotations by multiples of $90^{\circ}$ , lacking any specific details on how to apply it for steering by arbitrary angles. Moreover, the theory is directed towards invariant models, whereas our steerable CNN obtains models tuned to any orientation, in the spirit of the steerable filters [13]. Furthermore, the rotation angle can be estimated in our method as the angle of maximal response, together with its uncertainty. + +Steerable Filter CNNs were developed in [27]. The SFCNNs are both translational and rotational equivariant. The SFCNNs learn the weights of a set of predefined basis of equivariant steerable filters, while our formulation learns + +![](images/f63f905cf7a0478f133288559f3348d3cd76a6433dc67d6683af398eb67bb39d.jpg) +Figure 2. Diagram of the steerable CNN, steered (tuned) to an angle $\theta$ . + +a basis that is not necessarily equivariant, but which is made close to equivariant by using a special loss function. Furthermore, the rotation and steering occurs only on the first layer for the SFCNN and is followed by several groupconvolutional layers[10]. In our method, each layer is steerable by the same angle $\theta$ , making the entire CNN steerable. Capsules were introduced in [14] and improved in [23]. The capsules represent object detectors together with precise values of the deformations and viewing parameters specific to each object instance. Each capsule is sensitive to a small range of rotation angles and many capsules are needed to cover the entire rotation range. In contrast, our steerable CNN is a single detector that can be rotated to an arbitrary angle, thus it achieves the rotation goal of multiple capsules. + +# 2. The Steerable CNN + +The steerable CNN consists of a number of steerable convolutional layers, as illustrated in Figure 2. The steerable convolution filters are described next. + +# 2.1. The Trainable Steerable Filters + +The steerable filters are oriented filters $f(\theta)$ that are obtained as a linear combination from a basis $B$ , and can be rotated to any angle $\theta$ by a simple re-weighting of the basis as illustrated in Figure 3. + +We are interested in deriving such a steerable representation for a filter $\mathbf{f}$ . For that, we start with the steerable filter [13] of order 2, which for an angle $\theta$ is defined as + +$$ +G _ {2} ^ {\theta} = B \cdot \mathbf {a} (\theta) \tag {1} +$$ + +where $\mathbf{a}(\theta) = (\cos^2\theta, -2\cos \theta \sin \theta, \sin^2\theta)^T$ , $B = \frac{G}{\sigma^4}\cdot (x^2 -\sigma^2, - xy,y^2 -\sigma^2)$ , and $G$ is the 2-D Gaussian with variance $\sigma^2$ . This inspires us to represent a filter as + +$$ +\mathbf {f} (\theta) = B \cdot \mathbf {a} (\theta) \tag {2} +$$ + +with some unknown $p^2 \times (d + 1)$ matrix $B$ that needs to be learned and + +$$ +\mathbf {a} (\theta) = \left(\cos^ {d} \theta , \cos^ {d - 1} \theta \sin \theta , \dots , \sin^ {d} \theta\right) ^ {T}. \tag {3} +$$ + +However, higher powers $d$ result in numerical instability, and since the even powers of the sin and cos are related to the sin and cos of the angle multiples, we will use an alternate steerable representation + +$$ +\mathbf {f} (\theta) = B \cdot \mathbf {w} (\theta) \tag {4} +$$ + +with + +$$ +\mathbf {w} (\theta) = [ 1, \cos (2 \theta), \sin (2 \theta), \dots , \cos (2 d \theta), \sin (2 d \theta) ] ^ {T}, \tag {5} +$$ + +where $d$ controls the number of basis elements. We will denote the dimension $2d + 1$ of the basis $B$ as the rank of the steerable filter. + +![](images/8a35b9cf8018a533982c48125cdfc3837e5b71ef5fae3912a56dded410b20634.jpg) +Figure 3. Diagram of a trainable steerable convolution filter. + +Training steerable filters. Suppose we have $n$ training examples $(\mathbf{x}_i, y_i), i = 1, \ldots, n$ where $\mathbf{x}_i \in \mathbb{R}^{p^2}$ is the extracted patch of size $p \times p$ . The positives are patch with center on the guidewire, and the negatives have center at some distance from the guidewire. The label of the example is $y_i$ , with $y_i = -1$ for negative patches and $y_i = k \in \{1, \ldots, K\}$ for positive patches where the tangent angle is in the interval $[\theta_k - \frac{\pi}{2K}, \theta_k + \frac{\pi}{2K})$ , where $\theta_k = \frac{k\pi}{K}$ . + +![](images/4f4d3f129dc178584fe4fd7d17900533c6891edd637af9c4b4b47ee506f18981.jpg) +Figure 4. A trained steerable filter example. First row: trained filter basis $B$ . Second and third row: obtained steered filters for different angles $\theta$ . + +We can use the foreground-background (FB) loss + +$$ +\begin{array}{l} L (B) = \frac {1}{n _ {- 1}} \sum_ {i, y _ {i} = - 1 k = 1} \sum_ {k = 1} ^ {K} \ell (- \mathbf {x} _ {i} ^ {T} B \mathbf {w} (\theta_ {k})) \\ + \sum_ {k = 1} ^ {K} \frac {1}{n _ {k}} \sum_ {i, y _ {i} = k} \ell \left(\mathbf {x} _ {i} ^ {T} B \mathbf {w} \left(\theta_ {k}\right)\right) \\ \end{array} +$$ + +for training the steerable filters, where $\ell(u)$ is a per example loss function such as the Lorenz loss [3] + +$$ +\ell (u) = \log (1 + R e L U (1 - u) ^ {2}), \tag {7} +$$ + +or the Focal loss [18] + +$$ +\ell (u) = - \alpha_ {t} (1 - p _ {t} (u)) ^ {\gamma} \log \left(p _ {t} (u)\right). \tag {8} +$$ + +where + +$$ +p _ {t} (u) = \left\{ \begin{array}{l l} \sigma (u), & \text {i f} y = 1 \\ 1 - \sigma (u), & \text {i f} y = - 1 \end{array} , \right. \tag {9} +$$ + +where $\sigma (u)$ is the sigmoid function + +$$ +\sigma (u) = \frac {1}{1 + \exp (- u)}. \tag {10} +$$ + +and $\alpha_{t} = \alpha = 0.25$ for class 1, $\gamma = 2$ . + +Examples of a trained $B$ with the Lorenz loss (7) for $d = 5$ and some steered filters obtained from this $B$ are shown in Figure 4. + +Observe that because of linearity, the convolution of an image $I$ with the steered filter $\mathbf{f}(\theta)$ is a linear combination with weight $\mathbf{w}(\theta)$ of the convolutions with the filters from $B$ , + +$$ +\mathbf {f} (\theta) * I = (B \cdot \mathbf {w} (\theta)) * I = (B * I) \cdot \mathbf {w} (\theta). \tag {11} +$$ + +# 2.2. The Steerable CNN + +The steerable CNN, illustrated in Figure 2, consists of a number of layers containing multiple steerable filters. + +If the basis of each steerable filter contains $r$ filters, then a layer with $k$ steerable filters will contain $r \cdot k$ filters in total, grouped in $k$ groups of $r$ filters. The response maps of that layer for any angle $\theta$ can be obtained by convolution with all the $rk$ filters, followed by linearly combining the $kr$ responses corresponding to each group using the weight vector $\mathbf{w}(\theta)$ from Eq. (5). + +# 2.3. Training the Steerable CNN + +Suppose we are given $n$ training examples $(\mathbf{x}_i, y_i, \alpha_i), i = 1, \dots, n$ where $\mathbf{x}_i \in \mathbb{R}^{p^2}$ is the patch of size $p \times p$ either with center on the guidewire (a positive example) or at some distance from the guidewire (a negative), $y_i \in \{-1, 1\}$ is the label, and $\alpha_i \in [0, \pi)$ is the orientation. The orientation at the center location of each patch is obtained by a Spherical Quadrature Filter (SQF) [19]. The SQF is also used as a preprocessing step for detection, so the training examples are extracted only from locations with high SQF responses. This way the angle information $\alpha_i$ for each training patch has a reliable value. Alternatively, the steerable CNN can be applied for a number of discrete angles and the maximum response can be used as detection map, as illustrated in Figure 5. + +Similar to section 2.1, the range $[0,\pi)$ is discretized (modulo $\pi$ ) into a number of equally spaced angle bins $b_{j} = [\theta_{j} - \frac{\pi}{2K},\theta_{j} + \frac{\pi}{2K})$ $j\in \{1,\dots,K\}$ , where $\theta_{j} = \frac{j\pi}{K}$ (in this paper we used $K = 30$ angle bins). Then the orientation angles $\alpha_{i}$ of the training examples are converted to angle bin indices $a_{i}\in \{1,\ldots ,K\}$ and the examples with the same angle index $j$ are collected into the set $S_{j} = \{(x_{i},y_{i},a_{i}),a_{i} = j\}$ . For simplicity, we assume that all angles are equally represented, so $|S_{j}| = |S_{k}|$ , $\forall j,k\in \{1,\dots,K\}$ . + +Training is done using the Adam optimizer [16]. For each minibatch, an angle index $j \in \{1, \dots, K\}$ is chosen and only examples with $a_i = j$ are selected, so they have approximately the same angle $\theta_j$ , the center of the bin $b_j$ . In this case, the examples share the same weight vector $\mathbf{w}_j = \mathbf{w}(\theta_j)$ from Eq (5) and the network is equivalent to a CNN where each convolution layer is followed by a linear layer that takes each group of $k$ responses and combines them linearly with weights $\mathbf{w}_j$ . One epoch of the training is described in Algorithm 1 below. An example of the trained basis $B$ of the first layer in the rank 11 4-layer steerable CNN is shown in Figure 6. + +# 2.4. Implementation Details + +CNN architecture. The Steerable CNN for this task consists of 4 steerable convolutional layers. The third steerable convolutional layer is followed by ReLU activation, and the + +![](images/051f55beedfb61df6d6edcdb473abac912bda1dca8396bc809688286608289ec.jpg) +Figure 5. Examples of one frame Steerable CNN detection results: input image, response map for angle index $j = 5,10,15$ , and final detection result. + +![](images/a42defb6e8d1c725c0eab423d265cd8f9e62f99189d883350ab5ef3c0b739bd5.jpg) + +![](images/f9df8ac339fe3028a286f75fdeb6eb44848533db8b1ef04e5c6e77bdb34f9b62.jpg) + +![](images/4f63c04f4d829d0b3a70b2dee438b6d795e9be123ac726d8d92a1f4c63a90200.jpg) + +![](images/5890591c88082fd430f03536203f3857f2d9268edf732886515358bdbb9f5da5.jpg) + +Algorithm 1 One epoch of Steerable CNN Training +Input: Training patches $\{(\mathbf{x}_i,y_i,a_i)\}_{i = 1}^N$ , minibatch size m +Output: Trained steerable CNN. +1: Set $N^{batch} = \lfloor |S_j| / m\rfloor$ +2: for $\mathrm{j} = 1$ to $K$ do +3: Shuffle the set $S_{j}$ +4: end for +5: for $\mathtt{b} = 1$ to $N^{batch}$ do +6: for $\mathrm{j} = 1$ to $K$ do +7: Set the steerable CNN angle $\theta = \alpha_{j}$ , so $\mathbf{w}(\theta) =$ wj +8: Use the b-th minibatch from $S_{j}$ to update the weights by backpropagation. +9: end for +0: end for + +![](images/aab68a735acfeacf1ca43112de40bf9d3b2260d6c6bf7500516b2aaa6f4d9f64.jpg) +Figure 6. Trained basis $B$ for the first layer of the rank 11 steerable CNN. + +last one returns the response. + +The steerable filters are of size $7 \times 7$ , with their basis containing $r = 7$ filters or $r = 11$ filters. The first layer has + +10 steerable filters (thus the layer has 70 or 110 total filters), the second and the third one have 20 steerable filters and the last one has 1 steerable filter. The receptive field of the SCNN is of size $25 \times 25$ . + +We also implemented a Fully Convolutional Network (FCNN) for comparison. The network consists of 4 convolutional layers, the third one is followed by ReLU, and the last convolutional layer returns a guidewire/non-guidewire response. + +The first convolutional layer for a $25 \times 25$ receptive field of size contains 16 filters size $7 \times 7$ , the next two convolutional layers contain $327 \times 7$ filters, and the last convolutional layer contains one $7 \times 7$ filter. + +For both the FCNN and the steerable CNN we used the Pytorch[21] Soft Margin Loss + +$$ +\ell (u, y) = \frac {1}{m} \sum_ {i} \log \left(1 + \exp \left(- y _ {i} u _ {i}\right)\right) \tag {12} +$$ + +to guide the training, where $m$ is the minibatch size. + +We also used the Focal loss [18] in Eq 8, since it can deal with the class imbalance. + +Training details. The weights of convolutional layers were initialized from the normal distribution with standard deviation 0.01. For the Steerable CNN of rank 7 and rank 11, we started with a learning rate of $3 \cdot 10^{-6}$ and a mini-batch of 32. For training the FCNN, we started with learning rate $10^{-5}$ and mini-batch 32. After every 50 epochs the learning rate was multiplied by 0.8 and the minibatch was doubled. The training was done for a total of 300 epochs. + +# 3. Experiments + +Dataset. The evaluation results are conducted on 75 fluoroscopic sequences obtained during coronary angioplasty intervention. The sequences contain a total of 826 frames of various sizes and aspect ratios in the range [512, 1024] × [512, 960]. In the 75 fluoroscopic sequences, 39 sequences are used for training, with 424 frames in total, and the remaining 36 sequences with 402 frames are used for testing. The guidewire annotations of each frame were obtained using B-splines. An examples of B-spline annotation is shown in Figure 7. + +SQF NMS Alignment In [17], the authors observed that the guidewire annotation is imprecise because the wire is + +![](images/be42ab604b436ab85aa31137fd567a279c7448646ab7cd240031015d5584baa9.jpg) +Figure 7. Example of input frame (left), and its B-spline annotation (right). + +![](images/558d23a0ca41774d3723209bc6c432ebde9149fd9db26d999372c24ca3208ec2.jpg) + +so thin and barely visible. For that reason we decided to use the Cauchy SQF filter followed by non-maximum suppression in the style of the Canny edge detection [6] as a preprocessing step. + +Training examples. The size of the training patches are of size $25 \times 25$ for both the positive and negative examples. + +For the training set without SQF NMS alignment we extracted positive patches centered on the guidewire, and negative patches at a distance between 8 and 30 pixels from the guidewire, subsampled to $5\%$ . + +The SQF NMS aligned training examples were extracted from locations that were detected by the SQF with NMS described above. The positives patches were centered at distance at most 2 from the guidewire annotation and the negatives at distance at least 5, subsampled to $5\%$ . The training set without SQF NMS alignment has 279,000 positives and 578,000 negatives. The training set with SQF NMS alignment has 193,000 positives and 535,000 negatives. + +# 3.1. Angle estimation Experiments + +In a first experiment, we evaluate the accuracy of different methods in estimating the guidewire angle. First, we show in Figure 8 the average responses for different methods on positive patches with true angle 60 degrees. We see that all methods have a peak at 60 degrees, and some other smaller peaks. + +The evaluation of the Frangi filter, Cauchy SQF, Trained steerable filters of ranks 5-11 trained with different losses and the rank 11 steerable CNN on the training and test positive patches is shown in Table 1. We see that the trained steerable filters have better accuracy than the predefined steerable filters. Also, the steerable filters trained with NMS-aligned patches have a much better accuracy than those trained on non-NMS aligned patches. + +# 3.2. Guidewire Detection Experiments + +We present an evaluation of the pixelwise guidewire detection for both filter-based methods and learning based methods. As filter-based approaches we evaluated the popular Frangi Filter [12], as well as the Spherical Quadrature + +![](images/efca51bde2103c77cf551d95ef6f5220b862f3eee504c5b1e600bcd32c8565ee.jpg) +Figure 8. Average responses for test patches with angle $60^{\circ}$ . + +
MethodAngle TrainError Test
Frangi filter [12]13.1613.69
SQF [19] Cauchy, f0 = 1/6, rk. 117.587.13
Steerable filter (6), rk. 58.899.72
Steerable filter (6), rk. 74.495.20
Steerable filter (6), rk. 94.855.69
Steerable filter (6), rk. 115.126.02
Steerable filter (6), rk. 11 w/NMS2.142.42
Steerable filter (6) Focal[18], rk. 116.627.51
Steerable filter (6), Focal [18], rk. 11 w/NMS2.632.78
Steerable CNN, rk. 11 w/NMS (Focal [18])4.686.70
+ +Table 1. Average angle estimation error (degrees) of different methods on ${25} \times {25}$ patches. + +Filters (SQF) [19] with different types and ranks (dimension of the basis), and we show the performance of the best rank with different isometric filters. As learning based methods we compare the steerable CNN, the FCNN, and trained $25 \times 25$ steerable filters with the Lorenz loss[3] and Focal loss[18], which can be considered as using only the last layer of the steerable CNN, with a larger filter size. We also implemented [8] using about 100,000 oriented Haar features and PBT [24], and trained it on our training set without SQF NMS alignment. + +The guidewire detection examples are shown in Figures 9 (one frame from the train set) and 10 (one frame from the test set). A threshold was chosen to obtain the results with an average detection rate of $90\%$ from the response map. Note that the input image shown in Figure 10 is noisier than the one from Figure 9. + +The detection performance was evaluated on the training and test sets. The detected guidewire pixels were those that had a corresponding response above the detection threshold at a distance of at most 2 pixels. A response above the detection threshold was considered a false positive if it + +![](images/d5f1e0150e2affb9f6e0f68b35b52327fb6b35d222f761f8f6a75ec4c8f5f636.jpg) + +![](images/66ddfbb577b15e0c0c00eded68860770c58a276cd60dde5d418b05daae3b96eb.jpg) + +![](images/c5ff25e04304947212397724726287f732eedfa85f410bc3c95291120d6c4dd8.jpg) + +![](images/fac2847a14658e6389d4a792c8952aa6898c95829ac2b6784c325d56bcc6ebec.jpg) + +![](images/131fa021c1dd76a486eb9194302fc65ebd20ca781d2cffbeab78e55fa94be9eb.jpg) +Figure 9. Guidewire detection training examples. First row: input image, Frangi filter [12], Cauchy SQF [19] of rank 11, trained Steerable filters(Focal loss[18] w/NMS) rank 11. Second row: PBT with Haar features[2, 20, 26, 8], FCNN w/NMS-aligned training examples, Steerable CNN of rank 11 w/o NMS-aligned training examples, Steerable CNN of rank 11(Focal loss[18]). + +![](images/c0d82b39dbdad512b62f05c1d7fdd5fee6a79b7e41c338522cec854b7bf4370d.jpg) + +![](images/b74991d49012f599bad4daf62319b23e6be7a7b9524e34fe9fed49426a6338f3.jpg) + +![](images/9d8266d3518bf2841923e1db1a510d43b837a29f66cee26f00c75241a4b362de.jpg) + +
MethodDet. rateFP rate# of trained parameters
TrainTestTrainTest
Frangi Filter [12]90.4490.4426.9924.19-
SQF [19] Gauss deriv, f0=1/2, rk. 790.0090.086.927.04-
SQF [19] Cauchy, f0=1/6, rank 789.9890.005.986.35-
SQF [19] log-Gabor, f0=1/6, rk. 1190.0490.035.325.21-
SQF [19] Cauchy, f0=1/6, rk. 1190.1390.025.125.87-
SQF [19] Cauchy, f0=1/6, rk. 11 w/ SQF NMS90.0390.004.193.93-
Trained equivariant SFCNN Filters [27] w/ SQF NMS89.9990.006.316.460.12k
Trained rank 11 steerable filter, FB loss (6) + Lorenz loss[3] w/ NMS90.0989.982.482.946.9k
Trained rank 11 steerable filter, FB loss (6) + Focal loss[18] w/ NMS90.0190.112.913.446.9k
PBT and Haar features[2, 20, 26, 8]90.0790.193.873.988.4k
2-layer Steerable CNN rank 11, FB loss (6) + Lorenz loss[3] w/ NMS89.7889.962.172.8918.7k
FCNN with NMS-aligned training examples90.0790.081.432.6578k
4-layer Steerable CNN rank 7 w/ SQF NMS (Soft Margin loss (12))90.0890.020.942.01217k
4-layer Steerable CNN rank 11 w/ SQF NMS (Soft Margin loss (12))90.0590.050.781.90341k
4-layer Steerable CNN rank 11 w/ SQF NMS (Focal loss [18])90.1890.100.761.82341k
FCNN w/o NMS-aligned training examples90.0990.013.728.2878k
4-layer Steerable CNN rank 7 w/o SQF NMS (Soft Margin loss (12))89.9690.013.346.69217k
4-layer Steerable CNN rank 11 w/o SQF NMS (Soft Margin loss (12))90.0190.072.955.94341k
4-layer Steerable CNN rank 11 w/o SQF NMS (Focal loss [18])90.0790.012.926.08341k
+ +Table 2. Evaluation of different guidewire detection approaches. + +was at distance of at least 3 pixels from the guidewires and catheters. + +In Table 2 are shown the average per-image detection rates and false positive rates for the different methods evaluated. The steerable CNN obtains the lowest false positive rate on both the training and test set. It outperforms all the other methods. Among the filter-based methods, the SQF with a Cauchy filter of rank 11 with NMS performs the + +best, but it is outperformed by all the training based methods. The FCNN with NMS training examples has a very small training error but it does not generalize as well as the steerable CNN. + +Ablation study. We also show in Table 2 the influence of training the FCNN with the NMS-based training examples vs examples extracted directly based on the annotation. We see that both training and test FP rate are lower using the + +![](images/ea2241ace4dee3db96653a8731aabcf40b84f5eddb43cf65d2d65c98a52def8c.jpg) +Figure 10. Guidewire detection test examples. First row: input image, Frangi filter [12], Cauchy SQF [19] of rank 11, trained Steerable filters(Focal loss[18] w/NMS) rank 11. Second row: PBT with Haar features[2, 20, 26, 8], FCNN w/NMS-aligned training examples, Steerable CNN of rank 11 w/o NMS-aligned training examples, Steerable CNN of rank 11(Focal loss[18]). + +![](images/fc5108efdc0ca7d2021ef0787d99597506e32d1b34346379f2c0d9e937001ce5.jpg) + +# NMS-aligned examples. + +To see whether the SQF are useful in screening the image and proposing the angle for the steerable CNN, we also evaluated in Table 2 the trained steerable CNN by directly applying it to the whole image and obtaining the maximum response from 30 discrete angles in the range $[0,\pi ]$ (Steerable CNN w/o SQF NMS). Again we see that the SQF-based screening is useful, reducing the test FP rate from 6.08 to 1.82. + +# 4. Conclusion + +In this paper, we introduced a simple steerable CNN that can be tuned using a parameter $\theta$ to be sensitive to objects aligned to any orientation $\theta$ , instead of being rotation invariant. + +We presented the mathematical formulation of the trainable steerable filters and the steerable CNN, and how to train it using examples at any orientation, without rotating them for alignment. As an application, we used the steerable CNN to detect guidewire pixels in fluoroscopic images, where a regular CNN overfits because the wire is very thin and covers only a small percentage of the receptive field. + +We reported the difficulties we encountered while training the steerable or the regular CNN due to the fact that the guidewire is thin and noisy, and imprecision in annotation makes the training more difficult. To address these issues, we explained how to obtain better aligned training patches using the Spherical Quadrature Filters [19] and non + +maximal suppression. + +Experiments reveal that the Steerable Convolutional Neural Network trained on SQF NMS-aligned data performed the best. We also observed that the learning based methods outperform the filter-based methods such as the Frangi filter [12] and the Spherical Quadrature Filters [19]. + +For the future study, we plan to employ the steerable CNN for automatic guidewire localization and for retina vessel detection. The guidewire localization is the higher-level process of finding in the image the entire guidewire as a curve. It will use the guidewire detection response as a data term to guide the search in the high dimensional space of smooth curves for the most likely guidewire location. The retina vessel detection problem has the added challenge that the vessel can have a wide range of widths, and a classifier should accommodate them in some way. It would be interesting to see whether a steerable CNN could be designed to be steered in both the orientation and the width of the vessel that needs to be detected. + +# References + +[1] Shirley AM Baert, Wiro J Niessen, Erik HW Meijering, Alejandro F Frangi, and Max A Viergever. Guide wire tracking during endovascular interventions. In MICCAI, pages 727-734, 2000. 2 +[2] Adrian Barbu, Vassilis Athitsos, Bogdan Georgescu, Stefan Boehm, Peter Durlak, and Dorin Comaniciu. Hierarchical learning of curves application to guidewire localization in fluoroscopy. In CVPR, pages 1-8, 2007. 2, 7, 8 + +[3] Adrian Barbu, Yiyuan She, Liangjing Ding, and Gary Gramajo. Feature selection with annealing for computer vision and big data learning. IEEE Trans. on PAMI, 39(2):272-286, 2017. 4, 6, 7 +[4] Vincent Bismuth, Régis Vaillant, Hugues Talbot, and Laurent Najman. Curvilinear structure enhancement with the polygonal path image-application to guide-wire segmentation in x-ray fluoroscopy. In MICCAI, pages 9-16, 2012. 2 +[5] Alexander Brost, Andreas Wimmer, Rui Liao, Joachim Hornegger, and Norbert Strobel. Catheter tracking: Filter-based vs. learning-based. In DAGM-Symposium, pages 293-302, 2010. 2 +[6] John Canny. A computational approach to edge detection. IEEE Transactions on pattern analysis and machine intelligence, (6):679-698, 1986. 6 +[7] Bor-Jeng Chen, Ziyan Wu, Shanhui Sun, Dong Zhang, and Terrence Chen. Guidewire tracking using a novel sequential segment optimization method in interventional x-ray videos. In ISBI, pages 103-106, 2016. 2 +[8] Terrence Chen, Gareth Funka-Lea, and Dorin Comaniciu. Robust and fast contrast inflow detection for 2d x-ray fluoroscopy. MICCAI, pages 243-250, 2011. 2, 6, 7, 8 +[9] Erkang Cheng, Yu Pang, Ying Zhu, Jingyi Yu, and Haibin Ling. Curvilinear structure tracking by low rank tensor approximation with model propagation. In CVPR, pages 3057-3064, 2014. 2 +[10] Taco Cohen and Max Welling. Group equivariant convolutional networks. In International conference on machine learning, pages 2990-2999, 2016. 3 +[11] Taco S Cohen and Max Welling. Steerable cnns. ICLR, 2017. 2 +[12] Alejandro F Frangi, Hiro J Niessen, Koen L Vincken, and Max A Viergever. Multiscale vessel enhancement filtering. In MICCAI, pages 130-137, 1998. 2, 6, 7, 8 +[13] William T Freeman, Edward H Adelson, et al. The design and use of steerable filters. IEEE Trans. on PAMI, 13(9):891-906, 1991. 2, 3 +[14] Geoffrey E Hinton, Alex Krizhevsky, and Sida D Wang. Transforming auto-encoders. In International Conference on Artificial Neural Networks, pages 44–51. Springer, 2011. 1, 3 +[15] Nicolas Honnorat, Régis Vaillant, and Nikos Paragios. Guide-wire extraction through perceptual organization of local segments in fluoroscopic images. MICCAI, pages 440-448, 2010. 2 +[16] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 4 +[17] Donghang Li and Adrian Barbu. Training a cnn for guidewire detection. In 2019 IEEE International Conference on Image Processing (ICIP), pages 2214-2218. IEEE, 2019. 2, 5 +[18] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólár. Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer vision, pages 2980-2988, 2017. 4, 5, 6, 7, 8 + +[19] Ross Marchant and Paul Jackway. Feature detection from the maximal response to a spherical quadrature filter set. In DICTA, pages 1-8. IEEE, 2012. 2, 4, 6, 7, 8 +[20] Philippe Mazouer, Terrence Chen, Ying Zhu, Peng Wang, Peter Durlak, Jean-Philippe Thiran, and Dorin Comaniciu. User-constrained guidewire localization in fluoroscopy. In SPIE Med. Imag., volume 7259, pages 72591K-72591K, 2009. 2, 7, 8 +[21] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS-W, 2017. 5 +[22] Olivier Pauly, Hauke Heibel, and Nassir Navab. A machine learning approach for deformable guide-wire tracking in fluoroscopic sequences. MICCAI, pages 343-350, 2010. 2 +[23] Sara Sabour, Nicholas Frosst, and Geoffrey E Hinton. Dynamic routing between capsules. In Advances in neural information processing systems, pages 3856-3866, 2017. 3 +[24] Zhuowen Tu. Probabilistic boosting-tree: Learning discriminative models for classification, recognition, and clustering. In ICCV, volume 2, pages 1589-1596. IEEE, 2005. 2, 6 +[25] Li Wang, Xiao-Liang Xie, Gui-Bin Bian, Zeng-Guang Hou, Xiao-Ran Cheng, and Pusit Prasong. Guide-wire detection using region proposal network for x-ray image-guided navigation. In IJCNN, pages 3169-3175. IEEE, 2017. 2 +[26] Peng Wang, Terrence Chen, Ying Zhu, Wei Zhang, S Kevin Zhou, and Dorin Comaniciu. Robust guidewire tracking in fluoroscopy. In CVPR, pages 691-698, 2009. 2, 7, 8 +[27] Maurice Weiler, Fred A Hamprecht, and Martin Storath. Learning steerable filters for rotation equivariant cnns. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 849-858, 2018. 2, 7 \ No newline at end of file diff --git a/trainingasteerablecnnforguidewiredetection/images.zip b/trainingasteerablecnnforguidewiredetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9ed6b3df9aef2d2060f54554580d77127db07551 --- /dev/null +++ b/trainingasteerablecnnforguidewiredetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:752aca7ad6d61209b81cbf719bf570015342af8a0bd059cf5ec3bb20db1293bd +size 887029 diff --git a/trainingasteerablecnnforguidewiredetection/layout.json b/trainingasteerablecnnforguidewiredetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8b0973b756ce4724b91bab4b83393ec2a17835d5 --- /dev/null +++ b/trainingasteerablecnnforguidewiredetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13e159a4e78674429b6d9db5312b00d0441a464fd4427695ab54b44dd799cde3 +size 385391 diff --git a/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/01178305-f7b9-4098-b019-8d478d55c8a5_content_list.json b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/01178305-f7b9-4098-b019-8d478d55c8a5_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..74d1ac7a4fac77f4e7f5b649af2a15b66f536b86 --- /dev/null +++ b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/01178305-f7b9-4098-b019-8d478d55c8a5_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63018bdabb0092024beda310dc51bda4251b219742904efcacbb80b456b21dad +size 88718 diff --git a/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/01178305-f7b9-4098-b019-8d478d55c8a5_model.json b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/01178305-f7b9-4098-b019-8d478d55c8a5_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fcab6e1332e56a4ecd91dbc1d2006b65cf5a1c87 --- /dev/null +++ b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/01178305-f7b9-4098-b019-8d478d55c8a5_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ab5ceecb910e4d3749f3b26a9c66df1dd9862c856683be933bed71cdd1e8208 +size 110688 diff --git a/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/01178305-f7b9-4098-b019-8d478d55c8a5_origin.pdf b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/01178305-f7b9-4098-b019-8d478d55c8a5_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a768c789ca9cc65594b79d581f8445b9976a4b15 --- /dev/null +++ b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/01178305-f7b9-4098-b019-8d478d55c8a5_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a61fffa4633a4902d993b8b266b1bf91dbdba6af2341a19a462829022791018f +size 2912721 diff --git a/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/full.md b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8c706e061ad146e5db557edf7672caf8f53a193c --- /dev/null +++ b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/full.md @@ -0,0 +1,331 @@ +# Train in Germany, Test in The USA: Making 3D Object Detectors Generalize + +Yan Wang*1 + +Bharath Hariharan + +$^{1}$ Cornell University + +Xiangyu Chen*1 + +Mark Campbell + +2Scale AI + +Chen\*1 + +bell + +3Columb + +Yurong You + +Kilian Q. Weinberger1 + +University + +Li Erran $\mathbf{L}\mathbf{i}^{2,3}$ + +$\mathbf{er}^{1}$ Wei-Lun Chao + +4The Ohio State University + +{yw763, xc429, yy785, bh497, mc288, kqw4}@cornell.edu erranlli@gmail.com chao.209@osu.edu + +# Abstract + +In the domain of autonomous driving, deep learning has substantially improved the 3D object detection accuracy for LiDAR and stereo camera data alike. While deep networks are great at generalization, they are also notorious to overfit to all kinds of spurious artifacts, such as brightness, car sizes and models, that may appear consistently throughout the data. In fact, most datasets for autonomous driving are collected within a narrow subset of cities within one country, typically under similar weather conditions. In this paper we consider the task of adapting 3D object detectors from one dataset to another. We observe that naively, this appears to be a very challenging task, resulting in drastic drops in accuracy levels. We provide extensive experiments to investigate the true adaptation challenges and arrive at a surprising conclusion: the primary adaptation hurdle to overcome are differences in car sizes across geographic areas. A simple correction based on the average car size yields a strong correction of the adaptation gap. Our proposed method is simple and easily incorporated into most 3D object detection frameworks. It provides a first baseline for 3D object detection adaptation across countries, and gives hope that the underlying problem may be more within grasp than one may have hoped to believe. Our code is available at https://github.com/cxy1997/3D_adapt_auto-driving. + +# 1. Introduction + +Autonomous cars need to accurately detect and localize vehicles and pedestrians in 3D to drive safely. As such, the past few years have seen a flurry of interest on the problem of 3D object detection, resulting in large gains in accuracy on the KITTI benchmark [11, 14, 15, 16, 18, 19, 28, 29, 30, 31, 32, 33, 34, 37, 40, 41, 52, 53, 54, 51, 61, 62, 63, 64, 65, 68, 69]. However, in the excitement this has garnered, it has often been forgotten that KITTI is a fairly small ( $\sim$ 15K + +![](images/0e47a93f7024059e6d3c8b87e9669cccb144c25807f495b7db68bf023c715a77.jpg) +T + +![](images/72734d0e8a588f8aa521a71992245839eeb1c1e5ed214ec2f6bb66e391c24c96.jpg) + +![](images/507f529d5a6b7cb2427c1cf5df05e81f37f3c4698532a0921e1a8f4e96d7d468.jpg) + +![](images/04301e2fb057a64e2fd28a2b599b47e23fea39b76ad001dbcd944529fe63b445.jpg) + +![](images/ef25f674b8d351f4a34181330cb993f4f12606c586cf622fd5a3317b47dc5641.jpg) +Figure 1: Datasets. We show frontal view images (left) and the corresponding LiDAR signals (right) from the bird's-eye view for five datasets: KITTI [18, 19], Argoverse [7], nuScenes [4], Lyft [25], and Waymo [3]. These datasets not only capture scenes at different geo-locations, but also use different LiDAR models, making generalizing 3D object detectors a challenging problem. + +![](images/7e03e85cab8a484c479911bbb4bffb3de037adffa41a2355ed479d10c44b61e4.jpg) + +![](images/49317cce431c563cc9a0af4b1cc7a6f452b01b9911dd897a8cfef9b671864d71.jpg) + +![](images/a6ca34db966a98b45561aa2ef9071553774af307b5e63f22802746e452aacc4c.jpg) + +![](images/56f4c6bf5fadf123f4f332f6d0a1b3f51186bffcf799a274e1ccdeb8a2177204.jpg) + +![](images/c18ac02f22691ffb5f0653a2ff1105128b54d2773030f2ef7697dabd10d82009.jpg) + +scenes) object detection dataset obtained from a narrow domain: it was collected using a fixed sensing apparatus by driving through a mid-sized German city and the German countryside, in clear weather, during the day. Thus, the 3D object detection algorithms trained on KITTI may have picked up all sorts of biases: they may expect the road to be visible or the sky to be blue. They may identify only certain brands of cars, and might have even over-fit to the idiosyncrasies of German drivers and pedestrians. Carrying + +these biases over to a new environment in a different part of the world might cause the object detector to miss cars or pedestrians, with devastating consequences [1]. + +It is, therefore, crucial that we (a) understand the biases that our 3D object detectors are picking up before we deploy them in safety-critical applications, and (b) identify techniques to mitigate these biases. Our goal in this paper is to address both of these challenges. + +Our first goal is to understand if any biases have crept into current 3D object detectors. For this, we leverage multiple recently released datasets with similar types of sensors to KITTI [18, 19] (cameras and LiDAR) and with 3D annotations, each of them collected in different cities [3, 4, 7, 25] (see Figure 1 for an illustration). Interestingly, they are also recorded with different sensor configurations (i.e., the LiDAR and camera models as well as their mounting arrangements can be different). We first train two representative LiDAR-based 3D object detectors (PIXOR [63] and POINTRCNN [52]) on each dataset and test on the others. We find that when tested on a different dataset, 3D object detectors fail dramatically: a detector trained on KITTI performs 36 percent worse on Waymo [3] compared to the one trained on Waymo. This indicates that the detector has indeed over-fitted to its training domain. + +What domain differences are causing such catastrophic failure? One can think of many possibilities. There may be differences in low-level statistics of the images. The Li-DAR sensors might have more or fewer beams, and may be oriented differently. But the differences can also be in the physical world being sensed. There may be differences in the number of vehicles, their orientation, and also their sizes and shapes. We present an extensive analysis of these potential biases that points to one major issue — statistical differences in the sizes and shapes of cars. + +In hindsight, this difference makes sense. The best selling car in the USA is a 5-meter long truck (Ford F-series) [2], while the best selling car in Germany is a 4-meter long compact car (Volkswagen Golf1). Because of such differences, cars in KITTI tend to be smaller than cars in other datasets, a bias that 3D object detectors happily learn. As a counter to this bias, we propose an extremely simple approach that leverages aggregate statistics of car sizes (i.e., mean) to correct for this bias, in both the output annotations and the input signals. Such statistics might be acquired from the department of motor vehicles, or car sales data. This single correction results in a massive improvement in cross-dataset performance, raising the 3D easy part average precision by 41.4 points and results in a much more robust 3D object detector. + +Taken together, our contributions are two-fold: + +- We present an extensive evaluation of the domain dif + +ferences between self-driving car environments and how they impact 3D detector performance. Our results suggest a single core issue: size statistics of cars in different locations. + +- We present a simple and effective approach to mitigate this issue by using easily obtainable aggregate statistics of car sizes, and show dramatic improvements in cross-dataset performance as a result. + +Based on our results, we recommend that vision researchers and self-driving car companies alike be cognizant of such domain differences for large-scale deployment of 3D detection systems. + +# 2. Related Work + +We review 3D object detection for autonomous driving, and domain adaptation for 2D segmentation and detection in street scenes. + +LiDAR-based detection. Most existing techniques of 3D object detection use LiDAR (sometimes with images) as the input signal, which provides accurate 3D points of the surrounding environment. The main challenge is thus on properly encoding the points so as to predict point labels or draw bounding boxes in 3D to locate objects. Frustum PointNet [41] applies PointNet [42, 43] to each frustum proposal from a 2D object detector; POINTRCNN [52] learns 3D proposals from PointNet++ features [43]. MV3D [11] projects LiDAR points into frontal and bird's-eye views (BEV) to obtain multi-view features; FIXOR [63] and LaserNet [37] show that properly encoding features in one view is sufficient to localize objects. VoxelNet [69] and PointPillar [30] encode 3D points into voxels and extracts features by 3D convolutions and PointNet. UberATG-ContFuse [34] and UberATG-MMF [33] perform continuous convolutions [56] to fuse visual and LiDAR features. + +Image-based detection. While providing accurate 3D points, LiDAR sensors are notoriously expensive. A 64-line LiDAR (e.g., the one used in KITTI [19, 18]) costs around \( \\(75,000 \) (US dollars). As an alternative, researchers have also been investigating purely image-based 3D detection. Existing algorithms are largely built upon 2D object detection [45, 20, 35], imposing extra geometric constraints [6, 8, 38, 59] to create 3D proposals. [9, 10, 39, 60] apply stereo-based depth estimation to obtain 3D coordinates of each pixel. These 3D coordinates are either entered as additional input channels into a 2D detection pipeline, or used to extract hand-crafted features. The recently proposed pseudo-LiDAR [58, 44, 66] combined stereo-based depth estimation with LiDAR-based detection, converting the depth map into a 3D point cloud and processing it exactly as LiDAR signal. The pseudo-LiDAR framework has largely improved image-based detection, yet a notable gap is still remained compared to LiDAR. In this work, we + +therefore focus on LiDAR-based object detectors. + +Domain adaptation. (Unsupervised) domain adaptation has also been studied in autonomous driving scenes, but mainly for the tasks of 2D semantic segmentation [13, 22, 24, 36, 48, 49, 50, 55, 67, 73] and 2D object detection [5, 12, 21, 23, 26, 27, 46, 47, 57, 72, 71]. The common setting is to adapt a model trained from one labeled source domain (e.g., synthetic images) to an unlabeled target domain (e.g., real images). The domain difference is mostly from the input signal (e.g., image styles), and many algorithms have built upon adversarial feature matching and style transfer [17, 22, 70] to minimize the domain gap in the input or feature space. Our work contrasts these methods by studying 3D object detection. We found that, the output space (e.g., car sizes) can also contribute to the domain gap; properly leveraging the statistics of the target domain can largely improve the model's generalization ability. + +# 3. Datasets + +We review KITTI [18, 19] and introduce the other four datasets used in our experiments: Argoverse [7], Lyft [25], nuScenes [4], and Waymo [3]. We focus on data related to 3D object detection. All the datasets provide ground-truth 3D bounding box labels for several kinds of objects. We summarize the five datasets in detail in Table 1. + +KITTI. The KITTI object detection benchmark [18, 19] contains 7,481 (left) images for training and 7,518 images for testing. The training set is further separated into 3,712 training and 3,769 validation images as suggested by [9]. All the scenes are pictured around Karlsruhe, Germany in clear weather and day time. For each (left) image, KITTI provides its corresponding 64-beam Velodyne LiDAR point cloud and the right stereo image. + +Argoverse. The Argoverse dataset [7] is collected around Miami and Pittsburgh, USA in multiple weathers and during different times of a day. It provides images from stereo cameras and another seven cameras that cover $360^{\circ}$ information. It also provides 64-beam LiDAR point clouds captured by two 32-beam Velodyne LiDAR sensors stacked vertically. We extracted synchronized frontal-view images and corresponding point clouds from the original Argoverse dataset, with a timestamp tolerance of $51\mathrm{ms}$ between LiDAR sweeps and images. The resulting dataset we use contains 13, 122 images for training, 5, 015 images for validation, 4, 168 images for testing. + +nuScenes. The nuScenes dataset [4] contains 28, 130 training and 6, 019 validation images. We treat the validation images as test images, and re-split and subsample the 28, 130 training images into 11, 040 training and 3, 026 validation images. The scenes are pictured around Boston, USA and Singapore in multiple weathers and during different times of a day. For each image, nuScenes provides the point cloud captured by a 32-beam roof LiDAR. It also provides images + +from another five cameras that cover $360^{\circ}$ information. + +Lyft. The Lyft Level 5 dataset [25] contains 18,634 frontal-view images and we separate them into 12,599 images for training, 3,024 images for validation, 3,011 images for testing. The scenes are pictured around Palo Auto, USA in clear weathers and during day time. For each image, Lyft provides the point cloud captured by a 40 (or 64)-beam roof LiDAR and two 40-beam bumper LiDAR sensors. It also provides images from another five cameras that cover $360^{\circ}$ information and one long-focal-length camera. + +Waymo. The Waymo dataset [3] contains 122,000 training, 30,407 validation, and 40,077 test images and we subsample them into 12,000, 3,000, and 3,000, respectively. The scenes are pictured at Phoenix, Mountain View, and San Francisco in multiple weathers and at multiple times of a day. For each image, Waymo provides the combined point cloud captured by five LiDAR sensors (one on the roof). It also provides images from another four cameras. + +Data format. A non-negligible difficulty in conducting cross-dataset analysis lies in the differences of data formats. Considering that most existing algorithms are developed using the KITTI format, we transfer all the other four datasets into its format. See the Supplementary Material for details. + +# 4. Experiments and Analysis + +# 4.1. Setup + +3D object detection algorithms. We apply two LiDAR-based models POINTRCNN [52] and FIXOR [63] to detect objects in 3D by outputting the surrounding 3D bounding boxes. FIXOR represents LiDAR point clouds by 3D tensors after voxelization, while POINTRCNN applies PointNet++ [43] to extract point-wise features. Both methods do not rely on images. We train both models on the five 3D object detection datasets. POINTRCNN has two subnetworks, the region proposal network (RPN) and region-CNN (RCNN), that are trained separately. The RPN is trained first, for 200 epochs with batch size 16 and learning rate 0.02. The RCNN is trained for 70 epochs with batch size 4 and learning rate 0.02. We use online ground truth boxes augmentation, which copies object boxes and inside points from one scene to the same locations in another scene. For FIXOR, we train it with batch size 4 and initial learning rate $5 \times 10^{-5}$ , which will be decreased 10 times on the 50th and 80th epoch. We do randomly horizontal flip and rotate during training. + +Metric. We follow KITTI to evaluate object detection in 3D and the bird's-eye view (BEV). We focus on the Car category, which has been the main focus in existing works. We report average precision (AP) with the IoU thresholds at 0.7: a car is correctly detected if the intersection over union (IoU) with the predicted 3D box is larger than 0.7. We denote AP for the 3D and BEV tasks by $\mathrm{AP}_{\mathrm{3D}}$ and $\mathrm{AP}_{\mathrm{BEV}}$ . + +Table 1: Dataset overview. We focus on their properties related to frontal-view images, LiDAR, and 3D object detection. The dataset size refers to the number of synchronized (image, LiDAR) pairs. For Waymo and nuScenes, we subsample the data. See text for details. + +
DatasetSizeLiDAR TypeBeam AnglesObject TypesRainy WeatherNight Time
KITTI [18, 19]14,9991 × 64-beam[−24°, 4°]8NoNo
Argoverse [7]22,3052 × 32-beam[−26°, 25°]17NoYes
nuScenes [4]34,1491 × 32-beam[−16°, 11°]23YesYes
Lyft [25]18,6341 × 40 or 64 + 2 × 40-beam[−29°, 5°]9NoNo
Waymo [3]192,4841 × 64 + 4 × 200-beam[−18°, 2°]4YesYes
+ +KITTI evaluates three cases: Easy, Moderate, and Hard. Specifically, it labels each ground truth box with four levels (0 to 3) of occlusion / truncation. The Easy case contains level-0 cars whose bounding box heights in 2D are larger than 40 pixels; the Moderate case contains level-\{0, 1\} cars whose bounding box heights in 2D are larger than 25 pixels; the Hard case contains level-\{0, 1, 2\} cars whose bounding box heights in 2D are larger than 25 pixels. The heights are meant to separate cars by their depths with respect to the observing car. Nevertheless, since different datasets have different image resolutions, such criteria might not be aligned across datasets. We thus replace the constraints of "larger than 40, 25 pixels" by "within 30, 70 meters". We further evaluate cars of level-\{0, 1, 2\} within three depth ranges: $0 - 30$ , $30 - 50$ , and $50 - 70$ meters, following [63]. + +We mainly report and discuss results of POINTRCNN on the validation set in the main paper. We report results of pixOR in the Supplementary Material. + +# 4.2. Results within each dataset + +We first evaluate if existing 3D object detection models that have shown promising results on the KITTI benchmark can also be learned and perform well on newly released datasets. We summarize the results in Table 2: the rows are the source domains that a detector is trained on, and the columns are the target domains the detector is being tested on. The **bold** font indicates the within domain performance (i.e., training and testing using the same dataset). + +We see that POINTCRCNN works fairly well on the KITTI, Lyft, and Waymo datasets, for all the easy, moderate, and hard cases. The results get slightly worse on Argoverse, and then nuScenes. We hypothesize that this may result from the relatively poor LiDAR input: nuScenes has only 32 beams; while Argoverse has 64 beams, every two of them are very close due to the configurations that the signal is captured by two stacked LiDAR sensors. + +We further analyze at different ranges in Table 2 (bottom). We see a drastic drop on Argoverse and nuScenes for the far-away ranges, which supports our hypothesis: with fewer beams, the far-away objects can only be rendered by very sparse LiDAR points and thus are hard to detect. We also see poor accuracies at $50 - 70$ meters on KITTI, which may result from very few labeled training instances there. + +Overall, both 3D object detection algorithms work fairly + +well when being trained and tested using the same dataset, as long as the input sensor signal is of high quality and the labeled instances are sufficient. + +# 4.3. Results across datasets + +We further experiment with generalizing a trained detector across datasets. We indicate the best result per column and per setting by red fonts and the worst by blue fonts. + +We see a clear trend of performance drop. For instance, the POINTRCNN model trained on KITTI achieves only $45.2\% \mathrm{AP}_{\mathrm{BEV}}$ (Moderate) on Waymo, lower than the model trained on Waymo by over $40\%$ . The gap becomes even larger in $\mathrm{AP}_{3\mathrm{D}}$ : the same KITTI model attains only $11.9\% \mathrm{AP}_{3\mathrm{D}}$ , while the Waymo model attains $85.3\%$ . We hypothesize that the car height is hard to get right. In terms of the target (test) domain, Lyft and Waymo suffer the least drop if the detector is trained from the other datasets, followed by Argoverse. KITTI and nuScenes suffer the most drop, which might result from their different geo-locations (one is from Germany and the other contains data from Singapore). The nuScenes dataset might also suffer from its relatively fewer beams in the input and other models may therefore not be able to apply. By considering different ranges, we also find that the deeper the range is, the bigger the drop is. + +In terms of the source (training) domain, we see that the detector trained on KITTI seems to be the worst to transfer to others. In every $5 \times 1$ block that is evaluated on a single dataset in a single setting, the KITTI model is mostly outperformed by others. Surprisingly, nuScenes model can perform fairly well when being tested on the other datasets: the results are even higher than on its own. We thus have two arguments: The quality of sensors is more important in testing than in training; KITTI data (e.g., car styles, time, and weather) might be too limited or different from others and therefore cannot transfer well to others. In the following subsections, we provide detailed analysis. + +# 4.4. Analysis of domain idiosyncrasies + +Table 2 and subsection 4.3 reveal drastic accuracy drops in generalizing 3D object detectors across datasets (domains). We hypothesize that there exist significant idiosyncrasies in each dataset. In particular, Figure 1 shows that the images and point clouds are quite different across datasets. One one hand, different datasets are collected by cars of dif + +Table 2: 3D object detection across multiple datasets (evaluated on the validation sets). We report average precision (AP) of the Car category in bird's-eye view $(\mathrm{AP}_{\mathrm{BEV}})$ and 3D $(\mathrm{AP}_{\mathrm{3D}})$ at IoU = 0.7, using the POINTRCNN detector [52]. We report results at different difficulties (following the KITTI benchmark, but we replace the 40, 25, 25 pixel thresholds on 2D bounding boxes with 30, 70, 70 meters on object depths, for Easy, Moderate, and Hard cases, respectively) and different depth ranges (using the same truncation and occlusion thresholds as KITTI Hard case). The results show a significant performance drop in cross-dataset inference. We indicate the best generalization results per column and per setting by red fonts and the worst by blue fonts. We indicate in-domain results by bold fonts. + +
SettingSource\TargetKITTIArgoversenuScenesLyftWaymo
EasyKITTI88.0 / 82.555.8 / 27.747.4 / 13.381.7 / 51.845.2 / 11.9
Argoverse69.5 / 33.979.2 / 57.852.5 / 21.886.9 / 67.483.8 / 40.2
nuScenes49.7 / 13.473.2 / 21.873.4 / 38.189.0 / 38.278.8 / 36.7
Lyft74.3 / 39.477.1 / 45.863.5 / 23.990.2 / 87.387.0 / 64.7
Waymo51.9 / 13.176.4 / 42.655.5 / 21.687.9 / 74.590.1 / 85.3
ModerateKITTI80.6 / 68.944.9 / 22.326.2 / 8.361.8 / 33.743.9 / 12.3
Argoverse56.6 / 31.469.9 / 44.227.6 / 11.866.6 / 42.172.3 / 35.1
nuScenes39.8 / 10.756.6 / 17.140.7 / 21.271.4 / 25.068.2 / 30.8
Lyft61.1 / 34.362.5 / 35.333.6 / 12.383.7 / 65.577.6 / 53.2
Waymo45.8 / 13.264.4 / 29.828.9 / 13.774.2 / 53.885.9 / 67.9
HardKITTI81.9 / 66.742.5 / 22.224.9 / 8.857.4 / 34.241.5 / 12.6
Argoverse58.5 / 33.369.9 / 42.826.8 / 14.564.4 / 42.768.5 / 36.8
nuScenes39.6 / 10.153.3 / 16.740.2 / 20.567.7 / 25.766.9 / 29.0
Lyft60.7 / 33.962.9 / 35.930.6 / 11.779.3 / 65.577.0 / 53.9
Waymo46.3 / 12.661.6 / 29.028.4 / 14.174.1 / 54.580.4 / 67.7
0-30mKITTI88.8 / 84.958.4 / 34.747.9 / 14.977.8 / 54.248.0 / 14.0
Argoverse74.2 / 46.883.3 / 63.355.3 / 26.987.7 / 69.585.7 / 44.4
nuScenes50.7 / 13.973.7 / 26.073.2 / 42.889.1 / 43.879.8 / 43.4
Lyft75.1 / 45.281.0 / 54.061.6 / 25.490.4 / 88.588.6 / 70.9
Waymo56.8 / 15.080.6 / 48.157.8 / 24.088.4 / 76.290.4 / 87.2
30m-50mKITTI70.2 / 51.446.5 / 19.09.8 / 4.560.1 / 34.550.5 / 21.4
Argoverse33.9 / 11.872.2 / 39.59.5 / 9.165.9 / 39.175.9 / 42.1
nuScenes24.1 / 3.846.3 / 6.417.1 / 4.170.1 / 18.969.4 / 29.2
Lyft39.3 / 16.659.2 / 21.811.2 / 9.183.8 / 62.779.4 / 55.5
Waymo31.7 / 9.358.0 / 18.89.9 / 9.174.5 / 51.487.5 / 68.8
50m-70mKITTI28.8 / 12.09.2 / 3.01.1 / 0.033.2 / 9.627.1 / 12.0
Argoverse10.9 / 1.329.9 / 6.90.5 / 0.035.1 / 14.546.2 / 23.0
nuScenes6.5 / 1.515.2 / 2.39.1 / 9.141.8 / 5.337.9 / 15.2
Lyft13.6 / 4.623.1 / 3.91.1 / 0.062.7 / 33.154.6 / 27.5
Waymo5.6 / 1.826.9 / 5.60.9 / 0.050.8 / 21.363.5 / 41.1
+ +![](images/f56c391c5fd9f23da4a4468cfead4eaed2da6d3cb4e9f15e3b5ec4576abb3615.jpg) +Figure 2: The average numbers of 3D points per car (left) and per scene (right). We only include points within the frontal-view camera view and cars whose depths are within 70 meters. + +![](images/23db6a0a872c4dbb43168fe1320302253cffd68d6fc8b7e745cc1af8c1e05887.jpg) + +ferent sensor configurations. For example, nuScenes uses a single 32-beam LiDAR; the point clouds are thus sparser than the other datasets. On the other hand, these datasets + +are collected at different locations; the environments and the foreground object styles may also be different. + +To provide a better understanding, we compute the average number of LiDAR points per scene and per car (using the ground-truth 3D bounding box) in Figure 2. We see a large difference: Waymo has ten times of points per car than nuScenes $^{2}$ . We further analyze the size of bounding boxes per car. Figure 3 shows the histograms of each dataset. We again see mismatches between different datasets: KITTI seems to have the smallest box sizes while Waymo has the largest. We conduct an analysis and find that most of the bounding boxes tightly contain the points of cars inside. We, therefore, argue that this difference of box sizes is related to the car styles captured in different datasets. + +![](images/998bf5b91f2a62ce8a2b666bd0c11a9e837d21d81c370b67e471c94d8fc29b73.jpg) +Figure 3: Car size statistics of different datasets. + +![](images/c51a0005684c2076430b541c71f6637a9c792e29b654caf1bcd056dbdc905835.jpg) + +![](images/f2771f25d37292d095c150fc56cedaf0a84e2e49bc56b655d2b49b77b7341768.jpg) + +![](images/1950f8f43efa551e929e88bcbb2d269710c5a4ea6bf2e03b10301b65b8ebf624.jpg) +Figure 4: Sizes of detected bounding boxes before and after our Statistical Normalization (Stat Norm). The detector is trained on Waymo (w/o or w/ Stat Norm) and tested on KITTI. We also show the distribution of ground-truth box sizes in both datasets. + +![](images/f5a8f673f8007c2f530d2227e86b3d872f316fe26a32427169c91fcdf17a2b76.jpg) + +![](images/5e3534955c375fe683955a885a73f37af84b5ca6b3d188a8d2cb122d2c76ff73.jpg) + +![](images/f0d51fdc433b48f9c9fdefab7d163aa69b5a13f52d61a77f2d9effd453e77ec0.jpg) +Figure 5: Car detection accuracy $(\mathrm{AP}_{3\mathrm{D}}$ at Moderate cases) on KITTI, using POINTRCNN models trained on different datasets. We vary the IoU threshold from 0.0 to 1.0 (x-axis). The curves indicate that models trained on different datasets have similar detection abilities (converge at low IoU) but they differ in localization (diverge at high IoU). + +# 4.5. Analysis of detector performance + +So what are the idiosyncrasies that account for the majority of performance gap? There are two factors that can lead to an miss-detected car (i.e., IoU $< 0.7$ ): the car might be entirely missed by the detector, or it is detected but poorly localized. To identify the main factor, we lower down the IoU threshold using KITTI as the target domain (see Figure 5). We observe an immediate increase in $\mathrm{AP}_{3\mathrm{D}}$ , and the results become saturated when IoU is lower than 0.4. Surprisingly, POINTRCNN models trained from other datasets perform on a par with the model trained on KITTI. In other words, poor generalization resides primarily in localization. + +We investigate one cause of mislocalization3: inaccurate box size. To this end, we replace the size of every detected car that has IoU $> 0.2$ to a ground-truth car with the corresponding ground-truth box size, while keeping its bottom center and rotation unchanged. We see an immediate performance boost in Table 3 (see the Supplementary Material for + +Table 3: Cross-dataset performance and gain (in parentheses) by assigning ground-truth box sizes to detected cars while keeping their centers and rotations unchanged. We report $\mathrm{AP}_{\mathrm{3D}}$ of the Car category at IoU = 0.7, using POINTRCNN [52]. We show adaptation from KITTI to other datasets, and vice versa. + +
SettingDatasetFrom KITTITo KITTI
EasyArgoverse65.7 (+38.0)59.2 (+25.3)
nuScenes33.5 (+20.2)63.9 (+50.5)
Lyft74.8 (+23.1)58.4 (+19.0)
Waymo77.1 (+65.2)78.2 (+65.1)
ModerateArgoverse50.9 (+28.6)51.0 (+19.6)
nuScenes18.2 (+9.9)47.3 (+36.6)
Lyft54.3 (+20.6)49.4 (+15.1)
Waymo63.0 (+50.7)60.6 (+47.4)
HardArgoverse49.3 (+27.1)52.5 (+19.2)
nuScenes17.7 (+8.9)45.7 (+35.6)
Lyft53.0 (+18.8)52.0 (+18.1)
Waymo59.1 (+46.5)60.7 (+48.1)
+ +complete results across all pairs of datasets). In other words, the detector trained from one domain just cannot predict the car size right in the other domains. This observation correlates with our findings in Figure 3 that these datasets have different car sizes. By further analyzing the detected boxes (in Figure 4, we apply the detector trained from Waymo to KITTI), we find that the detector tends to predict box sizes that are similar to the ground-truth sizes in source domain, even though cars in the target domain are indeed physically smaller. We think this is because the detectors trained from the source data carry the learned bias to the target data. + +# 5. Domain Adaptation Approaches + +The poor performance due to mislocalization rather than misdetection opens the possibility of adapting a learned detector to a new domain with relatively smaller efforts. We investigate two scenarios: (1) a few labeled scenes (i.e., point clouds with 3D box annotations) or (2) the car size + +Table 4: Improved 3D object detection across datasets (evaluated on the validation sets). We report $\mathrm{AP}_{\mathrm{BEV}} / \mathrm{AP}_{\mathrm{3D}}$ of the Car category at IoU = 0.7, using POINTRCNN [52]. We investigate (OT) output transformation by directly adjusting the predicted box sizes, (SN) statistical normalization, and (FS) few-shot fine-tuning (with 10 labeled instances). We also include (Direct) directly applying the detectors trained on the source domain and (Within) applying the detectors trained on the target domain for comparison. We show adaption results from KITTI to other datasets, and vice versa. We mark the best result among Direct, OT, SN, and FS in red fonts, and worst in blue fonts. + +
From KITTI (KITTI as the source; others as the target)To KITTI (KITTI as the target; others as the source)
SettingDatasetDirectOTSNFSWithinDirectOTSNFSWithin
EasyArgoverse nuScenes55.8 / 27.772.7 / 9.074.7 / 48.275.8 / 49.279.2 / 57.869.5 / 33.953.3 / 5.776.2 / 46.180.0 / 49.788.0 / 82.5
Lyft47.4 / 13.355.0 / 10.460.8 / 23.954.7 / 21.773.4 / 38.149.7 / 13.475.4 / 31.583.2 / 35.683.8 / 58.788.0 / 82.5
Waymo81.7 / 51.888.2 / 23.588.3 / 73.389.0 / 78.190.2 / 87.374.3 / 39.471.9 / 4.783.5 / 72.185.3 / 72.588.0 / 82.5
Mod.45.2 / 11.986.1 / 16.284.6 / 53.387.4 / 70.990.1 / 85.351.9 / 13.164.0 / 3.982.1 / 48.781.0 / 67.088.0 / 82.5
Mod.Argoverse nuScenes44.9 / 22.359.9 / 7.961.5 / 38.260.7 / 37.369.9 / 44.256.6 / 31.452.2 / 7.367.2 / 40.568.8 / 42.880.6 / 68.9
Lyft26.2 / 8.330.8 / 6.832.9 / 16.428.7 / 12.540.7 / 21.239.8 / 10.758.5 / 27.367.4 / 31.067.2 / 45.580.6 / 68.9
Waymo61.8 / 33.770.1 / 17.873.7 / 53.174.2 / 53.483.7 / 65.561.1 / 34.360.8 / 5.673.6 / 57.973.9 / 56.280.6 / 68.9
Mod.43.9 / 12.369.1 / 13.174.9 / 49.475.9 / 55.385.9 / 67.945.8 / 13.254.9 / 3.771.3 / 47.166.8 / 51.880.6 / 68.9
HardArgoverse nuScenes42.5 / 22.259.3 / 9.360.6 / 37.159.8 / 36.569.9 / 42.858.5 / 33.353.5 / 8.668.5 / 41.966.3 / 43.081.9 / 66.7
Lyft24.9 / 8.827.8 / 7.631.9 / 15.827.5 / 12.440.2 / 20.539.6 / 10.159.5 / 27.865.2 / 30.864.7 / 44.581.9 / 66.7
Waymo57.4 / 34.266.5 / 19.173.1 / 53.571.8 / 52.979.3 / 65.560.7 / 33.963.1 / 6.975.2 / 58.974.1 / 56.281.9 / 66.7
Mod.41.5 / 12.668.7 / 13.969.4 / 49.470.1 / 54.480.4 / 67.746.3 / 12.658.0 / 4.173.0 / 49.768.1 / 52.981.9 / 66.7
0-30Argoverse nuScenes58.4 / 34.773.0 / 13.773.1 / 54.273.6 / 55.283.3 / 63.374.2 / 46.864.9 / 10.183.3 / 53.984.0 / 56.988.8 / 84.9
Lyft47.9 / 14.956.2 / 13.960.0 / 29.254.0 / 23.673.2 / 42.850.7 / 13.974.6 / 36.683.6 / 42.881.2 / 59.888.8 / 84.9
Lyft77.8 / 54.288.4 / 27.588.8 / 75.489.3 / 77.690.4 / 88.575.1 / 45.274.8 / 9.187.4 / 73.687.5 / 73.988.8 / 84.9
Waymo48.0 / 14.087.7 / 22.287.1 / 60.188.7 / 74.190.4 / 87.256.8 / 15.071.3 / 4.485.7 / 59.084.8 / 71.088.8 / 84.9
30-50Argoverse nuScenes46.5 / 19.056.1 / 5.461.5 / 31.559.0 / 29.972.2 / 39.533.9 / 11.835.1 / 9.148.9 / 25.747.9 / 23.870.2 / 51.4
Lyft9.8 / 4.510.8 / 9.111.0 / 2.39.5 / 6.117.1 / 4.124.1 / 3.835.5 / 15.544.9 / 18.645.0 / 25.170.2 / 51.4
Lyft60.1 / 34.567.4 / 10.773.8 / 52.273.7 / 50.483.8 / 62.739.3 / 16.643.3 / 3.958.3 / 38.057.7 / 33.370.2 / 51.4
Waymo50.5 / 21.473.6 / 10.478.1 / 54.978.1 / 57.287.5 / 68.831.7 / 9.339.8 / 4.557.3 / 36.349.2 / 29.270.2 / 51.4
50-70Argoverse nuScenes9.2 / 3.020.5 / 1.023.8 / 5.620.1 / 6.329.9 / 6.910.9 / 1.38.0 / 0.89.1 / 2.68.1 / 3.828.8 / 12.0
Lyft1.1 / 0.01.5 / 1.03.0 / 2.33.3 / 1.29.1 / 9.16.5 / 1.57.8 / 5.19.4 / 5.112.9 / 5.728.8 / 12.0
Lyft33.2 / 9.641.3 / 6.849.9 / 22.246.8 / 19.462.7 / 33.113.6 / 4.612.7 / 0.921.1 / 6.717.5 / 8.028.8 / 12.0
Waymo27.1 / 12.042.6 / 4.246.8 / 25.145.2 / 24.363.5 / 41.15.6 / 1.87.7 / 1.114.4 / 5.710.5 / 4.828.8 / 12.0
+ +statistics of the target domain are available. We argue that both scenarios are practical: we can simply annotate for every place a few labeled instances, or get the statistics from the local vehicle offices or car-selling websites. In the main paper, we will mainly focus on training from KITTI and testing on the others, and vice versa. We leave other results in the Supplementary Material. + +Few-shot (FS) fine-tuning. In the first scenario where a few labeled scenes from the target domain are accessible, we investigate fine-tuning the already trained object detector with these few-shot examples. As shown in Table 4, using only 10 labeled scenes (average over five rounds of experiments) of the target domain, we can already improve the $\mathrm{AP}_{3\mathrm{D}}$ by over $20.4\%$ on average when adapting KITTI to other datasets and $24.4\%$ on average when adapting other datasets to KITTI. Figure 6 further shows the performance by fine-tuning with different number of scenes. With merely 20 labeled target scenes, the adapted detector from Lyft and Waymo can already be on a par with that trained from scratch in the target domain with 500 scenes. + +Statistical normalization (SN). For the second scenario where the target statistics (i.e., average height, width, and length of cars) are accessible, we investigate modifying the + +![](images/f0660bc037a56d306d9cd8dde441db2d34297c8718be2d119afc9b7f05b9b1cf.jpg) +Figure 6: The few-shot fine-tuning performance on KITTI validation set with the model pre-trained on Argoverse, nuScenes, Lyft, and Waymo datasets. The x-axis indicates how many KITTI training images are used for fine-tuning. The y-axis marks $\mathrm{AP}_{3\mathrm{D}}$ (moderate cases). Scratch denotes the model trained on the sampled KITTI training images with randomly initialized weights. + +already trained object detector so that its predicted box sizes can better match the target statistics. We propose a data modification scheme named statistical normalization by adjusting the source domain data, as illustrated in Figure 7. Specifically, we compute the difference of mean car sizes between the target domain (TD) and source domain (SD), $\Delta = (\Delta h, \Delta w, \Delta l) = (h_{\mathrm{TD}}, w_{\mathrm{TD}}, L_{\mathrm{TD}}) - (h_{\mathrm{SD}}, w_{\mathrm{SD}}, L_{\mathrm{SD}})$ , where $h, w, l$ stand for the height, width, and length, re + +![](images/e863448715c550a0ef9d65fd10f5abf80f96573ea61170939e175e3f29609365.jpg) +Figure 7: Statistical Normalization (SN). We shrink (or enlarge) the bounding box sizes (in the output space) and the corresponding point clouds (in the input space) in the training scenes of the source domain to match the mean statistics of the target domain. We fine-tune the detector with these modified source scenes. + +spectively4. We then modify both the point clouds and the labels in the source domain with respect to $\Delta$ . For each annotated bounding box of cars, we adjust its size by adding $(\Delta h, \Delta w, \Delta l)$ . We also crop the points inside the original box, scale up or shrink their coordinates to fit the adjusted bounding box size accordingly, and paste them back to the point cloud of the scene. By doing so, we generate new point clouds and labels whose car sizes are much similar to the target domain data. We then fine-tune the already trained model on the source domain with these data. + +Surprisingly, with such a simple method that does not require labeled target domain data, the performance is significantly improved (see Table 4) between KITTI and other datasets that obviously contain cars of different styles (i.e., one in Germany, and others in the USA). Figure 4 and Figure 8 further analyze the prediction before and after statistical normalization. We see a clear shift of the histogram (predicted box) from the source to the target domain. + +Output transformation (OT). We investigate an even simpler approach by directly adjusting the detector's prediction without fine-tuning — by adding $(\Delta h, \Delta w, \Delta l)$ to the predicted size. As shown in Table 4, this approach does not always improve but sometimes degrade the accuracy. This is because when we apply the source detector to the target domain, the predicted box sizes do slightly deviate from the source statistics to the target ones due to the difference of object sizes in the input signals (see Figure 4). Thus, simply adding $(\Delta h, \Delta w, \Delta l)$ may over-correct the bias. We hypothesize that by searching a suitable scale for addition or designing more intelligent output transformations can alleviate this problem and we leave them for future work. + +Discussion. As shown in Table 4, statistical normalization largely improves over direct applying the source-domain detector. For some pairs of data sets (e.g., from KITTI to Lyft, the $\mathrm{AP}_{\mathrm{BEV}}$ after statistical normalization is encouraging, largely closing the gap to the Within performance. + +Compared to domain adaptation on 2D images, there are more possible factors of domain gaps in 3D. While the box size difference is just one factor, we find addressing it to be + +![](images/0fc43fb27b3292bd7f5a60cae87cc030e9fdacb0e2d4f38e3e5fbee8ad38023b.jpg) +KITTI Prediction + +![](images/163a4dc784bf72032e2a8d5ccb66b80d8cf6a65cb191b63536ffe64186dcc53b.jpg) +Before Stat Norm + +![](images/87370e4a2e1d848c3e05b28f783156e337b7ad10bd351bf708b19f0f7bda31d6.jpg) +After Stat Norm +Figure 8: Illustration of car prediction on KITTI w/o and w/ statistical normalization (Stat Norm). The green boxes and red boxes indicate the ground truth and prediction, respectively. The box in the left image is predicted by POINTRCNN trained on KITTI. The middle image shows POINTRCNN that is pre-trained on Waymo and directly tested on KITTI. With statistical normalization, the model trained on Waymo only (with modified data) can accurately predict the bounding box shown in the right image. + +highly effective in closing the gaps. This factor is rarely discussed in other domain adaptation tasks. We thus expect it and our solution to be valuable additions to the community. + +# 6. Conclusion + +In conclusion, in this paper we are the first (to our knowledge) to provide and investigate a standardized form of most widely-used 3D object detection datasets for autonomous driving. Although naive adaptation across datasets is unsurprisingly difficult, we observe that, surprisingly, there appears to be a single dominant factor that explains a majority share of the adaptation gap: varying car sizes across different geographic regions. That car sizes play such an important role in adaptation ultimately makes sense. No matter if the detection is based on LiDAR or stereo cameras, cars are only observed from one side — and the depth of the bounding boxes must be estimated based on experience. If a deep network trained in Germany encounters an American Ford F-Series truck (with $5.3\mathrm{m}$ length), it has little chance to correctly estimate the corresponding bounding box. It is surprising, however, that just matching the mean size of cars in the areas during fine-tuning already reduces this uncertainty so much. We hope that this publication will kindle interests in the exciting problem of cross-dataset domain adaptation for 3D object detection and localization, and that researchers will be careful to first apply simple global corrections before developing new computer vision algorithms to tackle the remaining adaptation gap. + +# Acknowledgments + +This research is supported by grants from the National Science Foundation NSF (III-1618134, III-1526012, IIS-1149882, IIS-1724282, and TRIPODS-1740822), the Office of Naval Research DOD (N00014-17-1-2175), the Bill and Melinda Gates Foundation, and the Cornell Center for Materials Research with funding from the NSF MRSEC program (DMR-1719875). We are thankful for generous support by Zillow and SAP America Inc. + +# References + +[1] https://en.wikipedia.org/wiki/Death_of_Elaine_Herzberg, 2018.2 +[2] https://www.motor1.com/features/280320/20-bestselling-vehicles-2018/, 2018.2 +[3] Waymo open dataset: An autonomous driving dataset, 2019. 1, 2, 3, 4 +[4] Holger Caesar, Varun Bankiti, Alex H. Lang, Sourabh Vora, Venice Erin Liong, Qiang Xu, Anush Krishnan, Yu Pan, Giancarlo Baldan, and Oscar Beijbom. nuscenes: A multimodal dataset for autonomous driving. arXiv preprint arXiv:1903.11027, 2019. 1, 2, 3, 4 +[5] Qi Cai, Yingwei Pan, Chong-Wah Ngo, Xinmei Tian, Lingyu Duan, and Ting Yao. Exploring object relation in mean teacher for cross-domain detection. In CVPR, 2019. 3 +[6] Florian Chabot, Mohamed Chaouch, Jaonary Rabarisoa, Céline Teulière, and Thierry Chateau. Deep manta: A coarse-to-fine many-task network for joint 2d and 3d vehicle analysis from monocular image. In CVPR, 2017. 2 +[7] Ming-Fang Chang, John W Lambert, Patsorn Sangkloy, Jagjeet Singh, Slawomir Bak, Andrew Hartnett, De Wang, Peter Carr, Simon Lucey, Deva Ramanan, and James Hays. Argo-verse: 3d tracking and forecasting with rich maps. In CVPR, 2019. 1, 2, 3, 4 +[8] Xiaozhi Chen, Kaustav Kundu, Ziyu Zhang, Huimin Ma, Sanja Fidler, and Raquel Urtasun. Monocular 3d object detection for autonomous driving. In CVPR, 2016. 2 +[9] Xiaozhi Chen, Kaustav Kundu, Yukun Zhu, Andrew G Berneshawi, Huimin Ma, Sanja Fidler, and Raquel Urtasun. 3d object proposals for accurate object class detection. In NIPS, 2015. 2, 3 +[10] Xiaozhi Chen, Kaustav Kundu, Yukun Zhu, Huimin Ma, Sanja Fidler, and Raquel Urtasun. 3d object proposals using stereo imagery for accurate object class detection. TPAMI, 40(5):1259-1272, 2018. 2 +[11] Xiaozhi Chen, Huimin Ma, Ji Wan, Bo Li, and Tian Xia. Multi-view 3d object detection network for autonomous driving. In CVPR, 2017. 1, 2 +[12] Yuhua Chen, Wen Li, Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Domain adaptive faster r-cnn for object detection in the wild. In CVPR, 2018. 3 +[13] Yuhua Chen, Wen Li, and Luc Van Gool. Road: Reality oriented adaptation for semantic segmentation of urban scenes. In CVPR, 2018. 3 +[14] Yilun Chen, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Fast point r-cnn. In ICCV, 2019. 1 +[15] Yilun Chen, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Dsgn: Deep stereo geometry network for 3d object detection. In CVPR, 2020. 1 +[16] Xinxin Du, Marcelo H Ang Jr, Sertac Karaman, and Daniela Rus. A general pipeline for 3d detection of vehicles. In ICRA, 2018. 1 +[17] Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. JMLR, 17(1):2096-2030, 2016. 3 + +[18] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. The International Journal of Robotics Research, 32(11):1231-1237, 2013. 1, 2, 3, 4 +[19] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In CVPR, 2012. 1, 2, 3, 4 +[20] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In ICCV, 2017. 2 +[21] Zhenwei He and Lei Zhang. Multi-adversarial faster-rcnn for unrestricted object detection. In ICCV, 2019. 3 +[22] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei A Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. In ICML, 2018. 3 +[23] Han-Kai Hsu, Chun-Han Yao, Yi-Hsuan Tsai, Wei-Chih Hung, Hung-Yu Tseng, Maneesh Singh, and Ming-Hsuan Yang. Progressive domain adaptation for object detection. In WACV, 2020. 3 +[24] Haoshuo Huang, Qixing Huang, and Philipp Krahenbuhl. Domain transfer through deep activation matching. In ECCV, 2018. 3 +[25] R. Kesten, M. Usman, J. Houston, T. Pandya, K. Nadhamuni, A. Ferreira, M. Yuan, B. Low, A. Jain, P. Ondruska, S. Omari, S. Shah, A. Kulkarni, A. Kazakova, C. Tao, L. Platinsky, W. Jiang, and V. Shet. Lyft level 5 av dataset 2019. https://level5.lyft.com/dataset/, 2019. 1, 2, 3, 4 +[26] Mehran Khodabandeh, Arash Vahdat, Mani Ranjbar, and William G Macready. A robust learning approach to domain adaptive object detection. In ICCV, 2019. 3 +[27] Taekyung Kim, Minki Jeong, Seunghyeon Kim, Seokeon Choi, and Changick Kim. Diversify and match: A domain adaptive representation learning paradigm for object detection. In CVPR, 2019. 3 +[28] Hendrik Königshof, Niels Ole Salscheider, and Christoph Stiller. Realtime 3d object detection for automated driving using stereo vision and semantic information. In 2019 IEEE Intelligent Transportation Systems Conference (ITSC), 2019. 1 +[29] Jason Ku, Melissa Mozifian, Jungwook Lee, Ali Harakeh, and Steven Waslander. Joint 3d proposal generation and object detection from view aggregation. In IROS, 2018. 1 +[30] Alex H Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. Pointpillars: Fast encoders for object detection from point clouds. In CVPR, 2019. 1, 2 +[31] Buyu Li, Wanli Ouyang, Lu Sheng, Xingyu Zeng, and Xiaogang Wang. Gs3d: An efficient 3d object detection framework for autonomous driving. In CVPR, 2019. 1 +[32] Peiliang Li, Xiaozhi Chen, and Shaojie Shen. Stereo r-cnn based 3d object detection for autonomous driving. In CVPR, 2019. 1 +[33] Ming Liang, Bin Yang, Yun Chen, Rui Hu, and Raquel Urtasun. Multi-task multi-sensor fusion for 3d object detection. In CVPR, 2019. 1, 2 +[34] Ming Liang, Bin Yang, Shenlong Wang, and Raquel Urtasun. Deep continuous fusion for multi-sensor 3d object detection. In ECCV, 2018. 1, 2 + +[35] Tsung-Yi Lin, Piotr Dollar, Ross B Girshick, Kaiming He, Bharath Hariharan, and Serge J Belongie. Feature pyramid networks for object detection. In CVPR, 2017. 2 +[36] Yawei Luo, Liang Zheng, Tao Guan, Junqing Yu, and Yi Yang. Taking a closer look at domain shift: Category-level adversaries for semantics consistent domain adaptation. In CVPR, 2019. 3 +[37] Gregory P Meyer, Ankit Laddha, Eric Kee, Carlos Vallespi-Gonzalez, and Carl K Wellington. Lasernet: An efficient probabilistic 3d object detector for autonomous driving. In CVPR, 2019. 1, 2 +[38] Arsalan Mousavian, Dragomir Anguelov, John Flynn, and Jana Košecka. 3d bounding box estimation using deep learning and geometry. In CVPR, 2017. 2 +[39] Cuong Cao Pham and Jae Wook Jeon. Robust object proposals re-ranking for object detection in autonomous driving using convolutional neural networks. Signal Processing: Image Communication, 53:110-122, 2017. 2 +[40] Alex D Pon, Jason Ku, Chengyao Li, and Steven L Waslander. Object-centric stereo matching for 3d object detection. In ICRA, 2020. 1 +[41] Charles R Qi, Wei Liu, Chenxia Wu, Hao Su, and Leonidas J Guibas. Frustum pointnets for 3d object detection from rgb-d data. In CVPR, 2018. 1, 2 +[42] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, 2017. 2 +[43] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In NIPS, 2017. 2, 3 +[44] Rui Qian, Divyansh Garg, Yan Wang, Yurong You, Serge Belongie, Bharath Hariharan, Mark Campbell, Kilian Q Weinberger, and Wei-Lun Chao. End-end pseudo-lidar for image-based 3d object detection. In CVPR, 2020. 2 +[45] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NIPS, 2015. 2 +[46] Adrian Lopez Rodriguez and Krystian Mikolajczyk. Domain adaptation for object detection via style consistency. In BMVC, 2019. 3 +[47] Kuniaki Saito, Yoshitaka Ushiku, Tatsuya Harada, and Kate Saenko. Strong-weak distribution alignment for adaptive object detection. In CVPR, 2019. 3 +[48] Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In CVPR, 2018. 3 +[49] Fatemeh Sadat Saleh, Mohammad Sadegh Aliakbarian, Mathieu Salzmann, Lars Petersson, and Jose M Alvarez. Effective use of synthetic data for urban scene semantic segmentation. In ECCV. Springer, 2018. 3 +[50] Swami Sankaranarayanan, Yogesh Balaji, Arpit Jain, Ser Nam Lim, and Rama Chellappa. Learning from synthetic data: Addressing domain shift for semantic segmentation. In CVPR, 2018. 3 +[51] Shaoshuai Shi, Chaoxu Guo, Li Jiang, Zhe Wang, Jianping Shi, Xiaogang Wang, and Hongsheng Li. Pv-rcnn: Point-voxel feature set abstraction for 3d object detection. In CVPR, 2020. 1 + +[52] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. Pointcnn: 3d object proposal generation and detection from point cloud. In CVPR, 2019. 1, 2, 3, 5, 6, 7 +[53] Shaoshuai Shi, Zhe Wang, Jianping Shi, Xiaogang Wang, and Hongsheng Li. From points to parts: 3d object detection from point cloud with part-aware and part-aggregation network. TPAMI, 2020. 1 +[54] Weijing Shi and Ragunathan Rajkumar. Point-gnn: Graph neural network for 3d object detection in a point cloud. In CVPR, 2020. 1 +[55] Yi-Hsuan Tsai, Wei-Chih Hung, Samuel Schulter, Kiyuk Sohn, Ming-Hsuan Yang, and Manmohan Chandraker. Learning to adapt structured output space for semantic segmentation. In CVPR, 2018. 3 +[56] Shenlong Wang, Simon Suo, Wei-Chiu Ma3 Andrei Pokrovsky, and Raquel Urtasun. Deep parametric continuous convolutional neural networks. In CVPR, 2018. 2 +[57] Tao Wang, Xiaopeng Zhang, Li Yuan, and Jiashi Feng. Few-shot adaptive faster r-cnn. In CVPR, 2019. 3 +[58] Yan Wang, Wei-Lun Chao, Divyansh Garg, Bharath Hariharan, Mark Campbell, and Kilian Q. Weinberger. Pseudo-lidar from visual depth estimation: Bridging the gap in 3d object detection for autonomous driving. In CVPR, 2019. 2 +[59] Yu Xiang, Wongun Choi, Yuanqing Lin, and Silvio Savarese. Subcategory-aware convolutional neural networks for object proposals and detection. In WACV, 2017. 2 +[60] Bin Xu and Zhenzhong Chen. Multi-level fusion based 3d object detection from monocular images. In CVPR, 2018. 2 +[61] Zhenbo Xu, Wei Zhang, Xiaqing Ye, Xiao Tan, Wei Yang, Shilei Wen, Errui Ding, Ajin Meng, and Liusheng Huang. Zoomnet: Part-aware adaptive zooming neural network for 3d object detection. 2020. 1 +[62] Yan Yan, Yuxing Mao, and Bo Li. Second: Sparsely embedded convolutional detection. Sensors, 18(10):3337, 2018. 1 +[63] Bin Yang, Wenjie Luo, and Raquel Urtasun. Pixor: Realtime 3d object detection from point clouds. In CVPR, 2018, 1, 2, 3, 4 +[64] Zetong Yang, Yanan Sun, Shu Liu, and Jiaya Jia. 3dssd: Point-based 3d single stage object detector. In CVPR, 2020. 1 +[65] Zetong Yang, Yanan Sun, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Std: Sparse-to-dense 3d object detector for point cloud. In ICCV, 2019. 1 +[66] Yurong You, Yan Wang, Wei-Lun Chao, Divyansh Garg, Geoff Pleiss, Bharath Hariharan, Mark Campbell, and Kilian Q Weinberger. Pseudo-lidar++: Accurate depth for 3d object detection in autonomous driving. In ICLR, 2020. 2 +[67] Yang Zhang, Philip David, and Boqing Gong. Curriculum domain adaptation for semantic segmentation of urban scenes. In ICCV, 2017. 3 +[68] Yin Zhou, Pei Sun, Yu Zhang, Dragomir Anguelov, Jiyang Gao, Tom Ouyang, James Guo, Jiquan Ngiam, and Vijay Vasudevan. End-to-end multi-view fusion for 3d object detection in lidar point clouds. In CoRL, 2019. 1 +[69] Yin Zhou and Oncel Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In CVPR, 2018. 1, 2 + +[70] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. 3 +[71] Xinge Zhu, Jiangmiao Pang, Ceyuan Yang, Jianping Shi, and Dahua Lin. Adapting object detectors via selective cross-domain alignment. In CVPR, 2019. 3 +[72] Chenfan Zhuang, Xintong Han, Weilin Huang, and Matthew R Scott. ifan: Image-instance full alignment networks for adaptive object detection. In AAAI, 2020. 3 +[73] Yang Zou, Zhiding Yu, BVK Vijaya Kumar, and Jinsong Wang. Unsupervised domain adaptation for semantic segmentation via class-balanced self-training. In ECCV, 2018. 3 \ No newline at end of file diff --git a/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/images.zip b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..82810fae21170976b4ecc44173d4a0dc4c4ab24b --- /dev/null +++ b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b7c39974a7270ba3930fe29811d17f4595345dcf009adb8cff67e842710994f +size 918364 diff --git a/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/layout.json b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..405f0b57131d9453d190f7c93d4d917493e25364 --- /dev/null +++ b/trainingermanytestintheusamaking3dobjectdetectorsgeneralize/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31afd04d0a87d696124ec491823c27fc6b407937992e7165a19df7a2a02379e5 +size 395776 diff --git a/trainingnoiserobustdeepneuralnetworksviametalearning/21dedf89-2873-455f-8879-cbd66908bda2_content_list.json b/trainingnoiserobustdeepneuralnetworksviametalearning/21dedf89-2873-455f-8879-cbd66908bda2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a5683c4ed76a2ec5cc2ad7f4fc64d06ad7ffee14 --- /dev/null +++ b/trainingnoiserobustdeepneuralnetworksviametalearning/21dedf89-2873-455f-8879-cbd66908bda2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f422ca4af7b3495b158186d13d03008e6b61510f46b8abd06119d792fe75214 +size 71824 diff --git a/trainingnoiserobustdeepneuralnetworksviametalearning/21dedf89-2873-455f-8879-cbd66908bda2_model.json b/trainingnoiserobustdeepneuralnetworksviametalearning/21dedf89-2873-455f-8879-cbd66908bda2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..aa9a799247ea7b97d22daec14821f495cafcccd9 --- /dev/null +++ b/trainingnoiserobustdeepneuralnetworksviametalearning/21dedf89-2873-455f-8879-cbd66908bda2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:698df91ff56d5f0c4de68bf7528ba53f22f9364bd9e8de48f7e8ed67c4d9eeb5 +size 88824 diff --git a/trainingnoiserobustdeepneuralnetworksviametalearning/21dedf89-2873-455f-8879-cbd66908bda2_origin.pdf b/trainingnoiserobustdeepneuralnetworksviametalearning/21dedf89-2873-455f-8879-cbd66908bda2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..75834398e95916fb06aeb90fa4f12794b436af25 --- /dev/null +++ b/trainingnoiserobustdeepneuralnetworksviametalearning/21dedf89-2873-455f-8879-cbd66908bda2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d4b1a6628fb3bdcb1e95f25ed7bc58b17b2d809c1d82344d4a01f8140859601 +size 2673661 diff --git a/trainingnoiserobustdeepneuralnetworksviametalearning/full.md b/trainingnoiserobustdeepneuralnetworksviametalearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a803999c3e5a782752112cfec9aee727478bc86d --- /dev/null +++ b/trainingnoiserobustdeepneuralnetworksviametalearning/full.md @@ -0,0 +1,299 @@ +# Training Noise-Robust Deep Neural Networks via Meta-Learning + +Zhen Wang\*1, Guosheng Hu\*2, Qinghua $\mathrm{H u}^{\dagger 1}$ + +$^{1}$ Tianjin Key Lab of Machine Learning, College of Intelligence and Computing, Tianjin University, Tianjin, China $^{2}$ AnyVision + +wangzhen315@tju.edu.cn, huguosheng100@gmail.com, huqinghua@tju.edu.cn + +# Abstract + +Label noise may significantly degrade the performance of Deep Neural Networks (DNNs). To train noise-robust DNNs, Loss correction (LC) approaches have been introduced. LC approaches assume the noisy labels are corrupted from clean (ground-truth) labels by an unknown noise transition matrix $T$ . The backbone DNNs and $T$ can be trained separately, where $T$ is approximated by prior knowledge. For example, $T$ can be constructed by stacking the maximum or mean predictions of the samples from each class. In this work, we propose a new loss correction approach, named as Meta Loss Correction (MLC), to directly learn $T$ from data via the meta-learning framework. The MLC is model-agnostic and learns $T$ from data rather than heuristically approximates $T$ using prior knowledge. Extensive evaluations are conducted on computer vision (MNIST, CIFAR-10, CIFAR-100, Clothing1M) and natural language processing (Twitter) datasets. The experimental results show that MLC achieves very competitive performance against state-of-the-art approaches. + +# 1. Introduction + +Deep learning has achieved great success on computer vision tasks such as object detection [9], image classification [20], segmentation [2], face recognition [13]. It is well known that the performance of DNNs highly relies on the large-scale high quality well-labeled training data. However, collecting such big clean data is expensive and time-consuming. To collect such data, people usually turn to search engine, automatic tagging software and crowdsourcing, which inevitably bring label noises (wrong or corrupted labels). The label noises can lead the DNNs to overfit to such noises [38], eventually degrading the model generalization performance. + +The loss correction (LC) approaches [17, 28, 12] re + +cently achieved great success on noise-robust deep learning. LC approaches assume the noisy labels are corrupted from clean (ground-truth) labels by an unknown noise transition matrix $T$ . Thus, the LC approaches try to learn this matrix accurately. Some early works [31, 17] add a linear noise layer at the end of backbone Convolutional Neural Network (CNNs) to implicitly estimate matrix $T$ . Unlike these implicit optimizations, the LC approaches [28, 12] explicitly estimate $T$ . For example, a 'perfect example' assumption [28] is made to approximate 'perfect example' as the one with the maximum prediction in each class. Then $T$ is estimated by stacking the prediction of each 'perfect example'. Instead of using the maximum predictions, Gold Loss Correction (GLC) [12] uses the mean predictions of a small clean dataset to estimate $T$ . Clearly, these approaches [28, 12], which use prior knowledge to estimate $T$ , are heuristic and the 'perfect example' assumption cannot always hold true. + +To learn $T$ directly from data rather than in a heuristic way, we introduce meta-learning. Meta-learning is a general data-driven optimization framework, and it can learn experience (meta-parameters) from data (meta-data). More general, meta-parameters can be some parameters to be optimized in deep learning. Recently, meta-learning achieved great success on many optimization tasks including: hyper-parameter optimization [18], neural architecture searching [41] and optimizer selection [26], etc. Most meta-learning approaches contain two optimization loops: an inner loop (Actual-Train) conducts the main optimization (e.g. the main deep network training), and an outer loop (Meta-Train) optimizes some aspects (metaparameters, e.g. hyper-parameters of the main network) of inner loop. + +Motivated by the success of meta-parameter optimization, in this work, we adapt meta-learning to optimize $T$ by viewing $T$ as the meta-parameter. Meta-learning usually uses a small 'clean' validation set to conduct outer loop optimization (Meta-Train) [30]. A small 'clean' validation set is also a popular setting for LC noise-robust learning approach [12]. With meta-learning and a small valda + +tion set, we propose a new loss correction approach, Meta Loss Correction (MLC), to learn noise transition matrix $T$ . Specifically, we conduct an alternating optimization to optimize $T$ and main (backbone) network weights $\theta$ . First, we make one-step-forward virtual optimization of $\theta$ on the noisy training set during Virtual-Train; During Meta-Train, we then optimize $T$ (meta-parameter) guided by the loss (meta-objective) on validation set with the one-step-forward $\theta$ fixed; Finally we optimize the unrolled $\theta$ with the updated $T$ on the noisy training set in the stage of Actual-Train. + +Our contributions can be summarized as follows: We propose a new loss correction approach, Meta Loss Correction (MLC), to learn noise transition matrix. MLC is model-agnostic and can adapt to different backbone networks and can easily generalize to tasks on both computer vision (CV) and natural language processing (NLP). Our MLC does not rely on the 'perfect example' assumption [28] and learns $T$ from data rather than directly uses prior knowledge (stacking the maximum predictions [28] or mean predictions [12] to construct $T$ ). We conduct extensive evaluations on CV datasets: MNIST [3], CIFAR-10 [19], CIFAR-100 [19], Clothing1M [35] and NLP dataset Twitter [8]. MLC achieves very competitive performance on these datasets over state-of-the-art approaches. + +The paper is organized as follows. In the next section we present a brief introduction to related work. Our methodology is introduced in Section 3. The proposed algorithm is evaluated in Section 4. Section 5 draws the paper to a conclusion. + +# 2. Related work + +In this section, we briefly review the existing research on label noise. + +Robust loss function is widely investigated. [27] proposes two robust loss functions to deal with aerial noise, one handles asymmetric omission noise and the other models registration errors, which can be optimized via an EM algorithm. [29] introduces 'soft' and 'hard' loss functions based on bootstrapping. [7] proves a sufficient condition under that loss to be tolerant to uniform label noise, and shows that 0-1 loss and sigmoid loss satisfy that condition. Then, [6] further proves that mean absolute error (MAE) is a noiserobust loss for deep CNN. Then, [40] proposes a generalized CrossEntropy (GCE) loss, which is a generalization of MAE and traditional CrossEntropy (CE) loss. The weights between MAE and CE can be adapted by tuning the parameters of GCE. Robust loss functions achieve some success, however, they cannot perform well on challenging noisy datasets. + +Relabelling is the re-assignment of the labels for noisy samples. Relabeling includes two settings: (1) including a small clean dataset and (2) no such a dataset. For (1), [32] proposes a multi-task network: one cleaning model is trained + +on clean samples to clean (relabel) noisy data, and then one classification model is trained on a merged dataset (clean and relabeled data). [22] distills information from knowledge graph and clean labels to guide the relabelling of the noisy data. For (2), [25] introduces a self-error-correcting (SEC) strategy to relabel the noisy data based on the prediction/confidence of a CNNs. [34] also uses the predictions to relabel the samples. + +Weighting aims to learn to assign small weights to samples with corrupted labels. [11] introduces co-teaching strategy which simultaneously trains two networks. These two networks select training samples with small loss (expected clean samples) and then communicate with each other with those selected samples for training. Self-paced learning [15, 39] is proposed to learn the weights of training samples guided by the training loss. For random classification noise, [24] designs an importance reweighting method to reweight samples by employing the in-versed noise rates. [16] employs an additional LSTM network to learn the optimal weights of training samples. [30] reweights the training samples by employing a small validation set. [33] detects noisy labels and reweights the noisy samples based on the confidence supplied by noisy label detection. + +Loss correction approach recently achieved great success on noise-robust learning. Basically, the noise transition matrix $T$ is introduced to correct the predictions. Then the approaches of this category aim to learn the optimal $T$ which can lead to noise-robust performance. [31, 1] add an extra linear layer at the end of a backbone CNN that simulates the noise transition matrix. Instead of modifying architecture, [28, 12, 10] use prior knowledge to estimate $T$ e.g., via stacking the maximum [28] and mean predictions [12] of each class from samples. Our work belongs to this category. As aforementioned, most existing approaches estimate $T$ based on prior knowledge. In comparison, we directly optimize $T$ from data without relying on prior knowledge and assumptions. + +# 3. Methodology + +# 3.1. Noisy Label Problem + +In many applications, the collected dataset is corrupted by label noises. Denote the noisy dataset by $D_{\eta} = \{(x_i,\tilde{y}_i),1\leq i\leq N\}$ where $\tilde{y}_i\in \{0,1\} ^C$ may be noisy label in $C$ classes. Denote the $C\times C$ noise transition matrix by $T$ which specifies the probability of clean label $i$ flipping to noisy label $j$ by $T_{ij} = p(\tilde{y} = j|y = i)$ . Following [12, 30], it is assumed that we have access to a small clean dataset. It is a sound assumption since it is feasible to collect such a dataset in the real world. Denote the small clean dataset (which usually works as validation set) by $D_v = \{(x_i,y_i),1\leq i\leq M\}$ , $M\ll N$ . + +Let $f(x; \theta)$ denote the backbone DNN which is encoded + +by $\theta$ , then the CrossEntropy (CE) loss is expressed as: + +$$ +L o s s = C E (f (x; \theta), \tilde {y}) = - \frac {1}{N} \sum_ {i = 1} ^ {N} \tilde {y} _ {i} \log (f (x _ {i}; \theta)) \tag {1} +$$ + +Given the noise transition matrix $T$ , we modify the loss function Eq. (1) to include $T$ to achieve noise robust model training. Thus, the corrected loss function is represented as: + +$$ +L o s s _ {L C} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \tilde {y} _ {i} \log (T f (x _ {i}; \theta)) \tag {2} +$$ + +Existing approaches The effectiveness of loss correction approaches highly depends on the estimate of $T$ . To estimate $T$ , [28] makes the assumption that there exists 'perfect example' $x_{i}^{\prime}$ of each class $i$ that $p(y = i|x_i') = 1$ . Then 'perfect example' $x_{i}^{\prime}$ is approximated by the sample which has the maximum prediction/probability (softmax score) of class $i$ . Then $T_{ij} = p(y = j|x_i')$ . Unlike [28], Gold Loss Correction (GLC) [12] approximates $T$ using the mean prediction of all the samples belonging to class $i$ on a clean validation set instead of the maximum prediction. + +Motivation Although [28, 12] achieve promising performance, the assumptions in [28] and [12] cannot always hold true. For example, we cannot guarantee the 'perfect example' of each class always exists. In addition, the estimation of $T$ is heuristic, because $T$ is constructed directly by the simple operations, i.e. maximum [28] or mean[12] of the predictions of samples. In this work, we propose a learning-based model that learns $T$ by employing a meta-learning optimization strategy, Meta Loss Correction (MLC). Our MLC does not rely on 'perfect example' assumption or approximate $T$ by the predictions of samples. Instead, MLC optimizes $T$ directly from data. + +# 3.2. Optimizing Transition Matrix $T$ via Meta-learning + +In this work, we conduct an alternating optimization to optimize noise transition matrix $T$ and the backbone network encoded by $\theta$ via the Meta Loss Correction (MLC) strategy. Specifically, the MLC approach contains three stages: Virtual-Train, Meta-Train and Actual-Train. Alternating optimization is performed on these three stages. During Virtual-Train stage, we optimize the backbone network weights $\theta^t$ to obtain $\hat{\theta}^{t + 1}$ with a fixed $T^t$ (which is optimized in the previous iteration) guided by the corrected loss function on noisy training set $D_{\eta}$ . Note that this is a 'virtual' step, meaning that the backbone network does not actually move to $\hat{\theta}^{t + 1}$ . The 'virtual' step makes preparations for estimating $T^{t + 1}$ in the next stage. During MetaTrain stage, we optimize $T^{t + 1}$ by keeping $\hat{\theta}^{t + 1}$ fixed under CrossEntropy loss on a small clean validation set $D_v$ . The motivation of Meta-Train is that we would like to find a + +![](images/8ba7460e546c5c53eec1713f93bd6dca1537c57b5f6fe552809852b9d928d745.jpg) +Figure 1: The framework of the proposed Meta Loss Correction (MLC) approach, which contains three stages: Virtual-Train (First), Meta-Train (Second) and Actual-Train (Third). GD means gradient descent algorithm. + +$T^{t + 1}$ which has a low validation loss. Since $D_{v}$ is clean, this supervision signal is ideal to guide the optimization of $T^{t + 1}$ . Note that the idea of 'validation' guided approach has also been used for model transfer learning via meta-learning [5] and differentiable neural network search [23]. + +During Actual-Train, the unrolled network weights $\theta^t$ are optimized to obtain $\theta^{t + 1}$ with the updated $T^{t + 1}$ . Clearly, the Actual-Train is the step of 'Actual' backbone network optimization from unrolled network weights rather than a 'virtue' step. The optimization framework is shown in Fig. 1. Then we detail these three optimization steps separately. + +Virtual-Train Given the noisy training set $D_{\eta}$ , in each mini-batch, we fix $T^t$ and optimize the network weights $\theta^t$ , thus the loss function at step $t$ is: + +$$ +l _ {\text {v i r t u a l} - \operatorname {t r n}} = - \frac {1}{n} \sum_ {i = 1} ^ {n} \tilde {y} _ {i} \log \left(T ^ {t} f \left(x _ {i}; \theta^ {t}\right)\right) \tag {3} +$$ + +where $n$ is the batch size in training set. Then the one-step-forward 'virtual' model weights $\hat{\theta}^{t + 1}$ are optimized via gradient descent with learning rate $\alpha$ : + +$$ +\hat {\theta} ^ {t + 1} \left(T ^ {t}\right) = \theta^ {t} - \alpha \nabla_ {\theta^ {t}} l _ {v i r t u a l - t r n} \tag {4} +$$ + +Meta-Train Given the one-step-forward backbone network (fixed $\hat{\theta}^{t + 1}$ ), we can optimize the optimal $T^{t + 1}$ on the validation set: + +$$ +l _ {m e t a - t r n} = - \frac {1}{M} \sum_ {i = 1} ^ {M} y _ {i} \log \left(f \left(x _ {i}; \hat {\theta} ^ {t + 1}\right)\right) \tag {5} +$$ + +However, this is still time and memory consuming, so we get an approximate estimate on a mini-batch of validation set: + +$$ +l _ {m e t a - t r n} = - \frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} \log \left(f \left(x _ {i}; \hat {\theta} ^ {t + 1}\right)\right) \tag {6} +$$ + +where $m$ is the size of mini-batch. The transition matrix $T$ is also updated via gradient descent method with learning rate $\beta$ : + +$$ +u ^ {t + 1} = T ^ {t} - \beta \nabla_ {T ^ {t}} l _ {\text {m e t a - t r n}} \tag {7} +$$ + +Apply chain rule to Eq. (7): + +$$ +u ^ {t + 1} = T ^ {t} - \beta \left\{\nabla_ {\hat {\theta} ^ {t + 1}} l _ {\text {m e t a - t r n}} \left(- \alpha \nabla_ {\theta^ {t}, T ^ {t}} ^ {2} l _ {\text {v i r t u a l - t r n}}\right) \right\} \tag {8} +$$ + +Note that $u^{t + 1}$ is the raw one-step-forward noise transition matrix. $u^{t + 1}$ cannot work as the final noise transition matrix because the entries of $u^{t + 1}$ are not always non-negative and $u^{t + 1}$ is not normalized. Thus, we first make $u^{t + 1}$ become non-negative via: + +$$ +\tilde {T} ^ {t + 1} = \max \left(u ^ {t + 1}, 0\right) \tag {9} +$$ + +For the $j$ th row of $\tilde{T}^{t + 1}$ , i.e. $\tilde{T}_j^{t + 1} = [\tilde{T}_{j1}^{t + 1},\dots,\tilde{T}_{jC}^{t + 1}]$ which indicates all the probabilities transited to class $j$ , we then perform normalization on $\tilde{T}_j^{t + 1}$ to achieve the final $T_{j}^{t + 1}$ : + +$$ +T _ {j} ^ {t + 1} = \frac {\tilde {T} _ {j} ^ {t + 1}}{\sum \tilde {T} _ {j} ^ {t + 1} + \delta \left(\sum \tilde {T} _ {j} ^ {t + 1}\right)}, \delta (a) = \left\{ \begin{array}{l l l} 1, & i f & a = 0 \\ 0, & i f & a \neq 0 \end{array} \right. \tag {10} +$$ + +where $\delta (\cdot)$ is used to avoid division by 0. + +Actual-Train After the 'virtual' network optimization and the Meta-Train, we now conduct the 'actual' network optimization on noisy training set by keeping $T^{t + 1}$ fixed. Then we can achieve new network weights $\theta^{t + 1}$ via gradient descent with learning rate $\gamma$ on $D_{\eta}$ : + +$$ +\theta^ {t + 1} = \theta^ {t} - \gamma \nabla_ {\theta^ {t}} \left(- \frac {1}{n} \sum_ {i = 1} ^ {n} \tilde {y} _ {i} \log \left(T ^ {t + 1} f \left(x _ {i}; \theta^ {t}\right)\right)\right) \tag {11} +$$ + +The whole optimization framework (Virtual-Train, Meta-Train and Actual-Train) is summarized in Algorithm 1. + +Analysis To understand the influence of noisy labels, we first go through the normal (no corrupted labels) deep model + +Algorithm 1: Meta Loss Correction (MLC) +Input: Randomly initialized $\{\theta^t,T^t\}$ noisy training set $D_{\eta}$ , clean validation set $D_{v}$ , the number of iterations I +for $t = 1,\dots,I$ do Virtual-Train: Optimize the virtual' network weights $\hat{\theta}^{t + 1}$ on $D_{\eta}$ via Eq. (3-4) Meta-Train: Optimize the transition matrix $T^{t + 1}$ on $D_{v}$ via Eq. (5-10) Actual-Train: Optimize the actual' network weights $\theta^{t + 1}$ on $D_{\eta}$ via Eq. (11) +end +Output: Model $\theta^{I + 1}$ + +training process. During the initial training stage (Stage I), the network quickly fits easy samples. After that the network learns to fit hard samples (Stage II). This process (Stage I and II) is detailed in [4]. For deep model training with noisy samples, we can see noisy labels do not really affect training too much in Stage I because noisy samples are clearly not easy. During Stage II, the network cannot distinguish the hard samples with correct labels and noisy samples with wrong labels because these two types of samples both produce large loss. The supervision signals from wrong labels can make the network over-fit to the noisy samples during Stage II. The introduce of transition matrix $T$ actually aims to reduce this overfitting in Stage II. The approach [28] uses prior knowledge learned from noisy data to estimate $T$ . However, this estimation cannot guarantee the accuracy of $T$ since this estimation essentially stems from noisy training data. Then the following approach GLC [12] realizes the limitation of [28], and conducts the estimation on a clean validation set which can provide accurate supervision signal. However, GLC does not optimize $T$ directly with a proper loss function associated with deep model training. Instead, GLC heuristically stacks the mean predictions of each class to construct $T$ . In this work, our MLC also uses a clean validation set to avoid wrong supervision signal for estimating $T$ . Moreover, we directly optimize $T$ associated with deep model training with the loss function which targets the best accuracy on the clean validation set. Clearly, our approach is data driven rather than prior knowledge driven. + +# 4. Experiments + +# 4.1. Experimental Settings + +We evaluate our approach on four computer vision (CV) datasets: MNIST [3], CIFAR-10 [19], CIFAR-100 [19] and Clothing1M [35], one natural language processing (NLP) dataset: Twitter [8]. Note that the noises in Clothing1M [35] are from the real world. And the noises on other + +![](images/a9954b398d827780e03e9e895a81a3a227ce706783d97fce912ea01a9c038b1f.jpg) +Figure 2: Visualization of three types of true noise transition matrix $T$ (30% noisy ratio). Using first 4 (10 classes in all) classes as an example. + +![](images/8d0987d66e027dbfced143985be6d5c3b7838bfc966d9d274d91809235b133cf.jpg) + +![](images/662f05316a608793cbc90d923feebcdc7fc7ac2540a644174f176baa94702632.jpg) + +datasets are artificially generated. + +MNIST The MNIST [3] dataset is annotated with 10 object categories, containing $28 \times 28$ handwritten digit images. The training and test sets contain $60k$ and $10k$ images, respectively. For MNIST, we employ a network like LeNet [21] using SGD optimizer with learning rate $1e - 2$ . Set $\alpha = 1e - 2$ , $\beta = 1$ in this implementation. + +CIFAR The CIFAR [19] dataset contains $32 \times 32$ color images. The training and test sets consist of $50K$ and $10K$ images, respectively. CIFAR-10 and CIFAR-100 contain 10 and 100 categories, respectively. Following [12], we use the Wide ResNet of depth 40 and widening factor 2 (WRN-40-2) [37] on these 2 datasets. We train the network using SGD optimizer with batch-size 64, learning rate $1e - 4$ , momentum 0.9 and weight decay $5e - 4$ . Set $\alpha = 1e - 3$ , $\beta = 1e - 2$ in this implementation. + +Clothing1M The Clothing1M dataset consists of $1M$ noisy data and additional $50K$ , $14K$ and $10K$ clean data for training, validation and test sets, respectively. The Clothing1M dataset is annotated with 14 classes. Following [28], we use the ResNet-50 which is pre-trained on ImageNet with batch-size 32, learning rate $8e - 3$ , momentum 0.9 and weight decay $1e - 3$ . Set $\alpha = 1e - 2, \beta = 1e - 1$ in this implementation. + +Twitter The Part-of-Speech Tagger for Twitter [8] dataset contains 1827 tweets annotated with 25 POS tags. The Twitter is split into one training set with 1000 tweets, one development set with 327 tweets, and one test set with 500 tweets. We merge the training and development sets to construct an augmented training set. Following [12], We use window size 3 and a two-layer fully connected network. We train the network using Adam optimizer with batch-size 64, learning rate $1e - 3$ and weight decay $5e - 5$ . Set $\alpha = 1e - 2$ , $\beta = 1$ in this implementation. + +Noises We conduct extensive experiments under different types of noise. Following [6, 30], we artificially corrupt the labels with three types of noise: flipping uniformly to all classes (Uniform), flipping randomly to any other class (Flip-Random) and flipping to one single different class (Flip-To-One). An example of noise transition matrix (30% + +noise ratio) under three types of noise is shown in Fig. 2. We evaluate our approach under different noise levels $\{10\%, 20\%, 30\%, 40\% \}$ . + +Clean validation set For CIFAR-10 and MNIST, we randomly sample 50 clean images per class, so $m = 500$ . For CIFAR-100, we randomly sample 5 clean images per class, so $m = 500$ . For Twitter, we sample 8 clean images per class, so $m = 200$ . + +Compared approaches We compare with state-of-the-art approaches [28, 12, 30, 10, 11] using the open-source implementations released by original papers. To make fair comparisons, all the approaches use the same training (noisy) and small validation (clean) sets. If the compared approaches do not rely on a small validation set, both the training and small validation sets are merged as training set. The compared approaches include: (1) Baseline (CE). We train a baseline model with CrossEntropy (CE) loss only (not using noise corrections at all). (2) Baseline (FC). We add an extra noise correction layer (Fully-Connected layer) at the end of the backbone network to simulate the noise transition matrix. (3) Forward Loss Correction (Forward). Forward [28] approximates $T$ using the maximum softmax probabilities of corresponding class from the noisy training dataset. (4) Gold Loss Correction (GLC). GLC [12] estimates $T$ using the mean prediction of all samples belonging to the same class from a small clean validation set. (5) Confusion Matrix. It is a simplified version of GLC that estimates $T$ by a confusion matrix [12]. (6) Learning to Reweight Examples (LRE). Instead of estimating $T$ , LRE [30] learns to weight samples with the expectation that the noisy samples have small weights. (7) Co-teaching. Two deep neural networks are trained simultaneously to select training samples with small loss (expected clean data) for each other [11]. In this way, these two networks can teach each other by feeding (expected) clean samples for training. (8) Masking. Masking [10] proposes a structure-aware probabilistic model, which incorporates a (human-assisted) structure prior, to learn the noise transition probabilities. (9) PENCIL. PENCIL [36] introduces a probabilistic model, which can update both network parameters and label esti + +![](images/24ce8fef7881ba82e669b2ca7ffe88e8bdec625de44f3a8b43bed50386bafc94.jpg) +(a) Uniform + +![](images/2b3aac02e9cbb10cbb91a67e0cceacf1908f169e680ad7e2908487ddcab97fc8.jpg) +(b) Flip-Random + +![](images/10f94724434cef697e6f39c31654282b32a9635c2de75ed2e0c939c8782d1d56.jpg) +(c) Flip-To-One + +![](images/f2cc0791788d0b7a6bc9d671c424fc2e7115432f4dbb2fbe6b654427f84793b1.jpg) +Figure 3: Test accuracy $(\%)$ on various sizes of clean image on CIFAR-10 under $30\%$ noise ratio (a) Uniform noise; (b) Flip-Random noise; (c) Flip-To-One noise. + +![](images/f68452146d88d12cfb0d24cb1d292a66d4734beace1d5c38818269bfc5135b8c.jpg) +(b) CIFAR-10, Uniform + +![](images/9f7ad97692f0ff7434368a6278ffaa5faffd0350319d8696d015d7d7cd47e6e2.jpg) +(a) CIFAR-10, All noise types +(c) CIFAR-10, Flip-Random + +![](images/4564216a4d7489ad1f15f7024e6b79e18ab6a27ff719591d63089f1928a48d13.jpg) +(d) CIFAR-10, Flip-To-One +Figure 4: The comparisons under various noise types and ratios. (a) Our MLC vs. Baseline(CE) under various types of noise; (b) Our MLC vs. state-of-the-art under Uniform noise; (c) Flip-Random noise; (d) Flip-To-One noise. + +mations as label distributions. + +# 4.2. Results + +The effect of the small clean validation set Following [12, 30, 10, 11], we introduce a small clean validation set to estimate $T$ . In our MLC framework, $T$ is optimized under the supervision of the loss on the small validation set in the stage of Meta-Train. Here we explore the influence of small validation set on the final noise-robust classification performance. We fix the training and test sets and change the size of small validation set. From Fig. 3, we can see that the increase of small validation set (clean images) can boost the performance. However, when the size of small validation set is larger than 100, the gain of performance is + +small. It means we do not need to annotate a large number of clean dataset to guide the meta training, which is very favorable in the real world. In addition, our MLC consistently outperforms our competitor GLC [12]. In particular, for an extremely small validation set (50 images), MLC significantly works better than GLC. It shows that our MLC is very robust to noises even when very small annotated clean samples are available. + +Robustness to various types of noise We explore the robustness of our MLC under various types of noise. Specifically, we test under 3 types of noise (Uniform, Flip-Random, Flip-To-One) with noise ratios $\{10\%, 20\%, 30\%, 40\% \}$ . We make this evaluation on CIFAR-10 dataset. Fig. 4 (a) compares our MLC with Baseline(CE) approach. + +Table 1: Test accuracy $(\%)$ on various datasets under various noise ratios. The best accuracy is in bold. Note that the mean accuracy across three types of noise and four ratios. CIFAR-100 cannot generate samples with 'Uniform' noise due to the limited $(< 100)$ samples per class. The results of Co-teaching are copied from [11]. + +
DatasetMethodUniformFlip-RandomFlip-To-OneMean
10%20%30%40%10%20%30%40%10%20%30%40%
MNISTBaseline(CE)98.5998.3998.2798.0298.6098.4698.2598.1897.5996.6594.2684.6896.66
Confusion[12]98.2696.0591.6274.4398.7398.5398.4698.3998.2696.0591.6274.4392.90
Froward[28]98.6498.4098.3698.1498.7098.4898.4498.3197.8497.0795.4095.2197.75
GLC[12]98.7298.5298.4598.2398.7898.7098.4298.2997.8697.4596.5395.4797.95
LRE[30]98.6698.6098.2897.7998.9298.5498.3397.7798.8298.4898.1597.7898.34
Co-teaching[11]-97.25---------87.6397.25
MLC98.9898.8098.6498.4798.9798.9198.6398.5499.1898.9498.3197.3698.64
CIFAR-10Baseline(CE)80.2378.2174.1372.1879.9677.9475.5171.7481.3180.8079.3171.2576.88
Confusion[12]80.1278.2374.2672.8380.4077.8774.9972.1181.6280.0578.7675.3177.21
Froward[28]81.0279.2976.9174.6380.3178.2675.7872.4482.4981.3580.8079.4378.56
GLC[12]82.6980.5477.4275.4482.9880.5577.2474.3783.9282.7281.7080.9580.04
LRE[30]82.8281.8079.3978.5183.0281.2079.4576.8884.1082.8982.4281.8781.20
Co-teaching[11]-82.32---------72.6276.32
PENCIL[36]85.8084.5682.9880.2786.0784.7682.0379.5386.5985.0984.2778.3783.36
MLC85.2384.2882.1079.8986.1784.6082.2779.8588.1785.9584.8282.7583.84
CIFAR-100Baseline(CE)----50.6745.1841.6837.4052.9847.7244.1937.7844.56
Confusion[12]----36.8228.1224.0719.1739.2436.0235.5329.4731.06
Forward[28]----50.1442.1937.7231.7054.5153.2650.8445.4245.72
GLC[12]----39.4637.3031.3427.5145.2043.5340.1837.2837.73
LRE[30]----54.4652.0748.6444.1058.1055.5353.6250.4252.12
Co-teaching[11]-----54.23-----34.8143.47
PENCIL[36]----59.9756.1551.7544.8560.0358.4857.3352.6255.15
MLC----60.8857.2255.6853.3358.7355.7052.5650.1155.53
TwitterBaseline(CE)87.3686.5286.2585.4187.5486.7786.0385.8086.8585.0181.0270.2884.57
Confusion[12]84.7586.3685.7585.4786.8485.6585.8584.4986.0685.9784.0879.6585.08
Froward[28]79.0577.8681.8078.3855.0175.3979.3268.8847.1765.3071.3858.3269.82
GLC[12]87.1386.4085.9485.3186.8885.6985.2984.3186.4086.0585.6585.5485.88
LRE[30]86.7386.2685.7585.2086.2985.4485.3084.1086.6086.0785.6284.9185.69
MLC87.2886.9286.1085.5287.6086.7386.1285.4387.4587.0185.7184.3686.35
+ +We can see that our MCL consistently outperforms Baseline(CE) across all the noise ratios and types, showing the effectiveness of our loss correction strategy. Fig. 4 (b) (c) (d) compare MLC with state-of-the-art approaches under 3 types of noise: Uniform, Flip-Random and Flip-To-One, respectively. Clearly, our MLC consistently outperforms the other approaches. In particular, our MLC works better than other Loss Correction approaches by a very large margin. + +The effect of meta-learning It is interesting to explore the + +promising performance coming from our meta-learning or the clean validation set. Then we introduce Baseline (FC) which adds a Fully-Connected layer at the end of the backbone network to simulate the noise transition matrix. We use the clean validation set and an alternating optimization: optimizing the backbone network using the validation set and optimizing the backbone and FC layer using the noisy training set. From Fig. 5, Baseline (FC) works better than Baseline (CE), showing the usefulness of the noise + +![](images/0d043eff922a9bbd94ad3bf5d70412da5814ad5c8b4054158a6382db5d0fa8f5.jpg) +(a) Uniform + +![](images/75bb1449449a302f8af30c2374a07b6d167a0a4830e52e0722f06fb14b10f840.jpg) +(b) Flip-Random +Figure 5: Comparisons among MLC, Baseline(FC) and Baseline(CE) on CIFAR-10 under various noise types: (a) Uniform noise; (b) Flip-Random noise; (c) Flip-To-One noise. + +![](images/3cbab9d96b563b8bca0b256bad51d0457ad792557a387fb8adf927bee865429c.jpg) +(c) Flip-To-One + +transition matrix. Since both Baseline (FC) and MLC use the clean validation set, MLC outperforms Baseline (FC), showing the effectiveness of meta-learning. + +Comparisons with state-of-the-art We make extensive comparisons (various noise types and ratios) with many state-of-the-art approaches on three popular computer vision (CV) datasets (MNIST, CIFAR-10 and CIFAR-100) and one natural language processing (NLP) dataset (Twitter) in Table 1. (1) For MNIST, our MLC consistently outperforms the other approaches across 3 noises. (2) For CIFAR-10, our MLC consistently works better than other approaches, e.g. $83.84\%$ of MLC vs. $83.36\%$ of PENCIL (the 2nd best) in terms of mean accuracy across all the noise ratios and types. PENCIL achieves similar performance with our MLC under individual noise ratios. (3) For CIFAR-100 dataset, our MLC outperforms other approaches under Flip-Random noise and achieves similar performance with PENCIL under Flip-To-One noise. (4) Apart from CV datasets, we also evaluate our MLC on one NLP dataset Twitter to verify the generalization capacity of MLC. Unlike CV datasets, the Baseline(CE) approach achieves comparable performance with the loss correction approaches, e.g. it even outperforms the Forward in terms of mean accuracy: $84.57\%$ (Baseline(CE)) vs. $69.82\%$ (Forward). Our MLC achieves the best mean accuracy: $86.35\%$ (MLC) vs. $85.88\%$ (GLC, the 2nd best). + +To summarize, MLC is very robust to noises (across various types and ratios) from CV to NLP tasks. In comparison, another state-of-the-art loss correction approach GLC works well on MNIST and CIFAR-10, however, the performance drops significantly on a more challenging dataset CIFAR-100. + +Real-world noises Finally, to show the robustness of our approach under real-world noises, we test our MLC on Clothing1M dataset. As shown in Table 2, the results of CrossEntropy and Forward are copied from [28], GLC and Mask are copied from [12] and [10], respectively. We can see that our MLC and Mask [10] achieve the best performance, significantly outperforming other approaches. It + +means that our MLC and Mask [10] are both very robust to real-world noises. Note that Mask [10] manually defines the prior knowledge that which classes are similar (e.g. cat and dog) and which are not (e.g. cat and car). Then this human-defined prior knowledge is used to optimize the noise transition matrix $T$ . In comparison, our MLC learns $T$ directly and automatically from data. + +Table 2: Test accuracy (%) on Clothing1M. + +
ApproachPrior knowledgeAccuracy
CrossEntropy [28]no68.94
Forward [28]yes69.84
GLC [12]yes70.84
Mask [10]yes71.10
MLCno71.06
+ +# 5. Conclusion + +In this work, when a small clean dataset is available, we propose a learning-based loss correction approach, Meta Loss Correction (MLC), which can learn noise transition matrix $T$ and network weights jointly via meta-learning. Unlike most existing approaches which estimate $T$ using prior knowledge, MLC learns $T$ directly from data without 'perfect example' assumption and human-in-the-loop process. Extensive experiments are conducted on both CV and NLP datasets. Results show that our MLC approach compares favorably with other loss correction approaches and general state-of-the-art noise-robust deep learning approaches. + +# Acknowledgment + +This work is supported by National Key Research and Development Project under Grant 2019YFB2101901 and National Natural Science Foundation of China under Grants 61925602 and 61732011. + +# References + +[1] Alan Joseph Bekker and Jacob Goldberger. Training deep neural-networks based on unreliable labels. In ICASSP, pages 2682-2686. IEEE, 2016. +[2] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE transactions on pattern analysis and machine intelligence, 40(4):834-848, 2017. +[3] Li Deng. The mnist database of handwritten digit images for machine learning research [best of the web]. IEEE Signal Processing Magazine, 29(6):141-142, 2012. +[4] Yang Fan, Fei Tian, Tao Qin, Jiang Bian, and TieYan Liu. Learning what data to learn. arXiv preprint arXiv:1702.08635, 2017. +[5] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, pages 1126-1135. JMLR.org, 2017. +[6] Aritra Ghosh, Himanshu Kumar, and PS Sastry. Robust loss functions under label noise for deep neural networks. In AAAI, pages 1919-1925, 2017. +[7] Aritra Ghosh, Naresh Manwani, and PS Sastry. Making risk minimization tolerant to label noise. Neurocomputing, 160:93-107, 2015. +[8] Kevin Gimpel, Nathan Schneider, Brendan O'Connor, Dipanjan Das, Daniel Mills, Jacob Eisenstein, Michael Heilman, Dani Yogatama, Jeffrey Flanigan, and Noah A Smith. Part-of-speech tagging for twitter: Annotation, features, and experiments. Technical report, Carnegie-Mellon Univ Pittsburgh Pa School of Computer Science, 2010. +[9] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 580-587, 2014. +[10] Bo Han, Jiangchao Yao, Gang Niu, Mingyuan Zhou, Ivor Tsang, Ya Zhang, and Masashi Sugiyama. Masking: A new perspective of noisy supervision. In Advances in Neural Information Processing Systems, 2018. +[11] Bo Han, Quanming Yao, Xingrui Yu, Gang Niu, Miao Xu, Weihua Hu, Ivor Tsang, and Masashi Sugiyama. Co-teaching: Robust training of deep neural networks with extremely noisy labels. In Advances in Neural Information Processing Systems, 2018. +[12] Dan Hendrycks, Mantas Mazeika, Duncan Wilson, and Kevin Gimpel. Using trusted data to train deep networks on labels corrupted by severe noise. NIPS, 2018. +[13] Guosheng Hu, Yang Hua, Yang Yuan, Zhihong Zhang, Zheng Lu, Sankha S Mukherjee, Timothy M Hospedales, Neil M Robertson, and Yongxin Yang. Attribute-enhanced face recognition with neural tensor fusion networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 3744-3753, 2017. +[14] Guosheng Hu, Yongxin Yang, Dong Yi, Josef Kittler, William Christmas, Stan Z Li, and Timothy Hospedales. When face recognition meets with deep learning: an evaluation of convolutional neural networks for face recognition. + +In Proceedings of the IEEE international conference on computer vision workshops, pages 142-150, 2015. +[15] Lu Jiang, Deyu Meng, Shouou-I Yu, Zhenzhong Lan, Shiguang Shan, and Alexander Hauptmann. Self-paced learning with diversity. In Advances in Neural Information Processing Systems, pages 2078-2086, 2014. +[16] Lu Jiang, Zhengyuan Zhou, Thomas Leung, Li-Jia Li, and Li Fei-Fei. Mentornet: Regularizing very deep neural networks on corrupted labels. ICML, 2017. +[17] Ishan Jindal, Matthew Nokleby, and Xuewen Chen. Learning deep networks from noisy labels with dropout regularization. In ICDM, pages 967–972. IEEE, 2016. +[18] Donald R Jones. A taxonomy of global optimization methods based on response surfaces. Journal of global optimization, 21(4):345-383, 2001. +[19] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. +[20] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097-1105, 2012. +[21] Yann LeCun, Léon Bottou, Yoshua Bengio, Patrick Haffner, et al. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2324, 1998. +[22] Yuncheng Li, Jianchao Yang, Yale Song, Liangliang Cao, Jiebo Luo, and Li-Jia Li. Learning from noisy labels with distillation. In ICCV, pages 1928-1936, 2017. +[23] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018. +[24] Tongliang Liu and Dacheng Tao. Classification with noisy labels by importance reweighting. IEEE TPAMI, 38(3):447-461, 2016. +[25] Xin Liu, Shaoxin Li, Meina Kan, Shiguang Shan, and Xilin Chen. Self-error-correcting convolutional neural network for learning with noisy labels. In ICFG 2017, pages 111-117. IEEE, 2017. +[26] Dougal Maclaurin, David Duvenaud, and Ryan Adams. Gradient-based hyperparameter optimization through reversible learning. In ICML-2015, pages 2113–2122, 2015. +[27] Volodymyr Mnih and Geoffrey E Hinton. Learning to label aerial images from noisy data. In ICML-12, pages 567-574, 2012. +[28] Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In CVPR, pages 2233-2241, 2017. +[29] Scott Reed, Honglak Lee, Dragomir Anguelov, Christian Szegedy, Dumitru Erhan, and Andrew Rabinovich. Training deep neural networks on noisy labels with bootstrapping. arXiv preprint arXiv:1412.6596, 2014. +[30] Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. Learning to reweight examples for robust deep learning. arXiv preprint arXiv:1803.09050, 2018. +[31] Sainbayar Sukhbaatar and Rob Fergus. Learning from noisy labels with deep neural networks. arXiv preprint arXiv:1406.2080, 2(3):4, 2014. + +[32] Andreas Veit, Neil Alldrin, Gal Chechik, Ivan Krasin, Abhinav Gupta, and Serge J Belongie. Learning from noisy large-scale datasets with minimal supervision. In CVPR, pages 6575-6583, 2017. +[33] Yisen Wang, Weiyang Liu, Xingjun Ma, James Bailey, Hongyuan Zha, Le Song, and Shu-Tao Xia. Iterative learning with open-set noisy labels. arXiv preprint arXiv:1804.00092, 2018. +[34] Xiang Wu, Ran He, Zhenan Sun, and Tieniu Tan. A light cnn for deep face representation with noisy labels. IEEE Transactions on Information Forensics and Security, 13(11), 2018. +[35] Tong Xiao, Tian Xia, Yi Yang, Chang Huang, and Xiaogang Wang. Learning from massive noisy labeled data for image classification. In CVPR, pages 2691-2699, 2015. +[36] Kun Yi and Jianxin Wu. Probabilistic end-to-end noise correction for learning with noisy labels. CVPR2019, 2019. +[37] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016. +[38] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530, 2016. +[39] Dingwen Zhang, Deyu Meng, and Junwei Han. Co-saliency detection via a self-paced multiple-instance learning framework. IEEE transactions on pattern analysis and machine intelligence, 39(5):865-878, 2017. +[40] Zhilu Zhang and Mert Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. In NIPS, pages 8778-8788, 2018. +[41] Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016. \ No newline at end of file diff --git a/trainingnoiserobustdeepneuralnetworksviametalearning/images.zip b/trainingnoiserobustdeepneuralnetworksviametalearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..43f7616b89e99ea50a75629b3882b1a2f3d13825 --- /dev/null +++ b/trainingnoiserobustdeepneuralnetworksviametalearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7708191e4ce731773b9d2a1c01d7c9e14238d36d58763f73708a35cf933a1a7 +size 563161 diff --git a/trainingnoiserobustdeepneuralnetworksviametalearning/layout.json b/trainingnoiserobustdeepneuralnetworksviametalearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f792fdd96c5f05303f86908fffe613aa85cb2b2b --- /dev/null +++ b/trainingnoiserobustdeepneuralnetworksviametalearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26af4e54473e8af5fc59cc4710d332d1fa82cd63553ed06fffa63c54c06d0f1a +size 437308 diff --git a/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/d30d93b9-95d1-4cc4-ba15-114829164f29_content_list.json b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/d30d93b9-95d1-4cc4-ba15-114829164f29_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a5393ec58f84bcc9b54db252e22fa5d4fcccc5d8 --- /dev/null +++ b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/d30d93b9-95d1-4cc4-ba15-114829164f29_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06e274dde4b17f3f7089660bb6153095cfaa811a10556ffe4a3474b8c8d53197 +size 80891 diff --git a/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/d30d93b9-95d1-4cc4-ba15-114829164f29_model.json b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/d30d93b9-95d1-4cc4-ba15-114829164f29_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ee77afd67bf08df41fd469b1ba52a5d2ac06ef24 --- /dev/null +++ b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/d30d93b9-95d1-4cc4-ba15-114829164f29_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7be750ed93988e9cfc9d316cd378916cd47e43a7669f357872e405a09c35aec +size 101866 diff --git a/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/d30d93b9-95d1-4cc4-ba15-114829164f29_origin.pdf b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/d30d93b9-95d1-4cc4-ba15-114829164f29_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6b48cf4d5403651d867872761fa97165faf9e97e --- /dev/null +++ b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/d30d93b9-95d1-4cc4-ba15-114829164f29_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0d72e4beae93c2db19b71436fc7b517425ccbb96d5ce257ae58fd133d0b206b +size 443336 diff --git a/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/full.md b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a0a0a75adfe00eb144628f5cf6362e6bb8ff802d --- /dev/null +++ b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/full.md @@ -0,0 +1,304 @@ +# Training Quantized Neural Networks with a Full-precision Auxiliary Module + +Bohan Zhuang $^{1}$ Lingqiao Liu $^{1}$ Mingkui Tan $^{2}$ Chunhua Shen $^{1*}$ Ian Reid $^{1}$ $^{1}$ The University of Adelaide $^{2}$ South China University of Technology + +# Abstract + +In this paper, we seek to tackle a challenge in training low-precision networks: the notorious difficulty in propagating gradient through a low-precision network due to the non-differentiable quantization function. We propose a solution by training the low-precision network with a full-precision auxiliary module. Specifically, during training, we construct a mix-precision network by augmenting the original low-precision network with the full precision auxiliary module. Then the augmented mix-precision network and the low-precision network are jointly optimized. This strategy creates additional full-precision routes to update the parameters of the low-precision model, thus making the gradient back-propagates more easily. At the inference time, we discard the auxiliary module without introducing any computational complexity to the low-precision network. We evaluate the proposed method on image classification and object detection over various quantization approaches and show consistent performance increase. In particular, we achieve near lossless performance to the full-precision model by using a 4-bit detector, which is of great practical value. + +# 1. Introduction + +Deep neural networks (DNNs) have made great strides in many computer vision tasks such as image classification [11, 20], segmentation [8, 10] and detection [37, 40]. Even though deep and/or wide models can achieve promising accuracy, their huge computational complexity makes them incompatible with energy constrained devices which usually have limited memory bandwidth and computational power. This has motivated the community to design energy-efficient models, often based on quantized precision, aiming not to sacrifice accuracy relative to the full-precision models. In this paper, we propose to improve the training of the low-precision networks. + +The core challenge for quantization is the non-differentiability of the discrete quantizer. As a result, we cannot directly optimize the discretised network with + +stochastic gradient descent. And the current solutions can be divided into two categories. The first category is to employ a surrogate of gradient. The most commonly used approach is the straight-through estimator (STE) [2]. Some recent works have been proposed to relax the discrete quantizer to be continuous for gradient-based optimization [1, 31]. Even though the discontinuity of the discretization operation during training can be partly solved by smoothing it appropriately, some important information may still be missed due to the approximation which can lead to an undesirable drop in accuracy. The second category is to seeking guidance from a full-precision model for discretised network training. For example, new training strategies such as knowledge distillation [32, 56, 57] have been proposed to learn a low-precision student network by distilling knowledge from a full-precision teacher network. + +Our method falls into the second category and our approach is based on the idea of sharing parameters between a mixed-precision (partially fully-precision) model and a low-precision model. Specifically, our method constructs a full-precision auxiliary module which connects to multiple layers of a low-precision model (see Fig. 1). During training, the low-precision network and the full-precision auxiliary module will be combined to form an augmented mixed-precision network. Then, the mixed-precision network and the low-precision model are jointly optimized. Since the parameters from the low-precision model are shared, they can receive gradient from both full-precision connections and low-precision connections. Consequently, the parameters of low-precision model can be updated via two routes, and this can overcome the gradient propagation difficulty due to the discontinuity of the quantizer. Note that only the low-precision network will be utilized for inference and therefore there is no additional complexity introduced at the test stage. + +In addition to image classification, we further extend the proposed approach to building quantized networks for object detection. Building low-precision networks for object detection is more challenging since detection needs the network outputs richer information, such as locations of bounding boxes. There has been several works in literature to address the quantized object detectors [16, 22, 48]. How + +ever, there still exists a significant performance drop of 4-bit or lower-precision quantized detectors comparing to their full-precision counterpart. We apply our techniques to train a 4-bit RetinaNet [25] detector and further propose a modification to RetinaNet to better accommodate the quantization design. Through extensive experiments on the COCO benchmark, we show that our 4-bit models can achieve near lossless performance comparing to the full-precision model, which has a significant value in practice. + +Our contributions can be summarized as follows: + +- We propose a new training method to account for the non-differentiability of the quantization operator in a low-precision network. Our method can lead to more accurate low-precision model without increasing the model complexity at the testing stage. +- We apply our learning approach and propose a new design modification to build a 4-bit quantized object detection which achieves comparable performance to its full-precision counterpart. + +# 1.1. Related work + +Network quantization. Quantized network represents the weights and activations with very low precision, thus yielding highly compact DNN models compared to their floating-point counterparts. Moreover, the convolution operations can be efficiently computed via bitwise operations. Quantization can be categorized into fixed-point quantization and binary neural networks (BNNs), in which fixed-point quantization can also be divided into uniform and non-uniform. Uniform approaches [17,54,57] design quantizers with a constant quantization step. To reduce the quantization error, non-uniform strategies [4, 52] propose to learn the quantization intervals by jointly optimizing parameters and quantizers. A fundamental problem of quantization is to approximate gradient of the non-differentiable quantizer. To solve this problem, some works have studied relaxed quantization [1, 31, 47, 57]. Moreover, with the popularity of automatic machine learning, some recent literature employs reinforcement learning to search for the optimal bitwidth for each layer [6, 46, 49]. BNNs [14, 36] constrain both weights and activations to binary values (i.e., $+1$ or $-1$ ), which brings great benefits to specialized hardware devices. The development of BNNs can be classified into two categories: (i) a focus on improving the training of BNNs [13, 30, 36, 45]; (ii) multiple binarizations to approximate the full-precision tensor or structure [9, 23, 27, 28, 45, 58]. In this paper, we propose a general auxiliary learning approach that can work on all categories of quantization approaches. + +Weight sharing. Weight sharing has been attracting increasing attention for efficient, yet accurate computation. In visual recognition, region proposal networks (RPN) in Faster-RCNN [40] and Mask-RCNN [10] share the same + +backbone with task-specific networks, which greatly saves testing time. For neural architecture search, ENAS [35] allows parameters to be shared among all architectures in the search space, which saves orders of magnitude GPU hours. In the network compression field, weight/activation quantization intends to partition the weight/activation distribution into clusters and use the centers of clusters as the possible discrete values. This strategy can be interpreted as a special case of weight sharing. Different from these approaches, we propose to utilize weight sharing for jointly optimizing the full-precision auxiliary module and the original low-precision network to improve the accuracy of the latter quantized model. + +Auxiliary supervision. One straightforward way of adding auxiliary supervision is introducing additional losses into intermediate layers, which serves to combat the vanishing gradient problem while providing regularization. The effectiveness of additional losses has been demonstrated in some literature, like GoogLeNet [43], DSN [21], semantic segmentation [33,53], etc. However, these methods are usually sensitive to the positions and scales of the guidance signals. Knowledge distillation (KD) is initially proposed for model compression, where a powerful wide/shallow teacher distills knowledge to a narrow/shallow student to improve its performance [12,41], which can also be treated as adding auxiliary supervisions. In terms of the definition of knowledge to be distilled from the teacher, existing models typically use teacher's class probabilities [12] and/or intermediate features [15,34,41,51,57]. It is worth noting that our proposed auxiliary learning strategy uses weight sharing to assist optimization, where the motivation is very different from the KD methods. We does not need to pre-train a teacher network which is usually much deeper and may be the upper bound of the performance. Moreover, on network quantization, we show consistent superior performance over KD methods in Sec. 4.1. + +Object detection. Object detection can be divided into two categories. As one of the dominant detection framework, two-stage detection methods [7, 8, 40] first generate region proposals and then refine them by subsequent networks. Another main category is the one-stage methods which are represented by YOLO [37-39], SSD [29] and RetinaNet [25]. The objective is to improve the detection efficiency by directly classifying and regressing the predefined anchors without the proposal generation step. The recent developing trends in object detection is designing light-weight frameworks for mobile applications [5, 44, 48], which usually requires real-time, low-power and fully embedded. In this paper, we explore to compress and accelerate detectors from the quantization perspective. Note that, we are the first to achieve near lossless 4-bit detectors in the literature. + +![](images/bf16e6bf07727d5e698e85d706de05de47fa5d9ca8f579ccd19284b78c50d0dc.jpg) +(a): Overview of the training stage. + +![](images/c57998cfda0d07d49bc84f25dadd95270915ae252774e59889799f683671a83d.jpg) +(b): Overview of the testing stage. +Figure 1: An overview of the proposed framework. Blue color represents low-precision operations while pink color denotes full-precision operations. During training, the full-precision $H$ is connected to the quantized $F$ to form a mixed-precision network $F \circ H$ . Then the mixed-precision network and the low-precision $F$ are jointly optimized with weight sharing. It is worth noting that only the learnt quantized network $F$ is used during testing. + +# 2. Method + +In this section, we describe the proposed learning strategy for training a low-precision network. We first give an overview of the proposed approach in Sec. 2.1. Then we introduce the auxiliary module design in Sec. 2.2 and optimization in Sec. 2.3, respectively. After that, we provide discussions in Sec. 2.4 and explain how to extend it to quantized object detection in Sec. 3. Through the following part, we adopt the following terminologies: A layer is a standard parameterized layer in a network such as a dense or convolutional layer. A block is a collection of layers in which the output of its last layer is connected to the input of the next block (e.g., a residual block). + +# 2.1. Overview and motivation + +The overview of the framework is shown in Fig. 1. The blue part, denoted as $F$ , shows the low-precision network we aim to learn. The pink part, denoted as $H$ , is a full-precision sub-network, which we call the auxiliary module. It connects to intermediate outputs from $F$ . The input image is fed into $F$ but generates two outputs, one is from the last layer in $F$ and the other is from the last layer in $H$ . In other words, the combination of $F$ and $H$ forms an augmented mix-precision network $F \circ H$ and the parameters of the low-precision network is shared by this augmented network. At the training time, two loss functions are applied to both outputs, and the mixed-precision network and low-precision network are trained jointly. After training, the auxiliary module $H$ will be discarded and only $F$ will be used at the test time. + +The motivation of such a design is to create full-precision routes to update parameters of the low-precision model and thus alleviating the difficulty of propagating gradient in a quantized model. Specifically, the intermediate output of + +each block in $F$ can directly influence the output of the mixed-precision network $F \circ H$ through the full-precision connections in $H$ . Consequently, the gradient from the loss of the second output will back propagate to the parameters of each block in the low-precision model. + +# 2.2. Module design + +We now elaborate the design for the auxiliary module $H$ , which is made up of a sequential of adaptors and aggregators as shown in Fig. 1 (a). In particular, the auxiliary module $H$ receives $P$ output feature maps $\{\mathbf{O}_p\}_{p=1}^P$ of the corresponding blocks in $F$ . Let $\{B_1, \dots, B_P\}$ be the block indexes where we generate the feature maps. For the $p$ -th input of $H$ , we adopt a trainable adaptor $\phi_p(\cdot)$ , which receives the output feature map $\mathbf{O}_p$ of the $B_p$ -th block from $F$ and outputs an adapted feature representation $\phi_p(\mathbf{O}_p)$ . The motivation of using the adapter is to compensate the distribution discrepancy between the low-precision model and full-precision model. It ensures the quantized activations $\{\mathbf{O}_p\}_{p=1}^P$ to be compatible to the full-precision calculation in $H$ . We implement those adapters by a simple $1 \times 1$ convolutional layer followed by a batch normalization layer in this paper. + +In the auxiliary module $H$ , the outputs of the adaptor are then sequentially aggregated. Formally, let $\pmb{g}_p$ denotes the $p$ -th aggregated feature. It is achieved by adding the adapted feature $\phi_p(\mathbf{O}_p)$ from $F$ and the $(p - 1)$ -th aggregated feature from $H$ followed by a $\mathrm{ReLU}(\cdot)$ nonlinearity: + +$$ +\boldsymbol {g} _ {p} = \operatorname {R e L U} \left(\phi_ {p} \left(\mathbf {O} _ {p}\right) + \boldsymbol {g} _ {p - 1}\right). \tag {1} +$$ + +At the last layer in $H$ , a classifier layer is applied to $g_{P}$ to make the class prediction. Then an auxiliary loss is employed. Note that the auxiliary module $H$ is akin the skip connections in ResNet [11]. + +Algorithm 1: Joint training approach w.r.t. the main low-precision network $F$ and the full-precision auxiliary module $H$ . + +Input: Current mini-batch $\{\pmb{x}_i,\pmb{y}_i\}$ ; parameter $\pmb{\theta}^F$ of the low-precision network $F$ ; parameter $\pmb{\theta}^H$ of the full-precision auxiliary module $H$ . + +Output: Updated parameters $\{\pmb {\theta}^F,\pmb {\theta}^H\}$ + +1 Obtain the quantized weight $Q^{F} = q(\pmb{\theta}^{F})$ , where $q(\cdot)$ is the quantization function; +2 $\pmb{y}_F, \pmb{y}_H = \text{Forward}(\pmb{x}_i, \pmb{Q}^F, \pmb{\theta}^H)$ ; +3 Compute the loss $\mathcal{L}(\pmb {y}_i,\pmb {y}_F)$ for the main network $F$ +4 Compute the loss $\mathcal{L}_{aux}(\pmb{y}_i, \pmb{y}_H)$ for the auxiliary module $H$ ; +5 $\frac{\partial\mathcal{L}}{\partial Q^F},\frac{\partial\mathcal{L}_{aux}}{\partial Q^F},\frac{\partial\mathcal{L}_{aux}}{\partial\pmb{\theta}^H} =$ Backward( $\frac{\partial\mathcal{L}}{\partial\pmb{y}_F},\frac{\partial\mathcal{L}_{aux}}{\partial\pmb{y}_H},\pmb {Q}^F,\pmb {\theta}^H)$ +6 Compute the gradient, in particular + +$$ +\nabla Q ^ {F} = \frac {1}{2} \left(\frac {\partial \mathcal {L}}{\partial Q ^ {F}} + \frac {\partial \mathcal {L} _ {a u x}}{\partial Q ^ {F}}\right); +$$ + +7 Update parameters using Adam; + +# 2.3. Optimization + +Let $\{\pmb{x}_i,\pmb{y}_i\}_{i = 1}^N$ be the training samples. The proposed method jointly optimize the main network $F$ and the mixed-precision network which is the combination of $F$ and $H$ , denoting as $F\circ H$ . The training objective is: + +$$ +\begin{array}{l} \min _ {\left. \boldsymbol {\theta} ^ {F}, \boldsymbol {\theta} ^ {H} \right\}} \sum_ {i = 1} ^ {N} \mathcal {L} \left(F \left(\boldsymbol {x} _ {i}; \boldsymbol {\theta} ^ {F}\right), \boldsymbol {y} _ {i}\right) \tag {2} \\ + \mathcal {L} _ {a u x} ((F \circ H) (\boldsymbol {x} _ {i}; \boldsymbol {\theta} ^ {H}, \boldsymbol {\theta} ^ {F}), \boldsymbol {y} _ {i}), \\ \end{array} +$$ + +where $\theta^F$ and $\theta^H$ represent the parameters for the backbone $F$ and the auxiliary module $H$ , respectively. $\mathcal{L}$ is the task objective and $\mathcal{L}_{aux}$ is the auxiliary loss. In the classification task, both terms are set to the cross-entropy loss. From Eq. (2), we can note that $\theta^F$ is shared among $F$ and $F \circ H$ . Following the chain rule, the gradient of $\theta^F$ will have an additional term comes from $\mathcal{L}_{aux}$ . As a result, the approximated gradient is averaged from both the mixed-precision network and the original low-precision network to achieve more accurate updating direction. In other words, the full-precision module $H$ provides direct gradient for $F$ using weight sharing during back-propagation. We summarize the proposed learning process for a quantized neural network in Algorithm 1. + +# 2.4. Relationship to other methods + +In this section, we will elaborate the relationship between the proposed auxiliary learning and other related approaches. + +Differences to applying auxiliary classification losses to + +![](images/6b93cfaf12df224a86236101f427259e96e1c04be17e7adb6fd7c81771d8104b.jpg) +(b): + +![](images/a9308c50f2241b62b95aee7e0c52ef0a6eb4ada61a767d9b419fc3e4d93ef3ef.jpg) +Figure 2: Overview of the two related approaches. (a): Adding additional classification losses to intermediate layers. (b): Knowledge distillation. In network quantization, the pink teacher network is full-precision while the blue student network is low-precision. + +intermediate activations. An alternatively way to create auxiliary full-precision routes for learning low-precision network is to apply classification losses to intermediate activations. The schematic illustration of this idea is shown in Fig. 2 (a), where each intermediate output is attached to a classifier to perform classification. In such a case, the final training objective becomes: + +$$ +\widetilde {\mathcal {L}} _ {o b j} = \widetilde {\mathcal {L}} + \sum_ {i = 1} ^ {M} \alpha_ {i} \widetilde {\ell} _ {i}, \tag {3} +$$ + +where $\widetilde{\mathcal{L}}$ is the classification loss of the original low-precision network, $\widetilde{\ell}_i$ is the classification loss applies to the $i$ -th intermediate output, and $\alpha_{i}$ is the weight associated to the $i$ -th loss function. This scheme can directly propagate gradient to each block during training through the full-precision classifiers. However, its supervision is very restrictive since it essentially assumes that the intermediate output can be directly used for classification. In practice, we often find that choosing the positions of adding the additional supervisions or the weight $\alpha_{i}$ can be challenging. An inappropriate setting of those factors may lead to inferior performance than that achieved by directly training the low-precision model. + +Differences with knowledge distillation. Knowledge distillation (KD) has been explored to assist the quantized model training [32, 56, 57]. In particular, a low-precision student network learns to generate similar posterior probabilities and/or feature representations of a full-precision teacher network (see Fig. 2 (b)). The training objective can be formulated as + +$$ +\hat {\mathcal {L}} _ {o b j} = \hat {\mathcal {L}} _ {1} + \hat {\mathcal {L}} _ {2} + \sum_ {i = 1} ^ {M} \beta_ {i} \hat {\ell} _ {i}, \tag {4} +$$ + +where $\hat{\mathcal{L}}_1$ and $\hat{\mathcal{L}}_2$ are task-specific objectives for student and teacher networks respectively. $\hat{\ell}_i$ represents the $i$ -th distillation loss. + +Although both the proposed method and $KD$ use a full-precision network to guide the training of a low-precision network, the ways of exerting this guidance are significantly different in $KD$ and the proposed method. Specifically, in $KD$ , the guidance from the full-precision model to the low-precision model is from the distillation losses while in our method this is achieved by making the parameters of a low-precision model shared with the mixed-precision model. There are many advantages of our method comparing to $KD$ : (1) Our method only needs an extra memory to store the auxiliary module rather than a full-precision network. Comparing to $KD$ , our method is more memory-efficient. (2) Our method only uses a single auxiliary loss but can create guidance signals to various blocks of the low-precision model. In contrast, $KD$ needs multiple distillation losses to achieve this. Thus it usually involves more hyperparameters, i.e., the weight of each loss term $\beta_{i}$ . Moreover, we empirically find that the proposed learning strategy performs consistently superior than $KD$ for learning quantized networks in Sec. 4.1.3 and Sec. 4.1.4. + +# 3. Extension to object detection + +Most existing methods evaluate low-precision network with the classification task. Building a low-precision network for more difficult object detection task remains a challenge. To fill this gap, we further extend our method to build a quantized object detector. Following the work in [24, 25], we consider the object detection framework consisting of a backbone, a feature pyramid and prediction heads. We directly use the quantized network pretrained on the ImageNet classification task to initialize the detection backbone. We adopt the uniform quantization approach QIL [17] to quantize both weights and activations, where the quantization intervals are explicitly parameterized and jointly optimized with the network parameters. We add an individual auxiliary module for each prediction head while sharing a single module for the backbone. + +Beside of applying the proposed auxiliary module and learning strategy to help training the quantized detector, we also propose a modification which we find beneficial. Specifically, unlike [22] which freezes the batch normalization (BN) statistics during training to stabilize optimization, we instead propose an alternative strategy where the BN statistics still keeps updating: we propose that except the last layers for classification and regression, parameters of the prediction heads are not shared across all feature pyramid levels. This is different from the common full-precision setup. The motivation of this design is that the multi-scale semantic information can not be encoded effectively due to the quantization process at different pyramid levels. For a full-precision network, using a shared head is sufficient to represent rich semantic information for classification and regression with the continuous activations. However, in the + +low-precision setting, the representational capability of activations is highly degraded due to its discrete values. For the same reason, the batch statistics of quantized activations may differ drastically across different levels. Therefore, each head should learn independent parameters to capture the corresponding multi-scale information. + +Remark: (1) The proposed modification does not share prediction heads and thus uses more parameters in the low-precision model. However, we should note that without sharing does not increase any additional computational complexity. Even though the number of parameters is increased, the memory consumption is still significantly reduced comparing to the full-precision model due to the low-bit storage. (2) We empirically find that not sharing heads may not improve (but reduce) the performance in the full-precision setting. So the proposed modification is only for low-precision networks. Please check the experiments in Sec. 4.2.3 for more discussions. + +# 4. Experiments + +In this section, we evaluate our proposed methods on image classification in Sec. 4.1 and object detection in Sec. 4.2, respectively. To investigate the effectiveness of the proposed method, we define several methods for comparison: Auxi: We optimize the network with the auxiliary module. KD: We employ the joint knowledge distillation in [56, 57] to improve the quantized network. Additional loss: We evenly insert classification losses at intermediate layers to assist training. Note that we will detail the settings in specific sections. + +# 4.1. Experiments on image classification + +We perform experiments on two standard image classification datasets: CIFAR-100 [19] and ImageNet [42]. The CIFAR-100 dataset consists of 60,000 color images of size $32 \times 32$ belonging to 100 classes. There are 50,000 training and 10,000 test images. ImageNet contains about 1.2 million training and 50K validation images of 1,000 object categories. To verify the effectiveness of the proposed auxiliary learning strategy, we experiment on various representative quantization approaches, including uniform fixed-point approach DoReFa-Net [54], non-uniform fixed-point method LQ-Net [52], as well as binary neural network approaches BiReal-Net [30] and Group-Net [58]. + +# 4.1.1 Implementation details + +Following previous approaches [14,52,54,55,57], we quantize all the convolutional layers to ultra-low precision except the first and last layers. However, to further improve the efficiency, we quantize the first convolutional layer and the last fully-connected layer to 8-bit. We first pre-train the full-precision counterpart as initialization and then fine + +![](images/9e9aab284c56bc247f162c58739ea410675d7f9b2308f5fd00631bdb77190146.jpg) +Figure 3: The convergence curves of 2-bit DoReFa-Net ResNet-50 baseline and the proposed auxiliary learning approach on ImageNet validation set during fine-tuning. + +tune the quantized model. For all ImageNet experiments, training images are resized to $256 \times 256$ , and $224 \times 224$ patches are randomly cropped from an image or its horizontal flip, with the per-pixel mean subtracted. We use the single-crop setting for testing. No bias terms are used. We use SGD optimizer for the pre-training stage. For the fine-tuning stage, we adopt the Adam optimizer [18]. The minibatch size is set to 256. We train a maximum 35 epochs and decay the learning rate by 10 at the 25-th and 30-th epochs. For fine-tuning the fixed-point methods [52, 54], the learning rate is initialized to 1e-3. For fine-tuning binary neural networks [30, 58], the initial learning rate is set to 5e-4. In practice, we take the output of each residual block [11] as the input of the auxiliary module. Our implementation is based on PyTorch. + +# 4.1.2 Effect of the auxiliary module + +Table 1: Accuracy $(\%)$ of different comparing methods on the ImageNet validation set. + +
modelmethodTop-1 acc.Top-5 acc.
ResNet-101DoReFa-Net (2-bit)70.889.6
DoReFa-Net + Auxi74.691.9
ResNet-50DoReFa-Net (2-bit)70.289.1
DoReFa-Net + Auxi73.891.4
ResNet-50LQ-Net (3-bit)74.291.6
LQ-Net + Auxi75.492.4
ResNet-18BiReal-Net56.479.5
BiReal-Net + Auxi58.681.2
ResNet-18Group-Net (5 bases)64.885.7
Group-Net + Auxi66.086.5
+ +In this section, we explore the effect of auxiliary module on assisting the low-precision network optimization. The results are reported in Table 1. By combining the baseline with Auxi, we can observe a steady performance increase compared with the original baseline. This strongly + +supports that the learned auxiliary gradient can facilitate the convergence of the low-precision model. In particular, the gradient of the shared weights is averaged from both the auxiliary module and the original low-precision network to achieve more accurate updating direction. Moreover, increasing gradient paths is important to solve the non-differentiability of the discrete quantization process has been proved by [3, 30]. To make it more clear, we plot the convergence curves of DoReFa-Net with ResNet-50 in Fig. 3. From the figure, we can observe that baseline + Auxi converges much faster and better than the baseline. After the first epoch, the baseline + Auxi outperforms baseline by $\sim 20\%$ on the Top-1 accuracy. This result strongly justifies that the auxiliary module efficiently solves the nondifferentiable problem by providing accurate hierarchical gradient for updating parameters during back-propagation. + +It is worth noting that when the network becomes deeper (e.g., ResNet-50, 101), the improvement turns out to be more obvious. For instance, Auxi brings $3.8\%$ Top-1 accuracy increase over the 2-bit baseline on ResNet-101. It can be attributed to that when the quantized network goes deeper, the optimization becomes more difficult due to the non-differentiable discretization process. However, the full-precision auxiliary module can provide direct hierarchical gradient to effectively solve this problem. Note that with the basic uniform DoReFa-Net baseline, we currently achieve the comparing results with state-of-the-arts on ResNet-50 and ResNet-101 [17, 31, 52] without advanced non-uniform or relaxation strategies. + +# 4.1.3 Comparison with other related approaches + +In this section, we compare the auxiliary module with the related approaches discussed in Sec. 2.4 and report the performance in Table 2. The experiments are based on the 2-bit DoReFa-Net with ResNet-18, ResNet-34 and ResNet-50 on ImageNet. For KD experiments, the results are directly cited from [56]. We can observe that introducing additional losses into intermediate layers does not show obvious improvement to the final performance. Compared to $KD$ , we don't need to pre-train a complex teacher network whose quality is sensitive to the final performance. In contrast, we propose a simpler yet effective weight sharing strategy to jointly optimize the low-precision network and the floating-point auxiliary module. More detailed analysis on the difference between two approaches can be referred to Sec. 2.4. From the results, we can observe that Auxi consistently outperforms $KD$ . For instance, on ResNet-50, Auxi exceeds $KD$ by $2.4\%$ on the Top-1 accuracy. These results justify that the auxiliary module can effectively solve the non-differentiable problem during back-propagation in the low-precision network training. With a very different learning strategy, Auxi shows consistently superior empirical results than $KD$ . We therefore argue that the proposed auxil + +iary learning may be a substitute to $KD$ methods [32,57] in network quantization. + +Table 2: Accuracy (%) of different supervision strategies on the ImageNet validation set based on 2-bit DoReFa-Net on ResNet-18, ResNet-34 and ResNet-50. + +
modelmethodTop-1 acc.Top-5 acc.
ResNet-18baseline (2-bit)64.786.0
baseline + Additional loss64.986.1
baseline + KD65.686.3
baseline + Auxi66.787.0
ResNet-34baseline (2-bit)68.288.1
baseline + Additional loss68.588.2
baseline + KD69.088.6
baseline + Auxi71.289.8
ResNet-50baseline (2-bit)70.289.1
baseline + Additional loss70.589.3
baseline + KD71.490.0
baseline + Auxi73.891.4
+ +# 4.1.4 Experiments on plain networks + +Table 3: Accuracy (\%) of the proposed approaches on the ImageNet validation set. All the cases are 2-bit and without skip connections except for the baselines. We can observe that the auxiliary module can significantly improve the plain network performance. + +
modelmethodTop-1 acc.Top-5 acc.
DoReFa-Net on ResNet-18baseline (2-bit)64.786.0
plain61.584.3
plain + KD62.785.0
plain + Auxi63.985.5
DoReFa-Net on ResNet-34baseline (2-bit)68.288.1
plain62.183.9
plain + KD64.585.4
plain + Auxi66.486.8
LQ-Net on ResNet-34baseline (2-bit)69.889.1
plain63.584.6
plain + KD65.786.8
plain + Auxi68.688.5
+ +Table 4: Accuracy (%) of 2-bit DoReFa-Net using ResNet-18 on the CIFAR-100 dataset. + +
modelmethodTop-1 acc.Top-5 acc.
ResNet-18full-precision70.791.3
baseline (2-bit)67.690.2
plain64.688.3
plain + Auxi67.990.0
+ +We further explore an interesting by-product of the auxiliary module for network quantization. We assume that the auxiliary module mimics the effect of skip connections and can partially share its effect. We therefore analyze training a plain low-precision network without skip connections. The results can be referred in Table 3 and Table 4. plain represents we directly optimize a low-precision plain network without skip connections. By comparing plain and plain + + +Auxi, we observe apparent accuracy increase by incorporating Auxi. For example, in LQ-Net ResNet-34 based experiments, introducing Auxi can boost the Top-1 accuracy by $5.1\%$ . On tiny CIFAR-100 dataset, plain + Auxi even outperforms the Top-1 baseline. Moreover, same as the observation in Sec. 4.1.3, Auxi still performs consistently better than KD. From the plain network setting, we can strongly justify that the auxiliary module can provide hierarchical gradient to promote convergence of the quantized network. + +However, we still observe performance gap between plain + Auxi and the baseline on large-scale ImageNet. This can be attributed to two assumptions of skip connections. First, the skip connections may improve the convergence of training, as indicated by the improvement observed when using Auxi. Second, the skip connection and the feature map after one convolution are added through a tensor addition. Then the representational capability (i.e., the value range) of each entry in the added activations is significantly enhanced. In other words, the plain network has less representational capability than its residual counterpart. + +# 4.1.5 Effect of different auxiliary architectures + +We further explore the influence of different auxiliary module architectures in Table 5. From the table, we observe that increasing the complexity of the auxiliary module can further boost the performance. For example, by replacing the $1 \times 1$ convolution in the adaptor with a larger kernel of $3 \times 3$ , we further get slightly performance gain. This can be attributed to that the gradient of shared parameters is averaged from $F$ and $F \circ H$ , where better representational capability of $H$ can result in more accurate gradient update. + +Table 5: Accuracy (%) of using different adaptors. We use DoReFa-Net on ImageNet as our baseline. + +
modelmethodTop-1 acc.Top-5 acc.
ResNet-18baseline (2-bit)64.786.0
baseline + 1 × 1 Auxi66.787.0
baseline + 3 × 3 Auxi66.987.1
+ +# 4.2. Experiments on quantized object detection + +In this section, we evaluate the proposed approach on the general object detection task. Our experiments are conducted on the large-scale detection benchmark COCO [26]. Following [24, 25], we use the COCO trainval35k split (115K images) for training and minival split (5K images) for validation. We conduct experiments based on RetinaNet [25] and compare with the state-of-the-art FQN [22]. + +# 4.2.1 Training details + +Training is divided into two stages. In the first stage, the detection framework is kept to full-precision. The backbone is initialized with the classification model pre-trained + +on the ImageNet dataset. Unless specified, we use the same hyper-parameters with RetinaNet. Specifically, all training and evaluation images are resized so that their shorter edges are 800 pixels. We augment training images by random horizontal flipping while no evaluation augmentations are performed. Our network is trained with stochastic gradient descent (SGD) for 90K iterations with the initial learning rate being 0.01 and the batch size of 16. The learning rate is decayed by a factor of 10 at iterations 60K and 80K, respectively. In the second stage, we use the converged model in the first stage as initialization and fine-tune with quantization. This stage uses identical settings as the full-precision training, except that we use Adam optimizer and the initial learning rate is set to 1e-3. Our implementation is based on Detector2 [50]. + +# 4.2.2 Performance evaluation + +We report the performance of the proposed quantized detection framework in Table 6. From the results, we can observe that our 4-bit detector can achieve near lossless results over the full-precision counterparts, which meets the requirement for practical deployment. Moreover, we can achieve significant performance boost over FQN on all comparing architectures. For example, on ResNet-50, the improvement reaches to 3.6 on AP. + +Table 6: Performance on the COCO validation set with 4-bit quantization. + +
BackboneMethodAP\( AP_{50} \)\( AP_{75} \)\( AP_S \)\( AP_M \)\( AP_L \)
ResNet-50RetinaNet36.556.539.221.440.446.9
FQN [22]32.551.534.717.335.642.6
Ours36.155.838.921.239.946.3
ResNet-34RetinaNet35.254.337.619.538.546.2
FQN [22]31.350.433.316.134.441.6
Ours34.753.736.919.338.045.9
ResNet-18RetinaNet32.150.534.116.934.842.6
FQN [22]28.646.929.914.931.238.7
Ours31.950.433.716.534.642.3
+ +# 4.2.3 Ablation studies + +We now perform ablation studies to give comprehensive analysis and insights of the quantized detection framework. The results are reported in Table 7. "Backbone only" indicates we only quantize the backbone to 4-bit while other parts are kept to full-precision. "Baseline" represents we directly quantize the RetinaNet using QIL [17]. + +When we only quantize the backbone network, we don't observe AP drop at least on ResNet-18. This justifies that 4-bit backbone can encode accurate features for further decoding. However, when quantizing all the components including feature pyramid and prediction heads, we can find obvious precision drop. The baseline result indicates that quantizing the continuous features to a fixed range of integers can cause great multi-scale information loss. + +We now explore the effect of the two strategies described in Sec. 3. First, we incorporate the proposed auxiliary + +Table 7: Ablation studies on the COCO validation set with 4-bit quantization. + +
MethodAP\( AP_{50} \)\( AP_{75} \)\( AP_S \)\( AP_M \)\( AP_L \)
RetinaNet (w/ sharing)32.150.534.116.934.842.6
RetinaNet (w/o sharing)31.249.232.915.834.341.5
Backbone only (w/ sharing)32.150.734.016.734.742.7
Baseline (w/ sharing)29.247.131.014.431.538.5
Baseline + Auxi (w/ sharing)30.648.832.815.533.140.2
Baseline + Auxi (w/o sharing)31.950.433.716.534.642.3
+ +learning strategy to assist the convergence of quantized detector. Specifically, Baseline + Auxi can boost the AP of Baseline by 1.4. Second, not sharing heads is particularly designed for the low-precision detector. We should note that this strategy deteriorates the performance in the full-precision setting. The reason is that a separate head can only see a certain range size of objects. In contrast, not sharing heads can boost the AP by 1.3 in the quantization setting compared with the sharing heads counterpart. It can be attributed that when quantizing both weights and activations to 4-bit, the representational capability of each head is very limited and the statistics of activations differ a lot. Therefore, each head should learn independent parameters to transform the corresponding level feature for classification and regression. + +# 5. Conclusion + +In this paper, we have proposed an auxiliary learning strategy to tackle the non-differentiable quantization process in training low-bitwise convolutional neural networks. Specifically, we have explicitly utilized weight sharing to construct a full-precision auxiliary module. During training, the auxiliary module is combined with the low-precision network to form a mix-precision network, which is jointly optimized with the low-precision model. In this way, the full-precision auxiliary module can provide direct hierarchical gradient during back-propagation to assist the optimization of the low-precision network. In the testing phase, the auxiliary module is removed without introducing any additional computational complexity. Moreover, we have also worked on quantized object detection and proposed several practical solutions. We have conducted extensive experiments based on various quantization approaches and observed consistent performance increase on the image classification and object detection. To be emphasized, we have achieved near lossless results using 4-bit detectors. + +Acknowledgement MT was in part supported by Guangdong Provincial Scientific and Technological Funds under Grants 2018B010107001. CS was in part supported by ARC DP Project 'Deep learning that scales'. IR was in part supported by ARC Laureate Fellowship FL130100102. We acknowledge the support of the Australian Research Council through the Centre of Excellence for Robotic Vision. + +# References + +[1] Yu Bai, Yu-Xiang Wang, and Edo Liberty. Proxquant: Quantized neural networks via proximal operators. In Proc. Int. Conf. Learn. Repren., 2019. 1, 2 +[2] Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013. 1 +[3] Joseph Bethge, Marvin Bornstein, Adrian Loy, Haojin Yang, and Christoph Meinel. Training competitive binary neural networks from scratch. arXiv preprint arXiv:1812.01965, 2018. 6 +[4] Zhaowei Cai, Xiaodong He, Jian Sun, and Nuno Vasconcelos. Deep learning with low precision by half-wave gaussian quantization. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 5918-5926, 2017. 2 +[5] Guobin Chen, Wongun Choi, Xiang Yu, Tony Han, and Manmohan Chandraker. Learning efficient object detection models with knowledge distillation. In Proc. Adv. Neural Inf. Process. Syst., pages 742-751, 2017. 2 +[6] Yukang Chen, Gaofeng Meng, Qian Zhang, Xinbang Zhang, Liangchen Song, Shiming Xiang, and Chunhong Pan. Joint neural architecture search and quantization. arXiv preprint arXiv:1811.09426, 2018. 2 +[7] Ross Girshick. Fast r-cnn. In Proc. IEEE Int. Conf. Comp. Vis., pages 1440-1448, 2015. 2 +[8] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 580-587, 2014. 1, 2 +[9] Yiwen Guo, Anbang Yao, Hao Zhao, and Yurong Chen. Network sketching: Exploiting binary structure in deep cnns. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 5955-5963, 2017. 2 +[10] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In Proc. IEEE Int. Conf. Comp. Vis., pages 2980-2988, 2017. 1, 2 +[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 770-778, 2016. 1, 3, 6 +[12] Geoffrey Hinton, Oriol Vinyls, and Jeff Dean. Distilling the knowledge in a neural network. In Proc. Adv. Neural Inf. Process. Syst. Workshops, 2014. 2 +[13] Lu Hou, Quanming Yao, and James T Kwok. Loss-aware binarization of deep networks. In Proc. Int. Conf. Learn. Repren., 2017. 2 +[14] Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. In Proc. Adv. Neural Inf. Process. Syst., pages 4107-4115, 2016. 2, 5 +[15] Seung Hyun Lee, Dae Ha Kim, and Byung Cheol Song. Self-supervised knowledge distillation using singular value decomposition. In Proc. Eur. Conf. Comp. Vis., 2018. 2 +[16] Benoit Jacob, Skirmantas Kligys, Bo Chen, Menglong Zhu, Matthew Tang, Andrew Howard, Hartwig Adam, and Dmitry + +Kalenichenko. Quantization and training of neural networks for efficient integer-arithmetic-only inference. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2704-2713, 2018. 1 +[17] Sangil Jung, Changyong Son, Seohyung Lee, Jinwoo Son, Jae-Joon Han, Youngjun Kwak, Sung Ju Hwang, and Changkyu Choi. Learning to quantize deep networks by optimizing quantization intervals with task loss. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 4350-4359, 2019. 2, 5, 6, 8 +[18] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proc. Int. Conf. Learn. Repren., 2015. 6 +[19] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009. 5 +[20] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Proc. Adv. Neural Inf. Process. Syst., pages 1097-1105, 2012. 1 +[21] Chen-Yu Lee, Saining Xie, Patrick Gallagher, Zhengyou Zhang, and Zhuowen Tu. Deeply-supervised nets. In Artificial Intelligence and Statistics, pages 562-570, 2015. 2 +[22] Rundong Li, Yan Wang, Feng Liang, Hongwei Qin, Junjie Yan, and Rui Fan. Fully quantized network for object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2810-2819, 2019. 1, 5, 7, 8 +[23] Zefan Li, Bingbing Ni, Wenjun Zhang, Xiaokang Yang, and Wen Gao. Performance guaranteed network acceleration via high-order residual quantization. In Proc. IEEE Int. Conf. Comp. Vis., pages 2584-2592, 2017. 2 +[24] Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2117-2125, 2017. 5, 7 +[25] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In Proc. IEEE Int. Conf. Comp. Vis., pages 2980-2988, 2017. 2, 5, 7 +[26] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dálár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In Proc. Eur. Conf. Comp. Vis., pages 740-755, 2014. 7 +[27] Xiaofan Lin, Cong Zhao, and Wei Pan. Towards accurate binary convolutional neural network. In Proc. Adv. Neural Inf. Process. Syst., pages 344-352, 2017. 2 +[28] Chunlei Liu, Wenrui Ding, Xin Xia, Baochang Zhang, Jiaxin Gu, Jianzhuang Liu, Rongrong Ji, and David Doermann. Circulant binary convolutional networks: Enhancing the performance of 1-bit dcnns with circulant back propagation. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2691-2699, 2019. 2 +[29] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In Proc. Eur. Conf. Comp. Vis., pages 21-37, 2016. 2 +[30] Zechun Liu, Baoyuan Wu, Wenhan Luo, Xin Yang, Wei Liu, and Kwang-Ting Cheng. Bi-real net: Enhancing the performance of 1-bit cnns with improved representational capability and advanced training algorithm. In Proc. Eur. Conf. Comp. Vis., pages 722-737, 2018. 2, 5, 6 + +[31] Christos Louizos, Matthias Reisser, Tijmen Blankevoort, Efstratos Gavves, and Max Welling. Relaxed quantization for discretized neural networks. In Proc. Int. Conf. Learn. Repren., 2019. 1, 2, 6 +[32] Asit Mishra and Debbie Marr. Apprentice: Using knowledge distillation techniques to improve low-precision network accuracy. In Proc. Int. Conf. Learn. Repren., 2018. 1, 4, 7 +[33] Vladimir Nekrasov, Hao Chen, Chunhua Shen, and Ian Reid. Fast neural architecture search of compact semantic segmentation models via auxiliary cells. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 9126-9135, 2019. 2 +[34] Wonpyo Park, Dongju Kim, Yan Lu, and Minsu Cho. Relational knowledge distillation. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2019. 2 +[35] Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. In Proc. Int. Conf. Mach. Learn., pages 4092-4101, 2018. 2 +[36] Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In Proc. Eur. Conf. Comp. Vis., pages 525-542, 2016. 2 +[37] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 779-788, 2016. 1, 2 +[38] Joseph Redmon and Ali Farhadi. Yolo9000: better, faster, stronger. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 7263-7271, 2017. 2 +[39] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767, 2018. 2 +[40] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Proc. Adv. Neural Inf. Process. Syst., pages 91-99, 2015. 1, 2 +[41] Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. In Proc. Int. Conf. Learn. Repren., 2015. 2 +[42] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. Int. J. Comp. Vis., 115(3):211-252, 2015. 5 +[43] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 1-9, 2015. 2 +[44] Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2820-2828, 2019. 2 +[45] Wei Tang, Gang Hua, and Liang Wang. How to train a compact binary neural network with high accuracy? In Proc. AAAI Conf. on Arti. Intel., pages 2625-2631, 2017. 2 + +[46] Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, and Song Han. Haq: Hardware-aware automated quantization. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2019. 2 +[47] Peisong Wang, Qinghao Hu, Yifan Zhang, Chunjie Zhang, Yang Liu, Jian Cheng, et al. Two-step quantization for low-bit neural networks. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 4376-4384, 2018. 2 +[48] Yi Wei, Xinyu Pan, Hongwei Qin, Wanli Ouyang, and Junjie Yan. Quantization mimic: Towards very tiny cnn for object detection. In Proc. Eur. Conf. Comp. Vis., pages 267-283, 2018. 1, 2 +[49] Bichen Wu, Yanghan Wang, Peizhao Zhang, Yuandong Tian, Peter Vajda, and Kurt Keutzer. Mixed precision quantization of convnets via differentiable neural architecture search. arXiv preprint arXiv:1812.00090, 2018. 2 +[50] Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo, and Ross Girshick. Detector2. https://github.com/facebookresearch/detectron2, 2019.8 +[51] Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. In Proc. Int. Conf. Learn. Repren., 2017. 2 +[52] Dongqing Zhang, Jiaolong Yang, Dongqiangzi Ye, and Gang Hua. Lq-nets: Learned quantization for highly accurate and compact deep neural networks. In Proc. Eur. Conf. Comp. Vis., pages 365-382, 2018. 2, 5, 6 +[53] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2881-2890, 2017. 2 +[54] Shuchang Zhou, Yuxin Wu, Zekun Ni, Xinyu Zhou, He Wen, and Yuheng Zou. Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv preprint arXiv:1606.06160, 2016. 2, 5, 6 +[55] Chenzhuo Zhu, Song Han, Huizi Mao, and William J Dally. Trained ternary quantization. Proc. Int. Conf. Learn. Repren., 2017. 5 +[56] Bohan Zhuang, Jing Liu, Mingkui Tan, Lingqiao Liu, Ian Reid, and Chunhua Shen. Effective training of convolutional neural networks with low-bitwidth weights and activations. arXiv preprint arXiv:1908.04680, 2019. 1, 4, 5, 6 +[57] Bohan Zhuang, Chunhua Shen, Mingkui Tan, Lingqiao Liu, and Ian Reid. Towards effective low-bitwidth convolutional neural networks. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 7920-7928, 2018. 1, 2, 4, 5, 7 +[58] Bohan Zhuang, Chunhua Shen, Mingkui Tan, Lingqiao Liu, and Ian Reid. Structured binary neural network for accurate image classification and semantic segmentation. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 413-422, 2019, 2, 5, 6 \ No newline at end of file diff --git a/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/images.zip b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..17ea2dcceb527f55483cd253c02e56ac0da245a2 --- /dev/null +++ b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3189bdb0ba431c428d7f6d2f05a42f2986c21d6135508e58854adc13daac3630 +size 333617 diff --git a/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/layout.json b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..62c7a881d619a19350b6edbc6b0850b16ae3f60f --- /dev/null +++ b/trainingquantizedneuralnetworkswithafullprecisionauxiliarymodule/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e94283f98a2f851382f10398dfdcbee8ac859a98ec945e4a0cc3fb3600b6a5a +size 420584 diff --git a/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/7a38f569-03ba-4ee1-89ea-d306b726afe0_content_list.json b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/7a38f569-03ba-4ee1-89ea-d306b726afe0_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c3817b560f810c32273230fb3fcaf70dad368783 --- /dev/null +++ b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/7a38f569-03ba-4ee1-89ea-d306b726afe0_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3023ea0e91804c55acc871186a97d2cf76f01b7997cc400ccf609a1eedc40ab7 +size 89301 diff --git a/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/7a38f569-03ba-4ee1-89ea-d306b726afe0_model.json b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/7a38f569-03ba-4ee1-89ea-d306b726afe0_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e78e2b90d0bb0a79504cb55431bde09bc4656622 --- /dev/null +++ b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/7a38f569-03ba-4ee1-89ea-d306b726afe0_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8390ebee807fca83660fabbae8496671f9f1fc35153eb523e7973679995727a9 +size 109993 diff --git a/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/7a38f569-03ba-4ee1-89ea-d306b726afe0_origin.pdf b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/7a38f569-03ba-4ee1-89ea-d306b726afe0_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7cdc84c38be7767883499cc228232542fb13418e --- /dev/null +++ b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/7a38f569-03ba-4ee1-89ea-d306b726afe0_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:caa49bd81c24d55cdc80ed5d668c94bc26ba18dd82192e3d9657310c974d015e +size 1480456 diff --git a/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/full.md b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f299310bd4bb4f2e9692297d3b83ae7f3cb64b6a --- /dev/null +++ b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/full.md @@ -0,0 +1,339 @@ +# Transferable, Controllable, and Inconspicuous Adversarial Attacks on Person Re-identification With Deep Mis-Ranking + +Hongjun Wang $^{1*}$ Guangrun Wang $^{1*}$ Ya Li $^{2}$ Dongyu Zhang $^{2}$ Liang Lin $^{1,3\dagger}$ + +$^{1}$ Sun Yat-sen University $^{2}$ Guangzhou University $^{3}$ DarkMatter AI + +$^{1}\{wanghq8, wanggrun, zhangdy27\} \text{}@mail2.sysu.edu.cn$ $^{2}$ liya@gzhu.edu.cn $^{3}$ linliang@ieee.org + +# Abstract + +The success of DNNs has driven the extensive applications of person re-identification (ReID) into a new era. However, whether ReID inherits the vulnerability of DNNs remains unexplored. To examine the robustness of ReID systems is rather important because the insecurity of ReID systems may cause severe losses, e.g., the criminals may use the adversarial perturbations to cheat the CCTV systems. + +In this work, we examine the insecurity of current best-performing ReID models by proposing a learning-to-mis-rank formulation to perturb the ranking of the system output. As the cross-dataset transferability is crucial in the ReID domain, we also perform a back-box attack by developing a novel multi-stage network architecture that pyramids the features of different levels to extract general and transferable features for the adversarial perturbations. Our method can control the number of malicious pixels by using differentiable multi-shot sampling. To guarantee the inconspicuousness of the attack, we also propose a new perception loss to achieve better visual quality. + +Extensive experiments on four of the largest ReID benchmarks (i.e., Market1501 [45], CUHK03 [17], DukeMTMC [33], and MSMT17 [40]) not only show the effectiveness of our method, but also provides directions of the future improvement in the robustness of ReID systems. For example, the accuracy of one of the best-performing ReID systems drops sharply from $91.8\%$ to $1.4\%$ after being attacked by our method. Some attack results are shown in Fig. 1. The code is available at https://github.com/whj363636/Adversarial-attack-on-Person-ReID-With-Deep-Mis-Ranking. + +# 1. Introduction + +The success of deep neural networks (DNNs) has benefited a wide range of computer vision tasks, such as person + +![](images/0b83cb9904e5d70ee105621027f755c3d005613a9880d25ee458d796654f30dd.jpg) +Figure 1. The rank-10 predictions of AlignedReID [36] (one of the state-of-the-art ReID models) before and after our attack on Market-1501. The green boxes represent the correctly matching images, while the red boxes represent the mismatching images. + +re-identification (ReID), a crucial task aiming at matching pedestrians across cameras. In particular, DNNs have benefited ReID in learning discriminative features and adaptive distance metrics for visual matching, which drives ReID to a new era [36,44]. Thanks to DNNs, there have been extensive applications of ReID in video surveillance or criminal identification for public safety. + +Despite the impressive gain obtained from DNNs, whether ReID inherits the vulnerability of DNNs remains unexplored. Specifically, recent works found that DNNs are vulnerable to adversarial attacks [23, 35] (An adversarial attack is to mislead a system with adversarial examples). In the past two years, the adversarial attack has achieved remarkable success in fooling DNN-based systems, e.g., image classification. Can the recent DNN-based ReID systems survive from an adversarial attack? The answer seems not promising. Empirically, evidence has shown that a person wearing bags, hats, or glasses can mislead a ReID system to output a wrong prediction [7, 11, 16, 22, 43]. These examples may be regarded as natural adversarial examples. + +To examine the robustness of ReID systems against adversarial attacks is of significant importance. Because the insecurity of ReID systems may cause severe losses, for example, in criminal tracking, the criminal may disguise themselves by placing adversarial perturbations (e.g., bags, hats, and glasses) on the most appropriate position of the + +body to cheat the video surveillance systems. By investigating the adversarial examples for the ReID systems, we can identify the vulnerability of these systems and help improve the robustness. For instance, we can identify which parts of a body are most vulnerable to the adversarial attack and require future ReID systems to pay attention to these parts. We can also improve ReID systems by using adversarial training in the future. In summary, developing adversarial attackers to attack ReID is desirable, although no work has been done before. + +As the real-world person identities are endless, and the queried person usually does not belong to any category in the database, ReID is defined as a ranking problem rather than a classification problem. But existing attack methods for image classification, segmentation, detection, and face recognition do not fit a ranking problem. Moreover, since the image domains vary at different times and in different cameras, examining the robustness of ReID models by employing a cross-dataset black-box attack should also be taken into consideration. However, existing adversarial attack methods often have poor transferability, i.e., they are often designed for a sole domain of task (e.g., Dataset A) and can not be reused to another domain (e.g., Dataset B) due to their incapacity to find general representations for attacking. Furthermore, we focus on attacks that are inconspicuous to examine the insecurity of ReID models. Existing adversarial attack methods usually have a defective visual quality that can be perceived by humans. + +To address the aforementioned issues, we design a transferable, controllable, and inconspicuous attacker to examine the insecurity of current best-performing ReID systems. We propose a learning-to-mis-rank formulation to perturb the ranking prediction of ReID models. A new mis-ranking loss function is designed to attack the ranking of the potential matches, which fits the ReID problem perfectly. Our mis-ranking based attacker is complementary to existing misclassification based attackers. Besides, as is suggested by [12], adversarial examples are features rather than bugs. Hence, to enhance the transferability of the attacker, one needs to improve the representation learning ability of the attacker to extract the general features for the adversarial perturbations. To this end, we develop a novel multi-stage network architecture for representation learning by pyramiding the features of different levels of the discriminator. This architecture shows impressive transferability in blackbox attack for the complicated ReID tasks. The transferability leads to our joint solution of both white- and blackbox attack. To make our attack inconspicuous, we improve the existing adversarial attackers in two aspects. First, the number of target pixels to be attacked is controllable in our method, due to the use of a differentiable multi-shot sampling. Generally, the adversarial attack can be considered as searching for a set of target pixels to be contaminated + +by noise. To make the search space continuous, we relax the choice of a pixel as a Gumbel softmax over all possible pixels. The number of target pixels is determined by the dynamic threshold of the softmax output and thus can be controllable. Second, a new perception loss is designed by us to improve the visual quality of the attacked images, which guarantees the inconspicuousness. + +Experiments were performed on four of the largest ReID benchmarks, i.e., Market1501 [45], CUHK03 [17], DukeMTMC [33], and MSMT17 [40]. The results show the effectiveness of our method. For example, the performance of one of the best-performing systems [44] drops sharply from $91.8\%$ to $1.4\%$ after attacked by our method. Except for showing a higher success attack rate, our method also provides interpretable attack analysis, which provides direction for improving the robustness and security of the ReID system. Some attack results are shown in Fig. 1. To summarize, our contribution is four-fold: + +- To attack ReID, we propose a learning-to-mis-rank formulation to perturb the ranking of the system output. A new mis-ranking loss function is designed to attack the ranking of the predictions, which fits the ReID problem perfectly. Our mis-ranking based adversarial attacker is complementary to the existing misclassification based attackers. +- To enhance the transferability of our attacker and perform a black-box attack, we improve the representation capacity of the attacker to extract general and transferable features for the adversarial perturbations. +- To guarantee the inconspicuousness of the attack, we propose a differentiable multi-shot sampling to control the number of malicious pixels and a new perception loss to achieve better visual quality. +- By using the above techniques, we examine the insecurity of existing ReID systems against adversarial attacks. Experimental validations on four of the largest ReID benchmarks show not only the successful attack and the visual quality but also the interpretability of our attack, which provides directions for the future improvement in the robustness of ReID systems. + +# 2. Related Work + +Person Re-identification. ReID is different from image classification tasks in the setup of training and testing data. In an image classification task, the training and test set share the same categories, while in ReID, there is no category overlap between them. Therefore, deep ranking [4] is usually in desire for ReID. However, deep ranking is sensitive to alignment. To address the (dis)alignment problem, several methods have been proposed by using structural messages [18, 36]. Recently, Zhang et al. [44] introduce the shortest path loss to supervise local parts align + +![](images/5f49015fa77ae3dbd029424d2ebbd405f2c0619a0b1fe9bacd9846d2ba4f4961.jpg) +(a) + +![](images/0aa2f69b741cc06b10f579dee27fc1ffa08d5cf35ae0d3398635af703de420ab.jpg) +(b) +Figure 2. (a) The framework of our method. Our goal is to generate some noise $\mathcal{P}$ to disturb the input images $\mathcal{I}$ . The disturbed images $\hat{\mathcal{I}}$ is able to cheat the ReID system $\mathcal{T}$ by attacking the visual similarities. (b) Specifically, the distance of each pair of samples from different categories (e.g., $(\hat{I}_c^k, I)$ , $\forall I \in \{I_{cd}\}$ ) is minimized, while the distance of each pair of the samples from the same category (e.g., $(\hat{I}_c^k, I)$ , $\forall I \in \{I_{cs}\}$ ) is maximized. The overall framework is trained by a generative adversarial network (GAN). + +ing and adopt a mutual learning approach in the metric learning setting, which has obtained the surpassing human-level performance. Besides the supervised learning mentioned above, recent advance GANs have been introduced to ReID to boost performance in some unsupervised manner [3, 47, 49, 50]. Despite their success, the security and robustness of the existing ReID system have not yet been examined. Analyzing the robustness of a ReID system to resist attacks should be raised on the agenda. + +Adversarial Attacks. Since the discovery of adversarial examples for DNNs [38], several adversarial attacks have been proposed in recent years. Goodfellow et al. [6] proposes to generate adversarial examples by using a single step based on the sign of the gradient for each pixel, which often leads to sub-optimal results and the lack of generalization capacity. Although DeepFool [28] is capable of fooling deep classifiers, it also lacks generalization capacity. Both methods fail to control the number of pixels to be attacked. To address this problem, [30] utilize the Jacobian matrix to implicitly conduct a fixed length of noise through the direction of each axis. Unfortunately, it cannot arbitrarily decide the number of target pixels to be attacked. [35] proposes to modify the single-pixel adversarial attack. However, the searching space and time grow dramatically with the increment of target pixels to be attacked. Besides the image classification, the adversarial attack is also introduced to face recognition [5, 34]. As discussed Section 1, all of the above methods do not fit the deep ranking problem. Also, their transferability is poor. Furthermore, many of them do not focus on the inconspicuousness of the visual quality. These drawbacks limit their applications in open-set tasks, e.g., ReID, which is our focus in this work. Although [1] has studied in metric analysis in person ReID, it does not provide a new adversarial attack method for ReID. It just uses the off-the-shelf methods for misclassification to examine very few ReID methods. + +# 3. Methodology + +# 3.1. Overall Framework + +The overall framework of our method is presented in Fig. 2 (a). Our goal is to use the generator $\mathcal{G}$ to produce deceptive noises $\mathcal{P}$ for each input image $\mathcal{I}$ . By adding the noises $\mathcal{P}$ to the image $\mathcal{I}$ , we obtain the adversarial example $\hat{\mathcal{I}}$ , using which we are able to cheat the ReID system $\mathcal{T}$ to output the wrong results. Specifically, the ReID system $\mathcal{T}$ may consider the matched pair of images dissimilar, while considering the mismatched pair of images similar, as shown in Fig.2 (b). The overall framework is trained by a generative adversarial network ( $GAN$ ) with a generator $\mathcal{G}$ and a novel discriminator $\mathcal{D}$ , which will be described in Section 3.3. + +# 3.2. Learning-to-Mis-Rank Formulation For ReID + +We propose a learning-to-mis-rank formulation to perturb the ranking of system output. A new mis-ranking loss function is designed to attack the ranking of the predictions, which fits the ReID problem perfectly. Our method tends to minimize the distance of the mismatched pair and maximize the distance of the matched pair simultaneously. We have: + +$$ +\begin{array}{l} \mathcal {L} _ {a d v \_ e t r i} = \sum_ {k = 1} ^ {K} \sum_ {c = 1} ^ {C _ {k}} \left[ \max _ {\substack {j \neq k \\ j = 1 \dots K \\ c _ {d} = 1 \dots C _ {j}}} \left\| \mathcal {T} \left(\hat {\mathcal {I}} _ {c} ^ {k}\right) - \mathcal {T} \left(\hat {\mathcal {I}} _ {c _ {d}} ^ {j}\right) \right\| _ {2} ^ {2} \right. \tag{1} \\ \left. - \min _ {c _ {s} = 1 \dots C _ {k}} \left\| \mathcal {T} \left(\hat {\mathcal {I}} _ {c} ^ {k}\right) - \mathcal {T} \left(\hat {\mathcal {I}} _ {c _ {s}} ^ {k}\right) \right\| _ {2} ^ {2} + \Delta \right] _ {+}, \\ \end{array} +$$ + +where $C_k$ is the number of samples drawn from the $k$ -th person ID, $\mathcal{I}_c^k$ is the $c$ -th images of the $k$ ID in a mini-batch, $c_s$ and $c_d$ are the samples from the same ID and the different IDs, $\left\| \cdot \right\|_2^2$ is the square of L2 norm used as the distance metric, and $\Delta$ is a margin threshold. Eqn.1 attacks the deep ranking in the form of triplet loss [4], where the distance of the easiest distinguished pairs of inter-ID images are encouraged to small, while the distance of the easiest distinguished pairs of intra-ID images are encouraged to large. + +Remarkably, using the mis-ranking loss has a couple of advantages. First, the mis-ranking loss fits the ReID problem perfectly. As is mentioned above, ReID is different from image classification tasks in the setup of training and testing data. In an image classification task, the training and test set share the same categories, while in ReID, there is no category overlap between them. Therefore, the mis-ranking loss is suitable for attacking ReID. Second, the mis-ranking loss not only fits the ReID problem; it may fit all the open-set problems. Therefore, the use of mis-ranking loss may also benefit the learning of general and transferable features for the attackers. In summary, our mis-ranking based adversarial attacker is perfectly complementary to the existing misclassification based attackers. + +# 3.3. Learning Transferable Features for Attacking + +As is suggested by [12], adversarial examples are features rather than bugs. Hence, to enhance the transferability of an attacker, one needs to improve the representation learning ability of the attacker to extract the general features for the adversarial perturbations. In our case, the representation learners are the generator $\mathcal{G}$ and the discriminator $\mathcal{D}$ (see Fig. 2 (a)). For the generator $\mathcal{G}$ , we use the ResNet50. For the discriminator $\mathcal{D}$ , recent adversarial defenders have utilized cross-layer information to identify adversarial examples [2, 19, 20, 26, 42]. As their rival, we develop a novel multi-stage network architecture for representation learning by pyramiding the features of different levels of the discriminator. Specifically, as shown in Fig. 3, our discriminator $\mathcal{D}$ consists of three fully convolutional sub-networks, each of which includes five convolutional, three downsampling, and several normalization layers [13, 27]. The three sub-networks receives $\{1, 1/2^2, 1/4^2\}$ areas of the original images as the input, respectively. Next, the feature maps from these sub-networks with the same size are combined into the same stage following [21]. A stage pyramid with series of downsampled results with a ratio of $\{1/32, 1/16, 1/8, 1/4\}$ of the image is thus formulated. With the feature maps from the previous stage, we upsample the spatial resolution by a factor of 2 using bilinear upsampling and attach a $1 \times 1$ convolutional layer to reduce channel dimensions. After an element-wise addition and a $3 \times 3$ convolutions, the fused maps are fed into the next stage. Lastly, the network ends with two atrous convolution layers and a $1 \times 1$ convolution to perform feature re-weighting, whose final response map $\lambda$ is then fed into downstream sampler $\mathcal{M}$ discussed in Section 3.4. Remarkably, all these three sub-networks are optimized by standard loss following [25]. + +# 3.4. Controlling the Number of the Attacked Pixels + +To make our attack inconspicuous, we improve the existing attackers in two aspects. The first aspect is to control the number of the target pixels to be attacked. Generally, an + +![](images/e871599c06947564ca144ac45bed8a3ae87202606a878f5105ca47b7922d6c61.jpg) +Figure 3. Detail of our multi-stage discriminator. + +adversarial attack is to introduce a set of noise to a set of target pixels for a given image to form an adversarial example. Both the noise and the target pixels are unknown, which will be searched by the attacker. Here, we present the formulation of our attacker in searching for the target pixels. To make the search space continuous, we relax the choice of a pixel as a Gumbel softmax over all possible pixels: + +$$ +p _ {i, j} = \frac {\exp \left(\left(l o g \left(\lambda_ {i , j} + \mathcal {N} _ {i , j}\right)\right) / \tau\right)}{\sum_ {i , j = 1} ^ {H , W} \exp \left(l o g \left(\lambda_ {i , j} + \mathcal {N} _ {i , j}\right) / \tau\right)}, \tag {2} +$$ + +where $i \in (0, H), j \in (0, W)$ denote the index of pixel in a feature map of size $H \times W$ , where $H / W$ are the height/width of the input images. The probability $p_{i,j}$ of a pixel to be chosen is parameterized by a softmax output vector $\lambda_{i,j}$ of dimension $H \times W$ . $\mathcal{N}_{i,j} = -\log(-\log(U))$ is random variable at position $(i,j)$ , which is sampled from Gumbel distribution [8] with $U \sim \text{Uniform}(0,1)$ . Note that $\tau$ is a temperature parameter to soften transition from uniform distribution to categorical distribution when $\tau$ gradually reduces to zero. Thus, the number of the target pixels to be attacked is determined by the mask $\mathcal{M}$ : + +$$ +\mathcal {M} _ {i j} = \left\{ \begin{array}{l l} \mathcal {K e e p T o p k} \left(p _ {i, j}\right), & \text {i n f o r w a r d p r o p a g a t i o n} \\ p _ {i, j}, & \text {i n b a c k w a r d p r o p a g a t i o n} \end{array} \right. \tag {3} +$$ + +where $\mathcal{K}eep\mathcal{T}opk$ is a function by which the top-k pixels with the highest probability $p_{i,j}$ are retained in $\mathcal{M}$ while the other pixels are dropped during the forward propagation. Moreover, the difference between the forward and backward propagation ensures the differentiability. By multiplying the mask $\mathcal{M}$ and the preliminary noise $\mathcal{P}'$ , we obtain the final noise $\mathcal{P}$ with controllable number of activated pixels. The usage of $\mathcal{M}$ is detailed in Fig. 2 (a). + +# 3.5. Perception Loss for Visual Quality + +In addition to controlling the number of the attacked pixels, we also focus on the visual quality to ensure the inconspicuousness of our attackers. Existing works introduce + +noises to images to cheat the machines without considering the visual quality of the images, which is inconsistent with human cognition. Motivated by MS-SSIM [39] that is able to provide a good approximation to perceive image quality for visual perception, we include an perception loss $\mathcal{L}_{VP}$ in our formulation to improve the visual quality: + +$$ +\mathcal {L} _ {V P} (\mathcal {I}, \hat {\mathcal {I}}) = [ l _ {L} (\mathcal {I}, \hat {\mathcal {I}}) ] ^ {\alpha_ {L}} \cdot \prod_ {j = 1} ^ {L} \left[ c _ {j} (\mathcal {I}, \hat {\mathcal {I}}) \right] ^ {\beta_ {j}} \left[ s _ {j} (\mathcal {I}, \hat {\mathcal {I}}) \right] ^ {\gamma_ {j}}, \tag {4} +$$ + +where $c_{j}$ and $s_j$ are the measures of the contrast comparison and the structure comparison at the $j$ -th scale respectively, which are calculated by $c_{j}(\mathcal{I},\hat{\mathcal{I}}) = \frac{2\sigma_{\mathcal{I}}\sigma_{\hat{\mathcal{I}}} + C_2}{\sigma_{\mathcal{I}}^2 + \sigma_{\hat{\mathcal{I}}}^2 + C_2}$ and $s_j(\mathcal{I},\hat{\mathcal{I}}) = \frac{\sigma_{\mathcal{I}}\hat{\mathcal{I}} + C_3}{\sigma_{\mathcal{I}}\sigma_{\hat{\mathcal{I}}} + C_3}$ , where $\sigma$ is the variance/covariance. $L$ is the level of scales, $\alpha_L$ , $\beta_j$ , and $\gamma_j$ are the factors to re-weight the contribution of each component. Thanks to $\mathcal{L}_{VP}$ , the attack with high magnitude is available without being noticed by humans. + +# 3.6. Objective Function + +Besides the mis-ranking loss $\mathcal{L}_{adv\_etri}$ , the perception loss $\mathcal{L}_{VP}$ , we have two additional losses, i.e., a misclassification loss $\mathcal{L}_{adv\_xent}$ , and a GAN loss $\mathcal{L}_{GAN}$ . + +Misclassification Loss. Existing works usually consider the least likely class as the target to optimize the cross-entropy between the output probabilities and its least likely class. However, the model may misclassify the inputs as any class except for the correct one. Inspired by [37], we propose a mechanism for relaxing the model for non-targeted attack by: + +$$ +\mathcal {L} _ {\text {a d v . x e n t}} = - \sum_ {k = 1} ^ {K} \mathcal {S} (\mathcal {T} (\hat {\mathcal {I}})) _ {k} ((1 - \delta) \mathbb {1} _ {\arg \min \mathcal {T} (\mathcal {I}) _ {k}} + \delta v _ {k}), \tag {5} +$$ + +where $S$ denotes the log-softmax function, $K$ is the total number of person IDs and $v = \left[\frac{1}{K - 1},\dots ,0,\dots ,\frac{1}{K - 1}\right]$ is smoothing regularization in which $v_{k}$ equals to $\frac{1}{K - 1}$ everywhere except when $k$ is the ground-truth ID. The term arg min in Eqn. 5 is similar to numpy.argmax which returns the indices of the minimum values of an output probability vector, indicating the least likely class. In practice, this smoothing regularization improves the training stability and the success attack rate. + +GAN Loss. For our task, the generator $\mathcal{G}$ attempts to produce deceptive noises from input images, while the discriminator D distinguishes real images from adversarial examples as much as possible. Hence, the GAN loss $\mathcal{L}_{GAN}$ is given as: + +$$ +\mathcal {L} _ {G A N} = \mathbb {E} _ {\left(I _ {c d}, I _ {c s}\right)} \left[ \log \mathcal {D} _ {1, 2, 3} \left(I _ {c d}, I _ {c s}\right) \right] + \mathbb {E} _ {\mathcal {I}} \left[ \log \left(1 - \mathcal {D} _ {1, 2, 3} (\mathcal {I}, \hat {\mathcal {I}})\right) \right], \tag {6} +$$ + +where $\mathcal{D}_{1,2,3}$ is our multi-stage discriminator shown in Fig. 3. We access to the final loss function: + +$$ +\mathcal {L} = \mathcal {L} _ {G A N} + \mathcal {L} _ {a d v. x e n t} + \zeta \mathcal {L} _ {a d v. e t r i} + \eta (1 - \mathcal {L} _ {V P}), \tag {7} +$$ + +where $\zeta$ and $\eta$ are loss weights for balance. + +# 4. Experiment + +We first present the results of attacking state-of-the-art ReID systems and then perform ablation studies on our method. Then, the generalization ability and interpretability of our method are examined by exploring black-box attacks. + +Datasets. Our method is evaluated on four of the largest ReID datasets: Market1501 [45], CUHK03 [17] DukeMTMC [33] and MSMT17 [40]. Market1501 is a fully studied dataset containing 1,501 identities and 32,688 bounding boxes. CUHK03 includes 1,467 identities and 28,192 bounding boxes. To be consistent with recent works, we follow the new training/testing protocol to perform our experiments [48]. DukeMTMC provides 16,522 bounding boxes of 702 identities for training and 17,661 for testing. MSMT17 covers 4,101 identities and 126,441 bounding boxes taken by 15 cameras in both indoor and outdoor scenes. We adopt the standard metric of mAP and rank{1,5,10,20} accuracy for evaluation. Note that in contrast to a ReID problem, lower rank accuracy and mAP indicate better success attack rate in a attack problem. + +Protocols. The details about training protocols and hyper-parameters can be seen in Appendix C. The first two subsections validate a white-box attack, i.e., the attacker has full access to training data and target models. In the third subsection, we explore a black-box attack to examine the transferability and interpretability of our method, i.e., the attacker has no access to the training data and target models. Following the standard protocols of the literature, all experiments below are performed by $L_{\infty}$ -bounded attacks with $\varepsilon = 16$ without special instruction, where $\varepsilon$ is an upper bound imposed on the amplitude of the generated noise ( $\{\| \hat{\mathcal{I}} - \mathcal{I} \|_{1,2, \text{or } \infty} \leq \epsilon \}$ ) that determines the attack intensity and the visual quality. + +# 4.1. Attacking State-of-the-Art ReID Systems + +To demonstrate the generality of our method, we divide the state-of-the-art ReID systems into three groups as follows. + +Attacking Different Backbones. We first examine the effectiveness of our method in attacking different best-performing network backbones, including ResNet-50 [9] (i.e., IDE [46]), DenseNet-121 [10], and Inception-v3 [37] (i.e., Mudeep [32]). The results are shown in Table 1 (a) & (b). We can see that the rank-1 accuracy of all backbones drop sharply approaching zero (e.g., from $89.9\%$ to $1.2\%$ for DenseNet) after it has been attacked by our method, suggesting that changing backbones cannot defend our attack. + +Attacking Part-based ReID Systems. Many best-performing ReID systems learn both local and global similarity by considering part alignment. However, they still fail to defend our attack (Table 1 (a)(b)). For example, the accuracy of one of the best-performing ReID systems (AlignedReID [44]) drops sharply from $91.8\%$ to $1.4\%$ after it has been attacked by our method. This comparison + +Table 1. Attacking the state-of-the-art ReID systems. IDE: [46]; DenseNet-121: [10]; Mudeep: [32]; AlignedReid: [44]; PCB: [36]; HACNN: [18]; LSRO: [47]; HHL: [49]; SPGAN: [3]; CamStyle+Era: [50]. We select GAP [31] and PGD [24] as the baseline attackers. +(a) Market1501 + +
MethodsRank-1Rank-5Rank-10mAP
BeforeGAPPGDOursBeforeGAPPGDOursBeforeGAPPGDOursBeforeGAPPGDOurs
BackboneIDE (ResNet-50)83.15.04.53.791.710.08.78.394.613.912.111.563.35.04.64.4
DenseNet-12189.92.71.21.296.06.71.01.397.38.51.52.173.73.71.31.3
Mudeep (Inception-V3)73.03.52.61.790.15.35.51.793.17.66.95.049.92.82.01.8
Part-AlignedAlignedReid91.810.110.21.497.018.715.83.798.123.219.15.479.19.78.92.3
PCB88.66.86.15.095.514.012.710.797.319.215.814.370.75.64.84.3
HACNN90.62.36.10.995.95.28.81.497.46.910.62.375.33.05.31.5
Data AugmentationCamStyle+Era (IDE)86.66.915.43.995.014.123.97.596.618.029.110.070.86.312.64.2
LSRO (DenseNet-121)89.95.07.20.996.110.213.12.297.412.615.23.177.25.08.11.3
HHL (IDE)82.35.05.73.692.69.89.87.395.413.512.29.764.35.45.54.1
SPGAN (IDE)84.38.810.11.594.118.616.73.196.424.520.94.366.68.08.61.6
+ +(b) CUHK03 + +
MethodsRank-1Rank-5Rank-10mAP
BeforeGAPPGDOursBeforeGAPPGDOursBeforeGAPPGDOursBeforeGAPPGDOurs
BackboneIDE (ResNet-50)24.90.90.80.443.32.01.20.751.82.92.11.524.51.30.80.9
DenseNet-12148.42.40.10.050.14.40.10.270.15.90.30.684.01.60.20.3
Mudeep (Inception-V3)32.11.10.40.153.33.71.00.564.15.61.50.830.12.00.80.3
Part-AlignedAlignedReid61.52.11.41.479.44.62.23.785.56.24.15.459.63.42.12.1
PCB50.60.90.50.271.44.52.11.378.75.84.51.848.61.41.20.8
HACNN48.00.90.40.169.02.40.90.378.13.41.30.447.61.80.80.4
+ +(c) DukeMTMC + +
MethodsRank-1Rank-5Rank-10mAP
BeforeGAPPGDOursBeforeGAPPGDOursBeforeGAPPGDOursBeforeGAPPGDOurs
Data augmentationCamStyle+Era (IDE)76.53.322.91.286.87.034.12.690.09.639.93.458.13.516.81.5
LSRO (DenseNet-121)72.01.37.20.785.72.912.51.689.54.018.42.255.21.48.10.9
HHL (IDE)71.41.89.51.083.53.415.62.087.74.219.02.551.81.97.41.3
SPGAN (IDE)73.65.312.40.185.210.321.10.588.913.426.30.654.64.710.20.3
+ +proves that the testing tricks, e.g., extra local features ensemble in AlignedReID [44] and flipped image ensembling in PCB [36], are unable to resist our attack. + +Attacking Augmented ReID Systems. Many state-of-the-art ReID systems use the trick of data augmentation. Next, we examine the effectiveness of our model in attacking these augmentation-based systems. Rather than conventional data augmentation trick (e.g., random cropping, flipping, and 2D-translation), we examine four new augmentation tricks using GAN to increase the training data. The evaluation is conducted on Market1501 and DukeMTMC. The results in Table 1 (a)(c) show that although GAN data augmentations improve the ReID accuracy, they cannot defend our attack. In contrast, we have even observed that better ReID accuracy may lead to worse robustness. + +Discussion. We have three remarks for rethinking the robustness of ReID systems for future improvement. First, there is no effective way so far to defend against our attacks, e.g., after our attack, all rank-1 accuracies drop below $3.9\%$ . Second, the robustness of Mudeep [32] and PCB [36] are strongest. Intuitively, Mudeep may benefit from its nonlinear and large receptive field. For PCB, reprocessing the query images and hiding the network architecture during evaluation may improve the robustness. Third, HACNN [18] has the lowest rank-1 to rank-20 accuracy after the attack, suggesting that attention mechanism may be harmful to the defensibility. The returns from the target ReID system before and after the adversarial attack are provided in Appendix A. + +# 4.2. Ablation Study + +We conduct comprehensive studies to validate the effectiveness of each component of our method. AlignedReID [44] is used as our target model in the rest of the paper for its + +remarkable results in ReID domain. + +Different Losses. We report the rank-1 accuracy of four different losses to validate the effectiveness of our loss. The results are shown in Table 2 (a), where the four rows represent (A) the conventional misclassification loss, (B) our misclassification, (C) our mis-ranking loss, and (D) our misclassification + our mis-ranking loss, respectively. Actually, we observe that conventional misclassification loss A is incompatible with the perception loss, leading to poor attack performance $(28.5\%)$ . In contrast, our visual misranking loss D achieves very appealing attack performance $(1.4\%)$ . We also observe that our misclassification loss B and our visual mis-ranking loss C benefit each other. Specifically, by combining these two losses, we obtain Loss D, which outperforms all the other losses. + +Multi-stage vs. Common Discriminator. To validate the effectiveness of our multi-stage discriminator, we compare the following settings: (A) using our multi-stage discriminator and (B) using a commonly used discriminator. Specifically, we replace our multi-stage discriminator with PatchGAN [14]. Table 2 (c) shows a significant degradation of attack performance after changing the discriminator, demonstrating the superiority of our multi-stage discriminator to capture more details for a better attack. + +Using MS-SSIM. To demonstrate the superiority of MS-SSIM, we visualize the adversarial examples under different perception supervisions in Fig. 4. We can see that at the same magnitude, the adversarial example generated under the supervision of MS-SSIM are much better than those generated under the supervision of SSIM and without any supervision. This comparison verifies that MS-SSIM is critical to reserve the raw appearance. + +Comparisons of Different $\epsilon$ . Although using perception loss has great improvement for visual quality with large $\epsilon$ , + +Table 2. Ablations. We present six major ablation experiments in this table. R-1,R-5,& R-10: Rank-1, Rank-5, & Rank-10. + +
R-1R-5R-10mAP
(A) cent28.543.951.423.8
(B) xent13.722.528.712.5
(C) etri4.59.112.55.1
(D) xent+etri1.43.75.42.3
+ +(a) Different Objectives: The modified xent loss outperforms the cent loss, but both of them are unstable. Our loss brings more stable and higher fooling rate than misclassification. + +
R-1R-5R-10mAP
ε=400.00.20.60.2
ε=200.10.40.80.4
ε=161.43.75.42.3
ε=1024.438.546.621.0
+ +(b) Comparisons of different $\epsilon$ : Results on the variants of our model using different $\epsilon$ . Our proposed method achieves good results even when $\epsilon = 10$ . + +
R-1R-5R-10mAP
PatchGAN (ε=40)48.365.873.137.7
Ours (ε=40)0.00.20.60.2
PatchGAN (ε=10)53.369.275.643.2
Ours (ε=10)24.438.546.621.0
+ +(c) Multi-stage vs. Common discriminator: Multi-stage technique improves results under both large and small $\epsilon$ for utilizing the information from previous layers. + +
R-1R-5R-10mAP
Market→CUHK4.99.212.16.0
CUHK→Market34.351.658.628.2
Market→Duke17.726.732.614.2
Market→MSMT35.149.455.827.0
+ +(d) Crossing Dataset. $\mathbf{Market}\rightarrow \mathbf{CUHK}$ : noises learned from Market1501 mislead inferring on CUHK03. All experiments are based on Aligned-ReID model. + +
R-1R-5R-10mAP
→PCB31.746.153.222.9
→HACNN14.824.429.813.4
→LSRO17.028.935.114.8
+ +(e) Crossing Model. $\rightarrow$ PCB: noises learned from AlignedReID attack pretrained PCB model. All experiments are performed on Market1501. + +
R-1R-5R-10mAP
→PCB(C)6.912.918.98.2
→HACNN(C)3.67.19.24.6
→LSRO(D)19.430.234.715.2
→Mudeep(C)*19.427.734.916.2
+ +(f) Crossing Dataset & Model. $\rightarrow$ PCB(C): noises learned from AlignedReID pretrained on Market-1501 are borrowed to attack PCB model inferred on CUHK03. * denotes 4k-pixel attack. + +Table 3. Proportion of adversarial points. † denotes the results with appropriate relaxation. + +
R-1R-5R-10mAP
Full size1.43.75.42.3
Ratio=1/239.355.062.431.5
Ratio=1/472.785.989.758.3
Ratio=1/4†0.31.52.70.7
Ratio=1/8†0.61.83.01.1
Ratio=1/16†8.214.717.86.9
Ratio=1/32†59.476.582.247.3
Ratio=1/64†75.587.691.661.5
+ +Table 4. Effectiveness of our multi-shot sampling. + +
(A) random location(B) our learned location
R-1mAPR-1mAP
Gaussian noise81.968.179.465.3
Uniform noise51.140.150.739.2
Ours--39.730.7
+ +we also provide baseline models with smaller $\epsilon$ for full studies. We manually control $\epsilon$ by considering it as a hyperparameter. The comparisons of different $\epsilon$ are reported in Table 2 (b). Our method has achieved good results, even when $\epsilon = 15$ . The visualization of several adversarial examples with different $\epsilon$ can be seen in Appendix D. + +Number of the Pixels to be Attacked. Let $H$ and $W$ denote the height and the width of the image. We control the number of the pixels to be attacked in the range of $\{1, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64\} \times HW$ respectively by using Eqn. 3. We have two major observations from Table 3. First, the attack is definitely successful when the number of the pixels to be attacked $> \frac{HW}{2}$ . This indicates that we can fully attack the ReID system by using a noise number of only $\frac{HW}{2}$ . Second, when the number of pixels to be attacked $< \frac{HW}{2}$ , the success attack rate drops significantly. To compensate for the decrease in noise number, we propose to enhance the noise magnitude without significantly affecting the perception. In this way, the least number of pixels to be attacked is reduced to $\frac{HW}{32}$ , indicating that the number and the magnitude of the noise are both important. + +Effectiveness of Our Multi-shot Sampling. To justify the effectiveness of our learned noise in attacking ReID, we compare them with random noise under the restriction of + +$\varepsilon = 40$ in two aspects in Table 4. (A) Random noise is imposed on random locations of an image. The results suggest that rand noise is inferior to our learned noise. (B) Random noise is imposed on our learned location of an image. Interestingly, although (B) has worse attack performance than our learned noise, (B) outperforms (A). This indicates our method successfully finds the sensitive location to attack. + +Interpretability of Our Attack. After the analysis of the superiority of our learned noise, we further visualize the noise layout to explore the interpretability of our attack in ReID. Unfortunately, a single image cannot provide intuitive information (see Appendix B). We statistically display query images and masks when noise number equals to $\frac{HW}{8}$ in Fig. 5 for further analysis. We can observe from Fig. 5 (b) that the network has a tendency to attack the top half of the average image, which corresponds to the upper body of a person in Fig. 5(a). This implies that the network is able to sketch out the dominant region of the image for ReID. For future improvement of the robustness of ReID systems, attention should be paid to this dominant region. + +# 4.3. Black-Box Attack + +Different from the above white-box attack, a black-box attack denotes that the attacker has no access to the training data and target models, which is very challenging. + +Cross-dataset attack. Cross-dataset denotes that the attacker is learned on a known dataset, but is reused to attack a model that is trained on an unknown dataset. Table 2 (d) shows the success of our cross-dataset attack in AlignedReID [44]. We also observe that the success rate of the cross-dataset attack is almost as good as the naive white-box attack. Moreover, MSMT17 is a dataset that simulates the real scenarios by covering multi-scene and multi-time. Therefore, the successful attack on MSMT17 proves that our method is able to attack ReID systems in the real scene without knowing the information of real-scene data. + +Cross-model attack. Cross-model attack denotes that + +![](images/485663789f1776cb25f23fd31238f32763a20376015de803d0dd4de4edc50786.jpg) +(a) Original + +![](images/3f2e2c111792d7cebbfd8076b276f02d8b49d455fea54c54f0d610ee7dce0ff3.jpg) +(b) Without supervision + +![](images/d45bc703590211d1cf0f8c5175b85cedef71dd532e0c518db8eb5726169b0f4c.jpg) +Table 5. Accuracy after non-targeted white-box attacks on CIFAR10. Original: the accuracy on clean images. DeepFool: [28]; NewtonFool: [15]; NewtonFool: [15]; CW: [2]; GAP: [41]; + +![](images/7c485a9d5f26749436acf744f2c7aaece14adb1536dd5d3d72171aa88f126d45.jpg) +(c) SSIM +(d) MS-SSIM +Figure 4. Visual comparison of using different supervisions. + +the attacker is learned by attacking a known model, but is reused to attack an unknown model. Experiments on Market1501 show that existing ReID systems are also fooled by our cross-model attacked (Table 2 (e)). It is worth to mention that PCB seems to be more robust than others, indicating that hiding the testing protocol benefits the robustness. + +Cross-dataset-cross-model attack. We further examine the most challenging setting, i.e., our attacker has no access to both the training data and the model. The datasets and models are randomly chosen in Table 2 (f). Surprisingly, we have observed that our method has successfully fooled all the ReID systems, even in such an extreme condition. Note that Mudeep has been attacked by only 4,000 pixels. + +Discussion. We have the following remarks for future improvement in ReID. First, although the bias of data distributions in different ReID datasets reduces the accuracy of a ReID system, it is not the cause of security vulnerability, as is proved by the success of cross-dataset attack above. Second, the success of cross-model attack implies that the flaws of networks should be the cause of security vulnerability. Third, the success of a cross-dataset-cross-model attack drives us to rethink the vulnerability of existing ReID systems. Even we have no prior knowledge of a target system; we can use the public available ReID model and datasets to learn an attacker, using which we can perform the cross-dataset-cross-model attack in the target systems. Actually, we have fooled a real-world system (see Appendix D). + +# 4.4. Comparison with Existing Attackers + +To show the generalization capability of our method, we perform an additional experiment on image classification using CIFAR10. We compare our method with four ad + +![](images/88eae690db227c20a1de9e1f7b4ea07b1835d8a599986432681676212beeec8c.jpg) +(a) Average image +Figure 5. Left: The average image of all queries on Market1501. Right: The frequency of adversarial points appears at different positions among Market1501 when ratio $= 1/8$ . The higher the color temperature is, the frequently the position tends to be selected. + +![](images/a1c07c26b0ddafa2dded555e20715e23a4240f84088b0c4b36e8b843b2b2cda1.jpg) +(b) Position statistics + +
MethodAccuracy (%)
Original90.55
DeepFoolε = 858.22ε = 258.59
NewtonFool69.7969.32
CW52.2753.44
GAP51.2651.8
Ours47.3150.3
+ +vanced white-box attack methods in adversarial examples community, including DeepFool [28], NewtonFool [15], CW [2], and GAP [41]. We employ adversarially trained ResNet32 as our target model and fix $\varepsilon = 8$ . Other hyperparameters are configured using default settings the same as [29]. For each attack method, we list the accuracy of the resulting network on the full CIFAR10 val set. The results in Table 5 imply that our proposed algorithm is also effective in obfuscating the classification system. Note that changing $\varepsilon$ to other numbers (e.g., $\varepsilon = 2$ ) does not reduce the superiority of our method over the competitors. + +# 5. Conclusion + +We examine the insecurity of current ReID systems by proposing a learning-to-mis-rank formulation to perturb the ranking of the system output. Our mis-ranking based attacker is complementary to the existing misclassification based attackers. We also develop a multi-stage network architecture to extract general and transferable features for the adversarial perturbations, allowing our attacker to perform a black-box attack. We focus on the inconspicuousness of our attacker by controlling the number of attacked pixels and keeping the visual quality. The experiments not only show the effectiveness of our method but also provides directions for the future improvement in the robustness of ReID. + +# Acknowledgement + +This work was supported in part by the State Key Development Program (No. 2018YFC0830103), in part by NSFC (No.61876224,U1811463,61622214,61836012,61906049), and by GD-NSF (No.2017A030312006,2020A1515010423). + +# References + +[1] Song Bai, Yingwei Li, Yuyin Zhou, Qizhu Li, and Philip H. S. Torr. Metric attack and defense for person re-identification, 2019. 3 +[2] Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In S&P, pages 39-57. IEEE, 2017. 4, 8 +[3] Weijian Deng, Liang Zheng, Qixiang Ye, Guoliang Kang, Yi Yang, and Jianbin Jiao. Image-image domain adaptation with preserved self-similarity and domain-dissimilarity for person reidentification. In CVPR, 2018. 3, 6 +[4] Shengyong Ding, Liang Lin, Guangrun Wang, and Hongyang Chao. Deep feature learning with relative distance comparison for person re-identification. PR, 48(10):2993-3003, 2015. 2, 3 +[5] Yinpeng Dong, Hang Su, Baoyuan Wu, Zhifeng Li, Wei Liu, Tong Zhang, and Jun Zhu. Efficient decision-based blackbox adversarial attacks on face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 7714-7722, 2019. 3 +[6] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. CoRR, abs/1412.6572, 2014. 3 +[7] Mengran Gou, Xikang Zhang, Angels Rates-Borras, Sadjad Asghari-Esfeden, Octavia I. Camps, and Mario Sznaier. Person re-identification in appearance impaired scenarios. In Proceedings of the British Machine Vision Conference 2016, BMVC 2016, York, UK, September 19-22, 2016, 2016. 1 +[8] Emil Julius Gumbel. Statistical theory of extreme values and some practical applications: a series of lectures. US Govt. Print. Office, 1954. 4 +[9] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 5 +[10] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, 2017. 5, 6 +[11] Yan Huang, Qiang Wu, Jingsong Xu, and Yi Zhong. Celebrities-reid: A benchmark for clothes variation in long-term person re-identification. In International Joint Conference on Neural Networks, IJCNN 2019 Budapest, Hungary, July 14-19, 2019, pages 1-8, 2019. 1 +[12] Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Logan Engstrom, Brandon Tran, and Aleksander Madry. Adversarial examples are not bugs, they are features. NeurIPS, 2019. 2, 4 +[13] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pages 448-456, 2015. 4 +[14] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, pages 1125-1134, 2017. 6 +[15] Uyeong Jang, Xi Wu, and Somesh Jha. Objective metrics and gradient descent algorithms for adversarial examples in machine learning. In ACSAC, pages 262-277. ACM, 2017. 8 + +[16] Annan Li, Luoqi Liu, Kang Wang, Si Liu, and Shuicheng Yan. Clothing attributes assisted person reidentification. IEEE Trans. Circuits Syst. Video Techn., 25(5):869-878, 2015. 1 +[17] Wei Li, Rui Zhao, Tong Xiao, and Xiaogang Wang. Deepreid: Deep filter pairing neural network for person re-identification. In CVPR, pages 152–159, 2014. 1, 2, 5 +[18] Wei Li, Xiatian Zhu, and Shaogang Gong. Harmonious attention network for person re-identification. In CVPR, pages 2285–2294, 2018. 2, 6 +[19] Xin Li and Fuxin Li. Adversarial examples detection in deep networks with convolutional filter statistics. In ICCV, pages 5764-5772, 2017. 4 +[20] Fangzhou Liao, Ming Liang, Yinpeng Dong, Tianyu Pang, Xiaolin Hu, and Jun Zhu. Defense against adversarial attacks using high-level representation guided denoiser. In CVPR, pages 1778-1787, 2018. 4 +[21] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, pages 2117-2125, 2017. 4 +[22] Yutian Lin, Liang Zheng, Zhedong Zheng, Yu Wu, Zhilan Hu, Chenggang Yan, and Yi Yang. Improving person re-identification by attribute and identity learning. Pattern Recognit., 95:151-161, 2019. 1 +[23] Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. In ICLR, 2017. 1 +[24] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings, 2018. 6 +[25] Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In ICCV, pages 2794–2802, 2017. 4 +[26] Jan Hendrik Metzen, Tim Genewein, Volker Fischer, and Bastian Bischoff. On detecting adversarial perturbations. In ICLR, 2017. 4 +[27] Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative adversarial networks. In ICLR, 2018. 4 +[28] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In CVPR, pages 2574–2582, 2016. 3, 8 +[29] Maria-Irina Nicolae, Mathieu Sinn, Minh Ngoc Tran, Beat Buesser, Ambrish Rawat, Martin Wistuba, Valentina Zantedeschi, Nathalie Baracaldo, Bryant Chen, Heiko Ludwig, Ian Molloy, and Ben Edwards. Adversarial robustness toolbox v0.6.0. CoRR, 2018. 8 +[30] Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In EuroS&P, pages 372-387. IEEE, 2016. 3 + +[31] Omid Poursaeed, Isay Katsman, Bicheng Gao, and Serge Belongie. Generative adversarial perturbations. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 6 +[32] Xuelin Qian, Yanwei Fu, Yu-Gang Jiang, Tao Xiang, and Xiangyang Xue. Multi-scale deep learning architectures for person re-identification. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 5409-5418, 2017. 5, 6 +[33] Ergys Ristani, Francesco Solera, Roger Zou, Rita Cucchiara, and Carlo Tomasi. Performance measures and a data set for multi-target, multi-camera tracking. In ECCV, pages 17-35. Springer, 2016. 1, 2, 5 +[34] Mahmood Sharif, Sruti Bhagavatula, Lujo Bauer, and Michael K. Reiter. Accessorize to a crime: Real and stealthy attacks on state-of-the-art face recognition. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, October 24-28, 2016, pages 1528-1540, 2016. 3 +[35] Jiawei Su, Danilo Vasconcellos Vargas, and Kouichi Sakurai. One pixel attack for fooling deep neural networks. TEVC, 2019. 1, 3 +[36] Yifan Sun, Liang Zheng, Yi Yang, Qi Tian, and Shengjin Wang. Beyond part models: Person retrieval with refined part pooling (and a strong convolutional baseline). In ECCV, pages 480-496, 2018. 1, 2, 6 +[37] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In CVPR, pages 2818-2826, 2016. 5 +[38] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014. 3 +[39] Zhou Wang, Eero P Simoncelli, Alan C Bovik, et al. Multiscale structural similarity for image quality assessment. In ACSSC, volume 2, pages 1398-1402. IEEE, 2003. 5 +[40] Longhui Wei, Shiliang Zhang, Wen Gao, and Qi Tian. Person transfer gan to bridge domain gap for person re-identification. In CVPR, pages 79–88, 2018. 1, 2, 5 +[41] Chaowei Xiao, Bo Li, Jun-Yan Zhu, Warren He, Mingyan Liu, and Dawn Song. Generating adversarial examples with adversarial networks. In IJCAI, pages 3905-3911, 2018. 8 +[42] Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan L Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In CVPR, pages 501-509, 2019. 4 +[43] Jia Xue, Zibo Meng, Karthik Katipally, Haibo Wang, and Kees van Zon. Clothing change aware person identification. In 2018 IEEE Conference on Computer Vision and Pattern Recognition Workshops, CVPR Workshops 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 2112-2120, 2018. 1 +[44] Xuan Zhang, Hao Luo, Xing Fan, Weilai Xiang, Yixiao Sun, Qiqi Xiao, Wei Jiang, Chi Zhang, and Jian Sun. Aligndread: Surpassing human-level performance in person re-identification. CoRR, 2017. 1, 2, 5, 6, 7 +[45] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In ICCV, pages 1116–1124, 2015. 1, 2, 5 + +[46] Liang Zheng, Yi Yang, and Alexander G. Hauptmann. Person re-identification: Past, present and future. CoRR, 2016. 5, 6 +[47] Zhedong Zheng, Liang Zheng, and Yi Yang. Unlabeled samples generated by gan improve the person re-identification baseline in vitro. In ICCV, pages 3754–3762, 2017. 3, 6 +[48] Zhun Zhong, Liang Zheng, Donglin Cao, and Shaozi Li. Re-ranking person re-identification with k-reciprocal encoding. In CVPR, pages 1318–1327, 2017. 5 +[49] Zhun Zhong, Liang Zheng, Shaozi Li, and Yi Yang. Generalizing a person retrieval model hetero-and homogeneously. In ECCV, pages 172-188, 2018. 3, 6 +[50] Zhun Zhong, Liang Zheng, Zhedong Zheng, Shaozi Li, and Yi Yang. Camera style adaptation for person re-identification. In CVPR, pages 5157–5166, 2018. 3, 6 \ No newline at end of file diff --git a/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/images.zip b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b480709dbec6b5b9c53851a0d4f62d61990e4a56 --- /dev/null +++ b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:442026f3833ac77aed329a0f5eff3c3bfb6b6e2653fa4c9a9c8f767858de3dd9 +size 512531 diff --git a/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/layout.json b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..38edbbbc26308ef76525f48e6a97df84c950c7ba --- /dev/null +++ b/transferablecontrollableandinconspicuousadversarialattacksonpersonreidentificationwithdeepmisranking/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ca21ddbdfd02b01d4d5ffd5565691803340716967b3c99c154d833bdc39dbc3 +size 461934 diff --git a/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/895e41ae-8939-4e80-985b-e89d876db16f_content_list.json b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/895e41ae-8939-4e80-985b-e89d876db16f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a736cf25a656bec9809a1de6ac17189ecabeb611 --- /dev/null +++ b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/895e41ae-8939-4e80-985b-e89d876db16f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67fda99bd079403fe36a34f71bcadf3a1a5c7b1732c2ef5fec6c6240712ec0e0 +size 82437 diff --git a/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/895e41ae-8939-4e80-985b-e89d876db16f_model.json b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/895e41ae-8939-4e80-985b-e89d876db16f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..749e834dfc743a4d0304ae3b43253029cbc2a509 --- /dev/null +++ b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/895e41ae-8939-4e80-985b-e89d876db16f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4f993323a3b3b8dd3af2fbd7606ba09aeb4b960903a2a46bbdb46f54cb7e689 +size 106565 diff --git a/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/895e41ae-8939-4e80-985b-e89d876db16f_origin.pdf b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/895e41ae-8939-4e80-985b-e89d876db16f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e3406deba04125c5bad6b1beeaf124f2d9dfc935 --- /dev/null +++ b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/895e41ae-8939-4e80-985b-e89d876db16f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2b7caec214b71e794a53facb9ff54c3f34ce5a07893c212ede79fc604f4f852 +size 1058968 diff --git a/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/full.md b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0cf22092e35b27e0c5ebf4a1f20fe387be81cfbc --- /dev/null +++ b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/full.md @@ -0,0 +1,351 @@ +# Transfer Learning from Synthetic to Real-Noise Denoising with Adaptive Instance Normalization + +Yoonsik Kim + +Jae Woong Soh + +Gu Yong Park + +Nam Ik Cho + +Departmet of ECE, INMC, Seoul National University, Seoul Korea + +{terryoo, soh90815, benkay}@ispl.snu.ac.kr, nicho@snu.ac.kr + +# Abstract + +Real-noise denoising is a challenging task because the statistics of real-noise do not follow the normal distribution, and they are also spatially and temporally changing. In order to cope with various and complex real-noise, we propose a well-generalized denoising architecture and a transfer learning scheme. Specifically, we adopt an adaptive instance normalization to build a denoiser, which can regularize the feature map and prevent the network from overfitting to the training set. We also introduce a transfer learning scheme that transfers knowledge learned from synthetic-noise data to the real-noise denoiser. From the proposed transfer learning, the synthetic-noise denoiser can learn general features from various synthetic-noise data, and the real-noise denoiser can learn the real-noise characteristics from real data. From the experiments, we find that the proposed denoising method has great generalization ability, such that our network trained with synthetic-noise achieves the best performance for Darmstadt Noise Dataset (DND) among the methods from published papers. We can also see that the proposed transfer learning scheme robustly works for real-noise images through the learning with a very small number of labeled data. + +# 1. Introduction + +Image restoration tasks [18, 29, 31, 30, 57, 48, 27, 36] have achieved noticeable improvement with the development of convolutional neural network (CNN). Although most of image restoration methods work well on synthetically degraded images [24, 58, 9, 25], they show insufficient performance on the real degradations. + +Regarding the denoising methods, the networks trained with synthetic-noise (SN) do not work well for the realworld images because of the discrepancy in the distribution of SN and real-noise (RN). Specifically, CNNs [54, 55, 56] trained with Gaussian noise do not work well for the real- + +world images, because the CNNs are overfitted to the Gaussian distribution. The problem of overfitting can also be seen from a toy regression example in Fig. 1. As shown in Fig. 1(a), the severely overfitted regression method ('w/o Regularizer') shows worse performance than a regularized method ('w/ Regularizer') on the synthetic test data. Moreover, it can be seen in Fig. 1(b) that the generalization ability is much worse when the training and test domains are different. + +To better address the problem due to the different data distribution between training and test sets, two kinds of approaches have been developed: (1) obtaining the pairs of RN image and corresponding near-noise-free image [38, 42, 5, 2, 49], and (2) finding more realistic noise model [20, 7]. + +The RN datasets enable the quantitative comparison of denoising performance on real-world images and also provide the training sets for learning-based methods. The CNNs trained with RN datasets robustly work on the real-world images, because domains of training and test set almost coincide. However, acquiring the pairs of RN images needs specialized knowledge, and the amount of provided datasets would not be enough for training a deeper CNN [52, 50]. Furthermore, learning-based methods can be easily overfitted to a specific camera device (dataset), which cannot cover all the devices that have different characteristics such as gamma correction, color correction, and other in-camera pipelines. + +For a finding more realistic noise model, CBDNet [20] synthesized near-RN images by considering realistic noise models and simulating the in-camera pipeline. It generates enough dataset that simulates more than 200 camera response functions. The CBDNet shows excellent performance on RN images even though the CNN is trained with the SN. Furthermore, they showed that additional training with RN dataset improves performance. Although realistic noise modeling indeed reduces the domain discrepancy between SN and RN, there still remains a domain discrepancy to be handled. Moreover, CNN can be overfitted to a certain + +![](images/32471bc11df1a63c77714545bfc5910d34e89d75964eed198ef10dc5817b6b7f.jpg) +(a) Synthetic Data + +![](images/d1e686fcb756308ee2590c230c7b0930f92e2227a238dcaf8720fd14c30f0c45.jpg) +(b) Real Data + +![](images/13e16d04210979aa014023526ae7a7834b6effe0e389de1777bc4c1c37cd5a14.jpg) +(c) Transfer Learning +Figure 1: A toy regression example presenting the effects of regularization and transfer learning. (a) We assume that training and test data are sampled from a 5th order polynomial, with additive white Gaussian noise (AWGN). The original regression model (without regularizer) is denoted as w/o Regularizer, which is a 10th order polynomial model. As well know, the higher-order model overfits the data. Assuming that a regularization method successfully degenerates the model to a 6th order one (w/ Regularizer), then overfitting is relieved. It can be seen from mean squared error (MSE) on synthetic test data that the regularization can enhance the performance when training and test distributions are the same. (b) We assume another 5th-order polynomial that generates a real data that has some domain difference from the synthetic one. It can be seen from the MSE on real test data that the regularization is essential for processing other distributions. (c) Transfer learning regression method w/ Regularizer + TF is fine-tuned with few real data samples from w/ Regularizer. It can be seen from the MSE on real test data that transfer learning can be trained efficiently with few real training samples. + +noise model that is actually not a 'real' noise. + +From these observations, we propose a novel denoiser that is well generalized to the various RN from camera devices by employing an adaptive instance normalization (AIN) [46, 22, 32, 41]. In recent CNN based methods for restoring the synthetic degradations [33, 58, 25], regularization methods have not been exploited due to the small performance gain (even degrading performance). This indicates that a CNN is overfitted to the training data to get the best performance when domains of training and test set coincide [16]. + +On the other hand, the denoiser trained with SN needs regularization, for applying it to the RN denoising. As shown in the example of Fig. 1 (a) and (b) with 'w/Regularizer', the network needs to be generalized through the regularization. In this respect, we propose a well-regularized denoiser by adopting the AIN as a regularization method. Specifically, the affine transform parameters for the normalization of features are generated from the pixel-wise noise level. Then, the transform parameters adaptively scale and shift the feature maps according to the noise characteristics, which results in the generalization of the CNN. + +Furthermore, we propose a transfer learning scheme from SN to RN denoising network to reduce the domain discrepancy between the synthetic and the real. As mentioned above, the RN dataset would not be sufficient to train a CNN, which can also be easily overfitted to a certain RN dataset. Hence, we devise a transfer learning scheme that learns the general and invariant information of denoising from the SN domain and then transfer-learns the domain + +specific information from the information of RN. As can be seen in Fig. 1(c), we believe that the SN denoiser can be adapted to an RN denoiser by re-transforming normalized features. Specifically, the parameters of AIN are updated using the RN dataset. The proposed scheme based on transfer learning can be applied to any dataset that has a small number of labeled data. That is, a CNN trained with the SN is easily transferred to work for the RN removal, without the need for training the whole network with the RN. + +The contribution of this work can be summarized as follows: + +- We propose a novel well-generalized denoiser based on the AIN, which enables the CNN to work for various noise from many camera devices. +- We introduce a transfer learning for the denoising scheme, which learns the domain-invariant information from SN data and updates affine transform parameters of AIN for the different-domain data. +- The proposed method achieves state-of-the-art performance on the SN and RN images. + +# 2. Related Works + +The statistics of RN in standard RGB (sRGB) images depend on the properties of camera sensors and in-camera pipelines. Specifically, shot noise and readout noise are generated from the sensor, and the statistics of generated noise are changed according to the in-camera pipeline such + +![](images/e56fb8392f004c1855c8e4ae093b983e4e8f3ff5fa609ffdc25c6c2b97b2dacf.jpg) +Figure 2: Illustration of the proposed denoiser. The noise level estimator and reconstruction network are U-Net based architecture, so the feature maps are down/up-sampled by average-pool/transposed convolution. We denote each scale of feature map as $1 / s$ where $s$ can be 1, 2, and 4. All the represented convolutions in reconstruction network are $3 \times 3$ kernel having $64s$ feature maps excluding last convolution. Feature representation of noise level estimator is also composed of $3 \times 3$ convolutions with 32 channels and noise level maps are achieved from $3 \times 3$ convolutions having 3 channel outputs. The amount of overall parameters is $13.7\mathrm{M}$ . + +as demosaicing, gamma correction, in-camera denoiser, white balancing, color correction, etc [39]. There have been several works to approximate the RN model, including Gaussian-Poisson [17, 34], heteroscedastic Gaussian [21], Gaussian Mixture Model (GMM) [59], and deep leaning based methods [11, 1]. Considering the camera pipeline, CBDNet [20] and Unprocessing [7] also considered realistic noise models. Specifically, they obtained near-RN images by adding the heteroscedastic Gaussian noise to the pseudo-raw images and feeding them to the camera pipeline. These methods can simulate more than 200 camera response functions, and thus generate noisy images having different characteristics. Moreover, CBDNet is alternately trained with the RN and SN to overcome overfitting to the noise model. We think the alternate training scheme would incur training instability due to different data distributions, and also cannot train quite different RN effectively. Thus, we introduce a new transfer learning scheme that can simply but effectively adapt SN denoiser to other RN ones by re-transforming the normalized feature map. + +# 3. Proposed + +We aim to train a robust RN denoiser, which reduces the discrepancy between the distributions of training and test sets, by proposing a novel denoiser and transfer learning. Precisely, we propose denoising architecture using the AIN, which can be well generalized to RN images. Also, we introduce a transfer learning scheme to reduce the remaining data discrepancy, which consists of two stages: (1) training a denoiser with SN dataset $\mathcal{S} = \{X_s,Y_s\}$ and (2) transfer learning with RN dataset $\mathcal{T} = \{X_r,Y_r\}$ , where $X$ and + +$Y$ are noise-free images and noisy images respectively, and the subscript $s$ is for SN and $r$ for RN. We use the noise model from CBDNet for generating $Y_{s}$ from $X_{s}$ with the noise level of $\sigma (\mathbf{y}_s)$ where $\mathbf{y}_s\in Y_s$ denotes SN image. After training SN denoiser with $S$ , RN denoiser is trained with $\mathcal{T}$ (pairs of RN image $\mathbf{y}_r\in Y_r$ and near noise-free image $\mathbf{x}_r\in X_r$ ). In the transfer learning stage, domain-specific parameters are only updated to effectively preserve learned knowledge from SN data. + +# 3.1. Adaptive Instance Normalization Denoising Network + +We present a novel AIN denoising network (AINDNet), where the same architecture is employed both for SN and RN denoiser. We compose AINDNet with a noise level estimator and a reconstruction network, which is presented in Fig. 2. The noise level estimator takes a noisy image $\mathbf{y}$ as an input and generates the estimated noise level map $\hat{\sigma} (\mathbf{y}) = F_{est}(\mathbf{y};\theta_{est})$ where $\theta_{est}$ denotes a training parameter of estimator. The reconstruction network takes $\hat{\sigma} (\mathbf{y})$ and $\mathbf{y}$ as input and generates denoised image $\hat{\mathbf{x}} = F_{rec}(\mathbf{y},\hat{\sigma} (\mathbf{y});\theta_{rec})$ where $\theta_{rec}$ denotes a training parameter of reconstruction network. The reconstruction network is U-Net based architecture with AIN Residual blocks (AIN-ResBlocks). + +Noise Level Estimator Estimating the noise level would not be an easy task due to the complex noise model and in-camera pipeline. In our experiment, we find that previous simple noise level estimator [20], which consist of five convolutions, could not accurately estimate the noise level. The main reason is that the previous estimator has a + +![](images/d744c6dcc73d4856532d6af1c0c99190dec627faa77dba9ce4ea7eeb58179008.jpg) +Figure 3: Illustration of the proposed AIN-ResBlock with corresponding kernel size $(k)$ , feature scale $(s)$ , and number of features $(n)$ . Note that $n$ is linearly increasing according to $s$ . Leaky ReLU is employed for an activation function. The Norm (red) block denotes channel-wise spatial normalization block. Average-pool scales the size of $\hat{\sigma}(\mathbf{y})$ to be the same as that of $h$ . + +small receptive field so that it could not fully capture complex noise information. From this observation, we design a new noise level estimator with a larger receptive field by employing down/up-sampling and multi-scale estimations. Specifically, estimator produces down-scaled estimation map $\hat{\sigma}_4(\mathbf{y})\in R^{H / 4\times W / 4\times 3}$ and original-sized estimation map $\hat{\sigma}_{1}(\mathbf{y})\in R^{H\times W\times 3}$ . Then, these two outputs are weight averaged to feed reconstruction network: + +$$ +\hat {\sigma} (\mathbf {y}) = \lambda_ {m s} L \left(\hat {\sigma} _ {4} (\mathbf {y})\right) + \left(1 - \lambda_ {m s}\right) \hat {\sigma} _ {1} (\mathbf {y}) \tag {1} +$$ + +where $H, W, L(\cdot)$ denotes the height and width of the image, and the linear interpolation respectively. $\lambda_{ms}$ is empirically determined to 0.8. From the weight average of multiscale estimates, we can achieve region-wisely smoothed $\hat{\sigma} (\mathbf{y})$ , which follows general the characteristic of RN. + +Adaptive Instance Normalization The proposed AIN-ResBlock plays two crucial roles in the proposed denoising scheme. One is regularizing the network not to be overfitted to SN images, and the other is adapting SN denoiser to RN denoiser. For this, we build AIN-ResBlcok with two convolutions and two AIN modules, which is presented in Fig. 3. The AIN module affine transforms normalized feature map $h \in R^{H' \times W' \times C}$ of convolution by taking a conditional input $\hat{\sigma}(\mathbf{y})$ where $H' \times W'$ denotes the spatial size of feature map at each scale $s$ , and $C$ is the number of channels. Specifically, the AIN module produces affine transform parameters such as scale $(\gamma)$ and shift $(\beta)$ for each pixel. Thus, every feature map is channel-wisely normalized and pixel-wisely affine transformed according to the noise level. The update process of feature map in AIN module at site $(p \in R^{H'}, q \in R^{W'}, c \in R^{C})$ is formally repre + +![](images/d119a9ab77ad046d9c1bb4c2b0850ec8ddeba8cdbd3ca70f5c1f554bd6950c35.jpg) +Figure 4: Illustration of the proposed transfer learning scheme. AIN module, noise level estimator, and last convolution are only updated when learning RN data. For the better visualization, we omit the noise level estimator in this figure. + +sented as + +$$ +h _ {p, q, c} ^ {\text {n e w}} = \gamma_ {p, q, c} ^ {*} \left(\frac {h _ {p , q , c} - \mu_ {c}}{\sigma_ {c}}\right) + \beta_ {p, q, c} ^ {*} \tag {2} +$$ + +where the variables with superscript \* are generated from $\hat{\sigma} (\mathbf{y})$ , and $\mu_{c}$ and $\sigma_{c}$ denote the mean and standard deviation of $h$ respectively, in channel $c$ . Precisely, + +$$ +\mu_ {c} = \frac {1}{H ^ {\prime} W ^ {\prime}} \sum_ {p} ^ {H ^ {\prime}} \sum_ {q} ^ {W ^ {\prime}} h _ {p, q, c} \tag {3} +$$ + +$$ +\sigma_ {c} ^ {2} = \frac {1}{H ^ {\prime} W ^ {\prime}} \sum_ {p} ^ {H ^ {\prime}} \sum_ {q} ^ {W ^ {\prime}} \left(h _ {p, q, c} - \mu_ {c}\right) ^ {2} + \epsilon \tag {4} +$$ + +where $\epsilon$ denotes the stability parameter, which prevents divide-by-zero in eq. (2), and we set $\epsilon = 10^{-5}$ in our implementation. Note that $\gamma_{p,q,c}^{*}$ and $\beta_{p,q,c}^{*}$ can be generated pixel-wisely and thus the proposed method can process spatially variant noisy images adaptively. In another point of view, AIN module acts as feature attention [12, 58, 47, 15, 26] with explicitly constrained information $(\hat{\sigma} (\mathbf{y}))$ . + +# 3.2. Transfer Learning + +We propose transfer learning scheme to leverage $S$ to accelerate the training of RN denoiser with $\mathcal{T}$ that has a limited number of elements (RN pairs). We expect that SN denoiser learns general and invariant feature representations and RN denoiser learns noise characteristics that cannot be fully modeled from SN data. The proposed transfer learning scheme can achieve these two merits by adapting SN denoiser to RN denoiser. For this, we focus on normalization parameter to handle different data distribution, which is inspired from other style transfer and classification tasks [46, 22, 41, 10]. In these methods, transform + +ing normalization parameters can transfer different style domain, and different domain classifications can be handled by switching the batch normalization parameters. From these observations, we try to adapt different domain denoisers by transfer-learning the normalization parameters assuming that data discrepancy between $S$ and $\mathcal{T}$ can be adapted by re-transforming the normalized feature maps. + +Specifically, AIN parameters of SN denoiser can be adapted pixel-wisely with conditional $\hat{\sigma}_i(\mathbf{y}_s)$ . Thus, AIN modules and noise level estimator are transfer-learned with RN data. Although the objective function of noise level cannot be present in $\mathcal{T}$ , noise level estimator can be trained with the reconstruction loss. We consider that last convolution plays a crucial role reconstructing feature maps to RGB image, hence last convolution is also updated. The overall proposed transfer learning scheme is presented in Fig. 4. + +Since the proposed transfer learning scheme only updates the parts of well generalized denoiser, it can be converged with faster speed and get better performance with very few number of elements from $\mathcal{T}$ than training from scratch. Moreover, the proposed scheme effectively copes with multiple models, which are inevitably required due to severely different noise statics, saving lots of memory by switching specific parameters. + +Training For training SN denoiser, we exploit multi-scale asymmetric loss as an estimation loss where asymmetric loss is introduced from CBDNet [20] to prevent under estimation. Formally, multi-scale asymmetric loss is defined as, + +$$ +\begin{array}{l} \mathcal {L} _ {m s - a s y m m} = \sum_ {i \in \{1, 4 \}} w _ {i} | \alpha - \mathbb {1} _ {\left(\hat {\sigma} _ {i} \left(\mathbf {y} _ {s}\right) - \sigma_ {i} \left(\mathbf {y} _ {s}\right) < 0\right)} | \tag {5} \\ \cdot \left(\hat {\sigma} _ {i} (\mathbf {y} _ {s}) - \sigma_ {i} (\mathbf {y} _ {s})\right). ^ {2} \\ \end{array} +$$ + +where $\mathbb{1},\cdot ,$ and. $^2$ denote element-wise operations such as indicator function, multiplication, and power respectively. Hyperparameters $\{w_{1},w_{4},\alpha \}$ are empirically determined as $\{0.2,0.8,0.25\}$ $\sigma_4(\mathbf{y}_s)$ is achieved from $4\times 4$ average pooling $\sigma_1(\mathbf{y}_s)$ + +Then, the proposed SN denoiser is jointly trained with estimation loss and $L_{1}$ reconstruction loss as, + +$$ +\mathcal {L} = \| F \left(\mathbf {y} _ {s}; \theta_ {s}\right) - \mathbf {x} _ {s} \| _ {1} ^ {1} + \lambda_ {m s - a s y m m} \mathcal {L} _ {m s - a s y m m} \tag {6} +$$ + +where $\theta_{s}$ denotes the SN denoiser training parameter including noise level estimator and reconstruction network. $\lambda_{ms - asymm}$ denotes the weight term of noise level estimator and is empirically determined to 0.05. + +For the RN denoiser, it is only trained with reconstruction loss: + +$$ +\mathcal {L} = \| F \left(\mathbf {y} _ {r}; \theta_ {r}\right) - \mathbf {x} _ {r} \| _ {1} ^ {1} \tag {7} +$$ + +where $\theta_r$ denotes the RN denoiser training parameter that is transferred from $\theta_s$ . Previously stated parameter such as AIN modules, estimator, and last convolution are only updated, and other parameters are fixed when training the RN denoiser. We use Adam optimizer for both SN denoiser and RN denoiser. + +# 4. Experiments + +We present the results of AWGN and RN images by training a Gaussian denoiser and RN denoiser. + +# 4.1. Experimental Setup + +Training Settings For the Gaussian denoiser, the training images are obtained from DIV2K [44] and BSD400 [37], and noisy image is generated by AWGN model. For the RN denoiser, we train a denoiser with two steps: training an SN denoiser and training the RN denoiser by transfer learning. We achieve pairs of SN images and noise-free images from Waterloo dataset [35] with heteroscedastic Gaussian noise model and simulating in-camera pipelines. The RN denoiser, which is transferred from SN denoiser, is trained with SIDD training set [2]. All the training images are cropped into patches of size $256 \times 256$ . + +Test Set In the AWGN experiments, we evaluate Set12 [54] and BSD68 [43] that are widely used for validating the AWGN denoiser. Furthermore, we adopt three datasets for real-world noisy images: + +- RNI15 [28] is composed of 15 real-world noisy images. Unfortunately, the ground-truth clean images are unavailable, therefore we only present qualitative results. +- DND [42] provides 50 noisy images that are captured by mirrorless cameras. Since we cannot access near noise-free counterparts, the objective results (PSNR/SSIM) can be achieved by submitting the denoised images to DND site. +- SIDD [2] is obtained from smartphone cameras. It provides 320 pairs of noisy images and corresponding near noise-free ones for the learning based methods where the captured scenes are mostly static. Furthermore, it provides 1280 patches for validation that has similar scenes with training set. The quantitative results (PSNR/SSIM) can be achieved by uploading the denoised image to SIDD site. + +# 4.2. Comparison with state-of-the-arts + +Noise Level Estimation We evaluate an accuracy of noise level estimator on exploited noise model images. We compare the proposed noise level estimator with fully convolutional network (FCN) that is widely used [20]. In order + +Table 1: Average MAE and error STD for the images from Kodak24 where the inputs are corrupted by heteroscedastic Gaussian including in-camera pipeline. + +
MethodFCNOurs
(σs, σc)MAESTDMAESTD
(0.08, 0.02)0.0390.0130.0140.012
(0.08, 0.04)0.0590.0140.0120.011
(0.08, 0.06)0.0760.0130.0200.010
(0.12, 0.02)0.0520.0210.0150.014
(0.12, 0.04)0.0710.0200.0170.014
(0.12, 0.06)0.0870.0200.0300.014
Average0.0640.0170.0180.013
# params29.5 K29.7 K
+ +Table 2: Average PSNR of the denoised images, where the inputs are corrupted by AWGN with $\sigma = 15,25$ , and 50, for the images from Set12 and BSD68 datasets. (red: the best result, blue: the second best) + +
Test SetSet12BSD68
Method152550152550
BM3D [14]32.3829.9526.7031.0728.5625.62
TNRD [13]32.5030.0426.7831.4228.9125.96
DnCNN [54]32.6830.3627.2131.6129.1626.23
UNLNet [30]32.6730.2527.0431.4728.9826.04
FFDNET [56]32.7530.4327.3231.6329.1926.29
RIDNet [6]32.9130.6027.4331.8129.3426.40
AINDNet32.9230.6127.5131.6929.2626.32
+ +to evaluate the accuracy of estimator itself, each estimator is trained with $L_{1}$ regression. The employed quantitative measurements are mean absolute error (MAE) and standard deviation (STD) of the error. We report the accuracy of each estimator in Table 1 where the input images are simultaneously corrupted with signal dependent noise level $\sigma_{s}$ and signal independent noise level $\sigma_{c}$ . We can find that proposed estimator gets more accurate results than previous estimator with a similar number of parameters. The results of more various noise levels will be presented in supplementary file. Furthermore, we will present the denoising performance when combined with reconstruction network. + +AWGN Denoising We compare proposed denoiser on the noisy grayscale images that are corrupted by AWGN. For this, we train Gaussian denoiser in a single network that learns noise level in [0,60]. The comparisons between the proposed method and other methods are presented in Table 2. We can see that the proposed denoiser achieves the best performance on Set12 where composition of Set12 is independent from training sets. On the other hand, the proposed method gets second best performance on BSD68 that consists of similar objects in BSD400 (training set). We think these results present robust generalization ability of the proposed denoising architecture for training set. + +Real Noise Denoising We also investigate the proposed denoiser and transfer learning scheme on RN datasets. Processing RN image is considered very practical, but difficult, because the noises are signal dependent, spatially variant, and visualized diversely according to different in-camera pipelines. Thus, we think RN denoising is an appropriate task for showing the generalization ability of the proposed denoiser and the effects of the proposed transfer learning. + +For the precise comparison, we train four different denoisers according to training sets and learning methods: + +- AINDNet(S): AINDNet is trained with $S$ , which is proposed SN denoiser. +- AINDNet(R): AINDNet is trained with $\mathcal{T}$ . +- AINDNet+RT: All the parameters from AINDNet(S) are re-trained with $\mathcal{T}$ , which is common transfer learning scheme. +- AINDNet+TF: Specified parameters from AINDNet(S) are updated with $\mathcal{T}$ , which is proposed RN denoiser. + +Moreover, we present the geometric self-ensemble [45] results denoting super script * in order to maximize potential performance of the proposed methods. + +Meanwhile, there have been a challenge on real image denoising [3] where the SIDD is used. Our method shows lower performance than the top-ranked ones in the challenge, but it needs to be noted that the number of parameters of our network is much smaller than those in the challenge. For example, DHDN [40] and DIDN [53] that appeared in the challenge require about $160\mathrm{M}$ and $190\mathrm{M}$ training parameters respectively which are about 12 - 15 times larger than ours. Moreover, challenge methods have been slightly overfitted to SIDD where the winning denoiser [23] gets comparably lower performance (38.78 dB) on DND than our method. Therefore, we would not directly compare the proposed method with challenge methods. + +The comparisons, including internal comparisons, are presented in Table 3 and 4. We can find that proposed methods get the best performance on DND and SIDD benchmarks. Specifically, the proposed AINDNet(S) achieves the best performance on DND benchmark, which is impressive performance that outperforms RN trained denoisers. Moreover, AINDNet(S) gets 1.5 dB and 2.4 dB gains from CBDNet on DND and SIDD respectively where employed noise models are the same. These results indicate that the proposed denoiser is not overfitted to noise model and can be well generalized to RN images. However, AINDNet(S) has inferior performance than AINDNet(R) on SIDD with big margin. The main reason is that AINDNet(R) is solely trained with SIDD training images where test set consists of similar scenes and objects in training set. In other words, + +Table 3: Average PSNR of the denoised images on the DND benchmark, we denote the environment of training, i.e., training with SN data only, RN data only, and both. * denotes geometric self-ensemble [45] result. (red: the best result, blue: the second best) + +
MethodBlind/Non-blindTraining Env.PSNRSSIM
CDnCNN-B [54]BlindSynthetic32.430.7900
TNRD [13]Non-blindSynthetic33.650.8306
MLP [8]Non-blindSynthetic34.230.8331
FFDNet [56]Non-blindSynthetic34.400.8474
BM3D [14]Non-blind-34.510.8507
WNNM [19]Non-blind-34.670.8646
GCBD [11]BlindSynthetic35.580.9217
KSVD [4]Non-blind-36.490.8978
TWSC [51]Blind-37.940.9403
CBDNet [20]BlindSynthetic37.570.9360
CBDNet [20]BlindReal37.720.9408
CBDNet [20]BlindAll38.060.9421
RIDNet [6]BlindReal39.230.9526
AINDNet(S)BlindSynthetic39.530.9561
AINDNet(R)BlindReal39.160.9515
AIDNet + RTBlindAll39.210.9505
AINDNet + TFBlindAll39.370.9505
AINDNet(S)*BlindSynthetic39.770.9590
AINDNet(R)*BlindReal39.340.9524
AINDNet + RT*BlindAll39.340.9522
AINDNet + TF*BlindAll39.520.9522
+ +AINDNet(R) can be slightly overfitted to SIDD benchmark and this phenomenon can be seen from insufficient performance on DND. + +In contrast, AINDNet+RT and AINDNet+TF get satisfying performance on both DND and SIDD. Concretely, AINDNet+RT and AINDNet+TF have better performance than others, including AINDNet(R) on SIDD, which indicates that pre-training the SN images results in better performance. AINDNet+TF more likely preserves priorly learned knowledges from SN data than AINDNet+RT, so AINDNet+TF achieves the best overall performance among compared methods. + +We present visualized comparisons on SIDD and RNI15 in Figs. 5 and 6, which show that proposed methods remove noises robustly while preserving the edges. Thus, characters in output images are more apparent than in other methods' results. Furthermore, we also present visual enhancement in Fig. 7 when the proposed transfer learning scheme is applied. Since RN denoiser transfer-learns characteristics of RN, AINDNet+TF successfully removes unusual noise that cannot be removed with AINDNet(S). Moreover, RN denoiser learns the properties of JPEG compression artifacts that is not priorly learned in SN denoiser, so it can also successfully reduces compression artifacts. We will also present other visualized comparisons in supplementary file. + +Table 4: Average PSNR of the denoised images on the SIDD benchmark, we denote the environment of training, i.e., training with SN data only, RN data only, and both. * denotes geometric self-ensemble [45] result. (red: the best result, blue: the second best) + +
MethodBlind/Non-blindTraining Env.PSNRSSIM
CDnCNN-B [54]BlindSynthetic23.660.583
MLP [8]Non-blindSynthetic24.710.641
TNRD [13]Non-blindSynthetic24.730.643
BM3D [14]Non-blind-25.650.685
WNNM [19]Non-blind-25.780.809
KSVD [4]Non-blind-26.880.842
CBDNet [20]BlindAll33.280.868
AINDNet(S)BlindSynthetic35.660.903
AINDNet(R)BlindReal38.730.950
AIDNet + RTBlindAll39.040.955
AINDNet + TFBlindAll38.950.952
AINDNet(S)*BlindSynthetic35.870.905
AINDNet(R)*BlindReal38.840.951
AINDNet + RT*BlindAll39.150.955
AINDNet + TF*BlindAll39.080.953
+ +# 4.3. Discussions + +Effect of Transfer Learning with Limited RN Pairs We investigate the relation between denoising performance and the amount of RN image pairs in $\mathcal{T}$ , because we consider that preparation of $\mathcal{T}$ is quite difficult and the number of elements can also be limited. For this, we train each network with constrained image pairs from one to all (320) from SIDD [2]. The average PSNR of each denoiser is presented in Table 5. It can be seen that transfer learning schemes can infer great performance with the small number of real training images. It is notable that AINDNet+TF trained with 32 pairs of real data achieves better performance than RIDNet that exploits all. Thus, we can conclude that the transfer learning with SN denoiser dramatically accelerate the performance with a small number of labeled data from other domain. + +Architecture of Denoiser We demonstrate the effectiveness of reconstruction network for training with $S$ . For this, AINDNet(S) is compared with a baseline (IN + Concat), which replaces AIN module with IN and concatenated input of noisy image and noise level map [55, 56]. Furthermore, we compare an adaptive Gaussian denoiser [25] that can process spatially variant noise map by feeding gated-residual block (Gated-ResBlock). Since it has not reported the performance on RN dataset, we train SN denoiser by replacing AIN-ResBlock to Gated-ResBlock where other settings are same as AINDNet. Table 6 shows that the proposed AIN-ResBlock shows the best performance on RN datasets. Thus, we believe that the AIN-ResBlock is an appropriate architecture for the generalization. We will present ablation study about update variable for transfer learning in supplementary file. + +Table 5: Investigation of denoiser RN denoising performance according to the amount of RN dataset. The quantitative results (in average PSNR (dB)) are reported on SIDD validation dataset. + +
Num of Real Images01248163264320 (full)
RIDNet--------38.71
AINDNet(R)-30.3632.1936.9437.7038.1438.6638.7038.81
AINDNet+RT35.2136.2337.1638.0238.4038.6338.8239.0039.01
AINDNet+TF35.2136.1937.1437.9338.2738.5238.7538.8338.90
+ +![](images/f2c34faf06463d5068330f132041375363db23eb243624c3ce90bfc3821fd505.jpg) + +![](images/6c6934f2434ab93c1b9d7b8433fcad9a15f590c78fd15766c9ea39753c4c36ce.jpg) + +![](images/f3716af503ef85ef28aec9f86b1c6a25a0f88b6a629a3865aa49ea761558370b.jpg) + +![](images/1efb0bd744fc6af0e4ac40b10e7a655cef2bffb5dc506c58073fafe753fbfeb9.jpg) +(a) Noisy Image +(d) RIDNet + +![](images/4096179b61bd59220cb1fa12db2af196af8594e500eab93c6a2ce24113567dc5.jpg) +(b) DnCNN-C +(e) AINDNet(S) + +![](images/bf19508f07715b63f95120baec6e91e048a30789f49741855a65850ac416c9c9.jpg) +(c) CBDNet +(f) AINDNet+TF + +![](images/c412cc17af6f3a7d79ec81e42e44641a7358f496bc38b62a6472534689317ebc.jpg) +Figure 5: The real noisy image from SIDD, and the comparison of the results. + +![](images/97483a22dfc83e5c2de65aabbf9aca36bca15153a888b9977fb4c14f7d943af1.jpg) + +![](images/6015932ab55f2c9ef402f8d7c07b9e2f15ed9e60186e15dd6612afa4b792e3b9.jpg) + +![](images/6bd3a0e761ee278b4a3c56c9e439265f97f375b2fc387bcf32f487ba70275cc3.jpg) +(a) Noisy Image +(d) RIDNet +Figure 6: The real noisy image from RNI15, and the comparison of the results. + +![](images/8f9c9c6e81a2afd3a23e89b7f5f758d7cc64d3c2c6aa0c5f5b8a07024c33a041.jpg) +(b) DnCNN-C +(e) AINDNet(S) + +![](images/484674b4833227d7e47cc488cd408d7e153b9c7b704a6f4ac89918235e082f9b.jpg) +(c)CBDNet +(f) AINDNet+TF + +# 5. Conclusion + +In this paper, we have presented a novel denoiser and transfer learning scheme of RN denoising. The proposed denoiser employs an AIN to regularize the network and also to prevent the network from overfitting to SN. The transfer learning mainly updates the AIN module using RN data to adjust data distribution. From the experimental results, we could find that the proposed denoising scheme can be well generalized to RN even if it is trained with SN. Moreover, + +![](images/fbd75dbd887ab6f376535164bfd7dba50b488bd879423da932282d508bff6a76.jpg) + +![](images/066cd0ea3d4a1c0c895c9009dbdcc7e649f65dab53d9f578b5783c3a58e3fa61.jpg) + +![](images/8abad2fa793ad506ddfbb209615f17be6dfece514832c72cd06d292e4a406858.jpg) + +![](images/6e466d8f33a97f40e1222c7cd9c8521a9cf740d924e188abe7a6379ce0732c8d.jpg) +(a) Noisy Image +(d) Noisy Image +Figure 7: The real noisy image from RNI15, and the comparison of the results showing the effectiveness of the proposed transfer learning scheme. + +![](images/8a47b372c85e7dda9b1f3601fb8e62c1308015a73f995f7b763ab23e2aa20f5d.jpg) +(b) AINDNet(S) +(e) AINDNet(S) + +![](images/adc78e1b38b1a47b8cdac69319f67ee3fd4c0e0ddab95ed7511201796fe935b3.jpg) +(c) AINDNet+TF +(f) AINDNet+TF + +Table 6: Investigation of the proposed reconstruction network when denoisers are trained with SN data. The quantitative results (in average PSNR (dB)) are reported on DND test dataset and SIDD validation dataset. + +
MethodDNDSIDD
IN + Concat38.5334.74
Gated-ResBlock [25]39.1934.93
Ours39.5335.19
+ +the transfer learning scheme can effectively adapt an SN denoiser to an RN denoiser, with very few additional training with real- noise pairs. We will make our codes publicly available at https://github.com/terryoo/AINDNet for further research and comparison. + +Acknowledgments This work was supported in part by Institute for Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (No.N190004, Development of AI based Robot Technologies for Understanding Assembly Instruction and Automatic Assembly Task Planning), and in part by Samsung Electronics Co., Ltd. + +# References + +[1] Abdelrahman Abdelhamed, Marcus A Brubaker, and Michael S Brown. Noise flow: Noise modeling with conditional normalizing flows. In Proceedings of the IEEE International Conference on Computer Vision, pages 3165-3173, 2019. 3 +[2] Abdelrahman Abdelhamed, Stephen Lin, and Michael S Brown. A high-quality denoising dataset for smartphone cameras. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 1, 5, 7 +[3] Abdelrahman Abdelhamed, Radu Timofte, and Michael S Brown. Ntire 2019 challenge on real image denoising: Methods and results. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0-0, 2019. 6 +[4] Michal Aharon, Michael Elad, and Alfred Bruckstein. K-svd: An algorithm for designing overcomplete dictionaries for sparse representation. IEEE Transactions on signal processing, 54(11):4311-4322, 2006. 7 +[5] Josue Anaya and Adrian Barbu. Renoir-a dataset for real low-light image noise reduction. Journal of Visual Communication and Image Representation, 51:144-154, 2018. 1 +[6] Saeed Anwar and Nick Barnes. Real image denoising with feature attention. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 6, 7 +[7] Tim Brooks, Ben Mildenhall, Tianfan Xue, Jiawen Chen, Dillon Sharlet, and Jonathan T Barron. Unprocessing images for learned raw denoising. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 3 +[8] Harold C Burger, Christian J Schuler, and Stefan Harmeling. Image denoising: Can plain neural networks compete with bm3d? In 2012 IEEE conference on computer vision and pattern recognition, 2012. 7 +[9] Jianrui Cai, Hui Zeng, Hongwei Yong, Zisheng Cao, and Lei Zhang. Toward real-world single image super-resolution: A new benchmark and a new model. arXiv preprint arXiv:1904.00523, 2019. 1 +[10] Woong-Gi Chang, Tackgeun You, Seonguk Seo, Suha Kwak, and Bohyung Han. Domain-specific batch normalization for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7354-7362, 2019. 4 +[11] Jingwen Chen, Jiawei Chen, Hongyang Chao, and Ming Yang. Image blind denoising with generative adversarial network based noise modeling. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3, 7 +[12] Long Chen, Hanwang Zhang, Jun Xiao, Liqiang Nie, Jian Shao, Wei Liu, and Tat-Seng Chua. Sca-cnn: Spatial and channel-wise attention in convolutional networks for image captioning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5659-5667, 2017. 4 +[13] Yunjin Chen and Thomas Pock. Trainable nonlinear reaction diffusion: A flexible framework for fast and effective image + +restoration. IEEE transactions on pattern analysis and machine intelligence, 39(6):1256-1272, 2016. 6, 7 +[14] Kostadin Dabov, Alessandro, Vladimir Katkovnik, and Karen Egiazarian. Color image denoising via sparse 3d collaborative filtering with grouping constraint in luminance-chrominance space. In 2007 IEEE International Conference on Image Processing, 2007. 6, 7 +[15] Tao Dai, Jianrui Cai, Yongbing Zhang, Shu-Tao Xia, and Lei Zhang. Second-order attention network for single image super-resolution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11065-11074, 2019. 4 +[16] Ruicheng Feng, Jinjin Gu, Yu Qiao, and Chao Dong. Suppressing model overfitting for image super-resolution networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2019. 2 +[17] Alessandro Foi, Mejdi Trimeche, Vladimir Katkovnik, and Karen Egiazarian. Practical poissonian-gaussian noise modeling and fitting for single-image raw-data. IEEE Transactions on Image Processing, 17(10):1737-1754, 2008. 3 +[18] Michael Gharbi, Gaurav Chaurasia, Sylvain Paris, and Frédo Durand. Deep joint demosaicking and denoising. ACM Transactions on Graphics (TOG), 35(6):191, 2016. 1 +[19] Shuhang Gu, Lei Zhang, Wangmeng Zuo, and Xiangchu Feng. Weighted nuclear norm minimization with application to image denoising. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2014. 7 +[20] Shi Guo, Zifei Yan, Kai Zhang, Wangmeng Zuo, and Lei Zhang. Toward convolutional blind denoising of real photographs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 3, 5, 7 +[21] Samuel W Hasinoff, Frédo Durand, and William T Freeman. Noise-optimal capture for high dynamic range photography. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 553-560. IEEE, 2010. 3 +[22] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision, pages 1501-1510, 2017. 2, 4 +[23] Dong-Wook Kim, Jae Ryun Chung, and Seung-Won Jung. Grdn: Grouped residual dense network for real image denoising and gan-based real-world noise modeling. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0-0, 2019. 6 +[24] Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Accurate image super-resolution using very deep convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1646-1654, 2016. 1 +[25] Yoonsik Kim, Jae Woong Soh, and Nam Ik Cho. Adaptively tuning a convolutional neural network by gate process for image denoising. IEEE Access, 7:63447-63456, 2019. 1, 2, 7, 8 +[26] Yoonsik Kim, Jae Woong Soh, and Nam Ik Cho. Agarnet: Adaptively gated jpeg compression artifacts removal network for a wide range quality factor. IEEE Access, 8:20160-20170, 2020. 4 + +[27] Filippos Kokkinos and Stamatis Lefkimmiatis. Iterative residual cnns for burst photography applications. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5929-5938, 2019. 1 +[28] Marc Lebrun, Miguel Colom, and Jean-Michel Morel. The noise clinic: a blind image denoising algorithm. Image Processing On Line, 5:1-54, 2015. 5 +[29] Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photorealistic single image super-resolution using a generative adversarial network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4681-4690, 2017. 1 +[30] Stamatios Lefkimmiatis. Universal denoising networks: a novel cnn architecture for image denoising. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3204-3213, 2018. 1, 6 +[31] Jaakko Lehtinen, Jacob Munkberg, Jon Hasselgren, Samuli Laine, Tero Karras, Miika Aittala, and Timo Aila. Noise2noise: Learning image restoration without clean data. In International Conference on Machine Learning, pages 2971-2980, 2018. 1 +[32] Yijun Li, Chen Fang, Jimei Yang, Zhaowen Wang, Xin Lu, and Ming-Hsuan Yang. Universal style transfer via feature transforms. In Advances in neural information processing systems, pages 386-396, 2017. 2 +[33] Bee Lim, Sanghyun Son, Heewon Kim, Seungjun Nah, and Young Mu Lee. Enhanced deep residual networks for single image super-resolution. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, 2017. 2 +[34] Xinhao Liu, Masayuki Tanaka, and Masatoshi Okutomi. Practical signal-dependent noise parameter estimation from a single noisy image. IEEE Transactions on Image Processing, 23(10):4361-4371, 2014. 3 +[35] Kede Ma, Zhengfang Duanmu, Qingbo Wu, Zhou Wang, Hongwei Yong, Hongliang Li, and Lei Zhang. Waterloo exploration database: New challenges for image quality assessment models. IEEE Transactions on Image Processing, 26(2):1004-1016, 2016. 5 +[36] Ilja Manakov, Markus Rohm, Christoph Kern, Benedikt Schworm, Karsten Kortuem, and Volker Tresp. Noise as domain shift: Denoising medical images by unpaired image translation. In Domain Adaptation and Representation Transfer and Medical Image Learning with Less Labels and Imperfect Data, pages 3-10. Springer, 2019. 1 +[37] David Martin, Charless Fowlkes, Doron Tal, Jitendra Malik, et al. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In The IEEE International Conference on Computer Vision (ICCV), 2001. 5 +[38] Seonghyeon Nam, Youngbae Hwang, Yasuyuki Matsushita, and Seon Joo Kim. A holistic approach to cross-channel image noise modeling and its application to image denoising. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1683-1691, 2016. 1 + +[39] Alberto Ortiz and Gabriel Oliver. Radiometric calibration of ccd sensors: Dark current and fixed pattern noise estimation. In IEEE International Conference on Robotics and Automation, 2004. Proceedings. ICRA'04. 2004, volume 5, pages 4730-4735. IEEE, 2004. 3 +[40] Bumjun Park, Songhyun Yu, and Jechang Jeong. Densely connected hierarchical network for image denoising. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019. 6 +[41] Taesung Park, Ming-Yu Liu, Ting-Chun Wang, and Jun-Yan Zhu. Semantic image synthesis with spatially-adaptive normalization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2337-2346, 2019. 2, 4 +[42] Tobias Plotz and Stefan Roth. Benchmarking denoising algorithms with real photographs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 1, 5 +[43] Stefan Roth and Michael J Black. Fields of experts. International Journal of Computer Vision, 82(2):205, 2009. 5 +[44] Radu Timofte, Eirikur Agustsson, Luc Van Gool, Ming-Hsuan Yang, and Lei Zhang. Ntire 2017 challenge on single image super-resolution: Methods and results. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 114-125, 2017. 5 +[45] Radu Timofte, Rasmus Rothe, and Luc Van Gool. Seven ways to improve example-based single image super resolution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1865-1873, 2016. 6, 7 +[46] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing ingredient for fast stylization. arXiv preprint arXiv:1607.08022, 2016. 2, 4 +[47] Sanghyun Woo, Jongchan Park, Joon-Young Lee, and In So Kweon. Cbam: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision (ECCV), pages 3–19, 2018. 4 +[48] Lei Xiao, Felix Heide, Wolfgang Heidrich, Bernhard Schölkopf, and Michael Hirsch. Discriminative transfer learning for general image restoration. IEEE Transactions on Image Processing, 27(8):4091-4104, 2018. 1 +[49] Jun Xu, Hui Li, Zhetong Liang, David Zhang, and Lei Zhang. Real-world noisy image denoising: A new benchmark. arXiv preprint arXiv:1804.02603, 2018. 1 +[50] Jun Xu, Lei Zhang, and David Zhang. External prior guided internal prior learning for real-world noisy image denoising. IEEE Transactions on Image Processing, 27(6):2996-3010, 2018. 1 +[51] Jun Xu, Lei Zhang, and David Zhang. A trilateral weighted sparse coding scheme for real-world image denoising. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. 7 +[52] Jun Xu, Lei Zhang, David Zhang, and Xiangchu Feng. Multi-channel weighted nuclear norm minimization for real color image denoising. In Proceedings of the IEEE International Conference on Computer Vision, pages 1096-1104, 2017. 1 + +[53] Songhyun Yu, Bumjun Park, and Jechang Jeong. Deep iterative down-up cnn for image denoising. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019. 6 +[54] Kai Zhang, Wangmeng Zuo, Yunjin Chen, Deyu Meng, and Lei Zhang. Beyond a gaussian denoiser: Residual learning of deep cnn for image denoising. IEEE Transactions on Image Processing, 26(7):3142-3155, 2017. 1, 5, 6, 7 +[55] Kai Zhang, Wangmeng Zuo, Shuhang Gu, and Lei Zhang. Learning deep cnn denoiser prior for image restoration. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3929-3938, 2017. 1, 7 +[56] Kai Zhang, Wangmeng Zuo, and Lei Zhang. Ffdnet: Toward a fast and flexible solution for cnn-based image denoising. IEEE Transactions on Image Processing, 27(9):4608-4622, 2018. 1, 6, 7 +[57] Kai Zhang, Wangmeng Zuo, and Lei Zhang. Learning a single convolutional super-resolution network for multiple degradations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3262-3271, 2018. 1 +[58] Yulun Zhang, Kunpeng Li, Kai Li, Lichen Wang, Bineng Zhong, and Yun Fu. Image super-resolution using very deep residual channel attention networks. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. 1, 2, 4 +[59] Fengyuan Zhu, Guangyong Chen, and Pheng-Ann Heng. From noise modeling to blind image denoising. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 420–429, 2016. 3 \ No newline at end of file diff --git a/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/images.zip b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..40ea24518465e680c6efd97fb2f9ef0dc76fcd91 --- /dev/null +++ b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d5b7d53551c3e2e0d53acb2718323f03cf3f1b18d01c68b70d0c3edb2016f5a +size 528373 diff --git a/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/layout.json b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0237894532c5ca1d1625382527fe55b5c544886f --- /dev/null +++ b/transferlearningfromsynthetictorealnoisedenoisingwithadaptiveinstancenormalization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02018c61f439e60ae46a79c4e9e1f1b28156720fc3395f23c95f06a637dffe18 +size 444631 diff --git a/transferringandregularizingpredictionforsemanticsegmentation/e373af93-119e-45bf-8ebd-6369043d9ad9_content_list.json b/transferringandregularizingpredictionforsemanticsegmentation/e373af93-119e-45bf-8ebd-6369043d9ad9_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7fca6b5369132882fcdab00ad73c00ad4ef1134a --- /dev/null +++ b/transferringandregularizingpredictionforsemanticsegmentation/e373af93-119e-45bf-8ebd-6369043d9ad9_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70c9cfee94e92821f6922e8e58eba0cbd1a2d2cb13d30ad0ae377b7300fda6c0 +size 84433 diff --git a/transferringandregularizingpredictionforsemanticsegmentation/e373af93-119e-45bf-8ebd-6369043d9ad9_model.json b/transferringandregularizingpredictionforsemanticsegmentation/e373af93-119e-45bf-8ebd-6369043d9ad9_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4be284d1a52e74b5e501bcd296f448f491ee1547 --- /dev/null +++ b/transferringandregularizingpredictionforsemanticsegmentation/e373af93-119e-45bf-8ebd-6369043d9ad9_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbd50756c71ac77d45a8320f6398551a1474c553bb8dbc6c160ae772de7dbf5d +size 104169 diff --git a/transferringandregularizingpredictionforsemanticsegmentation/e373af93-119e-45bf-8ebd-6369043d9ad9_origin.pdf b/transferringandregularizingpredictionforsemanticsegmentation/e373af93-119e-45bf-8ebd-6369043d9ad9_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..11ff9d14507a579d3ab86ecc515914219b82951b --- /dev/null +++ b/transferringandregularizingpredictionforsemanticsegmentation/e373af93-119e-45bf-8ebd-6369043d9ad9_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:294d4c29cc736867673fbe9cb116622f0bf1f042e8adf643745a8d371a31ab54 +size 3391030 diff --git a/transferringandregularizingpredictionforsemanticsegmentation/full.md b/transferringandregularizingpredictionforsemanticsegmentation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d5f0994116d15cbdc604f1553038c9f8cf319c05 --- /dev/null +++ b/transferringandregularizingpredictionforsemanticsegmentation/full.md @@ -0,0 +1,275 @@ +# Transferring and Regularizing Prediction for Semantic Segmentation* + +Yiheng Zhang†, Zhaofan Qiu†, Ting Yao‡, Chong-Wah Ngo§, Dong Liu†, and Tao Mei‡ † University of Science and Technology of China, Hefei, China + +‡ JD AI Research, Beijing, China $\S$ City University of Hong Kong, Kowloon, Hong Kong {yihengzhang.chn, zhaofanqiu, tingyao.ustc}@gmail.com cscwngo@cityu.edu.hk, dongeliu@ustc.edu.cn, tmei@jd.com + +# Abstract + +Semantic segmentation often requires a large set of images with pixel-level annotations. In the view of extremely expensive expert labeling, recent research has shown that the models trained on photo-realistic synthetic data (e.g., computer games) with computer-generated annotations can be adapted to real images. Despite this progress, without constraining the prediction on real images, the models will easily overfit on synthetic data due to severe domain mismatch. In this paper, we novelly exploit the intrinsic properties of semantic segmentation to alleviate such problem for model transfer. Specifically, we present a Regularizer of Prediction Transfer (RPT) that imposes the intrinsic properties as constraints to regularize model transfer in an unsupervised fashion. These constraints include patch-level, cluster-level and context-level semantic prediction consistencies at different levels of image formation. As the transfer is label-free and data-driven, the robustness of prediction is addressed by selectively involving a subset of image regions for model regularization. Extensive experiments are conducted to verify the proposal of RPT on the transfer of models trained on GTA5 and SYNTHIA (synthetic data) to Cityscapes dataset (urban street scenes). RPT shows consistent improvements when injecting the constraints on several neural networks for semantic segmentation. More remarkably, when integrating RPT into the adversarial-based segmentation framework, we report to-date the best results: mIoU of $53.2\% / 51.7\%$ when transferring from GTA5/SYNTHIA to Cityscapes, respectively. + +# 1. Introduction + +Semantic segmentation aims at assigning semantic labels to every pixel of an image. Leveraging on CNNs [18, 22, 42, 45, 46], significant progress has been reported for this fundamental task [6, 7, 30, 36]. One drawback of the existing approaches, nevertheless, is the requirement of large quantities of pixel-level annotations, such as in VOC [15], + +COCO [28] and Cityscapes [11] datasets, for model training. Labeling of semantics at pixel-level is cost expensive and time consuming. For example, the Cityscapes dataset is composed of 5,000 high-quality pixel-wise annotated images, and the annotation on a single image is reported to take more than 1.5 hours. + +An alternative is by utilizing synthetic data, which is largely available in 3D engines (e.g., SYNTHIA [41]) and 3D computer games (e.g., GTA5 [40]). The ground-truth semantics of these data can be automatically generated without manual labeling. Nevertheless, in the case where the synthetic data is different from the real images, the domain gap might be difficult to bridge. Unsupervised domain adaptation is generally regarded as an appealing way to address the problem of domain gap. The existing approaches include narrowing the gap by transferring images across domains [14, 32, 50] and learning domain-invariant representation via adversarial mechanism [13, 31, 49]. + +In this paper, we consider model overfitting in source domain as the major cause of domain mismatch. As shown in Figure 1(a), although Fully Convolutional Networks (FCN) perfectly segment the synthetic image by correct labeling of pixels, directly deploying this model for real image yields poor results. Instead of leveraging training samples in the target domain for model fine-tuning, this paper explores label-free constraints to alleviate the problem of model overfitting. These constraints are intrinsic and generic in the context of semantic segmentation. Figure 1(b)~(d) illustrate three label-free constraints being investigated. The first two constraints, namely patch-based and cluster-based consistencies guide the segmentation based on the prediction consistency among the pixels in an image patch and among the clusters of patches sharing similar visual properties, respectively. The last criterion, namely spatial logic, contextualizes the prediction of labels based on spatial relation between image patches. Based on these criteria, we propose a novel Regularizer of Prediction Transfer (RPT) for transferring the model trained on synthetic data for semantic segmentation of real images. + +![](images/fe50c025fa7bbb7841d93eddb1195de9744993b65fb53a81d7f220ff370fb43e.jpg) +(a) FCN trained on synthetic images + +![](images/b8f13965b927185d590e98e3dc73982d6191cf276c31b4c56f5f8ce75baa5829.jpg) +(b) Patch-based consistency +Figure 1. The examples of (a) predictions on two domains by fully convolutional networks trained on synthetic data; $(\mathrm{b})\sim (\mathrm{d})$ the three evaluation criteria we studied, i.e., patch-based consistency, cluster-based consistency and spatial logic. + +![](images/e106e94f08d470c5d0d0bf29ca70810e00d67237fbfb1e521f71e1d64d80fc3f.jpg) +(c) Cluster-based consistency + +![](images/a7c20c948ac1852736eb298f8131cb6030bbfa34e98d585a1c79a1f52fe805b4.jpg) +(d) Spatial logic + +The main contribution of this paper is on the exploration of label-free data-driven constraints for transferring of model to bridge domain gap. These constraints are imposed as regularizers during training to transfer an overfitted source model for proper labeling of pixels in the target domain. Specifically, at the lowest level of regularization, majority voting is performed to derive a dominant category for each image patch. The dominant category serves as a local cue for pixels with low prediction confidence to adjust their label prediction during training. The patch-level regularization is then extended to a higher level of regularization to explore cluster-level and context-level prediction consistency. Despite its simplicity, the three regularizers, when jointed optimized in a fully convolutional network with adversarial learning, show impressive performances by outperforming several state-of-the-art methods, when transferring the models trained on GTA5 and SYNTHIA for semantic segmentation on the Cityscapes dataset. + +# 2. Related Work + +CNN Based Semantic Segmentation. As one of the most challenging computer vision task, semantic segmentation has received intensive research attention. With the surge of deep learning and convolutional neural networks (CNNs), Fully Convolutional Network (FCN) [30] successfully serves as an effective approach that employs CNNs to perform dense semantic prediction. Following FCN, various schemes, ranging from multi-path feature aggregation and refinement [16, 27, 36, 38, 56, 58] to multi-scale context extraction and integration [5, 6, 17, 39, 51, 53, 59], have been developed and achieved great success in leveraging contextual information for semantic segmentation. Post-processing techniques, such as CRF [6] and MRF [29], could further be applied to take the spatial consistency of labels into account and improve the predictions from FCNs. Considering that such methods typically rely on the datasets with pixel-level annotations which are extremely expensive and laborious to collect, researchers have also strived to utilize a weaker form of annotation, such as image-level tags [34, 37], bounding boxes [12], scribbles [2] and statistics [35], for semantic segmentation. The development of computer graphics techniques provides an alternative approach that exploits synthetic data with free annotations. This work aims to study the methods of applying the semantic segmentation model learnt on the computer-generated syn + +thetic data to unlabeled real data. + +Domain Adaptation of Semantic Segmentation. To alleviate the issues of expensive labeling efforts in collecting pixel-level annotations, domain adaptation is studied for semantic segmentation. FCNWild [20], which is one of the early works, attempts to align the features in different domains from both global and local aspects by adversarial training. Curriculum [55] proposes a curriculum-style learning approach to bridge the domain gap between synthetic and real data. Later on, similar to domain adaptation in image recognition and object detection [3, 33, 52], visual appearance-level and/or representation-level adaptation are exploited in [14, 32, 47, 57] for this task. [14, 32] perform an image-to-image translation that transfers the synthetic images to the real domain in the appearance-level. From the perspective of the representation-level adaptation, AdaSegNet [47] proposes to apply adversarial learning on segmentation maps for adapting structured output space. FCAN [57] employs the two levels of adaptation simultaneously, in which the appearance gap between synthetic and real images is minimized and the network is encouraged to learn domain-invariant representations. There have been several other strategies [4, 9, 10, 19, 23, 25, 61], being performed for cross-domain semantic segmentation. For example, ROAD [10] devises a target guided distillation module and a spatial-aware adaptation module for real style and distribution orientation. Labels from the source domain are transferred to the target domain as the additional supervision in CyCADA [19]. Depth maps which are available in virtual 3D environments are utilized as geometric information to reduce domain shift in [9]. [23, 25, 61] treat target predictions as the guide for learning a model applicable to the images in target domain by self-supervised learning. [4] proposes a domain invariant structure extraction framework that decouples the structure and texture representations of images and improves the performance of segmentation. + +Summary. Most of the aforementioned approaches mainly investigate the problem of domain adaptation for semantic segmentation through bridging the domain gap during training. Our work is different in the way that we seek the additional regularization for the prediction in target domain based on the intrinsic and generic properties of semantic segmentation task. Such solution formulates an innovative and promising research direction for this task. + +![](images/2709c6faf54b29191ccf1a0527a586996e67b2fd43fc54093bda60bb485d8572.jpg) +Figure 2. Example of pixels to be unpunished (a) or punished (b) in optimization. (a) For the unpunished cases, some pixels are very confident in the class differed from the dominant category. (b) For the punished cases, most pixels inside the region predict relatively high probabilities for the dominant category. + +# 3. Regularizer of Prediction Transfer + +We start by introducing the Regularizer of Prediction Transfer (RPT) for semantic segmentation. Three criteria are defined to assess the quality of segmentation. The result of assessment is leveraged to guide the transfer of a learnt model in the source domain for semantic segmentation in the target domain. + +# 3.1. Patch-based Consistency + +The idea is to enforce all pixels in a patch to be consistent in the prediction of semantic labels. Here, a patch is defined as a superpixel that groups neighboring pixels with similar visual appearance. We employ Simple Linear Iterative Clustering (SLIC) [1], which is both speed and memory efficient in the generation of superpixels by adopting k-means algorithm. Given one image from target domain $x_{t}$ , SLIC splits the image into $N$ superpixels $\{S_{i}|i = 1,\dots,N\}$ . Each superpixel $S_{i} = \{p_{i}^{j}|j = 1,\dots,M_{i}\}$ is composed of $M_{i}$ adjacent pixels with similar appearance. We assume that all or the majority of pixels will be annotated with the same semantic labels. Here, the dominant category $\hat{y}_i$ of a superpixel is defined as the most number of predicted labels among all the pixels in this superpixel. + +As SLIC considers only visual cue, a superpixel usually contains multiple regions of different semantic labels. Simply involving all pixels in network optimization can run into the risk of skew optimization. To address this problem, a subset of pixels is masked out from patch-based regularization. Specifically, in superpixel $S_{i}$ , pixels $p_i^j \in S_i$ are clustered into two groups depending on the predicted probability of the dominant category $\hat{y}_i$ : (a) $P_{seg}(\hat{y}_i|p_i^j) < = \lambda_{pc}$ means that the probability is less than or equal to a pre + +![](images/333d8c77e2689cffbb4e58b29c561a426a86552fa1d6fe1c6ca73866d0479943.jpg) +Figure 3. Feature space visualization of seven superpixel clusters using t-SNE. The dominant category is given for each cluster. + +defined threshold $\lambda_{pc}$ . In other words, the pixel $p_i^j$ is predicted with labels different from the dominant category with relatively high probability. This group of pixels should be exempted from regularization. (b) $P_{seg}(\hat{y}_i|p_i^j) > \lambda_{pc}$ represents that $p_i^j$ has relatively higher confidence to be predicted as the dominant category. In this case, the dominant $\hat{y}_i$ is leveraged as a cue to guide the prediction of these pixels. To the end, the loss item for patch-based consistency regularization of a target image $x_t$ is formulated as: + +$$ +\mathcal {L} _ {p c} \left(x _ {t}\right) = - \sum_ {i, j} I _ {\left(P _ {s e g} \left(\hat {y} _ {i} \mid p _ {i} ^ {j}\right) > \lambda_ {p c}\right)} \log P _ {s e g} \left(\hat {y} _ {i} \mid p _ {i} ^ {j}\right), \tag {1} +$$ + +where $I_{(\cdot)}$ is an indicator function to selectively mask out pixels from optimization by thresholding. Figure 2 shows examples of superpixels that are masked out (i.e., unpunished) and involved (i.e., punished) for optimization. + +# 3.2. Cluster-based Consistency + +In addition to patch, we also enforce the consistency of label prediction among the clusters of patches that are visually similar. Specifically, cluster-level regularization imposes a constraint that the superpixels with similar visual properties should predict the cluster dominant category as their label. To this end, superpixels are further grouped into clusters. The feature representation of a superpixel is extracted through ResNet-101 [18], which is pre-trained on ImageNet dataset [42]. The feature vector utilized for clustering is generated by averagely pooling the feature maps of the superpixel region from $res5c$ layer. All the superpixels from target domain images are grouped into $K = 2048$ clusters by k-means algorithm. The cluster-level dominant category $\tilde{y}_k$ is determined by majority voting among the superpixels within a cluster. Figure 3 visualizes seven examples of clusters and the corresponding dominant categories by t-SNE [48]. As clustering is imperfect, it is ex + +pected that some superpixels will be incorrectly grouped. Denote $P_{seg}(\tilde{y}_k|p_i^j)$ , where $p_i^j \in S_i \in C_k$ , as the probability of predicting cluster-level dominant category as label for pixel $p_i^j$ . Similar to patch-based consistency regularization, pixels with low confidence on the cluster-level category will not be punished during network optimization. Thus, the loss item of cluster-based consistency regularization for a target image $x_t$ is defined as: + +$$ +\mathcal {L} _ {c c} \left(x _ {t}\right) = - \sum_ {i, j, S _ {i} \in C _ {k}} I _ {\left(P _ {s e g} \left(\tilde {y} _ {k} \mid p _ {i} ^ {j}\right) > \lambda_ {c c}\right)} \log P _ {s e g} \left(\tilde {y} _ {k} \mid p _ {i} ^ {j}\right), \tag {2} +$$ + +where $\lambda_{cc}$ is a pre-defined threshold to gate whether a pixel should be masked out from regularization. + +# 3.3. Spatial Logic + +A useful cue to leverage for target-domain segmentation is the spatial relation between semantic labels. For instance, a superpixel of category sky is likely on the top of another superpixel labeled with building or road, and not vice versa. These relations are expected to be invariant across the source and target domains. The supportive hypothesis behind is introduced in [4] that the high-level structure information of an image is informative for semantic segmentation and can be readily shared across domains. As such, the motivation of spatial logic is to preserve the spatial relations learnt in source domain to target domain. + +Formally, we exploit the LSTM encoder-decoder architecture to learn the vertical relation between superpixels, as shown in Figure 4. The main goal of this architecture is to speculate the category of the masked segment in the sequence according to context information. Then, the produced probability can be used to evaluate the logical validity of the predicted category in the masked segment. Suppose we have a prediction sequence $\mathcal{V}$ , where $\mathcal{V} = \{\mathbf{y}_1,\mathbf{y}_2,\dots,\mathbf{y}_{T - 1},\mathbf{y}_T\}$ including $T$ superpixel predictions sliced from one column of prediction map. Let $\mathbf{y}_t\in \mathbb{R}^{C + 1}$ denote the one-hot vector of the $t$ -th prediction in the sequence, and the dimension of $\mathbf{y}_t$ , i.e., $C + 1$ , is the number of semantic categories plus one symbol as an identification of masked prediction. The masked prediction sequence $\hat{\mathcal{V}}$ , which is fed into the LSTM encoder, is generated by masking a segment of consecutive predictions with the identical semantic category in the original sequence $\mathcal{V}$ . The LSTM encoder embeds the masked prediction sequence $\hat{\mathcal{V}}$ into a sequence representation. The LSTM decoder, which is attached on the top of the encoder, then speculates the categories of the masked segment and reconstructs the original sequence $\mathcal{V}$ . To learn the aforementioned spatial logic, the encoder-decoder architecture is optimized with the cross-entropy loss supervised by the label from source domain. + +Next, the optimized model can be utilized to estimate the validity of each prediction from the view of spatial logic. For the target image $x_{t}$ , we first slice the prediction map + +![](images/825014716b25c2390b7fe20899109c963fe0a31bae6fc5f899ce0643400f72bf.jpg) +Figure 4. The LSTM encoder-decoder architecture to learn the spatial logic in the prediction map. + +to several columns consisting of vertically neighbored superpixels. The patch-level dominant categories of the superpixels in the column are organized into a prediction sequence. For the superpixel $S_{i}$ in the column, the spatial logical probability $P_{logic}(\hat{y}_i|S_i)$ is measured by the LSTM encoder-decoder only when the prediction of this superpixel is masked in the input sequence. Once this probability is lower than the threshold $\lambda_{sl}$ , we consider this prediction to be illogical and punish the prediction of $\hat{y}_i$ by the segmentation network. The loss of spatial logic regularization is computed as: + +$$ +\mathcal {L} _ {s l} \left(x _ {t}\right) = \sum_ {i, j} I _ {\left(P _ {\text {l o g i c}} \left(\hat {y} _ {i} \mid S _ {i}\right) < \lambda_ {s l}\right)} \log P _ {\text {s e g}} \left(\hat {y} _ {i} \mid p _ {i} ^ {j}\right), \tag {3} +$$ + +where $P_{logic}(\cdot)$ denotes the prediction from LSTM encoder-decoder architecture. + +# 4. Semantic Segmentation with RPT + +The proposed Regularizer of Prediction Transfer (RPT) can be easily integrated into most of the existing frameworks for domain adaptation of semantic segmentation. Here, we choose the widely adopted framework based on adversarial learning as shown in Figure 5. The principle in this framework is equivalent to guiding the semantic segmentation in both domains by fooling a domain discriminator $D$ with the learnt source and target representations. Formally, given the training set $\mathcal{X}_s = \{x_s^i | i = 1, \dots, N_s\}$ in source domain and $\mathcal{X}_t = \{x_t^i | i = 1, \dots, N_t\}$ in target domain, the adversarial loss $\mathcal{L}_{adv}$ is the average classification loss, which is formulated as: + +$$ +\mathcal {L} _ {a d v} \left(\mathcal {X} _ {s}, \mathcal {X} _ {t}\right) = - E _ {x _ {t} \sim \mathcal {X} _ {t}} [ \log (D (x _ {t})) ] - E _ {x _ {s} \sim \mathcal {X} _ {s}} [ \log (1 - D (x _ {s}) ]. \tag {4} +$$ + +![](images/aa74232f02c50ba2bb23ae24e318c2a64d8a734d827f96298c65103dc0557a90.jpg) +Figure 5. The adversarial-based semantic segmentation adaptation framework with RPT. The shared FCN is learnt with adversarial loss for domain-invariant representations across two domains. The predictions on source domain are optimized by supervised label, while the target domain predictions are regularized by RPT loss. + +where $E$ denotes the expectation over the image set. The discriminator $D$ will attempt to minimize this loss by differentiating between source and target representations, and the shared Fully Convolutional Network (FCN) is learnt to fool the domain discriminator. Considering that the image region corresponding to the receptive field of each spatial unit in the final feature map is treated as an individual instance during semantic segmentation, the representations of such instances are expected to be invariant across domains. Thus we employ a fully convolutional domain discriminator whose outputs are the domain prediction of each image region corresponding to the spatial unit in the feature map. + +Since training labels are available in the source domain, the loss function is based on the pixel-level classification loss $\mathcal{L}_{seg}$ . In contrast, due to the absence of training labels, the loss function in the target domain is defined based upon the following three regularizers: + +$$ +\mathcal {L} _ {r p t} \left(\mathcal {X} _ {t}\right) = \underset {x _ {t} \sim \mathcal {X} _ {t}} {E} \left[ \mathcal {L} _ {c c} \left(x _ {t}\right) + \mathcal {L} _ {p c} \left(x _ {t}\right) + \mathcal {L} _ {s l} \left(x _ {t}\right) \right]. \tag {5} +$$ + +Here, we empirically treat each loss in RPT equally. Thus, the overall objective of the segmentation framework integrates $\mathcal{L}_{adv}$ , $\mathcal{L}_{seg}$ and $\mathcal{L}_{rpt}$ as: + +$$ +\min _ {F C N} \left\{- \varepsilon \min _ {D} \mathcal {L} _ {a d v} \left(\mathcal {X} _ {s}, \mathcal {X} _ {t}\right) + \mathcal {L} _ {s e g} \left(\mathcal {X} _ {s}\right) + \mathcal {L} _ {r p t} \left(\mathcal {X} _ {t}\right) \right\}, \tag {6} +$$ + +where $\varepsilon = 0.1$ is the trade-off parameter to align the scale of different losses. + +# 5. Implementation + +Training strategy. Our proposed network is implemented in Caffe [24] framework and the weights are trained by SGD optimizer. We employ dilated FCN [6] originated from the ImageNet pre-trained ResNet-101 as our backbone followed by a PSP module [59], unless otherwise stated. The domain discriminator for adversarial learning is borrowed from FCAN [57]. During the training stage, images are randomly cropped to $713 \times 713$ due to the limitation of GPU memory. Both random horizontal flipping and image resizing are utilized for data augmentation. To make + +the training process stable, we pre-train the FCN on data from the source domain with annotations. At the stage of pre-training, the "poly" policy whose power is fixed to 0.9 is adopted with the initial learning rate 0.001. Momentum and weight decay are 0.9 and 0.0005 respectively. Each mini-batch has 8 samples and maximum training iterations is set as $30\mathrm{K}$ . With the source domain pre-trained weights, we perform the domain adaptation by finetuning the whole adaptation framework which is equipped with our proposed RPT. The initial learning rate is 0.0001 and the total training iteration is $10\mathrm{K}$ . Other training hyper-parameters remain unchanged. Following [26], we randomly selected 500 images from the official training set of Cityscapes as a general validation set. The hyper-parameters $(\lambda_{pc} = \lambda_{cc} = \lambda_{sl} = 0.25, \varepsilon = 0.1)$ are all determined on this set. + +Complexity of superpixel. RPT highly relies on the quality of superpixel extraction. For robustness, superpixels with complex content ideally should be excluded from model training. The term "complex" refers to the distribution of semantic labels in a superpixel. In our case, we measure complexity based on the proportion of pixels being predicted with the dominant category over the number of pixels in a superpixel. A larger value implies consistency in prediction and hence safer to involve the corresponding superpixel in regularizations. Empirically, RPT only regularizes the top-50% of superpixels. The empirical choice will be further validated in the next section. + +State update of RPT. During network optimization, the segmentation prediction $P_{seg}$ , superpixel dominant category $\hat{y}_i$ and cluster dominant category $\tilde{y}_k$ change gradually. Iteratively updating these "states" is computationally expensive because reassigning the categories to superpixel and cluster (e.g., $\hat{y}_i$ and $\tilde{y}_k$ ) requires the semantic predictions collected from the whole training set of the target domain. Considering these predictions only change slightly during training, we first calculate these states before the optimization (without regularization) and fix these states at the beginning of iterations. Then, we will update the predictions or states for $N_{su}$ times evenly during training. + +# 6. Experiments + +# 6.1. Datasets + +The experiments are conducted on GTA5 [40], SYNTHIA [41] and Cityscapes [11] datasets. The proposed RPT is trained on GTA5 and SYNTHIA (source domain) and Cityscapes (target domain). GTA5 is composed of 24,966 synthetic images of size $1914\times 1052$ . These images are generated by Grand Theft Auto V (GTA5), a modern computer game, to render city scenes. The pixels of these images are annotated with 19 classes that are compatible with the labels in Cityscapes. Similarly, SYNTHIA consists of synthetic images of urban scenes with resolutions of $1280\times 760$ . Following [4, 9, 21, 25, 47], we use the subset, SYNTHIA- + +Table 1. RPT performances in terms of mean IoU for domain adaptation of semantic segmentation on GTA5 $\rightarrow$ Cityscapes. + +
MethodResNet-50ResNet-101
FCN+ABN+ADVFCN+ABN+ADV
baseline30.135.745.732.339.147.2
RPT¹33.039.348.736.142.950.4
RPT²33.439.950.037.944.251.7
RPT³33.540.050.039.144.652.6
+ +![](images/951adfacf812cd68e43d96a09bc651402f7d241eff089bcc2045952b25653abc.jpg) +(a) State updating + +![](images/59930af77d005b761318fd624a6ab7b94a02be53968ed905176426d474c7bc7d.jpg) +(b) Filtering complex superpixels +Figure 6. Two analysis experiments of (a) the effectiveness of state updating during training of $\mathrm{RPT}^3$ ; (b) the percentage of filtered complex superpixels of $\mathrm{RPT}^1$ . + +RAND-CITYSCAPES, which has 9,400 images being annotated with labels consistent with Cityscapes for experiments. Cityscapes is composed of 5,000 images of resolution $2048 \times 1024$ . These images are split into three subsets of sizes 2,975, 500 and 1,525 for training, validation and testing, respectively. The pixels of these images are annotated with 19 classes. In the experiments, the training subset is treated as the target-domain training data, where the pixel-level annotation is assumed unknown to RPT. On the other hand, the target-domain testing data is from validation subset. The same setting is also exploited in [4, 25, 47]. + +To this end, the performance of RPT is assessed by treating GTA5 as source domain and Cityscapes as target domain (i.e., $\mathrm{GTA5} \rightarrow \mathrm{Cityscapes}$ ), and similarly, SYNTHIA $\rightarrow$ Cityscapes. The metrics are per class Intersection over Union (IoU) and mean IoU over all the classes. + +# 6.2. Evaluation of RPT + +RPT is experimented on top of six different network architectures derived from FCN which leverages on either ResNet-50 or ResNet-101 as the backbone network. Specially, we adopt Adaptive Batch Normalization (ABN) to replace the mean and variance of BN in the original version of FCN, resulting in a variant of network named FCN+ABN. Note that the BN layer is first learnt in source domain and then replaced by ABN when being applied to the target domain. In addition, leveraging on the adversarial training (ADV), another variant, FCN+ABN+ADV, is trained to learn domain-invariant representations. + +We first verify the impact of $N_{su}$ , the number of state updating, in RPT. Table 1 summarizes the impact on six variants of network for domain adaptation on GTA5 → Cityscapes. All the networks are pre-trained on ImageNet dataset and then injected with RPT. The super + +Table 2. Contribution of each design in RPT for domain adaptation of semantic segmentation on GTA5 $\rightarrow$ Cityscapes. + +
MethodABN ADV PCR CCR SLR SUmIoU
FCN32.3
+ABN✓39.1
\(FCN_{adv}\) (+ADV)✓✓47.2
+PCR✓✓✓49.0
+CCR✓✓✓✓49.6
\(RPT^1\) (+SLR)✓✓✓✓✓50.4
\(RPT^3\)✓✓✓✓✓52.6
+ +script, $\mathrm{RPT}^n$ , refers to the number of times for state updating (see Table 1 for exact number). The baselines are obtained by performing domain adaptation of semantic segmentation on the use of the corresponding network architectures, but without RPT. Overall, RPT improves the baseline without regularization. The improvement is consistently observed across the variants of networks, and proportional to the number of state updating at the expense of computation cost. $\mathrm{RPT}^3$ achieves the best performance ( $\mathrm{mIoU} = 52.6\%$ ) and with $5.4\%$ improvement over the baseline of the same network ( $\mathrm{FCN + ABN + ADV}$ ). Figure 6(a) shows the performance changes in terms of mIoU during training over different times of state updating. The training starts with model learning in source domain. State updating, such as the assignment of dominant categories at superpixel and cluster levels, is then performed three times evenly during the training process in the target domain. Despite dropping in performance at the start of training after each state updating, mIoU gradually improves and eventually converges to a higher value than the previous round. Figure 6(b) shows the performance trend when the percentage of complex superpixels being excluded from learning gradually increases. As shown, the value mIoU constantly increases till reaching the level when $50\%$ of superpixels are filtered. In the remaining experiments, we fix the setting of RPT to involve $50\%$ of superpixels in regularization. + +# 6.3. An Ablation Study + +Next, we conduct an ablation study to assess the performance impacts of different design components. We separately assess the three regularizations in RPT: patch-based consistency regularization (PCR), cluster-based consistency regularization (CCR) and spatial logic regularization (SLR). Table 2 details the contribution of each component towards the overall performance. $\mathrm{FCN}_{\text {adv }}$ , by considering adaptive batch normalization and adversarial learning (ABN+ADV), successfully boosts mIoU from $32.3\%$ to $47.2\%$ . The result indicates the importance of narrowing the domain gap between synthetic data and real images. The three regularizations in target domain introduce $1.8\%$ , $0.6\%$ and $0.8\%$ of improvement, respectively. Furthermore, by increasing the number of state updating during network optimization, additional $2.2\%$ of improvement is observed + +Table 3. Comparisons with the state-of-the-art unsupervised domain adaptation methods on GTA5 $\rightarrow$ Cityscapes adaptation. Please note that the baseline methods are divided into five groups: (1) representation-level domain adaptation by adversarial learning [10, 13, 19, 21, 31, 44, 47]; (2) appearance-level domain adaptation by image translation [14, 32]; (3) appearance-level + representation-level adaptation [4, 50, 57]; (4) self-learning [23, 26, 54, 61]; (5) others [8, 25, 43, 55, 60]. + +
MethodroadsdwlkbldngwallfencepolelightsignvgttntrrnskypersonridercartruckbustrainmcyclbcyclmIoU
FCNWild [20]70.432.462.114.95.410.914.22.779.221.364.644.14.270.48.07.30.03.50.027.1
Learning [44]88.030.578.625.223.516.723.511.678.727.271.951.319.580.419.818.30.920.818.437.1
ROAD [10]76.336.169.628.622.428.629.314.882.335.372.954.417.878.927.730.34.024.912.639.4
CyCADA [19]79.133.177.923.417.332.133.331.881.526.769.062.814.774.520.925.66.918.820.439.5
AdaptSegNet [47]86.536.079.923.423.323.935.214.883.433.375.658.527.673.732.535.43.930.128.142.4
CLAN [31]87.027.179.627.323.328.335.524.283.627.474.258.628.076.233.136.76.731.931.443.2
Conditional [21]89.249.070.713.510.938.529.433.777.937.665.875.132.477.839.245.20.025.535.444.5
SSF-DAN [13]90.338.981.724.822.930.537.021.284.838.876.958.830.785.730.638.15.928.336.945.4
ADVENT [49]89.433.181.026.626.827.233.524.783.936.778.858.730.584.838.544.51.731.632.445.5
I2I Adapt [32]85.837.580.223.316.123.014.59.879.236.576.453.47.482.819.115.72.813.41.735.7
Stylization [14]86.944.584.738.826.632.142.322.584.730.985.967.028.185.738.331.821.531.324.647.8
DCAN [50]85.030.881.325.821.222.225.426.683.436.776.258.924.980.729.542.92.526.911.641.7
DISE [4]91.547.582.531.325.633.033.725.882.728.882.762.430.885.227.734.56.425.224.445.4
FCAN [57]88.937.982.933.226.142.843.228.486.535.278.065.922.886.723.734.92.724.041.946.6
FCTN [54]72.228.474.918.310.824.025.317.980.136.761.144.70.074.58.91.50.00.00.030.5
CBST [61]89.658.978.533.022.341.448.239.283.624.365.449.320.283.339.048.612.520.335.347.0
PyCDA [26]92.349.284.433.430.233.337.135.286.536.977.363.330.586.634.540.77.917.635.548.0
MLSL [23]89.045.278.222.927.337.446.143.882.918.661.260.426.785.435.944.936.437.249.349.0
Curriculum [55]72.93074.912.113.215.316.814.179.314.575.535.71062.120.619019.31231.4
Penalizing [60]-------------------38.1
Effective [43]79.829.377.824.221.66.923.544.280.538.076.252.722.283.032.341.327.019.327.742.5
MaxSquare [8]89.340.581.229.020.425.634.419.083.634.476.559.227.483.838.443.67.132.232.545.2
Bidirectional [25]91.044.784.234.627.630.236.036.085.043.683.058.631.683.335.349.73.328.835.648.5
\(FCN_{adv}+RPT^1\)88.737.085.236.627.742.649.130.086.937.680.766.827.588.130.339.522.528.053.050.4
\(FCN_{adv}+RPT^3\)89.243.386.139.529.940.249.633.187.438.586.064.425.188.536.645.823.936.556.852.6
\(FCN_{adv}+RPT^3+MS\)89.744.886.444.230.641.451.733.087.839.486.365.624.589.036.246.817.639.158.353.2
+ +![](images/ebc370845c302d7fabf20899348c524ac671f4b2adb876363c3b80ac5f14b7dd.jpg) +Figure 7. Examples of semantic segmentation results on GTA5-Cityscapes adaptation. The original images, their ground truth and comparative results at different stages of $\mathrm{FCN}_{adv} + \mathrm{RPT}^3$ are given. + +from $\mathrm{RPT}^1$ to $\mathrm{RPT}^3$ . Figure 7 shows the gradual improvement on semantic segmentation of five images, when different design components are incrementally integrated. + +# 6.4. Comparisons with State-of-the-Art + +We compare with several state-of-the-art techniques for unsupervised domain adaptation on GTA5 $\rightarrow$ Cityscapes. Broadly, we can categorize the baseline methods into five categories: (1) representation-level domain adaptation by adversarial learning [10, 13, 19, 21, 31, 44, 47]; (2) appearance-level domain adaptation by image translation [14, 32]; (3) appearance-level + representation-level adaptation [4, 50, 57]; (4) self-learning [23, 26, 54, 61]; + +(5) others [8, 25, 43, 55, 60]. The performance comparisons on GTA5 $\rightarrow$ Cityscapes adaptation are summarized in Table 3. $\mathrm{FCN}_{adv} + \mathrm{RPT}^3$ achieves new state-of-the-art performance with mIoU of $52.6\%$ . Benefiting from the proposed regularizations, $\mathrm{FCN}_{adv} + \mathrm{RPT}^3$ outperforms SSF-DAN [13] and ADVENT [49], which also adopt a similar adversarial mechanism, by additional improvement of $7.2\%$ and $7.1\%$ , respectively. The performance is also better than the most recently proposed FCAN [57] and Stylization [14], which exploit a novel appearance transferring module that is not considered in RPT. Comparing to the best reported result to-date by MLSL [23], our proposed model still leads the performance by $3.6\%$ . By further integrating with the multi-scale (MS) scheme, i.e., $\mathrm{FCN}_{adv} + \mathrm{RPT}^3 + \mathrm{MS}$ , the mIoU boosts to $53.2\%$ with 9 out of the 19 categories reach to-date the best reported performances. + +To verify the generalization of RPT, we also test the performance on SYNTHIA $\rightarrow$ Cityscapes using the same settings. Following previous works [23, 26, 49, 61], the performances are reported in terms of mIoU@16 and mIoU@13 by not considering the different number of categories. The performance comparisons are summarized in Table 4. Similarly, $\mathrm{FCN}_{adv} + \mathrm{RPT}^3 +\mathrm{MS}$ achieves the best performance with mIoU@16 = 51.7% and mIoU@13 = 59.5%. The performances are better than PyCDA, which reports the best known results, by 5% and 6.2% respectively. + +Table 4. Comparisons with the state-of-the-art unsupervised domain adaptation methods on SYNTHIA $\rightarrow$ Cityscapes transfer. + +
roadsdwlkbldngwallfencepolelightsignvgttnskypersonridercarbusmcyclbcyclmIoU@16mIoU@13
Learning [44]80.129.177.52.80.426.811.118.078.176.748.215.270.517.48.716.736.1-
ROAD [10]77.730.077.59.60.325.810.315.677.679.844.516.667.814.57.023.836.2-
AdaptSegNet [47]84.342.777.5---4.77.077.982.554.321.072.332.218.932.3-46.7
CLAN [31]81.337.080.1---16.113.778.281.553.421.273.032.922.630.7-47.8
Conditional [21]85.025.873.53.43.031.519.521.367.469.468.525.076.541.617.929.541.2-
SSF-DAN [13]84.641.780.8---11.514.780.885.357.521.682.036.019.334.5-50.0
ADVENT [49]85.642.279.78.70.425.95.48.180.484.157.923.873.336.414.233.041.248.0
DCAN [50]82.836.475.75.10.125.88.018.774.776.951.115.977.724.84.137.338.4-
DISE [4]91.753.577.12.50.227.16.27.678.481.255.819.282.330.317.134.341.5-
CBST [61]53.623.775.012.50.336.423.526.384.874.767.217.584.528.415.255.842.548.4
PyCDA [26]75.530.983.320.80.732.727.333.584.785.064.125.485.045.221.232.046.753.3
MLSL [23]59.230.268.522.91.036.232.728.386.275.468.627.782.726.324.352.745.251.0
Curriculum [55]57.423.174.70.50.614.05.34.377.873.745.011.044.821.21.920.329.7-
Penalizing [60]----------------34.240.3
MaxSquare [8]82.940.780.310.20.825.812.818.282.582.253.118.079.031.410.435.641.448.2
Bidirectional [25]86.046.780.3---14.111.679.281.354.127.973.742.225.745.3-51.4
FCNadv+RPT187.743.184.010.50.542.240.533.186.081.956.026.185.935.824.856.249.657.0
FCNadv+RPT388.946.584.515.10.538.539.530.185.985.859.826.188.146.827.756.151.258.9
FCNadv+RPT3+MS89.147.384.614.50.439.439.930.386.186.360.825.788.749.028.457.551.759.5
+ +![](images/6340c461966c95e8e7c6e2a01ed4d592f75b6022c0c549913a3efba53b20bc2e.jpg) +Figure 8. Examples showing the effectiveness of patch-based consistency and cluster-based consistency in RPT. + +# 6.5. Examples of Regularization + +Figure 8 shows examples to demonstrate the effectiveness of patch-based and cluster-based consistency regularizations. Here, we crop some highlighted regions of input image, ground truth, prediction by $\mathrm{FCN}_{adv}$ and prediction by $\mathrm{FCN}_{adv} + \mathrm{RPT}^3$ , respectively. On one hand, as shown in Figure 8(a), patch-based consistency encourages the pixels to be predicted as the dominant category of the superpixel. On the other hand, cluster-based consistency is able to correct the predictions with the cue of visual similarity across superpixels as illustrated in Figure 8(b). These examples validate our motivation of enforcing label consistency within superpixel and cluster, where most semantic labels are correctly predicted in the target domain. Figure 9 further visualizes the merit of modeling spatial context by spatial logic regularization. Given the segmentation results from $\mathrm{FCN}_{adv}$ , our proposed LSTM encoder-decoder outputs the logical probability of assigning current semantic labels to each region. The darkness indicates that the region is predicted with low logical probability. Better results are achieved by penalizing the illogical predictions, such as road on the top of vegetation (1st row) or car (2nd row), sky below building (3rd row), fence above building (4th row). + +![](images/82be9f26483fb7da347012fda823df8358d83586cd00574fc3c2dd731d7096ec.jpg) +Figure 9. The examples of punished patches by spatial logic. + +# 7. Conclusion + +We have presented Regularizer of Prediction Transfer (RPT) for unsupervised domain adaptation of semantic segmentation. RPT gives light to a novel research direction, by directly exploring the three intrinsic criteria of semantic segmentation to restrict the label prediction on the target domain. These criteria, when imposed as regularizers during training, are found to be effective in alleviating the problem of model overfitting. The patch-based consistency attempts to unify the prediction inside each region by introducing its dominant category to the unconfident pixels. The cluster-based consistency further amends the prediction according to other visually similar regions which belong to the same cluster. In pursuit of suppressing illogical predictions, spatial logic is involved to regularize the spatial relation which is shared across domains. Experiments conducted on the transfer from GTA5 to Cityscapes show that the injection of RPT can consistently improve the domain adaptation across different network architectures. More remarkably, the setting of $\mathrm{FCN}_{adv} + \mathrm{RPT}^3$ achieves new state-of-the-art performance. A similar conclusion is also drawn from the adaptation from SYNTHIA to Cityscapes, which demonstrates the generalization ability of RPT. + +# References + +[1] Radhakrishna Achanta, Appu Shaji, Kevin Smith, Aurelien Lucchi, Pascal Fua, and Sabine Süsstrunk. Slic superpixels compared to state-of-the-art superpixel methods. IEEE Trans. on PAMI, 34(11):2274-2282, 2012. +[2] Amy Bearman, Olga Russakovsky, Vittorio Ferrari, and Li Fei-Fei. What's the point: Semantic segmentation with point supervision. In ECCV, 2016. +[3] Qi Cai, Yingwei Pan, Chong-Wah Ngo, Xinmei Tian, Lingyu Duan, and Ting Yao. Exploring object relation in mean teacher for cross-domain detection. In CVPR, 2019. +[4] Wei-Lun Chang, Hui-Po Wang, Wen-Hsiao Peng, and Wei-Chen Chiu. All about structure: Adapting structural information across domains for boosting semantic segmentation. In CVPR, 2019. +[5] Liang-Chieh Chen, Maxwell D. Collins, Yukun Zhu, George Papandreou, Barret Zoph, Florian Schroff, Hartwig Adam, and Jonathon Shlens. Searching for efficient multi-scale architectures for dense image prediction. In NIPS, 2018. +[6] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L. Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE Trans. on PAMI, 40(4):834-848, 2018. +[7] Liang-Chieh Chen, Yukun Zhu, George Papandreou, Florian Schroff, and Hartwig Adam. Encoder-decoder with atrous separable convolution for semantic image segmentation. In ECCV, 2018. +[8] Minghao Chen, Hongyang Xue, and Deng Cai. Domain adaptation for semantic segmentation with maximum squares loss. In ICCV, 2019. +[9] Yuhua Chen, Wen Li, Xiaoran Chen, and Luc Van Gool. Learning semantic segmentation from synthetic data: A geometrically guided input-output adaptation approach. In CVPR, 2019. +[10] Yuhua Chen, Wen Li, and Luc Van Gool. Road: Reality oriented adaptation for semantic segmentation of urban scenes. In CVPR, 2018. +[11] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. +[12] Jifeng Dai, Kaiming He, and Jian Sun. Boxsup: Exploiting bounding boxes to supervise convolutional networks for semantic segmentation. In ICCV, 2015. +[13] Liang Du, Jingang Tan, Hongye Yang, Jianfeng Feng, Xi-angyang Xue, Qibao Zheng, Xiaqing Ye, and Xiaolin Zhang. Ssf-dan: Separated semantic feature based domain adaptation network for semantic segmentation. In ICCV, 2019. +[14] Aysegul Dundar, Ming-Yu Liu, Ting-Chun Wang, John Zedlewski, and Jan Kautz. Domain stylization: A strong, simple baseline for synthetic to real image domain adaptation. arXiv preprint arXiv:1807.09384, 2018. + +[15] Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. *IJCV*, 88(2):303–338, 2010. +[16] Golnaz Ghiasi and Charless C. Fowlkes. Laplacian pyramid reconstruction and refinement for semantic segmentation. In ECCV, 2016. +[17] Junjun He, Zhongying Deng, and Yu Qiao. Dynamic multiscale filters for semantic segmentation. In ICCV, 2019. +[18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. +[19] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei Efros, and Trevor Darrell. CyCADA: Cycle-consistent adversarial domain adaptation. In ICML, 2018. +[20] Judy Hoffman, Dequan Wang, Fisher Yu, and Trevor Darrell. Fcns in the wild: Pixel-level adversarial and constraint-based adaptation. arXiv preprint arXiv:1612.02649, 2016. +[21] Weixiang Hong, Zhenzhen Wang, Ming Yang, and Junsong Yuan. Conditional generative adversarial network for structured domain adaptation. In CVPR, 2018. +[22] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, 2018. +[23] Javed Iqbal and Mohsen Ali. Mlsl: Multi-level self-supervised learning for domain adaptation with spatially independent and semantically consistent labeling. arXiv preprint arXiv:1909.13776, 2019. +[24] Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. In ACM MM, 2014. +[25] Yunsheng Li, Lu Yuan, and Nuno Vasconcelos. Bidirectional learning for domain adaptation of semantic segmentation. In CVPR, 2019. +[26] Qing Lian, Fengmao Lv, Lixin Duan, and Boqing Gong. Constructing self-motivated pyramid curriculums for cross-domain semantic segmentation: A non-adversarial approach. In ICCV, 2019. +[27] Guosheng Lin, Anton Milan, Chunhua Shen, and Ian Reid. Refinenet: Multi-path refinement networks for high-resolution semantic segmentation. In CVPR, 2017. +[28] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dolkar, and C. Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. +[29] Ziwei Liu, Xiaoxiao Li, Ping Luo, Chen Change Loy, and Xiaou Tang. Deep learning markov random field for semantic segmentation. IEEE Trans. on PAMI, 40(8):1814-1828, 2018. +[30] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. +[31] Yawei Luo, Liang Zheng, Tao Guan, Junqing Yu, and Yi Yang. Taking a closer look at domain shift: Category-level adversaries for semantics consistent domain adaptation. In CVPR, 2019. + +[32] Zak Murez, Soheil Kolouri, David Kriegman, Ravi Ramamoorthi, and Kyungnam Kim. Image to image translation for domain adaptation. In CVPR, 2018. +[33] Yingwei Pan, Ting Yao, Yehao Li, Yu Wang, Chong-Wah Ngo, and Tao Mei. Transferrable prototypical networks for unsupervised domain adaptation. In CVPR, 2019. +[34] George Papandreou, Liang-Chieh Chen, Kevin Murphy, and Alan L. Yuille. Weakly- and semi-supervised learning of a deep convolutional network for semantic image segmentation. In ICCV, 2015. +[35] Deepak Pathak, Philipp Krahenbuhl, and Trevor Darrell. Constrained convolutional neural networks for weakly supervised segmentation. In ICCV, 2015. +[36] Chao Peng, Xiangyu Zhang, Gang Yu, Guiming Luo, and Jian Sun. Large kernel matters - improve semantic segmentation by global convolutional network. In CVPR, 2017. +[37] Pedro O. Pinheiro and Ronan Collobert. From image-level to pixel-level labeling with convolutional networks. In CVPR, 2015. +[38] Tobias Pohlen, Alexander Hermans, Markus Mathias, and Bastian Leibe. Full-resolution residual networks for semantic segmentation in street scenes. In CVPR, 2017. +[39] Zhaofan Qiu, Ting Yao, and Tao Mei. Learning deep spatio-temporal dependence for semantic video segmentation. IEEE Trans. on Multimedia, 2017. +[40] Stephan R. Richter, Vibhav Vineet, Stefan Roth, and Vladlen Koltun. Playing for data: Ground truth from computer games. In ECCV, 2016. +[41] German Ros, Laura Sellart, Joanna Materzynska, David Vazquez, and Antonio M Lopez. The synthia dataset: A large collection of synthetic images for semantic segmentation of urban scenes. In CVPR, 2016. +[42] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. Imagenet large scale visual recognition challenge. IJCV, 115(3):211-252, 2015. +[43] Fatemeh Sadat Saleh, Mohammad Sadegh Aliakbarian, Mathieu Salzmann, Lars Petersson, and Jose M Alvarez. Effective use of synthetic data for urban scene semantic segmentation. In ECCV, 2018. +[44] Swami Sankaranarayanan, Yogesh Balaji, Arpit Jain, Ser Nam Lim, and Rama Chellappa. Learning from synthetic data: Addressing domain shift for semantic segmentation. In CVPR, 2018. +[45] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. +[46] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, 2015. +[47] Yi-Hsuan Tsai, Wei-Chih Hung, Samuel Schulter, Kiyuk Sohn, Ming-Hsuan Yang, and Manmohan Chandraker. Learning to adapt structured output space for semantic segmentation. In CVPR, 2018. +[48] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. JMLR, 2008. + +[49] Tuan-Hung Vu, Himalaya Jain, Maxime Bucher, Matthieu Cord, and Patrick Perez. Advent: Adversarial entropy minimization for domain adaptation in semantic segmentation. In CVPR, 2019. +[50] Zuxuan Wu, Xintong Han, Yen-Liang Lin, Mustafa Gokhan Uzunbas, Tom Goldstein, Ser Nam Lim, and Larry S Davis. Dcan: Dual channel-wise alignment networks for unsupervised scene adaptation. In ECCV, 2018. +[51] Maoke Yang, Kun Yu, Chi Zhang, Zhiwei Li, and Kuiyuan Yang. Denseaspp for semantic segmentation in street scenes. In CVPR, 2018. +[52] Ting Yao, Yingwei Pan, Chong-Wah Ngo, Houqiang Li, and Tao Mei. Semi-supervised domain adaptation with subspace learning for visual recognition. In CVPR, 2015. +[53] Hang Zhang, Kristin Dana, Jianping Shi, Zhongyue Zhang, Xiaogang Wang, Ambrish Tyagi, and Amit Agrawal. Context encoding for semantic segmentation. In CVPR, 2018. +[54] Junting Zhang, Chen Liang, and C-C Jay Kuo. A fully convolutional tri-branch network (fctn) for domain adaptation. In ICASSP, 2018. +[55] Yang Zhang, Philip David, Hassan Foroosh, and Boqing Gong. A curriculum domain adaptation approach to the semantic segmentation of urban scenes. IEEE Trans. on PAMI, 2019. +[56] Yiheng Zhang, Zhaofan Qiu, Jingen Liu, Ting Yao, Dong Liu, and Tao Mei. Customizable architecture search for semantic segmentation. In CVPR, 2019. +[57] Yiheng Zhang, Zhaofan Qiu, Ting Yao, Dong Liu, and Tao Mei. Fully convolutional adaptation networks for semantic segmentation. In CVPR, 2018. +[58] Hengshuang Zhao, Xiaojuan Qi, Xiaoyong Shen, Jianping Shi, and Jiaya Jia. Icnet for real-time semantic segmentation on high-resolution images. In ECCV, 2018. +[59] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In CVPR, 2017. +[60] Xinge Zhu, Hui Zhou, Ceyuan Yang, Jianping Shi, and Dahua Lin. Penalizing top performers: Conservative loss for semantic segmentation adaptation. In ECCV, 2018. +[61] Yang Zou, Zhiding Yu, BVK Vijaya Kumar, and Jinsong Wang. Unsupervised domain adaptation for semantic segmentation via class-balanced self-training. In ECCV, 2018. \ No newline at end of file diff --git a/transferringandregularizingpredictionforsemanticsegmentation/images.zip b/transferringandregularizingpredictionforsemanticsegmentation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c7526fdd5dde78b6026b0f27874eb5a69ec7201b --- /dev/null +++ b/transferringandregularizingpredictionforsemanticsegmentation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c46301570d22133fa9b19f5abcd1710564ab3dd47a7597e441af661ec7dcacb +size 891053 diff --git a/transferringandregularizingpredictionforsemanticsegmentation/layout.json b/transferringandregularizingpredictionforsemanticsegmentation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..be439b258cc260a37cb9b850baaaed9957ebe9af --- /dev/null +++ b/transferringandregularizingpredictionforsemanticsegmentation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0b59a5a90754b0e9eafbda29b3da80965caf72f5e5310f8d397cc321500a219 +size 401797 diff --git a/transferringcrossdomainknowledgeforvideosignlanguagerecognition/783ce4c9-6ca2-46a8-b07e-9e9b3e4796a3_content_list.json b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/783ce4c9-6ca2-46a8-b07e-9e9b3e4796a3_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..de63dc29fb4ed115156ff6265fb3f9c358475a16 --- /dev/null +++ b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/783ce4c9-6ca2-46a8-b07e-9e9b3e4796a3_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a127aee20af8159e226250e56d94ed3df1b0c2bee3b427ed675e32069db5c64 +size 77138 diff --git a/transferringcrossdomainknowledgeforvideosignlanguagerecognition/783ce4c9-6ca2-46a8-b07e-9e9b3e4796a3_model.json b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/783ce4c9-6ca2-46a8-b07e-9e9b3e4796a3_model.json new file mode 100644 index 0000000000000000000000000000000000000000..abf72666579b1db7cf6c0f35b6a67467234a5be2 --- /dev/null +++ b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/783ce4c9-6ca2-46a8-b07e-9e9b3e4796a3_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67da9ca45e73b50d4df62db969cdfa644f8db54475d9245ca4cec9c9baf75080 +size 94176 diff --git a/transferringcrossdomainknowledgeforvideosignlanguagerecognition/783ce4c9-6ca2-46a8-b07e-9e9b3e4796a3_origin.pdf b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/783ce4c9-6ca2-46a8-b07e-9e9b3e4796a3_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..71d7c6bc6fb119337a67a13493b0beb6ef8ff871 --- /dev/null +++ b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/783ce4c9-6ca2-46a8-b07e-9e9b3e4796a3_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53edbafa3796224daf53f8a7ff66b6718eac256d70f79e6425de7a39be9065ff +size 1916914 diff --git a/transferringcrossdomainknowledgeforvideosignlanguagerecognition/full.md b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..9682a042fe7b2f9d5b7566a3bc4bced77fbb66b8 --- /dev/null +++ b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/full.md @@ -0,0 +1,323 @@ +# Transferring Cross-domain Knowledge for Video Sign Language Recognition + +Dongxu Li $^{1,2}$ , Xin Yu $^{1,2,3}$ , Chenchen Xu $^{1,4}$ , Lars Petersson $^{1,4}$ , Hongdong Li $^{1,2}$ $^{1}$ The Australian National University, $^{2}$ Australian Centre for Robotic Vision (ACRV), + $^{3}$ University of Technology Sydney, $^{4}$ DATA61-CSIRO + +firstname.lastname@anu.edu.au + +# Abstract + +Word-level sign language recognition (WSLR) is a fundamental task in sign language interpretation. It requires models to recognize isolated sign words from videos. However, annotating WSLR data needs expert knowledge, thus limiting WSLR dataset acquisition. On the contrary, there are abundant subtitled sign news videos on the internet. Since these videos have no word-level annotation and exhibit a large domain gap from isolated signs, they cannot be directly used for training WSLR models. + +We observe that despite the existence of large domain gaps, isolated and news signs share the same visual concepts, such as hand gestures and body movements. Motivated by this observation, we propose a novel method that learns domain-invariant descriptors and fertilizes WSLR models by transferring knowledge of subtitled news sign to them. To this end, we extract news signs using a base WSLR model, and then design a classifier jointly trained on news and isolated signs to coarsely align these two domains. In order to learn domain-invariant features within each class and suppress domain-specific features, our method further resorts to an external memory to store the class centroids of the aligned news signs. We then design a temporal attention based on the learnt descriptor to improve recognition performance. Experimental results on standard WSLR datasets show that our method outperforms previous state-of-the-art methods significantly. We also demonstrate the effectiveness of our method on automatically localizing signs from sign news, achieving 28.1 for $AP@0.5$ . + +# 1. Introduction + +Word-level sign language recognition (WSLR), as a fundamental sign language interpretation task, aims to overcome the communication barrier for deaf people. However, WSLR is very challenging because it consists of complex and fine-grained hand gestures in quick motion, body movements and facial expressions. + +Recently, deep learning techniques have demonstrated + +![](images/e846d8ed5679afb1168e4c67642682ae913243a43e4c67d74cd4ac06d09e9283.jpg) +Isolated Sign Words + +![](images/7988bab3a92ca31f8b468edb98fdd87892c3495c6bffa4317e31177ca4c386a7.jpg) +Web News Sign Words + +![](images/4d5ba8a13d0a7d96c6679bf1c97830d2d5473a62c31055a14885883aabee913c.jpg) +Figure 1: Our model transfers the knowledge from web news signs to WSLR models by learning domain-invariant features. Example frames in the figure are identified by our model as the signature that best summarizes the gesture. + +their advantages on the WSLR task [21, 14, 28, 16]. However, annotating WSLR datasets requires domain-specific knowledge, therefore even the largest existing datasets have a limited number of instances, e.g., on average 10 to 50 instances per word [21, 14, 26]. This is in an order of magnitude fewer than common video datasets [5] on e.g. action learning and recognition [5, 44]. The limited amount of training data for the sign recognition task may lead to overfitting or otherwise restrict the performance of WSLR models in real-world scenarios. On the other hand, there are abundant subtitled sign news videos easily attainable from the web which may potentially be beneficial for WSLR. + +Despite the availability of sign news videos, transferring such knowledge to WSLR is very challenging. First, subtitles only provide weak labels for the occurrence of signs and there is no annotation of temporal location or categories. Second, such labels are noisy. For example, a subtitle word does not necessarily indicate if the word is signed. Third, news signs typically span over 9-16 frames [4], which is significantly different from the videos (on average 60 frames [21, 14]) used to train WSLR models in terms of gesture speed. Therefore, directly augmenting WSLR + +datasets with news sign examples fails to improve recognition performance. + +In this paper, we present a method that transfers the cross-domain knowledge in news signs to improve the performance of WSLR models. More specifically, we first develop a sign word localizer to extract sign words by employing a base WSLR model in a sliding window manner. Then, we propose to coarsely align two domains by jointly training a classifier using news signs and isolated signs. After obtaining the coarsely-aligned news words representations, we compute and store the centroid of each class of the coarsely-aligned new words in an external memory, called prototypical memory. + +Since the shared visual concepts between these domains are important for recognizing signs, we exploit prototypical memory to learn such domain-invariant descriptors by comparing the prototypes with isolated signs. In particular, given an isolated sign, we first measure the correlations between the isolated sign and news signs and then combine the similar features in prototypical memory to learn a domain-invariant descriptor. In this way, we acquire representations of shared visual concepts across domains. + +After obtaining the domain-invariant descriptor, we propose a memory-augmented temporal attention module that encourages models to focus on distinguishable visual concepts among different signs while suppressing common gestures, such as demonstrating gestures (raising and putting down hands) in the isolated sign videos. Therefore, our network focuses on the visual concepts shared within each class and ignore those commonly appearing in different classes, thus achieving better classification performance. + +In summary, (i) we propose a coarse domain alignment approach by jointly training a classifier on news signs and isolated signs to reduce their domain gap; (ii) we develop prototypical memory and learn a domain-invariant descriptor for each isolated sign; (iii) we design a memory-augmented temporal attention over the representation of isolated signs and guide the model to focus on learning features from common visual concepts within each class while suppressing distracting ones, thus facilitating classifier learning; (iv) experimental results demonstrate that our approach significantly outperforms state-of-the-art WSLR methods on the recognition accuracy by a large margin of $12\%$ on WLASL and $6\%$ on MSASL. Furthermore, we demonstrate the effectiveness of our method on localizing sign words from sentences automatically, achieving 28.1 AP@0.5. Therefore, our method has a prominent potential for this process. + +# 2. Related Works + +Our work can be viewed as a semi-supervised learning method from weakly- and noisy-labelled data. In this section, we briefly review works in the relevant fields. + +![](images/e939f873ca247a73cb0f75408fd636985d951806a96ab82e1f02f46c376cfe3b.jpg) +(a) + +![](images/5f000c9e38b596575c201b619b8d57ce4e1dfdf2f8e0fb49e27474abebc48444.jpg) +(b) +Figure 2: Visualizing sign word training samples from two domains using t-SNE [25] before (a) and after (b) coarse domain alignment. Filled circles are isolated signs; empty crosses are news signs. Colors represent different classes. + +# 2.1. Word-level Sign Language Recognition + +Earlier WSLR models rely on hand-crafted features [39, 35, 38, 2, 9, 8]. Temporal dependencies are modelled using HMM [33, 32] or DTW [24]. Deep models learn spatial representations using 2D convolutional networks and model temporal dependencies using recurrent neural networks [21, 14]. Some methods also employ 3D convolutional networks to capture spatio-temporal features simultaneously [13, 40, 21, 14]. In addition, several works [18, 17] exploit human body keypoints as inputs to recurrent nets. It is well known that training deep models require a large amount of training data. However, annotating WSLR samples requires expert knowledge, and existing WSLR video datasets [14, 21] only contain a small number of examples, which limits the recognition accuracy. Our method aims at tackling this data insufficiency issue and improving WSLR models by collecting low-cost data from the internet. + +# 2.2. Semi-supervised Learning from Web Videos + +Some works [23, 41, 10] attempt to learn visual representations through easily-accessible web data. In particular, [23] combines curriculum learning [1] and self-pace learning [20] to learn a concept detector. [41] introduces a Q-learning based model to select and label web videos, and then directly use the selected data for training. Recently, [10] found that pretraining on million-scale web data improves the performance of video action recognition. These works demonstrate the usefulness of web videos in a semi-supervised setting. Note that, the collected videos are regarded as individual samples in prior works. However, our collected news videos often contain multiple signs in a video, which brings more challenges to our task. + +# 2.3. Prototypical Networks and External Memory + +Prototypical networks [31] aim at learning classification models in a limited-data regime [42]. During testing, proto- + +typical networks calculate a distance measure between test data and prototypes, and predict using nearest-neighbour principle. A prototypical network provides a distance-based partition of the embedding space and facilitates the retrieval based on the nearest neighbouring prototypes in its essence. + +External memory equips a deep neural network with capability of leveraging contextual information. They are originally proposed for document-level question answering (QA) problems in natural language processing [37, 34]. Recently, external memory mechanisms have been applied to visual tracking [27], image captioning [7], image classification [43] and movie comprehension [41]. In general, external memory often serves as a source providing additional offline information to the model during training and testing. + +# 3. Proposed Approach + +# 3.1. Notation + +A WSLR dataset with $N$ labeled training examples is denoted by $\mathcal{D}_s = \{I_i, L_i\}_{i=1}^N$ , where $I_i \in \mathbb{R}^{l \times h \times w \times 3}$ is an input RGB video; $l$ is the number of frames (on average 64); $h$ and $w$ are the height and width of the frame respectively, and $L_i \in \mathbb{R}^K$ is a label of $K$ classes. We also consider a complementary set of sign news data denoted by $\mathcal{D}_n = \{S_i, T_i\}_{i=1}^M$ . Similarly, $S_i$ is an RGB video, but with an average length of 300 frames. $T_i$ is a sequence of English tokens representing the subtitles corresponding to $S_i$ . + +# 3.2. Overview + +We observe that despite the domain difference between signs from news broadcasts and isolated signs, samples from the same class share some common visual concepts, such as hand gestures and body movements. In other words, these shared visual concepts are more suitable to represent the cross-domain knowledge and invariant to domain differences. Motivated by this intuition, we encourage models to learn such cross-domain features and exploit them to achieve better classification performance. + +To this end, we first extract news signs from $S_{i}$ and train a classifier jointly using news and isolated signs. In this fashion, we are able to coarsely align these two domains in the embedding space. Then, we exploit prototypes to represent the news signs and store in an external prototypical memory (Sec. 3.3). Furthermore, for each isolated sign video, we learn a domain-invariant descriptor from the external memory by measuring its correlation with the contents in each memory cell (Sec. 3.4). Based on our learnt domain-invariant descriptor, we design a memory-augmented temporal attention module to let isolated sign representation focus on temporally similar signing gestures, thus promoting the classification accuracy. Figure 3 illustrates an overview of our method. + +# 3.3. Constructing Prototypical Memory + +# 3.3.1 Extracting words from weakly-labelled videos + +In order to utilize the data from news broadcasts, we need to localize and extract news signs from the subtitled videos. Specifically, we first pre-process the subtitles by lemmatizing [29, 22] the tokens and convert lemmas into lowercase. Then, for each isolated sign class $c_{j}, j = 1,\dots,K$ , we collect video clips which contains the word $c_{j}$ in the processed subtitles. To do so, we apply a classifier $\mathcal{F}$ pretrained on isolated signs $\mathcal{D}_s$ to the collected videos in a sliding window manner. For each window, we acquire the classification score of each class $c_{j}$ . For each video $S_{i}$ , we choose the sliding window that achieves the highest classification score for $c_{j}$ , i.e., $s_{ij}^{*} = \operatorname{argmax}_{s_{i} \sqsubset S_{i}} \mathcal{F}(c_{j}|s_{i})$ , where $s_{i} \sqsubset S_{i}$ denotes that $s_{i}$ is a sliding window from $S_{i}$ . Lastly, we discard windows with a class score lower than a threshold $\epsilon$ . We use $S_{j}^{*}$ to denote the set of news sign video clips collected for $c_{j}$ , i.e., $S_{j}^{*} = \{s_{ij}^{*} \mid \forall i : \mathcal{F}(c_{j}|s_{ij}^{*}) > \epsilon\}$ . + +# 3.3.2 Joint training for coarse domain alignment + +Although $\mathcal{F}$ can exploit the knowledge learned from isolated signs to recognize news signs to some extent, we observe that $\mathcal{F}$ struggles to make confident predictions. In particular, $\mathcal{F}$ produces many false negatives and therefore misses valid news signs during the localization step. This is not surprising by acknowledging the domain gap. This phenomenon mainly comes from the domain gap between news signs and isolated ones. As can be seen in Figure 2a, the features of isolated signs and news ones exhibit different distributions, which is undesirable when transferring knowledge between these two domains. To tackle this issue, we propose to first train a classifier jointly using sign samples from both domains, denoted by $\tilde{\mathcal{F}}$ . + +We use I3D [5, 36] as the backbone network for both $\mathcal{F}$ and $\hat{\mathcal{F}}$ . For feature extraction, we remove its classification head and use the pooled feature maps from the last inflated inception submodule. Figure 2b shows the feature representations of these two domain videos after the coarse domain alignment, where the domain gap is significantly reduced. + +# 3.3.3 Prototypical memory + +In order to exploit the knowledge of news signs when classifying isolated signs, we adopt the idea of external memory. We propose to encode the knowledge of news signs into prototypical memory, where a prototype [31] is stored in a memory cell. Specifically, for class $c_{j}$ , we define its prototype $\mathbf{m}_{j}$ as the mean of the feature embeddings of all the samples in $c_{j}$ : + +$$ +\mathbf {m} _ {j} = \frac {1}{| S _ {j} ^ {*} |} \sum_ {s _ {i j} ^ {*} \in S _ {j} ^ {*}} \hat {\mathcal {F}} \left(s _ {i j} ^ {*}\right). \tag {1} +$$ + +![](images/15b064ddeca635bc38dc7995e5b71e9cbd8712a637073956deb7d6d586cc88fa.jpg) +Figure 3: Overview of our approach to transfer knowledge of coarsely aligned news signs to WSLR model using domain-invariant descriptor and memory-augmented temporal attention. + +A prototypical memory $\mathbf{M} \in \mathbb{R}^{K \times d}$ is constructed as an array of prototypes, i.e. $\mathbf{M} = [\mathbf{m}_1, \mathbf{m}_2, \dots, \mathbf{m}_K]$ , where $d$ is the dimension of the prototype features. + +Despite the abundance of sign news videos, the number of extracted samples is much less due to the domain gap. Recall that our classifier $\hat{\mathcal{F}}$ is able to minimize the domain gap. It would be a solution of using $\hat{\mathcal{F}}$ to re-collect samples. However, we observe that the performance of the classifier $\hat{\mathcal{F}}$ on WSLR decreases and using $\hat{\mathcal{F}}$ to select news sign video clips does not generate more news sign samples. This phenomenon can also be explained in Figure 2b. Since $\hat{\mathcal{F}}$ aims to minimize the domain gap, each cluster becomes less concentrated, which leads to the decrease of the classification accuracy. + +Prototype representation provides us with a robust way to represent news signs in a limited-data regime. It induces a partition of the embedding space based on a given similarity measurement, which facilitates effective retrieval of similar visual concepts encoded in the news signs. By arranging them in an external memory, we link our classification model to a knowledge base of high-level visual features. In the next section, we will explain how to use these memory cells to learn a domain-invariant descriptor and then employ the domain-invariant feature to promote WSLR model. + +# 3.4. Learning Domain-invariant Descriptor + +After the two domains are coarsely aligned, our method will focus on learning domain-invariant descriptor using the prototypical memory. In this way, we are able to extract the + +common concepts from these two domains. For a prototypical memory $\mathbf{M} \in \mathbb{R}^{K \times d}$ and an isolated sign feature $\mathbf{X} \in \mathbb{R}^{t \times d}$ , where $t$ is determined by the number of the video frames, our goal is to generate a class-specific common feature from the prototypical memory. + +Since $\mathbf{x}_i$ and $\mathbf{m}_i$ are extracted by two different backbone networks $\mathcal{F}$ and $\hat{\mathcal{F}}^1$ , these features are embedded in different spaces. Therefore, in order to measure the correlation between $\mathbf{X}$ and $\mathbf{M}$ , we employ two different projection matrices to project these two space in to a common one first and then compute their normalized dot product in the common embedding space: + +$$ +r (\mathbf {X}, \mathbf {M}) = \sigma \left[ \mathbf {X} \mathbf {W} _ {X} \left(\mathbf {M} \mathbf {W} _ {M}\right) ^ {T} \right], \tag {2} +$$ + +where $\sigma (\cdot)$ is a softmax function, i.e., $\sigma (z)_i = e^{z_i} / \sum_je^{z_j}$ applied in row-wise; $\mathbf{W}_X\in \mathbb{R}^{d\times d'}$ and $\mathbf{W}_M\in \mathbb{R}^{d\times d'}$ are two projection matrices for $\mathbf{X}$ and $\mathbf{M}$ , respectively. + +Eq. 2 defines the correlation between the isolated sign and the features in prototypical memory cells in the common embedding space. According to the feature correlations, we reweighted the features in the memory in the common embedding space, as follows: + +$$ +\mathbf {U} = r (\mathbf {X}, \mathbf {M}) \mathbf {M} \left(\mathbf {W} _ {M} + \mathbf {W} _ {\delta}\right), \tag {3} +$$ + +where the perturbation matrix $\mathbf{W}_{\delta} \in \mathbb{R}^{d \times d'}$ allows our model to compensate for the errors during the domain align- + +ment. We then map $\mathbf{U}$ back to the input space as a residual of $\mathbf{X}$ and finally acquire the domain-invariant descriptor $\mathbf{P} \in \mathbb{R}^{1 \times d}$ via maxpooling: + +$$ +\mathbf {Z} = \mathbf {U W} _ {u} + \mathbf {X}, \tag {4} +$$ + +$$ +\mathbf {P} = \operatorname {m a x p o o l} (\mathbf {Z}), \tag {5} +$$ + +where $\mathbf{W}_u\in \mathbb{R}^{d'\times d}$ is a linear mapping. Next, we explain how to utilize $\mathbf{P}$ to learn word sign representations. + +# 3.5. Memory-augmented Temporal Attention + +Since collecting isolated signs from continuous sentences involves a laborious frame-by-frame annotation process, existing isolated sign datasets are mostly collected in controlled environments for demonstration purposes. In particular, signs in isolated datasets often consist of demonstrating gestures, such as raising up or putting down the hands, and those gestures appear in sign videos regardless of words. This will increase the difficulty of learning a WSLR classifier since common gestures emerge in all the classes. A good WSLR model is supposed to focus on those discriminative temporal regions while suppressing demonstrating gestures. + +Our attention module is designed to capture salient temporal information using the similarity between the domain-invariant descriptor $\mathbf{P}$ and the isolated sign representation $\mathbf{X}$ . Since the domain-invariant descriptor $\mathbf{P}$ is acquired from the prototypical memory, we call our attention as memory-augmented temporal attention. Specifically, because $\mathbf{P}$ and $\mathbf{X}$ represent different semantics and lie in their own feature space, we compute their similarity matrix $\mathbf{S} \in \mathbb{R}^{1 \times t}$ by first projecting them into a shared common space: + +$$ +\mathbf {S} = \mathbf {P} \mathbf {W} _ {P} \left(\mathbf {X} \mathbf {W} _ {Q}\right) ^ {T}, \tag {6} +$$ + +where $\mathbf{W}_P$ , $\mathbf{W}_Q$ are linear mappings in $\mathbb{R}^{d\times d^{\prime \prime}}$ . This operation compares the domain-invariant descriptor with the feature of an isolated sign on each temporal region in a pairwise manner. Then we normalize the similarity matrix $\mathbf{S}$ with a softmax function to create the attention map $\mathbf{A}\in \mathbb{R}^{1\times t}$ : + +$$ +\mathbf {A} = \sigma (\mathbf {S}). \tag {7} +$$ + +Eq. 7 indicates that the attention map $\mathbf{A}$ describes the similarity of $\mathbf{P}$ and $\mathbf{X}$ in the embedded common space. To acquire the attended features for isolated signs, we design a scheme similar to squeeze-and-excitation [12]. In particular, we first introduce a linear mapping $\mathbf{W}_V\in \mathbb{R}^{d\times d^{\prime \prime}}$ to embed $\mathbf{X}$ to a low-dimensional space for attention operation and then lift it up back to the input space of $\mathbf{X}$ using linear mapping $\mathbf{W}_O\in \mathbb{R}^{d^{\prime \prime}\times d}$ with $d'' < d$ . Namely, our attended isolated sign representation $\mathbf{V}\in \mathbb{R}^{1\times d}$ is derived as follows: + +$$ +\mathbf {V} = \mathbf {A} \left(\mathbf {X} \mathbf {W} _ {V} \mathbf {W} _ {O}\right) \tag {8} +$$ + +Table 1: Statistics of datasets. We use #class to denote the number of different classes in each dataset; train, validation, test denote numbers of video samples in each split. + +
#classTrainValidationTest
WSASL100 [21]1001442338258
WSASL300 [21]3003548901668
MSASL100 [14]1003658 (-4%)1021 (-14%)749 (-1%)
MSASL200 [14]2006106 (-4%)1743 (-15%)1346 (-1%)
+ +We remark Eq. 8 aggregates features along channels and therefore learns a channel-wise non-mutually-exclusive relationship, while [12] aggregates feature maps across spatial dimension to produce descriptors for each channel. We then complement the feature representation of isolated signs with such channel-wise aggregated information by adding $\mathbf{V}$ as a residual to $\mathbf{P}$ for final classification. In this way, our model learns to concentrate on features from salient temporal regions and explicitly minimizes the influence of irrelevant gestures. + +# 3.6. Optimization + +We adopt the binary cross-entropy loss function as in [5]. Specifically, given a probability distribution $p$ over different classes of signs, the loss $\mathcal{L}$ is computed as: + +$$ +\mathcal {L} = - \frac {1}{N K} \sum_ {i = 1} ^ {N} \sum_ {j = 1} ^ {K} \left[ y _ {i j} \log \left(p _ {i j}\right) + \left(1 - y _ {i j}\right) \log \left(1 - p _ {i j}\right) \right] +$$ + +where $N$ is the number of samples in the batch; $K$ is the number of classes; $p_{ij}$ denotes the probability for the $i$ -th sample belonging to the $j$ -th class, and $y$ is the label of the sample. + +# 4. Experiments + +# 4.1. Setup and Implementation Details + +Datasets. We evaluate our model on the WLASL [21] and MSASL [14] datasets. Both datasets are introduced recently supporting large-scale word-level sign language recognition. These videos record native American Sign Language (ASL) signers or interpreters, demonstrating how to sign a particular English word in ASL. We note that some links used to download MSASL videos have expired and the related videos are not accessible. As a result, we obtain $7\%$ less data for training ([21, 14] use both training and validation data for retraining models) and $1\%$ fewer videos for testing on MSASL. Therefore, results on MSASL should be taken as indicative. Detailed dataset statistics2 are summarized in Table 1. In all experiments we follow public dataset split released by the dataset authors. + +![](images/d63aade1635f9da3b262f66cb049d4757214bd82fb6631b2101c8fb59a519345.jpg) +Figure 4: Visualization of memory-augmented temporal attention on WLASL and MSASL. We present the extracted news signs in red boxes and isolated signs in green boxes. We use red to represent high-attention regions and light yellow for low-attention regions. + +Implementation details. Inflated 3D ConvNet (I3D) [5] is a 3D convolutional network originally proposed for action recognition. Considering its recent success on WSLR [21, 14], we use I3D as our backbone network and initialize it with the pretrained weights on Kinetics [5]. When extracting the word samples, we choose sliding windows of sizes $9\sim 16$ considering the common time span for a sign word [4]. We set threshold $\epsilon$ for localizing news signs to 0.3 for WLASL100 and MSASL100, and to 0.2 for WLASL300 and MSASL200, respectively. + +Training and testing. We observe that although WLASL and MSASL datasets are collected from the different Internet sources, they have some videos in common. In order to avoid including testing videos in the training set, we do not merge the training videos from the two datasets. Instead, we train and test models on these two datasets separately. + +Our training and testing strategies follow [21, 14]. Specifically, during training, we apply both spatial and temporal augmentation. For spatial augmentations, we randomly crop a square patch from each frame. We also apply random horizontal flipping to videos because horizontally mirroring operation does not change the meaning of ASL signs. For temporal augmentation, we randomly choose 64 consecutive frames and pad shorter videos by repeating frames. We train our model using the Adam optimizer [15] with an initial learning rate of $10^{-3}$ and a weight decay of $10^{-7}$ . During testing, we feed an entire video into the model. Similar to [21, 14], we choose hyper-parameters + +on the training set, and report results by retraining on both training and validation sets using the optimal parameters. + +# 4.2. Qualitative Results + +Visualizing memory-augmented attention We visualize the output of the memory-augmented temporal attention in Fig. 4. The first example is the word "jacket" from WLASL. It can be seen that the temporal attention module filters out the starting and ending gestures in the video and learns to focus on the middle part of the video, where the sign is performed. The second example is the word "brown" from MSASL. In this case, the attention map shows two peaks. By examining the video, we find that the sign is actually performed twice in a row with a slight pause in between. + +Generating sign signatures The temporal attention facilitates to select representative frames from sign videos, referred to as "sign signatures". In Fig. 1, the sign signatures are selected from the frames with the highest attention score from testing examples. The sign signatures generated by our model are visually consistent with those manually identified from the news signs. A potential usage for sign signatures is to help to automatically create summary, e.g., thumbnails, for videos on sign language tutorial websites. + +# 4.3. Baseline Models + +We compare with two baseline WSLR models, i.e., Recurrent Convolutional Neural Networks (RCNN) and I3D. Both RCNN and I3D are suggested in [21, 14] to model the + +Table 2: Recognition accuracy $(\%)$ on WLASL. RCNN refers to the Recurrent Convolution Neural Networks; I3D refers to the plain I3D setting; I3D + n.w. denotes the setting where extracted news words are directly added into the training set. We use macro. to denote the macro average accuracy and use micro. to denote the micro average accuracy. $(^{*})$ Results of MSASL are indicative due to the missing training data. + +
WLASL100WLASL300MSASL100*MSASL200*
micro. top1top5macro. top1top5micro. top1top5macro. top1top5micro. top1top5macro. top1top5micro. top1top5macro. top1top5
RCNN [21, 14]25.9755.0425.2854.1319.3146.5618.9345.7615.7539.1216.3439.168.8426.008.4925.94
I3D [21, 14]65.8984.1167.0184.5856.1479.9456.2478.3880.9193.4681.9494.1374.2990.1275.3290.80
I3D + n.w.61.6382.5662.1882.7254.1980.6954.7180.9977.7093.5975.4190.3475.4090.3476.6890.69
Ours77.5291.0877.5591.4268.5689.5268.7589.4183.0493.4683.9193.5280.3191.8281.1492.24
+ +spatio-temporal information in word-level sign videos and achieve state-of-the-art results on both datasets. + +RCNN. In RCNN, it uses a 2D convolutional network to extract spatial features on frames. Then recurrent neural networks, such as GRU [6] or LSTM [11], are stacked on top of the convolutional network to model temporal dependencies. In our experiment, we use the implementation from [21] which uses a two-layer GRU on top of VGG-16. + +I3D. I3D [5] is a 3D convolutional neural network that inflates the convolution filters and pooling layers of 2D convolutional networks. I3D is recently adapted for WSLR [21, 14] and achieves a prominent recognition accuracy. For WLASL, we use pretrained weights from the authors of [21]. For MSASL, we report our reproduced results. + +# 4.4. Quantitative Results + +# 4.4.1 Comparison of Recognition Performance + +We report recognition performance on two metrics: (i) macro average accuracy (macro.), which measures the accuracy for each class independently and calculates the average, as reported in [14]; (ii) micro average accuracy (micro.), which calculates the average per-instance accuracy, as reported in [21]. We summarize the results in Table 2. + +In Table 2, I3D+n.w. results indicate that directly adding news signs to the training set does not help the training and even harms the model performance in most cases. This demonstrates the influence of the domain gap. Moreover, the degradation in performance also reveals the challenge of transferring knowledge from the news words to the WSLR models. We also notice that on MSASL200, the recognition accuracy improves after adding the news words despite the large domain gap. Although the improvement is minor, this shows the validity of our collected news sign videos. + +As Table 2 shows, RCNN performs poorly mainly because its limited capacity to capture temporal motion dependency. Our proposed method surpasses previous state-of-the-art I3D model on both datasets. Because we use the same backbone network (I3D) as the baseline models, we conclude that the improvements come from the knowledge transferred from news words. Since the news words do not + +exhibit irrelevant artefacts such as idling and arm raising, they let the model focus more on the actual signing part in isolated words and produce more robust features. + +We observe that our proposed model outperforms previous state-of-the-art by a large margin on WLASL. This is because WLASL has even fewer examples (13-20 in each class) compared to MSASL (40-50). For fully supervised models, the number of examples in WLASL is very scarce and it requires an efficient way to learn good representations. In this regard, our proposed approach is able to transfer the knowledge from the news words and helps the learning process in such a limited-data learning regime. + +# 4.4.2 Word-level Classifier as Temporal Localization + +Lack of training data is one of the main obstacles for both word-level and sentence-level sign language recognition tasks [3]. One such problem for sentence-level sign recognition is the lack of accurate temporal boundary annotations for signs, which can be useful for tasks such as continuous sign language recognition [19]. We employ our word-level classifier as a temporal localizer to provide automatic annotations for temporal boundaries of sign words in sentences. Setup. Since there is no ASL dataset providing frame-level temporal annotations, we manually annotate temporal boundaries for 120 random news word instances to validate our ideas. The word classes are from WLASL100. Our expert annotators are provided with a news sentence and a isolated sign video. They are asked to identify the starting and end frame of the sign word in the news sentence. + +Annotation quality control. We use temporal-IoU (tIoU) to verify the annotation quality, which is widely used to evaluate temporal action localization results [30]. For the two time intervals $I_{1}$ and $I_{2}$ , their tIoU is computed as $\mathrm{tIoU} = (I_1\cap I_2) / (I_1\cup I_2)$ . The initial average tIoU between the annotations is 0.73. We discard those entries with tIoU<0.5. For the remaining entries, an agreement is reached by discussion. We keep 102 annotated entries. + +Results. We demonstrate the improvement of the word recognizer by localization accuracy. To this end, we employ classifiers in a sliding window fashion of 9-16 frames and + +Table 3: Comparison on temporal localization of sign words by mAP. Columns are different tIoU levels. + +
tIoU0.10.30.50.7
plain I3D [21, 14]27.423.915.302.4
Ours42.838.128.108.1
+ +identify a sign word if the predicted class probability is larger than 0.2. We compare I3D with our model by computing mAP at different tIoUs. As shown in Table 3, our method achieves higher localization performance. and provides an option for automatic temporal annotations. + +# 4.5. Analysis and Discussions + +We investigate the effect of different components of our model by conducting experiments on WLASL100. + +Effect of coarse domain alignment. We first study the effect of coarse domain alignment as mentioned in Sec. 3.3.2. To this end, we extract features for news signs using classifier $\mathcal{F}$ without coarse alignment, and store class centroids as memory. In Table 4, the model achieves better performance when coarse alignment is used. By training $\hat{\mathcal{F}}$ jointly on samples from two domains, the classifier aligns the domains in the embedding space. And when coarse domain alignment is not applied, the domain gap leads to less relevant prototypes and prevents from learning good domain-invariant features. + +Effect of cross-domain knowledge. To investigate the influence of cross-domain knowledge, we explore three settings to produce the prototypical memory: (i) simulating the case where only isolated signs are available. As an alternative, we use $\mathcal{F}$ to extract features for isolated signs and use their class centroids as memory. In the remaining two settings, we investigate the effectiveness of news sign prototypes. To this end, we use $\hat{\mathcal{F}}$ to extract features for both isolated and news sign words: (ii) employing centroids of only isolated word features as memory; (iii) using both isolated and news word features to compute centroids. + +As seen in Table 5, only using the aligned model with news signs as memory achieves best performance. We further analyze performance degradation in other settings as follows. Setting (i), the model only retrieves information from the isolated signs thus does not benefit from cross-domain knowledge. Setting (ii), the representations of isolated signs are compromised due to the coarse alignment, thus providing even worse centroids than (i). Setting (iii), averaging cross-domain samples produces noisy centroids since their embeddings are not well clustered. + +# 5. Conclusion + +In this paper, we propose a new method to improve the performance of sign language recognition models by lever + +Table 4: Effect of coarse domain alignment on the recognition accuracy (\%). The "wo. coarse align." row denotes the setting without coarse domain alignment. The "w. coarse align." row shows results with coarse domain alignment. + +
micro.macro.
top1top5top1top5
wo. coarse align.70.9387.2171.3086.25
w. coarse align.77.5291.0877.5591.42
+ +Table 5: Effect of sign news on the recognition accuracy $(\%)$ . Rows correspond to different settings to produce external memory. The "model" column shows the model to extract features, with $\mathcal{F}$ the plain I3D and $\hat{\mathcal{F}}$ the I3D after coarse alignment. The "memory" column indicates whether isolated signs (iso.) or news signs (news) are used. + +
modelmemorymicro.macro.
iso.newstop1top5top1top5
F✓X72.4889.9272.8089.80
F✓X72.0987.2172.3886.75
F✓✓66.6786.0567.2786.13
FX✓77.5291.0877.5591.42
+ +aging cross-domain knowledge in the subtitled sign news videos. We coarsely align isolated signs and news signs by joint training and propose to store class centroids in prototypical memory for online training and offline inference purpose. Our model then learns a domain-invariant descriptor for each isolated sign. Based on the domain-invariant descriptor, we employ temporal attention mechanism to emphasize class-specific features while suppressing those shared by different classes. In this way, our classifier focuses on learning features from class-specific representation without being distracted. Benefiting from our domain-invariant descriptor learning, our classifier not only outperforms the state-of-the-art but also can localize sign words from sentences automatically, significantly reducing the laborious labelling procedure. + +Acknowledgement. HL's research is funded in part by the ARC Centre of Excellence for Robotics Vision (CE140100016), ARC-Discovery (DP 190102261) and ARC-LIEF (190100080) grants, as well as a research grant from Baidu on autonomous driving. The authors gratefully acknowledge the GPUs donated by NVIDIA Corporation. We thank all anonymous reviewers and ACs for their constructive comments. + +# References + +[1] Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In Proceedings of the 26th annual international conference on machine learning, pages 41-48. ACM, 2009. +[2] C Fabian Benitez-Quiroz, Kadir Gokgoz, Ronnie B Wilbur, and Aleix M Martinez. Discriminant features and temporal structure of nonmanuals in american sign language. PloS one, 9(2), 2014. +[3] Danielle Bragg, Oscar Koller, Mary Bellard, Larwan Berke, Patrick Boudreault, Annelies Braffort, Naomi Caselli, Matt Huenerfauth, Hernisa Kacorri, Tessa Verhoef, et al. Sign language recognition, generation, and translation: An interdisciplinary perspective. In The 21st International ACM SIGACCESS Conference on Computers and Accessibility, pages 16-31. ACM, 2019. +[4] Patrick Buehler, Andrew Zisserman, and Mark Everingham. Learning sign language by watching tv (using weakly aligned subtitles). In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 2961-2968. IEEE, 2009. +[5] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6299-6308, 2017. +[6] Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. +[7] Cesc Chunseong Park, Byeongchang Kim, and Gunhee Kim. Attend to you: Personalized image captioning with context sequence memory networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 895-903, 2017. +[8] Helen Cooper, Eng-Jon Ong, Nicolas Pugeault, and Richard Bowden. Sign language recognition using sub-units. Journal of Machine Learning Research, 13(Jul):2205-2231, 2012. +[9] Liya Ding and Aleix M Martinez. Modelling and recognition of the linguistic components in american sign language. Image and vision computing, 27(12):1826-1844, 2009. +[10] Deepti Ghadiyaram, Du Tran, and Dhruv Mahajan. Large-scale weakly-supervised pre-training for video action recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12046-12055, 2019. +[11] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997. +[12] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7132-7141, 2018. +[13] Jie Huang, Wengang Zhou, Houqiang Li, and Weiping Li. Sign language recognition using 3d convolutional neural networks. In 2015 IEEE international conference on multimedia and expo (ICME), pages 1-6. IEEE, 2015. +[14] Hamid Reza Vaezi Joze and Oscar Koller. Ms-asl: A large-scale data set and benchmark for understanding american sign language. arXiv preprint arXiv:1812.01053, 2018. + +[15] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. +[16] PVV Kishore, G Anantha Rao, E Kiran Kumar, M Teja Kiran Kumar, and D Anil Kumar. Selfie sign language recognition with convolutional neural networks. International Journal of Intelligent Systems and Applications, 10(10):63, 2018. +[17] Sang-Ki Ko, Chang Jo Kim, Hyedong Jung, and Choongsang Cho. Neural sign language translation based on human keypoint estimation. Applied Sciences, 9(13):2683, 2019. +[18] Sang-Ki Ko, Jae Gi Son, and Hyedong Jung. Sign language recognition with recurrent neural network using human keypoint detection. In Proceedings of the 2018 Conference on Research in Adaptive and Convergent Systems, pages 326-328. ACM, 2018. +[19] Oscar Koller, Sepehr Zargaran, and Hermann Ney. Re-sign: Re-aligned end-to-end sequence modelling with deep recurrent cnn-hmms. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4297-4305, 2017. +[20] M Pawan Kumar, Benjamin Packer, and Daphne Koller. Self-paced learning for latent variable models. In Advances in Neural Information Processing Systems, pages 1189-1197, 2010. +[21] Dongxu Li, Cristian Rodriguez, Xin Yu, and Hongdong Li. Word-level deep sign language recognition from video: A new large-scale dataset and methods comparison. In The IEEE Winter Conference on Applications of Computer Vision, pages 1459-1469, 2020. +[22] Hongwei Li, Sirui Li, Jiamou Sun, Zhenchang Xing, Xin Peng, Mingwei Liu, and Xuejiao Zhao. Improving api caveats accessibility by mining api caveats knowledge graph. In 2018 IEEE International Conference on Software Maintenance and Evolution (ICSME), pages 183-193. IEEE, 2018. +[23] Junwei Liang, Lu Jiang, Deyu Meng, and Alexander G Hauptmann. Learning to detect concepts from webly-labeled video data. +[24] Jeroen F Lichtenauer, Emile A Hendriks, and Marcel JT Reinders. Sign language recognition by combining statistical dtw and independent classification. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(11):2040-2046, 2008. +[25] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579-2605, 2008. +[26] Aleix M Martínez, Ronnie B Wilbur, Robin Shay, and Avinash C Kak. Purdue rvl-slll asl database for automatic recognition of american sign language. In Proceedings. Fourth IEEE International Conference on Multimodal Interfaces, pages 167-172. IEEE, 2002. +[27] Seil Na, Sangho Lee, Jisung Kim, and Gunhee Kim. A read-write memory network for movie story understanding. In Proceedings of the IEEE International Conference on Computer Vision, pages 677-685, 2017. +[28] Lionel Pigou, Mieke Van Herreweghe, and Joni Dambre. Gesture and sign language recognition with temporal residual networks. In The IEEE International Conference on Computer Vision (ICCV) Workshops, Oct 2017. + +[29] Hinrich Schütze, Christopher D Manning, and Prabhakar Raghavan. Introduction to information retrieval. In Proceedings of the international communication of association for computing machinery conference, page 260, 2008. +[30] Zheng Shou, Dongang Wang, and Shih-Fu Chang. Temporal action localization in untrimmed videos via multi-stage cnns. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1049-1058, 2016. +[31] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, pages 4077-4087, 2017. +[32] Thad Starner, Joshua Weaver, and Alex Pentland. Real-time american sign language recognition using desk and wearable computer based video. IEEE Transactions on pattern analysis and machine intelligence, 20(12):1371-1375, 1998. +[33] Thad E Starner. Visual recognition of american sign language using hidden markov models. Technical report, Massachusetts Inst Of Tech Cambridge Dept Of Brain And Cognitive Sciences, 1995. +[34] Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Advances in neural information processing systems, pages 2440-2448, 2015. +[35] Alaa Tharwat, Tarek Gaber, Aboul Ella Hassanien, Mohamed K Shahin, and Basma Refaat. Sift-based arabic sign language recognition system. In Afro-european conference for industrial advancement, pages 359-370. Springer, 2015. +[36] Lei Wang, Piotr Koniusz, and Du Q Huynh. Hallucinating idt descriptors and i3d optical flow features for action recognition with cnns. In Proceedings of the IEEE International Conference on Computer Vision, pages 8698-8708, 2019. +[37] Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. arXiv preprint arXiv:1410.3916, 2014. +[38] Quan Yang. Chinese sign language recognition based on video sequence appearance modeling. In 2010 5th IEEE Conference on Industrial Electronics and Applications, pages 1537-1542. IEEE, 2010. +[39] Farhad Yasir, PW Chandana Prasad, Abeer Alsadoon, and Amr Elchouemi. Sift based approach on bangla sign language recognition. In 2015 IEEE 8th International Workshop on Computational Intelligence and Applications (IW-CIA), pages 35-39. IEEE, 2015. +[40] Yuancheng Ye, Yingli Tian, Matt Huenerfauth, and Jingya Liu. Recognizing american sign language gestures from within continuous videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 2064-2073, 2018. +[41] Serena Yeung, Vignesh Ramanathan, Olga Russakovsky, Liyue Shen, Greg Mori, and Li Fei-Fei. Learning to learn from noisy web videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5154–5162, 2017. +[42] Hongguang Zhang, Jing Zhang, and Piotr Koniusz. Few-shot learning via saliency-guided hallucination of samples. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2770-2779, 2019. +[43] Kaihao Zhang, Wenhan Luo, Lin Ma, and Hongdong Li. Cousin network guided sketch recognition via latent attribute + +warehouse. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 9203-9210, 2019. +[44] Kaihao Zhang, Wenhan Luo, Lin Ma, Wei Liu, and Hongdong Li. Learning joint gait representation via quintuplet loss minimization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4700-4709, 2019. \ No newline at end of file diff --git a/transferringcrossdomainknowledgeforvideosignlanguagerecognition/images.zip b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..fd8fdda8abba210d12f5b22de62c915ad8a13b56 --- /dev/null +++ b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afc988fc71ad3d10aea538a2d8d6e3807df6c2918584ecaeb1d9cbb47bea1df8 +size 429147 diff --git a/transferringcrossdomainknowledgeforvideosignlanguagerecognition/layout.json b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..980b8e1bffb435b889f5e48c5e414b7f76941f4d --- /dev/null +++ b/transferringcrossdomainknowledgeforvideosignlanguagerecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ceebe874aa5729ea76655e0fa240fc6956d5bfff9261c2d7dc33282ac08a270 +size 406155 diff --git a/transferringdenseposetoproximalanimalclasses/3d0d6ddb-f364-4b9d-a54b-c3a415458c3e_content_list.json b/transferringdenseposetoproximalanimalclasses/3d0d6ddb-f364-4b9d-a54b-c3a415458c3e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..89961d5db54033c62d1d2b6394dcc1e06912de23 --- /dev/null +++ b/transferringdenseposetoproximalanimalclasses/3d0d6ddb-f364-4b9d-a54b-c3a415458c3e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:576aa2af026b84733e9474d85822453e46b3076f7196ce533bb5db09b8ab52a3 +size 78070 diff --git a/transferringdenseposetoproximalanimalclasses/3d0d6ddb-f364-4b9d-a54b-c3a415458c3e_model.json b/transferringdenseposetoproximalanimalclasses/3d0d6ddb-f364-4b9d-a54b-c3a415458c3e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ed6e31ea64ea214bbdae92dd5d81d13920fe1162 --- /dev/null +++ b/transferringdenseposetoproximalanimalclasses/3d0d6ddb-f364-4b9d-a54b-c3a415458c3e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b39d3e5b21965e0cb54557e2f01b9e0081966c85356a6daad64177623ec78fe2 +size 101978 diff --git a/transferringdenseposetoproximalanimalclasses/3d0d6ddb-f364-4b9d-a54b-c3a415458c3e_origin.pdf b/transferringdenseposetoproximalanimalclasses/3d0d6ddb-f364-4b9d-a54b-c3a415458c3e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..979cdc804854c9629a9835375f512af54666dac6 --- /dev/null +++ b/transferringdenseposetoproximalanimalclasses/3d0d6ddb-f364-4b9d-a54b-c3a415458c3e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d646b8b7a59365be04d76516e1e33f1a753baba0db11bf5ea743ac9a1a9459a3 +size 972350 diff --git a/transferringdenseposetoproximalanimalclasses/full.md b/transferringdenseposetoproximalanimalclasses/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7f2c5f989ff3fb7c0021af23dbae553f2fc36e87 --- /dev/null +++ b/transferringdenseposetoproximalanimalclasses/full.md @@ -0,0 +1,345 @@ +# Transferring Dense Pose to Proximal Animal Classes + +Artsiom Sanakoyeu* +Heidelberg University + +Vasil Khalidov +Facebook AI Research + +Maureen S. McCarthy +MPI for Evolutionary Anthropology + +Andrea Vedaldi +Facebook AI Research + +Natalia Neverova +Facebook AI Research + +![](images/21aaa916f5dd6347455dfb56f548bb394c4782bb845a16bd93ed0622fba13867.jpg) +Figure 1: We consider the problem of dense pose labelling in animal classes. We show that, for proximal to humans classes such as chimpanzees (left), we can obtain excellent performance by learning an integrated recognition architecture from existing data sources, including DensePose for humans as well as detection and segmentation information from other COCO classes (right). The key is to establish a common reference (middle), which we obtain via alignment of the reference models of the animals. This enables training a model for the target class without having to label a single example image for it. Source image credit, on the left: [52, 48, 42, 57, 60, 34], on the right: COCO dataset [29]. + +![](images/80136dc8398ebf8cecf24cf7a919ad6c78aa389b4ff28906b7e071b83370c7bf.jpg) + +![](images/c54783cc129886368f3cba2161d0bcac3659459c5cd420275292a8428f5f4f53.jpg) + +![](images/965901e72e7fc62dc111532c50b6c4399aa2dcc56675511b25b7625b56dddf76.jpg) + +![](images/1d4e9e0f4331461d9b8d33e45d17c268813845e1a153f78d5795bbafebf0afa7.jpg) + +![](images/a68deb0b8554d74b289058f07b8e25b76f0a4185d81aa3593b3bdde393338613.jpg) + +target category (animals) + +reference 3D model + +reference category (human) + +# Abstract + +Recent contributions have demonstrated that it is possible to recognize the pose of humans densely and accurately given a large dataset of poses annotated in detail. In principle, the same approach could be extended to any animal class, but the effort required for collecting new annotations for each case makes this strategy impractical, despite important applications in natural conservation, science and business. We show that, at least for proximal animal classes such as chimpanzees, it is possible to transfer the knowledge existing in dense pose recognition for humans, as well as in more general object detectors and segmenters, to the problem of dense pose recognition in other classes. We do this by (1) establishing a DensePose model for the new animal which is also geometrically aligned to humans (2) introducing a multi-head R-CNN architecture that facilitates transfer of multiple recognition tasks between classes, (3) finding which combination of known classes can be transferred most effectively to the new animal and (4) using self-calibrated uncertainty heads to generate pseudo-labels graded by quality for training a model for this class. We also introduce two benchmark datasets labelled in the manner of DensePose for the class chimpanzee and use them to evaluate our approach, showing excellent transfer learning performance. + +# 1. Introduction + +In the past few years, computer vision has made significant progress in human pose recognition. Deep networks can effectively detect and segment humans [17], localize their sparse 2D keypoints [41], lift these 2D keypoints to 3D [43], and even fit complex 3D models such as SMPL [22, 23], all from a single picture or video. DensePose [14] has shown that it is even possible to estimate a dense parameterization of pose by mapping individual image pixels to a canonical embedding space for the human body. + +Such advances have been made possible by the introduction of large human pose datasets manually annotated with sparse or dense 2D keypoints, or even in 3D by means of capture systems such as domes. For example, the DensePose-COCO dataset [14] contains 50K COCO images manually annotated with more than 5 millions human body points. Clearly, collecting such data is very tedious, but is amply justified by the importance of human understanding in applications. However, the natural world contains much more than just people. For example, as of today scientists have identified 6,495 species of mammals, 60k vertebrates and 1.2M invertebrates [1]. The methods that have been developed for human understanding could likely be applied to most of these animals as well, provided that one is willing to incur the data annotation burden. Unfortunately, while the + +applications of animal pose recognition in conservation, natural sciences, and business are numerous, just learning about one more animal may be difficult to justify economically, let alone learning about all animals. + +Yet, there is little reason to believe that these challenges are intrinsic. Humans can understand the pose of most animals almost immediately, with good accuracy, and without requiring any data annotations at all. Furthermore, images and videos of animals are abundant, so the bottleneck is the inability of machines to learn without external supervision. + +In this paper, we thus consider the problem of learning to recognize the pose of animals with as little supervision as possible. However, rather than starting from scratch, we want to make use of the rich annotations that are already available for several animals, and humans in particular. Thus, we focus on the problem of taking the existing annotated data as well as additional unlabelled images and videos of a target animal species and learn to recognize the pose of the latter. Furthermore, for this study we restrict our attention to an animal species that is reasonably close to the available annotations, and elect to focus on the particular example of chimpanzees due to their evolutionary closeness to humans.* However, the findings in this paper are likely to generalize to many other classes as well. + +We make several contributions in this work. First, we introduce a dataset for chimpanzees, DensePose-Chimps, labelled in the DensePose fashion, which we mostly use to assess quantitatively the performance of our methods. We carefully design the canonical mapping for chimpanzees to be compatible with the one for humans in the original DensePose-COCO, in the sense that points in the two animal models are in as close a correspondence as possible. This is important to be able to transfer dense pose recognition results from humans to chimpanzees while being able to assess the quality of the obtained results. + +Second, we study in detail several strategies to transfer existing animal detectors, segmenters, and dense pose extractors from the available annotated data to chimpanzees. In particular, while dense pose annotations exist only for humans, bounding box and mask annotations have been collected for several other object categories as well. As a representative source dataset we thus consider COCO and we investigate how the different COCO classes can be combined to train an object detector and segmenter that transfers optimally to chimpanzees. Surprisingly, we find that transfer from humans alone is not optimal, nor human is the best class for training a model for chimpanzees. In addition to the DensePose-Chimps data, we collect human annotations for instance masks on the Chimp&See $\dagger$ videos of chimpanzees + +captured with camera traps in the wild to evaluate the detection performance in the most challenging conditions (with severe occlusions, low visibility and motion blur). + +Finally, we propose a framework for augmenting and adapting the human DensePose datasets to new species by self-supervision and pseudo-labeling with zero ground truth annotations on the target class. + +# 2. Related work + +Human pose recognition. There is abundant work on the recognition of human body pose, both in 2D and in 3D. Given that our focus is 2D pose recognition, we discuss primarily the first class of methods. 2D human pose recognition has flourished by the introduction of deep neural networks [56, 41, 10] trained on large manually-annotated datasets of images and videos such as COCO [30], MPII [4], Leeds Sports Pose Dataset (LSP) [20, 21], PennAction [61] and Posetrack [3]. Furthermore, Dense Pose [14] has introduced a dataset with dense surface point annotations, mapping images to a UV representation of a parametric 3D human model (SMPL) [32]. + +While all such approaches are strongly-supervised, there are also methods that attempt to learn pose in a completely unsupervised manner [6, 50, 8, 51, 47, 49, 33, 62]. Unfortunately, this technology is not sufficiently mature to compete with strong supervision in the wild. + +Animal pose recognition. Also related to our work, several authors have learned visual models of animals for the purpose of detection, segmentation, and pose recognition. Some animals are included in almost all general-purpose 2D visual recognition datasets, and in COCO in particular. Hence, all recent detectors and segmenters have been tested on at least a few animal classes. + +For pose recognition, however, the existing body of research is more restricted. Some recent papers have focused on designing pose estimation systems and benchmarks for particular animal species such as Amur tigers [28], cheetahs [38] or drosophila melanogaster flies [15]. There have been a number of large efforts on designing annotation tools for animals, such as DeepLabCut [35] and Anipose [24]. These tools also provide functionality for lifting 2D keypoints to 3D by using multiple views and triangulation. A more detailed overview on applying computer vision and machine learning methodology in neuroscience and zoology is given in [36]. One of the main challenges in this field remains the narrow focus of existing research on specific kinds of animals and particular environments. + +There have been few works focusing on the problem of animal understanding from visual data alone and in a more systematic way. This includes the estimation of facial landmarks through domain adaptation [59, 45], and very recently full body pose estimation [9] of four-legged animals by com + +![](images/eabdbf550e6a975e8f1b67491e983edfe5f86af75da04aa2e83d057ee06acc61.jpg) +(a) 3D model charting + +![](images/4cf1471f1d380df0ba75e6422931a2670c8c60baa8ae3aac95dca98c39e53301.jpg) +(b) established dense mapping human $\Leftrightarrow$ chimpanzee +Figure 2: 3D shape re-mapping from the SMPL model for humans to new object categories (chimps). Manually defined semantic charting (a) on both models is used to establish dense correspondences (b) based on continuous semantic descriptors + +bining large-scale human datasets with a smaller number of animal annotations in a cross-domain adaptation framework. Finally, a line of work from Zuffi et al. [65, 64, 63] is exploring the problem of model-based 3D pose and shape estimation for animal classes. Their research is based on parametric linear model, Skinned Multi-Animal Linear (SMAL), obtained from 3D scans of toy animals and having the capacity to represent multiple classes of mammals. SMAL is the animal analogous of the popular SMLP [31] model for humans. It has since been used in other publications [7] for 3D animal reconstruction, but these methods may still be insufficiently robust for deployment in the wild. + +Unsupervised and less supervised pose recognition. Recent methods such as [50, 51, 49, 19, 62, 33] learn sparse and dense object landmarks for simple classes without making use of any annotation, but are too fragile to be used in our application. Also relevant to our work, Slim DensePose [40] looked at reducing the number of annotations required to learn a good DensePose model for humans. + +Self-training for dense prediction. A recent study [58] has demonstrated effectiveness of self-training on the task of image classification when scaled to large amounts of unlabeled data. Pseudo-labeling by averaging predictions from multiple transformed versions of unlabeled samples has been shown effective for keypoint estimation [44]. However, there has been very little research on self-training in the context of dense prediction tasks. A recent work [5] explored the idea of self-training for segmentation of seismic images and showed promising results on this task for the first time. + +# 3. Method + +We wish to develop a methodology to learn Dense Pose models for new classes with minimal annotation effort. Existing labelled datasets for object detection, segmentation and pose estimation, provide a significant source of supervision that can be harnessed for this task. For detection and segmentation, COCO provide extensive annotations for a variety of object classes, including several animals. For pose recognition, however, the available supervision is generally + +limited to humans, with a few exceptions. Furthermore, for dense pose recognition only human datasets are available — the best example of which is DensePose-COCO [14]. + +In this work, we raise a number of questions most critical for this setup, namely: + +- defining learning and evaluation protocols on new animal categories allowing for training class-specific or class-agnostic DensePose models on a variety of species in a unified way (described in Sect. 3.1); +- improving quality of DensePose models and their robustness to unseen data distributions at test time (discussed in Sect. 3.2 and 3.3); +- optimally combining the existing variety of data sources in order to initialize a detection model for a new animal species (discussed in Sect. 3.4); +- defining strategies for mining dense pseudo-labels for gradual domain adaptation from humans to chimpanzees in a teacher-student setting (discussed in Sect. 3.5). + +# 3.1. Annotation through 3D shape re-mapping + +While our aim is to learn to reconstruct the dense pose of chimpanzees with zero supervision, a manually-annotated dataset for this class is required for evaluation. Here, we explain how to collect DensePose annotations for a new category, such as chimpanzees. + +Dense Pose model. Recall that DensePose-COCO contains images of people collected 'in the wild' and annotated with dense correspondences. These dense keypoints are identified as the point $p \in S$ of a reference 3D model $S \subset \mathbb{R}^3$ of the object. Furthermore, the keypoints $p \in S$ are indexed by triplets $(c, u, v) \in \{1, \dots, C\} \times [0,1]^2$ where $c$ is the chart index, corresponding to one of $C$ model parts, and $(u, v)$ are the coordinates within a chart. The DensePose-COCO dataset [14] contains bounding boxes, pixel-perfect foreground-background and part segmentations, and $(c, u, v)$ annotations for a large number of foreground pixels. + +Dense Pose for chimps. We wish to extend the DensePose annotations to the chimpanzee class. In order to do so, we + +rely on a separate artist-created 3D model $\S$ of a chimpanzee as a reference for annotators to collect labels for the chimpanzee images (instead of the human model used by the original DensePose). + +For each object, we use Amazon Mechanical Turk to collect the object bounding boxes, followed by pixel-perfect foreground/background segmentation masks, and finally the $(c,u,v)$ chart coordinates for a certain number of pixels randomly sampled from the foreground regions. Differently from the original DensePose, we do not also collect dense annotations for the body parts as the latter was found to be very challenging for the annotators. Note however that the chart index $c$ reveals the part identity for each of the annotated image pixels. + +Semantic alignment. Finally, we wish to align the human and chimpanzee DensePose models by mapping the collected annotations back on the surface of the SMPL model using the mesh re-mapping strategy described below. The latter step unifies the evaluation protocols across different object categories and allows to transfer knowledge and annotations between different species. + +In spite of the fact that humans and most mammals share topology and the skeletal structure, establishing precise semantic dense correspondences between the 3D models of humans and different animal species is challenging due to differences in body proportions and local geometry. + +As preprocessing, we manually charted the SMPL and the chimp meshes into $L = 32$ semantically-corresponding parts to guide the mapping. Then, for each vertex $p$ of each mesh $S$ , we extracted an adapted version of the continuous semantic descriptor $\mathbf{d}(p)$ proposed by Léon et al. [27]: + +$$ +\mathbf {d} (p) = \left(d _ {\ell} (p)\right) _ {\ell = 1} ^ {L}, \quad d _ {\ell} (p) = \frac {1}{\left| S _ {\ell} \right|} \sum_ {s \in S _ {\ell}} g (p, s; S _ {\ell}) \tag {1} +$$ + +where $S_{\ell} \subset S$ is the set of all vertices in part $\ell$ of the mesh and $g(p, s)$ is the geodesic distance between two points on $S$ . With this, the mapping from the human mesh $S$ to the chimp mesh $S'$ is obtained by matching nearest descriptors: $S \to S'$ , $p \mapsto \operatorname{argmin}_{q \in S'} \| \mathbf{d}_S(p) - \mathbf{d}_{S'}(q) \|^2$ . + +This simple approach yields satisfactory results both in terms of alignment and smoothness, as shown in Fig. 2. It does not require any optimization in 3D space based on model fitting or mesh deformation and works on meshes of arbitrary resolutions. Interestingly, exploiting information about mesh geometry (such as high dimensional SHOT [46] descriptors or their learned variants [16]) instead or in addition to semantic features results in noisy mappings. This can likely be attributed to prominent inconsistencies in local geometry of some body regions between the object categories. + +![](images/c197db0167dd175bc782c36bc75ade93e569dd7494a0ef64a99186482da753aa.jpg) +(a) original DensePose-RCNN, human class (single domain) + +![](images/6f6cc8ee5eb3bd97d4f2e818c4dec6d5bb231b87eec2ad84b94250c32690fbb6.jpg) +(b) domain adaptation for the new category by self-training +Figure 3: Comparison of the original (a) and our (b) Dense-Pose learning architecture. See Sect. 3.2 for detailed description of the architecture. + +# 3.2. Multi-head R-CNN + +Our goal is to develop a DensePose predictor for a new class. Such a predictor must detect the object via a bounding box, segment it from the background, and obtain the Dense-Poset chart and uv-map coordinates for each foreground pixel. We implement this with a single model with multiple heads, performing the various tasks on top of the same trunk and shared image features (Fig.3.b). + +The base model is R-CNN [17] modified to include the following heads. The first head refines the coordinates of the bounding box. The second head computes a foreground-background segmentation mask in the same way as Mask R-CNN. The third and the final head computes a part segmentation mask $I$ , assigning each pixel to one of the 24 Dense Pose charts, and the $uv$ map values for each foreground pixel. + +Class-agnostic model. Compared to the standard Mask R-CNN, our model is class agnostic, i.e. trained for only one class type. This is true also when we make use of a Mask R-CNN pre-trained on multiple source classes as the goal is always to only build a model for the final target chimpanzee class — we found that merging classes is an effective way of integrating information. + +Heterogeneous training. Our training data can be heterogeneous. In particular, COCO provides segmentation masks for 80 categories, but DensePose-COCO provides Dense-Pos annotations only for humans. While we train a single class-agnostic model, the Dense Pose head is trained only for the class human for which the necessary ground-truth data is available. + +Note in particular that both the Mask R-CNN head and the DensePose head contain a foreground-background segmentation component — these are not equivalent, as the DensePose one is only valid (and trainable) for humans, while the Mask R-CNN one is generic (and trainable from all COCO classes). We will see in the experiments that their combination improves performance. + +Fine-tuning. As shown later, for fine-tuning the model we generate pseudo-label on chimpanzees imagery. The pseudo-labels are generated for all components of the model (segmentations, uv maps), including in particular both foreground-background segmentation heads. + +Other architectural improvements. Our model (Fig. 3.a) has a few mode differences compared to the original Dense Pose (Fig. 3.b) which we found useful to improved accuracy and/or data collection efficiency. + +First, both the original and our implementations use dense (pixel-perfect) supervision for the foreground-background masks. However, in our version we do not use the pixel-perfect part segmentations in the original DensePose annotations — the part prediction head is trained only from the chart labels for the pixels that are annotated in the data. This is another reason why we do not collect pixel-perfect segmentations for the chimpanzee images. + +We further improve the DensePose head by implementing it using Panoptic Feature Pyramid Networks [26], and use a configuration similar to DeepLab [11] that benefits from higher resolution. + +# 3.3. Auto-calibrated R-CNN + +As suggested above, pseudo-labelling can be used to fine-tune a pre-trained model on imagery containing the target class, chimpanzees in our case. The idea is to use a model pre-trained on a different class or set of classes to generate labels in the new domain, and then to retrain the model to fit those labels. Due to the domain gap, however, the pseudo-labels are somewhat unreliable. In this section, following [25] we develop a principled manner to let the neural network itself produce a calibrated measure of uncertainty which we can use to rank pseudo-labels by reliability. + +Classification uncertainty. Our model performs categorical classification for two purposes: to associate a class label to a bounding box, and to classify individual pixels as background, foreground, or as one of the body parts. In order to estimate the uncertainty for these categorical predictions, we + +![](images/50c34e298f75d00b4009f53e3684bd4ad4e0d150a3d23581ee779c22f43cab95.jpg) +Figure 4: Instance Segmentation score (AP) on DensePoseChimps for Mask R-CNN models trained using different COCO categories, ranked by decreasing performance. + +adopt the temperature scaling technique of [18]. + +Thus let $z_{y}$ be the score that the neural network associates to hypothesis $y \in \{1, \dots, K\}$ for a given input sample. We extend the network to compute an additional per-sample scalar $\alpha \geq 0$ . With this scalar, the posterior probability of hypothesis $y$ is given by the scaled softmax + +$$ +\hat {\sigma} (y; z, \alpha) = \frac {\exp (\alpha z _ {y})}{\sum_ {k = 1} ^ {K} \exp (\alpha z _ {k})} \tag {2} +$$ + +We can interpret the coefficient $\alpha = 1 / T$ as an inverse temperature. A small $\alpha$ means that the model is fairly certain about the prediction, whereas a large $\alpha$ that it is not. + +Note that, since $\alpha$ is also estimated by the neural network, we require a mechanism to learn it. This is in fact obtained automatically [18, 39] by simply minimizing the negative log-likelihood of the model, also known in this case as cross-entropy loss: $\ell(y,z,\alpha) = -\log \hat{\sigma}(y;z,\alpha)$ . + +Regression with uncertainty. Our model performs regression to refine the bounding box proposals (for four scalar outputs, two for each of the two corners of the box) and to obtain the DensePose $uv$ -coordinates (for two scalar outputs for each image pixel in a proposal). + +Thus let $y \in \mathbb{R}^D$ be the vector emitted by one of the regression heads (where $D$ depends on the head). Similarly to the classification case, we use the network to also predict an uncertainty score $\sigma \in \mathbb{R}^D$ . This time, however, we have a different scalar for each element in $y$ (hence, for the uv-maps, we have two uncertainty scores for each pixel, which we can visualize as an image). The vector $\sigma$ is interpreted as the diagonal variance of the regressed vector $y$ , assuming the latter to have a Gaussian distribution. The uncertainty scores $\sigma$ can thus be trained jointly with the predictor $\hat{y}$ by minimizing the negative log-likelihood of the model: + +$$ +\ell (y, \hat {y}, \sigma) = \frac {D}{2} \log 2 \pi + \frac {1}{2} \sum_ {i = 1} ^ {D} \left(\log \sigma_ {i} ^ {2} + \frac {\left(\hat {y} _ {i} - y _ {i}\right) ^ {2}}{\sigma_ {i} ^ {2}}\right) \tag {3} +$$ + +For a fixed error $|\hat{y}_i - y_i|$ , the quantity above is minimized by setting $\sigma_i = |\hat{y}_i - y_i|$ hence the model is encouraged to guess the magnitude of its own prediction error. However, if $|\hat{y}_i - y_i| = 0$ , the quantity above diverges to $-\infty$ for $\sigma_i \to 0$ . Hence, we clamp $\sigma_i$ from below to a minimum value $\sigma_{\min} > 0$ . + +
modelAPAP50AP75
DensePose-RCNN50.8880.4054.80
DensePose-RCNN*51.4481.4455.12
DensePose-RCNN* (σ)54.1382.3258.06
+ +
modelAPAP50AP75
DensePose-RCNN43.8476.8845.84
DensePose-RCNN*43.8477.5245.60
DensePose-RCNN* (σ)45.5878.7947.93
+ +Table 1: Detection (left) and instance segmentation (right) performance on DensePose-COCO minival. + +
modelAPAP50AP75APMAPLARAR50AR75ARMARL
DensePose-RCNN46.884.547.741.848.054.789.558.943.355.5
DensePose-RCNN*47.285.847.342.548.455.291.059.144.055.9
DensePose-RCNN* (σ)53.288.357.048.654.661.292.467.250.061.9
+ +Table 2: DensePose performance on DensePose-COCO minival. * denotes our improved architecture; (σ) denotes the proposed Auto-calibrated version of the network. + +Details. For both classification and regression models, the uncertainties $\alpha$ and $\sigma$ must be positive — in the network, they are obtained via a softmax activation. + +# 3.4. Optimal transfer support + +In this section, we investigate which object categories in the COCO dataset provide the best support for recognizing a new animal species, chimpanzees in our case. Among the animals in COCO, chimpanzees are most obviously related to humans, and we may thus expect that people may be the most transferable class. However, despite their overall structural similarity, people's appearance is fairly different, also due to the lack of fur and the presence of clothing. Furthermore, context is also often quite different. It is thus unclear if a deep network trained to recognise humans can transfer well at all on chimpanzees, or whether other object categories might do better. + +Class selection. We test what is more important: biological proximity of the species (as a proxy to morphological similarity) or appearance similarity (as a combination of typical poses and textures). We also search for a brute force solution for this particular dataset to back up or disprove our intuition for class selection. In our experiments, we have tested the following selections: + +- person class only (due to morphological similarity). +- animal classes only (due to higher pose and texture similarity): bear, dog, elephant, cat, horse, cow, bird, sheep, zebra, giraffe, mouse. +- top- $N$ scoring classes on the new category (brute force solution). In this setting, we first train a set of $C$ single-class models for each of the $C = 90$ object classes in the COCO dataset and rank them according to their instance segmentation performance on the DensePose-Chimps dataset (see Fig. 4). Then for each combination of $S \in \{1, \dots, C\}$ top scoring classes we train the same network from scratch. The solution that have we found optimal corresponds to $C_{\mathrm{opt}} = 9$ , where the top-C scoring classes are: bear, dog, elephant, cat, horse, cow, bird, person, sheep. + +As shown in Tab. 5, the top-N solution produces similar results compared to combination person+animals. Person class only is ineffective for training in this setting. + +Class fusion. We have also explored the question of class-agnostic vs multi-class training as a trade-off between the number of training samples per class vs granularity of prediction modes. For the task of adapting the new model to a single category (on the given dataset) class-agnostic training showed convincingly stronger results (see Tab. 5). + +# 3.5. Dense label distillation + +Finally, we aim at finding an effective strategy for exploiting unlabeled data for the target domain in the teacher-student training setting and performing distillation in dense prediction tasks. In our setting, the teacher network trained on the selected classes of the COCO dataset with DensePose is used to generate pseudo-labels for fine-tuning the student network on the augmented data. The student network is initialized with teacher's weights. + +Once teacher predictions on unlabeled data are obtained, we start by filtering out low confidence detections using calibrated detection scores. After that, the bounding boxes and segmentation masks on remaining samples are used for augmented training. For mining DensePose supervision, we consider three different dense sampling strategies driven by each of the tasks solved by the teacher network, in addition to uniform sampling: + +- uniform sampling - all points from the selected detections are sampled with equal probability; +- coarse classification uncertainty [mask-based] - sampling top $k$ from ranked calibrated posteriors produced by the mask branch for the task of binary classification; +- fine classification uncertainty [I-based] - selection of top $k$ from ranked calibrated posteriors from the 24-way segmentation outputs of the DensePose head; +- regression uncertainty sampling $[uv\text{-based}]$ - sampling of top $k$ points based on ranked confidence in the $uv$ -outputs of the DensePose head. + +DensePose-Chimps Chimp&See + +
samplingkAPDposeAPDAPSAPDAPS
--33.462.156.450.543.5
uniform534.5 ± .463.3 ± .358.0 ± .358.9 ± .549.0 ± .5
mask-based534.7 ± .463.3 ± .358.0 ± .258.8 ± .649.0 ± .5
I-based534.9 ± .663.4 ± .358.0 ± .259.2 ± .449.2 ± .5
uv-based534.6 ± .363.3 ± .358.2 ± .359.0 ± .149.6 ± .1
+ +In Sect. 4 we provide experimental evidence that sampling based on confidence estimates from fine-grained tasks (I-estimation, uv-maps) results in the best student performance. + +# 4. Experiments + +We now describe the results of empirical evaluation and provide detailed descriptions of ablation studies. + +# 4.1. Datasets + +We use a combination of human and animal datasets with different kinds of annotations or no annotations at all. A brief description of each of them is provided below. + +DensePose-COCO dataset [14]. This is the dataset for human dense pose estimation, that we use for training the teacher model. It contains 50k annotated instances totalling to more than 5 million ground truth correspondences. We also augment the teacher training with other object categories from the original COCO dataset [30]. + +Chimp&See dataset. For training our models in a self-supervised setting, we used unlabeled videos containing chimpanzees from the Chimp&See project $^{1}$ . This data is being collected under the umbrella of The Pan African Programme $^{**}$ : The Cultured Chimpanzee (PanAf) by installing camera traps in more than 40 natural habitats of chimpanzees on different sites in Africa. In this work, we used a subset of the collected data consisting of 18,556 video clips, from 10 sec to 1 min long each, captured with cameras in either standard or night vision mode depending on lighting conditions. These recordings were motion triggered automatically by passing animals. As a result, some clips may not contain any chimps beyond first several frames. + +For evaluation, we chose videos from one site, sampled frames at 1 fps, removed the near duplicates and collected human annotations for instance masks. This resulted into 1054 images containing 1528 annotated instances, that we use to + +Table 3: AP of the student network trained with different sampling strategies. Optimal number of sampled points $k$ per detection is reported for each sampling. The first row corresponds to the teacher network. Mean $\pm$ std for 20 runs. + +
DensePose-ChimpsChimp&See
k\( \mathbf{AP}_{\text{DensePose}} \)\( \mathbf{AP}_D \)\( \mathbf{AP}_S \)\( \mathbf{AP}_D \)\( \mathbf{AP}_S \)
033.8 ± .263.1 ± .257.9 ± .259.0 ± .349.2 ± .4
134.7 ± .563.0 ± .257.9 ± .359.3 ± .349.3 ± .6
234.6 ± .663.4 ± .357.9 ± .359.2 ± .449.3 ± .4
534.9 ± .563.4 ± .358.0 ± .259.2 ± .449.2 ± .5
1034.6 ± .663.3 ± .358.0 ± .359.2 ± .449.4 ± .4
100033.1 ± .663.2 ± .257.8 ± .359.2 ± .549.4 ± .5
1000027.6 ± 4.660.2 ± .455.7 ± .558.0 ± .749.1 ± .6
+ +Table 4: DensePose, detection and instance segmentation AP of the student network trained with $I$ -sampling for different number of sampled points $k$ . Mean±std for 20 runs. + +
selected COCO object classesAPAP50AP75
top-9 classes57.2985.6363.45
bear-only40.6970.8844.23
person-only9.3919.328.21
animals-only52.2880.6258.60
person + animals57.3485.7663.59
person + animals: class agnostic57.3485.7663.59
person + animals: class specific50.4772.8554.30
+ +Table 5: Instance segmentation AP on DensePose-Chimps for Mask R-CNN trained on different subsets of classes. + +benchmark detection performance in our models. However, due to in-the-wild nature of this data and presence of motion blur, severe occlusions, and low resolution in some cases, we found it infeasible to collect precise human annotations at the level of dense correspondences. + +DensePose-Chimps test set. For the task of evaluating DensePose performance on this new category, we collected a set of 662 higher quality images that contain 933 instances of chimpanzees. We annotated this data with bounding boxes, binary masks, body part segmentation and dense pose correspondences as explained in Sect. 3.1. + +# 4.2. Results + +Ablations on architectural choices. First, we compare our model to the original DensePose-RCNN [14] (detectron2 implementation). We also ablate our improvements in the architecture and provide results with and without auto-calibration. Tab. 1, 2 show consistent improvements on all tasks for both modifications. + +Optimal transfer support. We (a) benchmarked every strategy for class selection described in Sect. 3.4 and (b) experimented with multi-class and class-agnostic models. From Tab. 5 we can see that class agnostic training on the animals+person subset shows the best transferability for DensePose-Chimps dataset. Therefore, it was used for training all our DensePose models. + +Dense label distillation. We conducted experiments with different sampling strategies and different numbers of sampled points $k$ per detection. In Tab. 3 we show performance + +![](images/c0effb9f53412080b57dc0c1a12853e1e106d8667bfcb88ecf63f2fcc381e994.jpg) +Figure 5: Visual results: (left) teacher network predictions vs (right) predictions of student network trained using $I$ -sampling. The student produces more accurate boundaries and $uv$ -maps. Zoom-in for details. Image source: [53, 54, 37, 34, 2, 13, 12, 55]. + +of the teacher (first row) and the student networks trained using different sampling strategies along with the corresponding optimal $k$ . $I$ -based sampling showed most impressive gains, followed by $uv$ -based sampling. Uniform selection produces poor results. In Tab. 4 we report performance for different number of sampled points in every detection for $I$ -based sampling. Qualitative results are shown in Fig. 5. + +# 5. Conclusions + +We have studied the problem of extending dense body pose recognition to animal species and suggested that doing this at scale requires learning from unlabelled data. Encouragingly, we have demonstrated that existing detection, + +segmentation, and dense pose labelling models can transfer very well to a proximal animal class such as chimpanzee despite significant inter-class differences. We have shown that substantial improvements can be obtained by carefully selecting which categories to use to pre-train the model, by using a class-agnostic architecture to integrate different sources of information, and by modelling labelling uncertainty to grade pseudo-label for self-training. In this manner, we have been able to achieve excellent performance without using a single labelled image of the target class for training. + +In the future, we would like to investigate how a limited amount of target supervision can be best used to improve the results, and how other techniques from domain adaptation could also be used for this purpose. + +# References + +[1] IUCN red list of threatened species. https://www.iucn.org/resources/conservation-tools/iucn-red-list-threatened-species.1 +[2] [Ananabanana]. CC BY-NC-SA 2.0. https://www.flickr.com/photos/ananabanana/14682376194/, 2009.8 +[3] M. Andriluka, U. Iqbal, E. Ensafutdinov, L. Pishchulin, A. Milan, J. Gall, and Schiele B. PoseTrack: A benchmark for human pose estimation and tracking. CVPR, 2018. 2 +[4] Mykhaylo Andriluka, Leonid Pishchulin, Peter Gehler, and Bernt Schiele. 2d human pose estimation: New benchmark and state of the art analysis. CVPR, 2014. 2 +[5] Yauhen Babakhin, Artsiom Sanakoyeu, and Hirotoshi Kitamura. Semi-supervised segmentation of salt bodies in seismic images using an ensemble of convolutional neural networks. German Conference on Pattern Recognition (GCPR), 2019. 3 +[6] Miguel A Bautista, Artsiom Sanakoyeu, Ekaterina Tikhoncheva, and Björn Ommer. Cliqueconn: Deep unsupervised exemplar learning. In Advances in Neural Information Processing Systems, pages 3846-3854, 2016. 2 +[7] Benjamin Biggs, Thomas Roddick, Andrew Fitzgibbon, and Roberto Cipolla. Creatures great and smal: Recovering the shape and motion of animals from video. ACCV, 2018. 3 +[8] Biagio Brattoli, Uta Buchler, Anna-Sophia Wahl, Martin E Schwab, and Bjorn Ommer. Lstm self-supervision for detailed behavior analysis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6466-6475, 2017. 2 +[9] Jinkun Cao, Hongyuan Tang, Fang Hao-Shu, Xiaoyong Shen, Cewu Lu, and Yu-Wing Tai. Cross-domain adaptation for animal pose estimation. ICCV, 2019. 2 +[10] Zhe Cao, Tomas Simon, Shih-En Wei, and Yaser Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. CVPR, 2017. 2 +[11] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587, 2017. 5 +[12] Steven Feather. CC BY-NC-SA 2.0. https://www.flickr.com/photos/7317295@N04/8631651965/, 2013.8 +[13] Nick Fedele. CC BY-NC-SA 2.0. https://www.flickr.com/photos/nf4000/6677286321/, 2011.8 +[14] Ríza Alp Güler, Natalia Neverova, and Iasonas Kokkinos. Denseseposé: Dense human pose estimation in the wild. CVPR, 2018. 1, 2, 3, 7 +[15] Semih Günel, Helge Rhodin, Daniel Morales, João H. Campagnolo, Pavan Ramdya, and Pascal Fua. Deepfly3d, a deep learning-based approach for 3d limb and appendage tracking in tethered, adult drosophila. eLife, 2019. 2 +[16] Oshri Halimi, Or Litany, Emanuele Rodola, Alex Bronstein, and Ron Kimmel. Self-supervised learning of dense shape correspondence. CVPR, 2019. 4 +[17] K. He, G. Gkioxari, and P. Dollar and R. Girshick. Mask R-CNN. ICCV, 2017. 1, 4 +[18] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. 5 + +[19] Tomas Jakab, Ankush Gupta, Hakan Bilen, and Andrea Vedaldi. Unsupervised learning of object landmarks through conditional image generation. NIPS, 2018. 3 +[20] Sam Johnson and Mark Everingham. Clustered pose and nonlinear appearance models for human pose estimation. In BMVC, 2010. 2 +[21] Sam Johnson and Mark Everingham. Learning effective human pose estimation from inaccurate annotation. CVPR, 2011. 2 +[22] Angjoo Kanazawa, Michael J. Black, David W. Jacobs, and Jitendra Malik. End-to-end recovery of human shape and pose. CVPR, 2018. 1 +[23] Angjoo Kanazawa, Jason Y. Zhang, Panna Felsen, and Jitendra Malik. Learning 3d human dynamics from video. CVPR, 2019. 1 +[24] Pierre Karashchuk. lambdaop/anipose: v0.5.0. eLife, 2019. 2 +[25] A. Kendall and Y. Gal. What uncertainties do we need in bayesian deep learning for computer vision? NIPS, 2017. 5 +[26] Alexander Kirillov, Ross Girshick, Kaiming He, and Piotr Dollár. Panoptic feature pyramid networks. CVPR, pages 6399-6408, 2019. 5 +[27] V. Leon, N. Bonneel, G. Lavoue, and J.-P. Vandeborre. Continuous semantic description of 3d meshes. Computer & Graphics, 2016. 4 +[28] Shuyuan Li, Jianguo Li, Weiyao Lin, and Hanlin Tang. Amur tiger re-identification in the wild. arXiv preprint arXiv:1906.05586, 2019. 2 +[29] Tsung-Yi Lin, Michael Maire, Serge J. Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dolkar, and C. Lawrence Zitnick. Microsoft COCO: common objects in context. In ECCV, 2014. 1 +[30] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. ECCV, 2014. 2, 7 +[31] M. Loper, N. Mahmood, J. Romero, G. Pons-Moll, and M. J. Black and. SMPL: A skinned multi- person linear model. ACM Trans. on Graphics, 2015. 3 +[32] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J Black. Smpl: A skinned multiperson linear model. TOG, 2015. 2, 3 +[33] Dominik Lorenz, Leonard Bereska, Timo Milbich, and Björn Ommer. Unsupervised part-based disentangling of object shape and appearance. CVPR, 2019. 2, 3 +[34] Mario Madrona. CC BY-NC-SA 2.0. https://www.flickr.com/photos/andreatx/5586973009/, 2017.1,8 +[35] Alexander Mathis, Pranav Mamidanna, Kevin M. Cury, Abe Taiga, Venkatesh N. Murthy, Mackenzie Weygandt Mathis, and Matthias Bethge. Deeplabcut: markerless pose estimation of user-defined body parts with deep learning. Nature neuroscience, 2018. 2 +[36] Machenzie Weygandt Mathis and Alexander Mathis. Deep learning tools for the measurement of animal behavior in neuroscience. arXiv preprint arXiv:1909.13868v2, 2019. 2 +[37] Nairn McWilliams. CC BY-NC-SA 2.0. https://www.flickr.com/photos/24256658@N06/17859787186/, 2017.8 +[38] Tanmay Nath, Alexander Mathis, An Chi Chen, Amir Patel, + +and Mackenzie W. Bethge, Matthias and Mathis. Using deeplab-cut for 3d markerless pose estimation across species and behaviors. Nature protocols, 2019. 2 +[39] Lukas Neumann, Andrew Zisserman, and Andrea Vedaldi. Efficient confidence auto-calibration for safe pedestrian detection. NIPS Workshop on Machine Learning for Intelligent Transportation Systems, 2018. 5 +[40] Natalia Neverova, James Thewlis, RIza Alp Güler, Iasonas Kokkinos, and Andrea Vedaldi. Slim DensePose: Thrifty learning from sparse annotations and motion cues. CVPR, 2019. 3 +[41] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. ECCV, 2016. 1, 2 +[42] Sebastian Niedlich. CC BY-NC-SA 2.0. https://www.flickr.com/photos/42311564@N00/3577153997/, 2009.1 +[43] David Novotny, Nikhila Ravi, Benjamin Graham, Natalia Neverova, and Andrea Vedaldi. C3DPO: Canonical 3d pose networks for non-rigid structure from motion. ICCV, 2019. 1 +[44] Ilija Radosavovic, Piotr Dollar, Ross Girshick, Georgia Gkioxari, and Kaiming He. Data distillation: Towards omnisupervised learning. CVPR, 2018. 3 +[45] Maheen Rashid, Xiuye Gu, and Yong Jae Lee. Interspecies knowledge transfer for facial keypoint detection. CVPR, 2017. 2 +[46] S. Salti, F. Tombari, and L. Di Stefano. Shot: Unique signatures of histograms for surface and texture description. Computer Vision and Image Understanding, 2014. 4 +[47] Artsiom Sanakoyeu, Miguel A Bautista, and Björn Ommer. Deep unsupervised learning of visual similarities. Pattern Recognition, 78:331-343, 2018. 2 +[48] George Terry. CC BY-NC-SA 2.0. https://www.flickr.com/photos/30974608@N02/39418357932/, 2017.1 +[49] James Thewlis, Samuel Albanie, Hakan Bilen, and Andrea Vedaldi. Unsupervised learning of landmarks by descriptor vector exchange. ICCV, 2019. 2, 3 +[50] J. Thewlis, H. Bilen, and A. Vedaldi. Unsupervised learning of object landmarks by factorized spatial embeddings. ICCV, 2017. 2, 3 +[51] J. Thewlis, H. Bilen, and A. Vedaldi. Unsupervised object learning from dense invariant image labelling. NIPS, 2017. 2, 3 +[52] Claire Timm. CC BY-NC-SA 2.0. https://www.flickr.com/photos/clairetimm/21789255695/, 2015.1 +[53] tomosuke214. CC BY-NC-SA 2.0. https://www.flickr.com/photos/24256658@N06/14336165579/.2014.8 +[54] tomosuke214. CC BY-NC-SA 2.0. https://www.flickr.com/photos/24256658@N06/17859787186/, 2014.8 +[55] User:Colin. CC BY-NC-SA 2.0. https://www.flickr.com/photos/user-colin/8913175473/, 2013.8 +[56] Shih-En Wei, Varun Ramakrishna, Takeo Kanade, and Yaser Sheikh. Convolutional pose machines. CVPR, 2016. 2 +[57] Christoph Wrbel. CC BY-NC-SA 2.0. https:// www.flickr.com/photos/christophwuerbel/ 9675112608/, 2013. 1 + +[58] I. Zeki Yalniz, Hervé Jegou, Kan Chen, Manohar Paluri, and Dhruv Mahajan. Billion-scale semi-supervised learning for image classification. arXiv preprint arXiv:1905.00546v1, 2019.3 +[59] Heng Yang, Renqiao Zhang, and Peter Robinson. Human and sheep facial landmarks localisation by triplet interpolated features. WACV, 2015. 2 +[60] Andrea Young. CC BY-NC-SA 2.0. https://www.flickr.com/photos/andreatx/5586973009/, 2011.1 +[61] Weiyu Zhang, Menglong Zhu, and Konstantinos G Derpanis. From actemes to action: A strongly-supervised representation for detailed action understanding. ICCV, 2013. 2 +[62] Yuting Zhang, Yijie Guo, Yixin Jin, Yijun Luo, Zhiyuan He, and Honglak Lee. Unsupervised discovery of object landmarks as structural representations. CVPR, 2018. 2, 3 +[63] Silvia Zuffi, Angjoo Kanazawa, Tanya Berger-Wolf, and Michael J. Black. Three-d safari: Learning to estimate zebra pose, shape, and texture from images "in the wild". ICCV, 2019, 3 +[64] Silvia Zuffi, Angjoo Kanazawa, and Michael J. Black. Lions and tigers and bears: Capturing non-rigid, 3d, articulated shape from images. ICCV, 2018. 3 +[65] Silvia Zuffi, Angjoo Kanazawa, David W. Jacobs, and Michael J. Black. 3d menagerie: Modeling the 3d shape and pose of animals. CVPR, 2017. 3 \ No newline at end of file diff --git a/transferringdenseposetoproximalanimalclasses/images.zip b/transferringdenseposetoproximalanimalclasses/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..eb215e2bbc67abfa804916e00ceadcdd749e3b12 --- /dev/null +++ b/transferringdenseposetoproximalanimalclasses/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:974e7253ad2007bca8b1cc1bac5f773783857b0aae81b01fc13409c7bef45c0b +size 587797 diff --git a/transferringdenseposetoproximalanimalclasses/layout.json b/transferringdenseposetoproximalanimalclasses/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8be0e88b9101b915e207e18a0dc4cfffc7801521 --- /dev/null +++ b/transferringdenseposetoproximalanimalclasses/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b61997da5423bbda79a446059d283be405406b8fd27891c101fbbace99d8dbae +size 417881 diff --git a/transformandtellentityawarenewsimagecaptioning/72b8f0e7-99d2-487d-b23c-5d9d40a01347_content_list.json b/transformandtellentityawarenewsimagecaptioning/72b8f0e7-99d2-487d-b23c-5d9d40a01347_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..60297401cf2c3b457b94250626a61da9207f4de3 --- /dev/null +++ b/transformandtellentityawarenewsimagecaptioning/72b8f0e7-99d2-487d-b23c-5d9d40a01347_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba23b54e892d7c95d94d4196aab4167d9cc943757153d33257b54602ec9ffa16 +size 87058 diff --git a/transformandtellentityawarenewsimagecaptioning/72b8f0e7-99d2-487d-b23c-5d9d40a01347_model.json b/transformandtellentityawarenewsimagecaptioning/72b8f0e7-99d2-487d-b23c-5d9d40a01347_model.json new file mode 100644 index 0000000000000000000000000000000000000000..33d17b7d16b158b150bb6c61ce367d95845880e9 --- /dev/null +++ b/transformandtellentityawarenewsimagecaptioning/72b8f0e7-99d2-487d-b23c-5d9d40a01347_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16cc3cde1de0ade5ff6b9d61d60ee074d228a8df6ed2a37a542b4348e98214f0 +size 107162 diff --git a/transformandtellentityawarenewsimagecaptioning/72b8f0e7-99d2-487d-b23c-5d9d40a01347_origin.pdf b/transformandtellentityawarenewsimagecaptioning/72b8f0e7-99d2-487d-b23c-5d9d40a01347_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d5c6e6e8eaa7cb69c2a5a39d6a55f1ff7ee5853b --- /dev/null +++ b/transformandtellentityawarenewsimagecaptioning/72b8f0e7-99d2-487d-b23c-5d9d40a01347_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1bd736ecb932faf070da1313e0c2294e19ff33342a09bc8d513b74cbcb4f5b3f +size 1417490 diff --git a/transformandtellentityawarenewsimagecaptioning/full.md b/transformandtellentityawarenewsimagecaptioning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e86b83b920cebfc40622a7e495539277726b43dd --- /dev/null +++ b/transformandtellentityawarenewsimagecaptioning/full.md @@ -0,0 +1,365 @@ +# Transform and Tell: Entity-Aware News Image Captioning + +Alasdair Tran, Alexander Mathews, Lexing Xie +Australian National University + +{aliasdair.tran,alex.mathews,lexing.xie}@anu.edu.au + +# Abstract + +We propose an end-to-end model which generates captions for images embedded in news articles. News images present two key challenges: they rely on real-world knowledge, especially about named entities; and they typically have linguistically rich captions that include uncommon words. We address the first challenge by associating words in the caption with faces and objects in the image, via a multi-modal, multi-head attention mechanism. We tackle the second challenge with a state-of-the-art transformer language model that uses byte-pair-encoding to generate captions as a sequence of word parts. On the GoodNews dataset [3], our model outperforms the previous state of the art by a factor of four in CIDEr score $(13\rightarrow 54)$ . This performance gain comes from a unique combination of language models, word representation, image embeddings, face embeddings, object embeddings, and improvements in neural network design. We also introduce the NYTimes800k dataset which is $70\%$ larger than GoodNews, has higher article quality, and includes the locations of images within articles as an additional contextual cue. + +# 1. Introduction + +The Internet is home to a large number of images, many of which lack useful captions. While a growing body of work has developed the capacity to narrate the contents of generic images [10, 49, 12, 19, 39, 30, 1, 6], these techniques still have two important weaknesses. The first weakness is in world knowledge. Most captioning systems are aware of generic object categories but unaware of names and places. Also generated captions are often inconsistent with commonsense knowledge. The second weakness is in linguistic expressiveness. The community has observed that generated captions tend to be shorter and less diverse than human-written captions [50, 24]. Most captioning systems rely on a fixed vocabulary and cannot correctly place or spell new or rare words. + +News image captioning is an interesting case study for tackling these two challenges. Not only do news captions + +What a 13-0 U.S. Win Over Thailand Looked Like at the Women's World Cup + +![](images/37d3cde8f2d89e6c13a3dac4a7781a41f2607420f9d42ea6bcfb2f8c286827c3.jpg) + +It was the largest margin of victory ever at the World Cup, and it began in the 12th minute. Alex Morgan scored the first goal in the match between the United States and Thailand, and Rose Lavelle doubled the lead eight minutes later. After it was all over, the defending champion U.S. had the largest margin of victory ever at the World Cup. The goals came quickly from the United States, one after the other. If you stepped away from the game, chances are you missed a U.S. goal. The Americans scored four goals in one six-minute span early in the second half, and five goals after the 78th minute. + +Generated Caption from Our Model + +The United States' Alex Morgan + +er, scored the first goal in the match against Thailand. + +Figure 1: An example of entity-aware news image captioning. Given a news article and an image (top), our model generates a relevant caption (bottom) by attending over the contexts. Here we show the attention scores over the image patches and the article text as the decoder generates the word "Morgan". Image patches with higher attention have a lighter shade, while highly-attended words are in red. The orange lines point to the highly attended regions. + +describe specific people, organizations and places, but the associated news articles also provide rich contextual information. The language used in news is evolving, with both the vocabulary and style changing over time. Thus news captioning approaches need to adapt to new words and concepts that emerge over a longer period of time (e.g. walkman in the 1990s or mp3 player in the 2000s). Existing approaches [44, 37, 3] rely on text extraction or template filling, which prevents the results from being linguistically richer than the template generator and are error-prone due to the difficulty in ranking entities for gap filling. Successful strategies for news image captioning can be generalized to images from domains with other types of rich context, such as web pages, social media posts, and user comments. + +We propose an end-to-end model for news image captioning with a novel combination of sequence-to-sequence neural networks, language representation learning, and vision subsystems. In particular, we address the knowledge gap by computing multi-head attention on the words in the article, along with faces and objects that are extracted from the image. We address the linguistic gap with a flexible byte-pair-encoding that can generate unseen words. We + +use dynamic convolutions and mix different linguistic representation layers to make the neural network representation richer. We also propose a new dataset, NYTimes800k, that is $70\%$ larger than GoodNews [3] and has higher-quality articles along with additional image location information. We observe a performance gain of $6.8 \times$ in BLEU-4 $(0.89 \rightarrow 6.05)$ and $4.1 \times$ in CIDEr $(13.1 \rightarrow 53.8)$ compared to previous work [3]. On both datasets we observe consistent gains for each new component in our language, vision, and knowledge-aware system. We also find that our model generates names not seen during training, resulting in linguistically richer captions, which are closer in length (mean 15 words) to the ground truth (mean 18 words) than the previous state of the art (mean 10 words). + +Our main contributions include: + +1. A new captioning model that incorporates transformers, an attention-centric language model, byte-pair encoding, and attention over four different modalities (text, images, faces, and objects). +2. Significant performance gains over all metrics, with associated ablation studies quantifying the contributions of our main modeling components using BLEU-4, CIDEr, precision & recall of named entities and rare proper nouns, and linguistic quality metrics. +3. NYTimes800k, the largest news image captioning dataset to date, containing 445K articles and 793K images with captions from The New York Times spanning 14 years. NYTimes800k builds and improves upon the recently proposed GoodNews dataset [3]. It has $70\%$ more articles and includes image locations within the article text. The dataset, code, and pretrained models are available on GitHub1. + +# 2. Related Works + +A popular design choice for image captioning systems involves using a convolutional neural network (CNN) as the image encoder and a recurrent neural network (RNN) with a closed vocabulary as a decoder [19, 10, 49]. Attention over image patches using a multilayer perception was introduced in "Show, Attend and Tell" [53]. Further extensions include having the option to not attend to any image region [30] using a bottom-up approach to propose a region to attend to [1], and attending specifically to object regions [51] and visual concepts [55, 25, 51] identified in the image. + +News image captioning includes the article text as input and focuses on the types of images used in news articles. A key challenge here is to generate correct entity names, especially rare ones. Existing approaches include extractive methods that use n-gram models to combine existing phrases [13] or simply retrieving the most representative + +sentence [44] in the article. Ramisa et al. [37] built an end-to-end LSTM decoder that takes both the article and image as inputs, but the model was still unable to produce names that were not seen during training. + +To overcome the limitation of a fixed-size vocabulary, template-based methods have been proposed. An LSTM first generates a template sentence with placeholders for named entities, e.g. "PERSON speaks at BUILDING in DATE." [3]. Afterwards the best candidate for each placeholder is chosen via a knowledge graph of entity combinations [29], or via sentence similarity [3]. One key difference between our proposed model and previous approaches [3, 29] is that our model can generate a caption with named entities directly without using an intermediate template. + +One tool that has seen recent successes in many natural language processing tasks are transformer networks. Transformers have been shown to consistently outperform RNNs in language modeling [36], story generation [11], summarization [43], and machine translation [4]. In particular, transformer-based models such as BERT [9], XLM [22], XLNet [54], RoBERTa [27], and ALBERT [23] are able to produce high level text representations suitable for transfer learning. Furthermore, using byte-pair encoding (BPE) [41] to represent uncommon words as a sequence of subword units enables transformers to function in an open vocabulary setting. To date the only image captioning work that uses BPE is [57], but they did not use it for rare named entities as these were removed during pre-processing. In contrast we explicitly examine BPE for generating rare names and compare it to template-based methods. + +Transformers have been shown to yield competitive results in generating generic MS COCO captions [58, 25]. Zhao et al. [57] have gone further and trained transformers to produce some named entities in the Conceptual Captions dataset [42]. However, the authors used web-entity labels, extracted using Google Cloud Vision API, as inputs to the model. In our work, we do not explicitly give the model a list of entities to appear in the caption. Instead our model automatically identifies relevant entities from the provided news article. + +# 3. The Transform and Tell Model + +Our model consists of a set of pretrained encoders and a decoder, as illustrated in Figure 2. The encoders (Section 3.1) generate high-level vector representations of the images, faces, objects, and article text. The decoder (Section 3.2) attends over these representations to generate a caption at the sub-word level. + +# 3.1.Encoders + +Image Encoder: An overall image representation is obtained from a ResNet-152 [17] model pre-trained on Im + +![](images/5ce7a4314bba7564e728755c96747e5c369b385ebf3a6b9e5963d00e3738c444.jpg) +Figure 2: Overview of the Transform and Tell model. Left: Decoder with four transformer blocks; Right: Encoder for article, image, faces, and objects. The decoder takes as input embeddings of byte-pair tokens (blue circles at the bottom). For example, the input in the final time step, 14980, represents "arsh" in "Varshini") from the previous time step. The grey arrows show the convolutions in the final time step in each block. Colored arrows show attention to the four domains on the right: article text (green lines), image patches (yellow lines), faces (orange lines), and objects (blue lines). The final decoder outputs are byte-pair tokens, which are then combined to form whole words and punctuations. + +ageNet. We use the output of the final block before the pooling layer as the image representation. This is a set of 49 different vectors $\boldsymbol{x}_i^I\in \mathbb{R}^{2048}$ where each vector corresponds to a separate image patch after the image is divided into equally-sized 7 by 7 patches. This gives us the set $\pmb{X}^{I} = \{\pmb{x}_{i}^{I}\in \mathbb{R}^{D^{I}}\}_{i = 1}^{M^{I}}$ , where $D^{I} = 2048$ and $M^I = 49$ for ResNet-152. Using this representation allows the decoder to attend to different regions of the image, which is known to improve performance in other image captioning tasks [53] and has been widely adopted. + +Face Encoder: We use MTCNN [56] to detect face bounding boxes in the image. We then select up to four faces since the majority of the captions contain at most four people's names (see Section 4). A vector representation of each face is obtained by passing the bounding boxes to FaceNet [40], which was pre-trained on the VGGFace2 dataset [5]. The resulting set of face vectors for each image is $\mathbf{X}^{F} = \{\mathbf{x}_{i}^{F} \in \mathbb{R}^{D^{F}}\}_{i=1}^{M^{F}}$ , where $D^{F} = 512$ for FaceNet and $M^{F}$ is the number of faces. If there are no faces in the image, $\mathbf{X}^{F}$ is an empty set. + +Even though the faces are extracted from the image, it is useful to consider them as a separate input domain. This is because a specialized face embedding model is tuned for identifying people and thus can help the decoder to generate more accurate named entities. + +Object Encoder: We use YOLOv3 [38] to detect object bounding boxes in the image. We filter out objects with a + +confidence less than 0.3 and select up to 64 objects with the highest confidence scores to feed through a ResNet-152 pretrained on ImageNet. In contrast to the image encoder, we take the output after the pooling layer as the representation for each object. This gives us a set of object vectors $\mathbf{X}^{O} = \{\pmb{x}_{i}^{O}\in \mathbb{R}^{D^{O}}\}_{i = 1}^{M^{O}}$ , where $D^{O} = 2048$ for ResNet-152 and $M^{O}$ is the number of objects. + +Article Encoder: To encode the article text we use RoBERTa [27], a recent improvement over the popular BERT [9] model. RoBERTa is a pretrained language representation model providing contextual embeddings for text. It consists of 24 layers of bidirectional transformer blocks. + +Unlike GloVe [35] and word2vec [31] embeddings, where each word has exactly one representation, the bidirectionality and the attention mechanism in the transformer allow a word to have different vector representations depending on the surrounding context. + +The largest GloVe model has a vocabulary size of 1.2 million. Although this is large, many rare names will still get mapped to the unknown token. In contrast, RoBERTa uses BPE [41, 36] which can encode any word made from Unicode characters. In BPE, each word is first broken down into a sequence of bytes. Common byte sequences are then merged using a greedy algorithm. Following [36], our vocabulary consists of 50K most common byte sequences. + +Inspired by Tenney et al. [46] who showed that different layers in BERT represent different steps in the tradi + +tional NLP pipeline, we mix the RoBERTa layers to obtain a richer representation. Given an input of length $M^T$ , the pretrained RoBERTa encoder will return 25 sequences of embeddings, $G = \{g_{\ell i} \in \mathbb{R}^{2048} : \ell \in \{0,1,\dots,24\}, i \in \{1,2,\dots,M^T\}\}$ . This includes the initial uncontextualized embeddings and the output of each of the 24 transformer layers. We take a weighted sum across all layers to obtain the article embedding $x_i^A$ : + +$$ +\boldsymbol {x} _ {i} ^ {A} = \sum_ {\ell = 0} ^ {2 4} \alpha_ {\ell} \boldsymbol {g} _ {\ell i} \tag {1} +$$ + +where $\alpha_{\ell}$ are learnable weights. + +Thus our RoBERTa encoder produces the set of token embeddings $\mathbf{X}^{A} = \{\pmb{x}_{i}^{A}\in \mathbb{R}^{D^{T}}\}_{i = 1}^{M^{T}}$ where $D^T = 1024$ in RoBERTa. + +# 3.2.Decoder + +The decoder is a function that generates caption tokens sequentially. At time step $t$ , it takes as input: the embedding of the token generated in the previous step, $z_{0t} \in \mathbb{R}^{D^E}$ where $D^E$ is the hidden size; embeddings of all other previously generated tokens $Z_{0 < t} = \{z_{00}, z_{01}, \dots, z_{0t-1}\}$ ; and the context embeddings $X^I, X^A, X^F$ , and $X^O$ from the encoders. These inputs are then fed through $L$ transformer blocks: + +$$ +\begin{array}{l} \boldsymbol {z} _ {1 t} = \operatorname {B l o c k} _ {1} \left(\boldsymbol {z} _ {0 t} \mid \boldsymbol {Z} _ {0 < t}, \boldsymbol {X} ^ {I}, \boldsymbol {X} ^ {A}, \boldsymbol {X} ^ {F}, \boldsymbol {X} ^ {O}\right) (2) \\ \boldsymbol {z} _ {2 t} = \operatorname {B l o c k} _ {2} \left(\boldsymbol {z} _ {1 t} \mid \boldsymbol {Z} _ {1 < t}, \boldsymbol {X} ^ {I}, \boldsymbol {X} ^ {A}, \boldsymbol {X} ^ {F}, \boldsymbol {X} ^ {O}\right) (3) \\ \end{array} +$$ + +·· + +$$ +\boldsymbol {z} _ {L t} = \operatorname {B l o c k} _ {L} \left(\boldsymbol {z} _ {L - 1 t} \mid \boldsymbol {Z} _ {L - 1 < t}, \boldsymbol {X} ^ {I}, \boldsymbol {X} ^ {A}, \boldsymbol {X} ^ {F}, \boldsymbol {X} ^ {O}\right) \tag {4} +$$ + +where $z_{\ell t}$ is the output of the $\ell^{\text{th}}$ transformer block at time step $t$ . The final block's output $z_{Lt}$ is used to estimate $p(y_t)$ , the probability of generating the $t$ th token in the vocabulary via adaptive softmax [16]: + +$$ +p \left(y _ {t}\right) = \text {A d a p t i v e S o f t m a x} \left(z _ {L t}\right) \tag {5} +$$ + +By dividing the vocabulary into three clusters based on frequency—5K, 15K, and 30K—adaptive softmax makes training more efficient since most of the time, the decoder only needs to compute the softmax over the first cluster containing the 5,000 most common tokens. + +In the following two subsections, we will describe the transformer block in detail. In each block, the conditioning on past tokens is achieved using dynamic convolutions, and the conditioning on the contexts is achieved using multi-head attention. + +Dynamic Convolutions: Introduced by Wu et al. [52], the goal of dynamic convolution is to provide a more efficient alternative to self-attention [47] when attending to past tokens. At block $\ell + 1$ and time step $t$ , we have the input + +$\mathbf{z}_{\ell t} \in \mathbb{R}^{D^E}$ . Given kernel size $K$ and $H$ attention heads, for each head $h \in \{1,2,\dots,H\}$ , we first project the current and last $K - 1$ steps using a feedforward layer to obtain $\mathbf{z}_{\ell h,j}' \in \mathbb{R}^{D^E / H}$ : + +$$ +\boldsymbol {z} _ {\ell h j} ^ {\prime} = \operatorname {G L U} \left(\boldsymbol {W} _ {\ell h} ^ {Z} \boldsymbol {z} _ {\ell j} + \boldsymbol {b} _ {\ell h} ^ {Z}\right) \tag {6} +$$ + +for $j \in \{t - K + 1, t - K + 2, \dots, t\}$ . Here GLU is the gated linear unit activation function [7]. The output of each head's dynamic convolution is the weighted sum of these projected values: + +$$ +\tilde {z} _ {\ell h t} = \sum_ {j = t - K + 1} ^ {t} \gamma_ {\ell h j} z _ {\ell h j} ^ {\prime} \tag {7} +$$ + +where the weight $\gamma_{\ell hj}$ is a linear projection of the input (hence the term "dynamic"), followed by a softmax over the kernel window: + +$$ +\gamma_ {\ell h j} = \operatorname {S o f t m a x} \left(\left(\boldsymbol {w} _ {\ell h} ^ {\gamma}\right) ^ {T} \boldsymbol {z} _ {\ell h j} ^ {\prime}\right) \tag {8} +$$ + +The overall output is the concatenation of all the head outputs, followed by a feedforward with a residual connection and layer normalization [2], which does a z-score normalization across the feature dimension (instead of the batch dimension as in batch normalization [18]): + +$$ +\tilde {z} _ {\ell t} = \left[ \tilde {z} _ {\ell 1 t}, \tilde {z} _ {\ell 2 t}, \dots , \tilde {z} _ {\ell H t} \right] \tag {9} +$$ + +$$ +\boldsymbol {d} _ {\ell t} = \text {L a y e r N o r m} \left(\boldsymbol {z} _ {\ell t} + \boldsymbol {W} _ {\ell} ^ {\tilde {\boldsymbol {z}}} \tilde {\boldsymbol {z}} _ {\ell t} + \boldsymbol {b} _ {\ell} ^ {\tilde {\boldsymbol {z}}}\right) \tag {10} +$$ + +The output $\pmb{d}_{\ell t}$ can now be used to attend over the context embeddings. + +Multi-Head Attention: The multi-head attention mechanism [47] has been the standard method to attend over encoder outputs in transformers. In our setting, we need to attend over four context domains—images, text, faces, and objects. As an example, we will go over the image attention module, which consists of $H$ heads. Each head $h$ first does a linear projection of $\pmb{d}_{\ell t}$ and the image embeddings $\pmb{X}^{I}$ into a query $\pmb{q}_{\ell ht}^{I} \in \mathbb{R}^{D^{E}/H}$ , a set of keys $\pmb{K}_{\ell ht}^{I} = \{\pmb{k}_{\ell ht i}^{I} \in \mathbb{R}^{D^{E}/H}\}_{i=1}^{M}$ and the corresponding values $\pmb{V}_{\ell ht}^{I} = \{\pmb{v}_{\ell ht i}^{I} \in \mathbb{R}^{D^{E}/H}\}_{i=1}^{M}$ : + +$$ +\boldsymbol {q} _ {\ell h t} ^ {I} = \boldsymbol {W} _ {\ell h} ^ {I Q} \boldsymbol {d} _ {\ell t} \tag {11} +$$ + +$$ +\boldsymbol {k} _ {\ell h i} ^ {I} = \boldsymbol {W} _ {\ell h} ^ {I K} \boldsymbol {x} _ {i} ^ {I} \quad \forall i \in \{1, 2, \dots , M ^ {I} \} \tag {12} +$$ + +$$ +\boldsymbol {v} _ {\ell h i} ^ {I} = \boldsymbol {W} _ {\ell h} ^ {I V} \boldsymbol {x} _ {i} ^ {I} \quad \forall i \in \{1, 2, \dots , M ^ {I} \} \tag {13} +$$ + +Then the attended image for each head is the weighted sum of the values, where the weights are obtained from the dot product between the query and key: + +$$ +\lambda_ {\ell h t i} ^ {I} = \operatorname {S o f t m a x} \left(\boldsymbol {K} _ {\ell h} ^ {I} \boldsymbol {q} _ {\ell h t} ^ {I}\right) _ {i} \tag {14} +$$ + +$$ +\boldsymbol {x} _ {\ell h t} ^ {\prime I} = \sum_ {i = 1} ^ {M ^ {I}} \lambda_ {\ell h t i} ^ {I} \boldsymbol {v} _ {\ell h t i} ^ {I} \tag {15} +$$ + +The attention from each head is then concatenated into $\pmb{x}_{\ell t}^{\prime I}\in \mathbb{R}^{D^{E}}$ .. + +$$ +\boldsymbol {x} _ {\ell t} ^ {\prime I} = \left[ \tilde {\boldsymbol {x}} _ {\ell 1 t} ^ {I}, \tilde {\boldsymbol {x}} _ {\ell 2 t} ^ {I}, \dots , \tilde {\boldsymbol {x}} _ {\ell H t} ^ {I} \right] \tag {16} +$$ + +and the overall image attention $\tilde{\pmb{x}}_{\ell t}^{I}\in \mathbb{R}^{D^{E}}$ is obtained after adding a residual connection and layer normalization: + +$$ +\tilde {\boldsymbol {x}} _ {\ell t} ^ {I} = \operatorname {L a y e r N o r m} \left(\boldsymbol {d} _ {\ell t} + \boldsymbol {x} _ {\ell t} ^ {\prime I}\right) \tag {17} +$$ + +We use the same multi-head attention mechanism (with different weight matrices) to obtain the attended article $\tilde{\pmb{x}}_{\ell t}^{A}$ , faces $\tilde{\pmb{x}}_{\ell t}^{F}$ , and objects $\tilde{\pmb{x}}_{\ell t}^{O}$ . These four are finally concatenated and fed through a feedforward layer: + +$$ +\tilde {\boldsymbol {x}} _ {\ell t} ^ {C} = \left[ \tilde {\boldsymbol {x}} _ {\ell t} ^ {I}, \tilde {\boldsymbol {x}} _ {\ell t} ^ {A}, \tilde {\boldsymbol {x}} _ {\ell t} ^ {F}, \tilde {\boldsymbol {x}} _ {\ell t} ^ {O} \right] \tag {18} +$$ + +$$ +\tilde {\boldsymbol {x}} _ {\ell t} ^ {C ^ {\prime}} = \boldsymbol {W} _ {\ell} ^ {C} \tilde {\boldsymbol {x}} _ {\ell t} ^ {C} + \boldsymbol {b} _ {\ell} ^ {C} \tag {19} +$$ + +$$ +\tilde {\boldsymbol {x}} _ {\ell t} ^ {C ^ {\prime \prime}} = \operatorname {R e L U} \left(\boldsymbol {W} _ {\ell} ^ {C ^ {\prime}} \tilde {\boldsymbol {x}} _ {\ell t} ^ {C ^ {\prime}} + \boldsymbol {b} _ {\ell} ^ {C ^ {\prime}}\right) \tag {20} +$$ + +$$ +\boldsymbol {z} _ {\ell + 1 t} = \operatorname {L a y e r N o r m} \left(\tilde {\boldsymbol {x}} _ {\ell t} ^ {C ^ {\prime}} + \boldsymbol {W} _ {\ell} ^ {C ^ {\prime \prime}} \tilde {\boldsymbol {x}} _ {\ell t} ^ {C ^ {\prime \prime}} + \boldsymbol {b} _ {\ell} ^ {C ^ {\prime \prime}}\right) \tag {21} +$$ + +The final output $\pmb{z}_{\ell +1t} \in \mathbb{R}^{D^E}$ is used as the input to the next transformer block. + +# 4. News Image Captioning Datasets + +We describe two datasets that contain news articles, images, and captions. The first dataset, GoodNews, was recently proposed in Biten et al. [3], while the second dataset, NYTimes800k, is our contribution. + +GoodNews: The GoodNews dataset was previously the largest dataset for news image captioning [3]. Each example in the dataset is a triplet containing an article, an image, and a caption. Since only the article text, captions, and image URLs are publicly released, the images need to be downloaded from the original source. Out of the 466K image URLs provided by [3], we were able to download 463K images, or $99.2\%$ of the original dataset—the remaining are broken links. + +We use this $99.2\%$ sample of GoodNews and the train-validation-test split provided by [3]. There are 421K training, 18K validation, and 23K test captions. Note that this split was performed at the level of captions, so it is possible for a training and test caption to share the same article text (since articles have multiple images). + +We observe several issues with GoodNews that may limit a system's ability to generate high-quality captions. Many of the articles in GoodNews are partially extracted because the generic article extraction library failed to recognize some of the HTML tags specific to The New York Times. Importantly, the missing text often included the first few paragraphs which frequently contain important information for captioning images. In addition GoodNews contains some non-English articles and captioned images from the recommendation sidebar which are not related to the main article. + +Table 1: Summary of news captioning datasets + +
GoodNewsNYTimes800k
Number of articles257 033444 914
Number of images462 642792 971
Average article length451974
Average caption length1818
Collection start monthJan 10Mar 05
Collection end monthMar 18Aug 19
% of caption words that are
- nouns16%16%
- pronouns1%1%
- proper nouns23%22%
- verbs9%9%
- adjectives4%4%
- named entities27%26%
- people's names9%9%
% of captions with
- named entities97%96%
- people's names68%68%
+ +NYTimes800k: The aforementioned issues motivated us to construct NYTimes800k, a $70\%$ larger and more complete dataset of New York Times articles, images, and captions. We used The New York Times public API² for the data collection and developed a custom parser to resolve the missing text issue in GoodNews. The average article in NYTimes800k is 963 words long, whereas the average article in GoodNews is 451 words long. Our parser also ensures that NYTimes800k only contains English articles and images that are part of the main article. Finally, we also collect information about where an image is located in the corresponding article. Most news articles have one image at the top that relates to the key topic. However $39\%$ of the articles have at least one more image somewhere in the middle of text. The image placement and the text surrounding the image is important information for captioning as we will show in our evaluations. Table 1 presents a comparison between GoodNews and NYTimes800k. + +Entities play an important role in NYTimes800k, with $97\%$ of captions containing at least one named entity. The most popular entity type are names of people, comprising a third of all named entities (see the supplementary material for a detailed breakdown of entity types). Furthermore, $71\%$ of training images contain at least one face and $68\%$ of training captions mention at least one person's name. Figure 3 provides a further breakdown of the co-occurrence of faces and people's names. One important observation is that $99\%$ of captions contain at most four names. + +![](images/f9d1ded3bdec2c99e16d9d97d9d0dc4a2d0dba8448a20fb90eb68085d8ec2954.jpg) +Figure 3: Co-occurrence of faces and people's names in NYTimes800k training data. The blue bars count how many images containing a certain number of faces. The orange bars count how many captions containing a certain number of people's names. + +We split the training, validation, and test sets according to time, as shown in Table 2. Compared to the random split used in GoodNews, splitting by time allows us to study the model performance on novel news events and new names, which might be important in a deployment scenario. Out of the 100K proper nouns in our test captions, $4\%$ never appear in any training captions. + +# 5. Experiments + +This section describes settings for neural network learning, baselines and evaluation metrics, followed by a discussion of key results. + +# 5.1. Training Details + +Following Wu et al. [52], we set the hidden size $D^{E}$ to 1024; the number of heads $H$ to 16; and the number of transformer blocks $L$ to four with kernel sizes 3, 7, 15, and 31, respectively. For parameter optimization we use the adaptive gradient algorithm Adam [21] with the following parameter: $\beta_{1} = 0.9$ , $\beta_{2} = 0.98$ , $\epsilon = 10^{-6}$ . We warm up the learning rate in the first $5\%$ of the training steps to $10^{-4}$ , and decay it linearly afterwards. We apply $L_{2}$ regularization to all network weights with a weight decay of $10^{-5}$ and using the fix [28] that decouples the learning rate from the regularization parameter. We clip the gradient norm at 0.1. We use a maximum batch size of 16 and training is stopped after the model has seen 6.6 million examples. This is equivalent to 16 epochs on GoodNews and 9 epochs on NYTimes800k. + +The training pipeline is written in PyTorch [34] using the AllenNLP framework [15]. The RoBERTa model and dynamic convolution code are adapted from fairseq [32]. Training is done with mixed precision to reduce the memory footprint and allow our full model to be trained on a single GPU. The full model takes 5 days to train on one Titan V GPU and has 200 million trainable parameters—see the supplementary material for the size of each model variant. + +Table 2: NYTimes800k training, validation, and test splits + +
TrainingValidationTest
Number of articles433 5612 9788 375
Number of images763 2177 77721 977
Start monthMar 15May 19Jun 19
End monthApr 19May 19Aug 19
+ +# 5.2. Evaluation Metrics + +We use BLEU-4 [33] and CIDEr [48] scores as they are standard for evaluating image captions. These are obtained using the COCO caption evaluation toolkit3. The supplementary material additionally reports BLEU-1, BLEU-2, BLEU-3, ROUGE [26], and METEOR [8]. Note that CIDEr is particularly suited for evaluating news captioning models as it puts more weight than other metrics on uncommon words. In addition, we evaluate the precision and recall on named entities, people's names, and rare proper names. Named entities are identified in both the ground-truth captions and the generated captions using SpaCy. We then count exact string matches between the ground truths and generated entities. For people's names we restrict the set of named entities to those marked as PERSON by the SpaCy parser. Rare proper nouns are nouns that appear in a test caption but not in any training caption. + +# 5.3. Baselines and Model Variants + +We show two previous state-of-the-art models: Biten (Avg + CtxIns) and Biten (TBB + AttIns) [3]. To provide a fair comparison we used the full caption results released by Biten et al. [3] and re-evaluated with our evaluation pipeline on a slightly smaller test set (a few test images are no longer available due to broken URLs). The final metrics are the same as originally reported if rounded to the nearest whole number. + +We evaluate a few key modeling choices: the decoder type (LSTM vs Transformer), the text encoder type (GloVe vs RoBERTa vs weighted RoBERTa), and the additional context domains (location-aware, face attention, and object attention). The location-aware models select the 512 tokens surrounding the image instead of the first 512 tokens of the article. Note that all our models use BPE in the decoder with adaptive softmax. We ensure that the total number of trainable parameters for each model is within $7\%$ of one another (148 million to 159 million), with the exception of face attention (171 million) and object attention (200 million) since the latter two have extra multi-head attention modules. The results reported over GoodNews are based on a model trained solely on GoodNews, using the original random split of [3] for easier comparison to previous work. + +Table 3: Results on GoodNews (rows 1–10) and NYTimes800k (rows 11–19). We report BLEU-4, ROUGE, CIDEr, and precision (P) & recall (R) of named entities, people's names, and rare proper nouns. Precision and recall are expressed as percentages. Rows 1–2 contain previous state-of-the-art results [3]. Rows 3–5 and 11–13 are ablation studies where we swap the Transformer with an LSTM and/or RoBERTa with GloVe. These models only have the image attention (IA). Rows 6 & 14 are our baseline RoBERTa transformer language model that only has the article text (and not the image) as inputs. Building on top of this, we first add attention over image patches (rows 7 & 15). We then take a weighted sum of the RoBERTa embeddings (rows 8 & 16) and attend to the text surrounding the image instead of the first 512 tokens of the article (row 17). Finally we add attention over faces (rows 9 & 18) and objects (rows 10 & 19) in the image. + +
BLEU-4ROUGECIDErNamed entitiesPeople's namesRare proper nouns
PRPRPR
GoodNews(1) Biten (Avg + CtxIns) [3]0.8912.213.18.236.069.386.551.0612.5
(2) Biten (TBB + AttIns) [3]0.7612.212.78.875.6411.96.981.5812.6
(3) LSTM + GloVe + IA1.9713.613.910.77.099.075.3600
(4) Transformer + GloVe + IA3.4817.025.214.311.114.510.500
(5) LSTM + RoBERTa + IA3.4517.028.615.512.016.412.42.758.64
(6) Transformer + RoBERTa4.6018.640.919.316.124.418.710.718.7
(7) + image attention5.4520.748.521.117.426.920.712.220.9
(8) + weighted RoBERTa6.021.253.121.818.528.822.816.226.0
(9) + face attention6.0521.454.322.018.629.323.315.524.5
(10) + object attention6.0521.453.822.218.729.223.115.626.3
NYTimes800k(11) LSTM + GloVe + IA1.7713.112.110.27.248.835.7300
(12) Transformer + GloVe + IA2.7515.920.313.210.813.29.6600
(13) LSTM + RoBERTa + IA3.2916.124.915.112.917.714.47.479.50
(14) Transformer + RoBERTa4.2617.333.917.816.323.619.721.116.7
(15) + image attention5.0119.440.320.018.128.223.024.319.3
(16) + weighted RoBERTa5.7519.945.121.119.629.725.429.622.8
(17) + location-aware6.3621.452.824.021.935.430.233.827.2
(18) + face attention6.2621.553.924.222.136.530.833.426.4
(19) + object attention6.3021.754.424.622.237.331.134.227.0
+ +# 5.4. Results and Discussion + +Table 3 summarizes evaluation metrics on GoodNews and NYTimes800k, while Figure 4 compares generated captions from different model variants. Our full model (row 10) performs substantially better than the existing state of the art [3] across all evaluation metrics. On GoodNews, the full model yields a CIDEr score of 53.8, whereas the previous state of the art [3] achieved a CIDEr score of only 13.1. + +Our most basic LSTM model (row 3) differs from Biten et al. [3] in that we use BPE in the caption decoder instead of template generation and filling. The slight improvement in CIDEr (from 13.1 to 13.9) shows that BPE offers a competitive end-to-end alternative to the template filling method. This justifies the use of BPE in the remaining experiments. + +Models that encode articles using GloVe embeddings (rows 3-4 and 11-12) are unable to generate rare proper + +nouns, giving a precision and recall of 0. This is because the encoder skips words that are not part of the fixed GloVe vocabulary. This motivates the switch from GloVe to RoBERTa, which has an unbounded vocabulary. This switch shows a clear advantage in rare proper noun generation. On NYTimes800k, even the worst performing model that uses RoBERTa (row 13) achieves a precision of $7.47\%$ , a recall of $9.50\%$ , and a CIDEr gap of 12.8 points over the model without RoBERTa (row 11). + +Another important modeling choice is the functional form of the caption decoder. We find that the Transformer architecture provides a substantial improvement over the LSTM with respect to all evaluation metrics. For example, when we swap the LSTM with a Transformer (from row 13 to 15), the CIDEr score on NYTimes800k jumps from 24.9 to 40.3. + +Adding attention over faces improves both the recall and precision of people's names. It has no significant effect on other entity types (see the supplementary material for + +# Japan Desperately Needs More Day Care Workers. New Mothers Need Not Apply. + +TOKYO — Ever since she was a young girl, all Erica Takato wanted to do was work with small children. A few weeks into her term, she requested time off for bed rest ordered by her doctor. + +![](images/ea60739224b76463d4d165abe6777a22f0a2299ecc810f172e80576312423eb3.jpg) +··· +Figure 4: An example article (left) and the corresponding news captions (right) from the NYTimes800k test set. The model with no access to the image makes a sensible but incorrect guess that the image is about Ms. Takato. Since the image appears in the middle of the article, only the location-aware models correctly state that the focus of the image is on a day care center. + +Union officials and former teachers cite a major obstacle to the aspirations: + +
Ground-truth captionA nursery school teacher showing a bug to his class.
Transformer + RoBERTaMs. Takato, who was born in Japan, was forced out of the day care program because she was pregnant.
+ image attentionMs. Takato with her son, Kishiko, and their children, from left, Kaiti, 3, and Kaitama, 3, at a day care center in Tokyo.
+ weighted RoBERTaMs. Takato, with her son, Shiro, and son, at home in Tokyo. +Ms. Takato, who was pregnant, said she was “so frustrated and lost hope of being able to work.”
+ location-awareA day care center in Tokyo.
+ face attentionA child care center in Tokyo. The government is eager to bring more women into the work force, and is trying to come up with enough child care for mothers.
+ object attentionA day care worker in Tokyo. The government is trying to bring more women into the work force, and the government is trying to come up with enough child care for mothers to go back to work.
+ +a detailed breakdown). Importantly, people's names are the most common entity type in news captions and so we also see an improvement in CIDEr. Attention over objects also improves performance on most metrics, especially on NYTimes800k. More broadly, this result suggests that introducing specialized vision models tuned to the common types of objects such as organizations (via logos or landmarks) is a promising future direction to improve the performance on news image captioning. + +The location-aware models (rows 17-19) focus the article context using the image location in the article, information which is only available in our NYTimes800k dataset. This simple focusing of context offers a big improvement to CIDEr, from 45.1 (row 16) to 52.8 (row 17). This suggests a strong correspondence between an image and the closest text that can be easily exploited to generate better captions. + +The supplementary material additionally reports three caption quality metrics: caption length, type-token ratio (TTR) [45], and Flesch reading ease (FRE) [14, 20]. TTR is the ratio of the number of unique words to the total number of words in a caption. The FRE takes into account the number of words and syllables and produces a score between 0 and 100, where higher means being easier to read. As measured by FRE, captions generated by our model exhibit a level of language complexity that is closer to the ground truths. Additionally, captions generated by our model are 15 words long on average, which is closer to the ground-truths (18 words) than those generated by the previous state of the art (10 words) [3]. + +# 6. Conclusion + +In this paper, we have shown that by using a carefully selected novel combination of the latest techniques drawn from multiple sub-fields within machine learning, we are able to set a new SOTA for news image captioning. Our model can incorporate real-world knowledge about entities across different modalities and generate text with better linguistic diversity. The key modeling components are byte-pair encoding that can output any word, contextualized embeddings for article text, specialized face & object encoding, and transformer-based caption generation. This result provides a promising step for other image description tasks with contextual knowledge, such as web pages, social media feeds, or medical documents. Promising future directions include specialized visual models for a broader set of entities like countries and organizations, extending the image context from the current article to recent or linked articles, or designing similar techniques for other image and text domains. + +# Acknowledgement + +This research was supported in part by the Data to Decisions Cooperative Research Centre whose activities are funded by the Australian Commonwealth Government's Cooperative Research Centres Programme. The research was also supported in part by the Australian Research Council through project number DP180101985. We thank NVIDIA for providing us with Titan V GPUs through their GPU Grant Program. + +# References + +[1] Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[2] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. +[3] Ali Furkan Biten, Lluis Gomez, Marcal Rusinol, and Dimosthenis Karatzas. Good news, everyone! context driven entity-aware captioning for news images. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[4] Ondrej Bojar, Christian Federmann, Mark Fishel, Yvette Graham, Barry Haddow, Philipp Koehn, and Christof Monz. Findings of the 2018 conference on machine translation (WMT18). In Proceedings of the Third Conference on Machine Translation: Shared Task Papers, pages 272-303, Belgium, Brussels, Oct. 2018. Association for Computational Linguistics. +[5] Qiong Cao, Li Shen, Weidi Xie, Omkar M. Parkhi, and Andrew Zisserman. VGGFace2: A dataset for recognising faces across pose and age. 2018 13th IEEE International Conference on Automatic Face & Gesture Recognition (FG 2018), pages 67-74, 2017. +[6] Marcella Cornia, Lorenzo Baraldi, and Rita Cucchiara. Show, control and tell: A framework for generating controllable and grounded captions. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[7] Yann N. Dauphin, Angela Fan, Michael Auli, and David Grangier. Language modeling with gated convolutional networks. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 933-941, Sydney, Australia, 06-11 Aug 2017. PMLR. +[8] Michael Denkowski and Alon Lavie. Meteor universal: Language specific translation evaluation for any target language. In Proceedings of the Ninth Workshop on Statistical Machine Translation, pages 376-380, Baltimore, Maryland, USA, June 2014. Association for Computational Linguistics. +[9] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. +[10] Jeffrey Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Kate Saenko, and Trevor Darrell. Long-term recurrent convolutional networks for visual recognition and description. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. + +[11] Angela Fan, Mike Lewis, and Yann Dauphin. Hierarchical neural story generation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 889-898, Melbourne, Australia, July 2018. Association for Computational Linguistics. +[12] Hao Fang, Saurabh Gupta, Forrest Iandola, Rupesh K. Srivastava, Li Deng, Piotr Dollar, Jianfeng Gao, Xiaodong He, Margaret Mitchell, John C. Platt, C. Lawrence Zitnick, and Geoffrey Zweig. From captions to visual concepts and back. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. +[13] Yansong Feng and Mirella Lapata. Automatic caption generation for news images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(4):797-812, April 2013. +[14] Rudolph Flesch. A new readability yardstick. Journal of applied psychology, 32(3):221, 1948. +[15] Matt Gardner, Joel Grus, Mark Neumann, Oyvind Tafjord, Pradeep Dasigi, Nelson F. Liu, Matthew Peters, Michael Schmitz, and Luke Zettlemoyer. AllenNLP: A deep semantic natural language processing platform. In Proceedings of Workshop for NLP Open Source Software (NLP-OSS), pages 1-6, Melbourne, Australia, July 2018. Association for Computational Linguistics. +[16] Édouard Grave, Armand Joulin, Moustapha Cisse, David Grangier, and Hervé Jégou. Efficient softmax approximation for GPUs. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1302-1310, Sydney, Australia, 06-11 Aug 2017. PMLR. +[17] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. +[18] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pages 448-456, Lille, France, 07-09 Jul 2015. PMLR. +[19] Andrej Karpathy and Li Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. +[20] J Peter Kincaid, Robert P Fishburne Jr, Richard L Rogers, and Brad S Chissom. Derivation of new readability formulas (automated readability index, fog count and flesch reading ease formula) for navy enlisted personnel. 1975. +[21] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015. +[22] Guillaume Lample and Alexis Conneau. Cross-lingual language model pretraining. ArXiv, abs/1901.07291, 2019. +[23] Zhen-Zhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. ALBERT: A lite BERT for self-supervised learning of language representations. ArXiv, abs/1909.11942, 2019. + +[24] Dianqi Li, Qiuyuan Huang, Xiaodong He, Lei Zhang, and Ming-Ting Sun. Generating diverse and accurate visual captions by comparative adversarial learning. arXiv preprint arXiv:1804.00861, 2018. +[25] Jiangyun Li, Peng Yao, Longteng Guo, and Weicun Zhang. Boosted transformer for image captioning. Applied Sciences, 9(16):3260, 2019. +[26] Chin-Yew Lin. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out, pages 74-81, Barcelona, Spain, July 2004. Association for Computational Linguistics. +[27] Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar S. Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke S. Zettlemoyer, and Veselin Stoyanov. RoBERTa: A robustly optimized BERT pretraining approach. ArXiv, abs/1907.11692, 2019. +[28] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019. +[29] Di Lu, Spencer Whitehead, Lifu Huang, Heng Ji, and Shih-Fu Chang. Entity-aware image caption generation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4013-4023, Brussels, Belgium, Oct.-Nov. 2018. Association for Computational Linguistics. +[30] Jiasen Lu, Caiming Xiong, Devi Parikh, and Richard Socher. Knowing when to look: Adaptive attention via a visual sentinel for image captioning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. +[31] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In Advances in Neural Information Processing Systems 26, pages 3111-3119. Curran Associates, Inc., 2013. +[32] Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. faireq: A fast, extensible toolkit for sequence modeling. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations), pages 48-53, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. +[33] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pages 311-318, Philadelphia, Pennsylvania, USA, July 2002. Association for Computational Linguistics. +[34] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. In NIPS Autodiff Workshop, 2017. +[35] Jeffrey Pennington, Richard Socher, and Christopher D. Manning. GloVe: Global vectors for word representation. In Empirical Methods in Natural Language Processing (EMNLP), pages 1532-1543, 2014. +[36] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019. + +[37] Arnau Ramisa, Fei Yan, Francesc Moreno-Noguer, and Krystian Mikolajczyk. Breakingnews: Article annotation by image and text processing. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40:1072-1085, 2016. +[38] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. ArXiv, abs/1804.02767, 2018. +[39] Steven J. Rennie, Etienne Marcheret, Youssef Mroueh, Jerret Ross, and Vaibhava Goel. Self-critical sequence training for image captioning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. +[40] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. +[41] Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1715-1725, Berlin, Germany, Aug. 2016. Association for Computational Linguistics. +[42] Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2556-2565, Melbourne, Australia, July 2018. Association for Computational Linguistics. +[43] Sandeep Subramanian, Raymond Li, Jonathan Pilault, and Christopher Joseph Pal. On extractive and abstractive neural document summarization with transformer language models. ArXiv, abs/1909.03186, 2019. +[44] A. Tariq and H. Foroosh. A context-driven extractive framework for generating realistic image descriptions. IEEE Transactions on Image Processing, 26(2):619-632, Feb 2017. +[45] Mildred C Templin. Certain language skills in children; their development and interrelationships. 1957. +[46] Ian Tenney, Dipanjan Das, and Ellie Pavlick. BERT rediscovers the classical NLP pipeline. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4593-4601, Florence, Italy, July 2019. Association for Computational Linguistics. +[47] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems 30, pages 5998-6008. Curran Associates, Inc., 2017. +[48] Ramakrishna Vedantam, C. Lawrence Zitnick, and Devi Parikh. Cider: Consensus-based image description evaluation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. +[49] Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. +[50] Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: Lessons learned from the 2015 + +mscoco image captioning challenge. IEEE transactions on pattern analysis and machine intelligence, 39(4):652-663, 2016. +[51] Weixuan Wang, Zhihong Chen, and Haifeng Hu. Hierarchical attention network for image captioning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8957-8964, 2019. +[52] Felix Wu, Angela Fan, Alexei Baevski, Yann Dauphin, and Michael Auli. Pay less attention with lightweight and dynamic convolutions. In International Conference on Learning Representations, 2019. +[53] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron C. Courville, Ruslan Salakhutdinov, Richard S. Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, 2015. +[54] Zhilin Yang, Zihang Dai, Yiming Yang, Jaime G. Carbonell, Ruslan Salakhutdinov, and Quoc V. Le. XLNet: Generalized autoregressive pretraining for language understanding. ArXiv, abs/1906.08237, 2019. +[55] Quanzeng You, Hailin Jin, Zhaowen Wang, Chen Fang, and Jiebo Luo. Image captioning with semantic attention. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. +[56] Kaipeng Zhang, Zhanpeng Zhang, Zhifeng Li, and Yu Qiao. Joint face detection and alignment using multitask cascaded convolutional networks. IEEE Signal Processing Letters, 23:1499-1503, 2016. +[57] Sanqiang Zhao, Piyush Sharma, Tomer Levinboim, and Radu Soricut. Informative image captioning with external sources of information. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6485-6494, Florence, Italy, July 2019. Association for Computational Linguistics. +[58] Xinxin Zhu, Lixiang Li, Jing Liu, Haipeng Peng, and Xinxin Niu. Captioning transformer with stacked attention modules. Applied Sciences, 8(5):739, 2018. \ No newline at end of file diff --git a/transformandtellentityawarenewsimagecaptioning/images.zip b/transformandtellentityawarenewsimagecaptioning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..86a17f8473169523365a67a7c70ec8a66d739c4d --- /dev/null +++ b/transformandtellentityawarenewsimagecaptioning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0b0b64641416560a89d440b580b32e4be2d9baf25b1071c0577661f993fc3f7 +size 568107 diff --git a/transformandtellentityawarenewsimagecaptioning/layout.json b/transformandtellentityawarenewsimagecaptioning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3ee757b2dbbf1f585cf8d827860b3681903566f3 --- /dev/null +++ b/transformandtellentityawarenewsimagecaptioning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd785e77381c0e650e1a79448adfca30a54a2815a352af077cca6dd58e149db6 +size 399450 diff --git a/transformationganforunsupervisedimagesynthesisandrepresentationlearning/b8b4d9b3-70f4-415c-9dd8-3742cb9218dc_content_list.json b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/b8b4d9b3-70f4-415c-9dd8-3742cb9218dc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..265e79c3622dfba33a7e6139cea8fa93402d28b5 --- /dev/null +++ b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/b8b4d9b3-70f4-415c-9dd8-3742cb9218dc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43c567fb1d0272f66e1542c1f20c89a144669c7a583c81cca6e161036df47cc7 +size 74600 diff --git a/transformationganforunsupervisedimagesynthesisandrepresentationlearning/b8b4d9b3-70f4-415c-9dd8-3742cb9218dc_model.json b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/b8b4d9b3-70f4-415c-9dd8-3742cb9218dc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ea8b3e607537540b5eb62212c5f45fa23456e1df --- /dev/null +++ b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/b8b4d9b3-70f4-415c-9dd8-3742cb9218dc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c82b05adbdc43fcf2f97ff71a3c8ce11553b06ca3a7610d63142384c1590250 +size 91962 diff --git a/transformationganforunsupervisedimagesynthesisandrepresentationlearning/b8b4d9b3-70f4-415c-9dd8-3742cb9218dc_origin.pdf b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/b8b4d9b3-70f4-415c-9dd8-3742cb9218dc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..eba65e5ae7c1363016fbbd4a9d8f72b6d6e1ecae --- /dev/null +++ b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/b8b4d9b3-70f4-415c-9dd8-3742cb9218dc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:700328cd1e0741bc1894bb64ccee6603674ad290a04905412b10206211476136 +size 638918 diff --git a/transformationganforunsupervisedimagesynthesisandrepresentationlearning/full.md b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..dc982c15c0ccb616bb6515321cc516da58740038 --- /dev/null +++ b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/full.md @@ -0,0 +1,303 @@ +# Transformation GAN for Unsupervised Image Synthesis and Representation Learning + +Jiayu Wang $^{1}$ Wengang Zhou $^{1}$ Guo-Jun Qi $^{2,4}$ Zhongqian Fu $^{3}$ Qi Tian $^{1}$ Houjiang Li $^{1}$ + +$^{1}$ CAS Key Laboratory of GIPAS, Department of EEIS, University of Science and Technology of China + +$^{2}$ Laboratory for MAchine Perception and LEarning (MAPLE) + +3 Department of EST, University of Science and Technology of China + +4 Futurewei Technologies + +wjy1031@mail.ustc.edu.cn,{zhwg,zqfu,lihq}@ustc.edu.cn,guojunq@gmail.com,wywqtian@gmail.com + +# Abstract + +Generative Adversarial Networks (GAN) have shown promising performance in image generation and unsupervised learning (USL). In most cases, however, the representations extracted from unsupervised GAN are usually unsatisfactory in other computer vision tasks. By using conditional GAN (CGAN), this problem could be solved to some extent, but the main shortcoming of conditional GAN is the necessity for labeled data. To improve both image synthesis quality and representation learning performance under the unsupervised setting, in this paper, we propose a simple yet effective Transformation Generative Adversarial Networks (TrGAN). In our approach, instead of capturing the joint distribution of image-label pairs $p(x,y)$ as in conditional GAN, we try to estimate the joint distribution of transformed image $t(x)$ and transformation $t$ . Specifically, given a randomly sampled transformation $t$ , we train the discriminator to give an estimate of input transformation, while following the adversarial training scheme of the original GAN. In addition, intermediate feature matching as well as feature-transformation matching methods are introduced to strengthen the regularization on the generated features. To evaluate the quality of both generated samples and extracted representations, extensive experiments are conducted on four public datasets. The experimental results on the quality of both the synthesized images and the extracted representations demonstrate the effectiveness of our method. + +# 1. Introduction + +As a fundamental task in computer vision, representation learning has received lots of attention over the last decades. Thanks to the strong representational power of + +deep neural networks (DNN), models combined with DNN have demonstrated tremendous successes in various computer vision tasks, including image classification, semantic segmentation and image generation. Moreover, in practice, with the DNN pre-trained on large scale datasets for classification, the extracted representations could be transferred to other tasks [28], and even to other modalities [11]. However, the training methodology of deep neural networks is mainly driven by fully-supervised approaches with a large volume of labeled data. With such a limitation, when only a limited amount of labeled data is available, it becomes a highly challenging problem to train DNN models effectively. Therefore, as an effective DNN training method without the need for extensive manual annotations, unsupervised learning has received more and more attention [9, 14, 33, 40]. + +Generative models, for example, governed by probabilistic approaches, are trained to capture real data distribution using unlabeled datasets. In order to produce new content, generative models are required to have a good understanding of the training data, which makes them also effective in unsupervised learning tasks. One class of generative models that has been applied to representation learning is Generative Adversarial Networks (GAN) [10]. Since the discriminator is trained to extract features that is essential for distinguishing real data from generated one, the intermediate features from discriminator can be viewed as the extracted representations of its input [27]. However, it has been observed that the training dynamics in GAN are often unstable. As a result, the generated distribution varies during the training process, which poses negative influence on representation learning of the discriminator. This issue is usually addressed by conditional image generation, i.e., conditional GAN [24, 36]. For example, in TripleGAN [19], the model characterizes the uncertainty of both the real data $x$ and + +the label information $y$ , and estimates a joint distribution $p(x, y)$ of input-label pairs. Such a method introduces additional class information so as to encourage the discriminator to learn more stable representations, but doesn't conform to the perspective of GAN as a tool for unsupervised learning. + +In addition to GAN, another kind of unsupervised learning methods called self-supervised learning have demonstrated its great potential for no need of manually labeled data. Leveraging the self-supervised information directly from training data themselves, such kind of methods create self-supervised objectives to train the networks. Recently, Chen et al. [32] proposed the self-supervised GAN (SS-GAN), in which an auxiliary image rotation degree classification objective was incorporated into the adversarial training process. And the discriminator was trained to predict the angle of rotation based only on rotated images. The advantages of such integration is that the whole model could inherit the benefits of conditional GAN without labeled data. However, in SS-GAN, the rotation-detectable regularization is only applied on the generator's output, it is still not sufficient enough. Actually, it is also important, for improved quality of generated images, to regularize the internal features of generator, and this work presents a feature-transformation matching approach to meet such a requirement. + +In this work, we propose Transformation Generative Adversarial Networks (TrGAN) for improving unsupervised image synthesis and representation learning. We follow the collaborative adversarial training scheme of the self-supervised GAN [32], and re-design the self-supervision method as well as the training methodology. Inspired by Auto-Encoding Transformation (AET) [39], we adopt projective transformation to replace image rotation, and train the model to estimate the transformation based on both of original images and their transformed counterparts. In other words, we force the model to capture the relative change of geometric structures caused by the given transformation. Then, we separate both discriminator and generator into several blocks, and match the internal features between discriminator and generator. In addition, we further introduce feature-transformation regularization on internal features of generator. In other words, the generator is required to generate images and internal features that are both transformation-detectable. The main framework of our model is illustrated in Figure 1. + +In short, we summarize the contributions of our work as follows: + +- We propose a feature-transformation matching approach through which the proposed model can more effectively capture the real data distribution. +- The intermediate feature matching between discriminator and generator provides additional supervision on + +the feature space of the generator, which in turn improves the quality of features extracted from the discriminator. + +- The proposed TrGAN model improves the quality of both generated images and extracted representations on multiple widely used datasets. Under the same experimental setting, our model achieves FID even better than its conditional counterpart: Projection Conditional GAN [21]. + +# 2. Related Work + +Auto-Encoder. One of the most representative unsupervised learning methods is Auto-Encoder. During the training, the encoder is trained to output sufficient representations to reconstruct original images by the corresponding decoder. The common belief is that to reconstruct the input images, the extracted features should contain sufficient information. Many variants of Auto-Encoder [14, 16, 33, 34] have been proposed, in which the encoder acts as an unsupervised features extractor after being jointly trained with the decoder. For example, the variational auto-encoder [16], in which the distribution of features from the encoder is constrained to a prior distribution. In order to learn more robust representation, Denoising auto-encoder [33] is designed to reconstruct noise-corrupted data. Contrastive Auto-Encoder [29] aims to extract representation invariance to small perturbation. + +GAN. In recent years, GAN has gained significant popularity in image generation tasks, in practice, it deals with the generation tasks by approximating a proper mapping relation between data distribution and low-dimensional distribution. Specifically, a random noise $z$ is fed into the generator $G$ to obtain a sample $G(z)$ . And the discriminator $D$ is required to distinguish between real samples and generated ones. + +Benefiting from the flexibility of GAN's framework, adversarial training methodology has been successfully leveraged to many traditional tasks, including image superresolution [18] and image-to-image translation [42]. Besides, the most representative one is unsupervised representation learning. For example, DCGAN [27] used the intermediate features from discriminator as the representations of the input images. On the other hand, the input of the generator, i.e., noises, can be viewed as the representations of the output images. In [6, 8], an extra encoder was trained as an inverted version of the corresponding generator. Given an input image, the output noise of the encoder can be used as the extracted representation. However, as discussed in previous work [31], the training dynamics in GAN are quite unstable, which poses negative influence on the quality of the generated images. A large category of GAN variants have been proposed to address this problem, and recent de + +velopment has shown the promising performance of conditional GAN (CGAN) in stable training and expressive representation learning [19, 21, 23]. But the main shortcoming of CGAN is that they usually require a large volume of labeled data, which is sometimes impractical to scale. + +Self-Supervised Learning. In addition to the aforementioned methods, a special paradigm called self-supervised learning has lead to a tremendous progress in unsupervised learning. Rely on the visual information present on the training data, such methods could be applied in label-free tasks. For example, Zhang et al. [40, 41] trained the model to predict the missing channels with only a subset of the color channels of images as input. Gidaris et al. [9] proposed to train the model by predicting the $2D$ rotations of four discrete angles that is applied to the image. Doersch et al. [5] predict the relative positions of sampled patches from the input image. Agrawal et al. [1] use the motion of a moving vehicle between two consecutive frames as self-supervised information. More recently, Zhang et al. [39] propose a novel Auto-Encoding Transformation (AET), in which the model is trained to learn representations by reconstructing input transformations. In self-supervised GAN [32], an auxiliary, self-supervised objective is integrated into the adversarial loss instead of manually labeled data. + +Intermediate Feature Matching. In context of knowledge transfer, intermediate feature matching (IFM) is a training method that uses the internal features from a pretrained model to guide another model [12, 30]. It has also been adopted in some variants of conditional GAN, such as CVAE-GAN [2] and Stacked GAN [35], in which the intermediate representations from a pre-trained classifier are used to further guide the generator. Benefiting from the transformation predicting objective, the features extracted by the discriminator could contain enough information about the visual structures, and thus make the IFM more effective in our TrGAN. Our method can be considered as a special kind of knowledge transfer. But different from CVAE-GAN and Stacked GAN, the intermediate representations used for IFM in our model are from the discriminator, and with no requirement of labeled data. + +# 3. Proposed Approach + +In the following, we first review the background of GAN in Section 3.1 for the sake of completeness. We then describe the main framework of Transformation Generative Adversarial Networks in Section 3.2. After that, we elaborate the intermediate feature matching used in our model in Section 3.3. In Section 3.4, we will focus on our proposal of feature-transformation matching. We summarize the details of the whole framework in Section 3.5. + +![](images/02c91ba4c8b38532304d0e13bae4c124e3105c9af0cd9e506564dc93fe0e675d.jpg) +Figure 1. The main framework of the global discriminator $D$ . + +# 3.1. Background of GAN + +The Generative Adversarial Networks consist of two main components: a generator $G$ as well as a discriminator $D$ . The generator $G$ tries to generate data directly from low-dimensional noise input, while the discriminator $D$ is required to capture distinguishing features of real data and distinguish between real and generated images. Let $p(x)$ represent real data distribution, and $p(z)$ represent the distribution of noise input. The original adversarial loss function is written as: + +$$ +\begin{array}{l} \min _ {G} \max _ {D} V (G, D) = \mathbb {E} _ {x \sim p (x)} [ \log D (x) ] \tag {1} \\ + \mathbb {E} _ {z \sim p (z)} [ \log (1 - D (G (z))) ]. \\ \end{array} +$$ + +# 3.2. Transformation Generative Adversarial Networks + +Recent years have witnessed many applications of conditional GAN to semi-supervised learning. The idea of conditional GAN is to capture the joint distribution of image-label pairs $p(x, y)$ . While for our TrGAN, we aim to estimate the joint distribution of transformed image and transformation. Given a transformation $t$ from a distribution $p(t)$ , we apply it to a random image $x$ , and get a transformed image $t(x)$ . The joint distribution $p(t(x), t)$ can be factorized in two ways, namely, $p(t(x), t) = p(t)p(t(x)|t)$ and $p(t(x), t) = p(t(x))p(t|t(x))$ . The conditional distributions $p(t(x)|t)$ and $p(t|t(x))$ are critical for image transformation and transformation predicting, respectively. + +To jointly estimate these conditional distributions, TRGAN consists of two main components: (1) a global discriminator $D$ that approximately characterizes $p(t'|t(x)) \approx p(t|t(x))$ , in which a single encoder-decoder network with two heads is used to distinguish real images from generated images and predict the transformation. As shown in Figure 1, the encoder $En$ extracts the feature from a given sample $x$ . Then, $En(x)$ and $En(G(z))$ are fed into the final fully-connected layer to compute the adversarial loss $V(G,D)$ . Meanwhile, the decoder $De$ is trained to reconstruct the parameters $(t')$ of the corresponding input transformation based on the features $En(x)$ and $En(t(x))$ ; (2) a generator $G$ that approximately characterizes $p(t(G(z)|t) \approx p(t(x)|t)$ . In this way, given a random transformation $t$ , the goal of generator is not only to gen + +![](images/b17ed561c35d38faf07a0e41f46b79e944b799f85d6383c108eed4208fab8363.jpg) +Figure 2. The workflow of intermediate feature matching. + +erate images that are indistinguishable from real ones, but also to ensure the transformation-detectable property of the generated images. + +For generated images $G(z)$ , transformation-detectable means: with the discriminator $D$ that is trained to predict the transformation $t$ only on real images $x$ and $t(x)$ , when providing $G(z)$ and $t(G(z))$ as input, the corresponding $t$ can still be correctly predicted. Such regularization could force $G(z)$ to have similar high-quality visual structures that is essential for transformation prediction as real images. + +The generator $G$ as well as the global discriminator $D$ are trained jointly by iteratively updating each other with respect to the adversarial loss $V(G, D)$ . Meanwhile, the transformation predicting loss $\ell(t', t)$ is added to the discriminator, where $t' = D[x, t(x)]$ . Note that the global discriminator $D$ is trained to predict the transformations based only on real images $x$ and $t(x)$ . For parameterized transformations, each transformation $t_{\theta}$ can be represented by its own parameters $\theta$ . We use the loss function written as: $\ell(t', t) = \frac{1}{2} \| \theta' - \theta \|_2^2$ . And the global loss functions for $G$ and $D$ are listed as follows: + +$$ +\mathcal {L} _ {D} = - V (G, D) + \alpha \mathbb {E} _ {x \sim p (x)} \mathbb {E} _ {t \sim p (t)} \ell \left(t ^ {\prime}, t\right), \tag {2} +$$ + +$$ +\mathcal {L} _ {G} ^ {\text {g l o b a l}} = V (G, D) + \beta \mathbb {E} _ {x \sim p _ {g} (x)} \mathbb {E} _ {t \sim p (t)} \ell \left(t ^ {\prime}, t\right). \tag {3} +$$ + +The transformation-detectable regularization is only applied on the generated images. However, to better utilize the advantages of self-supervised learning, we can further introduce an extra regularization on the feature space of the generator. Such a regularization could provide an label-free supervision directly on the feature space of the generator. + +# 3.3. Intermediate Feature Matching in TrGAN + +In previous works, such as Stacked GAN [35], the intermediate feature matching is usually accompanied by a pretrained classifier. While in our model, the transformation + +prediction task requires the discriminator to extract more useful information about the visual structures from inputs. As a result, we can directly use features from the discriminator to further guide the generator through IFM. + +Encoder Blocks. Let $h_i$ represent the feature of original image $x$ , $h_{it}$ is the feature of transformed image $t(x)$ . To implement IFM method, as shown in Figure 2, we first separate the encoder $En$ into several blocks $E_i$ , where $i \in \{0,1,\dots,k\}$ , and $k + 1$ is the number of blocks. Each block $E_i$ acts as a nonlinear mapping function between intermediate features. Specifically, the higher-level feature $h_{i+1}$ is achieved by feeding the lower-level feature $h_i$ into block $E_i$ , (i.e., $h_{i+1} = E_i(h_i)$ ). Note that $h_0 = x$ is the input image, and the number of blocks $k + 1$ is determined by the resolution of input image. + +Generator Blocks. From different encoder blocks, we could learn features of different levels, and the features of higher level contain more advanced semantic information. Thus, the intuition for adopting IFM is straightforward: the generated features should also be decomposed into multiple levels, with progressively increased semantic information. Similar to encoder blocks, as shown in Figure 2, the generator $G$ is also decomposed into several blocks: $G_{i}$ , where $i \in \{0,1,\dots ,k\}$ , and $k + 1$ is the number of blocks. Each block $G_{i}$ is trained as an inverted version of the corresponding $E_{i}$ . Specifically, each block $G_{i}$ receives generated feature $\hat{h}_{i + 1}$ from upper block $G_{i + 1}$ as input, and outputs feature $\hat{h}_i$ . Note that $\hat{h}_0 = G(z)$ is the generated image. + +To transfer knowledge from encoder blocks to generator blocks of the same level, we use adversarial loss to match intermediate representations as in Stacked GAN. Specifically, for each encoder block $E_{i}$ ( $i \neq 0$ ) and generator block $G_{i}$ ( $i \neq 0$ ), we introduce a feature discriminator $D_{i}$ . During the adversarial training, $D_{i}$ is trained to distinguish generated features $\hat{h}_{i}$ from extracted features $h_{i}$ , and $G_{i}$ is trained to "fool" the $D_{i}$ . The loss functions for $G$ and each $D_{i}$ are listed as follows: + +$$ +\mathcal {L} _ {D _ {i}} = - V \left(G _ {i}, D _ {i}\right), \tag {4} +$$ + +$$ +\mathcal {L} _ {G} ^ {a d v} = \sum_ {i = 1} ^ {k} \mathcal {L} _ {G _ {i}} ^ {a d v} = \sum_ {i = 1} ^ {k} V \left(G _ {i}, D _ {i}\right), \tag {5} +$$ + +where $V(G_{i},D_{i})$ is the corresponding adversarial loss. + +# 3.4. Feature-Transformation Matching in TrGAN + +The generator $G$ in our model has three training objectives: (1) $G$ is trained to generate images $G(z)$ that are indistinguishable from real images $x$ ; (2) $G_{i}$ is trained to generate intermediate features $\hat{h}_i$ that are indistinguishable from extracted features $h_i$ ; (3) $G$ is trained to generate images $G(z)$ that are transformation-detectable as real images $x$ . Intuitively, the generated features $\hat{h}_i$ should also be transformation-detectable as extracted features $h_i$ . + +Based on the above discussions, we propose a novel feature-transformation matching (FTM) regularization to encourage $\hat{h}_i$ to contain more quality visual information. + +Let us denote the mapping relation between $h_i$ and $h_{it}$ as $f_{it}(\cdot)$ . Given an arbitrary $t$ , we have $h_{it} = f_{it}(h_i)$ . For generated features $\hat{h}_i$ , transformation-detectable means: with the discriminator $D$ that is trained to predict the transformation $t$ only on extracted features $h_i$ and $h_{it}$ , when providing $\hat{h}_i$ and $f_{it}(\hat{h}_i)$ as input, the corresponding $t$ can still be correctly predicted. In essence, we aim to match the feature-transform relation between the real and generated features so that the generated ones contain the high-quality visual structures that reflected the same feature-transform relation. Specifically, for $i = 0$ , we have: $f_{it}(\cdot) = t(\cdot)$ , $h_i = x$ , $h_{it} = t(x)$ , $\hat{h}_i = G(z)$ , and $f_{it}(\hat{h}_i) = t(G(z))$ . But in practice, unlike the mapping relations between $x$ and $t(x)$ , $f_{it}(\cdot) (i \neq 0)$ is unknown to us. As a result, we cannot infer $f_{it}(\hat{h}_i)$ directly from $\hat{h}_i$ . + +To implement feature-transformation matching method, as shown in Figure 3 (a), for each block $E_{i}$ ( $i \neq 0$ ) and $G_{i}$ ( $i \neq 0$ ), we introduce a feature-transform net $T_{i}$ . Before applying FTM, we first train $T_{i}$ to approximate the unknown mapping function $f_{it}(\cdot)$ . Specifically, conditioned on a random $t$ , each $T_{i}$ takes in a feature $h_{i}$ as input, and the output is denoted as $T_{i}(h_{i},t)$ . The feature-transform net $T_{i}$ is trained with the loss function: + +$$ +\mathcal {L} _ {T _ {i}} = \frac {1}{2} \| T _ {i} (h _ {i}, t) - h _ {i t} \| _ {2} ^ {2}. \tag {6} +$$ + +In each iteration, we update $T_{i}$ to minimize $\mathcal{L}_{T_i}$ , then, we could use $T_{i}\left(\hat{h}_{i},t\right)$ to approximate $f_{it}(\hat{h}_i)$ . As shown in Figure 3 (b), the estimated transformation can be achieved by: + +$$ +t ^ {\prime} = D e \left[ E _ {k} \left(E _ {k - 1} \left(\dots E _ {i} \left(\hat {h} _ {i}\right)\right)\right), E _ {k} \left(E _ {k - 1} \left(\dots E _ {i} \left(T _ {i} \left(\hat {h} _ {i}, t\right)\right)\right)\right) \right]. \tag {7} +$$ + +We set $T_{i}(h_{i},t) = T_{i}(t(h_{i}))$ , where $t(h_{i})$ represents the application of the corresponding transformation on the feature map $h_i$ , and $T_{i}(\cdot)$ is a learnable mapping function represented by ResNet. Let $p_g(\hat{h}_i)$ represent the distribution of generated feature $\hat{h}_i$ , the FTM regularization is applied by training the generator $G$ with the loss function: + +$$ +\mathcal {L} _ {G} ^ {t r a n} = \sum_ {i = 1} ^ {k} \mathcal {L} _ {G _ {i}} ^ {t r a n} = \sum_ {i = 1} ^ {k} \mathbb {E} _ {\hat {h} _ {i} \sim p _ {g} (\hat {h} _ {i})} \mathbb {E} _ {t \sim p (t)} \ell \left(t ^ {\prime}, t\right). \tag {8} +$$ + +# 3.5. Framework Summary + +For transformation $t$ , since in AET [39], projective transformation has been shown to outperform the affine transformation in training unsupervised models, we choose to train our TrGAN by decoding projective transformations. To ensure a fair comparison, we follow the transformation setting in AET: First, we randomly translate four corners of + +![](images/6179885dff4cbb96b420ba268d496ac8951670462ff1138aac7ad390c076dd43.jpg) +(a) Training $T_{i}$ + +![](images/d965d97a9a14bcbde91bbcc66a80460cc936bf375bc2422044ecc86f15d1536f.jpg) +(b) Applying FTM +Figure 3. The training process of feature transformation matching. + +the input image in both horizontal and vertical directions by $\pm 0.125$ of its height and width, then it is rotated by $0^{\circ}$ , $90^{\circ}$ , $180^{\circ}$ , or $270^{\circ}$ and randomly scaled by [0.8, 1.2]. Each projective transformation $t$ is represented by a parameterized matrix $M(\theta) \in \mathbb{R}^{3 \times 3}$ between homogeneous coordinates of real images and their transformed counterparts. And the transformation predicting loss is defined as: $\ell(t', t) = \frac{1}{2} \|M(\theta') - M(\theta)\|_2^2$ . + +In general, our model consists of a global discriminator $(D)$ , a generator $(G)$ , several feature discriminators $(D_{i})$ and feature-transform nets $(T_{i})$ . During the training process, all the components are trained jointly by iteratively updating each other. The final loss function for the generator $G$ is: + +$$ +\mathcal {L} _ {G} = \mathcal {L} _ {G} ^ {\text {g l o b a l}} + \lambda_ {1} \mathcal {L} _ {G} ^ {\text {a d v}} + \lambda_ {2} \mathcal {L} _ {G} ^ {\text {t r a n}}, \tag {9} +$$ + +where $\lambda_{1}$ and $\lambda_{2}$ are hyper-parameters that control different loss terms. + +After the training, our TrGAN can be applied to both unsupervised image generation and representation extracting tasks. To sample generated images from $G$ , all $G_{i}$ are stacked in a top-down manner, as shown in Figure 2. With noise vector $z$ as input, we can get generated sample $G(z)$ by: $G(z) = G_{0}\left(G_{1}\left(\dots G_{k}(z)\right)\right)$ . We use the global discriminator $D$ for representation extracting. With an arbitrary input image $x$ , the output of each encoder block $E_{i}$ can be view as the extracted representations. + +# 4. Experiments + +In the following, we utilize a variety of datasets including CIFAR-10 [17], ImageNet [22], CELEBA-HQ [15] and LSUN-BEDROOM [37] to comprehensively verify the effectiveness of our proposed method. We test the quality + +![](images/505ee165f99b957b3a91b9b9963f7af5923af7097254b033adc9f1fe3a0b013b.jpg) +Figure 4. Random samples of unconditionally generated images from the TrGAN on ImageNet. + +of extracted representations, and compare the results with other self-supervised models. Under equal training conditions, our TrGAN achieves a better performance over baseline conditional GAN with respect to FID [13]. + +# 4.1. Implementation Details + +We thoroughly evaluate TrGAN on four datasets: CIFAR-10, ImageNet, CELEBA-HQ, and LSUN-BEDROOM. CIFAR-10 dataset consists of $60k$ $32\times 32$ labeled images. There are $50k$ training images and $10k$ test images in 10 classes. For ImageNet, there are $1.3M$ training images and $50k$ test images in 1000 classes. Since labels are available only for CIFAR-10 and ImageNet, We make a direct comparison between TrGAN and the baseline conditional GAN only on these two datasets. CELEBA-HQ contains $30k$ high-quality human-face images. And the LSUN-BEDROOM contains $3M$ images. To ensure a fair comparison with self-supervised GAN, we pre-process ImageNet and LSUN-BEDROOM images by resizing to the $128\times 128$ resolution. While for CELEBA-HQ, we use the official code provided by authors to achieve images at $128\times 128$ . + +We choose the Projection conditional GAN [21] (denoted as Cond-GAN) as the baseline model. We choose this model to follow the experimental settings in self-supervised GAN, but also because it is adopted by other best performing GAN [3, 38]. The ResNet architectures of generator and discriminator from Miyato et al. [20] are adopted in CondGAN and TrGAN. We also use label-conditional batch normalization for the conditional generator in Cond-GAN. And + +the self-modulated batch normalization is applied in the generator of TrGAN to ensure a similar effect. + +TrGAN and the baseline models are trained with a batch size of 64 images before and after transformations. For the adversarial loss $V(G, D)$ , we adopt the hinge loss used in Miyato et al. [20]. In our model, optimizing $T_i$ needs to train the encoder. We find that the convergence rate of the encoder is faster than that of $T_i$ . During the training, we try both 1 and 2 steps to update the encoder per $T_i$ step, and observe that 1 encoder step per $T_i$ step works well in all experiments. The weights in the model are initialized with Orthogonal Initialization. For all datasets, the Adam optimizer is adopted to train our model, with an initial learning rate of 0.0002. We set $\alpha = 0.2$ , $\beta = 1$ for loss $\mathcal{L}_D$ and $\mathcal{L}_G^{global}$ , respectively. We also experiment various values of the hyperparameter $\lambda_1$ and $\lambda_2$ , and find that $\lambda_1 = 0.5$ , $\lambda_2 = 1$ work well for all reported experiments. For all other hyperparameters, we use the value in Projection conditional GAN [21] and Miyato et al. [20]. + +# 4.2. Image Synthesis + +In order to quantitatively measure the quality of the generated images from different methods, we adopt the Fréchet Inception Distance (FID) introduced by [13]. FID calculates the Wasserstein-2 distance between the real images and the generated images, lower FID values reveal closer distances between synthetic and real data distributions. Although another approximate measure of sample quality: the Inception score [31] (IS) is also widely used. FID is considered as a more principled and comprehensive metric, and has been shown to be more consistent with human evaluation in assessing the realism and quality of the generated samples [13]. Thus, we use FID as the metrics of sample quality. We train ImageNet for $1M$ iterations. For CIFAR-10, CELEBA-HQ, and LSUN-BEDROOM, we train for $100k$ iterations. We use $3k$ samples for CELEBA-HQ and $10k$ for the other datasets to calculate the FID. + +Visual results of generated images on ImageNet are shown in Figure 4. In Table 1, we report the FID of our TrGAN and other baseline models on four datasets. On LSUN-BEDROOM and CELEBA-HQ, our TrGAN outperforms the Self-supervised GAN (SS-GAN) under the same unsupervised settings. On CIFAR-10 and ImageNet, SS-GAN indeed closes the gap between unconditional GAN and its conditional counterpart (Cond-GAN), but Cond-GAN still outperforms SS-GAN. Our TrGAN, on the contrary, achieves better FID rather than Cond-GAN with no requirement of labeled data. + +Although there are some other better performing conditional GAN, such as BigGANs [3], that our TrGAN is still far behind from. The additional techniques used in BigGANs (e.g., extremely huge batch-size) require massive computing resources. Our TrGAN, on the other hand, out + +performs the conditional counterpart under the same usual experimental settings. To this end, our result is still significant. + +
DatasetModelFID
CIFAR-10Cond-GAN15.53
SS-GAN [32]15.65
TrGAN13.41
ImageNetCond-GAN42.91
SS-GAN [32]43.87
TrGAN39.14
LSUN-BEDROOMSS-GAN [32]13.30
TrGAN11.74
CELEBA-HQSS-GAN [32]24.36
TrGAN23.17
+ +Ablation Studies. We comprehensively verify the effectiveness of different components in $\mathcal{L}_G$ by conducting extensive ablation studies. Specifically, we evaluate several variants of our proposed TrGAN on CIFAR-10 dataset. For all models listed below, the same training hyper-parameters are used as the full TrGAN model. + +(1) TrGAN: The proposed TrGAN, as described in Section 3. +(2) TrGAN-no-IFM: Same generator and global discriminator as (1), but trained without intermediate feature matching. +(3) TrGAN-no-FTM: Same generator and global discriminator as (1), but trained without feature-transformation matching. +(4) TrGAN-no-(IFM&FTM): Same generator and global discriminator as (1), but trained without intermediate feature matching and feature-transformation matching. + +Table 1. Comparison between TrGAN and other baseline models on four datasets. The best Fréchet Inception Distance (FID) are reported. + +
ModelFID
TrGAN-no-(IFM&FTM)15.67
TrGAN-no-FTM15.03
TrGAN-no-IFM14.57
TrGAN13.41
+ +We compare the FID of several variants of TrGAN, and the results are reported in Table 2 and Figure 5. As we can see: (1) Simply integrating the transformation predictions into the adversarial training did not bring significant improvement in FID; (2) The performance improvement of TrGAN over SS-GAN and Cond-GAN mainly comes from + +![](images/6acc239f537773db5cbfd34878353e6a2ca5a73fdf4d95c84da922e1276009a2.jpg) +Figure 5. FID curves of TrGAN and its variants on CIFAR-10. + +the proposed FTM method; (3) The FID curves on CIFAR-10 have shown the stable training property of our model. In general, IFM as well as our proposed FTM can make the model better utilize the advantages of self-supervised learning, and offering an label-free supervision directly on the feature space of the generator. + +# 4.3. Representation Quality + +To evaluate the quality of the representations from TrGAN, we test the representations extracted from each encoder block $E_{i}$ . For evaluation method, we follow [39] by training a non-linear classifier. Specifically, we train the non-linear classifier with the representations from each encoder block to perform classification task on CIFAR-10 and ImageNet. The number of encoder blocks is determined by the resolution of input images. In detail, the encoder contains four blocks on CIFAR-10 and six blocks on ImageNet. + +We choose AET as baseline model for it has demonstrated much more competitive performances in unsupervised representation learning. AET adopts the Network-In-Network and AlexNet as feature extractor on CIFAR-10 and ImageNet, respectively. While for our TrGAN, we choose ResNet architecture for the encoder in consideration of the requirement for adversarial training. For a fair comparison with AET, we adopt AET loss to train a ResNet encoder without the adversarial training process, and denote it AET-only as an alternative baseline model. + +Table 2. Ablation studies on CIFAR-10 dataset. The best Fréchet Inception Distance (FID) are reported. + +
Cond-GANAET-onlyTrGAN
Block081.7278.1678.74
Block184.5981.9282.73
Block288.8787.9687.12
Block391.7990.0890.96
+ +Table 3. Comparison between TrGAN, AET-only and Cond-GAN on CIFAR-10. Top-1 classification accuracy are reported. + +We test the representation quality from each block on + +CIFAR-10, the results are shown in Table 3. The results of Cond-GAN could be viewed as the upper bound of our TrGAN. Except the block2 $(E_3)$ , our TrGAN provides better representations than AET-only model across all 3 other blocks. Table 4 further compare the representation quality of TrGAN to state-of-the-art unsupervised learning methods on CIFAR-10. AET-only model achieves a slight lower accuracy than original AET model. On the other hand, with the collaborative adversarial training, our TrGAN outperforms both the AET-only model and original AET. These baseline methods are usually based on different architectures and hyperparameters, which makes it difficult for our TrGAN to make a direct comparison with them. But the result is still significant, as the accuracy of TrGAN is close to the upper bound set by the fully-supervised counterpart (Cond-GAN). + +
MethodAccuracy
Roto-Scat + SVM [26]82.3
ExemplarCNN [7]84.3
DCGAN [27]82.8
Scattering [25]84.7
RotNet + FC [9]89.06
AET-project + FC [39]90.59
Cond-GAN (Upper Bound)91.79
AET-only90.08
TrGAN90.96
+ +We also compare the representation quality of TrGAN to other state-of-the-art self-supervised learning algorithms on ImageNet. After unsupervised features are extracted, the non-linear classifier is trained on the output from final encoder block $(E_6)$ with labeled samples. As the experimental settings on CIFAR-10, the results of the fully supervised counterpart: Cond-GAN gives upper bounded performance. The results of each block are shown in Table 5. + +Table 4. Comparison with other unsupervised representation learning methods by top-1 accuracy on CIFAR-10. + +
Cond-GANAET-onlyTrGAN
Block023.524.024.7
Block130.727.831.1
Block235.630.933.6
Block342.837.440.9
Block450.941.645.0
Block553.144.449.1
+ +As shown in Table 6, among all the baseline methods, our TrGAN outperforms Context [5], Colorization [40], BiGAN [6] and DeepCluster [4]. There is still a gap between + +TrGAN and the best performing method: AET-project [39]. We posit that this is mainly due to the limited upper bound set by the fully-supervised counterpart. In summary, our TrGAN achieves the best results on CIFAR-10 as well as competitive results on ImageNet and drastically reduces the gap between unsupervised and supervised learning in terms of both FID and representation quality. + +Table 5. Comparison between TrGAN, AET-only and Cond-GAN on ImageNet. Top-1 classification accuracy are reported. + +
MethodAccuracy
Context [5]45.6
Colorization [40]40.7
BiGAN [6]41.9
DeepCluster [4]44.0
AET-project [39]53.2
Cond-GAN (Upper Bound)55.4
AET-only44.4
TrGAN49.1
+ +Table 6. Comparison with other unsupervised representation learning methods by top-1 accuracy on ImageNet. + +# 5. Conclusions + +In this work, we propose a novel generative model, namely, Transformation Generative Adversarial Network (TrGAN). As a combination of self-supervised learning and GAN, TrGAN could cover the benefits of conditional GAN, such as stable training and visually sharper samples. To better utilize the meaningful features extracted by self-supervised learning, we introduce intermediate feature matching (IFM) methods to further guide the training of internal generator blocks. Also, IFM could provide an additional supervision on the feature space of generator with no need of label information. Besides the requirement for generating transformation-detectable images, we take a further step to match the feature-transform relation between the real and generated features as well, namely, feature-transformation matching regularization. We then show that this unsupervised generative model can be trained to attain better FID even than its conditional counterpart. The experiments results in terms of both FID and representation quality demonstrate the effectiveness of our method. + +# Acknowledgement + +This work was supported in part to Prof. Houqiang Li by National Natural Science Foundation of China (NSFC) under contract 61836011, and in part to Prof. Wengang Zhou by National Natural Science Foundation of China (NSFC) under contract 61822208 and 61632019, and Youth Innovation Promotion Association CAS 2018497. + +# References + +[1] Pulkit Agrawal, J. Carreira, and Jitendra Malik. Learning to see by moving. In Proceedings of International Conference on Computer Vision (ICCV), 2015. 3 +[2] Jianmin Bao, Dong Chen, Fang Wen, Houqiang Li, and Gang Hua. Cvae-gan: Fine-grained image generation through asymmetric training. In Proceedings of International Conference on Computer Vision (ICCV), 2017. 3 +[3] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural image synthesis. arXiv preprint arXiv:1809.11096, 2018. 6 +[4] Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In European Conference on Computer Vision (ECCV), 2018. 8 +[5] Carl Doersch, Abhinav Gupta, and Alexei A. Efros. Unsupervised visual representation learning by context prediction. In Proceedings of International Conference on Computer Vision (ICCV), 2015. 3, 8 +[6] Jeff Donahue, Philipp Krahenbuhl, and Trevor Darrell. Adversarial feature learning. In Proceedings of International Conference on Learning Representations (ICLR), 2017. 2, 8 +[7] Alexey Dosovitskiy, Philipp Fischer, Jost Tobias Springenberg, Martin A. Riedmiller, and Thomas Brox. Discriminative unsupervised feature learning with exemplar convolutional neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2014. 8 +[8] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarily learned inference. In Proceedings of International Conference on Learning Representations (ICLR), 2017. 2 +[9] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. In Proceedings of International Conference on Learning Representations (ICLR), 2018. 1, 3, 8 +[10] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems (NeurIPS), 2014. 1 +[11] Saurabh Gupta, Judy Hoffman, and Jitendra Malik. Cross modal distillation for supervision transfer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2827-2836, 2016. 1 +[12] Saurabh Gupta, Judy Hoffman, and Jitendra Malik. Cross modal distillation for supervision transfer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 3 +[13] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems (NeurIPS), 2017. 6 +[14] Geoffrey E. Hinton, Alex Krizhevsky, and Sida D. Wang. Transforming auto-encoders. In International Conference on Artificial Neural Networks, 2011. 1, 2 + +[15] Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for improved quality, stability, and variation. In Proceedings of International Conference on Learning Representations (ICLR), 2018. 5 +[16] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In Proceedings of International Conference on Learning Representations (ICLR), 2014. 2 +[17] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. technical report, 2009. 5 +[18] Christian Ledig, Lucas Theis, Ferenc Huszár, et al. Photorealistic single image super-resolution using a generative adversarial network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2 +[19] Chongxuan Li, Kun Xu, Jun Zhu, and Bo Zhang. Triple generative adversarial nets. In Advances in Neural Information Processing Systems (NeurIPS), 2017. 1, 3 +[20] Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative adversarial networks. In Proceedings of International Conference on Learning Representations (ICLR), 2018. 6 +[21] Takeru Miyato and Masanori Koyama. cgans with projection discriminator. In Proceedings of International Conference on Learning Representations (ICLR), 2018. 2, 3, 6 +[22] H. Su J. Krause S. Satheesh S. Ma Z. Huang A. Karpathy A. Khosla M. Bernstein A. C. Berg O. Russakovsky, J. Deng and L. Fei-Fei. Imagenet large scale visual recognition challenge. IJCV, 115(3):211-252, 2015. 5 +[23] Augustus Odena. Semi-supervised learning with generative adversarial networks. In Proceedings of International Conference on Learning Representations (ICLR), 2016. 3 +[24] Augustus Odena, Christopher Olah, and Jonathon Shlens. Conditional image synthesis with auxiliary classifier gans. In Proceedings of International Conference on Machine Learning (ICML), 2017. 1 +[25] Edouard Oyallon, Eugene Belilovsky, and Sergey Zagoruyko. Scaling the scattering transform: Deep hybrid networks. In Proceedings of International Conference on Computer Vision (ICCV), 2017. 8 +[26] Edouard Oyallon and Stephane Mallat. Deep roto-translation scattering for object classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 8 +[27] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. Computer Science, 2015. 1, 2, 8 +[28] Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. Cnn features off-the-shelf: An astounding baseline for recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. 1 +[29] Salah Rifai, Pascal Vincent, Xavier Muller, Xavier Glorot, and Yoshua Bengio. Contractive auto-encoders: Explicit invariance during feature extraction. In Proceedings of International Conference on Machine Learning (ICML), 2011. 2 + +[30] Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. In Proceedings of International Conference on Learning Representations (ICLR), 2015. 3 +[31] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems (NeurIPS), 2016. 2, 6 +[32] Chen Ting, Zhai Xiaohua, Ritter Marvin, Lucic Mario, and Houlsby Neil. Self-supervised generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 3, 7 +[33] Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of International Conference on Machine Learning (ICML), 2008. 1, 2 +[34] Jiayu Wang, Wengang Zhou, Jinhui Tang, Zhongqian Fu, Qi Tian, and Houqiang Li. Unregularized auto-encoder with generative adversarial networks for image generation. In ACM International Conference on Multimedia (ACM MM), 2018. 2 +[35] Huang Xun, Yixuan Li, Omid Poursaeed, John Hopcroft, and Serge Belongie. Stacked generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 3, 4 +[36] Xinchen Yan, Jimei Yang, Kihyuk Sohn, and Honglak Lee. Attribute2image: Conditional image generation from visual attributes. In European Conference on Computer Vision (ECCV), 2016. 1 +[37] Fisher Yu, Yinda Zhang, Shuran Song, Ari Seff, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365, 2015. 5 +[38] Han Zhang, Ian J. Goodfellow, Dimitris N. Metaxas, and Augustus Odena. Self-attention generative adversarial networks. arXiv preprint arXiv:1805.08318, 2018. 6 +[39] Liheng Zhang, Guo Jun Qi, Liqiang Wang, and Jiebo Luo. Aet vs. aed: Unsupervised representation learning by autoencoding transformations rather than data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 3, 5, 7, 8 +[40] Richard Zhang, Phillip Isola, and Alexei A. Efros. Colorful image colorization. In European Conference on Computer Vision (ECCV), 2016. 1, 3, 8 +[41] Richard Zhang, Phillip Isola, and Alexei A. Efros. Split-brain autoencoders: Unsupervised learning by cross-channel prediction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 3 +[42] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of International Conference on Computer Vision (ICCV), 2017. 2 \ No newline at end of file diff --git a/transformationganforunsupervisedimagesynthesisandrepresentationlearning/images.zip b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6fd68552590c1391c226649e5894ed05788d4b9a --- /dev/null +++ b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41f10d603f7ff84c3db5c8b2f6d93b8eca55c5f0d220945c221cdc61ea0b5bd9 +size 388528 diff --git a/transformationganforunsupervisedimagesynthesisandrepresentationlearning/layout.json b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7403dd5a67d795f77b2682bf79fa452ad12ce4c0 --- /dev/null +++ b/transformationganforunsupervisedimagesynthesisandrepresentationlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6a08c421fbbf217f0d2097335006f90dca68659581e486dc26cf1afd934e8d1 +size 479293 diff --git a/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/5bef0ce6-12cc-47ee-96a3-40eea165e90c_content_list.json b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/5bef0ce6-12cc-47ee-96a3-40eea165e90c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..da2b5d9856457252414720aee0cb8c630bb02143 --- /dev/null +++ b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/5bef0ce6-12cc-47ee-96a3-40eea165e90c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78f46cd264f3d2c906ccec78e208cc07ae513e0d6768256ef693b1d83c42e7e0 +size 71971 diff --git a/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/5bef0ce6-12cc-47ee-96a3-40eea165e90c_model.json b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/5bef0ce6-12cc-47ee-96a3-40eea165e90c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..675802f93e650cd246ab7b99d7fe6536649c59c0 --- /dev/null +++ b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/5bef0ce6-12cc-47ee-96a3-40eea165e90c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3baf5f85825a10baa4cec334bc7ed2d151c1e98174cb68516faef2957497c803 +size 85878 diff --git a/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/5bef0ce6-12cc-47ee-96a3-40eea165e90c_origin.pdf b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/5bef0ce6-12cc-47ee-96a3-40eea165e90c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7c5c267b46478021a07a4c9f8df90035104f404f --- /dev/null +++ b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/5bef0ce6-12cc-47ee-96a3-40eea165e90c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02c95b9339e34fdcc8de6fd4fa066a3a76df1403f545b1bd8809009575b06c6e +size 2686988 diff --git a/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/full.md b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b11b9b28b091d8c67c6e3b1b32aa6b5a3afc3f80 --- /dev/null +++ b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/full.md @@ -0,0 +1,277 @@ +# TransMatch: A Transfer-Learning Scheme for Semi-Supervised Few-Shot Learning + +Zhongjie $\mathrm{Yu}^{*1}$ , Lin Chen $^{\dagger 2}$ , Zhongwei Cheng $^{2}$ , and Jiebo Luo $^{3}$ + +1University of Wisconsin-Madison + +$^{2}$ Futurewei Technologies + +3University of Rochester + +# Abstract + +The successful application of deep learning to many visual recognition tasks relies heavily on the availability of a large amount of labeled data which is usually expensive to obtain. The few-shot learning problem has attracted increasing attention from researchers for building a robust model upon only a few labeled samples. Most existing works tackle this problem under the meta-learning framework by mimicking the few-shot learning task with an episodic training strategy. In this paper, we propose a new transfer-learning framework for semi-supervised few-shot learning to fully utilize the auxiliary information from labeled base-class data and unlabeled novel-class data. The framework consists of three components: 1) pre-training a feature extractor on base-class data; 2) using the feature extractor to initialize the classifier weights for the novel classes; and 3) further updating the model with a semi-supervised learning method. Under the proposed framework, we develop a novel method for semi-supervised few-shot learning called TransMatch by instantiating the three components with Imprinting and MixMatch. Extensive experiments on two popular benchmark datasets for few-shot learning, CUB-200-2011 and miniImageNet, demonstrate that our proposed method can effectively utilize the auxiliary information from labeled base-class data and unlabeled novel-class data to significantly improve the accuracy of few-shot learning task. + +# 1. Introduction + +Deep learning methods have been making impressive progress in different areas of artificial intelligence in re + +cent years. Nevertheless, most of the popular deep learning methods require a large amount of labeled data which is usually very expensive and time-consuming to collect. The straightforward adoption of deep learning methods with a limited amount of labeled data usually leads to overfitting. Therefore, the question of whether it is able to learn a robust model from only a limited amount of labeled data arises. It is well-known that humans have the ability to learn from a single or very few labeled samples. This motivates recent research efforts on learning a novel concept from a single or a few examples, i.e., few-shot learning. + +In the past couple of years, an increasing number of few-shot learning methods have been proposed. One family of work focuses on training the model under the meta-learning framework based on an episodic training strategy [25]. In particular, a sequence of episodes are randomly sampled where each episode consists of a few samples in the base classes to mimic the test scenario where only a few labeled samples of the novel classes are available. The labeled samples in each episode are divided into supports and queries, where supports are used for building the classifier and queries are used for evaluating. At the same time, another family of work focuses on how to learn a classifier for the novel classes with only few-shot examples by transferring the knowledge from a model pre-trained on large amount of data from the base classes [16, 17]. This paradigm shares similarity with human behaviors, by transferring past experience to new tasks. We denote this family of methods as transfer-learning based methods. Our method is inspired by the latter family of work and aims to learn a good classifier for the novel classes of few-shot examples with the help of the pre-trained classifier on abundant data from base classes and auxiliary unlabeled data from novel classes. + +We believe the sufficient and proper utilization of extra information is crucial to the success of applying few-shot + +![](images/727b30409b7771dc55304634af189d7116f2c61f36b905d6c47ac88732bc867c.jpg) +Figure 1. An overview of meta-learning based semi-supervised few-shot classification framework. Unlabeled images are required during training to allow the meta-learner learn how to leverage unlabeled images for classification. + +![](images/8eb0c3ce75ec4d3e1420050eab79530fd4709276e2bac10c5af91731922a65c3.jpg) + +learning. Such extra information can exist in various forms, while in this work, we focus on leveraging extra information from the labeled base-class data and unlabeled novel-class data. These two types of information are usually easy to obtain. Many existing large-scale datasets for visual recognition tasks can be used for pre-training a model which can be later transferred to a new task. Meanwhile, it is also relatively easy to acquire a large amount of unlabeled data for a new task. Thus, a new paradigm called semi-supervised few-shot learning arises recently. + +A representative work for semi-supervised few-shot learning [19] employed the meta-learning framework and enhanced the prototypical networks [22] to use unlabeled data. In each episode during meta-training, the unlabeled data for base classes was included to mimic the test scenario where the unlabeled data for novel classes would be available. Liu et al. [11] proposed transductive propagation to incorporate the popular label propagation method to utilize the unlabeled data in episodic training. These works demonstrated that considering the unlabeled data helped to improve the accuracy of few-shot classification under the meta-learning framework. + +In this paper, we propose a new framework for semi-supervised few-shot learning to fully utilize the auxiliary information from labeled base-class data and unlabeled novel-class data. The flowchart of our proposed framework is shown in Fig. 2, which consists of three components. We first train a model using the large amount of labeled data from the base classes, encoding the knowledge from base-class data into the pre-trained model. Then this pre-trained model is adopted as a feature extractor to generate the feature embeddings of the labeled few-shot examples from the novel classes, which can be directly used to imprint classifier weights for the novel classes or as the initialization of classifier weights for further fine-tuning, following the transfer-learning framework [16]. Different from meta + +learning, unlabeled images are no longer needed during pre-training on base classes, and could be directly utilized upon this imprinted classifier with state-of-the-art semi-supervised method such as MixMatch [1]. To the best of our knowledge, this is the first work of semi-supervised few-shot learning under the transfer-learning framework in contrast to the meta-learning framework. + +In summary, the contributions of our work are: + +1. We propose a new transfer-learning framework for semi-supervised few-shot learning, which can fully utilize the auxiliary information from labeled base-class data and unlabeled novel-class data. +2. We develop a new method called TransMatch under the proposed framework. TransMatch integrates the advantages of transfer-learning based few-shot learning methods and semi-supervised learning methods, and is different from the previous work on meta-learning based methods. +3. We conduct extensive experiments on two popular benchmark datasets for few-shot learning to demonstrate that our method can effectively leverage unlabeled data in few-shot learning and achieve new state-of-the-art results. + +# 2. Related Work + +In this section, we review the related work to our proposed transfer-learning based semi-supervised few-shot learning framework. + +# 2.1. Few-Shot Learning + +Few-shot learning has attracted increasing attention in recent years due to the high cost of collecting labeled data. Existing work can be roughly categorized into (i) meta-learning methods, and (ii) transfer-learning methods. + +![](images/251474fa57452d1668a39c5fbb69e42bb18bcccd7cf84493b76857a3473f545b.jpg) +Figure 2. Our proposed framework of transfer-learning scheme for semi-supervised few-shot learning. We first pre-train a classifier from base-class images. Then use it as a feature extractor to initialize the weights for novel-class classifier. Finally, we further fine-tune the novel-class classifier with unlabeled images by semi-supervised learning method MixMatch. + +![](images/1beef2412dc3362c382cd739a6a95f766fea9d90d79d34b1f2c2943ec2890285.jpg) + +Meta-learning based method: Meta-learning based few-shot learning, also known as learning to learn, aims to learn a paradigm that can be adapted to recognize novel classes with only few-shot training examples. Meta-learning based methods usually consist of two stages: 1) meta-training; and 2) meta-testing. In the meta-training stage, a sequence of episodes are randomly sampled from the examples of base classes where each episode contains $K$ support examples and $Q$ query examples from $N$ classes, denoted as an $N$ -way $K$ -shot episode. In this way, the meta-training stage can mimic the few-shot testing stage where only a few examples per class are available. The meta-learning based methods can be further divided into two categories: a) metric-based methods; and b) optimization-based methods. + +a) Metric-based methods have been proposed in many existing work [9, 15, 22, 23, 25]. These methods mainly focus on learning a good metric to measure the distance or similarity among support images and query images. For example, prototypical networks [22] calculated the distance of the prototype representations of each class between supports and queries. Relation Net [23] implemented a network to measure the relation similarities between the supports and queries. Nearest Neighbour Neural Network [9] explored the nearest neighbors in local descriptors of feature embeddings. +b) Optimization-based methods aim to design an optimization algorithm that can adapt the information during meta-training stage to the meta-testing stage. MetaLSTM [18] formulated the problem as an LSTM-based meta-learning algorithm to update the optimization algorithm in few-shot learning. MAML [4] learned an optimization method that can follow the fast gradient direction to rapidly learn the classifier for novel classes. LEO [20] decoupled the gradient-based adaptation process with high- + +dimensional parameters to few-shot scenarios. + +Transfer-learning based methods: Transfer-learning based methods are different from meta-learning based methods, as they do not use the episodic training strategy. Instead, such methods can use conventional techniques to pre-train a model on the large amount of data from the base classes. The pre-trained model is then adapted to the few-shot learning task of recognizing novel classes. Qi et al. [16] proposed to imprint the classifier weights of novel classes by the mean vectors of the feature embeddings of few-shot examples. Qiao et al. [17] learned a mapping function from the activations (i.e., feature embeddings) of novel class examples to classifier weights. Gidaris et al. [5] proposed an attention module to dynamically predict the classifier weights for novel classes. Chen et al. [2] shown such transfer-learning based methods can achieve competitive performance as meta-learning based methods. Our proposed framework shares a similar idea with [16] by pretraining a feature extractor and uses it to extract features for few-shot examples from novel classes which are used to imprint classifiers weights. + +# 2.2. Semi-Supervised Learning + +Semi-supervised learning focuses on developing algorithms to learn from unlabeled and labeled data. Existing work can be roughly categorized into (i) consistency regularization methods, and (ii) entropy minimization methods. + +Consistency regularization methods: Consistency regularization methods mainly focus on adding noise and augmentation to images without changing their label distribution. II-Model [7] added a loss term to regularize the model by stochastic augmentation. Mean Teacher [24] improved II-Model by using the exponential moving average of parameters. Virtual Adversarial Training (VAT) [13] regularized the model by adding local perturbation on unlabeled + +data. + +Entropy minimization methods: This family of methods focuses on giving low entropy for unlabeled data. It is initially proposed by [6] which minimized conditional entropy of unlabeled data. Pseudo-Label [8] minimized the entropy directly by predicting the labels for unlabeled data and used this in cross-entropy, showing its good performance. + +MixMatch [1] united different kinds of consistency regularization and entropy minimization methods and achieved state-of-the-art performance by a large margin comparing with all the previous methods. It is a holistic method in semi-supervised learning and we would introduce briefly in Section 3.3. Due to its good performance, we adopt MixMatch in our framework, and we also compared with using other mainstream semi-supervised learning methods in the experiments. Semi-supervised learning methods are usually compared on small datasets [1, 13, 14] where there is a small amount of labeled data. But the number of labeled images in typical semi-supervised learning is still greater than few-shot learning. The techniques for semi-supervised method may not be directly used for few-shot setting, which is also demonstrated in our experiments that naively applying MixMatch to few-shot learning may lead to poor performance especially in 1-shot and 2-shot. + +# 2.3. Semi-Supervised Few-Shot Learning + +When there are few-shot examples for novel classes, it is straightforward to utilize extra unlabeled data to improve the learning. This leads to the family of semi-supervised few-shot learning methods (SSFSL). There are very few works in this direction. Ren et al. [19] extended prototypical networks to incorporate unlabeled data by producing prototypes for the unlabeled data. Liu et al. [11] constructed a graph between labeled and unlabeled data and utilize label propagation to obtain the labels of unlabeled data. Sun et al. [10] applied self-training by adding the confident prediction of unlabeled to the labeled training set in each round of optimization. + +However, all existing semi-supervised few-shot learning methods are meta-learning based methods as in Fig. 1. As shown in [2], transfer-learning based method can achieve competitive performance compared with meta-learning based methods. This motivates our work. We need to emphasize that meta-learning based methods have shown their success to utilize unlabeled data by integrating unlabeled data in episodic training. However, this episodic training strategy is different from typical semi-supervised learning and it is not appropriate to combine them together directly. The techniques of leveraging unlabeled data in existing SSFSL methods are not state-of-the-art in semi-supervised areas and the more powerful and holistic methods like MixMatch would be difficult to integrate in meta-learning framework. Meanwhile, directly applying semi- + +supervised methods to utilize unlabeled data during test may lead to bad performance due to the extreme small number of labeled data. + +# 3. The Proposed Framework + +In this section, we introduce our proposed transfer-learning framework for semi-supervised few-shot learning. The flowchart is illustrated in Fig. 2, which contains three modules: 1) pre-training a feature extractor on base-class data; 2) use the feature extractor to extract features from novel-class data and imprint novel-class classifier weights; and 3) further fine-tuning the model by semi-supervised learning method. Before elaborating the details of each module, let us first introduce our problem definition. + +Problem definition: We have a large-scale dataset $\mathcal{D}_{base}$ containing many-shot labeled examples from each base class in $\mathcal{C}_{base}$ and a small-scale dataset $\mathcal{D}_{novel}$ of only few-shot labeled examples and many-shot unlabeled examples from each novel class in $\mathcal{C}_{novel}$ , where $\mathcal{C}_{novel}$ is disjoint from $\mathcal{C}_{base}$ . The task of semi-supervised few-shot learning is to learn a robust classifier using both the few-shot labeled examples and many-shot unlabeled examples in $\mathcal{D}_{novel}$ with the examples in $\mathcal{D}_{base}$ as auxiliary data. Usually in a conventional few-shot learning task, a small support set of $N$ classes with $K$ images per class is sampled from $\mathcal{D}_{novel}$ , leading to the $N$ -way- $K$ -shot problem. In semi-supervised few-shot learning, additional $U$ unlabeled images are sampled from each of the $N$ novel classes or distractor classes. + +# 3.1. Part I: Pre-train Feature Extractor + +The first module of our framework, as shown in the left part of Fig. 2, is a pre-training module, which relies on the many-shot examples from base classes, $\mathcal{D}_{base}$ , to train a base model which encodes as much as possible the information of $\mathcal{D}_{base}$ and can be used in the later stage of few-shot learning as prior information, similar to human intelligence. This is different from conventional meta-learning based few-shot learning as shown in Fig. 1, where an episodic training strategy is employed for base classes as well to mimic the few-shot scenario in the testing phase. + +# 3.2. Part II: Classifier Weight Imprinting + +The weight imprinting method was proposed by [16], and has achieved impressive performance in the few-shot learning task as a representative of transfer-learning based few-shot learning method. Specifically, it directly sets the classifier weights by the mean feature vectors of the $N$ -way- $K$ -shot examples, where features are obtained by the model from the pre-training stage. For convenience, we denote the classifier on large scale base classes as $f(\mathbf{x}) = f^{base}(f^{e}(\mathbf{x}))$ , where $\mathbf{x}$ is an input example, $f^{e}(\cdot)$ is the + +feature extractor and $f^{base}(\cdot)$ is the classifier. We have $f^{e}(\mathbf{x})\in \mathcal{R}^{d}$ and $f^{base}(\cdot)\in \mathcal{R}^{|C_{base}|}$ . + +Given the $N$ -way- $K$ -shot examples from novel classes and let us denote them as $\mathcal{D}_{\text{novel}} = \{\mathbf{x}_k^c | k = 1 \dots K, c = 1 \dots N\}$ with $\mathbf{x}_k^c$ as the $k$ -th example in $c$ -th class. We can use the feature extractor learned on base classes to extract features for the $N$ -way- $K$ -shot examples, denoted as $f^e(\mathbf{x}_k^c)$ . Meanwhile, let us write the classifier for novel classes as $f^{\text{novel}}(\mathbf{x}) = \mathbf{W}'\mathbf{x}$ , where $\mathbf{W} = [\mathbf{w}_1, \dots, \mathbf{w}_N] \in \mathcal{R}^{d \times N}$ . Note that we omit the bias for simplicity. By normalizing the weight $\mathbf{w}_c$ and the feature vector $\mathbf{x}$ onto a unit ball, the aforementioned equation can be further simplified as + +$$ +f ^ {n o v e l} (\mathbf {x}) = \left[ \cos \left(\theta \left(\mathbf {w} _ {1}, \mathbf {x}\right), \dots , \cos \left(\theta \left(\mathbf {w} _ {N}, \mathbf {x}\right)\right) \right] ^ {\prime}, \right. \tag {1} +$$ + +where $\theta (\mathbf{w}_i,\mathbf{x})$ denotes the angle between $\mathbf{w}_i$ and $\mathbf{x}$ , and the classification for a given example $\mathbf{x}$ is based on computing the cosine similarity between every $\mathbf{w}_k$ and $\mathbf{x}$ , and predict the label of $\mathbf{x}$ based on maximum similarity score. + +In this sense, there is a duality between $\mathbf{w}_i$ and $\mathbf{x}$ . Based on this observation, weight imprinting uses the mean feature vectors of the few-shot examples to imprint $\mathbf{w}_c$ , i.e., by setting + +$$ +\mathbf {w} _ {c} = \frac {1}{K} \sum_ {k = 1} ^ {K} f ^ {e} \left(\mathbf {x} _ {k} ^ {c}\right). \tag {2} +$$ + +The classification of an given example $\mathbf{x}$ can be also deemed as computing the mean of the similarities between $\mathbf{x}$ and all $K$ -shot examples. + +By imprinting the classifier weights with mean feature vectors of the few-shot examples, it provides a better initialization of classifier weights to reduce the intra-class variations of features and benefits fine-tuning the new classifier for novel classes. Experimental results show that it can achieve good performance even without fine-tuning. + +# 3.3. Part III: Semi-Supervised Fine-tuning + +After we get the classifier which fully absorbs the information from base classes with a better initialization by imprinting, we fine-tune this classifier during test when there is unlabeled data. This fine-tuning process is the same as semi-supervised training. Any semi-supervised learning can be applied, and in this work we employed MixMatch [1] not only because of its excellent performance in the semi-supervised learning task, but also because it is a holistic method to leverage unlabeled data in semi-supervised learning area. + +MixMatch combines multiple existing improvements from state-of-the-art semi-supervised learning methods which is discussed in Section 2.2. In our setting, we denote $\mathcal{L} = \left\{\left(\mathbf{x}_i,p_i\right)\right\}_{i = 1}^B$ as a mini-batch of $B$ labeled examples with $p_i$ as the label, and $\mathcal{U} = \{\mathbf{x}_u\}_{u = 1}^U$ as a minibatch of $U$ unlabeled examples. The imprinted classifier + +from Part II can be used to obtain estimated labels for the examples in $\mathcal{U}$ , i.e., $f^{novel}(\mathbf{x}_u)$ . We will omit the superscript $^{novel}$ for the ease of illustration when there is no confusion. For robustness, we augment each example $M$ times to get $M$ versions of each unlabeled data, i.e., $\{\mathbf{x}_{u,1},\dots,\mathbf{x}_{u,M}\}$ , and use the mean prediction as the label estimation: $\bar{p}_u = \frac{1}{M}\sum_{i = 1}^M f(\mathbf{x}_{u,i})$ . The sharpen operation is used to enhance to prediction as $p_u = \bar{p}_u^{\frac{1}{T}} / \sum_{j = 1}^N (\bar{p}_u)^{\frac{1}{j}}$ , we set $T = 0.5$ in the experiments. The same data augmentation is also applied to labeled examples in $\mathcal{L}$ . Following [1], we concatenate $\mathcal{L}$ and $\mathcal{U}$ and shuffle the examples, i.e., $\mathcal{W} = \mathrm{Shuffle}(\mathrm{Concat}(\mathcal{L},\mathcal{U}))$ , and then split this set into two new sets: + +$$ +\mathcal {X} _ {1} ^ {\prime} = \left\{\operatorname {M i x U p} \left(\mathcal {L} _ {i}, \mathcal {W} _ {i}\right) \quad | i \in 1, \dots , | \mathcal {L} | \right\}, +$$ + +$$ +\mathcal {X} _ {2} ^ {\prime} = \left\{\operatorname {M i x U p} \left(\mathcal {U} _ {i}, \mathcal {W} _ {i + | \mathcal {L} |}\right) \mid i \in 1, \dots , | \mathcal {U} | \right\}, +$$ + +where $\mathrm{MixUp}$ is defined as + +$$ +\begin{array}{l} \operatorname {M i x U p} \left(\left(\mathbf {x} _ {1}, p _ {1}\right), \left(\mathbf {x} _ {2}, p _ {2}\right)\right) \\ = \left(\left(\lambda^ {\prime} \mathbf {x} _ {1} + \left(1 - \lambda^ {\prime}\right) \mathbf {x} _ {2}\right), \left(\lambda^ {\prime} p _ {1} + \left(1 - \lambda^ {\prime}\right) p _ {2}\right)\right) \tag {3} \\ \end{array} +$$ + +with $\lambda' = \max(\lambda, 1 - \lambda)$ . The parameter $\lambda$ is randomly generated from a beta distribution $\mathrm{Beta}(\alpha, \alpha)$ . The objective function to minimize is defined as + +$$ +\ell = \ell_ {1} + \gamma \ell_ {2}, \tag {4} +$$ + +where + +$$ +\ell_ {1} = - \frac {1}{| \mathcal {X} _ {1} ^ {\prime} |} \sum_ {(\mathbf {x}, p) \in \mathcal {X} _ {1} ^ {\prime}} p \log (f (\mathbf {x})), \tag {5} +$$ + +is cross-entropy loss, and + +$$ +\ell_ {2} = \frac {1}{N \left| \mathcal {X} _ {2} ^ {\prime} \right|} \sum_ {(\mathbf {x}, p) \in \mathcal {X} _ {2} ^ {\prime}} \| p - f (\mathbf {x}) \| _ {2} ^ {2}. \tag {6} +$$ + +is consistency regularization loss in [21]. The details of our algorithm is summarized in Algorithm 1. + +# Algorithm 1 Algorithm for our proposed TransMatch + +Input: An auxiliary dataset $\mathcal{D}_{base}$ with examples from $\mathcal{C}_{base}$ (base classes), $N$ -way- $K$ -shot dataset $\mathcal{D}_l = \{\mathbf{x}_{nk}, p|n = 1, \dots, N; k = 1, \dots, K\}$ with $p \in \mathcal{C}_{novel}$ (novel classes), and $\mathcal{D}_u = \{\mathbf{x}_u|u = 1, \dots, U\}$ + +Output: $N$ -way- $K$ -shot classifier $f^{novel}$ for $\mathcal{D}_l$ + +1: Pre-train a base network on all examples in $\mathcal{D}_{base}$ and denote it as $f^{base}(f^e (\mathbf{x}))$ +2: Apply the feature extractor $f^{e}(\mathbf{x})$ to extract features on $\mathcal{D}_l$ , then use these features to imprint the weights of the novel classifier $f^{novel}$ ; +3: Apply semi-supervised learning method, MixMatch, to update the novel classifier $f^{novel}$ with both $\mathcal{D}_l$ and $\mathcal{D}_u$ ; + +# 4. Experiments + +In this section, we evaluate our proposed TransMatch and compare with state-of-the-art few-shot learning methods on two popular benchmark datasets for few-shot learning, including miniImageNet and CUB-200-2011. + +# 4.1. Experiments on miniImageNet + +Dataset configuration: The miniImageNet dataset was originally proposed by [25]. It has been widely used for evaluating few-shot learning methods. It consists of 60,000 color images from 100 classes with 600 examples per class, which is a simplified version of ILSVRC 2015 by [3]. We follow the split given by [18] consisting of 64 base classes, 16 validation classes and 20 novel classes. We randomly select $K$ (resp. $U$ ) examples from each novel class as the few-shot labeled (unlabeled) examples, and $Q$ images from the rest as the test examples. In the experiments, we set $N = 5$ , $K = \{1,5\}$ , $Q = 15$ and study the effect of using different values of $U$ . We repeat the test experiments 600 times and report the mean accuracy with the $95\%$ confidence interval. + +Compared methods: The miniImageNet dataset has been widely used for evaluating the performance of few-shot learning methods, and is a good benchmark to compare state-of-the-art methods. In particular, we compare with several conventional few-shot learning methods, as well as state-of-the-art semi-supervised few-shot learning methods including the semi-supervised extension to Prototypical Networks by [19] (Soft k-Means, Soft k-Means+Cluster, Masked Soft k-Means), and TPN-semi in [11]. We also re-implement Soft k-Means, Soft k-Means+Cluster, Masked Soft k-Means with the same backbone (i.e., WRN-28-10) as our method for fair comparison. As the area of semi-supervised few-shot learning has not been explored much yet, we also conduct extensive experiments to evaluate the performance of utilizing unlabeled data by our TransMatch under different few-shot settings. + +Implementation details: Following the work [17] for transfer-learning based method on miniImageNet, we use the wide residual network (i.e., WRN-28-10) [27] as the backbone for our base model $f^{base}$ . We train it from scratch using the examples from the base classes. In particular, we first train a WRN-28-10 classification network on all examples from the 80 base and validation classes. We then replace the last layer of this network by a 256-d fully connected layer, followed by a L2 normalization layer and a 80-d classifier. We set the batch size to 128, and set learning-rate to 0.01 for the last two layers and 0.001 for all other layers. We reduce the learning rate by 0.1 every 10 epochs and train for a total of 28 epochs. + +The base classifier $f^{base}$ is used as the feature extractor to generate feature vectors for the few-shot examples from novel classes. We use the few-shot labeled examples to fine-tune the base classifier to novel classes. We also augment + +each labeled image for 10 times by random transformation and use the mean features to imprint the weights for novel classifier. We use a batch size of 16, and set 64 batches as an epoch1. We set weight decay to 0.04, learning rate to 0.001, and use SGD optimizer with a momentum of 0.9. For the fine-tuning stage, we set the parameters of MixMatch as follows. We set $M$ (the times for augmentation) to 2, $T$ (the temperature for the label distribution) to 0.5, $\gamma$ (the weight for regularization term) to 5, $\alpha$ (the parameter in Beta distribution) to 0.75. Meanwhile we use an exponential moving average for model parameters when guessing labels. For 5-way-1-shot scenario, we fine-tune for 10 epochs when there are 20 or 50 unlabeled images, and 20 epochs when there are 100 or 200 unlabeled images. For 5-way-5-shot scenario, we fine-tune for 20 epochs when there are 20 and 50 unlabeled images, and 25 epochs when there are 100 and 200 unlabeled images. All the test results are based on 600 random experiments. + +Results on miniImageNet: The results are summarized in Table 1. It is not surprising that our method outperforms conventional few-shot learning methods without using unlabeled by a large margin, as shown in the top portion of Table 1. Our method also outperforms state-of-the-art semi-supervised few-shot learning methods, which can be observed from the middle portion of Table 1. These results clearly show the superiority of our TransMatch as its effective utilization of information from unlabeled data. + +Influence of unlabeled examples: In Table 2, we report the results using different numbers of unlabeled images. Note that Imprinting+FT stands for fine-tuning the imprinted classifier without unlabeled data. It is obvious that our TransMatch could achieve better performance with more unlabeled images. We also observe that the results begin to saturate after 100 unlabeled images for 1-shot setting. In general, the results show that our TransMatch can effectively utilize the unlabeled data. + +Ablation study: We conduct an ablation study of our method without Imprinting or MixMatch. Without Imprinting, our method reduces to semi-supervised learning method, i.e., MixMatch (Note here the feature extractor is still already trained from base classes) and without MixMatch, our method reduces to Imprinting. The results are shown in Fig. 3. It is clear that both MixMatch and Imprinting are worse than our TransMatch. The inferior performance of MixMatch to our TransMatch clearly shows that directly applying MixMatch to the few-shot setting cannot lead to good performance especially in 1-shot and 2-shot setting. This is due to the lack of labeled data, which makes it hard to fine-tune the classifier during test when there is unlabeled data. However, our proposed TransMatch can obtain a good initialization by incorporating weight imprinting + +
MethodType1-shot5-shot
Prototypical Net[22]Meta, Metric49.42±0.7868.20±0.66
TADAM[15]Meta, Metric58.50±0.3076.70±0.30
MAML[4]Meta, Optimization48.70±1.8463.11±0.92
SNAIL[12]Meta, Optimization55.71±0.9968.88±0.92
Activation Net[17]Transfer-learning59.60±0.4173.74±0.19
Imprinting[16]Transfer-learning58.68±0.8176.06±0.59
Soft k-Means[19]Semi, Meta-learning50.09±0.4564.59±0.28
Soft k-Means+Cluster[19]Semi, Meta-learning49.03±0.2463.08±0.18
Masked Soft k-Means[19]Semi, Meta-learning50.41±0.3164.39±0.24
TPN-semi[11]Semi, Meta-learning52.78±0.2766.42±0.21
Soft k-Means (Re-implement with WRN-28-10)Semi, Meta-learning51.88±0.9367.31±0.70
Soft k-Means+Cluster (Re-implement with WRN-28-10)Semi, Meta-learning50.47±0.8664.14±0.65
Masked Soft k-Means (Re-implement with WRN-28-10)Semi, Meta-learning52.35±0.8967.67±0.65
TransMatch(100 unlabeled images per class)Semi, Transfer-learning63.02±1.0781.19±0.59
TransMatch(200 unlabeled images per class)Semi, Transfer-learning62.93±1.1182.24±0.59
+ +Table 1. Accuracy (in %) on miniImageNet with ${95}\%$ confidence interval. Best results are in bold. + +
Method# unlabeled1-shot5-shot
Imprinting—58.68±0.8176.06±0.59
Imprinting+FT055.60±0.7774.17±0.60
TransMatch2058.43±0.9376.43±0.61
TransMatch5061.21±1.0379.30±0.59
TransMatch10063.02±1.0781.19±0.59
TransMatch20062.93±1.1182.24±0.59
+ +Table 2. Accuracy (in %) with different number of unlabeled images on miniImageNet. Best results are in bold. + +
# shotMethodAccuracyGain
1-shotw/ Pseudo-Label w/ MixMatch57.01 ± 1.13+6.01
63.02 ± 1.07
2-shotw/ Pseudo-Label w/ MixMatch70.07 ± 0.96+2.29
72.36 ± 0.88
3-shotw/ Pseudo-Label w/ MixMatch76.01 ± 0.81+1.40
77.41 ± 0.76
4-shotw/ Pseudo-Label w/ MixMatch78.35 ± 0.73+1.39
79.74 ± 0.65
5-shotw/ Pseudo-Label w/ MixMatch80.00 ± 0.66+1.19
81.19 ± 0.59
+ +Table 3. Comparison of our method using different semisupervised learning methods (i.e., Pseudo-Label and MixMatch) in our framework both with 100 unlabeled images for 5-way classification on miniImageNet. + +module. + +We also observe a larger gain by our TransMatch over MixMatch when using a smaller number of shots. The gain shown in Fig. 3 is \{11.02, 4.28, 2.92, 1.73, 1.22\} in \{1, 2, 3, 4, 5\}-shot setting. This is reasonable and worth attention as fewer shots means fewer labeled examples, which makes fine-tuning more difficult. Therefore, the importance of weight imprinting to give the classifier good initial weights + +![](images/6710eb048e06879381d7baa26dff8e68b4c508fa06838ae600d01e6a82bbf44d.jpg) +Figure 3. Comparison of Imprinting, MixMatch and our TransMatch both with 100 unlabeled images for 5-way classification with different number of shots on miniImageNet. + +becomes more evident. + +Comparing different semi-supervised learning methods: In addition to MixMatch [1], in this section, we also compare with other semi-supervised learning methods (i.e., Pseudo-Label [8]) in order to understand the influence the semi-supervised learning module. The results, shown in Table 3, are consistent with our observations when using MixMatch as semi-supervised learning module. Since Pseudo-Label is worse than MixMatch, the overall performance of our method using Pseudo-Label is also worse than using MixMatch. + +Influence of distractor classes: In typical semi-supervised learning, unlabeled images come from the same classes for the labeled images. This may not reflect realistic situations in real-world application. So we also study the influence + +
DistractorMethod1-shot5-shot
—Imprinting58.68 ± 0.8176.06 ± 0.59
1-classMixMatch50.14 ± 1.0679.32 ± 0.63
TransMatch62.32 ± 1.0480.28 ± 0.62
2-classMixMatch50.68 ± 1.1578.07 ± 0.69
TransMatch60.41 ± 1.0279.48 ± 0.64
3-classMixMatch49.48 ± 1.1677.48 ± 0.66
TransMatch59.32 ± 1.1079.29 ± 0.62
+ +Table 4. Accuracy (in %) of MixMatch and our TransMatch with 100 unlabeled images from $\{1,2,3\}$ distractor classes on miniImageNet. Note that Imprinting does not use any unlabeled image. + +of distractor classes, and report the results of Imprinting, MixMatch, and our TransMatch when there are unlabeled images from various distractor classes. In our experiments, distractor classes are randomly chosen from the remaining classes which are disjoint with the novel classes during test. The results are shown in Table 4. We can observe that all the results for MixMatch degrade due to the distractor classes, while our TransMatch still outperforms Imprinting in all cases. + +# 4.2. Experiments on CUB-200-2011 + +Dataset configuration: The CUB-200-2011 dataset (CUB) is originally proposed by [26] and contains 200 fine-grained classes of birds with 11,788 images in total (about 30 images per class for support images and 30 images per class for query images). We strictly follow the setup in [16] to ensure a fair comparison. In particular, we use the standard train/test split provided by the dataset, and treat the first 100 classes as the base classes $\mathcal{C}_{\text{base}}$ and the remaining 100 classes as the novel classes $\mathcal{C}_{\text{novel}}$ . Therefore, we have $N = 100$ . We use all the training examples from the base classes for large scale pre-training to obtain the base model $f^{\text{base}}$ and use the few-shot examples from the novel classes to train $f^{\text{novel}}$ . In the experiment, we set $K$ to $\{1,2,5,10,20\}$ and use the rest images $\{29,28,25,20,10\}$ as unlabeled images for support images. All the remaining 30 images are still used for query images. + +Implementation details: We are interested in performance of our TransMatch on the 100 novel classes, i.e., the transfer-learning setting in [16]. In order to ensure fair comparison, we follow [16] and use Inception_v1 as our network backbone. We set the dimension of the fully connected embedding layer to 256, followed by an L2 normalization. We resize the input images to $256 \times 256$ and then randomly crop to $224 \times 224$ . During the large scale pre-training stage, we set the initial learning rate to 0.001 and a $10 \times$ multiplier for the embedding layer and classification layer. We reduce the learning rate by 0.1 after every 30 epochs, and train the model for a total of 90 epochs. Dur + +
Model K=1251020
Imprinting26.0834.1343.3448.9152.94
Imprinting+FT26.5934.3349.3961.6570.07
MixMatch22.9330.2456.4167.1373.00
TransMatch28.0238.0559.8368.6074.61
+ +Table 5. Accuracy (in %) comparison on CUB-200-2011. Best results are in bold. + +
Model# unlabeled5-shot10-shot
Imprinting [16]—43.3448.91
Imprinting+FT [16]049.3961.65
TransMatch552.9063.79
TransMatch1054.7866.21
TransMatch1556.8667.71
TransMatch2059.2568.60
+ +Table 6. Accuracy (in %) comparison using different numbers of unlabeled images on CUB-200-2011. + +ing the fine-tuning stage, we set the number of batches to 64 for each epoch with a batch size of 64. By default, we set the weight decay to 0.0001, use a learning rate of 0.001, and train the model for 100 epochs. For the extreme case of 1-shot and 2-shot settings (100-way), we set the weight decay to 0.04, the learning rate to 0.0001 and early stopping at 10 epochs in order to avoid overfitting. + +Results on CUB-200-2011: We follow [16] to report the results of their proposed Imprinting, and Imprinting+FT. Then we evaluate the performance of our proposed TransMatch using different numbers of shots and unlabeled images. We compare TransMatch with Imprinting and MaxMatch in Table 5, and the results show our proposed TransMatch achieves the best result which demonstrates its effectiveness in utilizing auxiliary labeled base-class data and unlabeled novel-class data. Table 6 shows the results of our TransMatch using different numbers of unlabeled images, and we can observe that better performance can be achieved with more unlabeled data. These results are similar to the results on miniImageNet dataset. + +# 5. Conclusion + +While almost all existing semi-supervised few-shot learning methods are based on the meta-learning framework, we propose a new transfer-learning framework for semi-supervised few-shot learning to effectively explore the information from labeled base-class data and unlabeled novel-class data. We develop a new method under the proposed framework by incorporating the state-of-the-art semi-supervised method MixMatch and few-shot learning method Imprinting, leading to a new method called TransMatch. Extensive experiments on two popular few-shot learning datasets show that our proposed TransMatch achieves the state-of-the-art results, which demonstrate its effectiveness in utilizing both the labeled base-class data and unlabeled novel-class data. + +# References + +[1] David Berthelot, Nicholas Carlini, Ian Goodfellow, Nicolas Papernot, Avital Oliver, and Colin A Raffel. Mixmatch: A holistic approach to semi-supervised learning. In Advances in Neural Information Processing Systems, pages 5050-5060, 2019. +[2] Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Wang, and Jia-Bin Huang. A closer look at few-shot classification. In ICLR, 2019. +[3] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255, 2009. +[4] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, pages 1126–1135, 2017. +[5] Spyros Gidaris and Nikos Komodakis. Dynamic few-shot visual learning without forgetting. In CVPR, pages 4367-4375, 2018. +[6] Yves Grandvalet and Yoshua Bengio. Semi-supervised learning by entropy minimization. In Advances in neural information processing systems, pages 529-536, 2005. +[7] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. In Proc. International Conference on Learning Representations (ICLR), 2017. +[8] Dong-Hyun Lee. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on Challenges in Representation Learning, ICML, 2013. +[9] Wenbin Li, Lei Wang, Jinglin Xu, Jing Huo, Yang Gao, and Jiebo Luo. Revisiting local descriptor based image-to-class measure for few-shot learning. In CVPR, pages 7260-7268, 2019. +[10] Xinzhe Li, Qianru Sun, Yaoyao Liu, Qin Zhou, Shibao Zheng, Tat-Seng Chua, and Bernt Schiele. Learning to selftrain for semi-supervised few-shot classification. In Advances in Neural Information Processing Systems, pages 10276-10286, 2019. +[11] Yanbin Liu, Juho Lee, Minseop Park, Saehoon Kim, Eunho Yang, Sung Ju Hwang, and Yi Yang. Learning to propagate labels: Transductive propagation network for few-shot learning. In ICLR, 2018. +[12] Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. A simple neural attentive meta-learner. In ICLR, 2018. +[13] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. IEEE transactions on pattern analysis and machine intelligence, 41(8):1979-1993, 2018. +[14] Avital Oliver, Augustus Odena, Colin A Raffel, Ekin Dogus Cubuk, and Ian Goodfellow. Realistic evaluation of deep semi-supervised learning algorithms. In Advances in Neural Information Processing Systems, pages 3235-3246, 2018. +[15] Boris Oreshkin, Pau Rodríguez López, and Alexandre Lacoste. TADAM: Task dependent adaptive metric for improved few-shot learning. In Advances in Neural Information Processing Systems, pages 721-731, 2018. +[16] Hang Qi, Matthew Brown, and David G Lowe. Low-shot learning with imprinted weights. In CVPR, pages 5822- + +5830, 2018. +[17] Siyuan Qiao, Chenxi Liu, Wei Shen, and Alan L Yuille. Few-shot image recognition by predicting parameters from activations. In CVPR, pages 7229-7238, 2018. +[18] Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In ICLR, 2017. +[19] Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B. Tenenbaum, Hugo Larochelle, and Richard S. Zemel. Meta-learning for semi-supervised few-shot classification. In ICLR, 2018. +[20] Andrei A Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. In ICLR, 2019. +[21] Mehdi Sajjadi, Mehran Javanmardi, and Tolga Tasdizen. Regularization with stochastic transformations and perturbations for deep semi-supervised learning. In Advances in Neural Information Processing Systems, pages 1163-1171, 2016. +[22] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, pages 4077-4087, 2017. +[23] Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In CVPR, pages 1199-1208, 2018. +[24] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Advances in neural information processing systems, pages 1195–1204, 2017. +[25] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in neural information processing systems, pages 3630-3638, 2016. +[26] Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The caltech-ucsd birds-200-2011 dataset. 2011. +[27] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In BMVC, 2016. \ No newline at end of file diff --git a/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/images.zip b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..dee9db3482f27df1d41194f9abce6ff48ebd067c --- /dev/null +++ b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f2ec1aa4a2e6d1c8ed78878257f241fd3b4ce798ffb659e6b38821b6210986f +size 543269 diff --git a/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/layout.json b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a56ec8f112b9ba8136dec99e709dff8b05a97b20 --- /dev/null +++ b/transmatchatransferlearningschemeforsemisupervisedfewshotlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e5fca8180a4744e1a3ab095140378c045c3c88f34784b17ef08abd3d27032f3 +size 366751 diff --git a/transmomoinvariancedrivenunsupervisedvideomotionretargeting/938c42b6-cdb5-4180-a93b-c3fd239bf468_content_list.json b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/938c42b6-cdb5-4180-a93b-c3fd239bf468_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..730436f9976311e7b7886874637e4fb7020647de --- /dev/null +++ b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/938c42b6-cdb5-4180-a93b-c3fd239bf468_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b47ea11ad9907d4f5d9a1e6afe31a07dfc02501dad7c7032aafd0f3b11155af9 +size 75575 diff --git a/transmomoinvariancedrivenunsupervisedvideomotionretargeting/938c42b6-cdb5-4180-a93b-c3fd239bf468_model.json b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/938c42b6-cdb5-4180-a93b-c3fd239bf468_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2d6d629beccc5a7e4d25646beb321ac7c7410dd9 --- /dev/null +++ b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/938c42b6-cdb5-4180-a93b-c3fd239bf468_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1370baeecdfa147986948be53e15575e7d308e364e255d2f50bb6e5cdcfd2d90 +size 93315 diff --git a/transmomoinvariancedrivenunsupervisedvideomotionretargeting/938c42b6-cdb5-4180-a93b-c3fd239bf468_origin.pdf b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/938c42b6-cdb5-4180-a93b-c3fd239bf468_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6dc11342cc50c28779836467d7749e18a0ae4348 --- /dev/null +++ b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/938c42b6-cdb5-4180-a93b-c3fd239bf468_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dbcaf1c30101097b6756dae4c1443004f808ae2412e6a91977d1501581fcbb5 +size 3080205 diff --git a/transmomoinvariancedrivenunsupervisedvideomotionretargeting/full.md b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/full.md new file mode 100644 index 0000000000000000000000000000000000000000..272fe70e21d880dc91ce30183204b2e6c9453530 --- /dev/null +++ b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/full.md @@ -0,0 +1,365 @@ +# TransMoMo: Invariance-Driven Unsupervised Video Motion Retargeting + +Zhuoqian Yang $^{1*}$ + +Wentao Zhu $^{2*}$ + +Wenyan (Wayne) $\mathrm{Wu}^{3*}$ + +Chen Qian + +Qiang Zhou3 + +Bolei Zhou + +Chen Change Loy + +$^{1}$ Robotics Institute, Carnegie Mellon University $^{4}$ SenseTime Research $^{5}$ CUHK + +$^{2}$ Peking University $^{3}$ BNRist, Tsinghua University $^{6}$ Nanyang Technological University + +zhuoqiay@cs.cmu.edu + +wtzhu@pku.edu.cn + +wwwy15@mails.tsinghua.edu.cn + +qianchen@sensetime.com + +zhouqiang@tsinghua.edu.cn + +bzhou@ie.cuhk.edu.hk + +ccloy@ntu.edu.sg + +![](images/5ad0d1dc11b559d74d41459a731d7bb96f5bb6be9ef8613b39a4cab0a6480b85.jpg) + +![](images/9d3aeeb0feba84d72c4e6080fd4606801437aa135aa1fa161bf3e48f0b2ea47c.jpg) + +![](images/a23bba7fa2fab736abb58de79362c2f0370260ab9a5261b5542359afb40a73c4.jpg) +Figure 1: Motion retargeting. The movements from the source videos (first row) are transferred to a target appearance (second row). + +![](images/c9c5fbe22f60f25ddb387bde321ec5db5f5a0628ae5cd52e13f196ed3c32a504.jpg) + +# Abstract + +We present a lightweight video motion retargeting approach TransMoMo that is capable of transferring motion of a person in a source video realistically to another video of a target person (Fig. 1). Without using any paired data for supervision, the proposed method can be trained in an unsupervised manner by exploiting invariance properties of three orthogonal factors of variation including motion, structure, and view-angle. Specifically, with loss functions carefully derived based on invariance, we train an autoencoder to disentangle the latent representations of such factors given the source and target video clips. This allows us to selectively transfer motion extracted from the source video seamlessly to the target video in spite of structural and view-angle disparities between the source and the target. The relaxed assumption of paired data allows our method to be trained on a vast amount of videos needless of manual annotation of source-target pairing, leading to improved robustness against large structural variations and extreme motion in videos. We demonstrate the effectiveness of our method over the state-of-the-art methods such as NKN [39], EDN [7] and LCM [3]. Code, model and data are publicly available on our project page. + +# 1. Introduction + +Let's sway you could look into my eyes. Let's sway under the moonlight, this serious moonlight. + +David Bowie, Let's Dance + +Can an amateur dancer learn instantly how to dance like a professional in different styles, e.g., Tango, Locking, Salsa, and Kompa? While it is almost impossible in reality, one can now achieve this virtually via motion retargeting - transferring the motion of a source video featuring a professional dancer to a target video of him/herself. + +Motion retargeting is an emerging topic in both computer vision and graphics due to its wide applicability to content creation. Most existing methods [39, 27, 29] achieve motion retargeting through high-quality 3D pose estimation or reconstruction [10]. These methods either require complex and expensive optimization or they are error-prone given the unconstrained videos that contain complex motion. Recently, several efforts are also made to retarget motion in 2D space [3, 7, 23]. Image-based methods [15, 5] obtain compelling results on conditional person generation. However, these methods always neglect the temporal coherence in video and thus suffer from twinkling results. Video-based methods [42, 7, 3] show state-of-the-art results. However, + +insufficient consideration of variances between two individuals [42, 7] or the limitation of training on synthesized data [3] makes their result deteriorate dramatically while encountering large structure variations or extreme motion in web videos. + +In this study, we aim to address video motion retargeting via an end-to-end learnable framework in 2D space, bypassing the need for explicit estimation of 3D human pose. Despite recent progress in generative frameworks and motion synthesis, learning for motion retargeting in 2D space remains challenging due to the following issues: 1) Consider the large structural and view-angle variances between the source and target videos, it is difficult to learn a direct person-to-person mapping at the pixel level. Conventional image-to-image translation methods tend to generate unnatural motion in extreme conditions or fail on unseen examples; 2) No corresponding image pairs of two different subjects performing the same motion are available to supervise the learning of such a transfer; 3) Human motion is highly articulated and complex, thus it is challenging to perform motion modeling and transfer. + +To address the first challenge, instead of performing direct video-to-video translation at the pixel level, we decompose the translation process into three steps as shown in Fig. 2, i.e., skeleton extraction, motion retargeting on skeleton and skeleton-to-video rendering. The decomposition allows us to focus on the core problem of motion re-targeting using skeleton sequences as the input and output spaces. To cope with the second and third challenges, we exploit the invariance property of three factors: motion, structure, and view-angle. These factors of variation are enforced to be independent of each other, held constant when other factors vary. In particular, 1) motion should be invariant despite structural and view-angle perturbations, 2) structure of one skeleton sequence should be consistent across time and invariant despite view-angle perturbations, and 3) view-angle of one skeleton sequence should be consistent across time and invariant despite structural perturbations. The invariance properties allow us to derive a set of purely unsupervised loss functions to train an auto-encoder for disentangling a sequence of skeletons into orthogonal latent representations of motion, structure, and view-angle. Given the disentangled representation, one can easily mix the latent codes of motion and structure from different skeleton sequences for motion retargeting. Taking different view-angle as a condition to the decoder, one can generate retargeted motion in novel viewpoints. Since motion retargeting is performed on the 2D skeleton space, it can be seen as a lightweight and plug-and-play module, which is complementary to existing skeleton extraction [6, 4, 33, 46] and skeleton-to-video rendering methods [7, 42, 41]. + +There are several existing studies designed for general representation disentanglement in video [20, 38, 13]. While these methods have shown impressive results on con + +strained scenarios. It is difficult for them to model articulated human motion due to the highly non-linear and complex kinematic structures. Instead, our method is designed specifically for representation disentanglement in human videos. + +We summarize our contributions as follows: 1) We propose a novel Motion Retargeting Network in 2D skeleton space, which can be trained end-to-end with unlabeled web data. 2) We introduce novel loss functions based on invariance to endow the proposed network with the ability to disentangle representation in a purely unsupervised manner. 3) Extensive experiments demonstrate the effectiveness of our method over other state-of-the-art approaches [7, 3, 39], especially under in-the-wild scenarios where motion are complex. + +# 2. Related Work + +Video Motion Retargeting. Hodgins and Pollard [19] proposed a control system parameter scaling algorithm to adapt simulated motion to new characters. Lee and Shin [26] decomposed the problem into inter-frame constraints and intra-frame relationships and modeled them by Inverse Kinematics problem and B-spline curve separately. Choi and Ko [11] proposed a real-time method based on inverse rate control that computes the changes in joint angles. Tak and Ko [36] proposed a per-frame filter framework to generate physically plausible motion sequences. Recently, Villegas et al. [39] designed a recurrent neural network architecture with a Forward Kinematics layer to capture high-level properties of motion. However, the target to be animated of the aforementioned approaches is typically an articulated virtual character and their results critically depend on the accuracy of 3D pose estimation. More recently, Aberman et al. [3] propose to retarget motion in 2D space. However, since their training relies on synthetic paired data, the performance is likely to degrade under the unconstrained scenarios. Instead, our method can be trained on pure unlabeled web data, which makes the method robust to the challenging in-the-wild motion transfer task. + +There exist a few attempts to address the video motion retargeting problem. Liu et al. [27] designed a novel GAN [16] architecture with an attentive discriminator network and better conditioning inputs. However, this method relies on 3D reconstruction of the target person. Aberman et al. [2] proposed to tackle video-driven performance cloning in a two-branch framework. Chan et al. [7] proposed a simple but effective method to obtain temporal coherent video results. Wang et al. [42] achieves results of similar quality to Chan et al. with more complex shape representation and temporal modelling. However, The performance of all these methods degrades dramatically when large variations happened between two individuals with no consideration [2, 41, 42] or a simple rescaling [7] to address body + +![](images/b84f4199d78dcf94ba4acac3505bacc95ca3d94a25df2a075278f432d33f2248.jpg) +Figure 2: Motion retargeting pipeline Our method achieves motion retargeting in three stages. 1.Skeleton Extraction: 2D body joints are extracted from source and target videos using an off-the-shelf model. 2.Motion Retargeting Network: our model decomposes the joint sequences and recombines the elements to generate a new joint sequence, which can be viewed at any desired view-angle. 3.Skeleton-to-Video Rendering: Retargeted video is rendered using the output joint sequence, with an available image-to-image translation method. + +variations. + +Unsupervised Representation Disentanglement. There is a vast literature [25, 28, 21, 34, 45, 44] on disentangling factors of variation. Bilinear models [37] were an early approach to separate content and style for images of faces and text in various fonts. Recently, InfoGAN [9] learned a generative model with disentangled factors based on Generative Adversarial Networks (GAN). $\beta$ -VAE [18] and DIP-VAE [24], build on variational Auto-Encoders (VAEs) to disentangle interpretable factors in an unsupervised way. + +Other approaches explore general methods for learning disentangled representations from video. Whitney et al. [43] used a gating principle to encourage each dimension of the latent representation to capture a distinct mode of variation. Villegas et al. [40] used an unsupervised approach to factoring video into content and motion. Denton et al. [13] proposed to leverage the temporal coherence of video and a novel adversarial loss to learn a disentangled representation. MoCoGAN [38] employs unsupervised adversarial training to learn the separation of motion and content. Hsieh et al. [20] proposed an auto-encoder framework, which combines structured probabilistic models and deep networks for disentanglement. However, the performance of these methods are not satisfactory on human videos, since they are not designed specifically for disentanglement of highly articulated and complex objects. + +Person Generation. Various machine learning algorithms have been used to generate realistic person images. The generation process could be conditionally guided by skeleton keypoints [5, 30] and style codes [31, 15, 12]. Our method is complementary to the image-based person generation approaches and can further boost the temporal coherence of them since it performs motion retargeting on the 2D skeletons space only. + +# 3. Methodology + +As illustrated in Fig. 2, we decompose the translation process into three steps, i.e., skeleton extraction, motion retargeting and skeleton-to-video rendering. In our framework, motion retargeting is the most important component in which we introduce our core contribution (i.e., invariance-driven disentanglement). Skeleton extraction and skeleton-to-video rendering are replaceable and can thus benefit from recent advances in 2D keypoints estimation [4, 6, 46] and image-to-image translation [22, 42, 41]. + +The Motion Retargeting Network decomposes 2D joint input sequences as a motion code that represents the movements of the actor, a structure code that represents the body shape of the actor and a view-angle code that represents the camera angle. The decoder takes any combination of the latent codes and produces a reconstructed 3D joint sequence, which automatically isolates view from motion and structure. + +For transferring motion from a source video to a target video, we first use an off-the-shelf 2D keypoints detector to extract joint sequences from videos. By combining the motion code encoded from the source sequence and the structure code encoded from the target sequence, our model then yields a transferred 3D joint sequence. The transferred sequence is then projected back to 2D with any desired view-angle. Finally, we convert the 2D joint sequence frame-by-frame to a pixel-level representation, i.e., label maps. These label maps are fed into a pre-trained image-to-image generator to render the transferred video. + +# 3.1. Motion Retargeting Network + +Here, we detail the encoders and decoders for an input sequence $\mathbf{x} \in \mathbb{R}^{T \times 2N}$ where $T$ is the length of the sequence and $N$ is the number of body joints. + +The motion encoder uses several layers of one dimen + +![](images/92a36dd49bdcfd7324c9df6503c51a3a150314b7b02633afeb414d04bc7c80da.jpg) +Figure 3: Limb-scaling process. We show a step-by-step limb-scaling process on a joint sequence $\mathbf{x}$ starting from the root joint (pelvis). At each step, the scaled limbs are highlighted with red. This example scales all limbs with the same factor $\gamma_{i} = 2$ , but the scaling factors are randomly generated at training time. + +sional temporal convolution to extract motion information: $E_{m}(\mathbf{x}) = \mathbf{m}\in \mathbb{R}^{M\times C_{m}}$ , where $M$ is the sequence length after encoding and $C_m$ is the number of channels. Note that the motion code $\mathbf{m}$ is variable in length so as to preserve temporal information. + +The structure encoder has a similar network structure $E_{s}(\mathbf{x}) = \mathbf{s} \in \mathbb{R}^{M \times C_{s}}$ , with the difference that the final structure code is obtained after a temporal max pooling: $\bar{E}_{s}(\mathbf{x}) = \bar{\mathbf{s}} = \mathrm{maxpool}(\mathbf{s})$ , therefore $\bar{\mathbf{s}} \in \mathbb{R}^{C_s}$ . Effectively, the process of obtaining the structure code can be interpreted as performing multiple body shape estimations in sliding windows: $E_{s}(\mathbf{x}) = [\mathbf{s}_{1},\mathbf{s}_{2},\dots,\mathbf{s}_{M}]$ , and then aggregating the estimations. Assuming the viewpoint is also stationary (i.e. all the temporal variances are caused by the movements of the actor), the view code $\bar{E}_v(\mathbf{x}) = \bar{\mathbf{v}} \in \mathbb{R}^{C_v}$ is obtained the same way we obtained the structure code. + +The decoder takes the motion, body and view codes as input and reconstructs a 3D joint sequence $G(\mathbf{m},\bar{\mathbf{s}},\bar{\mathbf{v}}) = \hat{\mathbf{X}}\in \mathbb{R}^{T\times 3N}$ through convolution layers, in symmetry with the encoders. Our discriminator $D$ is a temporal convolutional network that is similar to our motion encoder: $D(\mathbf{x})\in \mathbb{R}^{M}$ . + +# 3.2. Invariance-Driven Disentanglement + +The disentanglement of motion, structure and view is achieved leveraging the invariance of each of these factors to the changes in the other twos. We design loss terms to restrict changes when perturbations are added, while the entire network tries to reconstruct joint sequences from decomposed features. Structural perturbation is added through limb scaling, i.e. manually shortening or extending the length of the limbs. View perturbation is introduced through rotating the reconstructed 3D sequence and projecting it back to 2D. Motion perturbation needs not be explicitly added since motion itself is varying through time. We first describe the ways perturbations are added and then detail the definitions of the loss terms derived from three invariances, i.e., motion, structure and view-angle invariance. + +Limb Scaling as Structural Perturbation. For an input 2D sequence $\mathbf{x} \in \mathbb{R}^{T \times 2N}$ , we create a structurally-perturbed sequence by elongating or shortening the limbs + +![](images/7610dabd75c768f93faf5dd2f446d5076e62fdfe393693a8ecc2015c4ea65679.jpg) +Figure 4: Rotation as view perturbation. This figure illustrates the process of taking an input 2D sequence $\mathbf{x}$ , reconstructing a 3D sequence $\hat{\mathbf{X}}$ using our motion retargeting network and projecting it back to 2D, with rotation as view-angle perturbation. + +of the performer, as illustrated in Figure 3. It is done in such a way that the created sequence is effectively the same motion performed by a different actor. The length of a limb is extended/shortened by the same ratio across all frames, so limb-scaling does not introduce ambiguity between motion and body structure. Specifically, the limb-scaled sequence $\mathbf{x}'$ is created by applying the limb-scale function frame-by-frame: $\mathbf{x}_t' = \delta (\mathbf{x}_t;\gamma ,\gamma_g)$ , where $\mathbf{x}_t$ is the $t^{\mathrm{th}}$ frame in the input sequence, $\delta$ is the limb scaling function, $\gamma = [\gamma_{1},\gamma_{2},\ldots]$ are the local scaling factors and $\gamma_{g}$ is the global scaling factor. Modeling the human skeleton as a tree and joints as its nodes, we define the pelvis joint as the root. For each frame in the sequence, starting from the root, we recursively move the joints and all their dependent joints (child nodes) on the direction of the limb by distance $(\gamma_i - 1)L_i^{(t)}$ , where $L_{i}^{(t)}$ is the original length of the limb in the $t^{\mathrm{th}}$ frame. After all local scaling factors have been applied, the global scaling factor $\gamma_{g}$ is directly multiplied with all the joint coordinates. + +3D Rotation as View Perturbation. Let $\phi$ be a rotate-and-project function, i.e., for a 3D coordinate $\mathbf{p} = [x y z]^T$ : + +$$ +\phi (\mathbf {p}, \theta ; \mathbf {n}) = \left[ \begin{array}{c c c} R _ {1 1} (\mathbf {n}, \theta) & R _ {1 2} (\mathbf {n}, \theta) & R _ {1 3} (\mathbf {n}, \theta) \\ R _ {2 1} (\mathbf {n}, \theta) & R _ {2 2} (\mathbf {n}, \theta) & R _ {2 3} (\mathbf {n}, \theta) \end{array} \right] \left[ \begin{array}{c} x \\ y \\ z \end{array} \right] +$$ + +$R(\mathbf{n},\theta)\in \mathbb{S}\mathbb{O}^3$ is a rotation matrix obtained using Rodrigues' rotation formula and $\mathbf{n}$ is a unit vector representing the axis around which we rotate. In practice, $\mathbf{n}$ is an estimated vertical direction of the body. It is computed using four points: left shoulder, right shoulder, left pelvis and right pelvis. Note that $\phi (\mathbf{p},\theta)$ is differentiable with respect to $\mathbf{p}$ . + +As shown in Fig. 4, we create several rotated sequences from the reconstructed 3D sequence $\hat{\mathbf{X}}$ : + +$$ +\hat {\mathbf {x}} ^ {(k)} = \phi (\hat {\mathbf {X}}, \frac {k}{K + 1} \pi), k = 1, 2, \dots , K +$$ + +and $K$ is number of projections. Loss terms enforcing disentanglement will be described later in this chapter. + +![](images/809f4fc4573b74a6c2587800de03cba2364ce4b3837aea6b5fe99ddf1a5aadb1.jpg) +Figure 5: Cross reconstruction process. This figure illustrates the process of cross-reconstruction using a 2D input sequence $\mathbf{x}$ and its limb-scaled variant $\mathbf{x}'$ . + +# 3.2.1 Invariance of Motion + +Motion should be invariant despite structural and view-angle perturbations. To this end, we designed the following loss terms. + +Cross Reconstruction Loss. Recall that we use limb scaling to obtain data of the same movements performed by "different" actors $\mathbf{x}$ and $\mathbf{x}'$ . We cross reconstruct the two sequences, as shown in Fig.5. The cross reconstruction involves encoding, swapping and decoding, namely: + +$$ +\hat {\mathbf {x}} ^ {\prime} = \phi \left[ G \left(E _ {m} (\mathbf {x} ^ {\prime}), \bar {E} _ {s} (\mathbf {x}), \bar {E} _ {v} (\mathbf {x})\right), 0 \right] +$$ + +$$ +\hat {\mathbf {x}} ^ {\prime \prime} = \phi \left[ G (E _ {m} (\mathbf {x}), \bar {E} _ {s} (\mathbf {x} ^ {\prime}), \bar {E} _ {v} (\mathbf {x} ^ {\prime})), 0 \right], +$$ + +where $\mathbf{x}'$ is the limb-scaled version of $\mathbf{x}$ . Since $\mathbf{x}$ and $\mathbf{x}'$ have the same motion, we expect $\hat{\mathbf{x}}'$ to be the same as $\mathbf{x}$ ; $\hat{\mathbf{x}}''$ to be the same as $\mathbf{x}'$ . Therefore, the cross reconstruction loss is defined as + +$$ +\mathcal {L} _ {\mathrm {c r s}} = \frac {1}{2 N T} \left(\frac {1}{2} | \mathbf {x} - \hat {\mathbf {x}} ^ {\prime} | + \frac {1}{2} | \mathbf {x} ^ {\prime} - \hat {\mathbf {x}} ^ {\prime \prime} |\right). \tag {1} +$$ + +Structural Invariance Loss. This signal is to ensure that the motion codes are invariant to structural changes. $\mathbf{x}$ and $\mathbf{x}^{\prime}$ have the same motion but different body structures, therefore we expect the motion encoder to have the same output: + +$$ +\mathcal {L} _ {\text {i n v . m}} ^ {(s)} = \frac {1}{M C _ {m}} \left| E _ {m} (\mathbf {x}) - E _ {m} \left(\mathbf {x} ^ {\prime}\right) \right|. \tag {2} +$$ + +Rotation Invariance Loss. Similarly, to ensure that the motion code is invariant to rotation, we add: + +$$ +\mathcal {L} _ {\text {i n v - m}} ^ {(v)} = \frac {1}{K M C _ {m}} \sum_ {k = 1} ^ {K} \left| E _ {m} (\mathbf {x}) - E _ {m} \left(\hat {\mathbf {x}} ^ {(k)}\right) \right|, \tag {3} +$$ + +where $\hat{\mathbf{x}}^{(k)}$ is the $k^{\mathrm{th}}$ rotated variant. + +# 3.2.2 Invariance of Structure + +Body structure should be consistent across time and invariant view-angle perturbations. + +Triplet Loss. The triplet loss is added to exploit the time-invariant property of the body structure and thereby better enforce disentanglement. Recall that the body encoder produces multiple body structure estimations $E_{s}(\mathbf{x}) = [\mathbf{s}_{1},\mathbf{s}_{2},\dots,\mathbf{s}_{M}]$ , $E_{s}(\mathbf{x}^{\prime}) = [\mathbf{s}_{1}^{\prime},\mathbf{s}_{2}^{\prime},\dots\mathbf{s}_{M}^{\prime}]$ before averaging them. The triplet loss is designed to map estimations from the same sequence to a small neighborhood while alienating estimations from different sequences. Let us define an individual triplet loss term: + +$$ +\tau \left(\mathbf {s} _ {t _ {1}}, \mathbf {s} _ {t _ {2}}, \mathbf {s} _ {t _ {2}} ^ {\prime}\right) = \max \left\{0, s \left(\mathbf {s} _ {t _ {1}}, \mathbf {s} _ {t _ {2}} ^ {\prime}\right) - s \left(\mathbf {s} _ {t _ {1}}, \mathbf {s} _ {t _ {2}}\right) + m \right\}, \tag {4} +$$ + +where $s(\cdot, \cdot)$ denotes the cosine similarity function and $m = 0.2$ is our margin. The total triplet loss for the invariance of structure is defined as + +$$ +\mathcal {L} _ {\text {t r i p - s}} = \frac {1}{2 M} \sum_ {t _ {1}, t _ {2}} \left[ \tau \left(\mathbf {s} _ {t _ {1}}, \mathbf {s} _ {t _ {2}}, \mathbf {s} _ {t _ {2}} ^ {\prime}\right) + \tau \left(\mathbf {s} _ {t _ {1}} ^ {\prime}, \mathbf {s} _ {t _ {2}} ^ {\prime}, \mathbf {s} _ {t _ {2}}\right) \right], \tag {5} +$$ + +where $t_1 \neq t_2$ . + +Rotation Invariance Loss. This signal is to ensure that the structure codes are invariant to rotation: + +$$ +\mathcal {L} _ {\text {i n v} _ {s}} = \frac {1}{K C _ {s}} \sum_ {i = 1} ^ {K} \left| \bar {E} _ {s} (\mathbf {x}) - \bar {E} _ {s} \left(\hat {\mathbf {x}} ^ {(k)}\right) \right|, \tag {6} +$$ + +where $\hat{\mathbf{x}}^{(k)}$ is the $k^{\mathrm{th}}$ rotated variant. + +# 3.2.3 Invariance of View-Angle + +View-angle of one skeleton sequence should be consistent through time invariant despite structural perturbations. + +Triplet Loss. Similarly, triplet loss is designed to map view estimations from the same sequence to a small neighborhood while alienating estimations from rotated sequences. + +Continuing to use the definition of a triplet term in Eq.4: + +$$ +\mathcal {L} _ {\mathrm {t r i p}} = \frac {1}{2 M K} \sum_ {k, t _ {1}, t _ {2}} \left[ \tau \left(\mathbf {v} _ {t _ {1}}, \mathbf {v} _ {t _ {2}}, \mathbf {v} _ {t _ {2}} ^ {(k)}\right) + \tau \left(\mathbf {v} _ {t _ {1}} ^ {(k)}, \mathbf {v} _ {t _ {2}} ^ {(k)}, \mathbf {v} _ {t _ {2}}\right) \right], \tag {7} +$$ + +where $\mathbf{v}^{(k)} = \bar{E}_v(\hat{\mathbf{x}}^{(k)})$ , $t_1 \neq t_2$ . + +Structural Invariance Loss This signal is to ensure that the view code is invariant to structural change: + +$$ +\mathcal {L} _ {\text {i n v . v}} = \frac {1}{C _ {v}} \left| \bar {E} _ {v} (\mathbf {x}) - \bar {E} _ {v} \left(\mathbf {x} ^ {\prime}\right) \right|, \tag {8} +$$ + +where $\mathbf{x}'$ is the limb-scaled version of $\mathbf{x}$ . + +# 3.2.4 Training Regularization + +The loss terms defined above are designed to enforce disentanglement. Besides them, some basic loss terms are needed + +for this representation learning process. + +Reconstruction Loss. Reconstructing data is the fundamental functionality of auto-encoders. Recall that our decoder outputs reconstructed 3D sequences. Our reconstruction loss minimizes the difference between real data and 3D reconstructions projected back to 2D. + +$$ +\mathcal {L} _ {\mathrm {r e c}} = \frac {1}{2 N T} \left| \mathbf {x} - \phi (\hat {\mathbf {X}}, 0) \right|, \tag {9} +$$ + +i.e. we expect $\hat{\mathbf{X}}$ to be the same as the input $\mathbf{x}$ when we directly remove the $z$ coordinates from $\hat{\mathbf{X}}$ . + +Adversarial Loss. The unsupervised recovery of 3D motion from joint sequences is achieved through adversarial training. Reconstructed 3D joint sequences are rotated and projected back to 2D and a discriminator is used to measure the domain discrepancy between the projected 2D sequences and real 2D sequences. The feasibility of recovering static 3D human pose from 2D coordinates with adversarial learning has been verified in several works [35, 14, 8, 32]. We want the reconstructed 3D sequence $\hat{\mathbf{X}}$ to look right after we rotate it and project it back to 2D, therefore the adversarial loss is defined as. + +$$ +\mathcal {L} _ {\mathrm {a d v}} = \frac {1}{K} \sum_ {k = 1} ^ {K} \mathbb {E} _ {\mathbf {x} \sim p _ {\mathbf {x}}} [ \frac {1}{2} \log D (\mathbf {x}) + \frac {1}{2} \log (1 - D (\hat {\mathbf {x}} ^ {(k)})) ] \tag {10} +$$ + +# 3.2.5 Total Loss + +The proposed motion retargeting network can be trained end-to-end with a weighted sum of the loss terms defined above: + +$$ +\begin{array}{l} \mathcal {L} = \lambda_ {\mathrm {r e c}} \mathcal {L} _ {\mathrm {r e c}} + \lambda_ {\mathrm {c r s}} \mathcal {L} _ {\mathrm {c r s}} + \lambda_ {\mathrm {a d v}} \mathcal {L} _ {\mathrm {a d v}} + \lambda_ {\mathrm {t r i p}} \left(\mathcal {L} _ {\mathrm {t r i p} - \mathrm {s}} + \mathcal {L} _ {\mathrm {t r i p} - \mathrm {v}}\right) \\ + \lambda_ {\mathrm {i n v}} \left(\mathcal {L} _ {\mathrm {i n v} \cdot \mathrm {m}} ^ {(s)} + \mathcal {L} _ {\mathrm {i n v} \cdot \mathrm {m}} ^ {(v)} + \mathcal {L} _ {\mathrm {i n v} \cdot s} + \mathcal {L} _ {\mathrm {i n v} \cdot \mathrm {v}}\right) \\ \end{array} +$$ + +# 4. Experiments + +# 4.1. Setup + +Implementation details. We perform the proposed training pipeline on the synthetic Mixamo dataset [1] for quantitative error measurement and fair comparison. For in-the-wild training, we collected a motion dataset named SoloDancer from online videos. For skeleton-to-video rendering, we recorded 5 target videos and use the synthesis pipeline proposed in [7]. The trained generator is shared by all the motion retargeting methods. + +Evaluation metrics. We evaluate the quality of motion retargeting for both skeleton and video, as retargeting results on skeleton would largely influence the quality of generated videos. For skeleton keypoints, we perform evaluations on a held-out test set from Mixamo (with ground truth available) using mean square error (MSE) as the metric. For generated videos, we evaluate the quality of frames with FID score [17] and through a user study. + +![](images/7c071ede828ff87b2e13449335f846b3fd19d6ba34b8a61b89abe0256f4070e9.jpg) +Figure 6: Motion retargeting results. Top to bottom: input source frame, extracted source skeleton, transformed skeleton, generated frame. + +# 4.2. Representation Disentanglement + +We train the model on unconstrained videos in-the-wild, and the model automatically learns the disentangled representations of motion, body, and view-angle, which enables a wide range of applications. We test motion retargeting, novel-view synthesis and latent space interpolation to demonstrate the effectiveness of the proposed pipeline. Motion retargeting. We extract the desired motion from the source skeleton sequence, then retarget the motion to the target person. Videos from the Internet vary drastically in body structure as shown in Fig. 6. For example, Spiderman has very long legs but the child has short ones. Our method, no matter how large the structural gap between the source and the target, is capable of generating a skeleton sequence precisely with the same body structure as the target person while preserving the motion from the source person. Novel-view synthesis. We can explicitly manipulate the view of decoded skeleton in the 3D space, rotating it before projecting it down to 2D. We show an example in Fig. 7. This enables us to see the motion-transferred video at any desired view-angle. + +Latent space interpolation. The learned latent representation is meaningful when interpolated, as shown in Fig. 8. Both the motion and the body structure change smoothly between the videos, demonstrating the effectiveness of our model in capturing a reasonable coverage of the manifold. + +# 4.3. Comparisons to State-of-the-Art Methods + +We compare the motion retargeting results of our method with the following methods (including one intuitive method and three state-of-the-art methods) both quantitatively and + +![](images/3477e0659aa01d548bef972df73fd6d4e7999cc7b1a6342b17a09868f80f784f.jpg) +Figure 7: Novel view synthesis results. The first row shows the continuous rotation of generated skeleton, and the second row shows the corresponding rendering results. + +![](images/7b39a3bc4cb8456cd644ee6eab144c012df4c0ff3a3af469ebbb796c2228dc62.jpg) +Figure 8: Latent space interpolation results. Linear interpolation is tested for body structure (horizontal axis) and motion (vertical axis). + +Table 1: Quantitative Results. MSE and MAE are joint position errors measured on Mixamo, reported in the original scale of the data. FID measure the quality of rendered images. Users evaluate the consistency between source videos and generated videos. We report the percentage of users who prefer our model and our in-the-wild trained model, respectively. + +
MethodMSEMAEFIDUserUser (wild)
LN0.08860.161648.3781.7%82.9%
NKN [39]0.01980.078167.3284.5%86.3%
EDN [7]0.11860.202240.5675.2%77.1%
LCM [3]0.01510.074937.1568.5%71.6%
Ours0.01310.067331.26--
Ours (wild)0.01210.062731.29--
+ +qualitatively. 1) Limb Normalization is an intuitive method that calculates a scaling factor for each limb and applies local normalization. 2) Neural Kinematic Networks (NKN) [39] uses detected 3D keypoints for unsupervised motion retargeting. 3) Everybody Dance Now (EDN) [7] applies a global linear transformation on all the keypoints. 4) Learning Character-Agnostic Motion (LCM) [3] performs disentanglement at the 2D space in a fully-supervised manner. + +For the fairness of the comparison, we train and test all the models on a unified Mixamo dataset, but note that our + +model is trained with less information, using neither 3D information [39] nor the pairing between motion and skeletons [3]. In addition, we train a separate model with in-the-wild data only. All the methods are evaluated with the aforementioned evaluation metrics. + +Our method outperforms all the compared methods in terms of both numerical joint position error and quality of generated image. EDN and LN are naive rule-based methods, the former does not estimate the body structure and the latter is bound to fail when the actor is not facing the camera directly. Despite that NKN is able to transfer motion with little error on the synthesized dataset, it suffers on in-the-wild data due to the unreliability of 3D pose estimation. LCM is trained with a finite set of characters, therefore its capacity of generalization is limited. In contrast, our method uses limb-scaling to augment the training data, exploring all possible body structures in a continuous space. + +It is noteworthy that our method enables training on arbitrary web data that previous methods are not able to. The fact that the model trained on in-the-wild data (i.e., Solo-Dancer Dataset) achieved the lowest error (in Table 1) demonstrates the benefits of training on in-the-wild data. For complex motion such as the one shown in Fig. 10, the model learned from wild data performs better, as wild data features a larger diversity of motion. These results show the superiority of our method in learning from unlimited real-world data, while supervised methods rely on strictly paired data that are hard to expand. + +In summary, we attribute the superior performance of our method to the following reasons: 1) Our disentanglement is directly performed in 2D space, which circumvents the imprecise process of 3D-keypoints detection from in-the-wild videos. 2) Our explicit invariance-driven loss terms maximize the utilization of information contained in the training data, evidenced by the largely increased data efficiency compared to implicit unsupervised approaches [39]. 3) Our limb scaling mechanism improves the model's ability to handle extreme body structures. 4) In-the-wild videos provide an unlimited source of motion, compared to limited movements in synthetic datasets like Mixamo [1]. + +![](images/4ea862e34326050e86973b69da5f7ea7a5506f767c86c5a74fb04dd3583a2567.jpg) +Figure 9: Qualitative comparison with state-of-the-art methods. Each column on the right represents a motion retargeting method. + +![](images/9e1c28f8654981f6cf4060d9c6acdb77dcf58ddedbe7527dd52d365e96fd2484.jpg) +Figure 10: Results of our in-the-wild trained model. Qualitative comparison for models trained with our method on Mixamo and Solo-Dancer separately. The first column gives two challenging motion sources, and the other columns show corresponding results. + +Table 2: Ablation Study Results. + +
Methodw/o crsw/o tripw/o advOurs (full)
MSE0.03920.01540.01360.0131
MAE0.12590.07080.06820.0673
+ +# 4.4. Ablation study + +We train some ablated models to study the impact of the individual loss terms. The results are shown in Table 2. We design three ablated models. The w/o crs model is created by removing the cross reconstruction loss. The w/o trip model is created by removing the triplet loss. The w/o adv + +model is created by removing the adversarial loss. Removing the cross reconstruction loss has the most detrimental effect to the 2D retargeting performance of our model, evidenced by the doubling of MSE. Removal of the triplet loss increased the MSE by about $16\%$ . Although removing the adversarial loss does not significantly affect the 2D retargeting performance of our model, the rotated sequences look less natural without it. + +# 5. Conclusion + +In this work, we propose a novel video motion retargeting approach, in which motion can be successfully transferred in scenarios where large variations of body-structure exist between the source and target person. The proposed motion retargeting network runs on 2D skeleton input only, makes it a lightweight and plug-and-play module, which is complementary to existing skeleton extraction and skeleton-to-video rendering methods. Leveraging three inherent invariance properties in temporal sequences, the proposed network can be trained with unlabeled web data end-to-end. Our experiments demonstrate the promising results of our methods and the effectiveness of the invariance-driven constraints. + +Acknowledgement. This work is supported by the SenseTime-NTU Collaboration Project, Singapore MOE AcRF Tier 1 (2018-T1-002-056), NTU SUG, and NTU NAP. We would like to thank Tinghui Zhou, Rundi Wu and Kwan-Yee Lin for insightful discussion and their exceptional support. + +# References + +[1] Mixamo. https://www MIXamo.com/.6,7 +[2] Kfir Aberman, Mingyi Shi, Jing Liao, Dani Lischinski, Baoquan Chen, and Daniel Cohen-Or. Deep video-based performance cloning. Comput. Graph. Forum, 38:219–233, 2019. 2 +[3] Kfir Aberman, Rundi Wu, Dani Lischinski, Baoquan Chen, and Daniel Cohen-Or. Learning character-agnostic motion for motion retargeting in 2d. ACM Trans. Graph., 38(4):75:1-75:14, 2019. 1, 2, 7 +[4] Ríza Alp Güler, Natalia Neverova, and Iasonas Kokkinos. Denseseposé: Dense human pose estimation in the wild. In CVPR, pages 7297-7306, 2018. 2, 3 +[5] Guha Balakrishnan, Amy Zhao, Adrian V. Dalca, Frédo Durand, and John V. Guttag. Synthesizing images of humans in unseen poses. In CVPR, 2018. 1, 3 +[6] Zhe Cao, Gines Hidalgo, Tomas Simon, Shih-En Wei, and Yaser Sheikh. OpenPose: realtime multi-person 2D pose estimation using Part Affinity Fields. In arXiv preprint arXiv:1812.08008, 2018. 2, 3 +[7] Caroline Chan, Shiry Ginosar, Tinghui Zhou, and Alexei A. Efros. Everybody dance now. In ICCV, 2019. 1, 2, 6, 7 +[8] Ching-Hang Chen, Ambrish Tyagi, Amit Agrawal, Dylan Drover, Stefan Stojanov, and James M Rehg. Unsupervised 3d pose estimation with geometric self-supervision. In CVPR, pages 5714-5724, 2019. 6 +[9] Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In NeurIPS, 2016. 3 +[10] Xipeng Chen, Kwan-Yee Lin, Wentao Liu, Chen Qian, and Liang Lin. Weakly-supervised discovery of geometry-aware representation for 3d human pose estimation. In CVPR, 2019. 1 +[11] Kwang-Jin Choi and Hyeong-Seok Ko. Online motion retargeting. Journal of Visualization and Computer Animation, 11:223-235, 2000. 2 +[12] Rodrigo de Bem, Arnab Ghosh, Adnane Boukhayma, Thalaiyasingam Ajanthan, N. Siddharth, and Philip H. S. Torr. A conditional deep generative model of people in natural images. In WACV, pages 1449-1458, 2019. 3 +[13] Emily L. Denton and Vighnesh Birodkar. Unsupervised learning of disentangled representations from video. In NeurIPS, 2017. 2, 3 +[14] Dylan Drover, Ching-Hang Chen, Amit Agrawal, Ambrish Tyagi, and Cong Phuoc Huynh. Can 3d pose be learned from 2d projections alone? In ECCV, pages 0–0, 2018. 6 +[15] Patrick Esser, Ekaterina Sutter, and Björn Ommer. A variational u-net for conditional appearance and shape generation. In CVPR, 2018. 1, 3 +[16] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014. 2 +[17] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In NeurIPS, 2017. 6 + +[18] Irina Higgins, Loic Matthew, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. In ICLR, 2017. 3 +[19] Jessica K. Hodgins and Nancy S. Pollard. Adapting simulated behaviors for new characters. In SIGGRAPH, 1997. 2 +[20] Jun-Ting Hsieh, Bingbin Liu, De-An Huang, Fei-Fei Li, and Juan Carlos Niebles. Learning to decompose and disentangle representations for video prediction. In NeurIPS, 2018. 2, 3 +[21] Xun Huang, Ming-Yu Liu, Serge Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. In ECCV, 2018. 3 +[22] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. 3 +[23] Donggyu Joo, Doyeon Kim, and Junmo Kim. Generating a fusion image: One's identity and another's shape. In CVPR, 2018. 1 +[24] Abhishek Kumar, Prasanna Sattigeri, and Avinash Balakrishnan. Variational inference of disentangled latent concepts from unlabeled observations. In ICLR, 2018. 3 +[25] Hsin-Ying Lee, Hung-Yu Tseng, Jia-Bin Huang, Maneesh Kumar Singh, and Ming-Hsuan Yang. Diverse imaged-to-image translation via disentangled representations. In ECCV, 2018. 3 +[26] Jehee Lee and Sung Yong Shin. A hierarchical approach to interactive motion editing for human-like figures. In SIGGRAPH, 1999. 2 +[27] Lingjie Liu, Weipeng Xu, Michael Zollhoefer, Hyeongwoo Kim, Florian Bernard, Marc Habermann, Wenping Wang, and Christian Theobalt. Neural rendering and reenactment of human actor videos. arXiv preprint, arXiv:1809.03658, 2018. 1, 2 +[28] Ming-Yu Liu, Xun Huang, Arun Mallya, Tero Karras, Timo Aila, Jaakko Lehtinen, and Jan Kautz. Few-shot unsueprivised image-to-image translation. In ICCV, 2019. 3 +[29] Wen Liu, Wenhan Luo Lin Ma Zhixin Piao, Min Jie, and Shenghua Gao. Liquid warping gan: A unified framework for human motion imitation, appearance transfer and novel view synthesis. In ICCV, 2019. 1 +[30] Liqian Ma, Xu Jia, Qianru Sun, Bernt Schiele, Tinne Tuytelaars, and Luc Van Gool. Pose guided person image generation. In NeurIPS, 2017. 3 +[31] Liqian Ma, Qianru Sun, Stamatios Georgoulis, Luc Van Gool, Bernt Schiele, and Mario Fritz. Disentangled person image generation. In CVPR, 2018. 3 +[32] Dario Pavllo, Christoph Feichtenhofer, David Grangier, and Michael Auli. 3d human pose estimation in video with temporal convolutions and semi-supervised training. In CVPR, pages 7753-7762, 2019. 6 +[33] Xi Peng, Zhiqiang Tang, Fei Yang, Rogerio S Feris, and Dimitris Metaxas. Jointly optimize data augmentation and network training: Adversarial data augmentation in human pose estimation. In CVPR, 2018. 2 +[34] Shengju Qian, Kwan-Yee Lin, Wayne Wu, Yangxiaokang Liu, Quan Wang, Fumin Shen, Chen Qian, and Ran He. + +Make a face: Towards arbitrary high fidelity face manipulation. In ICCV, 2019. 3 +[35] Varun Ramakrishna, Takeo Kanade, and Yaser Sheikh. Reconstructing 3d human pose from 2d image landmarks. In ECCV, pages 573-586, 2012. 6 +[36] Seyoon Tak and Hyeong-Seok Ko. A physically-based motion retargeting filter. ACM Trans. Graph., 24:98-117, 2005. 2 +[37] Joshua B. Tenenbaum and William T. Freeman. Separating style and content with bilinear models. Neural Computation, 12:1247-1283, 2000. 3 +[38] Sergey Tulyakov, Ming-Yu Liu, Xiaodong Yang, and Jan Kautz. Mocogan: Decomposing motion and content for video generation. In CVPR, 2018. 2, 3 +[39] Ruben Villegas, Jimei Yang, Duygu Ceylan, and Honglak Lee. Neural kinematic networks for unsupervised motion retargeting. In CVPR, 2018. 1, 2, 7 +[40] Ruben Villegas, Jimei Yang, Seunghoon Hong, Xunyu Lin, and Honglak Lee. Decomposing motion and content for natural video sequence prediction. In ICLR, 2017. 3 +[41] Ting-Chun Wang, Ming-Yu Liu, Andrew Tao, Guilin Liu, Jan Kautz, and Bryan Catanzaro. Few-shot video-to-video synthesis. In NeurIPS, 2019. 2, 3 +[42] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Guilin Liu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. Video-to-video synthesis. In NeurIPS, 2018. 1, 2, 3 +[43] William F. Whitney, Michael Chang, Tejas D. Kulkarni, and Joshua B. Tenenbaum. Understanding visual concepts with continuation learning. In ICLR Workshop, 2016. 3 +[44] Wayne Wu, Kaidi Cao, Cheng Li, Chen Qian, and Chen Change Loy. Disentangling content and style via unsupervised geometry distillation. In ICLRw, 2019. 3 +[45] Wayne Wu, Kaidi Cao, Cheng Li, Chen Qian, and Chen Change Loy. Transgaga: Geometry-aware unsupervised image-to-image translation. In CVPR, 2019. 3 +[46] Wei Yang, Shuang Li, Wanli Ouyang, Hongsheng Li, and Xiaogang Wang. Learning feature pyramids for human pose estimation. In ICCV, 2017. 2, 3 \ No newline at end of file diff --git a/transmomoinvariancedrivenunsupervisedvideomotionretargeting/images.zip b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6c42407c79dd36776aa3daf5f7b4e59746411317 --- /dev/null +++ b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfd4d78d0da2de7210f44f4230a312c797dd942c9cc1d8a6d591e814034772a1 +size 561887 diff --git a/transmomoinvariancedrivenunsupervisedvideomotionretargeting/layout.json b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7b9fe1c03a4d1c1ea76786fb1ec9e0cdcfc4a181 --- /dev/null +++ b/transmomoinvariancedrivenunsupervisedvideomotionretargeting/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fda114c84bc7215f3a73cfacfffd19923746da7bc14ee7ae42a4acc2404cf99 +size 382455 diff --git a/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/01141143-4c58-40b7-b8fa-febfd75adc37_content_list.json b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/01141143-4c58-40b7-b8fa-febfd75adc37_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..370fcc64c76bf142d758c5ff6d4a9a31d09ee004 --- /dev/null +++ b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/01141143-4c58-40b7-b8fa-febfd75adc37_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6bd04922656f329ee6b93a4b73cc4b004de3cd953f9715495ce5646bd876cf20 +size 84230 diff --git a/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/01141143-4c58-40b7-b8fa-febfd75adc37_model.json b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/01141143-4c58-40b7-b8fa-febfd75adc37_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c7d25660ab4fecb981760192d1b28f6abc3a9256 --- /dev/null +++ b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/01141143-4c58-40b7-b8fa-febfd75adc37_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ffbee1f3fd6f1c1a66d4078a68ea1956ff6abd9a9c195a113425a89149dfd40 +size 110265 diff --git a/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/01141143-4c58-40b7-b8fa-febfd75adc37_origin.pdf b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/01141143-4c58-40b7-b8fa-febfd75adc37_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..64556f31b2adbe281843f4284ca6ab29c2c1b0ca --- /dev/null +++ b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/01141143-4c58-40b7-b8fa-febfd75adc37_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db4fd2098f0ea3949d905f5d116793a5647fdfd0b313b6d784ddfbdda8214c73 +size 1996481 diff --git a/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/full.md b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e05e00e90f5d1d77a958c350ac378c4ae3db5515 --- /dev/null +++ b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/full.md @@ -0,0 +1,339 @@ +# TubeTK: Adopting Tubes to Track Multi-Object in a One-Step Training Model + +Bo Pang, Yizhuo Li, Yifan Zhang, Muchen Li†, Cewu Lu* +Shanghai Jiao Tong University, †Huazhong University of Science and Technology +{pangbo, liyizhuo, zhangyf_sjtu lucewu}@sjtu.edu.cn, muchenli@alumni.hust.edu.cn + +# Abstract + +Multi-object tracking is a fundamental vision problem that has been studied for a long time. As deep learning brings excellent performances to object detection algorithms, Tracking by Detection (TBD) has become the mainstream tracking framework. Despite the success of TBD, this two-step method is too complicated to train in an end-to-end manner and induces many challenges as well, such as insufficient exploration of video spatial-temporal information, vulnerability when facing object occlusion, and excessive reliance on detection results. To address these challenges, we propose a concise end-to-end model TubeTK which only needs one step training by introducing the "bounding-tube" to indicate temporal-spatial locations of objects in a short video clip. TubeTK provides a novel direction of multi-object tracking, and we demonstrate its potential to solve the above challenges without bells and whistles. We analyze the performance of TubeTK on several MOT benchmarks and provide empirical evidence to show that TubeTK has the ability to overcome occlusions to some extent without any ancillary technologies like Re-ID. Compared with other methods that adopt private detection results, our one-stage end-to-end model achieves state-of-the-art performances even if it adopts no ready-made detection results. We hope that the proposed TubeTK model can serve as a simple but strong alternative for video-based MOT task. The code and model will be publicly available accompanying this paper. + +# 1. Introduction + +Video multi-object tracking (MOT) is a fundamental yet challenging task that has been studied for a long time. It requires the algorithm to predict the temporal and spatial location of objects and classify them into correct categories. The current mainstream trackers such as [65, 3, 9, 1, 13] all adopt the tracking-by-detection (TBD) framework. As a two-step method, this framework simplifies the tracking problem into two parts: detecting the spatial location of ob + +![](images/63303f1e36092649555f9b939f9ea121daeaf1f8fd307e2ecc791ceaf17e0518.jpg) +Figure 1. Bounding-boxes and bounding-tubes. As shown in the first row, it is difficult to detect the severely occluded target (the yellow box) by the spatial box without temporal information. In our TubeTK (the second row), it generates bounding-tubes based on temporal-spatial features that encode targets' spatial location and moving trail at the same time. This leads to a one-step training tracking method which is more robust when facing occlusions. + +jects and matching them in the temporal dimension. Although this is a successful framework, it is important to note that TBD method suffers from some drawbacks: + +1. As shown in [65, 18], the performances of models adopting TBD framework dramatically vary with detection models. This excessive reliance on image detection results limits performances of the MOT task. Although there are some existing works aiming at integrating the two steps more closely [67, 20, 3], the problems are still not solved fundamentally because of the relatively independent detection model. +2. Due to image-based detection models employed by TBD, the tracking models are weak when facing severe object occlusions (see Fig. 1). It is extremely difficult to detect occluded objects only through spatial representations [3]. The low quality detection further makes tracking unstable, which leads to more compli + +ated design of matching mechanism [53, 57]. + +3. As a video level task, MOT requires models to process spatial-temporal information (STI) integrally and effectively. To some extent, the above problems are caused by the separate exploration of STI: detectors mainly model spatial features and trackers capture temporal ones [50, 9, 18, 53], which casts away the semantic consistency of video features and results in incomplete STI at each step. + +Nowadays, many video tasks can be solved in a simple one-step end-to-end method such as the I3D model [6] for action recognition [36], TRN [68] for video relational reasoning, and MCNet [56] for video future prediction. As one of the fundamental vision tasks, MOT still does not work in a simple elegant method and the drawbacks of TBD mentioned above require assistance of some other techniques like Re-ID [3, 41]. It is natural to ask a question: Can we solve the multi-object tracking in a neat one-step framework? In this way, MOT can be solved as a stand-alone task, without restrictions from detection models. We answer it in the affirmative and for the first time, we demonstrate that the much simpler one-step tracker even achieves better performance than the TBD-based counterparts. + +In this paper, we propose the TubeTK which conducts the MOT task by regressing the bounding-tubes (Btubes) in a 3D manner. Different from 3D point-cloud [64], this 3D means 2D spatial and 1D temporal dimensions. As shown in Fig. 1, a Btube is defined by 15 points in space-time compared to the traditional 2D box of 4 points. Besides the spatial location of targets, it also captures the temporal position. More importantly, the Btube encodes targets' motion trail as well, which is exactly what MOT needs. Thus, Btubes can well handle spatial-temporal information integrally and largely bridge the gap between detection and tracking. + +To predict the Btube that captures spatial-temporal information, we employ a 3D CNN framework. By treating a video as 3D data instead of a group of 2D image frames, it can extract spatial-temporal features simultaneously. This is a more powerful and fully automatic method to extract tracking features, where the handcrafted features such as optical flow [52], segmentation [57, 15, 62], human pose [17, 16, 58] or targets interactions [50, 37, 14, 46] are not needed. The network structure is inspired by recent advances of one-stage anchor-free detectors [55, 11] where the FPN [38] is adopted to better track targets of different scales and the regression head directly generates Btubes. After that, simple IoU-based post-processing is applied to link Btubes and form final tracks. The whole pipeline is made up of fully convolutional networks and we show the potential of this compact model to be a new tracking paradigm. + +The proposed TubeTK enjoys the following advantages: + +1. With TubeTK, MOT now can be solved by a simple one-step training method as other video tasks. With- + +out constraint from detection models, assisting technologies, and handcrafted features, TubeTK is considerably simpler when being applied and it also enjoys great potential in future research. + +2. TubeTK adequately extracts spatial-temporal features simultaneously and these features capture information of motion tendencies. Thus, TubeTK is more robust when faced with occlusions. +3. Without bells and whistles, the end-to-end-trained TubeTK achieves better performances compared with TBD-based methods on MOT15, 16, and 17 dataset [34, 44]. And we show that the Btube-based tracks are smoother (fewer FN and IDS) than the ones based on pre-generated image-level bounding-boxes. + +# 2. Related Work + +Tracking-by-detection-based model Research based on the TBD framework often adopts detection results given by external object detectors [47, 40, 42] and focuses on the tracking part to associate the detection boxes across frames. Many associating methods have been utilized on tracking models. In [2, 29, 66, 45, 35], every detected bounding-box is treated as a node of graph, the associating task is equivalent to determining the edges where maximum flow [2, 61], or equivalently, minimum cost [45, 29, 66] are usually adopted as the principles. Recently, with the development of deep learning, appearance-based matching algorithms have been proposed [32, 50, 18]. By matching targets with similar appearances such as clothes and body types, models can associate them over long temporal distances. Re-ID techniques [33, 3, 54] are usually employed as an auxiliary in this matching framework. + +Bridging the gap between detection and tracking Performances of image-based object detectors are limited when facing dense crowds and serious occlusions. Thus, some works try to utilize extra information such as motion [50] or temporal features learned by the track step to aid detection. One simple direction is to add bounding-boxes generated by the tracking step into the detection step [41, 10], but this does not affect the original detection process. In [67], the tracking step can efficiently improve the performance of detection by controlling the NMS process. [20] proposes a unified CNN structure to jointly perform detection and tracking tasks. By sharing features and conducting multi-task learning, it can further reduce the isolation between the two steps. The authors of [59] propose a joint detection and embedding framework where the detection and associating steps share same features. Despite these works' effort to bridge the gap between detection and tracking, they still treat them as two separate tasks and can not well utilize spatial-temporal information. + +Tracking framework based on trajectories or tubes Tubes can successfully capture motion trails of targets, + +![](images/17e67b67d760c3b26a9020a7dddf9bc037616d58b2f7b2c3afd3cf18a6d75bc9.jpg) +Figure 2. Definition and generation of the Btube. a: A Btube can be seen as the combination of three bounding-boxes $B_{s}$ , $B_{m}$ , and $B_{e}$ from different video frames. A Btube has 15 degrees of freedom, which can be determined by the spatial locations of the three bounding-boxes $(4 \times 3$ degrees) and their temporal positions (3 degrees, $t_{s}$ , $t_{m}$ , and $t_{e}$ ). b: Btubes are generated from whole tracks. Left: For each bounding-box in a track, we treat it as the $B_{m}$ of one Btube then look forward and backward to find its $B_{e}$ and $B_{s}$ in the track. Right: A longer Btube can capture more temporal features but the IoU between it and the track is lower ( $\eta$ is the IoU threshold), which leads to bad moving trails as the second row shows. Overlaps between the Btubes are used for linking them. + +![](images/80a4ddc1aa770c79a543e7c172008aa2092042b40a14259c2975bb717442acb7.jpg) + +![](images/c7faefae6f55d2c210a36c40c9be16600fe8339a7d90e11c8638a661c211895e.jpg) + +which are important for tracking. There are previous works that adopt tubes to conduct MOT or video detection [51] tasks. In [31, 30], a tubelet proposal module combining detection results into tubes is adopted to solve the video detection task. And [70] employs a single-object tracking method to capture subjects' trajectories. Although these works propose and utilize the concept of tubes, they still utilize external detection results and form tubes at the second step, instead of directly regressing them. Thus they are still TBD methods and the problems stated above are not solved. + +# 3. The Proposed Tracking Model + +We propose a new one-step end-to-end training MOT paradigm, the TubeTK. Compared with the TBD framework, this paradigm can better model spatial-temporal features and alleviate problems led by dense crowds and occlusions. In this section, we will introduce the entire pipeline in the following arrangement: 1) We first define the Btube which is a 3D extension of Bbox and introduce its generation method in Sec. 3.1. 2) In Sec. 3.2, we introduce the deep network adopted to predict Btubes from input videos. 3) Next, we interpret the training method tailored for Btubes in Sec. 3.3. 4) Finally, we propose the parameter-free post-processing method to link the predicted Btubes in Sec. 3.4. + +# 3.1. From Bounding-Box to Bounding-Tube + +Traditional image-based bounding-box (Bbox) which serves as the smallest enclosing box of a target can only indicate its spatial position, while for MOT, the pattern of targets' temporal positions and moving directions is of equal importance. Thus, we go down to consider how can we extend the bounding-box to simultaneously represent the tem + +poral position and motion, with which, models can overcome occlusions shorter than the receptive field. + +Btube definition Adopting a 3D Bbox to point out an object across frames is the simplest extension method, but obviously, this 3D Bbox is too sparse to precisely represent the target's moving trajectory. Inspired by the tubelet in video detection task [31, 30], we design a simplified version, called bounding-tube (Btube), for the dimension of original tubelets is too large to directly regress. A Btube can be uniquely identified in space and time by 15 coordinate values and it is generated by a method similar to the linear spline interpolation which splits a whole track into several overlapping Btubes. + +As shown in Fig. 2 a, a Btube $T$ is a decahedron composed of 3 Bboxes in different video frames, namely $B_{s}$ , $B_{m}$ , and $B_{e}$ , which need 12 coordinate values to define. And 3 other values are used to point out their temporal positions. This setting allows the target to change its moving direction once in a short time. Moreover, its length-width ratio can change linearly, which makes the Btube more robust when facing pose and scale changes led by perspective. By interpolation between $(B_{s}, B_{m})$ and $(B_{m}, B_{e})$ , we can restore all the bounding-boxes $\{B_{s}, B_{s+1}, \dots, B_{m}, \dots, B_{e-1}, B_{e}\}$ that constitute the Btube. Note that $B_{m}$ does not have to be exactly at the midpoint of $B_{s}$ and $B_{e}$ . It may be closer to one of them. Btubes are designed to encode spatial and temporal information simultaneously. It can even reflect targets' moving trends which are important in MOT task. These specialties make Btubes contain much more useful semantics than traditional Bboxes. + +Generating Btubes from tracks Btubes can only capture simple linear trajectories, thus we need to disassemble com + +![](images/434a698dc07d0820e8e486a2a46b35714d438b1a95d868f400906f84a21e8963.jpg) +Figure 3. The pipeline of our TubeTK. a: Given a video $V$ and the corresponding ground-truth tracks, we cut them into short clips in a sliding window manner to get inputs of the network. b: To model spatial-temporal information in video clips, we adopt 3D convolutional layers to build our network which consists of a backbone, an FPN, and a few multi-scale heads. Following FCOS [55], the multi-scale heads are responsible for targets with different scales respectively. The 3D network directly predicts Btubes. c: We link the predicted Btubes that have the same spatial positions and moving directions in the overlap part into whole tracks. d: In the training phase, the GT tracks are split into Btubes and then they are transformed into the same form of the network's output: target maps (see Fig. 4 for details). The target and predicted maps are fed into three loss functions to train the model: the Focal loss for classifying the foreground and background, BCE for giving out the center-ness, and GIoU loss for regressing Btubes. + +plex target's tracks into short clips, in which motions can approximately be seen as linear and captured by our Btubes. + +The disassembly process is shown in Fig. 2 b. We split a whole track into multiple overlapping Btubes by extending EVERY Bbox in it to a Btube. We treat each Bbox as the $B_{m}$ of one Btube then look forward and backward in the track to find its corresponding $B_{e}$ and $B_{s}$ . We can extend Bboxes to longer Btubes for capturing more temporal information, but long Btubes generated by linear interpolation cannot well represent the complex moving trail (see Fig. 2). To balance this trade-off, we set each Btube to be the longest one which satisfies that the mean IoU between its interpolated bounding-boxes $B$ and the ground-truth bounding-boxes $B^{\star}$ is no less than the threshold $\eta$ : + +$$ +\max e - s +$$ + +$$ +\text {s . t .} \quad \operatorname {m e a n} \left(\left\{\operatorname {I o U} \left(B _ {i}, B _ {i} ^ {\star}\right) \right\}\right) \geq \eta \tag {1} +$$ + +$$ +i \in \{s, s + 1, \dots , m, \dots , e \} +$$ + +This principle allows to dynamically generate Btubes with different lengths. When the moving trajectory is monotonous, the Btubes will be longer to capture more temporal information. While when the motion varies sharply, it will generate shorter Btubes to better fit the trail. + +Overcoming the occlusion Btubes guide models to capture moving trends. Thus, when facing occlusions, these trends will assist in predicting the position of shortly invisible targets. Moreover, this specialty can reduce the ID + +switches at the crossover point of two tracks because two crossing tracks trend to have different moving directions. + +# 3.2. Model Structure + +With Btubes that encode the spatial-temporal position, we can handle the MOT task in one step learning without the help of external object detectors or handcrafted matching features. To fit Btubes, we adopt the 3D convolutional structure [28] to capture spatial-temporal features, which is widely used in the video action recognition task [6, 24, 19]. The whole pipeline is shown in Fig. 3. + +Network structure The network consists of a backbone, an FPN [38], and a few multi-scale task heads. + +Given a video $V\in \mathbb{R}^{T,H,W,C}$ to track, where $T$ , $H$ , $W$ and $C = 3$ are frame number, height, width, and input channel respectively, we split it into short clips $I_{t}$ as inputs. $I_{t}$ starts from frame $t$ and its length is $l$ . As Btubes are usually short, the split clips can provide enough temporal information and reduce the computational complexity. Moreover, by adopting a sliding window scheme, the model can work in an online manner. The 3D-ResNet [25, 26] is applied as the backbone to extract the basic spatial-temporal feature groups $\{G^i\}$ with multiple scales. $i$ denotes the level of the features which are generated by stage $i$ of 3D-ResNet. Like the RetinaNet [39] and FCOS [55], a 3D version FPN in which the 2D-CNN layers are simply replaced by 3D-CNNs [28] then takes $\{G^i\}$ as input and outputs multi + +![](images/85eff274c8a6148c7a4ad781afdefa92902e5ae58ae5ad7138f20c4db762fb56.jpg) +$\rightarrow$ Regress values for $B_{s}$ $\rightarrow$ Regress values for $B_{e}$ + +![](images/4379655e19190409477c6f54df8a9ed776eacc79a96ed6ff90417f25b4a8fe43.jpg) + +Figure 4. Regression method and the matchup between output maps and GT Btubes. a: The model is required to regress the relative temporal and spatial position to focus on moving patterns. b: Each Btube can be regressed by several points in the output map. The colored points on the black map are inside the Btube's $B_{m}$ , so they are responsible for this Btube. Even through on the grey maps, there are some points also inside the Btube, they do not predict it because they are not on its $B_{m}$ . +![](images/1a089d3a1879dd90e8201f9050f9cb68fe5496a0415ef0625ee8258dbdaa20af.jpg) +$\longrightarrow$ Regress values for $B_{m}$ $\longrightarrow$ Tube length values +a Output of the network representing the Btube +b Only the colored points regress that Btube + +scale feature map groups $\{F^i\}$ . This multi-scale setting can better capture targets with different scales. For each $F^i$ , there is a task head composed of several CNN layers to output regressed Btubes and confidence scores. This fully 3D network processes temporal-spatial information simultaneously, making it possible to extract more efficient features. + +Outputs Each task head generates three output maps: the confidence map, regression map, and center-ness map following FCOS [55]. The center-ness map is utilized as a weight mask applied on the confidence map in order to reduce confidence scores of off-center boxes. The sizes of these three maps are the same. Each point $p$ in the map can be mapped back to the original input image. If the corresponding point of $p$ in the original input image is inside the $B_{m}$ of one Btube, then $p$ will regress its position (see Fig. 4). With $p$ the Btube position $\mathbf{r}$ can be regressed by 14 values: four for $B_{m} \{l_{m}, t_{m}, r_{m}, b_{m}\}$ , four for $B_{s} \{l_{s}, t_{s}, r_{s}, b_{s}\}$ , four for $B_{e} \{l_{e}, t_{e}, r_{e}, b_{e}\}$ , and two for the tube length $\{d_{s}, d_{e}\}$ . Their definitions are shown in Fig. 4. We utilize relative distances with respect to $B_{m}$ , instead of absolute ones, to regress Btubes aiming to make the model focus on moving trails. The center-ness $\mathbf{c}$ which servers as the weighting coefficient of confidence score $s$ is defined as: + +$$ +\mathbf {c} = \sqrt {\frac {\operatorname* {m i n} l _ {m} , r _ {m}}{\operatorname* {m a x} l _ {m} , r _ {m}} \times \frac {\operatorname* {m i n} t _ {m} , b _ {m}}{\operatorname* {m a x} t _ {m} , b _ {m}} \times \frac {\operatorname* {m i n} d _ {s} , d _ {e}}{\operatorname* {m a x} d _ {s} , d _ {e}}} \tag {2} +$$ + +Although $\mathbf{c}$ can be calculated directly from the predicted $\mathbf{r}$ , we adopt a head to regress it, and $\mathbf{c}^{\star}$ calculated based on GT $\mathbf{r}^{\star}$ by Eq. 2 is utilized as the ground-truth to train the head. + +Following the FCOS [55], different task heads are responsible for detecting objects within a range of different sizes respectively, which can largely alleviate the ambiguity caused by one point $p$ falling into multiple Btubes' $B_{m}$ . + +# 3.3. Training Method + +Tube GIoU IoU is the most popular indicator to evaluate the quality of the predicted Bbox, and it is usually used as + +![](images/ea21e10a3fd0fd9a1f5acae8035d8bd2504bc0b5ab1059fafabfdcbd50ebd986.jpg) +$T^{(2)}(T)$ +T(1) (T*) +Aligned $B_{s}$ or $B_{e}$ + +![](images/05d4df5960887cc3b7a06822eae2c17c493c808ea0b12e920e26a6c1a970726b.jpg) + +![](images/fdaec640070641b928917451a4bee68725898148bfb28cf2d2dbbb2b5f57afd3.jpg) +n + +![](images/87bb90e118d5c7a81076c8affa45682c089cab1f224845a8da76832ce091040c.jpg) +$\mathrm{D}_{T^{(1)},T^{(2)}}$ +Figure 5. Visualization of the calculation process of Tube GIoU. The intersection and $D_{T,T^*}$ of targets are also decahedrons, thus the volume of them can be calculated in the same way of Btubes. + +the loss function. GIoU [49] loss is an extension of IoU loss which solves the problem that there is no supervisory information when the predicted Bbox has no intersection with the ground truth. GIoU of Bbox is defined as: + +$$ +\operatorname {G I o U} (B, B ^ {\star}) = \operatorname {I o U} (B, B ^ {\star}) - \frac {\left| D _ {B , B ^ {\star}} \backslash \left(B \cup B ^ {\star}\right) \right|}{\left| D _ {B , B ^ {\star}} \right|} \tag {3} +$$ + +where $D_{B,B^{\star}}$ is the smallest enclosing convex object of $B$ and $B^{\star}$ . We extend the definition of GIoU to make it compatible with Btubes. According to our regression method, $B_{m}$ and $B_{m}^{\star}$ must be on the same video frame, which makes the calculation of BTube's volume, intersection $\bigcap$ and smallest tube enclosing object $D_{T,T^{\star}}$ straightforward. As shown in Fig. 5, we can treat each Btube as two square frustums sharing the same underside. Because $B_{m}$ and $B_{m}^{\star}$ are on the same video frame, $\bigcap$ and $D_{T,T^{\star}}$ are also composed of two adjoining square frustums whose volumes are easy to calculate (Detail algorithm is shown in supplementary files). Tube GIoU and Tube IoU are the volume extended version of the original area ones. + +Loss function For each point $p$ in map $M$ , we denote its confidence score, regression result, and center-ness as $\mathbf{s}_p$ , $\mathbf{r}_p$ , and $\mathbf{c}_p$ . The training loss function can be formulated as: + +$$ +\begin{array}{l} L (\{\mathbf {s} _ {p} \}, \{\mathbf {r} _ {p} \}, \{\mathbf {c} _ {p} \}) = \frac {1}{N _ {p o s}} \sum_ {p \in M} L _ {c l s} (\mathbf {s} _ {p}, \mathbf {s} _ {p} ^ {\star}) \\ + \frac {\lambda}{N _ {p o s}} \sum_ {p \in M} L _ {r e g} \left(\mathbf {r} _ {p}, \mathbf {r} _ {p} ^ {\star}\right) \tag {4} \\ + \frac {\alpha}{N _ {p o s}} \sum_ {p \in M} L _ {c e n t} (\mathbf {c} _ {p}, \mathbf {c} _ {p} ^ {\star}) \\ \end{array} +$$ + +where $\star$ denotes the corresponding ground truth. $N_{pos}$ denotes the number of positive foreground samples. $\lambda$ and $\alpha$ are the weight coefficients which are assigned as 1 in the experiments. $L_{cls}$ is the focal loss proposed in [39], $L_{cent}$ is the binary cross-entropy loss, and $L_{reg}$ is the Tube GIoU loss which can be formulated as: + +$$ +L _ {r e g} \left(\mathbf {r} _ {p}, \mathbf {r} _ {p} ^ {\star}\right) = \mathbb {I} _ {\left\{\mathbf {s} _ {p} ^ {*} = 1 \right\}} \left(1 - \operatorname {T G I o U} \left(\mathbf {r} _ {p}, \mathbf {r} _ {p} ^ {\star}\right)\right) \tag {5} +$$ + +where $\mathbb{I}_{\{\mathbf{s}_p^\star = 1\}}$ is the indicator function, being 1 if $\mathbf{s}_p^\star = 1$ and 0 otherwise. TGIoU is the Tube GIoU. + +# 3.4. Linking the Bounding-Tubes + +After getting predicted Btubes, we only need an IoU-based method without any trainable parameters to link them into whole tracks. + +Tube NMS Before the linking principles, we will first introduce the NMS method tailored for Btubes. As Btubes are in 3D space, if we conduct a pure 3D NMS, the huge number of them will lead to large computational overhead. Thus, we simplify the 3D NMS into a modified 2D version. The NMS operation is only conducted among the Btubes whose $B_{m}$ is on the same video frame. Traditional NMS eliminates targets that have large IoU. However, this method will break at least one track when two or more tracks intersect. Due to the temporal information encoded in Btubes, we can utilize $B_{s}$ and $B_{e}$ to perceive the moving direction of targets. Often the directions of intersecting tracks are different, thus the IoU of their $B_{s}, B_{m}$ , and $B_{e}$ will not all be large. In the original NMS algorithm, it will suppress one of two Btubes with IoU larger than the threshold $\gamma$ , while in the Tube NMS, we set two thresholds $\gamma_{1}$ and $\gamma_{2}$ , and for two Btubes $T^{(1)}$ and $T^{(2)}$ , suppression is conduct when $\mathrm{IoU}(B_m^{(1)}, B_m^{(2)}) > \gamma_1$ & $\mathrm{IoU}(B_{s'}^{(1)}, B_{s'}^{(2)}) > \gamma_2$ & $\mathrm{IoU}(B_{e'}^{(1)}, B_{e'}^{(2)}) > \gamma_2$ , where $s' = \max(s^{(1)}, s^{(2)})$ , $e' = \min(e^{(1)}, e^{(2)})$ and $B_{s'}$ is generated by interpolation. + +Linking principles After the Tube NMS pre-processing, we need to link all the rest Btubes into whole tracks. The linking method is pretty simple which is only an IoU-based greedy algorithm without any learnable parameters or assisting techniques like appearance matching or Re-ID. + +Due to the overlap of Btubes in the temporal dimension, we can focus on it to calculate the frame-based IoU for linking. Given a track $K_{(s_1,e_1)}$ starting from frame $s_1$ and ending at frame $e_1$ , and a Btube $T_{(s_2,e_2)}$ , we first find the overlap part: $O_{(s_3,e_3)}$ where $s_3 = \max(s_1,s_2)$ and $e_3 = \min(e_1,e_2)$ . If $s_3 > e_3$ , $K$ and $T$ have no overlap and do not need to link. When they are overlapping, we calculate the matching score $\mathcal{M}$ as: + +$$ +\mathcal {M} (K, T) = \left[ \sum_ {f \in O} \operatorname {I o U} \left(K _ {f}, T _ {f}\right) \right] / | O | \tag {6} +$$ + +where $K_{f}$ and $T_{f}$ denote the (interpolated) bounding-boxes at frame $f$ in $K$ and $T$ . $|O|$ is the number of frames in $O$ . If $\mathcal{M}$ is larger than the linking threshold $\beta$ , we link them by adding the interpolated bounding-boxes of $T$ onto $K$ . It should be noted that in the overlap part, we average the bounding-boxes from $T$ and $K$ to reduce the deviation caused by the linear interpolation. The linking function can be formulated as: + +$$ +\begin{array}{l} K ^ {n e w} = \operatorname {L i n k} \left(K _ {\left(s _ {1}, e _ {1}\right)}, T _ {\left(s _ {2}, e _ {2}\right)}\right) \\ = K _ {\left(s _ {1}, s _ {3}\right)} + \operatorname {A v g} \left(K _ {\left(s _ {3}, e _ {3}\right)}, T _ {\left(s _ {3}, e _ {3}\right)}\right) + T _ {\left(e _ {3}, e _ {2}\right)} \\ \end{array} +$$ + +where we assume that $e_1 < e_2$ , and $+$ denotes jointing two Btubes (or tracks) without overlap. + +To avoid ID switch at intersection of two tracks, we also take moving directions into account. The moving direction vector (MDV) of a Btube (or track) starts from the center of its $B_{s}$ and ends at $B_{e}$ 's center. We hope the track and Btube with similar directions can be more likely to link. Thus, we compute the angle $\theta$ between the MDV of $T_{(s_3,e_3)}$ and $K_{(s_3,e_3)}$ and take $\cos \theta$ as a weighted coefficient masked on $\mathcal{M}$ to adjust the matching score. The final matching score utilized to link is $\mathcal{M}' = \mathcal{M}*(1 + \phi*\cos \theta)$ , where $\phi > 0$ is a hyper-parameter. If the direction vectors of the track and Btube form an acute angle, $\cos \theta > 0$ and their matching score $\mathcal{M}'$ will be enlarged, otherwise reduced. + +The overall linking method is an online greedy algorithm, which is shown in Alg. 1. + +# Algorithm 1 Greedy Linking Algorithm + +Input: Predicted Btubes $\{T_i | i \in \{1, 2, \dots, N_T\}\}$ +Output: Final tracks $\{K_i|i\in \{1,2,\dots,N_K\} \}$ +1: Grouping $\{T_i\}$ to $\{H_1, H_2, \dots, H_L\}$ , where $L$ is the total length of the video and $H_t = \{T_i^{H_t} | B_m \text{ of } T_i^{H_t} \text{ is at frame } t \& i \in \{1, 2, \dots, N_T\}\}$ . +2: Utilizing $H_{1}$ to initialize $\{K_{i}\}$ . +3: for $t = 2$ ; $t \leq L$ ; $t + +$ do +4: Calculating $M'$ between $\{K_i\}$ and $H_t$ to form the matching score matrix $S$ , where $S_{i,j} = \mathcal{M}'(K_i, T_j^{H_t})$ +5: Linking the track-tube pairs starting from the largest $S_{i,j}$ in $S$ by Eq. 7 until all the rest $S_{i,j} < \beta$ . Each linking operation will update $\{K_i\}$ . +6: The remaining Btubes after linking are added to $\{K_i\}$ as new tracks. +7: end for + +# 4. Experiments + +Datasets and evaluation metrics We evaluate our TubeTK model on three MOT Benchmarks [44, 34], namely 2D-MOT2015 (MOT15), MOT16, and MOT17. These benchmarks consist of videos with many occlusions, which makes them really challenging. They are widely used in the field of multi-object tracking and can objectively evaluate models' performances. MOT15 contains 11 train and 11 test videos, while MOT16 and MOT17 contain the same videos, including 7 train and 7 test videos. These three benchmarks provide public detection results (detected by DPM [21], Faster R-CNN [48], and SDP [63]) for fair comparison among TBD frameworks. However, because our TubeTK conducts MOT in one-step, we do not adopt any external detection results. Without detection results generated by sophisticated detection models trained on large datasets, we need more videos to train the 3D network. Thus, we adopt a synthetic dataset JTA [12] which is directly generated from the video game Grand Theft Auto V developed by Rockstar North. There are 256 video sequences in JTA, enough to pre-train our 3D network. Following the MOT Challenge [44], we adopt the CLEAR MOT metrics [4], and other measures proposed in [60]. + +![](images/7749ba45294d6c4d5f2ea11cd23e85f56b11a5d85a92cb296c60e67e731968d4.jpg) + +![](images/49d4e31acad7fba2d8b4b5a7fcfb26d3bd0000476899c971f331781c8ebb67ed.jpg) +Figure 6. Analysis of the performances in occlusion situations. The examples (from test set of MOT16) in the top row show that our TubeTK can effectively reduce the ID switches and false negatives caused by the occlusion. The bottom analysis is conducted on the training set of MOT-16 dataset. We first illustrate the tracked ratio with respect to visibility. The results reveal that our TubeTK performs much better on highly occluded targets than other models. Then, we illustrate the values of IDS/IDR, the conclusion still holds. + +![](images/3dfc07a3cc3a21f99b24b664f9919e3034e4bdbd1113a1fa504bc6dd1c5bc713.jpg) + +Implementation The hyper-parameters we adopt in the experiments are shown in the following table. + +
ηlimg sizeβφγ1γ2
0.88896×11520.40.20.50.4
+ +For each clip $I_{t}$ we randomly sample a spatial crop from it or its horizontal flip, with the per-pixel mean subtracted. HSL jitter is adopted as color augmentation. The details of the network structure follow FCOS [55] (see supplementary file for detail). We only replace the 2D CNN layers with the 3D version and modify the last layer in the task head to output tracking results. We initialize the weights as [55] and train them on JTA from scratch. We utilize SGD with a mini-batch size of 32. The learning rate starts from $10^{-3}$ and is divided by 5 when error plateaus. TubeTK is trained for 150K iterations on JTA and 25K on benchmarks. The weight decay and momentum factors are $10^{-5}$ and 0.9. + +Ablation study The ablation study is conducted on MOT17 training set (without pre-training on JTA). Tab. 1 demonstrates the great potential of the proposed model. We find that shorter clips ( $l = 4$ ) encoding less temporal information lead to bad performance, which reveals that extending the bounding-box to Btube is effective. Moreover, if we fix the length of all the Btubes to 8 (the length of input clips), the performance drops significantly. Fixing length makes the Btubes deviate from the ground-truth trajectory, leading to much more FNs. This demonstrates that setting the length of Btubes dynamically can better capture the moving trails. The other comparisons show the importance of the Tube GIoU loss and Tube NMS. The Original NMS + +Table 1. Ablation study on the training set of MOT17. D&T and Tracktor adopt public detections generated by Faster R-CNN [23]. POI adopts private detection results and is tested on MOT16. + +
ModelMOTA↑IDF1↑MT↑ML↓FP↓FN↓IDS↓
D&T [20]50.124.923.127.13561524812715
Tracktor++[3]61.964.735.321.432342454326
POI [65]65.2-37.314.7349734241716
TubeTK shorter clips60.360.744.325.5344640139968
TubeTK fixed tube len74.368.562.58.67468194521184
TubeTK IoU Loss70.563.767.86.413247181481734
TubeTK original NMS75.370.184.66.211256134212995
TubeTK76.970.084.73.111541118012687
+ +kills many highly occluded Btubes, causing more FN and IDS, and Tube GIoU loss guides the model to regress the Btube's length more accurately than Tube IoU loss (less FN and FP). TubeTK has much more IDS than Tracktor [3] because our FN is much lower and more tracked results potentially lead to more IDS. From IDF1 we can tell that TubeTK tracks better. Note that we refrain from a cross-validation following [3] as our TubeTK is trained on local clips and never accesses to the tracking ground truth data. + +Benchmark evaluation Tab. 2 presents the results of our TubeTK and other state-of-the-art (SOTA) models which adopt public or private external detection results (detailed results are shown in supplementary files). We only compare with the officially published and peer-reviewed online models in the MOT Challenge benchmark*. As we show, although TubeTK does not adopt any external detection results, it achieves new SOTA results on MOT17 (3.0 MOTA + +Table 2. Results of the online state-of-the-art models on MOT15, 16, 17 datasets. "Detr" denotes the source of the detection results. Our model does not adopt external detection results (w/o). RAN and CNNMTT utilize the ones provided by POI [65]. + +
ModelDetrMOTA↑IDF1↑MT↑ML↓FP↓FN↓IDS↓
Oursw/o63.058.631.219.9270601774834137
SCNetPriv60.054.434.416.2722301458517611
LSST17 [22]Pub54.762.320.440.1260912284341243
Tracktor [3]Pub53.552.319.536.3122012480472072
JBNOT [27]Pub52.650.819.735.8315722326593050
FAMNet [9]Pub52.048.719.133.4141382536163072
OursPOI66.962.239.016.111544475021236
Oursw/o64.059.433.519.410962536261117
POI [65]POI66.165.134.020.8506155914805
CNNMTT [43]POI65.262.232.421.3657855896946
TAP [69]Priv64.873.538.521.61298050635571
RAN [18]POI63.063.839.922.11366353248482
SORT [5]Priv59.853.825.422.78698632451423
Tracktor [3]Pub54.552.519.036.9328079149682
Oursw/o58.453.139.318.0575618961854
RAN [18]POI56.561.345.114.6938616921428
NOMT [8]Priv55.559.139.025.8559421322427
APRCNN [7]Priv53.052.229.120.2515922984708
CDADDAL [1]Priv51.354.136.322.2711022271544
Tracktor [3]Pub44.146.718.026.26477265771318
+ +improvements) and MOT15 (1.9 MOTA improvements). On MOT16, it achieves much better performance than other SOTAs that rely on publicly available detections (64.0 vs. 54.5). Moreover, TubeTK performs competitively with the SOTA models adopting POI [65] detection bounding-boxes and appearance features $(\mathrm{POI - D - F})^{\dagger}$ on MOT16. It should be noted that the authors of POI-D-F utilize 2 extra tracking datasets, many self-collected surveillance data $(10\times$ frames than MOT16) to train the Faster-RCNN detector, and 4 extra Re-ID datasets to extract the appearance features. Thus, we cannot get the same generalization ability as the POI-D-F with synthetic JTA data. To demonstrate the potential of TubeTK, we also provide the results adopting the POI detection (without the appearance features, details in supplementary files) and in this setting our TubeTK achieves the new state-of-the-art on MOT16 (66.9 vs. 66.1). On these three benchmarks, due to the great resistibility to occlusions, our model has fewer FN, under the condition that the number of FP is relatively acceptable. Although TubeTK can handle occlusions better, its IDS is relatively higher because we do not adopt feature matching mechanisms to maintain global consistency. The situation of IDS in occlusion parts is further discussed in Sec. 5. + +# 5. Discussion + +Overcoming the occlusion With Btubes, our model can learn and encode the moving trend of targets, leading to more robust performances when facing severe occlusions. We show the qualitative and quantitative analysis in Fig. 6. + +Table 3. Experiments on linking robustness. We only test on the GT tracks of a single video MOT17-02. "cn" and "sn" denote the center position and bounding-box scale noises. In each grid, the values are "MOTA" "IDF1", "MT", and "ML" in order. + +
cn\sn0.000.050.100.150.200.25
0.0097.291.595.291.395.091.294.391.493.691.492.486.2
590580580580540531
0.0596.191.595.290.895.191.595.991.394.991.996.589.6
580570580580580590
0.1594.289.194.491.895.189.496.391.394.387.494.091.3
560542561561560550
0.2591.684.791.181.992.883.187.882.888.583.486.479.9
542552543542532542
+ +Form the top part of Fig. 6, we show that TubeTK can keep tracking with much less FN or IDS when the target is totally shielded by other targets. In the bottom part, we provide the tracked ratio and number of IDS (regularized by ID recall) with respect to targets' visibility on the training set of MOT16. When the visibility is low, TubeTK performs much better than other TBD models. + +Robustness of Btubes for linking The final linking process has no learnable parameters, thus the linking performances depend heavily on the accuracy of regressed Btubes. To verify the robustness, we perform the linking algorithm on GT Btubes with noise jitter. The jitter is conducted on Btubes' center position and spatial-temporal scale. 0.25 jitter on center position or scale means the position or scale shift up to $25\%$ of the Btube's size. The results on MOT17-02, a video with many crossovers, are shown in Tab. 3. We can find that even with large jitter up to $25\%$ , the linking results are still great enough (MOTA $>86$ , IDF $>79$ ), which reveals that the linking algorithm is robust and does not need rigorously accurate Btubes to finish the tracking. + +# 6. Conclusion + +In this paper, we proposed an end-to-end one-step training model TubeTK for MOT task. It utilizes Btubes to encode target's temporal-spatial position and local moving trail. This makes the model independent of external detection results and has enormous potential to overcome occlusions. We conducted extensive experiments to evaluate the proposed model. On the mainstream benchmarks, our model achieves the new state-of-the-art performances compared with other online models, even if they adopt private detection results. Comprehensive analyses were presented to further validate the robustness of TubeTK. + +# 7. Acknowledgements + +This work is supported in part by the National Key R&D Program of China, No. 2017YFA0700800, National Natural Science Foundation of China under Grants 61772332 and Shanghai Qi Zhi Institute. + +# References + +[1] Seung-Hwan Bae and Kuk-Jin Yoon. Confidence-based data association and discriminative deep appearance learning for robust online multi-object tracking. TPAMI, 40(3):595-610, 2017. 1, 8 +[2] Jerome Berclaz, Francois Fleuret, Engin Turetken, and Pascal Fua. Multiple object tracking using k-shortest paths optimization. TPAMI, 33(9):1806-1819, 2011. 2 +[3] Philipp Bergmann, Tim Meinhardt, and Laura Leal-Taixe. Tracking without bells and whistles. arXiv preprint arXiv:1903.05625, 2019. 1, 2, 7, 8 +[4] Keni Bernstein and Rainer Stiefelhagen. Evaluating multiple object tracking performance: the clear mot metrics. Journal on Image and Video Processing, 2008:1, 2008. 6 +[5] Alex Bewley, Zongyuan Ge, Lionel Ott, Fabio Ramos, and Ben Upcroft. Simple online and realtime tracking. In ICIP, pages 3464-3468. IEEE, 2016. 8 +[6] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In CVPR, pages 6299-6308, 2017. 2, 4 +[7] Long Chen, Haizhou Ai, Chong Shang, Zijie Zhuang, and Bo Bai. Online multi-object tracking with convolutional neural networks. In ICIP, pages 645-649. IEEE, 2017. 8 +[8] Wongun Choi. Near-online multi-target tracking with aggregated local flow descriptor. In ICCV, pages 3029-3037, 2015. 8 +[9] Peng Chu and Haibin Ling. Famnet: Joint learning of feature, affinity and multi-dimensional assignment for online multiple object tracking. arXiv preprint arXiv:1904.04989, 2019. 1, 2, 8 +[10] Qi Chu, Wanli Ouyang, Hongsheng Li, Xiaogang Wang, Bin Liu, and Nenghai Yu. Online multi-object tracking using cnn-based single object tracker with spatial-temporal attention mechanism. In ICCV, pages 4836-4845, 2017. 2 +[11] Kaiwen Duan, Song Bai, Lingxi Xie, Honggang Qi, Qingming Huang, and Qi Tian. Centernet: Object detection with keypoint triplets. arXiv preprint arXiv:1904.08189, 2019. 2 +[12] Matteo Fabbri, Fabio Lanzi, Simone Calderara, Andrea Palazzi, Roberto Vezzani, and Rita Cucchiara. Learning to detect and track visible and occluded body joints in a virtual world. In ECCV, 2018. 6 +[13] Loïc Fagot-Bouquet, Romaric Audigier, Yoann Dhome, and Frédéric Lerasle. Improving multi-frame data association with sparse representations for robust near-online multi-object tracking. In ECCV, pages 774-790. Springer, 2016. 1 +[14] Hao-Shu Fang, Jinkun Cao, Yu-Wing Tai, and Cewu Lu. Pairwise body-part attention for recognizing human-object interactions. In Proceedings of the European Conference on Computer Vision (ECCV), pages 51-67, 2018. 2 +[15] Hao-Shu Fang, Jianhua Sun, Runzhong Wang, Minghao Gou, Yong-Lu Li, and Cewu Lu. Instaboost: Boosting instance segmentation via probability map guided copy-pasting. In ICCV, pages 682-691, 2019. 2 +[16] Hao-Shu Fang, Shuqin Xie, Yu-Wing Tai, and Cewu Lu. Rumpe: Regional multi-person pose estimation. In Proceed- + +ings of the IEEE International Conference on Computer Vision, pages 2334-2343, 2017. 2 +[17] Hao-Shu Fang, Yuanlu Xu, Wenguan Wang, Xiaobai Liu, and Song-Chun Zhu. Learning pose grammar to encode human body configuration for 3d pose estimation. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 2 +[18] Kuan Fang, Yu Xiang, Xiaocheng Li, and Silvio Savarese. Recurrent autoregressive networks for online multi-object tracking. In IEEE Winter Conference on Applications of Computer Vision, pages 466-475. IEEE, 2018. 1, 2, 8 +[19] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition. arXiv preprint arXiv:1812.03982, 2018. 4 +[20] Christoph Feichtenhofer, Axel Pinz, and Andrew Zisserman. Detect to track and track to detect. In ICCV, 2017. 1, 2, 7 +[21] Pedro F Felzenszwalb, Ross B Girshick, David McAllester, and Deva Ramanan. Object detection with discriminatively trained part-based models. TPAMI, 32(9):1627-1645, 2009. 6 +[22] Weitao Feng, Zhihao Hu, Wei Wu, Junjie Yan, and Wanli Ouyang. Multi-object tracking with multiple cues and switcher-aware classification. arXiv preprint arXiv:1901.06129, 2019. 8 +[23] Ross Girshick. Fast r-cnn. In ICCV, pages 1440-1448, 2015. 7 +[24] Kensho Hara, Hirokatsu Kataoka, and Yutaka Satoh. Learning spatio-temporal features with 3d residual networks for action recognition. In ICCV, pages 3154-3160, 2017. 4 +[25] Kensho Hara, Hirokatsu Kataoka, and Yutaka Satoh. Can spatiotemporal 3d cnns retrace the history of 2d cnns and imagenet? In CVPR, pages 6546-6555, 2018. 4 +[26] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 4 +[27] Roberto Henschel, Yunzhe Zou, and Bodo Rosenhahn. Multiple people tracking using body and joint detections. In CVPRW, pages 0–0, 2019. 8 +[28] Shuiwang Ji, Wei Xu, Ming Yang, and Kai Yu. 3d convolutional neural networks for human action recognition. TPAMI, 35(1):221-231, 2012. 4 +[29] Hao Jiang, Sidney Fels, and James J Little. A linear programming approach for multiple object tracking. In CVPR, pages 1-8. IEEE, 2007. 2 +[30] Kai Kang, Hongsheng Li, Junjie Yan, Xingyu Zeng, Bin Yang, Tong Xiao, Cong Zhang, Zhe Wang, Ruohui Wang, Xiaogang Wang, et al. T-cnn: Tubelets with convolutional neural networks for object detection from videos. IEEE Transactions on Circuits and Systems for Video Technology, 28(10):2896-2907, 2017. 3 +[31] Kai Kang, Wanli Ouyang, Hongsheng Li, and Xiaogang Wang. Object detection from video tubelets with convolutional neural networks. In CVPR, pages 817-825, 2016. 3 +[32] Chanho Kim, Fuxin Li, Arridhana Ciptadi, and James M Rehg. Multiple hypothesis tracking revisited. In CVPR, pages 4696-4704, 2015. 2 +[33] Cheng-Hao Kuo and Ram Nevatia. How does person identity recognition help multi-person tracking? In CVPR, pages 1217-1224. IEEE, 2011. 2 + +[34] Laura Leal-Taixe, Anton Milan, Ian Reid, Stefan Roth, and Konrad Schindler. Motchallenge 2015: Towards a benchmark for multi-target tracking. arXiv preprint arXiv:1504.01942, 2015. 2, 6 +[35] Philip Lenz, Andreas Geiger, and Raquel Urtasun. Followme: Efficient online min-cost flow tracking with bounded memory and computation. In CVPR, pages 4364-4372, 2015. 2 +[36] Yong-Lu Li, Liang Xu, Xijie Huang, Xinpeng Liu, Ze Ma, Mingyang Chen, Shiyi Wang, Hao-Shu Fang, and Cewu Lu. Hake: Human activity knowledge engine. arXiv preprint arXiv:1904.06539, 2019. 2 +[37] Yong-Lu Li, Siyuan Zhou, Xijie Huang, Liang Xu, Ze Ma, Hao-Shu Fang, Yan-Feng Wang, and Cewu Lu. Transferable interactiveness prior for human-object interaction detection. CVPR, 2019. 2 +[38] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, pages 2117-2125, 2017. 2, 4 +[39] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In ICCV, pages 2980-2988, 2017. 4, 5 +[40] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In ECCV, pages 21-37. Springer, 2016. 2 +[41] Chen Long, Ai Haizhou, Zhuang Zijie, and Shang Chong. Real-time multiple people tracking with deeply learned candidate selection and person re-identification. In ICME, volume 5, page 8, 2018. 2 +[42] Cewu Lu, Hao Su, Yonglu Li, Yongyi Lu, Li Yi, Chi-Keung Tang, and Leonidas J Guibas. Beyond holistic object recognition: Enriching image understanding with part states. In CVPR, 2018. 2 +[43] Nima Mahmoudi, Seyed Mohammad Ahadi, and Mohammad Rahmati. Multi-target tracking using cnn-based features: Cnnmtt. Multimedia Tools and Applications, 78(6):7077-7096, 2019. 8 +[44] Anton Milan, Laura Leal-Taixe, Ian Reid, Stefan Roth, and Konrad Schindler. Mot16: A benchmark for multi-object tracking. arXiv preprint arXiv:1603.00831, 2016. 2, 6 +[45] Hamed Pirsiavash, Deva Ramanan, and Charless C Fowlkes. Globally-optimal greedy algorithms for tracking a variable number of objects. In CVPR, pages 1201-1208. IEEE, 2011. 2 +[46] Siyuan Qi, Wenguan Wang, Baoxiong Jia, Jianbing Shen, and Song-Chun Zhu. Learning human-object interactions by graph parsing neural networks. In ECCV, 2018. 2 +[47] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In CVPR, pages 779-788, 2016. 2 +[48] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NeurIPS, pages 91-99, 2015. 6 +[49] Hamid Rezatofighi, Nathan Tsoi, JunYoung Gwak, Amir Sadeghian, Ian Reid, and Silvio Savarese. Generalized in- + +intersection over union: A metric and a loss for bounding box regression. In CVPR, pages 658-666, 2019. 5 +[50] Amir Sadeghian, Alexandre Alahi, and Silvio Savarese. Tracking the untrackable: Learning to track multiple cues with long-term dependencies. In ICCV, pages 300-311, 2017. 2 +[51] Dian Shao, Yu Xiong, Yue Zhao, Qingqiu Huang, Yu Qiao, and Dahua Lin. Find and focus: Retrieve and localize video events with natural language queries. In ECCV, pages 200-216, 2018. 3 +[52] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In NeurIPS, pages 568-576, 2014. 2 +[53] ShiJie Sun, Naveed Akhtar, HuanSheng Song, Ajmal S Mian, and Mubarak Shah. Deep affinity network for multiple object tracking. TPAMI, 2019. 2 +[54] Siyu Tang, Mykhaylo Andriluka, Bjoern Andres, and Bernt Schiele. Multiple people tracking by lifted multicut and person re-identification. In CVPR, pages 3539–3548, 2017. 2 +[55] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. arXiv preprint arXiv:1904.01355, 2019. 2, 4, 5, 7 +[56] Ruben Villegas, Jimei Yang, Seunghoon Hong, Xunyu Lin, and Honglak Lee. Decomposing motion and content for natural video sequence prediction. *ICLR*, 2017. 2 +[57] Paul Voigtlaender, Michael Krause, Aljosa Osep, Jonathon Luiten, Berin Balachandar Gnana Sekar, Andreas Geiger, and Bastian Leibe. Mots: Multi-object tracking and segmentation. In CVPR, pages 7942-7951, 2019. 2 +[58] Wenguan Wang, Zhijie Zhang, Siyuan Qi, Jianbing Shen, Yanwei Pang, and Ling Shao. Learning compositional neural information fusion for human parsing. In ICCV, 2019. 2 +[59] Zhongdao Wang, Liang Zheng, Yixuan Liu, and Shengjin Wang. Towards real-time multi-object tracking. In arXiv preprint arXiv:1909.12605, 2019. 2 +[60] Bo Wu and Ram Nevatia. Tracking of multiple, partially occluded humans based on static body part detection. In CVPR, volume 1, pages 951-958. IEEE, 2006. 6 +[61] Yuliang Xiu, Jiefeng Li, Haoyu Wang, Yinghong Fang, and Cewu Lu. Pose Flow: Efficient online pose tracking. In BMVC, 2018. 2 +[62] Wenqiang Xu, Yonglu Li, and Cewu Lu. Srda: Generating instance segmentation annotation via scanning, reasoning and domain adaptation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 120-136, 2018. 2 +[63] Fan Yang, Wongun Choi, and Yuanqing Lin. Exploit all the layers: Fast and accurate cnn object detector with scale dependent pooling and cascaded rejection classifiers. In CVPR, pages 2129-2137, 2016. 6 +[64] Yang You, Yujing Lou, Qi Liu, Yu-Wing Tai, Weiming Wang, Lizhuang Ma, and Cewu Lu. Prin: Pointwise rotation-invariant network. arXiv preprint arXiv:1811.09361, 2018. 2 +[65] Fengwei Yu, Wenbo Li, Quanquan Li, Yu Liu, Xiaohua Shi, and Junjie Yan. Poi: Multiple object tracking with high performance detection and appearance feature. In ECCV, pages 36-42. Springer, 2016. 1, 7, 8 + +[66] Li Zhang, Yuan Li, and Ramakant Nevatia. Global data association for multi-object tracking using network flows. In CVPR, pages 1-8. IEEE, 2008. 2 +[67] Zheng Zhang, Dazhi Cheng, Xizhou Zhu, Stephen Lin, and Jifeng Dai. Integrated object detection and tracking with tracklet-conditioned detection. arXiv preprint arXiv:1811.11167, 2018. 1, 2 +[68] Bolei Zhou, Alex Andonian, Aude Oliva, and Antonio Torralba. Temporal relational reasoning in videos. In ECCV, pages 803-818, 2018. 2 +[69] Zongwei Zhou, Junliang Xing, Mengdan Zhang, and Weiming Hu. Online multi-target tracking with tensor-based high-order graph matching. In ICPR, pages 1809-1814. IEEE, 2018. 8 +[70] Ji Zhu, Hua Yang, Nian Liu, Minyoung Kim, Wenjun Zhang, and Ming-Hsuan Yang. Online multi-object tracking with dual matching attention networks. In ECCV, pages 366-382, 2018. 3 \ No newline at end of file diff --git a/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/images.zip b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d81cf5847a86bad5bf4bd49ab637938737f1288c --- /dev/null +++ b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9965e14292855d6ff87e4c721fab0384635ca9af8f5d6ce3f87b1030fbcd787 +size 657826 diff --git a/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/layout.json b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..77ea82df0c3c45482769aa128d6febe6a0667d22 --- /dev/null +++ b/tubetkadoptingtubestotrackmultiobjectinaonesteptrainingmodel/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58661724a72b5562a22b9eabfa8dfae3ef68f81ce6ae66be8535827550555921 +size 517730 diff --git a/twocausalprinciplesforimprovingvisualdialog/ddb51d8d-a42e-4edf-9522-4b9c5d1bfe8d_content_list.json b/twocausalprinciplesforimprovingvisualdialog/ddb51d8d-a42e-4edf-9522-4b9c5d1bfe8d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..abff061fbe2da95bff719d4629f87b890c38ee48 --- /dev/null +++ b/twocausalprinciplesforimprovingvisualdialog/ddb51d8d-a42e-4edf-9522-4b9c5d1bfe8d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd6b6cd6986f2ba2afe8403f1ddbb780c41a271e6b152b2c4899bbccb97ef03d +size 82206 diff --git a/twocausalprinciplesforimprovingvisualdialog/ddb51d8d-a42e-4edf-9522-4b9c5d1bfe8d_model.json b/twocausalprinciplesforimprovingvisualdialog/ddb51d8d-a42e-4edf-9522-4b9c5d1bfe8d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e42572680dc4f86dc115c127fd3ae84c37a6c1d9 --- /dev/null +++ b/twocausalprinciplesforimprovingvisualdialog/ddb51d8d-a42e-4edf-9522-4b9c5d1bfe8d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:972ba2fdfbc85937191e2d34375ea778ea3688c930905fdb254bcb2840fdc1bd +size 101103 diff --git a/twocausalprinciplesforimprovingvisualdialog/ddb51d8d-a42e-4edf-9522-4b9c5d1bfe8d_origin.pdf b/twocausalprinciplesforimprovingvisualdialog/ddb51d8d-a42e-4edf-9522-4b9c5d1bfe8d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bc96ca276e754eabd0eb59de96b595179f13f3e8 --- /dev/null +++ b/twocausalprinciplesforimprovingvisualdialog/ddb51d8d-a42e-4edf-9522-4b9c5d1bfe8d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:caf779bf0e743af0d47b261621a31e09763e15dcf49f65862c232b1751c18639 +size 448392 diff --git a/twocausalprinciplesforimprovingvisualdialog/full.md b/twocausalprinciplesforimprovingvisualdialog/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ebf1a88dcd75c360d3249e8511bc4207fe025a25 --- /dev/null +++ b/twocausalprinciplesforimprovingvisualdialog/full.md @@ -0,0 +1,336 @@ +# Two Causal Principles for Improving Visual Dialog + +Jiaxin Qi $^{1}$ Yulei Niu $^{2}$ Jianqiang Huang $^{1,3}$ Hanwang Zhang $^{1}$ + +$^{1}$ Nanyang Technological University, $^{2}$ Renmin University of China, $^{3}$ Damo Academy, Alibaba Group, + +jiaxin003@e.ntu.edu.sg, niu@ruc.edu.cn, jianqiang.jqh@gmail.com, hanwangzhang@ntu.edu.sg + +# Abstract + +This paper unravels the design tricks adopted by us - the champion team MReaL-BDAI - for Visual Dialog Challenge 2019: two causal principles for improving Visual Dialog (VisDial). By "improving", we mean that they can promote almost every existing VisDial model to the state-of-the-art performance on the leader-board. Such a major improvement is only due to our careful inspection on the causality behind the model and data, finding that the community has overlooked two causalities in VisDial. Intuitively, Principle 1 suggests: we should remove the direct input of the dialog history to the answer model, otherwise a harmful shortcut bias will be introduced; Principle 2 says: there is an unobserved confounder for history, question, and answer, leading to spurious correlations from training data. In particular, to remove the confounder suggested in Principle 2, we propose several causal intervention algorithms, which make the training fundamentally different from the traditional likelihood estimation. Note that the two principles are model-agnostic, so they are applicable in any VisDial model. The code is available at https://github.com/simpleshinobu/visdial-principles. + +# 1. Introduction + +Given an image $I$ , a dialog history of past Q&A pairs: $H = \{(Q_{1},A_{1}),\dots,(Q_{t - 1},A_{t - 1})\}$ , and the current $t$ -th round question $Q$ , a Visual Dialog (VisDial) agent [9] is expected to provide a good answer $A$ . Our community has always considered VQA [5] and VisDial as sister tasks due to their similar settings: Q&A grounded by $I$ (VQA) and Q&A grounded by $(I,H)$ (VisDial). Indeed, from a technical point view — just like the VQA models — a typical VisDial model first uses encoder to represent $I$ , $H$ , and $Q$ as vectors, and then feed them into decoder for answer $A$ . Thanks to the recent advances in encoder-decoder frameworks in VQA [22, 38] and natural language process + +![](images/b5eaa99349d23f75341d4e088935ecfdd72dc57bd89c42ed0d40bbf3e26f112c.jpg) +Figure 1. Causal graphs of VisDial models (baseline and ours). $H$ : dialog history. $I$ : image. $Q$ : question. $V$ : visual knowledge. $A$ : answer. $U$ : user preference. Shaded $U$ denotes unobserved confounder. See Section 3.2 for detailed definitions. + +ing [39], the performance (NDCG [1]) of VisDial in literature is significantly improved from the baseline $51.63\%$ [2] to the state-of-the-art $64.47\%$ [11]. + +However, in this paper, we want to highlight an important fact: VisDial is essentially NOT VQA with history! And this fact is so profound that all the common heuristics in the vision-language community — such as the multimodal fusion [38, 47] and attention variants [22, 25, 26] — cannot appreciate the difference. Instead, we introduce the use of causal inference [27, 28]: a graphical framework that stands in the cause-effect interpretation of the data, but not merely the statistical association of them. Before we delve into the details, we would like to present the main contributions: two causal principles, rooted from the analysis of the difference between VisDial and VQA, which lead to a performance leap — a farewell to the $60\%$ -s and an embrace for the $70\%$ -s — for all the baseline VisDial models1 in literature [9, 21, 41, 26], promoting them to the state-of-the-art in Visual Dialog Challenge 2019 [2]. + +Principle 1 (P1): Delete link $H \to A$ . + +Principle 2 (P2): Add one new (unobserved) node $U$ and three new links: $U \gets H$ , $U \to Q$ , and $U \to A$ . + +Figure 1 compares the causal graphs of existing VisDial models and the one applied with the proposed two principles. Although a formal introduction of them is given in + +![](images/82b20102b7c97e9e93b0d4ec66eaf53d4467cf2590e2b637668c159606c391b0.jpg) +(a) A Typical $H\to A$ Bias + +![](images/e4edda2b90f096286a78a8344bef5c5734734807e072a459b73365b3c35eb870.jpg) +(b) User Preference +Figure 2. The illustrative motivations of the two causal principles: (a) P1 and (b) P2. + +Section 3.2, now you can simply understand the nodes as data types and the directed links as modal transformations. For example, $V \to A$ and $Q \to A$ indicate that answer $A$ is the effect caused by visual knowledge $V$ and question $Q$ , through a transformation, e.g., a multi-modal encoder. + +P1 suggests that we should remove the direct input of dialog history to the answer model. This principle contradicts most of the prevailing VisDial models [9, 15, 41, 26, 43, 16, 11, 32], which are based on the widely accepted intuition: the more features you input, the more effective the model is. It is mostly correct, but only with our discretion of the data generation process. In fact, the VisDial [9] annotators were not allowed to copy from the previous Q&A, i.e., $H \rightarrow A$ , but were encouraged to ask consecutive questions including co-referenced pronouns like "it" and "those", i.e., $H \rightarrow Q$ and thus the answer $A$ is expected to be only based on question $Q$ and reasoned visual knowledge $V$ . Therefore, a good model should reason over the context $(I, H)$ with $Q$ but not to memorize the bias. However, the direct path $H \rightarrow A$ will contaminate the expected causality. Figure 2(a) shows a very ridiculous bias observed in all baselines without P1: the top answers are those with length closer to the average length in the history answers. We will offer more justifications for P1 in Section 4.1. + +P2 implies that the model training only based on the association between $(I,H,Q)$ and $A$ is spurious. By "spurious", we mean that the effect on $A$ caused by $(I,H,Q)$ — the goal of VisDial — is confounded by an unobserved variable $U$ , because it appears in every undesired causal path (a.k.a., backdoor [28]), which is an indirect causal link from input $(I,H,Q)$ to output $A$ : $Q \gets U \to A$ and $Q \gets H \to U \to A$ . We believe that such unob- + +served $U$ should be users as the VisDial dataset essentially brings humans in the loop. Figure 2(b) illustrates how the user's hidden preference confounds them. Therefore, during training, if we focus only on the conventional likelihood $P(A|I,H,Q)$ , the model will inevitably be biased towards the spurious causality, e.g., it may score answer "Yes, he is" higher than "Yes", merely because the users prefer to see a "he" appeared in the answer, given the history context of "he". It is worth noting that the confounder $U$ is more impactful in VisDial than in VQA, because the former encourages the user to rank similar answers subjectively while the latter is more objective. A plausible explanation might be: VisDial is interactive in nature and a not quite correct answer is tolerable in one iteration (i.e., dense prediction); while VQA has only one chance, which demands accuracy (i.e., one-hot prediction). + +By applying P1 and P2 to the baseline causal graph, we have the proposed one (the right one in Figure 1), which serves as a model-agnostic roadmap for the causal inference of VisDial. To remove the spurious effect caused by $U$ , we use the do-calculus [28] $P(A|do(I,H,Q))$ , which is fundamentally different from the conventional likelihood $P(A|I,H,Q)$ : the former is an active intervention, which cuts off $U \rightarrow Q$ and $H \rightarrow Q$ , and sample (where the name "calculus" is from) every possible $U|H$ , seeking the true effect on $A$ only caused by $(I,H,Q)$ ; while the latter likelihood is a passive observation that is affected by the existence of $U$ . The formal introduction and details will be given in Section 4.3. In particular, given the fact that once the dataset is ready, $U$ is no longer observed, we propose a series of effective approximations in Section 5. + +We validate the effectiveness of P1 and P2 on the most recent VisDial v1.0 dataset. We show significant boosts (absolute NDCG) by applying them in 4 representative baseline models: LF [9] ( $\uparrow 16.42\%$ ), HCIAE [21] ( $\uparrow 15.01\%$ ), CoAtt [41] ( $\uparrow 15.41\%$ ), and RvA [26] ( $\uparrow 16.14\%$ ). Impressively, on the official test-standard server, we use an ensemble model of the most simple baseline LF [9] to beat our 2019 winning performance by $0.2\%$ , a more complex ensemble to beat it by $0.9\%$ , and lead all the single-model baselines to the state-of-the-art performances. + +# 2. Related Work + +Visual Dialog. Visual Dialog [9, 10] is more interactive and challenging than most of the vision-language tasks, e.g., image captioning [46, 44, 4] and VQA [5, 38, 37, 36]. Specifically, Das et al. [9] collected a large-scale free-form visual dialog dataset VisDial [7]. They applied a novel protocol: during the live chat, the questioner cannot see the picture and asks open-ended questions, while the answerer gives free-form answers. Another dataset GuessWhat?! proposed by [10] is a goal-driven visual dialog: questioner should locate an unknown object in a rich image scene by asking a + +sequence of closed-ended "yes/no" questions. We apply the first setting in this paper. Thus, the key difference is that the users played an important role in the data collection process. + +All of the existing approaches in the VisDial task are based on the typical encoder-decoder framework [15, 12, 33, 11, 32, 48]. They can be categorized by the usage of history. 1) Holistic: they treat history as a whole to feed into models like HACAN [43], DAN [16] and CorefNMN [18]. 2) Hierarchical: they use a hierarchical structure to deal with history like HRE [9]. 3) Recursive: RvA [26] uses a recursive method to process history. However, they all overlook the fact that the history information should not be directly fed to the answer model (i.e., our proposed Principle 1). The baselines we used in this paper are LF [9]: the earliest model, HCIAE [21]: the first model to use history hierarchical attention, CoAtt [41]: the first one to a co-attention mechanism, and RvA [26]: the first one for a tree-structured attention mechanism. + +Causal Inference. Recently, some works [24, 6, 23, 34, 40, 45] introduced causal inference into machine learning, trying to endow models the abilities of pursuing the cause-effect. In particular, we use the Pearl's structural causal model (SCM) proposed by [28] to hypothesize the data generation process, which is a model-agnostic framework that reflects the nature of the data. + +# 3. Visual Dialog in Causal Graph + +In this section, we formally introduce the visual dialog task and describe how the popular encoder-decoder framework follows the baseline causal graph shown in Figure 1. More details of causal graph can be found in [28, 29]. + +# 3.1. Visual Dialog Settings + +Settings. According to the definition of VisDial task proposed by Das et al. [9], at each time $t$ , given input image $I$ , current question $Q_{t}$ , dialog history $H = \{C, (Q_{1}, A_{1}), \ldots, (Q_{t-1}, A_{t-1})\}$ , where $C$ is the image caption, $(Q_{i}, A_{i})$ is the $i$ -th round Q&A pair, and a list of 100 candidate answers $A_{t} = \{A_{t}^{(1)}, \ldots, A_{t}^{(100)}\}$ . A VisDial model is evaluated by ranking candidate answers $A_{t}$ . + +Evaluation. Recently, the ranking metric Normalized Discounted Cumulative Gain (NDCG) is adopted by the VisDial community [1]. It is different from the classification metric (e.g., top-1 accuracy) used in VQA. It is more compatible with the relevance scores of the answer candidates in VisDial rated by humans. NDCG requires to rank relevant candidates in higher places, rather than just to select the ground-truth answer. + +# 3.2. Encoder-Decoder as Causal Graph + +We first give the definition of causal graph, then revisit the encoder-decoder framework in existing methods using the elements from the baseline graph in Figure 1. + +Causal Graph. Causal graph [28], as shown in Figure 1, describes how variables interact with each other, expressed by a directed acyclic graph $\mathcal{G} = \{\mathcal{N},\mathcal{E}\}$ consisting of nodes $\mathcal{N}$ and directed edges $\mathcal{E}$ (i.e., arrows). $\mathcal{N}$ denote variables, and $\mathcal{E}$ (arrows) denote the causal relationships between two nodes, i.e., $A\to B$ denotes that $A$ is the cause and $B$ is the effect, meaning the outcome of $B$ is caused by $A$ . Causal graph is a highly general roadmap specifying the causal dependencies among variables. + +As we will discuss in the following part, all of the existing methods can be revisited in the view of the baseline graph shown in Figure 1. + +Feature Representation and Attention in Encoder. Visual feature is denoted as node $I$ in the baseline graph, which is usually a fixed feature extracted by Faster-RCNN [31] based on ResNet backbone [13] pre-trained on Visual Genome [19]. For language feature, the encoder firstly embeds sentence into word vectors, followed by passing the RNN [14, 8] to generate features of question and history, which are denoted as $\{Q,H\}$ . + +Most of existing methods apply attention mechanism [42] in encoder-decoder to explore the latent weights for a set of features. A basic attention operation can be represented as $\tilde{\pmb{x}} = Att(\mathcal{X},\mathcal{K})$ where $\mathcal{X}$ is the set of features need to attend, $\mathcal{K}$ is the key (i.e., guidance) and $\tilde{\pmb{x}}$ is the attended feature of $\mathcal{X}$ . Details can be found in most visual dialog methods [21, 41, 43]. In the baseline graph, the subgraph $\{I\to V,Q\to V,H\to Q\to V\}$ denotes a series of attention operations for visual knowledge $V$ . Note that the implementation of the arrows are not necessarily independent, such as co-attention [41], and the process can be written as Input: $\{I,Q,H\} \Rightarrow Output:\{V\}$ , where possible intermediate variables can be added as mediator nodes into the original arrows. However, without loss of generality, these mediators do not affect the causalities in the graph. + +Response Generation in Decoder. After obtaining the features from the encoder, existing methods will fuse them and feed the fused ones into a decoder to generate an answer. In the baseline graph, node $A$ denotes the answer model that decodes the fused features from $\{H \to A, Q \to A, V \to A\}$ and then transforms them into an answer sentence. In particular, the decoder can be generative, i.e., to generate an answer sentence using RNN; or discriminative, i.e., to select an answer sentence by using candidate answer classifiers. + +# 4. Two Causal Principles + +# 4.1. Principle 1 + +When should we draw an arrow from one node pointing to another? According to the definition in Section 3.2, the criterion is that if the node is the cause and the other one is the effect. Intrigued, let's understand P1 by discussing the rationale behind the "double-blind" review pol + +icy. Given three variables: "Well-known Researcher" $(R)$ , "High-quality Paper" $(P)$ , and "Accept" $(A)$ . From our community common sense, we know that $R \to P$ since top researchers usually lead high-quality research, and $P \to A$ is even more obvious. Therefore, for the good of the community, the double-blind prohibits the direct link $R \to A$ by author anonymity, otherwise the bias such as personal emotions and politics from $R$ may affect the outcome of $A$ . + +The story is similar in VisDial. Without loss of generality, we only analyze the path $H \to Q \to A$ . If we inspect the role of $H$ , we can find that it is to help $Q$ resolve some co-references like "it" and "their". As a result, $Q$ listens to $H$ . Then, we use $Q$ to obtain $A$ . Here, $Q$ becomes a mediator which cuts off the direct association between $H$ and $A$ that makes $P(A|Q, H) = P(A|Q)$ , like the "High-quality Paper" that we mentioned in the previous story. However, if we set an arrow from $H$ to $A$ : $H \to A$ , the undesirable bias of $H$ will be learned for the prediction of $A$ , that hampers the natural process of VisDial, such as the interesting bias illustrated in Figure 2(a). Another example is discussed in Figure 4 that $A$ prefers to match the words in $H$ , even though they are literally nonsense about $Q$ if we add the direct link $H \to A$ . After we apply P1, these phenomena will be relieved, such as the blue line illustrated in Figure 2(a), which is closer to the NDCG ground truth average answer length, denoted as the green dashed line. Please refer to other qualitative studies in Section 6.5. + +# 4.2. Principle 2 + +Before discussing P2, we first introduce an important concept in causal inference [28]. In causal graph, the fork-like pattern in Figure 3(a) contains a confounder $U$ , which is the common cause for $Q$ and $A$ (i.e., $Q \gets U \rightarrow A$ ). The confounder $U$ opens a backdoor path started from $Q$ , making $Q$ and $A$ spuriously correlated even if there is no direct causality between them. + +In the data generation process of VisDial, we know that not only both of the questioner and answerer can see the dialog history, but also the answer annotators can look at the history when annotating the answer. Their preference after seeing the history can be understood as a part of the human nature or subtleties conditional on a dialog context, and thus it has a causal effect on both $Q$ and $A$ . Moreover, due to the fact that the preference is nuanced and uncontrollable, we consider it as an unobserved confounder for $Q$ and $A$ . + +It is worth noting that the confounder hinders us to find the true causal effect. Let's take the graph in Figure 3(b) as an example. The causal effect from $Q$ to $A$ is 0; however, we can quickly see that $P(A|Q) - P(A)$ is nonzero because $Q$ and $A$ are both influenced by $U$ and thus are correlated (thanks to Reichenbach's common cause principle [28]). That is, if we are given $Q$ , the any likelihood change for $A$ will be sensible compared to nothing is given. + +![](images/80031b7510a746155927a73682c4e2452700837c1c5dba2e9f15c741bdda9c0c.jpg) +(a) Confounder $U$ + +![](images/a082077ce854386c538ecbe7f1a6fa0f3fcddbc271b58c6572ced3e9a44736bc.jpg) +(b) Spurious Relation + +![](images/82c5e7a2bd22748d145b9fbb6ff65f9114e6dfb51c4a3797b7a198b1fee12b71.jpg) +(c) do-operator + +![](images/2f7cb0fc0f31e89b26e6171af0ab680e5c18eb2a8d4536955b562aa834896f85.jpg) +(d) Question Type + +![](images/95386afaf72ead7dbff0f37fb17978adbf184d6c0361512ca262cebbcefe6796.jpg) +(e) Score Sampling + +![](images/d863c4e714b0b0697619adf6a26f6126e8d4e158ce2e9345d2bcfbc1ba4c44f9.jpg) +(f) Hidden Dictionary +Figure 3. Example of confounder, $do$ -operator and sketch causal graphs of our three attempts to de-confounder + +Therefore, if we consider $P(A|Q)$ as our VisDial model, it will still predict nonsense answers even if $Q$ has nothing to do with $A$ . As illustrated in Figure 2(b), model will prefer the candidates about "he" even though $Q$ is not given, that means it captures the confounder $U$ but not the true rationale between $Q$ and $A$ . Next, we will introduce a powerful technique that makes the $Q$ and $A$ in Figure 3(b) "independent", i.e., no causal relation. + +# 4.3. do-calculus. + +The technique is do-calculus introduced in [28, 29]. Specifically, $do(Q = q)$ denotes that we deliberately assign a value $q$ to variable $Q$ (i.e., intervention), rather than passively observe $Q = q$ . As illustrated in Figure 3(c), $do(Q = q)$ can be understood as cutting all the original incoming arrows to $Q$ , and then making $Q$ and $U$ independent. Therefore, we can have the well-known backdoor adjustment [28]: $P(A|do(Q = q)) = \sum_{u} P(A|Q = q, u)P(u)$ . Note that this is different from Bayes rule $P(A|Q = q) = \sum_{u} P(A|Q = q, u)P(u|Q = q)$ thanks to the independence $P(u|Q = q) = P(u)$ introduced by do-calculus. Let's revisit Figure 3(b) by using do-calculus. We can find that $P(A|do(Q = q)) - P(A) = 0$ , that is to say, any intervention of $Q$ will not influence the probability of $A$ , meaning the correct relation between $Q$ and $A$ : no causal relation. Therefore, $P(A|do(Q = q))$ should be the objective answer model in VisDial. + +For our proposed graph of VisDial shown in Figure 1, we can use intervention $do(Q,H,I)$ and the backdoor adjustment to obtain our overall model. Here, we slightly abuse the notation $do(Q,H,I)$ as $do(Q = q,H = h,I = i)$ : + +$$ +\begin{array}{l} P (A | d o (Q, H, I)) \\ \begin{array}{l} = \sum_ {u} P (A | d o (Q, H, I), u) P (u | d o (Q, H, I)) \\ = \sum_ {u} P (A | d o (Q), H, I, u) P (u | H) \end{array} \tag {1} \\ = \sum_ {u} P (A | Q, H, I, u) P (u | H). \\ \end{array} +$$ + +The detailed derivation and proof can be found in supplementary materials. + +So far, we have provided all the ingredients of the baseline causal graph, two proposed principles and their theoretical solution: do-calculus. Next, we will introduce some implementations for the proposed solution in Eq. (1). + +# 5. Improved Visual Dialog Models + +It is trivial to implement P1 and we will provide its training details in Section 6.3. For P2, since $U$ is unobserved, it is impossible to sample $u$ in Eq. (1) directly. Therefore, our technical contribution is to introduce 3 approximations. For notation simplicity, we first re-write Eq. (1) as: + +$$ +P (A | d o (Q, H, I)) = \sum_ {u} P _ {u} (A) P (u | H), \tag {2} +$$ + +where $P_{u}(A)\coloneqq P(A|Q,H,I,u)$ + +# 5.1. Question Type + +Since we cannot directly sample $u$ from the unobserved confounder, we use the $i$ -th answer candidate $a_i$ as a delegate for sample $u$ . That is because $a_i$ is a sentence observed from the "mind" of user $u$ during dataset collection. Then, $\sum_u P_u(A)P(u|H)$ can be approximated as $\sum_i P_i(A)P(a_i|H)$ . We further use $p(a_i|QT)$ to approximate $P(a_i|H)$ because of two reasons: First, $P(a_i|H)$ essentially describes a prior knowledge about $a_i$ without comprehending the whole $\{Q,H,I\}$ triplet. A similar scenario is that if we know the QT (question type), e.g., "what color", the answer candidates denoting colors have higher probabilities without even comprehending the question details. Second, QT is extracted from question $Q$ , which is a descendant of history $H$ in our graph, indicating that QT partially reveals $H$ [28]. In practice, we manually define some question types, each of which has a certain answer frequency. For each dialog round, a normalized score $s_i^{qt} := p(a_i|QT)$ (i.e., $\sum_i s_i^{qt} = 1$ ) of each candidate $a_i$ will be calculated according to the frequency of $a_i$ under question type $qt$ . More details are given in Section 6.3. Finally, we have the approximation for Eq. (2): + +$$ +\sum_ {u} P _ {u} (A) P (u | H) \approx \sum_ {i} P _ {i} (A) \cdot s _ {i} ^ {q t}, \tag {3} +$$ + +where $P_{i}(A) = \mathrm{softmax}(f_{s}(\pmb{e}_{i},\pmb{m}))$ , $f_{s}$ is a similarity function, $\pmb{e}_{i}$ is the embedding of candidate $a_{i}$ , $\pmb{m}$ is the joint embedding for $\{Q,I,H\}$ , and the sketch graph is shown in Figure 3(d). Since question type is observed from $Q$ , the approximation $p(a_i|QT)$ undermines the prior assumption of the backdoor adjustment in Eq. (1) (i.e., the prior $p(u|H)$ cannot be conditional on $Q$ ). Fortunately, $QT$ is only a small part of $Q$ (i.e., the first few words) and thus the approximation is reasonable. + +# 5.2. Answer Score Sampling + +Since the question type implementation slightly undermines the backdoor adjustment, we will introduce a better approximation which directly samples from $u$ : Answer Score Sampling. This implementation is also widely known as our previously proposed dense fine-tune in community [3]. + +We still use $a_i$ to approximate $u$ , and we use the (normalized) ground-truth NDCG score $s_i$ annotated by the humans to approximate $P(a_i|H)$ . Note that $s_i$ directly reveals human preference for $a_i$ in the context $H$ (i.e., the prior $P(a_i|H)$ ). In practice, we use the subset of training set with dense annotations to sample $s_i$ . Therefore, we have: + +$$ +\sum_ {u} P _ {u} (A) P (u | H) \approx \sum_ {i} P _ {i} (A) \cdot s _ {i}, \tag {4} +$$ + +and the sketch graph is illustrated in Figure 3(e). In practice, Eq. (4) can be implemented using different loss functions. Here we give three examples: + +Weighted Softmax Loss $(R_{1})$ . We extend the log-softmax loss as a weighted form, where $P_{i}(A)$ is denoted by $\log (\mathrm{softmax}(p_i))$ , $p_i$ denotes the logit of candidate $a_{i}$ , and $s_i$ is corresponding normalized relevance score. + +Binary Sigmoid Loss $(R_{2})$ . This loss is close to the binary cross-entropy loss, where $P_{i}(A)$ represents $\log (\mathrm{sigmoid}(p_i))$ or $\log (\mathrm{sigmoid}(1 - p_i))$ , and $s_i$ represents corresponding normalized relevance score. + +Generalized Ranking Loss $(R_3)$ . Note that the answer generation process can be viewed as a ranking problem. Therefore, we derive a ranking loss that $P_{i}(A)$ is $\log \frac{\exp(p_i)}{\exp(p_i) + \sum_{j\in G}\exp(p_j)}$ , where $G$ is a group of candidates which have lower relevance scores than candidate $a_{i}$ and $s_i$ is normalized characteristic score (i.e., equals to 0 for $a_{i}$ with relevance score 0 and equals to 1 for $a_{i}$ with positive relevance score). + +More details of the three loss functions are given in supplementary materials. It is worth noting that our losses are derived from the underlying causal principle P2 in Eq. (4), but not from the purpose of regressing to the ground-truth NDCG. The comparison will be given in Section 6.4. + +# 5.3. Hidden Dictionary Learning + +The aforementioned two implementations are discrete since they sample specific $a_{i}$ to approximate $u$ . For better approximation, we propose learning to approximate the unobserved confounder $U$ . As shown in Figure 3(f), we design a dictionary to model $U$ . In practice, we design the dictionary as a $N \times d$ matrix $D_{u}$ , where $N$ is manually set and $d$ is the hidden feature dimension. Note that given a sample $u$ and a answer candidate $a_{c}$ , Eq.(2) can be implemented as $\sum_{u} P_{u}(a_{c}) P(u|H)$ . Since the last layer of our network for answer prediction is a softmax layer: + +$P_{u}(a_{c}) = \mathrm{softmax}(f_{s}(\pmb{e}_{c},\pmb{u},\pmb{m}))$ , where $e_c$ is the embedding of candidate $a_{c}$ $\pmb{u}$ is sampled from $D_{\mathbf{u}}$ $m$ is the joint embedding for $\{Q,I,H\}$ , and $f_{s}$ is a similarity computation function, the Eq.(2) can be re-written as: + +$$ +P (A | d o (Q, H, I)) := \mathbb {E} _ {[ u | H ]} [ \operatorname {s o f t m a x} (f _ {s} (e _ {\boldsymbol {c}}, \boldsymbol {u}, \boldsymbol {m})) ]. \tag {5} +$$ + +Since Eq. (5) needs expensive samplings for $u$ , we use NWGM approximation [42, 35] to efficiently move the expectation into the softmax: + +$$ +\mathbb {E} _ {[ u | H ]} \left[ \operatorname {s o f t m a x} \left(f _ {s} \left(\boldsymbol {e} _ {\boldsymbol {c}}, \boldsymbol {u}, \boldsymbol {m}\right)\right) \right] \approx \operatorname {s o f t m a x} \left(\mathbb {E} _ {[ u | H ]} \left[ f _ {s} \left(\boldsymbol {e} _ {\boldsymbol {c}}, \boldsymbol {u}, \boldsymbol {m}\right) \right]\right). \tag {6} +$$ + +The details of the NWGM approximation can be found in supplementary materials. In this paper, we model $f_{s}(e_{c},u,m) = e_{c}^{T}(u + m)$ . Thanks to the linear additive property of expectation calculation, we can use $e_{c}^{T}(\mathbb{E}_{[u|H]}[\pmb{D}_{\pmb{u}}] + \pmb{m})$ to calculate $\mathbb{E}_{[u|H]}[e_c^T (\pmb {u} + \pmb {m})]$ . In practice, we use a dot-product attention to compute $\mathbb{E}_{[u|H]}[D_u]$ . Specifically, $\mathbb{E}_{[u|H]}[D_u] = \mathrm{softmax}(L^T K)\odot D_u$ , where $L = W_{1}h$ , $K = W_{2}D_{u}$ and $\odot$ is elementwise product, $h$ is the embedding of history $H$ , and $W_{1},W_{2}$ are mapping matrices. The training details can be found in Section 6.3. + +# 6. Experiments + +# 6.1. Experimental Setup + +Dataset. Our proposed principles are evaluated on the recently released real-world dataset VisDial v1.0. Specifically, the training set of VisDial v1.0 contains 123K images from the COCO dataset [20] with a 10-round dialog for each image, resulting in 1.2M dialog rounds. The validation and test sets were collected from Flickr, with 2K and 8K COCO-like images respectively. The test set is further split into test-standard and test-challenge splits, both with the number of 4K images that are hosted on the blind online evaluation server. Each dialog in the training and validation sets has 10 rounds, while the number in the test set is uniformly distributed from 1 to 10. For each dialog, a list of 100 answer candidates is given for evaluation. In the following, the results are reported on the validation and test-standard set. + +Metrics. As mentioned in Section 3.1, NDCG is recommended by the official and accepted by the community. There are some other retrieval-based metrics like MRR (Mean Reciprocal Rank), where the ground-truth answer is generated by the single user. Note that the only answer may be easily influenced by the single user's preference (i.e., length). We argue that this may be the reason why the models with history shortcut achieve higher MRR, (e.g., due to the bias illustrated in Figure 2) and lower NDCG. Therefore, retrieval-based metrics are not consistent with NDCG. According to the mentioned reasons and space limitation, + +we only show the results on NDCG in the main paper. For completeness, the further discussion between NDCG and other retrieval-based metrics and the performance on all metrics will be given in the supplementary materials. + +# 6.2. Model Zoo + +We report the performance of the following base models, including LF [9], HCIAE [21], CoAtt [41] and RvA [26]: + +LF [9]. This naive base model has no attention module. We expand the model by adding some basic attention operations, including question-based history attention and question-history-based visual attention refinement. + +HClAE [21]. The model consists of question-based history attention and question-history-based visual attention. + +CoAtt [41]. The model consists of question-based visual attention, image-question-based history attention, image-history-based question attention, and the final question-history-based visual attention. + +RvA [26]. The model consists of question-based visual attention and history-based visual attention refinement. + +# 6.3. Implementation Details + +Pre-processing. For language pre-processing, we followed the process introduced by [9]. First, we lowercase all the letters in sentences and converted digits to words and removed contractions. After that, we used Python NLTK toolkit to tokenize sentences into word lists, followed by padding or truncating captions, questions, and answers to the length of 40, 20 and 20, respectively. Then, we built a vocabulary of the tokens with the size of 11,322, including 11,319 words that occur at least 5 times in train v1.0 and 3 instruction tokens. We loaded the pre-trained word embeddings from GloVe [30] to initialize all word embeddings, which were shared in encoder and decoder, and we applied 2-layers LSTMs to encode word embedding and set their hidden state dimension to 512. For the visual feature, we used bottom-up-attention features [4] given by the official [1]. + +Implementation of Principles. For Principle 1 (P1), we eliminated the history feature in the final fused vector representation for all models, while kept other parts unchanged. For HCIAE [21] and CoAtt [41], we also blocked the history guidance to the image. For Principle 2 (P2), we trained the models using the preference score, which can be counted from question type or given by the official (i.e., dense annotations in VisDial v1.0 training set). Specifically, for "question type", we first defined 55 types and marked answers occurred over 5 times as preferred answers, then used the preference to train our model by $(R_{2})$ loss proposed in Section 5.2. "Answer score sampling" was directly used to fine-tune our pre-trained model by the proposed loss functions. For "hidden dictionary", we set a matrix for $N$ as 100 and $d$ as 512 to realize $D_{u}$ . The dictionary is ini + +
ModelbaselineQTSD
R0R1R2R3
LF [9]57.2158.9767.8271.2772.0472.3672.65
LF +P161.8862.8769.4772.1672.8573.4273.63
+ +tialized with the features of top-100 popular answers, then trained by dense annotations with $R_{3}$ loss. More details can be found in supplementary materials. Note that the implementations following P1 and P2 are flexible. + +Training. We used softmax cross-entropy loss to train the model with P1, and used Adam [17] with the learning rate of $4 \times 10^{-3}$ which decayed at epoch 5, 7, 9 with the decay rate of 0.4. The model was trained for 15 epochs totally. In addition, Dropout [35] was applied with ratio of 0.4 for RNN and 0.25 for fully connected layers. Other settings were set by default. + +# 6.4. Quantitative Results + +Table 1 shows the results with different implementations in P2, i.e., question type, answer score sampling, and hidden dictionary learning. Overall, all of the implementations can improve the performances of base models. Specifically, the implementations of P2 can further boost performance by at most $11.75\%$ via hidden dictionary learning. Specifically, our designed loss functions based on Eq. (2) outperform the regressive score, which is implemented as Euclidean distance loss and denoted as $R_0$ . The reason is that the regression fine-tune strategy is not a proper approximation for P2. We also find that the proposed ranking loss (i.e., $R_3$ ) performs best since it satisfies the ranking property of VisDial. + +Note that our principles are model-agnostic. Table 2 shows the results about applying our principles on four different models (i.e., LF [9], HCIAE [21], CoAtt [41] and RvA [26]). In general, both of our principles can improve all the models in any ablative condition (i.e., P1, P2, P1 + P2). Note that the effectiveness of P1 and P2 are additive, which means combining P1 and P2 performs the best. + +We finally used the blind online test server to justify the effectiveness of our principles on the test-standard split of Visual Dial v1.0. As shown in Table 3, the top part contains the results of the baseline models implemented with our principles, while the bottom part represents the recent Visual Dialog Challenge 2019 leaderboard [2]. We used the ensemble of the enhanced LF [9] to beat the Visual Dialog Challenge 2019 Winner (i.e., MReaL-BDAI), which can also be regarded as the implementations of P1 and P2. Promisingly, + +Table 1. Performance (NDCG%) comparison for the experiments of applying our principles on the validation set of VisDial v1.0. LF is the enhanced version as we mentioned. QT, S and D denote question type, answer score sampling, and hidden dictionary learning, respectively. $R_0$ , $R_1$ , $R_2$ , $R_3$ denote regressive loss, weighted softmax loss, binary sigmoid loss, and generalized ranking loss, respectively. + +
ModelLF [9]HCIAE [21]CoAtt [41]RvA [26]
baseline57.2156.9856.4656.74
+P161.8860.1260.2761.02
+P272.6571.5071.4171.44
+P1+P273.6371.9971.8772.88
+ +Table 2. Performance (NDCG%) of ablative studies on different models on VisDial v1.0 validation set. P2 indicates the most effective one (i.e., hidden dictionary learning) shown in Table 1. Note that only applying P2 is implemented by the implementations in Section 5 with the history shortcut. + +![](images/00f2d6638c2984ead1ffad6c33a9c6d0469f1ff77723bc6463281bd6edb0c2dc.jpg) +Figure 4. Qualitative results of the baseline and baseline with P1 on the validation set of VisDial v1.0. The numbers in brackets in ranked $A$ denote relevance scores. Red boxes denote that the selected candidates of the baseline model influenced by the shortcut (e.g., word matching) from the dialog history. For the baseline with P1, it does not make such biased shortcut choices. More details can be found in Section 6.5. + +by applying our principles, we can promote all the baseline models to the top ranks on the leaderboard. + +# 6.5. Qualitative Analysis + +The qualitative results illustrated in Figure 4 and Figure 5 show the following advantages of our principles. + +History Bias Elimination. After applying P1, the harmful patterns learned from history are relieved, like the answer-length bias shown in Figure 2(a) as we mentioned. The example on the top of Figure 4 shows the word-match bias in the baseline. From this example, we can observe that the word "sink" from history is literally unrelated to the current question. However, for the baseline model, some undesirable candidates (i.e., with low relevance score) containing the word "sink" can be found in the top-ranked answers due to the wrong direct history shortcut. To further confirm the conjecture, we counted the word-match cases of objective words (e.g., "sink" and "counter") on the validation set for the top-10 candidates of the ranked lists. The statistic indicates that P1 can decrease about $10\%$ word matching from history (from $\sim 5200$ times of baseline to $\sim 4800$ times using P1). The bottom example shows that, when the answer "yes" exists in history, the baseline model will tend to rank + +![](images/8946a5eb1e3a10b34d9ccd9faee4a8f34ef382352bdcb02d24d482ee561ec810.jpg) + +![](images/8e51c5d2be011fdd525ff4fc9405f18f050ba7d7ed0ff80e8f79ee296625baef.jpg) + +![](images/67181ed2ce12991bed7620f873a4544857f88e45d9062c58da7aa9e8c48626e7.jpg) + +![](images/b2cc2032b60ed65904823a8661599d4615804a9c3149b6373906162a94735269.jpg) + +![](images/864c8e669312aee5e7352242e727c3fbad3b1714820b22b8d51cabc5545e1ab3.jpg) +Figure 5. Qualitative examples of the ranked candidates of baseline and baseline with P2. We also give some key rank changes for boosting NDCG performance by implementing P2. These examples are taken from the validation set of VisDial v1.0. + +![](images/1fe9e50d345eb2341b9172a0d5052d5ae885e9dea7fcc263915ea3d8295a9e99.jpg) + +
ModelNDCG(%)
OursP1+P2 (More Ensemble)74.91
LF+P1+P2 (Ensemble)74.19
LF+P1+P2 (single)71.60
RvA+P1+P2 (single)71.28
CoAtt+P1+P2 (single)69.81
HCIAE+P1+P2 (single)69.66
LeaderboardVD-BERT(Ensemble)*75.13
Tohuku-CV Lab (Ensemble)*74.88
MReaL-BDAI*74.02
SFCU (Single)*72.80
FancyTalk (HeteroFM)*72.33
Tohuku-CV Lab (Ensemble w/o ft)*66.53
+ +Table 3. Our results and comparisons to the recent Visual Dialog Challenge 2019 Leaderboard results on the test-standard set of VisDial v1.0. Results are reported by the test server, $(^{*})$ denotes it is taken from [2]. Note that the top five models in the Leaderboard use the dense fine-tune implementation illustrated in Section 5.2. + +“yes” in a high place. However, it is opposite to the real answer “no” in some cases, which will lead to a lower NDCG. After applying P1, this problem can be effectively alleviated. To testify this conclusion, we further calculate the average ranks of “yes” for baseline and baseline with P1 in the above case (i.e., “yes” appears in history and the real answer is “no”). We find that the average ranks are 4.82 for baseline and 6.63 for baseline with P1 respectively. The lower rank means that P1 relieves the “yes” shortcut in history. More examples of these biases can be found in supplementary materials. + +More Reasonable Ranking. Figure 5 shows that the baseline model only focuses on ground truth answers like "no" or "yes" and does not care about the rank of other answers with similar meaning like "nope" or "yes, he is". This does + +not match human's intuition because the candidates with similar semantics are still reasonable. This also leads the baseline model to a lower NDCG. As shown in Figure 5 the model with P2 almost ranks all the suitable answers like "yes, he is", "yes he is" and "I think so" at top places together with the ground truth answer "yes", which significantly improves the NDCG performance. + +# 7. Conclusions + +In this paper, we proposed two causal principles for improving the VisDial task. They are model-agnostic, and thus can be applied in almost all the existing methods and bring major improvement. The principles are drawn from our in-depth causal analysis of the VisDial nature, which is however unfortunately overlooked by our community. For technical contributions, we offered some implementations on how to apply the principles into baseline models. We conducted extensive experiments on the official VisDial dataset and the online evaluation servers. Promising results demonstrate the effectiveness of the two principles. As moving forward, we will stick to our causal thinking to discover other potential causalities hidden in embodied Q&A and conversational visual dialog tasks. + +Acknowledgement This work was partially supported by the National Natural Science Foundation of China (61573363 and 61832017), the Fundamental Research Funds for the Central Universities and the Research Funds of Renmin University of China (15XNLQ01), and NTU-Alibaba JRI. We would like to thank the anonymous reviewers for their constructive comments. + +# References + +[1] Visual Dialog. https://visualdialog.org/. +[2] Visual Dialog Challenge 2019 Leaderboard. https://evalai.cloudcv.org/web/challenges/challenge-page/161/leaderboard/483/. +[3] Visual Dialog Challenge 2019 Winner Report. https://drive.google.com/file/d/lfqgOhregsp_3USM6XCHx89S9JLXt8bKp. +[4] Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6077-6086, 2018. +[5] Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In Proceedings of the IEEE international conference on computer vision, pages 2425-2433, 2015. +[6] Yoshua Bengio, Tristan Deleu, Nasim Rahaman, Rosemary Ke, Sébastien Lachapelle, Olexa Bilaniuk, Anirudh Goyal, and Christopher Pal. A meta-transfer objective for learning to disentangle causal mechanisms. In 8rd International Conference on Learning Representations, ICLR, 2020. +[7] Michael Buhrmester, Tracy Kwang, and Samuel D Gosling. Amazon's mechanical turk: A new source of inexpensive, yet high-quality, data? Perspectives on Psychological Science, 6(1):3-5, 2011. +[8] Kyunghyun Cho, Bart van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties of neural machine translation: Encoder-decoder approaches. In Proceedings of SSST@EMNLP 2014, Eighth Workshop on Syntax, Semantics and Structure in Statistical Translation, pages 103-111, 2014. +[9] Abhishek Das, Satwik Kottur, Khushi Gupta, Avi Singh, Deshraj Yadav, José MF Moura, Devi Parikh, and Dhruv Batra. Visual dialog. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 326-335, 2017. +[10] Harm De Vries, Florian Strub, Sarath Chandar, Olivier Pietquin, Hugo Larochelle, and Aaron Courville. Guess-what?! visual object discovery through multi-modal dialogue. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5503–5512, 2017. +[11] Zhe Gan, Yu Cheng, Ahmed El Kholy, Linjie Li, Jingjing Liu, and Jianfeng Gao. Multi-step reasoning via recurrent dual attention for visual dialog. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, pages 6463-6474, 2019. +[12] Dalu Guo, Chang Xu, and Dacheng Tao. Image-question-answer synergistic network for visual dialog. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10434-10443, 2019. +[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. + +[14] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997. +[15] Unnat Jain, Svetlana Lazebnik, and Alexander G Schwing. Two can play this game: visual dialog with discriminative question generation and answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5754-5763, 2018. +[16] Gi-Cheon Kang, Jaeseo Lim, and Byoung-Tak Zhang. Dual attention networks for visual reference resolution in visual dialog. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP, pages 2024-2033, 2019. +[17] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR, 2015. +[18] Satwik Kottur, José MF Moura, Devi Parikh, Dhruv Batra, and Marcus Rohrbach. Visual coreference resolution in visual dialog using neural module networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 153-169, 2018. +[19] Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. International Journal of Computer Vision, 123(1):32-73, 2017. +[20] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. +[21] Jiasen Lu, Anitha Kannan, Jianwei Yang, Devi Parikh, and Dhruv Batra. Best of both worlds: Transferring knowledge from discriminative learning to a generative visual dialog model. In Advances in Neural Information Processing Systems, pages 314-324, 2017. +[22] Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Hierarchical question-image co-attention for visual question answering. In Advances In Neural Information Processing Systems, pages 289–297, 2016. +[23] Divyat Mahajan, Chenhao Tan, and Amit Sharma. Preserving causal constraints in counterfactual explanations for machine learning classifiers. In Advances in Neural Information Processing Systems Workshop on Causal Machine Learning, 2019. +[24] Suraj Nair, Yuke Zhu, Silvio Savarese, and Li Fei-Fei. Causal induction from visual observations for goal directed tasks. In Advances in Neural Information Processing Systems Workshop on Causal Machine Learning, 2019. +[25] Hyeonseob Nam, Jung-Woo Ha, and Jeonghee Kim. Dual attention networks for multimodal reasoning and matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 299-307, 2017. +[26] Yulei Niu, Hanwang Zhang, Manli Zhang, Jianhong Zhang, Zhiwu Lu, and Ji-Rong Wen. Recursive visual attention in visual dialog. In Proceedings of the IEEE Conference + +on Computer Vision and Pattern Recognition, pages 6679-6688, 2019. +[27] Judea Pearl et al. Causal inference in statistics: An overview. Statistics surveys, 3:96-146, 2009. +[28] Judea Pearl, Madelyn Glymour, and Nicholas P Jewell. Causal inference in statistics: A primer. John Wiley & Sons, 2016. +[29] Judea Pearl and Dana Mackenzie. THE BOOK OF WHY: THE NEW SCIENCE OF CAUSE AND EFFECT. Basic Books, 2018. +[30] Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 1532-1543, 2014. +[31] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91-99, 2015. +[32] Idan Schwartz, Seunghak Yu, Tamir Hazan, and Alexander G Schwing. Factor graph attention. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2039-2048, 2019. +[33] Paul Hongsuck Seo, Andreas Lehrmann, Bohyung Han, and Leonid Sigal. Visual reference resolution using attention memory for visual dialog. In Advances in neural information processing systems, pages 3719-3729, 2017. +[34] Rahul Singh and Liyang Sun. De-biased machine learning for compliers. In Advances in Neural Information Processing Systems Workshop on Causal Machine Learning, 2019. +[35] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1):1929-1958, 2014. +[36] Kaihua Tang, Yulei Niu, Jianqiang Huang, Jiaxin Shi, and Hanwang Zhang. Unbiased scene graph generation from biased training. In Conference on Computer Vision and Pattern Recognition, 2020. +[37] Kaihua Tang, Hanwang Zhang, Baoyuan Wu, Wenhan Luo, and Wei Liu. Learning to compose dynamic tree structures for visual contexts. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6619-6628, 2019. +[38] Damien Teney, Peter Anderson, Xiaodong He, and Anton van den Hengel. Tips and tricks for visual question answering: Learnings from the 2017 challenge. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4223-4232, 2018. +[39] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008, 2017. +[40] Tan Wang, Jianqiang Huang, Hanwang Zhang, and Qianru Sun. Visual commonsense r-cnn. In Conference on Computer Vision and Pattern Recognition, 2020. +[41] Qi Wu, Peng Wang, Chunhua Shen, Ian Reid, and Anton van den Hengel. Are you talking to me? reasoned visual + +dialog generation through adversarial learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6106-6115, 2018. +[42] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International conference on machine learning, pages 2048-2057, 2015. +[43] Tianhao Yang, Zheng-Jun Zha, and Hanwang Zhang. Making history matter: Gold-critic sequence training for visual dialog. In Proceedings of the IEEE International Conference on Computer Vision, 2019. +[44] Xu Yang, Kaihua Tang, Hanwang Zhang, and Jianfei Cai. Auto-encoding scene graphs for image captioning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10685–10694, 2019. +[45] Xu Yang, Hanwang Zhang, and Jianfei Cai. Deconfounded image captioning: A causal retrospect, 2020. +[46] Ting Yao, Yingwei Pan, Yehao Li, and Tao Mei. Exploring visual relationship for image captioning. In Proceedings of the European Conference on Computer Vision (ECCV), pages 684-699, 2018. +[47] Zhou Yu, Jun Yu, Jianping Fan, and Dacheng Tao. Multimodal factorized bilinear pooling with co-attention learning for visual question answering. In Proceedings of the IEEE international conference on computer vision, pages 1821–1830, 2017. +[48] Zilong Zheng, Wenguan Wang, Siyuan Qi, and Song-Chun Zhu. Reasoning visual dialogs with structural and partial observations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6669-6678, 2019. \ No newline at end of file diff --git a/twocausalprinciplesforimprovingvisualdialog/images.zip b/twocausalprinciplesforimprovingvisualdialog/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d9ccb92046352c6509e4771e4761995d28c4d0e4 --- /dev/null +++ b/twocausalprinciplesforimprovingvisualdialog/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:422c2486b7af4b1067f5c3cb653104180b8db9984cbe185d9783473db1c7098a +size 347732 diff --git a/twocausalprinciplesforimprovingvisualdialog/layout.json b/twocausalprinciplesforimprovingvisualdialog/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4f460c7df972f34838c777626495daf88bb90446 --- /dev/null +++ b/twocausalprinciplesforimprovingvisualdialog/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c42d1c637759b24cf727a7192cea79698cdabc419e1582f2e6e1be77d5fa2a7 +size 581798 diff --git a/twoshotspatiallyvaryingbrdfandshapeestimation/777900fd-d82c-46e4-8208-e56a01206445_content_list.json b/twoshotspatiallyvaryingbrdfandshapeestimation/777900fd-d82c-46e4-8208-e56a01206445_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c9878003c998fa973728401df6eb5d61d9daf82d --- /dev/null +++ b/twoshotspatiallyvaryingbrdfandshapeestimation/777900fd-d82c-46e4-8208-e56a01206445_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dffa34ce67815c5400194a06d6988bd11d4f893ec1ae0b94b6cce424480bb40f +size 74025 diff --git a/twoshotspatiallyvaryingbrdfandshapeestimation/777900fd-d82c-46e4-8208-e56a01206445_model.json b/twoshotspatiallyvaryingbrdfandshapeestimation/777900fd-d82c-46e4-8208-e56a01206445_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2ec3f5b854bcb6f3c85944f0deedbd0d9a281eb0 --- /dev/null +++ b/twoshotspatiallyvaryingbrdfandshapeestimation/777900fd-d82c-46e4-8208-e56a01206445_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c57cae5c935a72813867ff7cc6a81a48669082dd2dae1fdc6564e244f70b38ce +size 94553 diff --git a/twoshotspatiallyvaryingbrdfandshapeestimation/777900fd-d82c-46e4-8208-e56a01206445_origin.pdf b/twoshotspatiallyvaryingbrdfandshapeestimation/777900fd-d82c-46e4-8208-e56a01206445_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3d413d30c380b13459d3af2925b5d25ca1812ac5 --- /dev/null +++ b/twoshotspatiallyvaryingbrdfandshapeestimation/777900fd-d82c-46e4-8208-e56a01206445_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:524f84dc42c689e6bdd38925da2c491845258ba2b5e996d284265140e0b69128 +size 1539789 diff --git a/twoshotspatiallyvaryingbrdfandshapeestimation/full.md b/twoshotspatiallyvaryingbrdfandshapeestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1a79f95d8a87a38bee2841e63a575d762ef984b7 --- /dev/null +++ b/twoshotspatiallyvaryingbrdfandshapeestimation/full.md @@ -0,0 +1,310 @@ +# Two-shot Spatially-varying BRDF and Shape Estimation + +Mark Boss $^{1*}$ , Varun Jampani $^{2}$ , Kihwan Kim $^{2}$ , Hendrik P.A. Lensch $^{1}$ , Jan Kautz $^{2}$ + +1University of Tübingen, 2NVIDIA + +![](images/e247708f89e3c0f840f7e397a4aa0fa5cc49e4270cab91a546cf243e89f7a5e5.jpg) +Flash +lash +Novel Re-render +Figure 1: Practical SVBRDF and shape estimation. Sample two-shot input and the corresponding estimates for SVBRDF (albedo, specularity, roughness) and shape (depth and normals). Samples are taken from [5]. + +![](images/c9dfa07d75952c94f8339bac658e299908dbcd1798361bcb3b758b9755cc4695.jpg) + +![](images/0512c08d32deef6d03bff9615fd260853140a19884d3011e34dd3174c7f80b8b.jpg) + +![](images/18e4a5ef57c9af571bc72389581ae008f06cafb6cc4d767a51383a5c50700394.jpg) + +![](images/8498be269cbda4d689026051a8903b5bc08de47caefb6773f28e5a853253d333.jpg) + +![](images/bc237bc9a833bbd77c4b411db30e613e5db0d8e815223c7663e735add8186ffa.jpg) + +![](images/efcda8e15c3e12cc8b1c45f84087d2f1b8508da3f7f93ea2dab45be06183b4da.jpg) +Specular + +![](images/4e524fb09bdbcae8762202db421e8dfc2d94e0d32547f2ccf40a10a922583055.jpg) + +![](images/49881f46981c9ee178558642c2a113a011b3a653a27e362d7e948a5056cdcd55.jpg) + +![](images/e508d165fc2b5d132b95d52be6acc68a0ac7a9d6ca5de5019d9d5dcb5558185b.jpg) +Roughness + +![](images/5d777634b8003fcd1600ac8f1ba8c2d7735f0ca3daa481e3c0ec11d0970bdc57.jpg) + +![](images/bb6c6cfe82d23b1bc63df0286264c020c3a3f45d05164274d4356f36bc1c7742.jpg) + +![](images/e441155613c2d5a400396c2efb466a7c8968089cb9166299f41ba2a0a3e1b7e2.jpg) +Normal + +![](images/515faabab7ce16a96286e523f1f768a790a3998698afe0cba1a828a4f638c1f0.jpg) + +![](images/84732873f0551450b567242b3eb5d474c601ce8e656ed58201947374b7fcce9f.jpg) + +![](images/70a7663724d1e5c86660488f6f616b1148ad3781b2368e6dceea56678c08c5ad.jpg) +Depth + +# Abstract + +Capturing the shape and spatially-varying appearance (SVBRDF) of an object from images is a challenging task that has applications in both computer vision and graphics. Traditional optimization-based approaches often need a large number of images taken from multiple views in a controlled environment. Newer deep learning-based approaches require only a few input images, but the reconstruction quality is not on par with optimization techniques. We propose a novel deep learning architecture with a stagewise estimation of shape and SVBRDF. The earlier predictions guide each estimation, and a joint refinement network later refines both SVBRDF and shape. We follow a practical mobile image capture setting and use unaligned two-shot flash and no-flash images as input. Both our two-shot image capture and network inference can run on mobile hardware. We also create a large-scale synthetic training dataset with domain-randomized geometry and realis + +tic materials. Extensive experiments on both synthetic and real-world datasets show that our networks trained on a synthetic dataset can generalize well to real-world images. Comparisons with recent approaches demonstrate the superior performance of the proposed approach. + +# 1. Introduction + +The estimation of intrinsic attributes of a scene such as shape and reflectance of objects and the illumination condition of the scene is often called as an inverse rendering problem in computer vision [51, 45, 23], and has been a core of many applications such as relighting of images [46], photo-realistic mixed reality [39], and automatic creation of assets for content creation tasks [4]. + +In this work, we are interested in the automatic estimation of the shape and appearance of the object in a scene from only two images. In particular, we represent the shape of the object with a depth map and the appearance as a Bidirectional Reflectance Distribution Function (BRDF) [43]. A BRDF describes the low-level material properties of an object that defines how light is reflected at any given point on an object surface. One of the most popular parametric + +models [12] represents the diffuse and specular properties and the roughness of the surfaces. Since the material properties can vary across the surface, one has to estimate the BRDF at each image pixel for a more realistic appearance (i.e., spatially-varying BRDF (SVBRDF)). + +As the BRDF is dependent on view and light directions and estimating depth from a single 2D image is an ambiguous task, multi-view setups improve the estimation accuracy of both shape [50] and BRDF [39]. Predicting shape and BRDF from only a few images is still very challenging. For shape estimation, the advances in deep learning-based depth estimation allow us to estimate the depth of a single [17, 25], or a pair of images [58] efficiently. As monocular depth estimation is not as accurate as multi-view approaches, we exploit shading cues on the surface to disambiguate the geometric shape [6, 65] in our approach. + +We propose a neural network-based approach to estimate SVBRDF and shape of an object along with the illumination from given two-shot images: flash and no-flash pairs. Some recent deep learning approaches [14, 34, 35] for BRDF estimation use only a single flash image as input. Flash images often have harsh reflective highlights where the input pixel information is saturated in non-HDR images. + +Li et al. [35] uses a single input image and estimates shape and part of the BRDF, such as diffuse albedo and the roughness while ignoring the specular color. In this work, we use flash and no-flash image pairs as input allowing the network to access pixel information from the no-flash image when the corresponding pixels are saturated in the flash image. We focus on practical utility: Our input capture setup follows a real-world scenario where the two-shot images are consecutively taken using a mobile phone camera in burst capture. The system is designed to tackle the misalignment between the two-shot images due to camera shake. + +A pivotal challenge for any learning approach is the need for training data. We tackle this issue by creating a large-scale synthetic dataset. Flash and no-flash images are rendered using high-quality, human-authored SVBRDF textures that are applied to synthetic geometry generated by domain randomization [55] of geometric shapes and backgrounds. Our networks trained on this synthetic data generalize well to real-world object images. + +Another key challenge in shape and SVBRDF estimation is the problem of ambiguity. For example, a darker region in an image could be created by its material color being dark, the area slightly shadowed due to its shape, or the illumination at that spot being darker. We tackle this ambiguity by using a cascaded approach, where separate neural networks are used to estimate shape (depth), illumination, and SVBRDF. Specifically, we first estimate depth and normals using a geometry estimation network. Then the illumination is approximated, followed by SVBRDF reconstruction. Each step is guided by the estimates of the + +previous networks. Finally, shape and SVBRDF are optimized jointly using a refinement network. Each task is implemented by specialized network architectures. Empirically, this cascaded regression approach works reliably better compared to a single-step joint estimation. As a favorable side-effect of this cascaded approach, the size of each network is small compared to a large joint estimation network. This allows the inference networks to even operate on a mobile device. Coupled with two-shot mobile capturing, this presents a highly practical application. + +Quantitative analysis based on a synthetic dataset comprising of realistic object shapes and SVBRDFs demonstrates that our approach produces more accurate estimates of shape and SVBRDF compared to baseline approaches. We also qualitatively demonstrate the applicability of our approach on a real-world two-shot dataset [5]. + +# 2. Related work + +The literature on object SVBRDF and/or shape estimation is vast. Here, we only discuss the representative works that are related to ours. + +BRDF Estimation An exhaustive sampling of each BRDF dimension demands long acquisition times. Several proposed methods focus on reducing acquisition time [27, 3, 16]. These methods introduce capture setups and optimization techniques that reduce the number of images required to reconstruct high-quality SVBRDF. Recently, several attempts [14, 31, 34, 2, 4] reconstruct the SVBRDF on flat surfaces with one or two flash images. These approaches leverage neural networks trained on large amounts of data and resolve the problem of ambiguity to some extent by learning the statistical properties of BRDF parameters. + +For a joint estimation of shape and shading, separate optimization steps for shape and shading are common [26, 40, 19, 7]. Lensch et al. [26] introduce Lumitexels, which stack previously acquired shape information with the luminance information from the input images, to guide the BRDF estimation and to reduce ambiguities in the optimization. Compared to a joint estimation, fewer local minima are found, and the optimization is more robust. Recently, the task of predicting the shape and BRDF of objects or scenes is also addressed using deep learning models [35, 51]. Li et al. [35] predict the shape and BRDF of objects from a single flash image using an initial estimation network followed by several cascaded refinement networks. Here, the BRDF consists of diffuse albedo and specular roughness but lacks the specular albedo. Specularity is, however, essential in rerendering metallic objects, for example. + +Compared to Li et al. [35], our method additionally estimates the SVBRDF with specular albedo. In comparison to flat surface SVBRDF estimation [14, 34, 2, 4], our method handles full objects with shape from any view position. Additionally, due to our unaligned two-shot setup, saturated + +![](images/ffb39ee3dccf99b11e48c4b3cdad5417cba3b0e3eccfb60cdf24599af22850a5.jpg) +Figure 2: Cascaded Network. Overview of the inference pipeline for shape, illumination and SVBRDF estimation. + +flash highlights are better compensated, while still providing the same one-button press capture experience for the user, due to our mobile capture scenario. + +Intrinsic Imaging Intrinsic imaging is the task of decomposing an image of a scene into reflectance (diffuse albedo), and shading [8, 7, 38, 53]. With the advance in deep learning, the problem of separating shape, reflectance, and shading is tackled from labeled data [28, 41, 52], unlabeled [33] and partially labeled data [66, 32, 42, 9]. Due to the very simplistic rendering model, the use cases are limited compared to our SVBRDF estimation setup, which can be used for general re-rendering in new light scenarios. + +Shape Estimation One can obtain high-quality depth from stereo images, but the problem of monocular depth estimation is quite challenging. Monocular depth estimation is predominantly tackled with deep learning [61, 37, 30, 18, 49, 25] in the recent years. This problem is especially challenging as no absolute scale is known from single images, and the depth cues need to be resolved by shading information such as the quadratic light fall-off [36]. + +# 3. Methods + +As briefly discussed in the introduction, to tackle the problem of ambiguity in shape and SVBRDF estimation, we propose a novel cascaded network design for shape, illumination, and SVBRDF predictions. Fig. 2 shows an overview of our cascaded network. + +Problem Setup Our network takes two-shot object images (flash and no-flash) with the corresponding foreground object mask and estimates shape and SVBRDF. We also estimate illumination as a side-prediction to help shape and SVBRDF prediction. The two-shot images can be slightly misaligned to support practical image capture with a handheld camera. The object mask allows us to evaluate only the pixels of the object in the flash image and is easily generated with GrabCut [48]. The object shape is represented + +as depth and normal at each pixel. The depth map provides a rough shape of the object, while the normal map models local changes more precisely. This shape representation is commonly used in various BRDF estimation methods [35, 40]. We use the Cook-Torrence model [12] to represent the BRDF at each pixel with diffuse albedo (3 parameters), specular albedo (3), and roughness (1). Similar to [60, 29], we estimate the environment illumination with 24 spherical Gaussians. + +Network Overview and Motivation In order to tackle the shape/SVBRDF ambiguity, we take the inspiration from traditional optimization techniques [26, 40], which iteratively minimize a residual and alternate between optimizing for shape and/or reflectance. Thus, separate networks are used for shape, illumination, and SVBRDF estimation in a cascaded as well as an iterative manner. Predictions from earlier stages of the networks in the cascade are used as inputs to later networks to guide network predictions to better solutions. In addition, the scene is re-rendered with the current estimates, and refined further using the residual image. + +Since flash and no-flash images are slightly misaligned, shape estimation is less challenging compared to SVBRDF estimation. Mis-alignment in pixels, as well as pixel differences between two-shot images [36], are a good indicator of object depth. Thus, we first predict depth and normals using a specialized merge convolutional network followed by a shape-guided illumination estimation. Then, the SVBRDF is predicted with the current estimates of shape and illumination as additional input. Finally, after computing a residual image, we refine both shape and SVBRDF using a joint refinement network. Refer to the supplementary for network architecture details. + +# 3.1. Shape Estimation with Merge Convolutions + +Since the camera parameters are unknown and the two-shot images have a minimal baseline, traditional structure + +from-motion or stereo solutions are not useful for dense depth estimation. The shape estimation needs to rely on the unstructured perspective shift as well as pixel differences between flash and no-flash images. In order to tightly integrate information from both the images, we design a specialized convolutional network for shape estimation. + +For depth and normal map prediction, we use a U-net like encoder-decoder architecture [47]. Instead of standard convolution blocks, we propose to use novel merge convolution blocks (MergeConv). We concatenate the object mask with each of the two-shot input images as input to the network. Fig. 3 illustrates the MergeConv block. Both the input images or their intermediate features are separately processed by 2D convolutions (Conv2D). The outputs of each Conv2D operation are concatenated in channels with the merged output from the previous MergeConv layer and is processed with another Conv2D operation. Inspired by residual connections in ResNet [20], we add the Conv2D outputs as indicated in Fig. 3. We use 4 MergeConv blocks for the encoder and also 4 for the decoder. During encoding, max pooling for $2 \times$ spatial downsampling is used. For each MergeConv in the decoder, we use $2 \times$ nearest neighbor upsampling. The final depth and normal map estimates are produced using a separate 2D convolution, followed by a sigmoid activation. The rationale behind this MergeConv architecture is to keep separating the process of pathways for both the input images while exchanging (merging) the information between them using a third pathway in the middle. We believe that information in both input images is essential for shape reasoning, and this architecture helps to keep the features from each of the images intact throughout the network. Empirically, we observe reliably better shape predictions with this architecture compared to a standard U-net with a similar number of network parameters. + +Training losses are based on the $\mathcal{L}_2$ distance between ground-truth (GT) and predicted depths, $\mathcal{L}_2^{\mathrm{depth}}$ , as well as the angular distance between GT and predicted normals, $\mathcal{L}_{\mathrm{angular}}^{\mathrm{normals}}$ . Besides, we use a new consistency loss between the predicted normal $\mathbf{n}$ and a normal $\mathbf{n}^*$ derived from the depth information $\mathbf{d}$ , which enforces that the predicted normals follow the curvature of the shape: + +$$ +\mathcal {L} _ {\text {c o n s i s t e n c y}} ^ {\text {n o r m a l s / d e p t h}} = \frac {\mathbf {n}}{\| \mathbf {n} \|} - \frac {\mathbf {n} ^ {*}}{\| \mathbf {n} ^ {*} \|}, \tag {1} +$$ + +$$ +\mathbf {n} ^ {*} = \left[ \begin{array}{l l} \nabla \mathbf {d} & 2 \frac {1}{\mathrm {w i d t h}} \end{array} \right] ^ {T} = \left[ \begin{array}{l l l} \frac {\partial \mathbf {d}}{\partial x} & \frac {\partial \mathbf {d}}{\partial y} & 2 \frac {1}{\mathrm {w i d t h}} \end{array} \right] ^ {T}, \tag {2} +$$ + +The normal $\mathbf{n}^*$ is derived from the depth map using gradients along horizontal $(x)$ and vertical $(y)$ directions. The $z$ component can be considered a strength factor which is derived from the image width. The total loss is a weighted combination of the three losses: $\mathcal{L}_2^{\mathrm{depth}} + \mathcal{L}_{\mathrm{angular}}^{\mathrm{normals}} + 0.5\times$ $\mathcal{L}_{\mathrm{consistency}}^{\mathrm{normals / depth}}$ + +![](images/cb1a471ead887856812b3ffb398ded339e3595c801e60ed65d98b86627aac270.jpg) +Figure 3: Merge convolutions. The merge convolution provides separate pathways for the two-shot inputs and merges the information in a third path. + +# 3.2. Shape Guided Illumination Estimation + +To guide SVBRDF predictions, we also estimate the environment illumination. Hereby, the BRDF prediction can consider environment light and reduce additional highlights as well as improve the albedo colors and intensities. The illumination is represented with 24 spherical Gaussians (SG), where each SG is defined by amplitude, axis, and sharpness. However, we only estimate the amplitude and set the axis and sharpness to cover a unit sphere. The estimation thus only estimates the amplitudes of the SG resulting in 24 RGB values. As the environment illumination can reach very high values and the flash and no-flash input images are in LDR, SG amplitudes are constrained to values between 0 and 2. Refer to the supplementary for environment map samples and their SG representations. + +We use a small convolutional encoder network followed by fully-connected layers for illumination estimation. The network receives two-shot images, object mask, and the previously predicted depth and normals as input. As illumination is reflected on the surface towards the viewer, the previously estimated shape information helps in better illumination estimations. To train the illumination network, we use the $\mathcal{L}_2$ distance between predicted and ground-truth SGs as the loss function. + +# 3.3. Guided SVBRDF Estimation + +SVBRDF estimation becomes a less ambiguous task when conditioned on known object shape and environment illumination. Thus, together with two-shot images, the previously estimated depth, normals, and illumination are used as input to the SVBRDF network to predict diffuse albedo and specular color as well as surface roughness at each pixel. Following recent work on BRDF estimation [31, 34, 14], the U-net architecture [47] is used in our SVBRDF network. + +Differentiable Rendering We develop a differentiable rendering module to re-render the object flash image from the estimated depth, normals, illumination, and SVBRDF. At each surface point, the renderer evaluates the direct light from the flash-light source and the estimated environment illumination and integrates it with the BRDF to compute + +the reflected light [22]. Fast evaluation of the environment illumination is achieved by representing the illumination as well as the BRDF model as spherical Gaussians (SG) [59]. The product of two SGs is an SG, and the integral of an SG has a closed-form solution that is inexpensive to compute. + +Loss Functions for SVBRDF Network The SVBRDF network is trained using a combination of different loss terms: the mean absolute error (MAE) between GT and the predicted SVBRDF parameters as well as a loss between a synthetic direct illumination only flash GT image and rerendered direct illumination flash image. The rendering loss is back-propagated through the differentiable renderer to update the SVBRDF network. As rendering can result in large values from specular highlights, the MAE loss is calculated on $\log(1 + x)$ , where $x$ refers to the direct light only synthetic input and the re-rendered image. + +# 3.4. Joint Shape and SVBRDF Refinement + +In our cascaded network, we use the estimated depth to guide the SVBRDF prediction. Likewise, one can obtain better depth prediction with known SVBRDF. We jointly optimize depth, normals, and SVBRDF using a separate refinement network. For this refinement, all the earlier predictions along with the residual loss image between the re-rendered previous result and the input flash image are used. The network architecture is a small CNN encoder and decoder of 3 steps, each with 4 ResNet blocks [20] in between. The loss function is an MAE loss between the predicted parameter maps and ground truth ones. + +# 3.5. Implementation + +The cascaded networks along with the differentiable renderer are implemented in Tensorflow [1]. The overall pipeline consists of 4 networks, as illustrated in Fig. 2. + +Runtime Each of the networks is relatively small, and the overall pipeline takes $700~\mathrm{ms}$ , including rendering for inference on a $256\times 256$ image on an Nvidia 1080 TI GPU. On a Google Pixel 4 mobile device, the evaluation takes roughly 6 seconds. The rendering step takes about $220\mathrm{ms}$ on a single-threaded desktop CPU (AMD Ryzen 7 1700) and similar speeds on Google Pixel 4. Refer to the supplementary for further runtime analysis. + +Training All the networks are trained for 200 epochs with 1500 steps per epoch using the ADAM optimizer [24] with a learning rate of $2\mathrm{e} - 4$ at the beginning, which is reduced by half after 100 epochs. The networks are trained sequentially as each network in the cascade uses the result of earlier networks as input. + +Mobile Application for Scene Capture and Inference In addition to producing better results, another major advantage of the cascaded network design compared to a single joint network is that each of the sub-networks is small, and the overall network can fit on mobile hardware. We con + +vert the network models to TensorFlow Lite that runs on mobile hardware and develop a highly practical android application that can successively capture two-shot flash and no-flash images and runs the cascaded network to estimate SVBRDF and shape. We use on-device GrabCut [48] to obtain the object mask. In Fig. 8 a prediction from the mobile application is shown. Refer to supplementary for more details on the mobile application and further predictions. + +# 4. Large-scale SVBRDF & Shape Dataset + +It is very time consuming and expensive to scan SVBRF of real-world objects. Since we rely on deep learning techniques for SVBRDF and shape estimation, vast amounts of data are needed for network supervision. We create a large-scale synthetic dataset with realistic SVBRDF materials. + +High-quality Material Collection We gather a collection of publicly available human-authored, high-quality SVBRDF maps from various online sources [44, 13, 64, 10, 54, 57]. The parameterization of these collected SVBRDF maps is for the Cook-Torrence model [12]. In total, the collection consists of 1125 high-resolution SVBRDF maps. To further increase the material pool, we randomly resize and take $768 \times 768$ crops of these material maps. We additionally apply random overlays together with simple contrast, hue, and brightness changes. The final material pool contains 11,250 material maps. Sample material maps are shown in Fig. 4. + +Domain Randomized Object Shapes One option for generating 3D objects is to gather realistic object meshes and apply materials to those. However, it is challenging to collect large-scale object mesh data covering a wide range of object categories. Moreover, mapping the object meshes to the corresponding materials (e.g., using ceramic materials for teapots) would result in a small dataset, and thus, applying random materials to object meshes is a reasonable strategy. We notice that applying random material maps to complex-shaped object meshes would result in distorted texture or tiling artifacts. Because of these numerous challenges, we choose to randomize object shapes to synthesize large-scale data. Following Xu et al. [62], a randomly chosen material is applied to 9 different shape primitives such as spheres, cones, cylinders, tori, etc. We randomly choose 6 to 7 material-mapped primitive shapes and place them randomly to assemble a scene. Sample object shape primitives are shown in Fig. 4. This strategy is similar to domain randomization [55] (DR) that is shown to be useful in high-level semantic tasks such as object detection [56]. Here, we demonstrate the use of DR for the low-level yet complex task of SVBRDF and shape estimation. For simplicity, we refer to our material-mapped and geometry randomized object shapes as DR objects. Fig. 4 shows sample primitive shapes, materials and resulting DR objects with GT shape and SVBRDF parameters. + +![](images/e0f288b9375af7d40195f8eb2b34393a5c73012eafce0757ae81119aa950ddcc.jpg) +Figure 4: Large-scale Synthetic Dataset. (Left) Samples of primitive shapes and materials used for the dataset creation, (Right) The visualization of two examples with various properties. + +HDR Illumination For environment illumination, we collect 285 high-dynamic-range (HDR) illumination maps from [63]. These maps are images in latitude-longitude format, which are wrapped on the inside of a sphere, which acts as a light source for the DR object. + +Rendering We use the Mitsuba [21] renderer to create two-shot flash and no-flash images of a DR object illuminated with a randomly chosen illumination. In total, the DR dataset contains 100K generated scenes. Note that each DR object consists of differently sampled primitive shapes, and the distance of the closest surface from the camera varies across different DR objects. This setup mimics the real-world capture setting where the object distance to the camera varies. For the no-flash image rendering, the camera position is slightly shifted to mimic the camera shake in a mobile scene capture. + +In addition to the two-shot flash and no-flash images, we also render another flash image that only has direct illumination. This direct illumination flash image is used to additionally supervise the SVBRDF network after differentiable rendering (Sec. 3.3). This direct illumination only image is solely used for training supervision and is not required for inference. Besides, we render GT depth, normals, diffuse albedo, specular albedo, and roughness maps, using Mitsuba [21], that are used for direct network supervision. Fig. 4 shows samples from this dataset with more in the supplementary, which also provides additional details on the rendering setup. + +# 5. Experiments + +We evaluate our approach on both synthetic and real datasets and compared with several baseline techniques. In this section, we present both quantitative and qualitative results and refer to the supplementary materials for further visual results and comparisons. + +Test datasets We quantitatively validate the proposed method on synthetic data with realistic object shapes and + +SVBRDF and also qualitatively on a real-world two-shot image dataset [5]. Images of both of these datasets are unseen during network training. For synthetic test data, we collected 20 freely available, fully textured 3D objects with realistic shapes and materials [11]. These objects are rendered using the Mitsuba renderer [21] with unseen HDR illumination maps. Fig. 5 and 6 show samples of two-shot input images of our synthetic test dataset. + +For real-world evaluation, we use two-shot images from the recent 'flash and ambient illuminations dataset' from [5]. We have created foreground object masks on several samples from the 'Objects' and 'Toys' category, as these fit the single object assumption. This dataset does not contain ground truth BRDF parameters, but the visual quality can be inspected on the estimations and also on rerenderings with different camera views and illuminations. + +Metrics To evaluate the quality of the shape and SVBRDF predictions, we mainly use metrics that directly compare the ground truth (GT) and predictions. For the depth and normal estimations, a Mean Square Error (MSE) is a fitting candidate. To enable comparisons with methods that predict relative depths, we employ a Scale-Shift Invariant Metric as in [25]. Refer to the supplementary for details. For SVBRDFs, there exists no clear metric which aligns with human perception of materials. Following previous works, we also use the MSE metric on SVBRDF prediction maps. + +# 5.1. Ablation Study + +Within our framework, we empirically evaluate different choices we make in our network design. + +Cascade vs. Joint Network We compare our cascaded network with a single large joint network that estimates all the shape and SVBRDF parameters together. For a fair comparison, we design a joint (JN) that has a comparable number of network parameters as our cascaded network (CN) ('Ours-CN' vs. 'Ours-JN'). The JN follows the U-Net [47] architecture. Table 1 shows the quantitative comparisons between them. Results indicate that the CN consistently + +![](images/60ddf491d01fd8cdde70670242a6f464912d308aa5d56e82e3dee96a0edf9b5d.jpg) +Figure 5: Comparison with Li et al. [35]. Ours estimates the diffuse, depth and normal more accurately in particular. + +![](images/24501d58082ab05d202a7fe014813d7d853928688d75b1940dd51b4b9568f433.jpg) +Figure 6: Comparison with Barron et al. [7] (SIRFS). Barron et al. does not estimate specular and roughness parameters. + +
MethodDiffuseSpecularRoughnessNormalDepth
MiDaS [25]NANANANA[0.006]
SIRFS [7][0.033]NANA0.089[0.021]
RAFII [42][0.018]NANANANA
Li et al. [35]0.160/[0.019]NA0.0720.034[0.024]
Ours-JN0.065/[0.022]0.0530.0640.025[0.005]
Ours-CN0.060/[0.018]0.0470.0610.021[0.004]
+ +Table 1: State-of-the-art comparison. The Mean Square Error (MSE) on a sample dataset of 20 unseen objects. Scale and shift invariant metric in [. .] where it applies. For the diffuse color this metric is only scale invariant. + +outperforms JN on both SVBRDF and shape estimations, by a significant margin. This empirically underlines the usefulness of our guided stage-wise estimation and joint refinement compared to using a single large network for joint SVBRDF and shape estimation. + +Merge vs. Standard Convolutions for Shape Estimation Another technical innovation in this work is the use of MergeConv blocks (Sec. 3.1) in the shape estimation network instead of standard convolution. Overall the depth estimation error decreased from a MSE of 0.021 to 0.016 and the normal MSE from 0.026 to 0.021. + +# 5.2. Comparisons with state-of-the-art + +As per our knowledge, we are the first work that uses two-shot images as input and does complete SVBRDF estimation, including specular color and shape estimation for objects. Most existing closely related techniques usually use a single flash image as input and either work only on flat surfaces [14, 15, 34, 31], or do not estimate the specular color [35]. Although our approach features a unique setting, we perform the comparisons with SIRFS [7], Li et al. [35], and RAFII [42] on SVBRDF and shape estimation. SIRFS [7] uses a no-flash single image as input and predicts diffuse albedo, shading, and shape using an optimization-based approach. RAFII [42] uses a single non-flash image to perform the intrinsic decomposition. Visual results are shown in the supplementary. Based on a single flash image Li et al. [35] is a recent deep learning approach that predicts diffuse albedo, roughness, normal, and depth maps. + +Quantitative results on the 20 objects synthetic test dataset shown in Table 1 demonstrate the superior performance of our approach (Ours-CascadeNet) compared to both SIRFS [7] and Li et al. [35]. Since SIRFS predicts diffuse albedo only up to a scale factor, we also report scale-invariant MSE scores on diffuse albedo. Fig. 5 shows a visual comparison with Li et al. [35]. Our estimations are also visually closer to GT. Especially, we can observe clear visual differences in predicted diffuse albedos where the light information is separated much better in our result. Furthermore, the general shape of the object in the normal map of our method follows the contour of the croissant, while the method of Li et al. predicts a mostly flat shape. The details + +![](images/3f953dfe170c08333615b5088f6871b95aabf9b3fa6b1664163f0ee72737358b.jpg) +Figure 7: Real-world comparison. Comparison with Li et al. [35] on a real-world sample from [5]. + +![](images/0c6d3acfb2951d2ca06985ff56d62743bbf00197f1b80f35afd30c8c77f700e4.jpg) +Figure 8: Mobile capture and inference. A result from our mobile application that does two-shot image capture followed by SVBRDF and shape estimation. + +in the roughness and normal map, on the other hand, are not perfectly predicted by neither method. + +Fig. 6 shows a visual comparison with SIRFS, where we again observe our method predictions to be closer to GT. Here, the improvements in the diffuse and normal map are apparent. The SIRFS method fails in this example to separate shape from shading. + +A visual comparison between Li et al. [35] on a real-world example from Yagiz et al. [5] is shown in Fig. 7. Our method seems to capture the object color as well as the shape better. The shape from Li et al. is predicted as a nearly flat surface. This is apparent in the novel re-rendering. Our predicted normal map is also smoother with fewer artifacts and follows the bottle shape closely. + +For evaluating depth prediction, we compare our depth estimates against those from a new state-of-the-art monocular depth network of MiDaS [25]. MiDaS is trained with several existing depth datasets and is quiet robust to different scene types. MiDaS [25] predicts the relative depth, and for comparisons, a scale-shift invariant MSE metric is used. Table 1 shows the results indicating better depth estimations using our approach. We present qualitative results in the supplementary. + +Mobile capture and inference To further showcase our real-world performance, Fig. 8 presents an example captured with our mobile application. As seen, most parameters are plausible. The lid on top of the electric kettle is, however, estimated slightly too far away in the depth map. This can be attributed to the 'deep is dark' ambiguity. Here, + +we want to point out that there is an additional challenge of an unknown mobile camera capture pipeline. A RAW image capture would avoid most of the unknown image preprocessing in modern cameras. + +# 6. Conclusion + +We proposed a novel cascaded network design coupled with guided prediction networks for SVBRDF and shape estimation from two-shot images. Our key insight is that the separation of tasks and stage-wise prediction can lead to significantly better results compared to joint estimation with a single large network. We use a two-shot capture setting, which is practical and helps in estimating higher quality SVBRDF and shape compared to existing works. All of our image capture, network inference, and rendering can be easily implemented on mobile hardware. Another key contribution is the creation of large-scale synthetic training data with domain-randomized geometry and carefully collected materials. We show that networks trained on this data can generalize well to real-world objects. In the future, we would like to tackle the SVBRDF estimation of more complex mirror-like objects by incorporating reflection removal techniques and anisotropic BRDF models. + +Acknowledgement This work was partly funded by the Deutsche Forschungsgemeinschaft (German Research Foundation) - Projektnummer 276693517 - SFB 1233. We thank Ben Eckart for his help in the supplementary video. + +# References + +[1] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, S. Ghemawat, I. Goodfellow, A. Harp, G. Irving, M. Isard, Y. Jia, R. Jozefowicz, L. Kaiser, M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore, D. Murray, C. Olah, M. Schuster, J. Shlens, B. Steiner, I. Sutskever, K. Talwar, P. Tucker, V. Vanhoucke, V. Vasudevan, F. Viégas, O. Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu, and X. Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. 5 +[2] M. Aittala, T. Aila, and J. Lehtinen. Reflectance modeling by neural texture synthesis. In ACM Transactions on Graphics (ToG), 2018. 2 +[3] M. Aittala, T. Weyrich, and J. Lehtinen. Practical svbrdf capture in the frequency domain. In ACM Transactions on Graphics (SIGGRAPH), 2013. 2 +[4] M. Aittala, T. Weyrich, and J. Lehtinen. Two-shot SVBRDF capture for stationary materials. In ACM Transactions on Graphics (ToG), 2015. 1, 2 +[5] Y. Aksoy, C. Kim, P. Kellnhofer, S. Paris, M. Elgharib, M. Pollefeys, and W. Matusik. A dataset of flash and ambient illumination pairs from the crowd. In European Conference on Computer Vision (ECCV), 2018. 1, 2, 6, 8 +[6] N. G. Alldrin, T. Zickler, and D. Kriegman. Photometric stereo with non-parametric and spatially-varying reflectance. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2008. 2 +[7] J. T. Barron and J. Malik. Shape, illumination, and reflectance from shading. In IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 2015. 2, 3, 7 +[8] H. Barrow and J. M. Tenenbaum. Recovering intrinsic scene characteristics from images. Computer Vision Systems, 1978. 3 +[9] S. Bell, K. Bala, and N. Snavely. Intrinsic images in the wild. In ACM Transactions on Graphics (SIGGRAPH), 2014. 3 +[10] Brian. freepbr, 2019. https://freepbr.com. 5 +[11] CgTrader. Free 3d models, 2019. www.cg,trader.com. 6 +[12] R. L. Cook and K. E. Torrance. A reflectance model for computer graphics. ACM Transactions on Graphics (ToG), 1982. 2, 3, 5 +[13] L. Demes. Cc0 textures, 2019. https://cc0textures.com/. 5 +[14] V. Deschaintre, M. Aitalla, F. Durand, G. Drettakis, and A. Bousseau. Single-image SVBRDF capture with a rendering-aware deep network. In ACM Transactions on Graphics (ToG), 2018. 2, 4, 7 +[15] V. Deschaintre, M. Aitalla, F. Durand, G. Drettakis, and A. Bousseau. Flexible SVBRDF capture with a multi-image deep network. In Eurographics Symposium on Rendering, 2019. 7 +[16] Y. Dong, J. Wang, X. Tong, J. Snyder, Y. Lan, M. Ben-Ezra, and B. Guo. Manifold bootstrapping for svbrdf capture. In ACM Transactions on Graphics (SIGGRAPH), 2010. 2 +[17] H. Fu, M. Gong, C. Wang, K. Batmanghelich, and D. Tao. Deep ordinal regression network for monocular depth estimation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 + +[18] H. Fu, M. Gong, C. Wang, K. Batmanghelich, and D. Tao. Deep Ordinal Regression Network for Monocular Depth Estimation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 3 +[19] D. B. Goldman, B. Curless, A. Hertzmann, and S. M. Seitz. Shape and spatially-varying BRDFs from photometric stereo. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 2009. 2 +[20] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision (ECCV), 2016. 4, 5 +[21] W. Jakob. Mitsuba - physically based renderer, 2018. https://www.mitsuba-renderer.org/. 6 +[22] J. T. Kajiya. The rendering equation. In ACM Transactions on Graphics (SIGGRAPH), 1986. 5 +[23] K. Kim, J. Gu, S. Tyree, P. Molchanov, M. Nießner, and J. Kautz. A lightweight approach for on-the-fly reflectance estimation. In IEEE International Conference on Computer Vision (ICCV), 2017. 1 +[24] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 5 +[25] K. Lasinger, R. Ranftl, K. Schindler, and V. Koltun. Towards robust monocular depth estimation: Mixing datasets for zero-shot cross-dataset transfer. ArXiv e-prints, 2019. 2, 3, 6, 7, 8 +[26] H. Lensch, J. Kautz, M. Gosele, and H.-P. Seidel. Image-based reconstruction of spatially varying materials. In Eurographics Conference on Rendering, 2001. 2, 3 +[27] H. P. Lensch, J. Lang, M. S. Asla, and H. Seidel. Planned sampling of spatially varying brdfs. In Computer graphics forum, 2003. 2 +[28] L. Lettry, K. Vanhoey, and L. Van Gool. DARN: a deep adversarial residual network for intrinsic image decomposition. In IEEE International Conference on Computer Vision (ICCV), 2018. 3 +[29] M. Li et al. Deep spherical Gaussian illumination estimation for indoor scene. In ACM Multimedia Asia Conference (MM Asia), 2019. 3 +[30] R. Li, K. Xian, C. Shen, Z. Cao, H. Lu, and L. Hang. Deep attention-based classification network for robust depth prediction. In Asian Conference on Computer Vision (ACCV), 2019. 3 +[31] X. Li, Y. Dong, P. Peers, and X. Tong. Modeling surface appearance from a single photograph using self-augmented convolutional neural networks. In ACM Transactions on Graphics (ToG), 2017. 2, 4, 7 +[32] Z. Li and N. Snavely. Cgintrinnsics: Better intrinsic image decomposition through physically-based rendering. In European Conference on Computer Vision (ECCV), 2018. 3 +[33] Z. Li and N. Snavely. Learning intrinsic image decomposition from watching the world. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 3 +[34] Z. Li, K. Sunkavalli, and M. Chandraker. Materials for masses: SVBRDF acquisition with a single mobile phone image. In European Conference on Computer Vision (ECCV), 2018. 2, 4, 7 + +[35] Z. Li, Z. Xu, R. Ramamoorthi, K. Sunkavalli, and M. Chandraker. Learning to reconstruct shape and spatially-varying reflectance from a single image. In ACM Transactions on Graphics (SIGGRAPH ASIA), 2018. 2, 3, 7, 8 +[36] M. Liao, L. Wang, R. Yang, and M. Gong. Light fall-off stereo. In IEEE International Conference on Computer Vision (ICCV), 2007. 3 +[37] F. Liu, C. Shen, G. Lin, and I. D. Reid. Learning depth from single monocular images using deep convolutional neural fields. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 2016. 3 +[38] R. Maier, K. Kim, D. Cremers, J. Kautz, and M. Nießner. Intrinsic3D: High-quality 3D reconstruction by joint appearance and geometry optimization with spatially-varying lighting. In IEEE International Conference on Computer Vision (ICCV), 2017. 3 +[39] A. Meka, M. Maximov, M. Zollhoefer, A. Chatterjee, H.-P. Seidel, C. Richardt, and C. Theobalt. Lime: Live intrinsic material estimation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2 +[40] G. Nam, D. Gutierrez, and M. H. Kim. Practical SVBRDF acquisition of 3d objects with unstructured flash photography. In ACM Transactions on Graphics (SIGGRAPH ASIA), 2018. 2, 3 +[41] T. Narihira, M. Maire, and S. X. Yu. Direct intrinsics: Learning albedo-shading decomposition by convolutional regression. In IEEE International Conference on Computer Vision (ICCV), 2015. 3 +[42] T. Nestmeyer and P. V. Gehler. Reflectance adaptive filtering improves intrinsic image estimation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 3, 7 +[43] F. E. Nicodemus. Directional reflectance and emissivity of an opaque surface. Applied Optics, 1965. 1 +[44] J. Paulo. 3d textures, 2019. https://3dtextures.me/. 5 +[45] R. Ramamoorthi and P. Hanrahan. A signal-processing framework for inverse rendering. In ACM Transactions on Graphics (SIGGRAPH), 2001. 1 +[46] P. Ren, Y. Dong, S. Lin, X. Tong, and B. Guo. Image based relighting using neural networks. ACM Transactions on Graphics (ToG), 2015. 1 +[47] O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In N. Navab, J. Hornegger, W. M. Wells, and A. F. Frangi, editors, Medical Image Computing and Computer-Assisted Intervention - MICCAI 2015. Springer International Publishing, 2015. 4, 6 +[48] C. Rother, V. Kolmogorov, and A. Blake. Grabcut - interactive foreground extraction using iterated graph cuts. ACM Transactions on Graphics (SIGGRAPH), 2004. 3, 5 +[49] A. Roy and S. Todorovic. Monocular Depth Estimation Using Neural Regression Forest. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 3 +[50] J. L. Schonberger and J.-M. Frahm. Structure-from-motion revisited. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 2 + +[51] S. Sengupta, J. Gu, K. Kim, G. Liu, D. W. Jacobs, and J. Kautz. Neural inverse rendering of an indoor scene from a single image. In IEEE International Conference on Computer Vision (ICCV), 2019. 1, 2 +[52] J. Shi, Y. Dong, H. Su, and S. X. Yu. Learning non-lambertian object intrinsics across shapenet categories. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 3 +[53] M. F. Tappen, W. T. Freeman, and E. H. Adelson. Recovering intrinsic images from a single image. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 2005. 3 +[54] S. Textures. Share textures, 2019. https://sharetextures.com. 5 +[55] J. Tobin, R. Fong, A. Ray, J. Schneider, Z. Wojciech, and P. Abeel. Domain randomization for transferring deep neural networks from simulation to the real world. In IEEE/RSJ International Conference on Intelligent RObots and Systems IROS, 2017. 2, 5 +[56] J. Tremblay, A. Prakash, D. Acuna, M. Brophy, V. Jampani, C. Anil, T. To, E. Cameracci, S. Boochoon, and S. Birchfield. Training deep networks with synthetic data: Bridging the reality gap by domain randomization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 969–977, 2018. 5 +[57] R. Tuytel. Texture haven, 2019. https://texturehaven.com. 5 +[58] B. Ummenhofer, H. Zhou, J. Uhrig, N. Mayer, E. Ilg, A. Dosovitskiy, and T. Brox. DeMoN: depth and motion network for learning monocular stereo. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2 +[59] J. Wang, P. Ren, M. Gong, J. Snyder, and B. Guo. All-frequency rendering of dynamic, spatially-varying reflectance. In ACM Transactions on Graphics (SIGGRAPH ASIA), 2009. 5 +[60] T. Y. Wang et al. Joint material and illumination estimation from photo sets in the wild. In International Conference on 3D Vision (3DV), 2018. 3 +[61] X. Wang, D. Fouhey, and A. Gupta. Designing deep networks for surface normal estimation. In IEEE International Conference on Computer Vision (ICCV), 2015. 3 +[62] Z. Xu et al. Deep image-based relighting from optimal sparse samples. TOG, 2018. 5 +[63] G. Zaal. Hdri haven, 2019. https://hdrihaven.com/. 6 +[64] D. Zgraggen. cgbookcase, 2019. https://cgbookcase.com/. 5 +[65] R. Zhang, P.-S. Tsai, J. E. Cryer, and M. Shah. Shape from shading: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 1999. 2 +[66] T. Zhou, P. Krahenbuhl, and A. A. Efros. Learning data-driven reflectance priors for intrinsic image decomposition. In IEEE International Conference on Computer Vision (ICCV), 2015. 3 \ No newline at end of file diff --git a/twoshotspatiallyvaryingbrdfandshapeestimation/images.zip b/twoshotspatiallyvaryingbrdfandshapeestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..000371f2b237358a3cafca4026777aaaba1367ea --- /dev/null +++ b/twoshotspatiallyvaryingbrdfandshapeestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d674dbd43647c28146ce2f1030b5ae1e2726916cbbfefe2089ac5e8fdf1041e4 +size 457514 diff --git a/twoshotspatiallyvaryingbrdfandshapeestimation/layout.json b/twoshotspatiallyvaryingbrdfandshapeestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..083787e0bfe10c0e7ac8f4fa4629a6c59862a40e --- /dev/null +++ b/twoshotspatiallyvaryingbrdfandshapeestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf25d8b930f6a9f10883ec62db08d47f2181dcaa42733f31eca482dc764ff069 +size 342852 diff --git a/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/867d630a-e85e-45e1-9716-75ee56698c1a_content_list.json b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/867d630a-e85e-45e1-9716-75ee56698c1a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..78e59e32fc583489670487e45acae275161265d7 --- /dev/null +++ b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/867d630a-e85e-45e1-9716-75ee56698c1a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad46875f0a56f74db1f2fabe7e4ffbb339dfc1c5712ffeaebd0f95d42eabaaeb +size 66558 diff --git a/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/867d630a-e85e-45e1-9716-75ee56698c1a_model.json b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/867d630a-e85e-45e1-9716-75ee56698c1a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fb4c624eb09d2826a5afe046501e7b86649e06a4 --- /dev/null +++ b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/867d630a-e85e-45e1-9716-75ee56698c1a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a677f5fb433ab4c8f5a71dd9bc7146abc7aa0e1b9d6b57d03497834299d5eafe +size 81742 diff --git a/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/867d630a-e85e-45e1-9716-75ee56698c1a_origin.pdf b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/867d630a-e85e-45e1-9716-75ee56698c1a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9f2754b084a760916878d2159fee4435a7cb351c --- /dev/null +++ b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/867d630a-e85e-45e1-9716-75ee56698c1a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4abb79abff4b660bd020519414d34190ded50e38c9820c777ee81fde29045173 +size 1647081 diff --git a/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/full.md b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/full.md new file mode 100644 index 0000000000000000000000000000000000000000..12e750cf9f0a640a0693257e157ae6af20355d52 --- /dev/null +++ b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/full.md @@ -0,0 +1,300 @@ +# Two-Stage Peer-Regularized Feature Recombination for Arbitrary Image Style Transfer + +Jan Svoboda $^{1,2}$ , Asha Anoosheh $^{1}$ , Christian Osendorfer $^{1}$ , Jonathan Masci $^{1}$ $^{1}$ NNAISENSE, Switzerland $^{2}$ Universita della Svizzera italiana, Switzerland +{jan.svoboda,asha.anoosheh,christian.osendorfer,jonathan.masci}@nnaisense.com + +# Abstract + +This paper introduces a neural style transfer model to generate a stylized image conditioning on a set of examples describing the desired style. The proposed solution produces high-quality images even in the zero-shot setting and allows for more freedom in changes to the content geometry. This is made possible by introducing a novel Two-Stage Peer-Regularization Layer that recombines style and content in latent space by means of a custom graph convolutional layer. Contrary to the vast majority of existing solutions, our model does not depend on any pre-trained networks for computing perceptual losses and can be trained fully end-to-end thanks to a new set of cyclic losses that operate directly in latent space and not on the RGB images. + +An extensive ablation study confirms the usefulness of the proposed losses and of the Two-Stage Peer-Regularization Layer, with qualitative results that are competitive with respect to the current state of the art using a single model for all presented styles. This opens the door to more abstract and artistic neural image generation scenarios, along with simpler deployment of the model. + +# 1. Introduction + +Neural style transfer (NST), introduced by the seminal work of Gatys [8], is an area of research that focuses on models that transform the visual appearance of an input image (or video) to match the style of a desired target image. For example, a user may want to convert a given photo to appear as if Van Gogh had painted the scene. + +NST has seen a tremendous growth within the deep learning community and spans a wide spectrum of applications e.g. converting time-of-day [43, 12], mapping among artwork and photos [1, 43, 12], transferring facial expressions [17], transforming animal species [43, 12], etc. + +Despite their popularity and often-quality results, current NST approaches are not free from limitations. Firstly, the original formulation of Gatys et al. requires a new op + +![](images/dceb27ccd08fab0a9a59ec445c5696b96c87fcfe4a95da961360512d3ea30b2f.jpg) + +![](images/179fab56fd2307a9cb60df7ff543f27978d86d8ad17f2c34e406ec1a5229fea9.jpg) + +![](images/4616aac6cefec3c426694995eff1917c769e7ab9457d2e20b6d2d12e3608609c.jpg) + +![](images/43b5b9f16319b9fd89f64c86dd687267f579374056221a34a546fd3788d549a7.jpg) +Figure 1. Our model is able to take a content image and convert it into arbitrary target style in a forward manner. In this figure, a photo in the middle is converted into styles from 4 different painters, (left side, from top to bottom) Picasso, Kirchner, Roerich and Monet. + +![](images/8d6c563985d4342c9e85865790a6dca4b2ff920dec150fd88183f6b7d50927cd.jpg) + +![](images/4a89ef03cf313049f056af20e50e5fac01c7c5f053142a54e2213e461a1e95b4.jpg) + +![](images/6b90c7cdbff11e3657dc63c718f9170c08fd821cbe95d8e4b8b8651b56d61c68.jpg) + +![](images/3f1eaed6a1f13af48154ecbce7b174ab6d1a4f8a918453db0ccbd226ba9c1c1c.jpg) + +![](images/eebd886021e548c3ee8e0dae6c38b536a13c9dcb66a7a77f4045c5e953dfaff3.jpg) + +![](images/71e71a7341fe13ad74b6b287616b78e2cf41bd666a499ccc7d61ae06c4fb6422.jpg) + +timization process for each transfer performed, making it impractical for many real-world scenarios. In addition, the method relies heavily on pre-trained networks, usually borrowed from classification tasks, that are known to be suboptimal and have recently been shown to be biased toward texture rather than structure [9]. To overcome this first limitation, deep neural networks have been proposed to approx- + +imate the lengthy optimization procedure in a single feed forward step thereby making the models amenable for real-time processing. Of notable mention in this regard are the works of Johnson et al. [15] and Ulyanov et al. [35]. + +Secondly, when a neural network is used to overcome the computational burden of [8], training of a model for every desired style image is required due to the limited-capacity of conventional models in encoding multiple styles into the weights of the network. This greatly narrows down the applicability of the method for use cases where the concept of style cannot be defined a-priori and needs to be inferred from examples. With respect to this second limitation, recent works attempted to separate style and content in feature space (latent space) to allow generalization to a style characterized by an additional input image, or set of images. The most widespread work in this family is AdaIN [11], a specific case of FiLM [30]. The current state of the art allows to control the amount of stylization applied, interpolating between different styles, and using masks to convert different regions of image into different styles [11, 32]. + +Beyond the study of new network architectures for improving NST, research has resulted in better suited loss functions to train the models. The perceptual loss [8, 15] with a pre-trained VGG19 classifier [33] is very commonly used in this task as it, supposedly, captures high-level features of the image. However, this assumption has been recently challenged in [9]. Cycle-GAN [43] proposed a new cycle consistent loss that does not require one-to-one correspondence between the input and the target images, thus lifting the heavy burden of data annotation. + +The problem of image style transfer is challenging, because the style of an image is expressed by both local properties (e.g. typical shapes of objects, etc.) and global properties (e.g. textures, etc.). Of the many approaches for modelling the content and style of an image that have been proposed in the past, encoding of the information in a lower dimensional latent space has shown very promising results. We therefore advocate to model this hierarchy in latent space by local aggregation of pixel-wise features and by the use of metric learning to separate different styles. To the best of our knowledge, this has not been addressed by previous approaches explicitly. + +In the presence of a well structured latent space where style and content are fully separated, transfer can be easily performed by exchanging the style information in latent space between the input and the conditioning style images, without the need to store the transformation in the decoder weights. Such an approach is independent with respect to feature normalization and further avoids the need for rather problematic pre-trained models. + +However, the content and style of an image are not completely separable. The content of an image exhibits changes in geometry depending on what style it is painted with. Re + +cently, Kotovenko et al. [20] has proposed a content transformer block in an adversarial setting, where the model is trained in two stages. First a style transfer network is optimized. Then it is fixed and content transformer block is optimized instead, learning to account for changes in geometry relevant to a given style. The style exchange therefore becomes two-stage. Modeling such dependence has been shown to improve the visual results dramatically. + +This paper addresses the NST setting where style is externally defined by a set of input images to allow transfer from arbitrary domains and to tackle the challenging zero-shot style-transfer scenario by introducing a novel feature regularization layer capable of recombining global and local style content from the input style image. It is achieved by borrowing ideas from geometric deep learning (GDL) [2] and modelling pixel-wise graph of peers on the feature maps in the latent space. To the best of our knowledge, this is the first work that successfully leverages the power of GDL in the style transfer scenario. We successfully demonstrate this in a series of zero-shot style transfer experiments, whose generated result would not be possible if the style was not actually inferred from the respective input images. + +This work addresses the aforementioned limitations of NST models by making the following contributions: + +- A state-of-the-art approach for NST using a custom graph convolutional layer that recombines style and content in latent space; +- Novel combination of existing losses that allows end-to-end training without the need for any pre-trained model (e.g. VGG) to compute perceptual loss; +- Constructing a globally- and locally-combined latent space for content and style information and imposing structure on it by means of metric learning. + +# 2. Background + +The key component of any NST system is the modeling and extraction of the "style" from an image (though the term is partially subjective). As style is often related to texture, a natural way to model it is to use visual texture modeling methods [39]. Such methods can either exploit texture image statistics (e.g. Gram matrix) [8] or model textures using Markov Random Fields (MRFs) [6]. The following paragraphs provide an overview of the style transfer literature introduced by [14]. + +Image-Optimization-Based Online Neural Methods. The method from Gatys et al. [8] may be the most representative of this category. While experimenting with representations from intermediate layers of the VGG-19 network, the authors observed that a deep convolutional network is able to extract image content from an arbitrary + +photograph, as well as some appearance information from works of art. The content is represented by a low-level layer of VGG-19, whereas the style is expressed by a combination of activations from several higher layers, whose statistics are described using the network features Gram matrix. Li [25] later pointed out that the Gram matrix representation can be generalized using a formulation based on Maximum Mean Discrepancy (MMD). Using MMD with a quadratic polynomial kernel gives results very similar to the Gram matrix-based approach, while being computationally more efficient. Other non-parametric approaches based on MRFs operating on patches were introduced by Li and Wand [21]. + +Model-Optimization-Based Offline Neural Methods. These techniques can generally be divided into several subgroups [14]. One-Style-Per-Model methods need to train a separate model for each new target style [15, 35, 22], rendering them rather impractical for dynamic and frequent use. A notable member of this family is the work by Ulyanov et al. [36] introducing Instance Normalization (IN), better suited for style-transfer applications than Batch Normalization (BN). + +Multiple-Styles-Per-Model methods attempt to assign a small number of parameters to each style. Dumoulin [5] proposed an extension of IN called Conditional Instance Normalization (CIN), StyleBank [3] learns filtering kernels for different styles, and other works instead feed the style and content as two separate inputs [23, 40] similarly to our approach. + +Arbitrary-Style-Per-Model methods either treat the style information in a non-parametric, i.e. as in StyleSwap [4], or parametric manner using summary statistics, such as in Adaptive Instance Normalization (AdaIN) [11]. AdaIN, instead of learning global normalization parameters during training, uses first moment statistics of the style image features as normalization parameters. Later, Li et al. [24] introduced a variant of AdaIN using Whitening and Coloring Transformations (WTC). Going towards zero-shot style transfer, ZM-Net [38] proposed a transformation network with dynamic instance normalization to tackle the zero-shot transfer problem. More recently, Avatar-Net [32] proposed the use of a "style decorator" to re-create content features by semantically aligning input style features with those derived from the style image. + +Other methods. Cycle-GAN [43] introduced a cycle-consistency loss on the reconstructed images that delivers very appealing results without the need for aligned input and target pairs. However, it still requires one model per style. The approach was extended in Combo-GAN [1], which lifted this limitation and allowed for a practical multi-style transfer; however, also this method requires a decoder-per-style. + +Sanakoyeu et al. [31] observed that the applying the cycle consistency loss in image space might be overrestricting the stylization process. They also show how to use a set of images, rather than a single one, to better express the style of an artwork. In order to provide more accurate style transfer with respect to an image content, Kotovenko et al. [20] designed the so called content transformer block, an additional sub-network that is supposed to finetune a trained style transfer model to a particular content. The strict consistency loss was later relaxed by MUNIT [12], a multi-modal extension of UNIT [26], which imposes it in latent space instead, providing more freedom to the image reconstruction process. Later, the same authors proposed FUNIT [27], a few-shot extension of MUNIT. + +Towards exploring the disentanglement of different styles in the latent space, Kotovenko et al. [19] proposed a fixpoint triplet loss in order to perform metric learning in the style latent space, showing how to separate two different styles within a single model. + +# 3. Method + +The core idea of our work is a region-based mechanism that exchanges the style between input and target style images, similarly to StyleSwap [4], while preserving the semantic content. To successfully achieve this, style and content information must be well separated, disentangled. We advocate the use of metric learning to directly enforce separation among different styles, which has been experimentally shown to greatly reduce the amount of style dependent information retained in the decoder. Furthermore, in order to account for geometric changes in content that are bound to a certain style, we model the style transfer as a two-stage process, first performing style transfer, and then in the second step modifying the content geometry accordingly. This is done using the Two-stage Peer-regularized Feature Recombination (TPFR) module presented below. + +# 3.1. Architecture and losses + +The proposed system architecture is shown in Figure 2. To prevent the main decoder from encoding the stylization in its weights, auxiliary decoder [7] is used during training to optimize the parameters of the encoder and decoder independently. The yellow module in Figure 2 is trained as an autoencoder (AE) [29, 41, 28] to reconstruct the input. The green module, instead, is trained as a GAN[10] to generate the stylized version of the input using the encoder from the yellow module, with fixed parameters. The optimization of both modules is interleaved together with the discriminator. Additionally, following the analysis from Martineau et al. [16], the Relativistic Average GAN (RAGAN) is used as our adversarial loss formulation, which has shown to be more stable and to produce more natural-looking images than traditionally used GAN losses. + +![](images/aaae581d4b159009cb208b7dc5043e230b1c94f0f9cef2b8352671cd4466039d.jpg) +Figure 2. The proposed architecture with two decoder modules. The yellow decoder is the auxiliary decoder, while the main decoder is depicted in green. Dashed lines indicate lack of gradient propagation. + +Let us now describe the four main building blocks of our approach in detail1. We denote $x_{i}, x_{t}, x_{f}$ an input image, a target and fake image, respectively. Our model consists of an encoder $E(\cdot)$ generating the latent representations, an auxiliary decoder $\tilde{D}(\cdot)$ taking a single latent code as input, a main decoder $D(\cdot)$ taking one latent code as input, and TPFR module $T(\cdot, \cdot)$ receiving two latent codes. Generated latent codes are denoted $z_{i} = E(x_{i}), z_{t} = E(x_{t})$ . We further denote $(\cdot)_{C}, (\cdot)_{S}$ the content and style part of the latent code, respectively. + +The distance $f$ between two latent representations is defined as the smooth L1 norm [13] in order to stabilize training and to avoid exploding gradients: + +$$ +f [ d ] = \frac {1}{W \times H} \sum_ {i = 1} ^ {W \times H} \sum_ {j = 1} ^ {N} d _ {i, j}, \tag {1} +$$ + +$$ +d _ {i, j} = \left\{ \begin{array}{l l} 0. 5 d _ {i, j} ^ {2} & \text {i f} d _ {i, j} < 1 \\ | d _ {i, j} | - 0. 5 & \text {o t h e r w i s e} \end{array} \right., +$$ + +where $d = z_{1} - z_{2}$ , $z_{1}$ and $z_{2}$ are two different feature embeddings with $N$ channels and $W \times H$ is the spatial dimension of each channel. + +Encoder. The encoder used to produce latent representation of all input images is composed of several strided convolutional layers for downsampling followed by multiple ResNet blocks. The latent code $z$ is composed by two parts: the content part, $(z)_C$ , which holds information about the image content (e.g. objects, position, scale, etc.), and the style part, $(z)_S$ , which encodes the style that the content is presented in (e.g. level of detail, shapes, etc.). The style component of the latent code $(z)_S$ is further split equally into $(z)_S = [(z)_S^{loc}, (z)_S^{glob}]$ . Here, $(z)_S^{loc}$ encodes local style information per pixel of each feature map, while + +$(z)_S^{glob}$ undergoes further downsampling via a small subnetwork to generate a single value per feature map. + +Auxiliary decoder. The Auxiliary decoder reconstructs an image from its latent representation and is used only during training to train the encoder module. It is composed of several ResNet blocks followed by fractionally-strided convolutional layers to reconstruct the original image. The loss is inspired by [31, 19] and is composed of the following parts. A content feature cycle loss that pulls together latent codes representing the same content: + +$$ +\begin{array}{l} L _ {z _ {\text {c o n t}}} = f \left[ E \left(D \left(T \left(z _ {i}, z _ {t}\right)\right)\right) _ {C} - \left(z _ {i}\right) _ {C} \right] \tag {2} \\ + f \left[ E \left(D \left(T \left(z _ {i}, z _ {i}\right)\right)\right) _ {C} - \left(z _ {i}\right) _ {C} \right] \\ \end{array} +$$ + +A metric learning loss, enforcing clustering of the style part of the latent representations: + +$$ +\begin{array}{l} L _ {z _ {\text {s t a t e}}} ^ {\text {p o s}} = f \left[ \left(z _ {i _ {1}}\right) _ {S} - \left(z _ {i _ {2}}\right) _ {S} \right] + f \left[ \left(z _ {t _ {1}}\right) _ {S} - \left(z _ {t _ {2}}\right) _ {S} \right] \\ L _ {z _ {\text {s t y l e}}} ^ {\text {n e g}} = f \left[ \left(z _ {i _ {1}}\right) _ {S} - \left(z _ {t _ {1}}\right) _ {S} \right] + f \left[ \left(z _ {i _ {2}}\right) _ {S} - \left(z _ {t _ {2}}\right) _ {S} \right] \tag {3} \\ L _ {z _ {s t y l e}} = L _ {z _ {s t y l e}} ^ {p o s} + m a x (0. 0, \mu - L _ {z _ {s t y l e}} ^ {n e g}). \\ \end{array} +$$ + +A classical reconstruction loss used in autoencoders, which forces the model to learn perfect reconstructions of its inputs: + +$$ +\tilde {L} _ {i d t} = f \left[ \tilde {D} \left(E \left(x _ {i}\right)\right) - x _ {i} \right] + f \left[ \tilde {D} \left(E \left(x _ {t}\right)\right) - x _ {t} \right]. \tag {4} +$$ + +And a latent cycle loss enforcing the latent codes of the inputs to be the same as latent codes of the reconstructed images: + +$$ +\tilde {L} _ {z _ {\text {c y c l e}}} = f \left[ E \left(\tilde {D} \left(z _ {i}\right)\right) - \left(z _ {i}\right) \right] + f \left[ E \left(\tilde {D} \left(z _ {t}\right)\right) - \left(z _ {t}\right) \right], \tag {5} +$$ + +which has experimentally shown to stabilize the training. The total auxiliary decoder loss $L_{\tilde{D}}$ , is then defined as: + +$$ +L _ {\tilde {D}} = L _ {z _ {c o n t}} + L _ {z _ {s t y l e}} + \tilde {L} _ {z _ {c y c l e}} + \lambda \tilde {L} _ {i d t}, \tag {6} +$$ + +where $\lambda$ is a hyperparameter weighting importance of the reconstruction loss $\tilde{L}_{idt}$ with respect to the rest. + +![](images/519b4621de919d42a9de1149a1592dc8f14d257baed0f6da1e2719723f48ca69.jpg) +Figure 3. One step of peer regularization takes as input latent representations of content and style images. The content part of the latent representation is used to induce a graph structure on the style latent space, which is then used to recombine the style part of the content image's latent representation from the style image's latent representation. This results in a new style latent code. The Two-Stage Peer Regularization Layer performs the peer regularization operation twice. In the second step, the roles of content and style information are swapped. + +Main decoder. This network replicates the architecture of the auxiliary decoder, and uses the output of the Two-stage Peer-regularized Feature Recombination module (see Section 3.2). During training of the main decoder the encoder is kept fixed, and the decoder is optimized using a loss function composed of the following parts. First, the decoder adversarial loss: + +$$ +\begin{array}{l} L _ {g e n} = \mathbb {E} _ {x _ {i} \sim \mathbb {P}} \left[ \left(C (x _ {i}) - \mathbb {E} _ {x _ {f} \sim \mathbb {Q}} C (x _ {f}) + 1\right) ^ {2} \right] \tag {7} \\ + \mathbb {E} _ {x _ {f} \sim \mathbb {Q}} \left[ \left(\mathbb {E} _ {x _ {i} \sim \mathbb {P}} C (x _ {i}) - C (x _ {f}) + 1\right) ^ {2} \right], \\ \end{array} +$$ + +where $\mathbb{P}$ is the distribution of the real data and $\mathbb{Q}$ is the distribution of the generated (fake) data and $C$ is the discriminator. + +In order to enforce the stylization preserve the content part of the latent codes while recombining the style part of the latent codes to represent the target style class, we use so called transfer latent cycle loss: + +$$ +\begin{array}{l} L _ {z _ {\text {t r a n s f}}} = f \left[ E \left(D \left(T \left(z _ {i}, z _ {t}\right)\right)\right) _ {C} - \left(z _ {i}\right) _ {C} \right] \tag {8} \\ + f \left[ E \left(D \left(T \left(z _ {i}, z _ {t}\right)\right)\right) _ {S} - \left(z _ {t}\right) _ {S} \right]. \\ \end{array} +$$ + +Further, to make the main decoder learn to reconstruct the original inputs, we employ the classical reconstruction loss as we did for auxiliary decoder as well: + +$$ +L _ {i d t} = f \left[ D \left(T \left(z _ {i}, z _ {i}\right)\right) - x _ {i} \right] + f \left[ D \left(T \left(z _ {t}, z _ {t}\right)\right) - x _ {t} \right]. \tag {9} +$$ + +The above put together composes the main decoder loss $L_{D}$ , where the reconstruction loss $L_{idt}$ is weighted by the same hyperparameter $\lambda$ used also in $L_{\tilde{D}}$ . + +$$ +L _ {D} = L _ {\text {g e n}} + L _ {z _ {\text {t r a n s f}}} + \lambda L _ {i d t} \tag {10} +$$ + +Discriminator. The discriminator is a convolutional network receiving two images concatenated over the channel + +dimension and producing an $N \times N$ map of predictions. The first image is the one to discriminate, whereas the second one serves as conditioning for the style class. The output prediction is ideally 1 if the two inputs come from the same style class and 0 otherwise. The discriminator loss is defined as: + +$$ +\begin{array}{l} L _ {C} = \mathbb {E} _ {x _ {i} \sim \mathbb {P}} \left[ \left(C \left(x _ {i}\right) - \mathbb {E} _ {x _ {f} \sim \mathbb {Q}} C \left(x _ {f}\right) - 1\right) ^ {2} \right] \tag {11} \\ + \mathbb {E} _ {x _ {f} \sim \mathbb {Q}} \left[ \left(\mathbb {E} _ {x _ {i} \sim \mathbb {P}} C (x _ {i}) - C (x _ {f}) - 1\right) ^ {2} \right]. \\ \end{array} +$$ + +# 3.2. Two-stage Peer-regularized Feature Recombination (TPFR) + +The TPFR module draws inspiration from PeerNets [34] and Graph Attention Layer (GAT) [37] to perform style transfer in latent space, taking advantage of the separation of content and style information (enforced by Equations 2 and 3). Peer-regularized feature recombination is done in two stages, as explained in the following paragraphs. + +Style recombination. It receives $z_{i} = [(z_{i})_{C}, (z_{i})_{S}]$ and $z_{t} = [(z_{t})_{C}, (z_{t})_{S}]$ as an input and computes the k-Nearest-Neighbors (k-NN) between $(z_{i})_{C}$ and $(z_{t})_{C}$ using the Euclidean distance to induce the graph of peers. + +Attention coefficients over the graph nodes are computed and used to recombine the style portion of $(z_{out})_S$ as convex combination of its nearest neighbors representations. The content portion of the latent code remains instead unchanged, resulting in: $z_{out} = [(z_i)_C,(z_{out})_S]$ + +Given a pixel $(\mathbf{z}_{\mathbf{m}})_{\mathbf{C}}$ of feature map $m$ , its $k$ -NN graph in the space of $d$ -dimensional feature maps of all pixels of all peer feature maps $n_k$ is considered. The new value of the style part $(z)_{S}$ for the pixel is expressed as: + +$$ +\left(\tilde {\mathbf {z}} _ {p} ^ {m}\right) _ {S} = \sum_ {k = 1} ^ {K} \alpha_ {m n _ {k} p q _ {k}} \left(\mathbf {z} _ {q _ {k}} ^ {n _ {k}}\right) _ {S}, \tag {12} +$$ + +$$ +\alpha_ {m n _ {k} p q _ {k}} = \frac {\mathrm {L R e L U} \left(\exp \left(a \left(\left(\mathbf {z} _ {p} ^ {m}\right) _ {C} , \left(\mathbf {z} _ {q _ {k}} ^ {n _ {k}}\right) _ {C}\right)\right)\right)}{\sum_ {k ^ {\prime} = 1} ^ {K} \mathrm {L R e L U} \left(\exp \left(a \left(\left(\mathbf {z} _ {p} ^ {m}\right) _ {C}, \left(\mathbf {z} _ {q _ {k ^ {\prime}}} ^ {n _ {k ^ {\prime}}}\right) _ {C}\right)\right)\right)} \tag {13} +$$ + +where $a(\cdot, \cdot)$ denotes a fully connected layer mapping from $2d$ -dimensional input to scalar output, and $\alpha_{mn_kpq_k}$ are attention scores measuring the importance of the $q_k$ th pixel of feature map $n$ to the output $p$ th pixel $\tilde{\mathbf{x}}_p^m$ of feature map $m$ . The resulting style component of the input feature map $\tilde{\mathbf{X}}^m$ is the weighted pixel-wise average of its peer pixel features defined over the style input image. + +Content recombination. Once the style latent code is recombined, an analogous process is repeated to transform the content latent code according to the new style information. In this case, it starts off with inputs $z_{out} = [(z_i)_C, (z_{out})_S]$ and $z_t = [(z_t)_C, (z_t)_S]$ and the $k$ -NN graph is computed given the style latent codes $(z_{out})_S, (z_t)_S$ . This graph is used together with Equation 12 in order to compute the attention coefficients and recombine the content latent code as $(z_{final})_C$ . + +The output of the TPFR module therefore is a new latent code $z_{final} = [(z_{final})_C, (z_{out})_S]$ which recombines both style and content part of the latent code. + +# 4. Experimental setup and Results + +The proposed approach is compared against the state-of-the-art on extensive qualitative evaluations and, to support the choice of architecture and loss functions, ablation studies are performed to demonstrate roles of the various components and how they influence the final result. Only qualitative comparisons are provided as no standard quantitative evaluations are defined for NST algorithms. + +# 4.1. Training + +A modification of the dataset collected by [31] is used for training the model. It is composed of a collection of thirteen different painters representing different target styles and selection of relevant classes from the Places365 dataset [42] providing the real photo images. This gives us 624,077 real photos and 4,430 paintings in total. Our network can be trained end-to-end alternating optimization steps for the auxiliary decoder, the main decoder, and the discriminator. The loss used for training is defined as: + +$$ +L = L _ {C} + L _ {D} + L _ {\tilde {D}}, \tag {14} +$$ + +where $C$ is the discriminator, $D$ the main decoder, and $\tilde{D}$ is the auxiliary decoder (see Section 3.1). Using ADAM [18] as the optimization scheme, with an initial learning rate of $4\mathrm{e}-4$ and a batch size of 2, training is performed for a total of 200 epochs. After 50 epochs, the learning rate is decayed linearly to zero. Please note that choice of the batch size can + +be arbitrary, and we choose 2 only due to limited computing resources. In each epoch, we randomly visit 6144 of the real photos. The weighting of the reconstruction identity loss $\lambda = 25.0$ and the margin for the metric learning $\mu = 1.0$ during all of our experiments. The training images are cropped and resized to $256 \times 256$ resolution. Note that during testing, our method can operate on images of arbitrary size. + +# 4.2. Style transfer + +A set of test images from Sanakoyeu [31] is stylized and compared against competing methods in Figure 4 (inputs of size $768 \times 768$ px) to demonstrate arbitrary stylization of a content image given several different styles. It is important to note that, as opposed to majority of the competing methods, our network does not require retraining for each style and allows therefore also for transfer of previously unseen styles, e.g. Pissarro in row 5 of Figure 4, which is a painter that has not been present in the training set. + +Qualitative results² that were done on color images of size $512 \times 512$ , using previously unseen paintings from painters that are in the training set, are shown in Figure 5(b). It is worth noticing that our approach can deal also with very abstract painting styles, such as the one of Jackson Pollock (Figure 5(b), row 3, style 1). It motivates the claim that our model generalizes well to many different styles, allowing zero-shot style transfer. + +Zero-shot style transfer. In order to support our claims regarding zero-shot style transfer, we have collected samples of a few painters that were not seen during training. In particular, we collected paintings from Salvador Dali, Camille Pissarro, Henri Matisse, Katigawa Utamaro and Rembrandt. The evaluation presented in Figure 5(a) shows that our approach is able to account for fine details in painting style of Camille Pissarro (row 1, style 1), as well as create larger flat regions to recombine style that is own to Katigawa Utamaro (row 6, style 2). We find the results of zero-shot style transfer using the aforementioned painters very encouraging. + +Ablation study. There are several key components in our solution which make arbitrary style transfer with a single model and end-to-end training possible. The effect of suppressing each of them during the training is examined, and results for the various models are compared, highlighting the importance of each component in Figure 6. Clearly, the auxiliary decoder used during training is a centerpiece of the whole approach, as it prevents degenerate solutions. We observe that training encoder directly with the main decoder end-to-end does not work (Fig. 6 NoAux). Separation of the + +![](images/af8b9b6e160eb6a8f36cd132daf3aeca15bcaf7c54ec8a008727047b2f497de2.jpg) +Figure 4. Qualitative comparison with respect to other state-of-the-art methods. It should be noted that most of the compared methods had to train a new model for each style. While providing competitive results, our method performs arbitrary style transfer using a single model. + +latent code into content and style part allows for the introduced two-stage style transfer and is important to account for changes in shape of the objects for styles like, e.g. Picasso (Fig. 6 NoSep). Two-stage recombination provides better generalization to variety of styles (Fig. 6 NoTS). Performing only exchange of style based on content features completely fails in some cases (e.g. row 1 in Fig. 6). Next, metric learning on the style latent space enforces its better clustering and enhances some important details in the stylized image (Fig. 6 NoML). Last but not least, the combined local and global style latent code is important in order to be able to account for changes in edges and brushstrokes appropriately (Fig. 6 NoGlob). + +# 5. Conclusions + +We propose a novel model for neural style transfer which mitigates various limitations of current state-of-the-art methods and that can be used also in the challenging zero-shot transfer setting. This is thanks to a Two-Stage + +Peer-Regularization Layer using graph convolutions to recombine the style component of the latent representation and with a metric learning loss enforcing separation of different styles combined with cycle consistency in feature space. An auxiliary decoder is also introduced to prevent degenerate solutions and to enforce enough variability of the generated samples. The result is a state-of-the-art method that can be trained end-to-end without the need of a pre-trained model to compute the perceptual loss, therefore lifting recent concerns regarding the reliability of such features for NST. More importantly the proposed method requires only a single encoder and a single decoder to perform transfer among arbitrary styles, contrary to many competing methods requiring a decoder (and possibly an encoder) for each input and target pair. This makes our method more applicable to real-world image generation scenarios where users define their own styles. + +![](images/6cc75a5b7ab56c4ea62fcc43fee77a7ceece768af6be7ff420b5074bb18dec5c.jpg) +(a) Zero-shot style transfer. + +![](images/a0c043e84b275f6d46c224077544e7e2e246043f602cfe00554c4cc58e1dc8d8.jpg) +(b) Styles seen during training. + +![](images/2c56eb2106279be4a6744db19c4e8ff4897ef1286ddc3886ba146208c624d5de.jpg) +Figure 5. Qualitative evaluation of our method for previously unseen styles (left) and for styles seen during training (right). It can be observed that the generated images are consistent with the provided target style (inferred from a single sample only), showing the good generalization capabilities of the approach. +Figure 6. Ablation study evaluating different architecture choices for our approach. Detail of style transfer for row 2 is shown in the rightmost column. Ours refers to the final approach, NoAux makes no use of the auxiliary decoder during training, NoSep ignores the separation of content and style in the latent space during feature exchange in TPFR module and exchanges the whole latent code at once, NoTS recombines only style features based on content and keeps the original content features, NoML does not use metric learning and NoGlob does not separate the style latent code into a global and local part. + +# References + +[1] Asha Anoosheh, Eirikur Agustsson, Radu Timofte, and Luc Van Gool. Combogan: Unrestrained scalability for image domain translation. CoRR, abs/1712.06909, 2017. 1, 3 +[2] M. M. Bronstein, J. Bruna, Y. LeCun, A. Szlam, and P. Vandergheynst. Geometric deep learning: going beyond euclidean data. IEEE Signal Process. Mag., 34(4):18-42, 2017. 2 +[3] Dongdong Chen, Lu Yuan, Jing Liao, Nenghai Yu, and Gang Hua. Stylebank: An explicit representation for neural image style transfer. CoRR, abs/1703.09210, 2017. 3 +[4] Tian Qi Chen and Mark Schmidt. Fast patch-based style transfer of arbitrary style. CoRR, abs/1612.04337, 2016. 3 +[5] Vincent Dumoulin, Jonathon Shlens, and Manjunath Kudlur. A learned representation for artistic style. CoRR, abs/1610.07629, 2016. 3 +[6] A. A. Efros and T. K. Leung. Texture synthesis by nonparametric sampling. In Proceedings of the Seventh IEEE International Conference on Computer Vision, volume 2, pages 1033-1038 vol.2, Sep. 1999. 2 +[7] Jeffrey De Fauw, Sander Dieleman, and Karen Simonyan. Hierarchical autoregressive image models with auxiliary decoders. CoRR, abs/1903.04933, 2019. 3 +[8] Leon A. Gatys, Alexander S. Ecker, and Matthias Bethge. A neural algorithm of artistic style. CoRR, abs/1508.06576, 2015. 1, 2 +[9] Robert Geirhos, Patricia Rubisch, Claudio Michaelis, Matthias Bethge, Felix A. Wichmann, and Wieland Brendel. Imagenet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustness. In ICLR, 2019. 1, 2 +[10] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, NIPS. 2014. 3 +[11] Xun Huang and Serge J. Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. CoRR, abs/1703.06868, 2017. 2, 3 +[12] Xun Huang, Ming-Yu Liu, Serge J. Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. CoRR, abs/1804.04732, 2018. 1, 3 +[13] Peter J. Huber. Robust estimation of a location parameter. Ann. Math. Statist., 35(1):73-101, 03 1964. 4 +[14] Yongcheng Jing, Yezhou Yang, Zunlei Feng, Jingwen Ye, and Mingli Song. Neural style transfer: A review. CoRR, abs/1705.04058, 2017. 2, 3 +[15] Justin Johnson, Alexandre Alahi, and Fei-Fei Li. Perceptual losses for real-time style transfer and super-resolution. CoRR, abs/1603.08155, 2016. 2, 3 +[16] Alexia Jolicoeur-Martineau. The relativistic discriminator: a key element missing from standard GAN. CoRR, abs/1807.00734, 2018. 3 +[17] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. CoRR, abs/1812.04948, 2018. 1 + +[18] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. 6 +[19] Dmytro Kotovenko, Artsiom Sanakoyeu, Sabine Lang, and Bjorn Ommer. Content and style disentanglement for artistic style transfer. In Proceedings of the IEEE International Conference on Computer Vision, pages 4422-4431, 2019. 3, 4 +[20] Dmytro Kotovenko, Artsiom Sanakoyeu, Pingchuan Ma, Sabine Lang, and Bjorn Ommer. A content transformation block for image style transfer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10032-10041, 2019. 2, 3 +[21] Chuan Li and Michael Wand. Combining markov random fields and convolutional neural networks for image synthesis. CoRR, abs/1601.04589, 2016. 3 +[22] Chuan Li and Michael Wand. Precomputed real-time texture synthesis with markovian generative adversarial networks. CoRR, abs/1604.04382, 2016. 3 +[23] Yijun Li, Chen Fang, Jimei Yang, Zhaowen Wang, Xin Lu, and Ming-Hsuan Yang. Diversified texture synthesis with feed-forward networks. CoRR, abs/1703.01664, 2017. 3 +[24] Yijun Li, Chen Fang, Jimei Yang, Zhaowen Wang, Xin Lu, and Ming-Hsuan Yang. Universal style transfer via feature transforms. CoRR, abs/1705.08086, 2017. 3 +[25] Yanghao Li, Naiyan Wang, Jiaying Liu, and Xiaodi Hou. Demystifying neural style transfer. CoRR, abs/1701.01036, 2017. 3 +[26] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. CoRR, abs/1703.00848, 2017. 3 +[27] Ming-Yu Liu, Xun Huang, Arun Mallya, Tero Karras, Timo Aila, Jaakko Lehtinen, and Jan Kautz. Few-shot unsupervised image-to-image translation. arXiv preprint arXiv:1905.01723, 2019. 3 +[28] Xiao-Jiao Mao, Chunhua Shen, and Yu-Bin Yang. Image restoration using convolutional auto-encoders with symmetric skip connections. CoRR, 2016. 3 +[29] Jonathan Masci, Ueli Meier, Dan Ciresan, and Jürgen Schmidhuber. Stacked Convolutional Auto-Encoders for Hierarchical Feature Extraction, pages 52–59. Springer Berlin Heidelberg, Berlin, Heidelberg, 2011. 3 +[30] Ethan Perez, Florian Strub, Harm de Vries, Vincent Dumoulin, and Aaron C. Courville. Film: Visual reasoning with a general conditioning layer. CoRR, abs/1709.07871, 2017. 2 +[31] Artsiom Sanakoyeu, Dmytro Kotovenko, Sabine Lang, and Björn Ommer. A style-aware content loss for real-time HD style transfer. CoRR, abs/1807.10201, 2018. 3, 4, 6 +[32] Lu Sheng, Ziyi Lin, Jing Shao, and Xiaogang Wang. Avatarnet: Multi-scale zero-shot style transfer by feature decoration. In CVPR, 2018. 2, 3 +[33] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. 2 +[34] Jan Svoboda, Jonathan Masci, Federico Monti, Michael M. Bronstein, and Leonidas J. Guibas. Peernets: Exploiting peer wisdom against adversarial attacks. CoRR, abs/1806.00088, 2018. 5 + +[35] Dmitry Ulyanov, Vadim Lebedev, Andrea Vedaldi, and Victor S. Lempitsky. Texture networks: Feed-forward synthesis of textures and stylized images. CoRR, abs/1603.03417, 2016. 2, 3 +[36] Dmitry Ulyanov, Andrea Vedaldi, and Victor S. Lempitsky. Improved texture networks: Maximizing quality and diversity in feed-forward stylization and texture synthesis. CoRR, abs/1701.02096, 2017. 3 +[37] Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Alejandro Romero, Pietro Lió, and Yoshua Bengio. Graph attention networks. CoRR, abs/1710.10903, 2018. 5 +[38] Hao Wang, Xiaodan Liang, Hao Zhang, Dit-Yan Yeung, and Eric P. Xing. Zm-net: Real-time zero-shot image manipulation network. CoRR, abs/1703.07255, 2017. 3 +[39] Li-Yi Wie, Sylvain Lefebvre, Vivek Kwatra, and Greg Turk. State of the Art in Example-based Texture Synthesis. In M. Pauly and G. Greiner, editors, Eurographics 2009 - State of the Art Reports, 2009. 2 +[40] Hang Zhang and Kristin J. Dana. Multi-style generative network for real-time transfer. CoRR, abs/1703.06953, 2017. 3 +[41] Junbo Jake Zhao, Michal Mathieu, Ross Goroshin, and Yann LeCun. Stacked what-where auto-encoders. CoRR, 2015. 3 +[42] Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE transactions on pattern analysis and machine intelligence, 40(6):1452-1464, 2017. 6 +[43] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. CoRR, abs/1703.10593, 2017. 1, 2, 3 \ No newline at end of file diff --git a/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/images.zip b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..435cc68a5c95f90d45c69a4244bb9cee99e60c0c --- /dev/null +++ b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20537b4e4760ddf838dfdf73292295c43d36f47b8a9af43906f37da13635bd3a +size 1084315 diff --git a/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/layout.json b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..485c0fa9b9917fc09e54f3deb73f91bb4c6b8d7b --- /dev/null +++ b/twostagepeerregularizedfeaturerecombinationforarbitraryimagestyletransfer/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f1f2fbf326ad5a048d8fe0a52db9790a48a56cdea3f228b01d13fcdb249e7fc +size 330760 diff --git a/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/72efba7e-dfe9-442c-ba85-515c777c84c2_content_list.json b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/72efba7e-dfe9-442c-ba85-515c777c84c2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e3312ec41fd46cd56cb25aca72b5f43b8e0fe605 --- /dev/null +++ b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/72efba7e-dfe9-442c-ba85-515c777c84c2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4114d452598f3ceecce8feae7c2dbc51cd6cbf53d7f75bf69fde7e781eb1c9be +size 89565 diff --git a/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/72efba7e-dfe9-442c-ba85-515c777c84c2_model.json b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/72efba7e-dfe9-442c-ba85-515c777c84c2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a15b3b0880af52e4fcdc136b938d5f3690b72e0b --- /dev/null +++ b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/72efba7e-dfe9-442c-ba85-515c777c84c2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4446b0cf2302eb8bd3f4159a67ea20b8b115c50a87c9380747da163d28edf3c +size 110555 diff --git a/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/72efba7e-dfe9-442c-ba85-515c777c84c2_origin.pdf b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/72efba7e-dfe9-442c-ba85-515c777c84c2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..98f1091daf958ed844b275175bdb759d97826841 --- /dev/null +++ b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/72efba7e-dfe9-442c-ba85-515c777c84c2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c397734ddb4f4139c1343204efe45f01d1677e19aa5cf9ff58d6c2474528dd7e +size 1592014 diff --git a/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/full.md b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/full.md new file mode 100644 index 0000000000000000000000000000000000000000..65788523732e506238a9c8af4f8b2c9d407806d5 --- /dev/null +++ b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/full.md @@ -0,0 +1,337 @@ +# UC-Net: Uncertainty Inspired RGB-D Saliency Detection via Conditional Variational Autoencoders + +Jing Zhang $^{1,4,5}$ Deng-Ping Fan $^{2,6,*}$ Yuchao Dai $^{3}$ Saeed Anwar $^{1,5}$ Fatemeh Sadat Saleh $^{1,4}$ Tong Zhang $^{1}$ Nick Barnes $^{1}$ + +$^{1}$ Australian National University $^{2}$ CS, Nankai University $^{3}$ Northwestern Polytechnical University + +$^{4}$ ACRV $^{5}$ Data61 $^{6}$ Inception Institute of Artificial Intelligence (IIAI), Abu Dhabi, UAE + +# Abstract + +In this paper, we propose the first framework (UC-Net) to employ uncertainty for RGB-D saliency detection by learning from the data labeling process. Existing RGB-D saliency detection methods treat the saliency detection task as a point estimation problem, and produce a single saliency map following a deterministic learning pipeline. Inspired by the saliency data labeling process, we propose probabilistic RGB-D saliency detection network via conditional variational autoencoders to model human annotation uncertainty and generate multiple saliency maps for each input image by sampling in the latent space. With the proposed saliency consensus process, we are able to generate an accurate saliency map based on these multiple predictions. Quantitative and qualitative evaluations on six challenging benchmark datasets against 18 competing algorithms demonstrate the effectiveness of our approach in learning the distribution of saliency maps, leading to a new state-of-the-art in RGB-D saliency detection1. + +# 1. Introduction + +Object-level visual saliency detection involves separating the most conspicuous objects that attract humans from the background [27, 2, 55, 63, 38, 29, 62]. Recently, visual saliency detection from RGB-D images have attracted lots of interest due to the importance of depth information in human vision system and the popularity of depth sensing technologies [61, 64]. Given a pair of RGB-D images, the task of RGB-D saliency detection aims to predict a saliency map by exploring the complementary information between color image and depth data. + +The de-facto standard for RGB-D saliency detection is to train a deep neural network using ground truth (GT) + +![](images/da07206777cd77430afde1048d98fa9fff053cd13bb2f254f525323fd1d79fb5.jpg) + +![](images/4de9917ffff45ad717e2d4b714d5bcba586a5f4c36e5056380b1c9d5f00b2bd1.jpg) + +![](images/7c98b90e9b608e7de3755b38e3f7a898cee69ff8fd6d67c7e9ac71c7cafb938b.jpg) +Image + +![](images/7317e59363053c6d5083d8fc3cd8791fc4827478ae3feb3bbcdedde3c0ada769.jpg) + +![](images/e6e11a6b4dff3c9bd741188aa0329c91ff0e2b58a3741c935289d4772310f37a.jpg) +GT +Figure 1. Provided GT compared with UC-Net (ours) predicted saliency maps. For images with a single salient object ( $1^{st}$ row), we can produce consistent prediction. When multiple salient objects exist ( $2^{nd}$ row), we can produce diverse predictions. + +![](images/a8c0e9f1d19036bf4313193130af4b5a02f32c92c21503d6d0b703c30b01287b.jpg) + +![](images/55ee89575907640e4e8c3816710bfbd0f56d25a33e58c42febe8ae5eef8d35eb.jpg) +Ours (1) + +![](images/f612f7271715bea73392a9251b8f4e1ac3427c28ee34853de93f51991441128f.jpg) + +![](images/7568a14752c25076dd3b0336a1ba88ebeefe50a7b42437c023a7936c6725be5d.jpg) +Ours (2) + +saliency maps provided by the corresponding benchmark datasets, where the GT saliency maps are obtained through human consensus or by the dataset creators [18]. Building upon large scale RGB-D datasets, deep convolutional neural network based models [21, 61, 6, 24] have made profound progress in learning the mapping from an RGB-D image pair to the corresponding GT saliency map. Considering the progress for RGB-D saliency detection under this pipeline, in this paper, we would like to argue that this pipeline fails to capture the uncertainty in labeling the GT saliency maps. + +According to research in human visual perception [33], visual saliency detection is subjective to some extent. Each person could have specific preferences in labeling the saliency map (which has been previously discussed in user-specific saliency detection [26]). Existing approaches to RGB-D saliency detection treat saliency detection as a point estimation problem, and produce a single saliency map for each input image pair following a deterministic learning pipeline, which fails to capture the stochastic characteristic of saliency, and may lead to a partisan saliency model as shown in second row of Fig. 1. Instead of obtaining only a single saliency prediction (point estimation), we are interested in how the network produces multiple predictions (distribution estimation), which are then processed further to generate a single prediction in a similar way to how the GT saliency maps are created. + +In this paper, inspired by human perceptual uncertainty, + +we propose a conditional variational autoencoders [50] (CVAE) based RGB-D saliency detection model UC-Net to produce multiple saliency predictions by modeling the distribution of output space as a generative model conditioned on the input RGB-D images to account for the human uncertainty in annotation. + +However, there still exists one obstacle before we could apply the probabilistic framework, that is existing RGB-D benchmark datasets generally only provide a single GT saliency map for each RGB-D image pair. To produce diverse and accurate predictions $^2$ , we resort to the "hide and seek" [49] principle following the orientation shifting theory [26] by iteratively hiding the salient foreground from the RGB image for testing, which forces the deep network to learn the saliency map with diversity. Through this iterative hiding strategy, we obtain multiple saliency maps for each input RGB-D image pair, which reflects the diversity/uncertainty from human labeling. + +Moreover, depth data in the RGB-D saliency dataset can be noisy, and a direct fusion of RGB and depth information may overwhelm the network to fit noise. To deal with the noisy depth problem, a depth correction network is proposed as an auxiliary component to produce depth images with rich semantic and geometric information. We also introduce a saliency consensus module to mimic the majority voting mechanism for saliency GT generation. + +Our main contributions are summarized as: 1) We propose a conditional probabilistic RGB-D saliency prediction model that can produce diverse saliency predictions instead of a single saliency map; 2) We provide a mechanism via saliency consensus to better model how saliency detection works; 3) We present a depth correction network to decrease noise that is inherent in depth data; 4) Extensive experimental results on six RGB-D saliency detection benchmark datasets demonstrate the effectiveness of our UC-Net. + +# 2. Related Work + +# 2.1. RGB-D Saliency Detection + +Depend on how the complementary information between RGB images and depth images is fused, existing RGB-D saliency detection models can be roughly classified into three categories: early-fusion models [43], late-fusion models [54, 24] and cross-level fusion models [61, 5, 7, 6, 64]. Qu et al. [43] proposed an early-fusion model to generate feature for each superpixel of the RGB-D pair, which was then fed to a CNN to produce saliency of each superpixel. Recently, Wang et al. [54] introduced a late-fusion network (i.e. AFNet) to fuse predictions from the RGB and depth branch adaptively. In a similar pipeline, Han et al. [24] + +fused the RGB and depth information through fully connected layers. Chen et al. [7] used a multi-scale multi-path network for different modality information fusion. Chen et al. [5] proposed a complementary-aware RGB-D saliency detection model by fusing features from the same stage of each modality with a complementary-aware fusion block. Chen et al. [6] presented attention-aware cross-level combination blocks for multi-modality fusion. Zhao et al. [64] integrated a contrast prior to enhance depth cues, and employed a fluid pyramid integration framework to achieve multi-scale cross-modal feature fusion. To effectively incorporate geometric and semantic information within a recurrent learning framework, Li et al. [61] introduced a depth-induced multi-scale RGB-D saliency detection network. + +# 2.2. VAE or CVAE based Deep Probabilistic Models + +Ever since the seminal work by Kingma et al. [31] and Rezende et al. [45], variational autoencoder (VAE) and its conditional counterpart CVAE [50] have been widely applied in various computer vision problems. To train a VAE, a reconstruction loss and a regularizer are needed to penalize the disagreement of the prior and posterior distribution of the latent representation. Instead of defining the prior distribution of the latent representation as a standard Gaussian distribution, CVAE utilizes the input observation to modulate the prior on Gaussian latent variables to generate the output. In low-level vision, VAE and CVAE have been applied to the tasks such as image background modeling [34], latent representations with sharp samples [25], difference of motion modes [57], medical image segmentation model [3], and modeling inherent ambiguities of an image [32]. Meanwhile, VAE and CVAE have been explored in more complex vision tasks such as uncertain future forecast [1, 53], human motion prediction [47], and shape-guided image generation [12]. Recently, VAE algorithms have been extended to 3D domain targeting applications such as 3D meshes deformation [52], and point cloud instance segmentation [59]. + +To the best of our knowledge, CVAE has not been exploited in saliency detection. Although Li et al. [34] adopted VAE in their saliency prediction framework, they used VAE to model the image background, and separated salient objects from the background through the reconstruction residuals. In contrast, we use CVAE to model labeling variants, indicating human uncertainty of labeling. We are the first to employ CVAE in saliency prediction network by considering the human uncertainty in annotation. + +# 3. Our Model + +In this section, we present our probabilistic RGB-D saliency detection model based on a conditional variational autoencoder, which learns the distribution of saliency maps rather than a single prediction. Let $\xi = \{X_{i},Y_{i}\}_{i = 1}^{N}$ be the training dataset, where $X_{i} = \{I_{i},D_{i}\}$ denotes the RGB-D + +![](images/268609e4236dd0567f12c608fcf0acdacd3e8cbe84216c634efa4fe9e738a755.jpg) +Figure 2. Network training pipeline. Four main modules are included, namely a LatentNet (PriorNet $(\mu_{\mathrm{prior}},\sigma_{\mathrm{prior}})$ and PosteriorNet $(\mu_{\mathrm{post}},\sigma_{\mathrm{post}})$ ), a SaliencyNet, a DepthCorrectionNet and a PredictionNet. The LatentNet maps the RGB-D image pair $X$ (or together with GT $Y$ for the PosteriorNet) to low dimensional Gaussian latent variable $z$ . The DepthCorrectionNet refines the raw depth with a semantic guided loss. The SaliencyNet takes the RGB image and the refined depth as input to generate a saliency feature map. The PredictionNet takes both stochastic features and deterministic features to produce a final saliency map. We perform saliency consensus in the testing stage, as shown in Fig. 3 to generate the final saliency map according to the mechanism of GT saliency map generation. + +![](images/ede85d4b269691e4684a8e9a9a984b928487bf6bd766c1da3a6c83856a16b490.jpg) +Figure 3. Overview of the proposed framework during testing. We sample the PriorNet multiple times to generate diverse and accurate predictions. The saliency consensus module is then used to obtain the majority voting of the final predictions. + +input (consisting of the RGB image $I_{i}$ and the depth image $D_{i}$ ), $Y_{i}$ denotes the ground truth saliency map. The whole pipeline of our model during training and testing are illustrated in Fig. 2 and Fig. 3, respectively. + +Our network is composed of five main modules: 1) LatentNet (PriorNet and PosteriorNet) that maps the RGB-D input $X_{i}$ (for PriorNet) or $X_{i}$ and $Y_{i}$ (for PosteriorNet) to the low dimensional latent variables $z_{i} \in \mathbb{R}^{K}$ ( $K$ is dimension of the latent space); 2) DepthCorrectionNet that takes $I_{i}$ and $D_{i}$ as input to generate a refined depth image $D_{i}'$ ; 3) SaliencyNet that maps the RGB image $I_{i}$ and the refined depth image $D_{i}'$ to saliency feature maps $S_{i}^{d}$ ; 4) PredictionNet that employs stochastic features $S_{i}^{s}$ from LatentNet and deterministic features $S_{i}^{d}$ from SaliencyNet to produce our saliency map prediction $P_{i}$ ; 5) A saliency consensus module in the testing stage that mimics the mechanism of saliency GT generation to evaluate the performance with the provided single GT saliency map $Y_{i}$ . We will introduce each module as follows. + +# 3.1. Probabilistic RGB-D Saliency Model via CVAE + +The Conditional Variational Autoencoder (CVAE) modulates the prior as a Gaussian distribution with parameters + +conditioned on the input data $X$ . There are three types of variables in the conditional generative model: conditioning variable $X$ (RGB-D image pair in our setting), latent variable $z$ , and output variable $Y$ . For the latent variable $z$ drawn from the Gaussian distribution $P_{\theta}(z|X)$ , the output variable $Y$ is generated from $P_{\omega}(Y|X,z)$ , then the posterior of $z$ is formulated as $Q_{\phi}(z|X,Y)$ . The loss of CVAE is defined as: + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {C V A E}} = E _ {z \sim Q _ {\phi} (z | X, Y)} [ - \log P _ {\omega} (Y | X, z) ] \\ + D _ {K L} \left(Q _ {\phi} (z | X, Y) | | P _ {\theta} (z | X)\right), \\ \end{array} +$$ + +where $P_{\omega}(Y|X,z)$ is the likelihood of $P(Y)$ given latent variable $z$ and conditioning variable $X$ , the Kullback-Leibler Divergence $D_{KL}(Q_{\phi}(z|X,Y)||P_{\theta}(z|X))$ works as a regularization loss to reduce the gap between the prior $P_{\theta}(z|X)$ and the auxiliary posterior $Q_{\phi}(z|X,Y)$ . In this way, CVAE aims to model the log likelihood $P(Y)$ under encoding error $D_{KL}(Q_{\phi}(z|X,Y)||P_{\theta}(z|X))$ . Following the standard practice in conventional CVAE [50], we design a CVAE-based RGB-D saliency detection network, and describe each component of our model in the following. LatentNet: We define $P_{\theta}(z|X)$ as PriorNet that maps the input RGB-D image pair $X$ to a low-dimensional latent feature space, where $\theta$ is the parameter set of PriorNet. With the same network structure and provided GT saliency map $Y$ , we define $Q_{\phi}(z|X,Y)$ as PosteriorNet, with $\phi$ being the posterior net parameter set. In the LatentNet (PriorNet and PosteriorNet), we use five convolutional layers to map the input RGB-D image $X$ (or concatenation of $X$ and $Y$ for the PosteriorNet) to the latent Gaussian variable $z \sim \mathcal{N}(\mu, \mathrm{diag}(\sigma^2))$ , where $\mu, \sigma \in \mathbb{R}^K$ , representing the + +![](images/49188b26ad0f449e82068e4ac2f5282680989cbd22da702aa873993d32a44731.jpg) +Figure 4. Detailed structure of LatentNet, where $K$ is dimension of the latent space, "c1_4K" represents a $1 \times 1$ convolutional layer of output channel size $4K$ , "GAP" is global average pooling. + +mean and standard deviation of the latent Gaussian variable, as shown in Fig. 4. + +Let us define parameter set of PriorNet and PosteriorNet as $(\mu_{\mathrm{prior}},\sigma_{\mathrm{prior}})$ and $(\mu_{\mathrm{post}},\sigma_{\mathrm{post}})$ respectively. The KL-Divergence in Eq. (1) is used to measure the distribution mismatch between the prior net $P_{\theta}(z|X)$ and posterior net $Q_{\phi}(z|X,Y)$ , or how much information is lost when using $Q_{\phi}(z|X,Y)$ to represent $P_{\theta}(z|X)$ . Typical using of CVAE involves multiple versions of ground truth $Y$ [32] to produce informative $z\in \mathbb{R}^{K}$ , with each position in $z$ represents possible labeling variants or factors that may cause diverse saliency annotations. As we have only one version of GT, directly training with the provided single GT may fail to produce diverse predictions as the network will simply fit the provided annotation $Y$ . + +Generate Multiple Predictions: To produce diverse and accurate predictions, we propose an iterative hiding technique inspired by [49] following the orientation shifting theory [26] to generate more annotations as shown in Fig. 5. We iteratively hide the salient region in the RGB image with mean of the training dataset. The RGB image and its corresponding GT are set as the starting point of the "new label generation" technique. We first hide the ground truth salient object in the RGB image, and feed the modified image to an existing RGB saliency detection model [42] to produce a saliency map and treat it as one candidate annotation. We repeat salient object hiding technique three times for each training image3 to obtain four different sets of annotations in total (including the provided GT), and we term this dataset as "AugedGT", which is our training dataset. + +During training, different annotations (as shown in Fig. 5) in $Q_{\phi}(z|X,Y)$ can force the PriorNet $P_{\theta}(z|X)$ to encode labeling variants of a given input $X$ . As we have already obtained diverse annotations with the proposed hiding technique, we are expecting the network to produce diverse predictions for images with complicated context. During testing, we can obtain one stochastic feature $S^{s}$ (input of the "PredictionNet") of channel size $K$ each time we sample as shown in Fig. 3. + +SaliencyNet: We design SaliencyNet to produce a deterministic saliency feature map $S^d$ from the input RGB-D data, where the refined depth data comes from the Depth-CorrectionNet. We use VGG16 [48] as our encoder, and remove layers after the fifth pooling layer. To enlarge the receptive field, we follow DenseASPP [58] to obtain feature + +![](images/6233efa1ec7c3b719bb3699bd5f71a9451672da57dc1a6e4acda31c93c088c18.jpg) +Figure 5. New label generation. The $1^{st}$ row: we iteratively hide the predicted salient region, where no region is hidden in the first image. The $2^{nd}$ row: the corresponding GT of the hidden image. + +![](images/66d9b9bfe71b448ba6b8e9647d798766808ae1510d3898fe691e649c8808b76d.jpg) +Figure 6. SaliencyNet, where "S1" represents the first stage of the VGG16 network, "daspp" is the DenseASPP module [58]. + +map with the receptive field of the whole image on each stage of the VGG16 network. We then concatenate those feature maps and feed it to another convolutional layer to obtain $S^d$ . The detail of the SaliencyNet is illustrated in Fig. 6, where "c1_M" represents convolutional layer of kernel size $1 \times 1$ , and $M$ is channel size of $S^d$ . + +Feature Expanding: Statistics $(z\sim \mathcal{N}(\mu ,\mathrm{diag}(\sigma^2))$ in particular) from the LatentNet (PriorNet during testing as shown in Fig. 3 "Sampling", or PosteriorNet during training in Fig. 2) form the input to the Feature Expanding module. Given a pair of $(\mu^k,\sigma^k)$ in each position of the $K$ dimensional vector, we obtain latent vector $z^{k} = \sigma^{k}\odot \epsilon +\mu^{k}$ where $\epsilon \in \mathcal{N}(0,\mathbf{I})$ . To fuse with deterministic feature $S^d$ , we expand $z^{k}$ to feature map of the same spatial size as $S^d$ by defining $\epsilon$ as two-dimensional Gaussian noise map. With $k = 1,\dots,K$ , we can obtain a $K$ (size of the latent space) channel stochastic feature $S^s$ representing labeling variants. + +PredictionNet: The LatentNet produces stochastic features $S^s$ representing labeling variants, while the SaliencyNet outputs deterministic saliency features $S^d$ of input $X$ . We propose the PredictionNet, as shown in Fig. 2 to fuse features from mentioned branches. A naive concatenation of $S^s$ and $S^d$ may lead the network to learn only from the deterministic features, thus fail to model labeling variants. Inspired by [47], we mix $S^s$ and $S^d$ channel-wise; thus, the network cannot distinguish between features of the deterministic branch and the probabilistic branch. We concatenate $S^d$ and $S^s$ to form a $K + M$ channel feature map $S^{sd}$ . We define $K + M$ dimensional variable $r$ (a learnable parameter) representing possible ranking of $1, 2, \dots, K + M$ , and then $S^{sd}$ is mixed channel-wisely according to $r$ to obtain the mixed feature $S^{msd}$ . Three $1 \times 1$ convolutional layers with output channel sizes of $K, K/2, 1$ , are included in + +the PredictionNet to map $S^{msd}$ to a single channel saliency map $P$ . During testing, with multiple stochastic features $S^s$ , we can obtain multiple predictions by sampling $S^s$ from the LatentNet $\mathcal{N}(\mu_{\mathrm{prior}}, \text{diag}(\sigma_{\mathrm{prior}}^2))$ multiple times. + +# 3.2. DepthCorrectionNet + +Two main approaches are employed to acquire depth data for RGB-D saliency detection: through depth sensors such as Microsoft Kinect, e.g., DES [8], and NLPR [41] datasets; or computing depth from stereo cameras, examples of such datasets are SSB [40] and NJU2K [28]. Regardless of the capturing technique, noise is inherent in the depth data. We propose a semantic guided depth correction network to produce refined depth information as shown in Fig. 2, termed as "DepthCorrectionNet". The encoder part of the DepthCorrectionNet is the same as the "SaliencyNet", while the decoder part is composed of four sequential convolutional layers and bilinear upsampling operation. + +We assume that edges of the depth map should be aligned with edges of the RGB image. We adopt the boundary IOU loss [39] as a regularizer for DepthCorrectionNet to achieve a refined depth, which is guided by intensity of the RGB image. The full loss for DepthCorrectionNet is defined as: + +$$ +\mathcal {L} _ {\text {D e p t h}} = \mathcal {L} _ {s l} + \mathcal {L} _ {\text {I o u b}}, \tag {2} +$$ + +where $\mathcal{L}_{sl}$ is the smooth $\ell_1$ loss between the refined depth $D^{\prime}$ and the raw depth $D$ , $\mathcal{L}_{ioub}$ is the boundary IOU loss between the refined depth $D^{\prime}$ and intensity $Ig$ of the RGB image $I$ . Given the predicted depth map $D^{\prime}$ and intensity of RGB image $Ig$ , we follow [39] to compute the first-order derivatives of $D^{\prime}$ and $Ig$ . Subsequently, we calculate the magnitude $gD^{\prime}$ and $gI$ of the gradients of $D^{\prime}$ and $Ig$ , and define the boundary IOU loss as: + +$$ +\mathcal {L} _ {\text {I o u b}} = 1 - 2 \frac {\left| g D ^ {\prime} \cap g I \right|}{\left| g D ^ {\prime} \right| + \left| g I \right|}. \tag {3} +$$ + +# 3.3. Saliency Consensus Module + +Saliency detection is subjective to some extent, and it is common to have multiple annotators to label one image, and the final ground truth saliency map is obtained through majority voting strategy [18]. Although it is well known in the saliency detection community about how the ground truth is acquired; yet, there exists no research on embedding this mechanism into deep saliency frameworks. Current models define saliency detection as a point estimation problem instead of a distribution estimation problem. We, instead, use CVAE to obtain the saliency distribution. Next, we embed saliency consensus into our probabilistic framework to compute the majority voting of different predictions in the testing stage as shown in Fig. 3. + +During testing, we sample PriorNet with fixed $\mu_{\mathrm{prior}}$ and $\sigma_{\mathrm{prior}}$ to obtain a stochastic feature $S^s$ . With each $S^s$ and deterministic feature $S^d$ from SaliencyNet, we obtain one + +version of saliency prediction $P$ . To obtain $C$ different predictions $P^1, \dots, P^C$ , we sample PriorNet $C$ times. We simultaneously feed these multiple predictions to the saliency consensus module to obtain the consensus of predictions. + +Given multiple predictions $\{P^c\}_{c = 1}^C$ , where $P^c\in [0,1]$ we first compute the binary4 version $P_{b}^{c}$ of the predictions by performing adaptive threshold [4] on $P^c$ . For each pixel $(u,v)$ , we obtain a $C$ dimensional feature vector $P_{u,v}\in$ $\{0,1\}$ . We define $P_b^{mjv}\in \{0,1\}$ as a one-channel saliency map representing majority voting of $P_{u,v}$ . We define an indicator $\mathbf{1}^c (u,v) = \mathbf{1}(P_b^c (u,v) = P_b^{mjv}(u,v))$ representing whether the binary prediction is consistent with the majority voting of the predictions. If $P_b^c (u,v) = P_b^{mjv}(u,v)$ , then $\mathbf{1}^c (u,v) = 1$ . Otherwise, $\mathbf{1}^c (u,v) = 0$ . We obtain one gray saliency map after saliency consensus as: + +$$ +P _ {g} ^ {m j v} (u, v) = \frac {\sum_ {c = 1} ^ {C} \mathbf {1} ^ {c} (u , v)}{C} \sum_ {c = 1} ^ {C} \left(P _ {b} ^ {c} (u, v) \right\} \times \mathbf {1} ^ {c} (u, v)). \tag {4} +$$ + +# 3.4. Objective Function + +At this stage, our loss function is composed of two parts i.e. $\mathcal{L}_{\mathrm{CVAE}}$ and $\mathcal{L}_{\mathrm{Depth}}$ . Furthermore, we propose to use the smoothness loss [9] as a regularizer to achieve edge-aware saliency detection, based on the assumption of inter-class distinction and intra-class similarity. Following [56], we define first-order derivatives of the saliency map in the smoothness term as + +$$ +\mathcal {L} _ {\text {S m o o t h}} = \sum_ {u, v} \sum_ {d \in \overrightarrow {x}, \overrightarrow {y}} \Psi \left(\left| \partial_ {d} P _ {u, v} \right| e ^ {- \alpha \left| \partial_ {d} I g (u, v) \right|}\right), \tag {5} +$$ + +where $\Psi$ is defined as $\Psi(s) = \sqrt{s^2 + 1e^{-6}}$ , $P_{u,v}$ is the predicted saliency map at position $(u,v)$ , and $Ig(u,v)$ is the image intensity, $d$ indexes over partial derivative on $\overrightarrow{x}$ and $\overrightarrow{y}$ directions. We set $\alpha = 10$ following [56]. + +Both the smoothness loss (Eq. (5)) and the boundary IOU loss (Eq. (3)) need intensity $Ig$ . We convert the RGB image $I$ to a gray-scale intensity image $Ig$ as [60]: + +$$ +I g = 0. 2 1 2 6 \times I ^ {l r} + 0. 7 1 5 2 \times I ^ {l g} + 0. 0 7 2 2 \times I ^ {l b}, \tag {6} +$$ + +where $I^{lr}$ , $I^{lg}$ and $I^{lb}$ represent the color components in the linear color space after Gamma function been removed from the original color space. $I^{lr}$ is achieved via: + +$$ +I ^ {l r} = \left\{ \begin{array}{c c} \frac {I ^ {r}}{1 2 . 9 2}, & I ^ {r} \leq 0. 0 4 0 4 5, \\ \left(\frac {I ^ {r} + 0 . 0 5 5}{1 . 0 5 5}\right) ^ {2. 4}, & I ^ {r} > 0. 0 4 0 4 5. \end{array} \right. \tag {7} +$$ + +where $I^r$ is the original red channel of image $I$ , and we compute $I^g$ and $I^b$ in the same way as Eq. (7). + +With smoothness loss $\mathcal{L}_{\mathrm{Smooth}}$ , depth loss $\mathcal{L}_{\mathrm{Depth}}$ and CVAE loss $\mathcal{L}_{\mathrm{CVAE}}$ , our final loss function is defined as: + +$$ +\mathcal {L} _ {\text {s a l}} = \mathcal {L} _ {\text {C V A E}} + \lambda_ {1} \mathcal {L} _ {\text {D e p t h}} + \lambda_ {2} \mathcal {L} _ {\text {S m o o t h}}. \tag {8} +$$ + +In our experiments, we set $\lambda_1 = \lambda_2 = 0.3$ . + +Training details: We set channel size of $S^d$ as $M = 32$ , and scale of latent space as $K = 8$ . We trained our model using Pytorch, and initialized the encoder of SaliencyNet and DepthCorrectionNet with VGG16 parameters pre-trained on ImageNet. Weights of new layers were initialized with $\mathcal{N}(0,0.01)$ , and bias was set as constant. We used the Adam method with momentum 0.9 and decreased the learning rate $10\%$ after each epoch. The base learning rate was initialized as 1e-4. The whole training took 13 hours with training batch size 6 and maximum epoch 30 on a PC with an NVIDIA GeForce RTX GPU. For input image size $352 \times 352$ , the inference time is 0.06s on average. + +# 4. Experimental Results + +# 4.1. Setup + +Datasets: We perform experiments on six datasets including five widely used RGB-D saliency detection datasets (namely NJU2K [28], NLPR [41], SSB [40], LFSD [35], DES [8]) and one newly released dataset (SIP [18]). + +Competing Methods: We compare our method with 18 algorithms, including ten handcrafted conventional methods and eight deep RGB-D saliency detection models. + +Evaluation Metrics: Four evaluation metrics are used, including two widely used: 1) Mean Absolute Error (MAE $\mathcal{M}$ ); 2) mean F-measure $(F_{\beta})$ and two recently proposed: 3) Enhanced alignment measure (mean E-measure, $E_{\xi}$ ) [15] and 4) Structure measure (S-measure, $S_{\alpha}$ ) [14]. + +# 4.2. Performance Comparison + +Quantitative Comparison: We report performance of our method and competing methods in Table 1. It shows that our method consistently achieves the best performance on all datasets, especially on SSB [40] and SIP [18], our method achieves significant S-measure, E-measure, and F-measure performance boost and a decrease in MAE by a large margin. We show E-measure and F-measure curves of competing methods and ours in Fig. 7. We observe that our method produces not only stable E-measure and F-measure but also best performance. + +Qualitative Comparisons: In Fig. 8, we show five images comparing results of our method with one newly released RGB-D saliency detection method (DMRA [61]), and two widely used methods to produce structured outputs, namely M-head [46] and MC-dropout [30] (we will discuss these two methods in detail in the ablation study section). We design both M-head and MC-dropout based structured saliency detection models by replacing CVAE with M-head + +and MC-dropout respectively. Results in Fig. 8 show that our method can not only produce high accuracy predictions (compared with DMRA [61]), but also diverse predictions (compared with M-head based and MC-dropout based models) for images with complex background (image in the first and last rows). + +# 4.3. Ablation Study + +We carried out eight experiments (shown in Table 2) to thoroughly analyse our framework, including network structure ("M1", "M2", "M3"), probabilistic model selection ("M4", "M5", "M6"), data source selection ("M7") and effectiveness of the new label generation technique ("M8"). We make the number bold when it's better than ours. + +Scale of Latent Space: We investigate the influence of the scale of the Gaussian latent space $K$ in our network. In this paper, after parameter tuning, we find $K = 8$ works best. We show performance with $K = 32$ as "M1". Performance of "M1" is worse than our reported results, which indicates that scale of the latent space is an important parameter in our framework. We further carried out more experiments with $K \in [2, 12]$ , and found relative stable predictions with $K \in [6, 10]$ . + +Effect of DepthCorrectionNet: To illustrate the effectiveness of the proposed DepthCorrectionNet, we remove this branch and feed the concatenation of the RGB image and depth data to the SaliencyNet, shown as "M2", which is worse than our method. On DES [8] dataset, we observe the proposed solution achieves around $4\%$ improvement on S-measure, E-measure and F-measure, which demonstrates the effectiveness of the depth correction net. + +Saliency Consensus Module: To mimic the saliency labeling process, we embed a saliency consensus module during test in our framework (as shown in Fig. 3) to obtain the majority voting of the multiple predictions. We remove it from our framework and test the network performance by random sample from the latent PriorNet $P_{\theta}(z|X)$ , and performance is shown in "M3", which is the best compared with competing methods. While, with the saliency consensus module embedded, we achieve even better performance, which illustrates effectiveness of the saliency consensus module. + +VAE vs. CVAE: We use CVAE to model labeling variants, and a PosteriorNet is used to estimate parameters for the PriorNet. To test how our model performs with prior of $z$ as a standard normal distribution, and the posterior of $z$ as $P_{\theta}(z|X)$ . VAE performance is shown as "M4", which is comparable with SOTA RGB-D models. With the CVAE [50] based model proposed, we further boost performance of "M4", which proves effectiveness of the our solution. + +Multi-head vs. CVAE: Multi-head models [46] generate multiple predictions with different decoders and a shared encoder, and the loss function is always defined as the closest of the multiple predictions. We remove the LatentNet, + +Table 1. Benchmarking results of ten leading handcrafted feature-based models and eight deep models on six RGBD saliency datasets. $\uparrow \& \downarrow$ denote larger and smaller is better, respectively. Here, we adopt mean $F_{\beta}$ and mean $E_{\xi}$ [15]. + +
MetricHandcrafted Feature based ModelsDeep ModelsUC-Net
LHM [41]CDB [36]DESM [8]GP [44]CDCP [66]ACSD [28]LBE [20]DCMC [10]MDSF [51]SE [22]DF [43]AFNet [54]CTMF [24]MMCI [7]PCF [5]TANet [6]CPFP [64]DMRA [61]Ours
NJU2K [28]Sα↑.514.632.665.527.669.699.695.686.748.664.763.822.849.858.877.879.878.886.897
Fβ↑.328.498.550.357.595.512.606.556.628.583.653.827.779.793.840.841.850.873.886
Eξ↑.447.572.590.466.706.594.655.619.677.624.700.867.846.851.895.895.910.920.930
M↓.205.199.283.211.180.202.153.172.157.169.140.077.085.079.059.061.053.051.043
SSB [40]Sα↑.562.615.642.588.713.692.660.731.728.708.757.825.848.873.875.871.879.835.903
Fβ↑.378.489.519.405.638.478.501.590.527.611.617.806.758.813.818.828.841.837.884
Eξ↑.484.561.579.508.751.592.601.655.614.664.692.872.841.873.887.893.911.879.938
M↓.172.166.295.182.149.200.250.148.176.143.141.075.086.068.064.060.051.066.039
DES [8]Sα↑.578.645.622.636.709.728.703.707.741.741.752.770.863.848.842.858.872.900.934
Fβ↑.345.502.483.412.585.513.576.542.523.618.604.713.756.735.765.790.824.873.919
Eξ↑.477.572.566.503.748.613.650.631.621.706.684.809.826.825.838.863.888.933.967
M↓.114.100.299.168.115.169.208.111.122.090.093.068.055.065.049.046.038.030.019
NLPR [41]Sα↑.630.632.572.655.727.673.762.724.805.756.806.799.860.856.874.886.888.899.920
Fβ↑.427.421.430.451.609.429.636.542.649.624.664.755.740.737.802.819.840.865.891
Eξ↑.560.567.542.571.782.579.719.684.745.742.757.851.840.841.887.902.918.940.951
M↓.108.108.312.146.112.179.081.117.095.091.079.058.056.059.044.041.036.031.025
LFSD [35]Sα↑.557.520.722.640.717.734.736.753.700.698.791.738.796.787.794.801.828.847.864
Fβ↑.396.376.612.519.680.566.612.655.521.640.679.736.756.722.761.771.811.845.855
Eξ↑.491.465.638.584.754.625.670.682.588.653.725.796.810.775.818.821.863.893.901
M↓.211.218.248.183.167.188.208.155.190.167.138.134.119.132.112.111.088.075.066
SIP [18]Sα↑.511.557.616.588.595.732.727.683.717.628.653.720.716.833.842.835.850.806.875
Fβ↑.287.341.496.411.482.542.572.500.568.515.465.702.608.771.814.803.821.811.867
Eξ↑.437.455.564.511.683.614.651.598.645.592.565.793.704.845.878.870.893.844.914
M↓.184.192.298.173.224.172.200.186.167.164.185.118.139.086.071.075.064.085.051
+ +![](images/6239b7ae963e7bf8230ebbe98d05f428b42f0199837e0d40b953b3d3643d3d0b.jpg) + +![](images/81620ddd7e5b1a1fef4474cf3e67eb895795173ce73508d6add95afca222d072.jpg) + +![](images/7d5365bf3d7c0bd13ee7bf02ba83f5f3c29ab9284647b52ea2a9018b19448f28.jpg) + +![](images/9b8ccb983f665e369158b317a48b95158c6c7c6d9d9c4d0c507232c1f46e78d8.jpg) + +![](images/d2135a6a25b75c6ecba927e6e62cc82dca6ca302245cb24b62a150a1dd831b24.jpg) +Figure 7. E-measure $(1^{st}$ row) and F-measure $(2^{nd}$ row) curves on four testing datasets. + +![](images/01363febd4bde9209bea54ddd692baef2ccad42017f7fcb1dfd495cb3f8a0f89.jpg) + +![](images/41ae99e1fae195d89b9c811fc2b26f95d258d820c60bee2c0e4bc5e7dd517f41.jpg) + +![](images/34bb3d317e978455afcd2fa9d60808a8118f0e020c1161eb2b5616f43dd14b7c.jpg) + +and copy the decoder of the SaliencyNet multiple times to achieve multiple predictions ("M5" in this paper). We report performance in "M5" as mean of the multiple predictions. "M5" is better than SOTA models (e.g., DMRA) while there still exists gap between M-head based method ("M5") and our CVAE based model (UC-Net). + +Monte-Carlo Dropout vs. CVAE: Monte-Carlo Dropout [30] uses dropout during the testing stage to introduce stochastic to the network. We follow [30] to remove the LatentNet, and use dropout in the encoder and decoder of the + +SaliencyNet in the testing stage. We repeats five times of random dropout (dropout ratio $= 0.1$ ), and report the mean performance as "M6". Similar to "M5", "M6" also achieves the best performance comparing with SOTA models (e.g., CPFP and DMRA), while the proposed CVAE based model achieves even better performance. + +HHA vs. Depth: HHA [23] is a widely used technique that encodes the depth data to three channels: horizontal disparity, height above ground, and the angle the pixels local surface normal makes with the inferred gravity direction. + +![](images/adae280170170373da11fcef8ceaa637d94df6a78e8bce7be2b4c86795bb789e.jpg) +Figure 8. Comparisons of saliency maps. "MH1" and "MH2" are two predictions from M-head. "DP1" and "DP2" are predictions of two random MC-dropout during test. "Ours(1)" and "Ours(2)" are two predictions sampled from our CVAE based model. Different from M-head and MC-dropout, which produce consistent predictions for ambiguous images ( $5^{th}$ row), UC-Net can produce diverse predictions. + +Table 2. Ablation study on RGB-D saliency datasets. + +
MetricUC-NetM1M2M3M4M5M6M7M8M9
NJUZK [28]Sα↑.897.866.893.905.871.885.881.893.838.866
Fβ↑.886.858.887.884.851.878.878.884.787.812
Eξ↑.930.905.930.927.910.923.927.932.840.866
M↓.043.060.046.045.059.047.046.044.084.075
SSB [40]Sα↑.903.854.893.900.867.891.893.898.855.872
Fβ↑.884.831.876.868.834.864.876.882.793.805
Eξ↑.938.894.911.922.907.921.931.934.854.870
M↓.039.060.043.047.057.047.043.040.073.068
DES [8]Sα↑.934.876.896.928.897.911.896.918.811.911
Fβ↑.919.844.868.902.867.897.868.904.724.843
Eξ↑.967.906.928.947.930.945.928.953.794.910
M↓.019.035.026.024.033.024.026.023.065.036
NLPR [41]Sα↑.920.878.919.918.890.899.910.915.850.883
Fβ↑.891.846.897.878.845.875.867.889.759.795
Eξ↑.951.911.953.941.924.937.933.951.841.883
M↓.025.039.024.029.037.029.028.025.057.045
LESD [35]Sα↑.864.799.847.862.820.838.847.853.729.823
Fβ↑.855.791.838.841.802.833.838.848.661.779
Eξ↑.901.829.879.885.865.875.879.891.720.818
M↓.066.101.079.075.093.079.079.073.145.108
SIP [18]Sα↑.875.846.867.870.851.859.867.865.810.845
Fβ↑.867.837.860.848.821.853.860.855.751.795
Eξ↑.914.884.908.901.893.905.908.908.816.852
M↓.051.068.056.059.067.057.056.056.094.079
+ +HHA is widely used in RGB-D related dense prediction models [11, 24] to obtain better feature representation. To test if HHA also works in our scenario, we replace depth with HHA, and performance is shown in "M7". We observe similar performance achieved with HHA instead of the raw depth data. + +New Label Generation: To produce diverse predictions, we follow [49] and generate diverse annotations for the training dataset. To illustrate the effectiveness of this strategy, we train with only the SaliencyNet to produce single channel saliency map with RGB-D image as input for simplicity. "M8" and "M9" represent using the provided train- + +ing dataset and augmented training data respectively. We observe performance improvement of "M9" compared with "M8", which indicates effectiveness of the new label generation technique. + +# 5. Conclusion + +Inspired by human uncertainty in ground truth (GT) annotation, we proposed the first uncertainty network named UC-Net for RGB-D saliency detection based on a conditional variational autoencoder. Different from existing methods, which generally treat saliency detection as a point estimation problem, we propose to learn the distribution of saliency maps. Under our formulation, our model is able to generate multiple labels which have been discarded in the GT annotation generation process through saliency consensus. Quantitative and qualitative evaluations on six standard and challenging benchmark datasets demonstrated the superiority of our approach in learning the distribution of saliency maps. In the future, we would like to extend our approach to other saliency detection problems (e.g., VSOD [19], RGB SOD [13, 65], Co-SOD [17]). Furthermore, we plan to capture new datasets with multiple human annotations to further model the statistics of human uncertainty in interactive image segmentation [37], camouflaged object detection [16], etc. + +Acknowledgments. This research was supported in part by Natural Science Foundation of China grants (61871325, 61420106007, 61671387), the Australia Research Council Centre of Excellence for Robotics Vision (CE140100016), and the National Key Research and Development Program of China under Grant 2018AAA0102803. We thank all reviewers and Area Chairs for their constructive comments. + +# References + +[1] Abubakar Abid and James Y. Zou. Contrastive Variational Autoencoder Enhances Salient Features. CoRR, abs/1902.04601, 2019. +[2] Radhakrishna Achanta, Sheila Hemami, Francisco Estrada, and Sabine Susstrunk. Frequency-tuned salient region detection. In IEEE CVPR, pages 1597-1604, 2009. +[3] Christian F. Baumgartner, Kerem Can Tezcan, Krishna Chaitanya, Andreas M. Hotker, Urs J. Muehlematter, Khoschy Schawkat, Anton S. Becker, Olivio Donati, and Ender Konukoglu. PHiSeg: Capturing Uncertainty in Medical Image Segmentation. In MICCAI, pages 119-127, 2019. +[4] Ali Borji, Ming-Ming Cheng, Huaizu Jiang, and Jia Li. Salient Object Detection: A Benchmark. IEEE TIP, 24(12):5706-5722, 2015. +[5] Hao Chen and Youfu Li. Progressively complementarity-aware fusion network for RGB-D Salient Object Detection. In IEEE CVPR, pages 3051-3060, 2018. +[6] Hao Chen and Youfu Li. Three-stream Attention-aware Network for RGB-D Salient Object Detection. IEEE TIP, pages 2825-2835, 2019. +[7] Hao Chen, Youfu Li, and Dan Su. Multi-modal fusion network with multi-scale multi-path and cross-modal interactions for RGB-D salient object detection. PR, 86:376-385, 2019. +[8] Yupeng Cheng, Huazhu Fu, Xingxing Wei, Jiangjian Xiao, and Xiaochun Cao. Depth enhanced saliency detection method. In ACM ICIMCS, pages 23-27, 2014. +[9] Gabriel J. Brostow Clment Godard, Oisin Mac Aodha. Unsupervised Monocular Depth Estimation with Left-Right Consistency. In IEEE CVPR, pages 6602-6611, 2017. +[10] Runmin Cong, Jianjun Lei, Changqing Zhang, Qingming Huang, Xiaochun Cao, and Chunping Hou. Saliency detection for stereoscopic images based on depth confidence analysis and multiple cues fusion. IEEE SPL, 23(6):819-823, 2016. +[11] Dapeng Du, Limin Wang, Huiling Wang, Kai Zhao, and Gangshan Wu. Translate-to-Recognize Networks for RGB-D Scene Recognition. In IEEE CVPR, pages 11836–11845, 2019. +[12] Patrick Esser, Ekaterina Sutter, and Bjrn Ommer. A Variational U-Net for Conditional Appearance and Shape Generation. In IEEE CVPR, pages 8857–8865, 2018. +[13] Deng-Ping Fan, Ming-Ming Cheng, Jiang-Jiang Liu, Shang-Hua Gao, Qibin Hou, and Ali Borji. Salient objects in clutter: Bringing salient object detection to the foreground. In ECCV, pages 186-202, 2018. +[14] Deng-Ping Fan, Ming-Ming Cheng, Yun Liu, Tao Li, and Ali Borji. Structure-measure: A new way to evaluate foreground maps. In IEEE ICCV, pages 4548-4557, 2017. +[15] Deng-Ping Fan, Cheng Gong, Yang Cao, Bo Ren, Ming-Ming Cheng, and Ali Borji. Enhanced-alignment Measure for Binary Foreground Map Evaluation. In IJCAI, pages 698-704, 2018. +[16] Deng-Ping Fan, Ge-Peng Ji, Guolei Sun, Ming-Ming Cheng, Jianbing Shen, and Ling Shao. Camouflaged Object Detection. In IEEE CVPR, 2020. + +[17] Deng-Ping Fan, Zheng Lin, Ge-Peng Ji, Dingwen Zhang, Huazhu Fu, and Ming-Ming Cheng. Taking a Deeper Look at the Co-salient Object Detection. In IEEE CVPR, 2020. +[18] Deng-Ping Fan, Zheng Lin, Zhao Zhang, Menglong Zhu, and Ming-Ming Cheng. Rethinking RGB-D salient object detection: Models, datasets, and large-scale benchmarks. IEEE TNNLS, 2020. +[19] Deng-Ping Fan, Wenguan Wang, Ming-Ming Cheng, and Jianbing Shen. Shifting more attention to video salient object detection. In IEEE CVPR, pages 8554-8564, 2019. +[20] David Feng, Nick Barnes, Shaodi You, and Chris McCarthy. Local background enclosure for RGB-D salient object detection. In IEEE CVPR, pages 2343-2350, 2016. +[21] Keren Fu Fu, Deng-Ping Fan, Ge-Peng Ji, and Qijun Zhao. JL-DCF: Joint Learning and Densely-Cooperative Fusion Framework for RGB-D Salient Object Detection. In IEEE CVPR, 2020. +[22] Jingfan Guo, Tongwei Ren, and Jia Bei. Salient object detection for rgb-d image via saliency evolution. In ICME, pages 1-6, 2016. +[23] Saurabh Gupta, Ross Girshick, Pablo Arbeláez, and Jitendra Malik. Learning rich features from RGB-D images for object detection and segmentation. In ECCV, pages 345-360, 2014. +[24] Junwei Han, Hao Chen, Nian Liu, Chenggang Yan, and Xuelong Li. CNNs-based RGB-D saliency detection via cross-view transfer and multiview fusion. IEEE TCYB, pages 3171-3183, 2018. +[25] Faruk Ahmed Adrien Ali Taga Francesco Visin David Vzquez Aaron C. Courville Ishaan Gulrajani, Kundan Kumar. PixelVAE: A Latent Variable Model for Natural Images. In ICLR, 2016. +[26] Laurent Itti and Christof Koch. A saliency-based search mechanism for overt and covert shifts of visual attention. VR, 40(10):1489 - 1506, 2000. +[27] Laurent Itti, Christof Koch, and Ernst Niebur. A model of saliency-based visual attention for rapid scene analysis. IEEE TPAMI, 20(11):1254-1259, 1998. +[28] Ran Ju, Ling Ge, Wenjing Geng, Tongwei Ren, and Gangshan Wu. Depth saliency based on anisotropic center-surround difference. In ICIP, pages 1115-1119, 2014. +[29] Shuhui Wang Jun Wei and Qingming Huang. F3Net: Fusion, Feedback and Focus for Salient Object Detection. In AAAI, 2020. +[30] Alex Kendall, Vijay Badrinarayanan, , and Roberto Cipolla. Bayesian SegNet: Model Uncertainty in Deep Convolutional Encoder-Decoder Architectures for Scene Understanding. In BMVC, 2017. +[31] Diederik P Kingma and Max Welling. Auto-Encoding Variational Bayes. In ICLR, 2013. +[32] Simon Kohl, Bernardino Romera-Paredes, Clemens Meyer, Jeffrey De Fauw, Joseph R. Ledsam, Klaus Maier-Hein, S. M. Ali Eslami, Danilo Jimenez Rezende, and Olaf Ronneberger. A Probabilistic U-Net for Segmentation of Ambiguous Images. In NeurIPS, pages 6965–6975, 2018. +[33] Olivier Le Meur and Thierry Baccino. Methods for comparing scanpaths and saliency maps: strengths and weaknesses. Behavior Research Methods, 45(1):251-266, 2013. + +[34] Bo Li, Zhengxing Sun, and Yuqi Guo. SuperVAE: Superpixelwise Variational Autoencoder for Salient Object Detection. In AAAI, pages 8569-8576, 2019. +[35] Nianyi Li, Jinwei Ye, Yu Ji, Haibin Ling, and Jingyi Yu. Saliency detection on light field. In IEEE CVPR, pages 2806-2813, 2014. +[36] Fangfang Liang, Lijuan Duan, Wei Ma, Yuanhua Qiao, Zhi Cai, and Laiyun Qing. Stereoscopic saliency model using contrast and depth-guided-background prior. Neurocomputing, 275:2227-2238, 2018. +[37] Zheng Lin, Zhao Zhang, Lin-Zhuo Chen, Ming-Ming Cheng, and Shao-Ping Lu. Interactive Image Segmentation with First Click Attention. In IEEE CVPR, 2020. +[38] Yi Liu, Qiang Zhang, Dingwen Zhang, and Jungong Han. Employing Deep Part-Object Relationships for Salient Object Detection. In IEEE ICCV, 2019. +[39] Zhiming Luo, Akshaya Mishra, Andrew Achkar, Justin Eichel, Shaozi Li, and Pierre-Marc Jodoin. Non-Local Deep Features for Salient Object Detection. In IEEE CVPR, 2017. +[40] Yuzhen Niu, Yujie Geng, Xueqing Li, and Feng Liu. Leveraging stereopsis for saliency analysis. In IEEE CVPR, pages 454-461, 2012. +[41] Houwen Peng, Bing Li, Weihua Xiong, Weiming Hu, and Rongrong Ji. Rgbd salient object detection: a benchmark and algorithms. In ECCV, pages 92-109, 2014. +[42] Xuebin Qin, Zichen Zhang, Chenyang Huang, Chao Gao, Masood Dehghan, and Martin Jagersand. BASNet: Boundary-Aware Salient Object Detection. In IEEE CVPR, 2019. +[43] Liangqiong Qu, Shengfeng He, Jiawei Zhang, Jiandong Tian, Yandong Tang, and Qingxiong Yang. RGBD salient object detection via deep fusion. IEEE TIP, 26(5):2274-2285, 2017. +[44] Jianqiang Ren, Xiaojin Gong, Lu Yu, Wenhui Zhou, and Michael Ying Yang. Exploiting Global Priors for RGB-D Saliency Detection. In IEEE CVPRW, pages 25-32, 2015. +[45] Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic Backpropagation and Approximate Inference in Deep Generative Models. In ICML, pages 1278-1286, 2014. +[46] Christian Rupprecht, Iro Laina, Maximilian Baust, Federico Tombari, Gregory D. Hager, and Nassir Navab. Learning in an Uncertain World: Representing Ambiguity Through Multiple Hypotheses. In IEEE ICCV, pages 3611-3620, 2017. +[47] Mohammad Sadegh Aliakbarian, Fatemeh Sadat Saleh, Mathieu Salzmann, Lars Petersson, Stephen Gould, and Amirhossein Habibian. Learning Variations in Human Motion via Mix-and-Match Perturbation. arXiv e-prints, page arXiv:1908.00733, 2019. +[48] Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. In ICLR, 2014. +[49] Krishna Kumar Singh and Yong Jae Lee. Hide-and-Seek: Forcing a Network to be Meticulous for Weakly-supervised Object and Action Localization. In IEEE ICCV, 2017. +[50] Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning Structured Output Representation using Deep Conditional Generative Models. In NeurIPS, pages 3483-3491, 2015. + +[51] Hangke Song, Zhi Liu, Huan Du, Guangling Sun, Olivier Le Meur, and Tongwei Ren. Depth-aware salient object detection and segmentation via multiscale discriminative saliency fusion and bootstrap learning. IEEE TIP, 26(9):4204-4216, 2017. +[52] Qingyang Tan, Lin Gao, Yu-Kun Lai, and Shihong Xia. Variational Autoencoders for Deforming 3D Mesh Models. In IEEE CVPR, 2018. +[53] Jacob Walker, Carl Doersch, Harikrishna Mulam, and Martial Hebert. An Uncertain Future: Forecasting from Static Images Using Variational Autoencoders. In ECCVW, pages 835-851, 2016. +[54] Ningning Wang and Xiaojin Gong. Adaptive Fusion for RGB-D Salient Object Detection. IEEE Access, 7:55277-55284, 2019. +[55] Wenguan Wang, Jianbing Shen, Ming-Ming Cheng, and Ling Shao. An Iterative and Cooperative Top-Down and Bottom-Up Inference Network for Salient Object Detection. In IEEE CVPR, 2019. +[56] Yang Wang, Yi Yang, Zhenheng Yang, Liang Zhao, Peng Wang, and Wei Xu. Occlusion Aware Unsupervised Learning of Optical Flow. In IEEE CVPR, 2018. +[57] Rastogi Akash Villegas Ruben Sunkavalli Kalyan Shechtman Eli Hadap Sunil Yumer Ersin Lee Honglak Yan, Xinchen. MT-VAE: Learning Motion Transformations to Generate Multimodal Human Dynamics. In ECCV, pages 276–293, 2018. +[58] Maoke Yang, Kun Yu, Chi Zhang, Zhiwei Li, and Kuiyuan Yang. DenseASPP for Semantic Segmentation in Street Scenes. In IEEE CVPR, pages 3684-3692, 2018. +[59] Li Yi, Wang Zhao, He Wang, Minhyuk Sung, and Leonidas J. Guibas. GSPN: Generative Shape Proposal Network for 3D Instance Segmentation in Point Cloud. In IEEE CVPR, 2019. +[60] Shivanthan A. C. Yohanandan, Adrian G. Dyer, Dacheng Tao, and Andy Song. Saliency Preservation in Low-Resolution Grayscale Images. In ECCV, 2018. +[61] Jingjing Li Miao Zhang Huchuan Lu Yongri Piao, Wei Ji. Depth-induced Multi-scale Recurrent Attention Network for Saliency Detection. In IEEE ICCV, 2019. +[62] Jing Zhang, Xin Yu, Aixuan Li, Peipei Song, Bowen Liu, and Yuchao Dai. Weakly-Supervised Salient Object Detection via Scribble Annotations. In IEEE CVPR, 2020. +[63] Jing Zhang, Tong Zhang, Yuchao Dai, Mehrtash Harandi, and Richard Hartley. Deep Unsupervised Saliency Detection: A Multiple Noisy Labeling Perspective. In IEEE CVPR, pages 9029-9038, 2018. +[64] Jia-Xing Zhao, Yang Cao, Deng-Ping Fan, Ming-Ming Cheng, Xuan-Yi Li, and Le Zhang. Contrast Prior and Fluid Pyramid Integration for RGBD Salient Object Detection. In IEEE CVPR, 2019. +[65] Jia-Xing Zhao, Jiang-Jiang Liu, Deng-Ping Fan, Yang Cao, Jufeng Yang, and Ming-Ming Cheng. EGNet: Edge guidance network for salient object detection. In IEEE ICCV, pages 8779-8788, 2019. +[66] Chunbiao Zhu, Ge Li, Wenmin Wang, and Ronggang Wang. An innovative salient object detection using center-dark channel prior. In IEEE ICCVW, 2017. \ No newline at end of file diff --git a/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/images.zip b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1b36b55e2c3156e1d420da1b192be3b0f20a0acb --- /dev/null +++ b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ff83a60cf535af1616adfaeae06bc4a7f6cc40c5f46a456cbdb754781f26afc +size 749473 diff --git a/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/layout.json b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4c6d4e47ae0e6e96051dd140da24d7dac7c58dcc --- /dev/null +++ b/ucnetuncertaintyinspiredrgbdsaliencydetectionviaconditionalvariationalautoencoders/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa5ec5afaa21e93675f224a1dc067cd91834ceb29c1620744de1adb2afb480dc +size 545774 diff --git a/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/6d50fd93-a0d1-400a-bfc4-e04bd9c5fb70_content_list.json b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/6d50fd93-a0d1-400a-bfc4-e04bd9c5fb70_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e9f130d261c82df50b29f917d94be2c4997625e7 --- /dev/null +++ b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/6d50fd93-a0d1-400a-bfc4-e04bd9c5fb70_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a37ef5ff03af877f13388440ced74a030e1cf9e5eaf522c463c2ff758bc35d69 +size 62783 diff --git a/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/6d50fd93-a0d1-400a-bfc4-e04bd9c5fb70_model.json b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/6d50fd93-a0d1-400a-bfc4-e04bd9c5fb70_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b8ac68e118ca1a67a3baeb33077fc697172f5de0 --- /dev/null +++ b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/6d50fd93-a0d1-400a-bfc4-e04bd9c5fb70_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24adde1cfd759986fb674c01a1aecc2e1e5a106716f5612624b4ddbe7d914b6d +size 77138 diff --git a/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/6d50fd93-a0d1-400a-bfc4-e04bd9c5fb70_origin.pdf b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/6d50fd93-a0d1-400a-bfc4-e04bd9c5fb70_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0983f10f711f4e72923c09dccef39d7ffd4df01f --- /dev/null +++ b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/6d50fd93-a0d1-400a-bfc4-e04bd9c5fb70_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45a1afab0d21e3ac2a037a425468d3e371e1a9a49db93ae1ff1db6c3fb9788df +size 1182873 diff --git a/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/full.md b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..104a81618b8d66b20483c03b4806c7149705820f --- /dev/null +++ b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/full.md @@ -0,0 +1,286 @@ +# UCTGAN: Diverse Image Inpainting based on Unsupervised Cross-Space Translation + +Lei Zhao*, Qihang Mo, Sihuan Lin, Zhizhong Wang, Zhiwen Zuo, Haibo Chen, Wei Xing, Dongming Lu + +College of Computer Science and Technology, Zhejiang University + +{czhl, moqihang, linsh, endywon, zzwcs, feng123, WXING, ldm}@zju.edu.cn + +![](images/d76f4c56c17cda46fe0100d02b3e00159a676f91a154014cf369c25a77d74e14.jpg) +Figure 1: Exemplar inpainting results of our method on images of face (from CelebA-HQ [9]), building ( from Paris [4]) and natural scene (from Places2 [30]). Missing regions are shown in gray. From left to right, we show the masked input image, the diverse and reasonable outputs of our model without any post-processing (zoom in to see the details). + +# Abstract + +Although existing image inpainting approaches have been able to produce visually realistic and semantically correct results, they produce only one result for each masked input. In order to produce multiple and diverse reasonable solutions, we present Unsupervised Cross-space Translation Generative Adversarial Network (called UCTGAN) which mainly consists of three network modules: conditional encoder module, manifold projection module and generation module. The manifold projection module and the generation module are combined to learn one-to-one image mapping between two spaces in an unsupervised way by projecting instance image space and conditional completion image space into common low-dimensional manifold space, which can greatly improve the diversity of the re + +paired samples. For understanding of global information, we also introduce a new cross semantic attention layer that exploits the long-range dependencies between the known parts and the completed parts, which can improve realism and appearance consistency of repaired samples. Extensive experiments on various datasets such as CelebA-HQ, Places2, Paris Street View and ImageNet clearly demonstrate that our method not only generates diverse inpainting solutions from the same image to be repaired, but also has high image quality. + +# 1. Introduction + +Image inpainting (also known as image completion or image hole-filling) refers to using the known information of the images and a specific method to repair a partially damaged or missing image in an undetectable way. It fills the + +missing part of an image to make it look natural (i.e., visually realistic and semantically correct) according to some rules [1, 21, 2, 15, 20, 25, 13]. This task is a basic problem in the field of image processing and has drawn great attention for decades, because image inpainting can be used in various applications such as object removal, image editing and old photo restoration, to name a few. Its key problem is how to generate missing contents to maintain the integrity and consistency of the restored images, and avoid incomplete fusion between the filled contents and the known visible contents. + +Image inpainting is an undetermined inverse problem, where a large number of plausible solutions can satisfy the constraints of image restoration. In this paper, our main object is to produce multiple and diverse reasonable results when given a masked image, so we refer to this task as diverse image inpainting. + +Early image inpainting approaches progressively fill in missing regions by searching and pasting the most similar image patches in the background regions under the hypothesis that the contents to be filled in come from the background areas [1, 21, 2]. This hypothesis is not always conformed with the real cases. Though these approaches work well for some cases, they can not generate semantically meaningful contents. More recently, some deep-learning based image inpainting approaches have been proposed to learn the essential distribution of training data, which is used to repair the masked images. However, these approaches can only generate one optimal result, and do not have the capacity to produce various semantically meaningful solutions. + +Nowadays, typical GAN-based image generation approaches, such as [6, 19, 9, 3], have been able to generate novel and diverse image samples by mapping the noise of normal distribution to the image. However, they can not be directly applied to diverse image inpainting for the following reasons: 1) In diverse image inpainting scenario, the condition label is the masked image itself, and there is only one instance (i.e., the ground truth image corresponding to the masked image) in the training set for each condition label. That is to say, there are no conditional training datasets which explicitly express conditional distribution. 2) The diverse image inpainting scenario has strong constraints (the repaired images should keep integrity and consistency in color and texture with the masked image), so it is more vulnerable to suffer from mode collapse than typical image generation. + +As we know, the set of all possible repaired results for a given masked image expresses conditional probability distribution, the set of masked images expresses marginal probability distribution and the training dataset expresses joint probability distribution. So, the diverse image restoration can be regarded as the problem of finding conditional + +probability with known marginal probability and joint probability, which means that we can borrow some information from training data when traversing the conditional completion image space. Inspired by the above analyses, we present a conditional image-to-image translation network for instance-guided diverse image inpainting, conditioned on the masked image. + +The main contributions of our work are: + +- An instance-guided conditional image-to-image translation framework for diverse image inpainting that is able to learn conditional completion distribution when given a masked image. +- A new network structure with two branches, which learns one-to-one image mapping between instance image space and conditional completion image space in an unsupervised way. Our method has much higher sampling diversity as compared to existing methods. +- A novel cross semantic attention layer that exploits long-range global information to ensure appearance and structure consistency in the image domain. +- We demonstrate that our approach is able to generate multiple reasonable solutions that have significant diversity for a masked image input, such as those shown in Fig. 1. + +# 2. Related Work + +# Non-deep-learning based inpainting + +Non-deep-learning based inpainting approaches mainly utilize non-learning prior knowledge (i.e., hand-crafted features), such as statistics of patch offsets and low rank to recover the image. Among them, patch-based methods [5] and diffusion-based methods [11] are the most typical. Patch-based methods were first introduced for texture synthesis [5]. They were then applied in image inpainting to fill missing parts at pixel level [21]. They usually search and borrow similar patches from image datasets or undamaged image background to generate missing parts based on distance metrics between patches [14]. Non-deep-learning methods for image inpainting are able to generate sharp results similar to context. However, it is difficult to produce semantically plausible solutions by patch-based approaches, due to the lack of high level semantic understanding of images. + +# Deep-learning based inpainting + +Deep-learning based inpainting methods often use deep neural networks and GANs to adversarially generate pixels of missing parts [6, 15, 20, 25, 13]. The existing deep learning based inpainting methods are mainly divided into two categories: single-solution inpainting methods and multiple-solution inpainting methods. + +Single-solution inpainting methods produce only one result for each masked input, although there may be many reasonable possibilities. These approaches, such as [28, 8, 15, 20, 24], often generate distorted structures and blurry textures inconsistent with the visible regions. In order to overcome these problems, researchers have done a lot of work, such as [27, 23, 26, 22, 13, 16, 12, 25]. + +Multiple-solution inpainting methods can produce multiple plausible results for each masked input. Zheng et al. [29] proposed a probabilistically principled framework with two parallel paths, which utilized prior-conditional lower bound coupling to generate multiple diverse results with reasonable content for a single masked input. Our method is similar to that of [29] in goal, both are to generate multiple diverse and reasonable results for a masked image input, but our approach uses a different route to improve the diversity and realism of the restored image. + +# Diverse image generation + +Image generation methods produce novel diverse samples according to high-dimension data distributions learned from the image dataset. Currently, the most typical approaches are Variational Autoencoders (VAE) [19] and Generative Adversarial Networks (GAN) [6]. Cross domain image translation can also generate diverse images, such as BicycleGAN (BG) [31], MUNIT [7], DR [10], etc. BicycleGAN (BG) [31] explicitly encourages the connection between output and the latent code to be invertible, which helps prevent a many-to-one mapping from the latent code to the output during training, and produces more diverse results. MUNIT [7] and DR [10] use the content (or style) of one image as a guide, and combine with the style (or content) of another image to achieve diverse image-to-image translation. Inspired by them, we also adopt instance images of training dataset as a guide to perform diverse image inpainting. However, our approach is fundamentally different from MUNIT [7] and DR [10]. Our method does not decouple images into content code and style code. The disentangled representations of content and style are the bases of diverse image-to-image translation performed by MUNIT [7]. The cross adversarial training of two different domains is necessary in order to decouple the content and style of the image in MUNIT [7]. However, in the scenario of diverse image inpainting, the images to be repaired, instance images used as guides and corresponding completion images all belong to the same domain, so MUNIT [7] can not be used for diverse image inpainting since it can not realize the disentangled learning of content and style in a single domain. + +# 3. Our Approach + +Suppose we have an image from a training dataset, originally $I_g$ , but degraded by a mask $M$ to become $I_m$ (the masked image) comprising the observed/visible pixels. Our + +goal is to produce multiple and diverse semantically reasonable and visually realistic completion images $I_{c}$ for a masked image $I_{m}$ . The set of all these completion images $I_{c}$ is called conditional completion image space $S_{cc}$ of a given masked image $I_{m}$ . The instance image $I_{i}$ for guidance comes from the training dataset, and the set of all instance images $I_{i}$ is called instance image space $S_{i}$ . The network model is prone to suffer from mode collapse in the diverse image inpainting scenario, which results in poor diversity of completion images. In order to improve the variance of the repaired images, our network learns a one-to-one mapping between instance image space $S_{i}$ and conditional completion image space $S_{cc}$ by an unsupervised way (unsupervised cross-space translation), which is implemented by projecting instance image space $S_{i}$ and conditional completion image space $S_{cc}$ into common low-dimensional manifold space $S_{m}$ . The deep neural network of a specific structure is designed to learn a mapping $MAP: S_{i} \rightarrow S_{cc}$ such that $E_{1}(I_{i}) = E_{1}(I_{c})$ , where $E_{1}(\cdot)$ is a multivariate function which projects $I_{i}$ or $I_{c}$ into low-dimension manifold space, and $I_{c} = U(I_{i}, I_{m})$ , $U(\cdot)$ is the function expressed by our UCTGAN networks. + +# 3.1. Probabilistic Analysis + +Our network framework will maximize the conditional log-likelihood of the training instances, which involves variational lower bound: + +$$ +\begin{array}{l} \log p \left(I _ {c} \mid I _ {m}\right) \geq - K L \left(f _ {\varphi} \left(Z _ {c} \mid I _ {i}, I _ {m}\right) \| f _ {\psi} \left(Z _ {c} \mid I _ {m}\right)\right) \tag {1} \\ + \mathbb {E} _ {Z _ {c} \sim f _ {\varphi} \left(Z _ {c} \mid I _ {i}, I _ {m}\right)} \left[ \log g _ {\theta} \left(I _ {c} \mid Z _ {c}, I _ {m}\right) \right] \\ \end{array} +$$ + +where $I_{i}$ , $I_{c}$ and $I_{m}$ are the instance image, the repaired image and the masked image, respectively. $Z_{c}$ is the latent vector of $I_{i}$ in space $S_{m}$ . $f_{\varphi}$ , $f_{\psi}$ and $g_{\theta}$ are the posterior sampling function, the conditional prior and the likelihood, with $\varphi$ , $\psi$ and $\theta$ being the deep network parameters of their corresponding functions. The conditional prior is set as $f_{\psi}(Z_c|I_m) = \mathcal{N}(\mathbf{0},\mathbf{I})$ . The first term mainly projects instance image $I_{i}$ into low-dimensional manifold vector $Z_{c}$ which is shared by the completion image corresponding to the instance image. + +# 3.2. Network Structure + +Our network is trained in an end-to-end fashion, which consists of two branches, shown in Fig. 2, which mainly consists of three network modules: manifold projection module $E_{1}$ , conditional encoder module $E_{2}$ and generation module $G$ . The primary branch consists of a manifold projection module $E_{1}$ and a generation module $G$ , which is responsible for learning one-to-one image mapping between two spaces in an unsupervised way by projecting instance image space $S_{i}$ and conditional completion image space $S_{cc}$ into one common latent manifold space $S_{m}$ . The second + +![](images/c298fd613e99e529b05d289049b5bf53a46b5db79ca9d34728ce175fbcec57a2.jpg) + +![](images/9da38740e6f0ff292766271e2a57a150df9ab9a5b28c33d3a2c892bdef0d4159.jpg) +Figure 2: Overview of our architecture with two branches. The primary branch consists of a manifold projection module and a generation module, which is responsible for mapping the instance image space to the conditional completion image space. The secondary branch consists of a conditional encoder module, which acts as the conditional label. +Figure 3: Our cross semantic attention layer. The attention map is computed on masked image features and instance image features on bottleneck layer. + +branch consists of a conditional encoder module $E_{2}$ , which acts as conditional constraint similar to the conditional label. For a masked image $I_{m}$ , there is only one original image $I_{g}$ that can be used as training data to maximize the likelihood in equation (1). That is to say, the mapping between instance images and completion images can only be obtained in an unsupervised way, which often results in mode collapse. In order to associate two spaces (instance image space and conditional completion image space) by one-to-one mapping, instance images $I_{i}$ and their corresponding mapped restored images $I_{c}$ should have the same representation in the low-dimension manifold space $S_{m}$ . + +# 3.3. Training Loss + +Condition Constraint Loss. The multiple and diverse results generated by our network need to be consistent with the masked image, which requires that the appearance and perceptual features of the repaired images be as same as possible to those of the corresponding masked images in the known pixel regions. We define conditional constraint + +loss in terms of appearance and perceptual features. + +$$ +\begin{array}{l} \mathcal {L} _ {c c l} = \mathcal {L} _ {c c l} ^ {a} + \mathcal {L} _ {c c l} ^ {f} \\ = \mathbb {E} _ {I _ {i} \sim p _ {d a t a}} \| (M \odot U (I _ {i}, I _ {m})) - I _ {m} \| _ {1} \tag {2} \\ + \mathbb {E} _ {I _ {i} \sim p _ {d a t a}} \| \varphi (M \odot U (I _ {i}, I _ {m})) - \varphi (I _ {m}) \| _ {1} \\ \end{array} +$$ + +where $M$ is the mask, $U(\cdot)$ is the function expressed by our network, $p_{data}$ is the distribution of training dataset, $\varphi$ is the pretrained feature extractor such as VGG16, $\mathcal{L}_{ccl}^{a}$ and $\mathcal{L}_{ccl}^{f}$ are appearance constraint loss and perceptual constraint loss, respectively. + +KL Divergence Loss. The KL divergence loss $\mathcal{L}_{KL}$ is defined as: + +$$ +\begin{array}{l} \mathcal {L} _ {K L} = \mathcal {L} _ {K L} ^ {i} + \mathcal {L} _ {K L} ^ {m} \\ = K L \left(E _ {1} \left(Z _ {c} \mid I _ {i}\right) \| \mathcal {N} (\mathbf {0}, \mathbf {I})\right) \tag {3} \\ + K L \left(E _ {2} \left(Z _ {m} \mid I _ {m}\right) \| \mathcal {N} (\mathbf {0}, \mathbf {I})\right) \\ \end{array} +$$ + +where $\mathcal{L}_{KL}^{i}$ and $\mathcal{L}_{KL}^{m}$ are responsible for projecting instance images and masked images into multivariate normal distribution space, $E_{1}$ and $E_{2}$ are functions represented by manifold projection module and conditional encoder module, respectively. $Z_{c}$ and $Z_{m}$ are the latent vector of $I_{i}$ and $I_{m}$ in multivariate normal distribution space, respectively. + +Reconstruction Loss. Our network translates instance images into completion images in an unsupervised way. However, the instance image is different from the corresponding completion image in pixel level. It is desired that the instance image is the same as the corresponding completion image in low-dimensional manifold space. So the low-dimensional manifold loss is defined as + +$$ +\mathcal {L} _ {r e c} ^ {l} = \mathbb {E} _ {I _ {i} \sim P _ {d a t a}} \| E _ {1} (I _ {i}) - E _ {1} \left(G \left(E _ {1} (I _ {i}), E _ {2} (I _ {m}))\right) \| _ {1} \right. \tag {4} +$$ + +where $I_{m}$ is the masked image, $I_{i}$ is the instance image randomly sampled from training dataset, $P_{data}$ is the dis + +![](images/d060abef3481c0f26b4e433e1ff7f4a9a89860e11f039830e60ae15c6027d236.jpg) +Figure 4: Comparisons on Paris [4] test set for center region completion. For each group, from left to right the images are masked image, CE [15], CA [26], CSA [13], SF [16], SN [23], PN [29] in blue box and our method in red box, respectively. + +tribution of training dataset, $E_{1}$ is the manifold projection module, $E_{2}$ is the conditional encoder module, $G$ is the generation module. + +For each masked image $I_{m}$ , there is only one ground truth image $I_{g}$ corresponding to it. When its corresponding ground truth image $I_{g}$ is used as the guided instance image, the output of the generation module is $I_{g}$ . Therefore, an identical reconstruction constraint is needed, which is defined as follows: + +$$ +\mathcal {L} _ {r e c} ^ {g} = \left\| I _ {g} - G \left(E _ {1} \left(I _ {g}\right), E _ {2} \left(I _ {m}\right)\right) \right\| _ {1} \tag {5} +$$ + +where $I_{m}$ is the masked image, $I_{g}$ is the ground truth image of $I_{m}$ , $E_{1}$ is the manifold projection module, $E_{2}$ is the conditional encoder module, and $G$ is the generation module. + +The total reconstruction loss $\mathcal{L}_{rec} = \mathcal{L}_{rec}^{l} + \mathcal{L}_{rec}^{g}$ . + +Adversarial Loss. Our adversarial loss is defined as + +$$ +\begin{array}{l} \mathcal {L} _ {a d v} = \min _ {U} \max _ {D} \left(\mathbb {E} _ {I _ {i} \sim p _ {d a t a}} \log D (I _ {i}) \right. \tag {6} \\ + \mathbb {E} _ {I _ {i} \sim p _ {d a t a}} \log (1 - D (U (I _ {i}, I _ {m}))) \\ \end{array} +$$ + +where $p_{data}$ is the distribution of training dataset, $D$ is the discriminator, and $U(\cdot)$ is our network (UCTGAN). + +Full Objective. The total loss function $\mathcal{L}_{\text {total }}$ of our network (UCTGAN) consists of four groups of component losses: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {t o t a l}} = \lambda_ {\text {r e c}} \left(\mathcal {L} _ {\text {r e c}} ^ {g} + \mathcal {L} _ {\text {r e c}} ^ {l}\right) + \lambda_ {\text {c c l}} \left(\mathcal {L} _ {\text {c c l}} ^ {a} + \mathcal {L} _ {\text {c c l}} ^ {f}\right) \tag {7} \\ + \lambda_ {a d v} \mathcal {L} _ {a d v} + \lambda_ {K L} \left(\mathcal {L} _ {K L} ^ {i} + \mathcal {L} _ {K L} ^ {m}\right) \\ \end{array} +$$ + +where the $\mathcal{L}_{KL}$ group measures the matching degree of two probability distributions in terms of $KL$ divergences, the condition constraint losses $\mathcal{L}_{ccl}^{a}$ and $\mathcal{L}_{ccl}^{f}$ encourage consistency and integrity between completion contents and known contents, reconstruction losses $\mathcal{L}_{rec}^{g}$ and $\mathcal{L}_{rec}^{l}$ encourage one-to-one mapping between the instance image and the repaired image and avoid falling into mode collapse, and adversarial loss $\mathcal{L}_{adv}$ makes repaired images fit in with the distribution of training dataset. The hyper-parameters $\lambda_{rec}$ , $\lambda_{ccl}$ , $\lambda_{adv}$ and $\lambda_{KL}$ control the relative importance of each group of component loss. + +# 3.4. Cross Semantic Attention + +Our proposed cross semantic attention module is shown in Fig. 3. It is added after the max pooling layer of bottleneck layer. Feature maps $F_{m}$ of the masked image $I_{m}$ and + +![](images/de9d9aa6b3279813835d4d9b018fde0d551d0f5cb04b0a44b0eba55475e7c3f8.jpg) + +![](images/0aa033d753b6885320a90810502686c1e0a045afbb84b7295d40e5dd72110dbe.jpg) +Figure 5: Comparisons on CelebA-HQ [9] test set for center region completion. For each group, from left to right the images are masked image, CE [15], CA [26], CSA [13], SF [16], SN [23], PN [29] in blue box and our method in red box, respectively. +Figure 6: Comparisons on Places2 [30] test set. For each group, from left to right the images are masked image, PN [29] in blue box and our method in red box, respectively. + +$F_{i}$ of the instance image $I_{i}$ are transformed by 1x1 convolution filter into two feature spaces to evaluate the cross semantic attention $F_{im}^{n}$ between $\overline{F_m}$ and $\overline{F_i}$ . + +$$ +F _ {i m} ^ {n} = \frac {1}{M (F)} \sum_ {\forall j} \exp \left(\left(\overline {{F _ {m} ^ {n}}}\right) ^ {T} \left(\overline {{F _ {i} ^ {j}}}\right) d \left(F _ {i} ^ {j}\right)\right) \tag {8} +$$ + +where $\overline{F_m} = W_f F_m$ , $\overline{F_i} = W_k(F_i)$ , $d(F_i) = W_d(F_i)$ . The equation is normalized by a factor $M(F) = \sum_{\forall j} \exp((\overline{F_m^n})^T (\overline{F_i^j}))$ . Here $j$ is the index that enumerates all possible positions and $n$ is the output position index, $W_f$ , $W_k$ , $W_d$ are the learned weight matrices. Then the output + +Algorithm 1 Training procedure of our framework +1: while $G, E_1, E_2$ have not converged do +2: Sample batch images $x$ from training data +3: Sample instance images $y$ for $x$ from training data +4: Replace the first 3 images of $y$ with the ground truth image $I_g$ of $x$ $\triangleright$ batchsize is 8 +5: Generate random masks $M$ for $x$ +6: Construct inputs $x \gets x \odot M$ +7: Generate outputs $\overline{x} \gets G(E_1(y), E_2(x))$ +8: Compute all the losses +9: Update $G, E_1, E_2$ with $\mathcal{L}_{rec}^g, \mathcal{L}_{KL}^m, \mathcal{L}_{KL}^i, \mathcal{L}_{adv}$ +10: Update $G$ with $\mathcal{L}_{rec}^l, \mathcal{L}_{ccl}^a, \mathcal{L}_{ccl}^f$ keeping $E_1, E_2$ fixed +11: Update $D$ with $\mathcal{L}_{adv}$ +12: end while + +$F_{i}^{O}$ is: + +$$ +F _ {i} ^ {O} = \Gamma_ {d} F _ {i m} + F _ {i} \tag {9} +$$ + +where $\Gamma_d$ is a scale parameter for balancing the weights between $F_{im}$ and $F_i$ . + +# 4. Experimental Results + +We now prove the advantages of the proposed method by showing the results of diverse image inpainting on four datasets including Paris [4], CelebA-HQ [9], Places2 [30], and ImageNet [17]. + +Baselines. We compare with the following baselines: context encoders (CE) [15], contextual attention (CA) [26], coherent semantic attention (CSA) [13], structureflow (SF) [16], shift-net (SN) [23], CVAE [19], BicycleGAN (BG) [31], and PICNet (PN) [29]. + +Implementation details. Our model is learned using the training set and tested on the test set, following the experimental settings used by baselines for fair comparisons. We use images of resolution $256 \times 256$ with regular holes or irregular holes in random positions. We train our networks using Adam optimizer with $\beta_{1} = 0.5$ and $\beta_{2} = 0.99$ , and all networks are initialized with Orthogonal Initialization. The learning rate is initialized at 0.0001 and it multiplies by 0.97 per 1K iterations. We train the network for 500K iterations. The batch size is 8. We choose low-dimensional manifold vector $|Z| = 512$ across all the datasets. An overview of the training procedure can be seen in Algorithm 1. + +# 4.1. Qualitative Comparison + +We compare our method with existing methods on Paris [4], CelebA-HQ [9], Places2 [30], and ImageNet [17], respectively. As shown in Fig. 4, 5 and 6, our model produces various plausible results by sampling from the latent space + +of instance data. Our model can also be trained for arbitrary region completion. + +# 4.2. Quantitative comparisons + +We quantitatively compare our model with existing single-solution inpainting methods and multiple-solution inpainting methods, respectively. + +Comparisons with Single-solution Inpainting Methods. Given a masked image input, our model can generate multiple and diverse reasonable solutions, while the single-solution inpainting methods can only generate one result. For fair comparison, we select top 5 samples (ranked by the discriminator) generated by our model to evaluate the average metric value. + +In order to better measure the quality of the restored image, we introduce a Modified Inception Score (MIS), which is modified on the basis of Inception Score (IS) [18]. As we known from [18], IS is defined as + +$$ +I S = \exp (H (p (y)) - \mathbb {E} _ {x} H (p (y | x))) \tag {10} +$$ + +where $H(\cdot)$ is an entropy function, $p(y)$ denotes the marginal probability function of image category distribution, $p(y|x)$ denotes the probability function of category distribution of the given image $x$ . $H(p(y))$ is used to measure the diversity of generated image categories. However, in the scenario of image inpainting, there is only one kind of image. In addition, $p(y)$ often needs a lot of images to make sense. So we remove the item $H(p(y))$ . The MIS is defined as + +$$ +M I S = \exp \left(\mathbb {E} _ {x \sim p _ {g}} \sum_ {i} \left(p \left(y _ {i} \mid x\right) \log p \left(y _ {i} \mid x\right)\right)\right) \tag {11} +$$ + +where $p_{g}$ is the model distribution of image $x$ . $y$ is the label predicted by pre-trained classification models. The larger the value of MIS is, the better the image quality is. The maximum value of MIS is 1. Compared with IS [18], MIS is more suitable for evaluating image quality in the scenario of image inpainting. The comparison is conducted on CelebA-HQ 1000 test images, with quantitative measures of mean $l_{1}$ loss, peak signal-to-noise ratio (PSNR), structural similarity (SSIM), IS and MIS as shown in the Table 1. We used a 128 × 128 mask in the center. + +Comparisons with Multiple-solution Inpainting Methods. We evaluate diversity scores using the LPIPS metric reported in [31]. The average score is calculated between 5K pairs generated from a sampling of 1K center-masked images. $I_{out}$ and $I_{out(m)}$ are the full output and mask-region output, respectively. Our method obtains relatively higher diversity scores than other existing methods as shown in Table 2. + +User Study. To better evaluate and compare with other methods, we randomly select 600 images from the CelebAHQ [9] test set and randomly distribute these images to 20 + +Table 1: Quantitative comparison with the state-of-the-art approaches on CelebA-HQ dataset. Our model was trained on regular holes. † Lower is better. ⊕ Higher is better. + +
MethodPSNR\( ^{\text{田}} \)SSIM\( ^{\text{田}} \)IS\( ^{\text{田}} \)MIS\( ^{\text{田}} \)\( l_1\ loss\ (\%)^{\dagger} \)
SF [16]25.97940.88352.88500.01561.69
CA [26]24.23770.86712.86740.01512.35
CE [15]26.16340.89102.88510.014925.20
CSA [13]26.19200.90212.79970.01631.68
SN [23]26.07320.86712.99810.01701.81
PN [29]24.42290.86923.00970.01702.17
UCTGAN with noise25.97000.87522.90120.01741.61
UCTGAN without attention26.02230.87323.00110.01741.65
UCTGAN with attention26.38330.88623.01270.01781.51
+ +Table 2: Quantitative comparison of diversity with the state-of-the-art methods. + +
MethodLPIPS(Iout)LPIPS(Iout(m))
CVAE [19]0.0040.014
BG [31]0.0270.060
PN [29]0.0290.088
UCTGAN without Llrec0.0170.032
UCTGAN with noise0.0290.062
UCTGAN0.0300.092
+ +users. Each user is given 30 images with holes together with the inpainting results of PICNet (PN) [29] and ours. Each of them is asked to rank the results in non-increasing order (meaning they can say two results have similar quality). The statistics show that our model is ranked better most of time $(71.15\%)$ over PICNet (PN) [29]. + +# 4.3. Ablation Study + +With and without cross semantic attention module. We train a complete UCTGAN on the CelebA-HQ dataset with cross semantic attention layer (called UCTGAN with attention) and one model that does not involve cross semantic attention layer (called UCTGAN without attention). Table 1 lists the evaluation results. From the results in Table 1, we can see that the cross semantic attention layer (UCTGAN with attention) improves image quality in several metrics such as MIS, IS and PSNR. + +With and without guided instance. In order to test the effect of the manifold projection module, we replace the output of manifold projection module with the noise sampled from standard normal distribution. We train this model (called UCTGAN with noise) on the CelebA-HQ dataset. The evaluation results are shown in Table 1 and 2, we can see that the instance guided method (UCTGAN with attention) improves image quality and diversity. + +With and without low dimension loss $\mathcal{L}_{rec}^{l}$ . The low dimension loss $\mathcal{L}_{rec}^{l}$ is used to ensure that the instance image + +and the corresponding repaired image are projected onto the same low-dimensional manifold, which realizes one-to-one mapping between instance image space and conditional completion image space. In order to measure the effect of loss $\mathcal{L}_{rec}^{l}$ on the diversity of the generated repaired images, we train the model without $\mathcal{L}_{rec}^{l}$ (UCTGAN without $\mathcal{L}_{rec}^{l}$ ) on the CelebA-HQ dataset. The evaluation results are shown in Table 2, and we can see that the low dimension loss $\mathcal{L}_{rec}^{l}$ greatly improves image diversity. + +# 5. Conclusion + +In this paper, we propose a conditional image-to-image translation network (UCTGAN) to generate multiple and diverse semantically reasonable and visually realistic results for image inpainting. Our method learns the conditional distribution by unsupervised cross-space translation. Specifically, the proposed network realizes one-to-one mapping between instance image space and conditional completion image space, which can significantly reduce the possibility of mode collapse and improve the diversity of restored images. We also introduce a new cross semantic attention layer that exploits the long-range dependencies between the known parts and the completed parts, which improves realism and appearance consistency. As for future work, we plan to extend our method to other tasks, such as diverse intra-domain image generation based on instance images, diverse image super-resolution and diverse text-to-image generation. + +Acknowledgments. This work was supported in part by the Zhejiang science and technology program (No:2019C03137), Zhejiang fund project (No:LGF18F020006, LY19F020049), and the key scientific research base for digital conservation of cave temples in Zhejiang university, state administration for cultural heritage of china. + +# References + +[1] Connelly Barnes, Eli Shechtman, Adam Finkelstein, and Dan B Goldman. Patchmatch: A randomized correspondence algorithm for structural image editing. In ACM Transactions on Graphics (ToG), volume 28, page 24. ACM, 2009. +[2] Marcelo Bertalmio, Luminita Vese, Guillermo Sapiro, and Stanley Osher. Simultaneous structure and texture image inpainting. IEEE transactions on image processing, 12(8):882-889, 2003. +[3] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural image synthesis. In International Conference on Learning Representations, 2019. +[4] Carl Doersch, Saurabh Singh, Abhinav Gupta, Josef Sivic, and Alexei A. Efros. What makes paris look like paris? Acm Transactions on Graphics, 31(4):1-9, 2012. +[5] A Efros and W Freeman. Image quilting for texture synthesis. In Proceedings of SIGGRAPH 2001, volume 341, page 346, 2001. +[6] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. +[7] Xun Huang, Ming-Yu Liu, Serge Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 172-189, 2018. +[8] Satoshi Iizuka, Edgar Simo-Serra, and Hiroshi Ishikawa. Globally and locally consistent image completion. ACM Transactions on Graphics (ToG), 36(4):107, 2017. +[9] Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for improved quality, stability, and variation. In IEEE Conference on Learning Representations, 2018. +[10] Hsin-Ying Lee, Hung-Yu Tseng, Jia-Bin Huang, Maneesh Singh, and Ming-Hsuan Yang. Diverse image-to-image translation via disentangled representations. In Proceedings of the European Conference on Computer Vision (ECCV), pages 35-51, 2018. +[11] Anat Levin, Assaf Zomet, and Yair Weiss. Learning how to inpaint from global image statistics. In null, page 305. IEEE, 2003. +[12] Guilin Liu, Fitsum A Reda, Kevin J Shih, Ting-Chun Wang, Andrew Tao, and Bryan Catanzaro. Image inpainting for irregular holes using partial convolutions. In Proceedings of the European Conference on Computer Vision (ECCV), pages 85-100, 2018. +[13] Hongyu Liu, Bin Jiang, Yi Xiao, and Chao Yang. Coherent semantic attention for image inpainting. International Conference on Computer Vision, 2019. +[14] David G Lowe et al. Object recognition from local scale-invariant features. In iccv, volume 99, pages 1150-1157, 1999. +[15] Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context encoders: Feature + +learning by inpainting. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2536-2544, 2016. +[16] Yurui Ren, Xiaoming Yu, Ruonan Zhang, Thomas H Li, Shan Liu, and Ge Li. Structureflow: Image inpainting via structure-aware appearance flow. In Proceedings of the IEEE International Conference on Computer Vision, pages 181-190, 2019. +[17] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, and Michael Bernstein. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211-252, 2015. +[18] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in neural information processing systems, pages 2234-2242, 2016. +[19] Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning structured output representation using deep conditional generative models. In Advances in neural information processing systems, pages 3483-3491, 2015. +[20] Yuhang Song, Chao Yang, Yeji Shen, Peng Wang, Qin Huang, and C-C Jay Kuo. Spg-net: Segmentation prediction and guidance network for image inpainting. In The British Machine Vision Conference, 2018. +[21] Alexandru Telea. An image inpainting technique based on the fast marching method. Journal of graphics tools, 9(1):23-34, 2004. +[22] Yi Wang, Xin Tao, Xiaojuan Qi, Xiaoyong Shen, and Jiaya Jia. Image inpainting via generative multi-column convolutional neural networks. In Advances in Neural Information Processing Systems, pages 331-340, 2018. +[23] Zhaoyi Yan, Xiaoming Li, Mu Li, Wangmeng Zuo, and Shiguang Shan. Shift-net: Image inpainting via deep feature rearrangement. In Proceedings of the European Conference on Computer Vision (ECCV), pages 1-17, 2018. +[24] Raymond A Yeh, Chen Chen, Teck Yian Lim, Alexander G Schwing, Mark Hasegawa-Johnson, and Minh N Do. Semantic image inpainting with deep generative models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5485-5493, 2017. +[25] Jiahui Yu, Zhe Lin, Jimei Yang, Xiaohui Shen, Xin Lu, and Thomas S Huang. Free-form image inpainting with gated convolution. arXiv preprint arXiv:1806.03589, 2018. +[26] Jiahui Yu, Zhe Lin, Jimei Yang, Xiaohui Shen, Xin Lu, and Thomas S Huang. Generative image inpainting with contextual attention. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5505-5514, 2018. +[27] Yanhong Zeng, Jianlong Fu, Hongyang Chao, and Baining Guo. Learning pyramid-context encoder network for high-quality image inpainting. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1486-1494, 2019. +[28] Haoran Zhang, Zhenzhen Hu, Changzhi Luo, Wangmeng Zuo, and Meng Wang. Semantic image inpainting with progressive generative networks. In 2018 ACM Multimedia + +Conference on Multimedia Conference, pages 1939-1947. ACM, 2018. +[29] Chuanxia Zheng, Tat-Jen Cham, and Jianfei Cai. Pluralistic image completion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1438-1447, 2019. +[30] Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE transactions on pattern analysis and machine intelligence, 40(6):1452-1464, 2017. +[31] Jun-Yan Zhu, Richard Zhang, Deepak Pathak, Trevor Darryll, Alexei A Efros, Oliver Wang, and Eli Shechtman. Toward multimodal image-to-image translation. In Advances in Neural Information Processing Systems, pages 465-476, 2017. \ No newline at end of file diff --git a/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/images.zip b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..117bc74ebdb2254163f9d9500087782c16e7f1ae --- /dev/null +++ b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc08cffce91616f24570aaaa1ed438d910d6b563ffef10f4c3dfaacb9ea9dfb9 +size 907074 diff --git a/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/layout.json b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3498602b9fa1c5270cdf007133fea7ab1488ad49 --- /dev/null +++ b/uctgandiverseimageinpaintingbasedonunsupervisedcrossspacetranslation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65695e8b56015cb7a47c8e39930605523b01cdd77a3c6c77cb884365728d1c73 +size 386943 diff --git a/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/7eda20b0-a6a2-4ca6-b28f-02132a3773f1_content_list.json b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/7eda20b0-a6a2-4ca6-b28f-02132a3773f1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b91f0d03b75b748b98e41c8667dd88338152e915 --- /dev/null +++ b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/7eda20b0-a6a2-4ca6-b28f-02132a3773f1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94c6f45e624194126ade23aa67c219a77b05c933654cf7f2dbcd2da42d27a922 +size 77615 diff --git a/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/7eda20b0-a6a2-4ca6-b28f-02132a3773f1_model.json b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/7eda20b0-a6a2-4ca6-b28f-02132a3773f1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..aa49485288b8c62089519ee2c4a678bde15bcdfa --- /dev/null +++ b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/7eda20b0-a6a2-4ca6-b28f-02132a3773f1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b2b3c94cf8480561a09b6d431a42e00112e437bad69a7a80293db063184c8b9 +size 94227 diff --git a/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/7eda20b0-a6a2-4ca6-b28f-02132a3773f1_origin.pdf b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/7eda20b0-a6a2-4ca6-b28f-02132a3773f1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..96450eba9df577878490fa602a36a5d2b1b6fcef --- /dev/null +++ b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/7eda20b0-a6a2-4ca6-b28f-02132a3773f1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5229229fb47522543a38ef17d70a420c629664ffc72db0d6bc863866fb4dea62 +size 424413 diff --git a/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/full.md b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0fdaa14b0197d9963040bcae4fea13727e4149b6 --- /dev/null +++ b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/full.md @@ -0,0 +1,283 @@ +# UNAS: Differentiable Architecture Search Meets Reinforcement Learning + +Arash Vahdat, Arun Mallya, Ming-Yu Liu, Jan Kautz NVIDIA + +{avahdat, amallya, mingyul, jkautz}@nvidia.com + +# Abstract + +Neural architecture search (NAS) aims to discover network architectures with desired properties such as high accuracy or low latency. Recently, differentiable NAS (DNAS) has demonstrated promising results while maintaining a search cost orders of magnitude lower than reinforcement learning (RL) based NAS. However, DNAS models can only optimize differentiable loss functions in search, and they require an accurate differentiable approximation of nondifferentiable criteria. In this work, we present UNAS, a unified framework for NAS, that encapsulates recent DNAS and RL-based approaches under one framework. Our framework brings the best of both worlds, and it enables us to search for architectures with both differentiable and nondifferentiable criteria in one unified framework while maintaining a low search cost. Further, we introduce a new objective function for search based on the generalization gap that prevents the selection of architectures prone to overfitting. We present extensive experiments on the CIFAR-10, CIFAR-100 and ImageNet datasets and we perform search in two fundamentally different search spaces. We show that UNAS obtains the state-of-the-art average accuracy on all three datasets when compared to the architectures searched in the DARTS [18] space. Moreover, we show that UNAS can find an efficient and accurate architecture in the ProxylessNAS [28] search space, that outperforms existing MobileNetV2 [28] based architectures. The source code is available at https://github.com/NVlabs/unas. + +# 1. Introduction + +Since the success of deep learning, designing neural network architectures with desirable performance criteria (e.g. high accuracy, low latency, etc.) for a given task has been a challenging problem. Some call it alchemy and some refer to it as intuition, but the task of discovering a novel architecture often involves a tedious and costly process of trial-and-error for searching in an exponentially large space of hyper-parameters. The goal of neural architecture search (NAS) [6] is to find novel networks for new problem domains + +and criteria automatically and efficiently. + +Early work on NAS used reinforcement learning [1, 3, 24, 42, 43], or evolutionary algorithms [17, 27, 26, 37] to obtain state-of-the-art performance on a variety of tasks. Although, these methods are generic and can search for architecture with a broad range of criteria, they are often computationally demanding. For example, the RL-based approach [43], and evolutionary method [26] each requires over 2000 GPU days. + +Recently, several differentiable neural architecture search (DNAS) frameworks [18, 39, 36, 4] have shown promising results while reducing the search cost to a few GPU days. However, these approaches assume that the objective function is differentiable with respect to the architecture parameters and cannot directly optimize non-differentiable criteria like network latency, power consumption, memory usage, etc. To tackle this problem, DNAS methods [36, 4, 40] approximate network latency using differentiable functions. However, these approximations may fail when the underlying criteria cannot be accurately modeled. For example, if compiler optimizations are used, methods such as layer fusion, mixed-precision inference, and kernel auto-tuning can dramatically change latency, making it challenging to approximate it accurately. In addition to the loss approximation, DNAS relies on the continuous approximation of discrete variables in search, introducing additional mismatch in network performance between discovered architecture and the corresponding continuous relaxations. + +In this paper, we introduce UNAS, a unified framework for NAS that bridges the gap between DNAS and RL-based architecture search. (i) UNAS offers the best of both worlds and enables us to search for architectures using both differentiable objective functions (e.g., cross-entropy loss) and non-differentiable functions (e.g., network latency). UNAS keeps the search time low similar to other DNAS models, but it also eliminates the need for accurate approximation of non-differentiable criteria. (ii) UNAS training does not introduce any additional biases due to the continuous relaxation of architecture parameters. We show that the gradient estimation in UNAS is equal to the estimations obtained by RL-based frameworks that operate on discrete variables. Finally, (iii) UNAS proposes a new objective function based + +on the generalization gap which is empirically shown to find architectures less prone to overfitting. + +We perform extensive experiments in both DARTS [18] and ProxylessNAS [4] search spaces. We show that UNAS achieves the state-of-the-art average performance on all three datasets in comparison to the recent gradient-based NAS models in the DARTS space. Moreover, UNAS can find architectures that are faster and more accurate than architectures, searched in the ProxylessNAS space. + +# 1.1. Related Work + +Zoph and Le [42] introduced the paradigm of NAS, where a controller recurrent neural network (RNN) was trained to output the specification of a network (filter sizes, number of channels, etc.). The controller was trained using REINFORCE [35] to maximize the expected accuracy of the output network on the target validation set, after training on the target task. Requiring the method to specify every layer of the network made it challenging to deepen or transfer an obtained network to other tasks. Based on the observation that popular manually-designed convolutional neural networks (CNNs) such as ResNet [10] or Inception [30] contained repeated generic blocks with the same structure, Zoph et al. [43] trained the RNN to output stackable 'cells'. The task of NAS was thus reduced to learning two types of cells, the Normal Cell - convolutional cells that preserve the spatial dimensions, and the Reduce Cell - convolutional cells that reduce spatial dimensions while increasing feature maps. + +Recently, DARTS [18] relaxed the architecture search space to be continuous by using a weighted mixture-of-operations and optimized the candidate architecture through gradient descent. Using weight-sharing [2, 24], they brought search down to a few GPU days. As the final architecture is required to be discrete, DARTS only retained the top two operations based on the weight assigned to each operation. Building upon DARTS, SNAS [39] used weights sampled from a trainable Gumbel-Softmax distribution instead of continuous weights. Both DARTS and SNAS assume that the objective function for search is differentiable. We extend these frameworks by introducing unbiased gradient estimators that can work for both differentiable and non-differentiable objective functions. + +Recent works [4, 36, 40, 11, 31] consider latency in architectures search. ProxylessNAS [4], FBNet [36] and NetAdapt [40] convert the non-differentiable latency objective to a differentiable function by learning an accurate latency approximation. However, these approximations may fail when latency cannot be predicted by a trainable function. MnasNet [31] does not require a differentiable approximation of the latency as it relies on an RL-objective, however, it requires $\sim 300$ TPU-days for each architecture search. Our framework bridges the gap between differentiable and RL-based NAS; it can search with differentiable and non- + +![](images/349c6decabcad583ab3e9f6c149ff4d31f76f5a0f028cedea935f2b865f04e92.jpg) +Table 1: Comparison with differentiable NAS methods. + +differentiable functions and it does not require an accurate approximation of non-differentiable terms in the objective. Our work is compared against previous works in Table. 1. + +Recently, P-DARTS [5] proposes a progressive version of DARTS and shows that by gradually increasing the depth of the network during the search, deeper cells can be discovered. UNAS explores an orthogonal direction to P-DARTS and it proposes generic gradient estimators that work with both differentiable and non-differentiable losses and new generalization-based search objective functions. + +# 2. Background + +In differentiable architecture search (DARTS) [18], a network is represented by a directed acyclic graph, where each node in the graph denotes a hidden representation (e.g., feature maps in CNNs) and each directed edge represents an operation transforming the state of the input node. The $\mathfrak{n}^{\text{th}}$ node $x_{n}$ is connected to its predecessors (i.e., $P_{n}$ ) and its content is computed by applying a set of operations to the predeceasing nodes, represented by $x_{n} = \sum_{x_{m} \in P_{n}} O_{m,n}(x_{m})$ , where $O_{m,n}$ is the operation applied to $x_{m}$ . The goal of architecture search is then to find the operation $O_{m,n}$ for each edge $(m,n)$ . Representing the set of all possible operations that can be applied to the edge $e := (m,n)$ using $\{O_{e}^{(1)}, O_{e}^{(2)}, \ldots, O_{e}^{(K)}\}$ where $K$ is the number of operations, this discrete assignment problem can be formulated as a mixed operation denoted by $O_{e}(x_{m}) = \sum_{k=1}^{K} z_{e}^{(k)} O_{e}^{(k)}(x_{m})$ , where $z_{e} = [z_{e}^{(1)}, z_{e}^{(2)}, \ldots, z_{e}^{(K)}]$ is a one-hot binary vector (i.e., $z_{e}^{(k)} \in \{0,1\}$ ) with a single one indicating the selected operation. Typically, it is assumed that the set of operations also includes a zero operation that enables omitting edges in the network, and thus, learning the connectivity as well. + +We can construct a network architecture given the set of all operation assignments for all edges denoted by $z = \{z_{e}\}$ . Therefore, the objective of the architecture search is to find a distribution over architecture parameters, $z$ such that it minimizes the expected loss $\mathbb{E}_{p_{\phi}(z)}[\mathcal{L}(z)]$ where $p_{\phi}$ is a $\phi$ -parameterized distribution over $z$ and $\mathcal{L}(z)$ is a loss function measuring the performance of the architecture specified by $z$ using a performance measure such as classification loss. + +![](images/a597efbfeb958c7574fec4b03325e0bbf5660aaa7f8f94d9a864796cc6b03f00.jpg) +(a) categorical sample + +![](images/b8b1d0b026f793b31b7da2652e1d6b9ebe7647ee4b91466c1a742be9b9f5510d.jpg) +(b) smoothed sample +Figure 1: (a) Operation selection corresponds to sampling from a categorical distribution that selects an operation. (b) Sampling from the conditional Gumbel-Softmax distribution $r(\zeta | z)$ acts as a smoothing distribution that yields continuous samples $(\zeta)$ , correlated with the discrete samples $(z)$ . + +We assume that the architecture distribution is a factorial distribution with the form $p_{\phi}(z) = \prod_{e}p_{\phi_e}(z_e)$ where $p_{\phi_e}(z_e)$ is a $\phi_e$ -parameterized categorical distribution defined over the one-hot vector $z_{e}$ . Recently, SNAS [39] proposed using the Gumbel-Softmax relaxation [20, 14] for optimizing the expected loss. In this case, the categorical distribution $p_{\phi}(z)$ is replaced with a Gumbel-Softmax distribution $p_{\phi}(\zeta)$ where $\zeta$ denotes the continuous relaxation of the architecture parameter $z$ . SNAS assumes that the loss $\mathcal{L}(z)$ is differentiable with respect to $z$ and it uses the reparameterization trick to minimize the expectation of the relaxed loss $\mathbb{E}_{p_{\phi}(\zeta)}[\mathcal{L}(\zeta)]$ instead of $\mathbb{E}_{p_{\phi}(z)}[\mathcal{L}(z)]$ . + +# 3. Method + +As discussed above, the problem of NAS can be formulated as optimizing the expected loss $\mathbb{E}_{p_{\phi}(\boldsymbol{z})}[\mathcal{L}(\boldsymbol{z})]$ . In this section, we present our framework in two parts. In Sec. 3.1, we start by presenting a general framework for computing $\frac{\partial}{\partial\phi}\mathbb{E}_{p_{\phi}(\boldsymbol{z})}[\mathcal{L}(\boldsymbol{z})]$ which is required for optimizing the expected loss. Then, we present our formulation of the loss function $\mathcal{L}(\boldsymbol{z})$ in Sec. 3.2. + +# 3.1. Gradient Estimation + +The most generic approach for optimizing the expected loss is the REINFORCE gradient estimator + +$$ +\frac {\partial}{\partial \phi} \mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} [ \mathcal {L} (\boldsymbol {z}) ] = \mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} \left[ \mathcal {L} (\boldsymbol {z}) \partial_ {\phi} \log p _ {\phi} (\boldsymbol {z}) \right], \tag {1} +$$ + +where $\partial \log p_{\phi}(\pmb{z})$ is known as the score function and $\mathcal{L}(\pmb{z})$ is a loss function. As we can see, the gradient estimator in Eq. 1 only requires computing the loss function $\mathcal{L}(\pmb{z})$ (not the gradient $\partial_z\mathcal{L}(\pmb{z})$ ), so it can be applied to any differentiable and non-differentiable loss function. However, this estimator is known to suffer from high variance and therefore a large number of trained architecture samples are required to reduce its variance, making it extremely comput intensive. The + +REINFORCE estimator in Eq. 1 can be also rewritten as + +$$ +\begin{array}{l} \frac {\partial}{\partial \phi} \mathbb {E} _ {p _ {\phi} (z)} [ \mathcal {L} (z) ] = \mathbb {E} _ {p _ {\phi} (z)} [ (\mathcal {L} (z) - c (z)) \partial_ {\phi} \log p _ {\phi} (z) ] + \\ \partial_ {\phi} \mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} [ c (\boldsymbol {z}) ], \tag {2} \\ \end{array} +$$ + +where $c(z)$ is a control variate [22]. The gradient estimator in Eq. 2 has lower variance than Eq. 1, if $c(z)$ is correlated with $\mathcal{L}(z)$ , and $\partial_{\phi}\mathbb{E}_{p_{\phi}(z)}[c(z)]$ has a low-variance gradient estimator [21, 23, 25]. Without loss of generality, we assume that the loss function is decomposed into $\mathcal{L}(z) = \mathcal{L}_d(z) + \mathcal{L}_n(z)$ where $\mathcal{L}_d(z)$ contains the terms that are differentiable with respect to $z$ and $\mathcal{L}_n(z)$ includes the non-differentiable terms. We present a baseline function $c(z) = c_d(z) + c_n(z)$ , where $c_d(z)$ and $c_n(z)$ are for $\mathcal{L}_d(z)$ and $\mathcal{L}_n(z)$ respectively. Intuitively, the baseline is designed such that the term $\partial_{\phi}\mathbb{E}_{p_{\phi}(z)}[c(z)]$ in Eq. 2 is approximated using the low-variance reparameterization trick. + +Gradient Estimation for Differentiable Loss $\mathcal{L}_d$ : Following REBAR [33], in order to construct $c_{d}(\boldsymbol{z})$ , a control variate for $\mathcal{L}_d$ , we use stochastic continuous relaxation $r_{\phi}(\zeta | z)$ that samples from a conditional Gumbel-Softmax distribution given the architecture sample $\boldsymbol{z}$ . Here, $\zeta$ can be considered as a smooth architecture defined based on $\boldsymbol{z}$ as shown in Fig. 1. Hence, it is highly correlated with $\boldsymbol{z}$ (see REBAR [33] for details). With the definition $c_{d}(z) := \mathbb{E}_{r_{\phi}(\zeta | z)}[\mathcal{L}_{d}(\zeta)]$ , the gradient in Eq. 2 can be written as + +$$ +\begin{array}{l} \frac {\partial}{\partial \phi} \mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} [ \mathcal {L} _ {d} (\boldsymbol {z}) ] = \underbrace {\mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} \left[ \left(\mathcal {L} _ {d} (\boldsymbol {z}) - c _ {d} (\boldsymbol {z})\right) \partial_ {\phi} \log p _ {\phi} (\boldsymbol {z}) \right]} _ {\text {(i) r e n i f o r c e}} \\ - \underbrace {\mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} \left[ \partial_ {\phi} c _ {d} (\boldsymbol {z}) \right]} _ {\text {(i i) c o r r e c t i o n}} + \underbrace {\partial_ {\phi} \mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} \left[ c _ {d} (\boldsymbol {z}) \right]} _ {\text {(i i i) G u m b e l - S o f t m a x}}. \tag {3} \\ \end{array} +$$ + +The gradient estimator in Eq. 3 consists of three terms: (i) is the reinforce term, which is estimated using the Monte Carlo method by sampling $z \sim p_{\phi}(z)$ and $\zeta \sim r_{\phi}(\zeta | z)$ . (ii) is the correction term due to the dependency of $c_d(z)$ on $\phi$ . This term is approximated using the reparameterization trick applied to the conditional Gumbel-Softmax $r_{\phi}(\zeta | z)$ . (iii) is the Gumbel-Softmax term that can be written as + +$$ +\mathbb {E} _ {p _ {\boldsymbol {\phi}} (\boldsymbol {z})} [ c _ {d} (\boldsymbol {z}) ] = \mathbb {E} _ {p _ {\boldsymbol {\phi}} (\boldsymbol {z})} \left[ \mathbb {E} _ {r _ {\boldsymbol {\phi}} (\boldsymbol {\xi} | \boldsymbol {z})} [ \mathcal {L} _ {d} (\boldsymbol {\xi}) ] \right] = \mathbb {E} _ {p _ {\boldsymbol {\phi}} (\boldsymbol {\xi})} [ \mathcal {L} _ {d} (\boldsymbol {\xi}) ], (4) +$$ + +which is the expected value of loss evaluated under the Gumbel-Softmax distribution $p_{\phi}(\zeta)$ . Thus, its gradient can be computed also using the low-variance reparameterization trick. In practice, we only need two function evaluations for estimating the gradient in Eq. 3, one for computing $\mathcal{L}_d(z)$ , and one for $\mathcal{L}_d(\zeta)$ . The gradients are computed using an automatic differentiation library. + +Eq. 3 unifies the differentiable architecture search with policy gradient-based NAS methods [42, 39, 31]. This estimator does not introduce any bias due to the continuous relaxation, as in expectation the gradient is equal to the REINFORCE estimator that operates on discrete variables. Moreover, this estimator uses the Gumbel-Softmax estimation of the differentiable loss for reducing the variance of the estimate. Under this framework, it is easy to see that SNAS [39] is a biased estimation of the policy gradient as it only uses (iii) for search, ignoring other terms. On the other hand, policy gradient-based NAS [24, 42, 43] assumes a constant control variate $(c_d(z) = C)$ which only requires computing (i) as $\partial_{\phi}\mathbb{E}_{p_{\phi}(z)}[C] = 0$ + +Gradient Estimation for Non-Differentiable Loss $\mathcal{L}_n$ : The gradient estimator in Eq. 3 cannot be applied to non-differentiable loss $\mathcal{L}_n(z)$ as the reparameterization trick is only applicable to differentiable functions. For $\mathcal{L}_n(z)$ , we use RELAX [8] that lifts this limitation by defining the baseline function $c_n(z) \coloneqq \mathbb{E}_{r_\phi(\zeta | z)}[g(\zeta)]$ , where $g(.)$ is a surrogate function (e.g., a neural network) trained to be correlated with $\mathcal{L}_n(z)$ . The gradient estimator for $\mathcal{L}_n$ is obtained by replacing $c_d$ in Eq. 3 with $c_n$ : + +$$ +\begin{array}{l} \frac {\partial}{\partial \phi} \mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} [ \mathcal {L} _ {n} (\boldsymbol {z}) ] = \underbrace {\mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} \left[ \left(\mathcal {L} _ {d} (\boldsymbol {z}) - c _ {n} (\boldsymbol {z})\right) \partial_ {\phi} \log p _ {\phi} (\boldsymbol {z}) \right]} _ {\text {(i) r e n i f o r c e}} \\ - \underbrace {\mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} \left[ \partial_ {\phi} c _ {n} (\boldsymbol {z}) \right]} _ {\text {(i i) c o r r e c t i o n}} + \underbrace {\partial_ {\phi} \mathbb {E} _ {p _ {\phi} (\boldsymbol {\zeta})} [ g (\boldsymbol {\zeta}) ]} _ {\text {(i i i) G u m b e l - S o f t m a x}}, \tag {5} \\ \end{array} +$$ + +However, the main difference is that here the reparameterization trick is applied to $\mathbb{E}_{r_{\phi}(\zeta | z)}[g(\zeta)]$ in (ii) and similarly to $\mathbb{E}_{p_{\phi}(\zeta)}[g(\zeta)]$ in (iii). Here, to make $g(z)$ be correlated with $\mathcal{L}_n(z)$ , we train $g$ by minimizing $||g(z) - \mathcal{L}_n(z)||_2^2$ . In the case of latency, this corresponds to training $g$ to predict latency on a set of randomly generated architectures before search. Similar to FBNet [36] and ProxylessNAS [4], we use a simple linear function to represent $g(z)$ . + +It is worth noting that the Gumbel-Softmax term, (iii) in Eq. 5, minimizes the expectation of the approximation of the non-differentiable loss (e.g., latency) using the Gumbel-Softmax relaxation. This gradient estimator was used in FBNet [36] for optimizing latency. In Eq. 5, we can see that if $g$ cannot predict latency correctly, $\mathcal{L}_d(z) - c_n(z)$ will be large, thus, optimizing only (iii) will suffer from additional bias due to the approximation error. However, even if $g(z)$ cannot approximate $\mathcal{L}_n(z)$ accurately, for example in the case of compile-time performance optimizations, our gradient estimator is equal to the REINFORCE estimator, and it optimizes the true expected latency. Hence, UNAS does not suffer from any bias introduced due to the approximation of non-differentiable criteria. + +# 3.2. Training Objective + +Several recent works on differentiable NAS have proposed bi-level training of architecture parameters and net + +work parameters. In the architecture update, either training loss [39], or validation loss [18] given the current network parameters $\pmb{w}$ , are used to update architecture parameters using + +$$ +\underset {\phi} {\min } \mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} [ \mathcal {L} _ {\text {t r a i n}} (\boldsymbol {z}, \boldsymbol {w}) ], \text {o r} \underset {\phi} {\min } \mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} [ \mathcal {L} _ {\text {v a l}} (\boldsymbol {z}, \boldsymbol {w}) ]. \tag {6} +$$ + +Then, the network parameters $\pmb{w}$ are updated given samples from the architecture by minimizing + +$$ +\min _ {\boldsymbol {w}} \mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} \left[ \mathcal {L} _ {\text {t r a i n}} (\boldsymbol {z}, \boldsymbol {w}) \right]. \tag {7} +$$ + +The parameters $\phi$ and $\pmb{w}$ are updated iteratively by taking a single gradient step in Eq. 6 and Eq. 7. It has been shown that by sharing network parameters among all the architecture instances, we gain several orders of magnitude speedup in search [18, 24]. However, this comes with the cost of updating architecture parameters at suboptimal $\pmb{w}$ . Intuitively, this translates to making decision on architecture without considering its optimal performance. + +To avoid overfitting, we base our objective function on the generalization gap of an architecture. The rationale behind this is that the selected architecture not only should perform well on the training set, but also, should generalize equally well to the examples in the validation set, even if network weights are suboptimal. This prevents search from choosing architectures that do not generalize well. Formally, we define the generalization loss in search $\mathbb{E}_{p_{\phi}(z)}[\mathcal{L}_{\mathrm{gen}}(z,w)]$ by: + +$$ +\mathbb {E} _ {p _ {\phi} (\boldsymbol {z})} \left[ \mathcal {L} _ {\text {t r a i n}} (\boldsymbol {z}, \boldsymbol {w}) + \lambda \left| \mathcal {L} _ {\text {v a l}} (\boldsymbol {z}, \boldsymbol {w}) - \mathcal {L} _ {\text {t r a i n}} (\boldsymbol {z}, \boldsymbol {w}) \right| \right], \tag {8} +$$ + +where $\lambda$ is a scalar balancing the training loss and generalization gap. We observe that $\lambda = 0.5$ often works well in our experiments. For training, we iterate between updating $\phi$ using Eq. 8 and updating $\boldsymbol{w}$ using Eq. 7. In each parameter update, we perform a simple gradient descent update. + +Latency Loss: In resource-constrained applications, we might be interested in finding an architecture that has a low latency as well as high accuracy. In this case, we can measure the latency of the network specified by $\mathbf{z}$ in each parameter update3. Representing the latency of the network using $\mathcal{L}_{lat}(\mathbf{z})$ , we augment the objective function in Eq. 8 with $\mathbb{E}_{p_{\phi}(\mathbf{z})}[\lambda_{lat}\mathcal{L}_{lat}(\mathbf{z})]$ , where $\lambda_{lat}$ is a scalar balancing the trade-off between the architecture loss and the latency loss. Although $\mathcal{L}_{lat}(\mathbf{z})$ is not differentiable w.r.t. $\mathbf{z}$ , we construct a low-variance gradient estimator using Eq. 5 for optimizing this term. + +# 4. Experiments in DARTS Search Space + +In this section, we apply the proposed UNAS framework to the problem of architecture search for image classifica + +![](images/92099bfb8e48298de074ee582cce6119a6201de746940f65e95f60b7f0c80783.jpg) +Figure 2: The factorized cell structure ensures that each node depends on two previous nodes. On the left, a small graph with 4 nodes is visualized. In the middle, $\mathbf{z} = \{\mathbf{z}_e\}$ , the operation assignment for the incoming edges to node 3 is shown. On the right, the input and operation selectors for these edges are shown. The shaded matrix on $\mathbf{z}$ is parameterized by the outer product $i_3 \otimes o_3 + i_3' \otimes o_3'$ . + +![](images/5f1f98f348052d9dc9ba8193475f26b1d1d79e985a51a9fb5329de539a792430.jpg) + +![](images/25e31d770528e1309ac914e66e3cb6fe45405a747a3bdf6be20e0c93c450d1e6.jpg) + +![](images/f01d1296f8c00ebf5f66f1a17d793a3b1e964abc03bc93c4b8fafb35a3f0107c.jpg) + +tion using DARTS [18] search space, which was also used in [43, 24, 39, 5]. We closely follow the experimental setup introduced DARTS [18]. In the search phase, we search for a normal and reduction cell using a network with a small number of feature maps and/or layers. Given the stochastic representation of the architecture, the final cells are obtained by taking the configuration that has highest probability for each node as discussed below. Then, in the evaluation phase, the cells are stacked into a larger network which is retrained from scratch. Sec. 4.1 discusses a simple approach for factorizing cells that eliminates the necessity of post-search heuristics. Sec. 4.2 provides comparisons to previous work on three datasets. + +# 4.1. Factorized Cell Structure + +Training the cell structure introduced in DARTS [18] may result in a densely connected cell where each node depends on the output of all the previous nodes. In order to induce sparsity on the connectivity, prior work [5, 18, 43] heavily relies on post-search heuristics to limit the number of incoming edges for each node. DARTS [18] uses a heuristic to prune the number of input edges to two by choosing operations with the largest weights. P-DARTS [5] uses an iterative optimization to limit the number of skip-connections and the number of incoming edges to two. The main issue with such post-search methods is that they create inconsistency between search and evaluation by constructing a cell structure without directly measuring its performance [39]. + +In order to explicitly induce sparsity, we factorize the operation assignment problem on the edges using two selection problems: i) an input selector that selects two nodes out of the previous nodes and ii) an operation selector that selects two operations that are applied to each selected input. We name this structure a factorized cell as it enables us to ensure that the content of each node depends only on two previous nodes without relying on any post-search heuristic. Formally, we introduce $\pmb{i}_n$ and $\pmb{i}_n'$ , two one-hot vectors for the $n^{th}$ node representing the input selectors as well as two one-hot vectors $\pmb{o}_n$ and $\pmb{o}_n'$ denoting the operation selectors. The architecture is specified by the sets $\{\pmb{i}_n,\pmb{i}_n'\}_{n=1}^N$ and $\{\pmb{o}_n,\pmb{o}_n'\}_{n=1}^N$ , where $N$ is the number of + +nodes in a cell. This formulation is easily converted to the operation assignment problem on edges (i.e. $\{\pmb{z}_e\}$ ) in Sec. 2 using the outer product $\pmb{i}_n \otimes \pmb{o}_n + \pmb{i}_n' \otimes \pmb{o}_n'$ , as shown in Fig. 2. We use the product of categorical distributions in the form $\prod_n p(\pmb{i}_n) p(\pmb{i}_n') p(\pmb{o}_n) p(\pmb{o}_n')$ to represent the distribution over architecture parameters. + +# 4.2. Comparison with the Previous Work + +The current literature on NAS often reports the final performance obtained by the best discovered cell. Unfortunately, such qualitative metric fails to capture i) the number of searches conducted before finding the best cell, ii) the performance variation resulted from different searches, iii) the effect of each model component on the final performance, and iv) the effect of post-search heuristics used for creating the best architecture. To better provide insights into our framework, we conduct extensive ablation experiments on the CIFAR-10, CIFAR-100 and ImageNet datasets. We run the search and evaluation phases end-to-end four times on each dataset and we report mean and standard deviation of the final test error as well as the best cell out of the four searches. We do not use any post-search heuristic, as our factorized cell structure always yields two-incoming edges per node in the cell. This stands in a stark contrast to DARTS [18] and P-DARTS [5] that use post-search heuristics to sparsify the discovered cell. + +Here, we only consider the differentiable cross-entropy loss functions as the search objective function (i.e., we do not optimize for latency). Since the direct search on ImageNet is computationally expensive, we reduce the search space on this dataset to five operations including skip connection, depthwise-separable $3 \times 3$ convolution, max pooling, dilated depthwise-separable $3 \times 3$ convolution, and depthwise-separable $3 \times 3$ convolution. Prior work on ResNets [10], DenseNets [13], as well as the recent RandWire [38] suggest that it should be possible to achieve high accuracy by using only these three operations. + +Below, we discuss the different baselines summarized in Table 2. Additional details of search and evaluation can be found in Appendix A, and Appendix B respectively. + +The state-of-the-art: The previous works closest to our + +Table 2: Comparison against the state-of-the-art methods. Different objective functions for updating architecture parameters and different gradient estimators are examined for UNAS. We run UNAS and the original publicly-available source code for DARTS [18] and P-DARTS [5] end-to-end four times with different initialization seeds. Mean±standard deviation of all four discovered architectures as well as the best architecture at the end of the evaluation phase are reported. For other techniques, the original best results are reported. The search cost is reported on CIFAR-10. UNAS with $\mathcal{L}_{\mathrm{gen}}$ and REBAR significantly outperforms gradient-based methods on all three datasets. + +
Objective FunctionGradient EstimatorCIFAR-10CIFAR-100ImageNetSearch Cost (GPU days)
meanbestmeanbestmeanbest
UNAS\( \mathcal{L}_{\text{val}} \)Gumbel-Soft.2.79±0.102.6817.11±0.3816.8026.06±0.5125.41-
\( \mathcal{L}_{\text{gen}} \)Gumbel-Soft.2.81±0.012.7416.98±0.3416.5924.64±0.1324.46-
\( \mathcal{L}_{\text{gen}} \)REBAR2.65±0.072.5316.72±0.7615.7924.60±0.0624.494.3
GradientDARTS [18]3.03±0.162.8027.83±8.4720.4925.27±0.0625.204
P-DARTS [5]2.91±0.142.7518.09±0.4917.3624.98±0.4424.490.3
SNAS [39]-2.85---27.31.5
ReinforceNASNet-A [43]-2.65---26.02000
BlockQNN [41]-3.54-18.06--96
ENAS [24]-2.89----0.45
EvolutionAmoebaNet-A [26]-3.12---25.53150
AmoebaNet-B [26]-2.55---26.03150
AmoebaNet-C [26]-----24.33150
Hierarchical. Evolution [17]-3.75----300
+ +![](images/7d2a8b3eb8a57a96689dda31ac218584d0dc1844d40818f88b4d50444856789c.jpg) +(a) Normal Cell + +![](images/ad6bac52ae6e4a9e985c49951576c408f3f800725e1bedc499ae390a564f804c.jpg) +(b) Reduce Cell + +![](images/186743812c3d5a50d8b72e102008a0b86cf6c4d82b430dd2aa55462a391f99a4.jpg) +Figure 3: The best performing cell on CIFAR-10. +Figure 4: Validation loss in search. + +work DARTS [18], P-DARTS [5] and SNAS [39] have unfortunately reported the performance for the best discovered cell. Since DARTS and P-DARTS implementations are publicly available, for a fair comparison, we run their original source code end-to-end four times similar to our model with different random initialization seeds using hyperparameters and commands released by the authors on CIFAR-10 and CIFAR-100. For the ImageNet datasets, we transfer the discovered cells from CIFAR-10 to this dataset as described in [18, 5]. The implementation of SNAS [39] is not publicly available. So, we compare against this work using the origi + +nal published results. Finally, in order to better contextualize our results, we compare UNAS against previous methods that use reinforcement learning or evolutionary search. On ImageNet, we only consider the mobile-setting (FLOPS $< 600\mathrm{M}$ ) which is often used to compare NAS models. + +UNAS baselines: We also explore the different variants of UNAS. The objective function column in Table 2 represents the loss function used during search for updating $\phi$ . Here, $\mathcal{L}_{\mathrm{val}}$ (Eq. 6) and $\mathcal{L}_{\mathrm{gen}}$ (Eq. 8) are considered. The gradient estimator column represents the gradient estimator used for updating $\phi$ during search. We examine Gumbel-Softmax and REBAR (Eq. 3). + +Observations: From the first group of Table 2, we ob + +![](images/dfc8e5b075dce13fb84d9e00fef9b9167e39866a4f1abbaa6a7d0ea524a32d1f.jpg) +(a) Cell discovered by UNAS in the ProxylessNAS [4] search space with 9.8 ms GPU latency and $24.7\%$ top-1 error + +![](images/25374752f110ba3a571a34f441249882996bbefd457c22ad3da32dbadb3aa4f6.jpg) +(b) Cell discovered by ProxylessNAS [4] with 10.1 ms GPU latency and $24.9\%$ top-1 error +Figure 5: Visualization of the network discovered by UNAS in the ProxylessNAS [4] search space. MBe $K \times K$ denotes a mobile inverted residual block with expansion ratio $e$ and kernel size $K$ . UNAS, in contrast to ProxylessNAS, keeps the cells at the deeper layers (on the right side) computationally inexpensive by using a small expansion ratio, enabling more MBCnv layers in the shallower layers. Although UNAS architecture is deeper, it has a lower latency with the same network width. + +serve that architecture search with the generalization loss yields a better model often in terms of both average performance and best results. The improvement obtained by the generalization is especially profound in ImageNet as this loss function improves $\mathcal{L}_{\mathrm{val}}$ by $1.4\%$ in average. We can also see that our REBAR gradient estimator often improves the results across all datasets. From the second group of Table 2, we observe that our UNAS framework with REBAR estimator and the generalization loss significantly outperforms DARTS, P-DARTS, and SNAS on all three datasets. Interestingly, our full model $(\mathcal{L}_{\mathrm{gen}}$ with REBAR) exhibits a low variance on CIFAR-10 and ImageNet, showing the robustness of the framework in discovering high-performing architectures. Finally, comparing UNAS against the evolutionary and RL-based models shows that UNAS outperforms these models. The only exception is AmoebaNet-C [26] on ImageNet. However, note that this method requires 700x more GPU time to search. + +Why does the generalization loss help in search: Recall that in differentiable architecture search, we often update the architecture distribution parameters $\phi$ using suboptimal $\mathbf{w}$ . We hypothesize that even if validation loss is used in search due to the suboptimality of $\mathbf{w}$ , the architecture is not discovered using the true generalization of the network to unseen examples. To illustrate this, the validation loss during architecture search visualized in Fig. 4 for different loss functions. We observe that even using the validation loss for updating architecture parameters does not prevent the network from overfitting. + +One question is whether our generalization loss is required in the case of the original RL-based NAS [24, 42, 43], which updates architecture parameters using $\pmb{w}$ closer to opti + +mality. To answer this, we also examine with ENAS [24]-like training where network parameters $\pmb{w}$ are updated for half epoch in every $\phi$ update (i.e., the network parameters $\pmb{w}$ are brought closer to the optimum). In this case, the architectures found by generalization loss in average obtains test error $2.92\%$ on CIFAR-10 compared with the validation loss based search that achieves $3.12\%$ . This provides another evidence that architecture search can potentially benefit from considering generalization, opening up new research directions in NAS. + +Cell visualization: The best cell discovered on the CIFAR-10 dataset is visualized in Fig. 3. See Appendix C for the visualization of best cells on other datasets. + +More comparisons: We provide in-depth comparisons against the state-of-the-art techniques with more detailed information including the number of parameters, search cost, and the number of floating point operations in Appendix. D. + +# 5. Experiments on Latency-based Search + +In this section, we examine our proposed framework for searching architectures with low latency directly on the ImageNet dataset. Unfortunately, the DARTS search space results in high-latency networks due to the parallel branches and concatenation in each cell. So, here, we change the building blocks of our search space to the mobile inverted bottleneck convolution (MBConv) [28] that has been used in ProxylessNAS [4] and FBNet [36] for discovering low-latency networks. For this section, we closely follow the search space introduced in ProxylessNAS [4] for ImageNet in which a 21-layer network with seven choices of operations in each layer is searched. Specifically, for each layer, an MBConv is selected among various kernel sizes $\{3,5,7\}$ and expansion ratios $\{3,6\}$ . To allow layer removal, an additional skip-connection is used in ProxylessNAS yielding seven operations per layer. For search and evaluation + +Table 3: Latency-based architecture search. Models are sorted based on their top-1 error. For a better illustration, Fig. 6 compares the models visually. + +
ArchitectureVal ErrorLatency
top-1top-5(ms)
EfficientNet B0 [32]23.76.814.5
MobileNetV3 Large [11]24.77.611.0
MnasNet-A1 [31]24.87.510.9
Single-Path NAS [29]25.07.810.2
FBNet-C [36]25.1-11.5
MobileNetV2 1.4x [28]25.37.513.0
MnasNet-B1 [31]25.5-9.4
ShuffleNet V2 2x [19]26.3-9.16
MobileNetV2 1x [28]28.09.9.2
ProxylessNAS-GPU [4]24.97.510.1
UNAS24.77.69.8
+ +![](images/3487a4f6c59cfaef46c11f8f530ebbef879f1153a915af76bb60217ce435dc82.jpg) +Figure 6: Latency-based architecture search. We seek architectures that are in the bottom-left side of the error vs. latency axes. UNAS discovers an architecture that is more accurate and has a low latency compared to the current state-of-the-art architectures based on MobileNetV2. + +we closely follow the settings used in ProxylessNAS (see Appendix E for details). + +For gradient estimation of the latency loss in UNAS, we use Eq. 5 with a simple linear function as the surrogate function, i.e., $g(\boldsymbol{z}) = \sum_{i,j} l_{i,j} z_{i,j}$ where $z_{i,j} \in \{0,1\}$ is a binary scalar indicating if operation $i$ is used in layer $j$ and $l_{i,j}$ is the approximate latency associated with the operation. Similar to ProxylessNAS, we randomly generate 10K network samples before search and we train the parameters of $g$ (i.e., all $l_{i,j}$ ) by minimizing an $L_2$ regression loss. + +We search for architecture on V100 GPUs, as it allows us to measure the true latency on the device during search. These GPUs were also used in ProxylessNAS [4] which enables us to have a fair comparison against this method. We measure latency using a batch size of 32 images. We + +empirically observed that smaller batch sizes under-utilize GPUs, resulting in inaccurate latency measurements. + +Table 3 and Fig. 6 report the latency and validation set error on ImageNet for our model in comparison to recent hardware-aware NAS frameworks that operate in a similar search space (i.e., MobileNetV2 [28]) and have similar latency ( $\sim$ 10 ms on V100 GPUs). We can see that UNAS finds an architecture that is slightly faster but more accurate than the ProxylessNAS-GPU [4] architecture that uses exactly the same search space and the same target device. EfficientNet B0 [32] is the only architecture that is more accurate than UNAS but it is also $48\%$ slower on the GPU. Although EfficientNet B0 has a low number of mathematical operations, it is not so efficient on TPU/GPU due to the heavy usage of depth-wise separable convolutions [9]. The architectures that are faster than UNAS including ShuffleNet v2 [19], MnasNet B1 [31] and MobileNetV2 1.0x [28] are also less accurate. + +In Fig. 5, the architecture discovered by UNAS is compared against ProxylessNAS-GPU that has been discovered for the same type of GPUs. Interestingly, UNAS discovers an architecture that is deeper, i.e., it has 3 more MBConv layers. But, it also faster and more accurate than the architecture discovered by ProxylessNAS. + +# 6. Conclusions + +In this paper, we presented UNAS that unifies differentiable and RL-based NAS. Our proposed framework uses the gradient of the objective function for search without introducing any bias due to continuous relaxation. In contrast to previous DNAS methods, UNAS search objective is not limited to differentiable loss functions as it can also search using non-differentiable loss functions. We also introduced a new objective function for search based on the generalization gap and we showed that it outperforms previously proposed training or validation loss functions. + +In extensive experiments in both DARTS [18] and ProxylessNAS [4] search spaces, we showed that UNAS finds architectures that 1) are more accurate on CIFAR-10, CIFAR-100, and ImageNet and 2) are more efficient to run on GPUs. We will make our implementation publicly available to facilitate the research in this area. + +# References + +[1] Bowen Baker, Otkrist Gupta, Nikhil Naik, and Ramesh Raskar. Designing neural network architectures using reinforcement learning. In ICLR, 2017. 1 + +[2] Gabriel Bender, Pieter-Jan Kindermans, Barret Zoph, Vijay Vasudevan, and Quoc Le. Understanding and simplifying one-shot architecture search. In ICML, 2018. 2 +[3] Han Cai, Tianyao Chen, Weinan Zhang, Yong Yu, and Jun Wang. Efficient architecture search by network transformation. In AAAI, 2018. 1 +[4] Han Cai, Ligeng Zhu, and Song Han. ProxylessNAS: Direct neural architecture search on target task and hardware. In ICLR, 2019. 1, 2, 4, 7, 8, 14 +[5] Xin Chen, Lingxi Xie, Jun Wu, and Qi Tian. Progressive differentiable architecture search: Bridging the depth gap between search and evaluation. In ICCV, 2019. 2, 5, 6, 14 +[6] Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. arXiv preprint arXiv:1808.05377, 2018. 1 +[7] Priya Goyal, Piotr Dólar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017. 12 +[8] Will Grathwohl, Dami Choi, Yuhuai Wu, Geoff Roeder, and David Duvenaud. Backpropagation through the void: Optimizing control variates for black-box gradient estimation. In ICLR, 2018. 4 +[9] Suyog Gupta and Mingxing Tan. EfficientNet-EdgeTPU. https://ai.googleblog.com/2019/08/efficientnet-edgetpu-creating.html, Nov 2019.8 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 2, 5 +[11] Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, Quoc V. Le, and Hartwig Adam. Searching for MobileNetV3. In ICCV, 2019. 2, 8 +[12] Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. 11, 14 +[13] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, 2017. 5 +[14] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with Gumbel-Softmax. In ICLR, 2017. 3 +[15] Liam Li and Ameet Talwalkar. Random search and reproducibility for neural architecture search. arXiv preprint arXiv:1902.07638, 2019. 13 +[16] Chenxi Liu, Barret Zoph, Maxim Neumann, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. Progressive Neural Architecture Search. In ECCV, 2018. 2, 13, 14 +[17] Hanxiao Liu, Karen Simonyan, Oriol Vinyals, Chrisantha Fernando, and Koray Kavukcuoglu. Hierarchical representations for efficient architecture search. In ICLR, 2018. 1, 6, 13 +[18] Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: Differentiable Architecture Search. In ICLR, 2019. 1, 2, 4, 5, 6, 8, 11, 13, 14 + +[19] Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet v2: Practical guidelines for efficient cnn architecture design. In ECCV, 2018. 8, 14 +[20] Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. In ICLR, 2017. 3 +[21] Andriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. In ICML, 2014. 3 +[22] Art B. Owen. Monte Carlo theory, methods and examples. 2013. 3 +[23] John Paisley, David M Blei, and Michael I Jordan. Variational bayesian inference with stochastic search. In ICML, 2012. 3 +[24] Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. In ICML, 2018. 1, 2, 4, 5, 6, 7, 13 +[25] Rajesh Ranganath, Sean Gerrish, and David Blei. Black box variational inference. In Artificial Intelligence and Statistics, 2014. 3 +[26] Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. arXiv preprint arXiv:1802.01548, 2018. 1, 6, 7, 11, 13, 14 +[27] Esteban Real, Sherry Moore, Andrew Selle, Saurabh Saxena, Yutaka Leon Suematsu, Jie Tan, Quoc V Le, and Alexey Kurakin. Large-scale evolution of image classifiers. In ICML, 2017. 1 +[28] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, 2018. 1, 7, 8, 14 +[29] Dimitrios Stamoulis, Ruizhou Ding, Di Wang, Dimitrios Lymberopoulos, Bodhi Priyantha, Jie Liu, and Diana Marculescu. Single-path NAS: Designing hardware-efficient convnets in less than 4 hours. In arXiv preprint arXiv:1904.02877, 2019. 8 +[30] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, 2015. 2 +[31] Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 4, 8 +[32] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pages 6105-6114, 2019. 8 +[33] George Tucker, Andriy Mnih, Chris J Maddison, John Lawson, and Jascha Sohl-Dickstein. REBAR: Low-variance, unbiased gradient estimates for discrete latent variable models. In NIPS, 2017. 3 +[34] Ross Wightman. Efficientnet for pytorch. https://github.com/rwrightman/ gen-efficientnet-pytorch, Nov 2019.8 +[35] Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 1992. 2 + +[36] Bichen Wu, Xiaoliang Dai, Peizhao Zhang, Yanghan Wang, Fei Sun, Yiming Wu, Yuandong Tian, Peter Vajda, Yangqing Jia, and Kurt Keutzer. FBnet: Hardware-aware efficient convnet design via differentiable neural architecture search. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 4, 7, 8 +[37] Lingxi Xie and Alan Yuille. Genetic CNN. In ICCV, 2017. 1 +[38] Saining Xie, Alexander Kirillov, Ross Girshick, and Kaiming He. Exploring randomly wired neural networks for image recognition. arXiv preprint arXiv:1904.01569, 2019. 5, 11 +[39] Sirui Xie, Hehui Zheng, Chunxiao Liu, and Liang Lin. SNAS: Stochastic Neural Architecture Search. In ICLR, 2019. 1, 2, 3, 4, 5, 6, 11, 13, 14 +[40] Tien-Ju Yang, Andrew Howard, Bo Chen, Xiao Zhang, Alec Go, Mark Sandler, Vivienne Sze, and Hartwig Adam. Netadapt: Platform-aware neural network adaptation for mobile applications. In Proceedings of the European Conference on Computer Vision (ECCV), pages 285-300, 2018. 1, 2 +[41] Zhao Zhong, Junjie Yan, Wei Wu, Jing Shao, and ChengLin Liu. Practical block-wise neural network architecture generation. In CVPR, 2018. 6, 13 +[42] Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. In ICLR, 2017. 1, 2, 4, 7 +[43] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In CVPR, 2018. 1, 2, 4, 5, 6, 7, 11, 13, 14 \ No newline at end of file diff --git a/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/images.zip b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c5cfb2197301d07cfa8d6fd8db268554a2edd849 --- /dev/null +++ b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2564c1f6d7472feb48d470b4b5aa672b9af14833cd4dfb73d7f343e2649eedc +size 396079 diff --git a/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/layout.json b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7d26d2c375370bfbe1266b05b81359df744331f9 --- /dev/null +++ b/unasdifferentiablearchitecturesearchmeetsreinforcementlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2e35bfbc29f7cd45f9ea6a53ad8b3e786fe57c1e08280abdbce8cbe5dba5cad +size 440279 diff --git a/unbiasedscenegraphgenerationfrombiasedtraining/e635f544-8d03-4143-8094-22f663576458_content_list.json b/unbiasedscenegraphgenerationfrombiasedtraining/e635f544-8d03-4143-8094-22f663576458_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4196cec7665e93031d7ceff1b96cf22494813d48 --- /dev/null +++ b/unbiasedscenegraphgenerationfrombiasedtraining/e635f544-8d03-4143-8094-22f663576458_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ea913e306aeea4c42e1821c6c14e375341b374aa49555ac38f2b6d56e796f28 +size 81633 diff --git a/unbiasedscenegraphgenerationfrombiasedtraining/e635f544-8d03-4143-8094-22f663576458_model.json b/unbiasedscenegraphgenerationfrombiasedtraining/e635f544-8d03-4143-8094-22f663576458_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f317d60dd748fff8d6af7213de95048e0fca7450 --- /dev/null +++ b/unbiasedscenegraphgenerationfrombiasedtraining/e635f544-8d03-4143-8094-22f663576458_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc1d03b955bac0bf0631a26d6328b0953724b750480e86c06153039ee11119c0 +size 106439 diff --git a/unbiasedscenegraphgenerationfrombiasedtraining/e635f544-8d03-4143-8094-22f663576458_origin.pdf b/unbiasedscenegraphgenerationfrombiasedtraining/e635f544-8d03-4143-8094-22f663576458_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..dee888d4c983c4b3224a532729ed42f51c48a0c7 --- /dev/null +++ b/unbiasedscenegraphgenerationfrombiasedtraining/e635f544-8d03-4143-8094-22f663576458_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a922b259bf83c50ddcb91a9552406f52ffb481f57d9a1133e0140c2ce5f98365 +size 1735555 diff --git a/unbiasedscenegraphgenerationfrombiasedtraining/full.md b/unbiasedscenegraphgenerationfrombiasedtraining/full.md new file mode 100644 index 0000000000000000000000000000000000000000..30635791badfb91f020d109402e854b1d60a20b9 --- /dev/null +++ b/unbiasedscenegraphgenerationfrombiasedtraining/full.md @@ -0,0 +1,338 @@ +# Unbiased Scene Graph Generation from Biased Training + +Kaihua Tang $^{1}$ , Yulei Niu $^{3}$ , Jianqiang Huang $^{1,2}$ , Jiaxin Shi $^{4}$ , Hanwang Zhang $^{1}$ + +$^{1}$ Nanyang Technological University, $^{2}$ Damo Academy, Alibaba Group, $^{3}$ Renmin University of China, $^{4}$ Tsinghua University + +kaihua001@e.ntu.edu.sg, niu@ruc.edu.cn, jianqiang.jqh@gmail.com + +shijx12@163.com, hanwangzhang@ntu.edu.sg + +# Abstract + +Today's scene graph generation (SGG) task is still far from practical, mainly due to the severe training bias, e.g., collapsing diverse human walk on/ sit on/lay on beach into human on beach. Given such SGG, the down-stream tasks such as VQA can hardly infer better scene structures than merely a bag of objects. However, debiasing in SGG is not trivial because traditional debiasing methods cannot distinguish between the good and bad bias, e.g., good context prior (e.g., person read book rather than eat) and bad long-tailed bias (e.g., near dominating behind/in front of). In this paper, we present a novel SGG framework based on causal inference but not the conventional likelihood. We first build a causal graph for SGG, and perform traditional biased training with the graph. Then, we propose to draw the counterfactual causality from the trained graph to infer the effect from the bad bias, which should be removed. In particular, we use Total Direct Effect as the proposed final predicate score for unbiased SGG. Note that our framework is agnostic to any SGG model and thus can be widely applied in the community who seeks unbiased predictions. By using the proposed Scene Graph Diagnosis toolkit1 on the SGG benchmark Visual Genome and several prevailing models, we observed significant improvements over the previous state-of-the-art methods. + +# 1. Introduction + +Scene graph generation (SGG) [62] — a visual detection task of objects and their relationships in an image — seems to have never fulfilled its promise: a comprehensive visual scene representation that supports graph reasoning for high-level tasks such as visual captioning [67, 65] and VQA [54, 15]. Once equipped with SGG, these high-level tasks have to abandon the ambiguous visual relationships + +![](images/d5572650d31ef05f0de4221cdd5f3a361f740345022efbef6a699295f735f61c.jpg) +(a) Input Image + +![](images/779d5f5cafb0b5e45ad2fbf5bd560106da8adc9a307b7b26adb4d60539d65152.jpg) +(b) Distribution of Predicate Sampling Fraction + +![](images/ccc4435de53528df51238615b89da4c104e3eab31fda42d67903ff1c9e9dee24.jpg) +(c) Biased Generation + +![](images/cfb46760b512b3a9e6f01c65bb4adf72768ffca93a5268e46a6ce0aad0ce03a6.jpg) +(d) Unbiased Generation +Figure 1. An example of scene graph generation (SGG). (a) An input image with bounding boxes. (b) The distribution of sample fraction for the most frequent 20 predicates in Visual Genome [23]. (c) SGG from re-implemented MOTIFS [69]. (d) SGG by the proposed unbiased prediction from the same model. + +— yet on which are our core efforts made [69, 53, 6], then pretend that there is a graph — nothing but a sparse object layout with binary links, and finally shroud it into graph neural networks [63] for merely more contextual object representations [65, 17, 54]. Although this is partly due to the research gap in graph reasoning [2, 49, 16], the crux lies in the biased relationship prediction. + +Figure 1 visualizes the SGG results from a state-of-the-art model [69]. We can see a frustrating scene: among almost perfectly detected objects, most of their visual relationships are trivial and less informative. For example in Figure 1(c), except the trivial 2D spatial layouts, we know little about the image from near, on, and has. Such heavily biased generation comes from the biased training data, more specifically, as shown in Figure 1(b), the highly-skewed long-tailed relationship annotations. For example, if a model is trained for predicting on 1,000 times more than standing on, then, during test, the former is more likely to prevail over the latter. Therefore, to perform a sensible graph reasoning, we need to distinguish more fine-grained relationships from the ostensibly probable but trivial ones, such as replacing near with behind/in front of, and on with parking on/driving on in Figure 1(d). + +![](images/4adf12093fd57d825c6db43daa5a941c61f977d27159bfb9c1c3bd8597012252.jpg) +(a) Biased Generation Based on Likelihood + +![](images/c9099885efbe0bba44e985c55bceabbef39068efa1b96f9ab7e742dc21fa61d2.jpg) +(b) An Intuitive Example of Counterfactual Thinking +Figure 2. (a) The biased generation that directly predicts labels from likelihood. (b) An intuitive example of the proposed total direct effect, which calculates the difference between the real scene and the counterfactual one. Note that the "wipe-out" is only for the illustrative purpose but not considered as visual processing. + +However, we should not blame the biased training because both our visual world per se and the way we describe it are biased: there are indeed more person carry bag than dog carry bag (i.e., the long-tail theory); it is easier for us to label person beside table rather than eating on (i.e., bounded rationality [50]); and we prefer to say person on bike rather than person ride on bike (i.e., language or reporting bias [35]). In fact, most of the biased annotations can help the model learn good contextual prior [32, 69] to filter out the unnecessary search candidates such as apple park on table and apple wear hat. A promising but embarrassing finding [69] is that: by only using the statistical prior of detected object class in the Visual Genome benchmark [23], we can already achieved $30.1\%$ on Recall@100 for Scene Graph Detection — rendering all the much more complex SGG models almost useless — that is only $1.1 - 1.5\%$ lower than the state-of-the-art [5, 53, 72]. Not surprisingly, as we will show in Section 5, conventional debiasing methods who do not respect the "good bias" during training, e.g., resampling [11] and re-weighting [30], fail to generalize to unseen relationships, i.e., zero-shot SGG [32]. + +For both machines and humans, decision making is a collaboration of content (endogenous reasons) and context (exogenous reasons) [56]. Take SGG as an example, in most SGG models [69, 5, 72], the content is the visual features of the subject and object, and the context is the visual features of the subject-object union regions and the pairwise object classes. We humans — born and raised in the biased nature — are ambidextrous in embracing the good while avoiding the bad context, and making unbiased decisions together with the content. The underlying mechanism is causality-based: the decision is made by pursuing the main causal effect caused by the content but not the side-effect by context. However, on the other hand, machines are usually likelihood-based: the prediction is analogous to look-up the + +![](images/8095040ac1900ee56724f33eadbbfba486d46027b5011ce54b1b11eb48252554.jpg) +IImage +X): Object Features +$\widehat{\mathbb{Z}}$ : Object Labels +Y:Predicate Logits + +![](images/1aa97bb6c1c210f15764f7a77d316c6c3c5065c276ed44ae115d0b651d4c714a.jpg) +(b) Recall@100 on Predicate Classification +Figure 3. (a) The example of total direct effect calculation and corresponding operations on the causal graph, where $\bar{X}$ represents wiped-out $X$ . (b) Recall@100 of Predicate Classification for selected predicates ranking by sampling fraction. The biased generation refers to re-implemented MOTIFS [69] and the proposed unbiased generation is the result from the same model using TDE. + +content and its context in a huge likelihood table, interpolated by population training. We believe that the key is to teach machines how to distinguish between the "main effect" and "side-effect". + +In this paper, we propose to empower machines the ability of counterfactual causality [41] to pursue the "main effect" in unbiased prediction: + +If I had not seen the content, would I still make the same prediction? + +The counterfactual lies between the fact that "I see" and the imagination "I had not", and the comparison between the factual and counterfactual will naturally remove the effect from the context bias, because the context is the only thing unchanged between the two alternatives. + +To better illustrate the profound yet subtle difference between likelihood and counterfactual causality, we present a dog standing on surfboard example in Figure 2(a). Due to the biased training, the model will eventually predict the on. Note that even though the rest choices are not all exactly correct, thanks to the bias, they still help to filter out a large amount of unreasonable ones. To take a closer look at what relationship it is in the context bias, we are essentially comparing the original scene with a counterfactual scene (Figure 2(b)): only the visual features of the dog and surfboard are wiped out, while keeping the rest — the scene and the object classes — untouched, as if the visual features had ever existed. By doing this, we can focus on the main visual effects of the relationship without losing the context. + +We propose a novel unbiased SGG method based on the Total Direct Effect (TDE) analysis framework in causal inference [57, 39, 58]. Figure 3(a) shows the underlying causal graphs [40, 41] of the two alternate scenes: factual and counterfactual. Although a formal introduction of them is given in Section 3-4, now you can simply understand the nodes as data features and the directed links as (parametric) data flows. For example, $X \rightarrow Y$ , $Z \rightarrow Y$ , and $I \rightarrow Y$ indicate that the relationship $Y$ is a combined effect caused by content: the pair of object visual features $X$ , context: their object classes $Z$ , and scene: the image $I$ ; the faded links denote that the wiped-out $\bar{X}$ is no longer caused by $I$ or affects $Z$ . These graphs offer an algorithmic formulation to calculate TDE, which exactly realizes the counterfactual thinking in Figure 2. As shown in Figure 3(b), the proposed TDE significantly improves most of the predicates, and impressively, the distribution of the improved performances is no longer long-tailed, indicating the fact that our improvement is indeed from the proposed method, but NOT from the better exploitation of the context bias. A closer analysis in Figure 6 further shows that the worse predictions like on — though very few — are due to turning to more fine-grained results such as stand on and park on. We highlight that TDE is a model-agnostic prediction strategy and thus applicable for a variety of models and fusion tricks [71, 69, 53]. + +Last but not least, we propose a new standard of SGG diagnosis toolkit (cf. Section 5.2) for more comprehensive SGG evaluations. Besides traditional evaluation tasks, it consists of the bias-sensitive metric: mean Recall [53, 6] and a new Sentence-to-Graph Retrieval for a more comprehensive graph-level metric. By using this toolkit on SGG benchmark Visual Genome [23] and several prevailing baselines, we verify the severe bias in existing models and demonstrate the effectiveness of the proposed unbiased prediction over other debiasing strategies. + +# 2. Related Work + +Scene Graph Generation. SGG [62, 69] has received increasing attention in computer vision community, due to the potential revolution that would be brought to down-stream visual reasoning tasks [49, 65, 22, 17]. Most of the existing methods [62, 60, 7, 26, 68, 53, 64, 10, 43, 59] struggle for better feature extraction networks. Zellers et al. [69] firstly brought the bias problem of SGG into attention and the followers [53, 6] proposed the unbiased metric (mean Recall), yet, their approaches are still restricted to the feature extraction networks, leaving the biased SGG problem unsolved. The most related work [28] just prunes those dominant and easy-to-predict relationships in the training set. + +Unbiased Training. The bias problem has long been investigated in machine learning [55]. Existing debiasing methods can be roughly categorized into three types: 1) data + +![](images/0e6205d3b70659dc984a20dc62a37ac4353467cc35518e0ea52d6816f12f1498.jpg) +Figure 4. (a) The framework used in our biased training. (b) The causal graph of the SGG framework. (c) An illustration of the proposed TDE inference. + +![](images/ed8955a7dba2b339fc6b62ad50add1b912fd48c2ec26c05ae042b34c99539341.jpg) + +augmentation or re-sampling [9, 25, 27, 11, 3], 2) unbiased learning through elaborately designed training curriculums or learning losses [70, 30], 3) disentangling biased representations from the unbiased [35, 4]. The proposed TDE analysis can be regarded as the third category, but the main difference is that TDE doesn't require to train additional layers like [35, 4] to model the bias, it directly separates the bias from existing models through the counterfactual surgeries on causal graphs. + +Mediation Analysis. It is also known as effect analysis [57, 41], which is widely adopted in medical, political or psychological research [45, 19, 8, 33, 21] as the tool of studying the effect of certain treatments or policies. However, it has been neglected in the community of computer vision for years. There are very few recent works [36, 24, 37, 42, 52, 13, 66] trying to endow the model with the capability of causal reasoning. More detailed background knowledge can be found in [40, 41, 57]. + +# 3. Biased Training Models in Causal Graph + +As illustrated in Figure 4, we summarize the SGG framework in the form of Causal Graph (a.k.a., structural causal model) [41, 38, 40]. It is a directed acyclic graph $\mathcal{G} = \{\mathcal{N},\mathcal{E}\}$ , indicating how a set of variables $\mathcal{N}$ interact with each other through the causal links $\mathcal{E}$ . It provides a sketch of the causal relations behind the data and how variables obtain their values, e.g., $(I,X,Z)\to Y$ . Before we conduct counterfactual analysis that deliberately manipulates the values of nodes and prunes the causal graph, we first revisit the conventional biased SGG model training in the graphical view. + +The causal graph in Figure 4(b) is applicable to a variety of SGG methods, since it is highly general, imposing no constraints on the detailed implementations. We case + +study three representative model formulations: the classic VTransE [71], the state-of-the-art MOTIFS [69] and VC-Tree [53], using the language of nodes and links. + +Node $I$ (Input Image&Backbone). A Faster R-CNN [44] is pre-trained and frozen in this node. It outputs a set of bounding boxes $B = \{b_i | i = 1 \dots n\}$ and the feature map $\mathcal{M}$ from image $I$ . + +Link $I \to X$ (Object Feature Extractor). It firstly extracts RoIAign features [12] $R = \{r_i\}$ and tentative object labels $L = \{l_i\}$ by the object classifier on Faster R-CNN. Then, like MOTIFS [69] or VCTree [53], we can use the following module to encode visual contexts for each object: + +$$ +I n p u t: \left\{\left(r _ {i}, b _ {i}, l _ {i}\right) \right\} \Longrightarrow O u t p u t: \left\{x _ {i} \right\}, \tag {1} +$$ + +where MOTIFS implements it as bidirectional LSTMs (BiLSTMs) and VCTree [53] adopts bidirectional TreeLSTMs (Bi-TreeLSTMs) [51], early works like VTransE [71] simply use fully connected layers. + +Node $X$ (Object Feature). The pairwise object feature $X$ takes value from $\{(x_i, x_j) | i \neq j; i, j = 1 \dots n\}$ . We slightly abuse the notation hereinafter, denoting the combination of representations from $i$ and $j$ as subscript $e$ : $x_e = (x_i, x_j)$ . + +Link $X \to Z$ (Object Classification). The fine-tuned label of each object is decoded from the corresponding $x_{i}$ by: + +$$ +I n p u t: \left\{x _ {i} \right\} \Longrightarrow O u t p u t: \left\{z _ {i} \right\}, \tag {2} +$$ + +where MOTIFS [69] and VCTree [53] utilizes LSTM and TreeLSTM as decoders to capture the co-occurrence among object labels, respectively. The input of each LSTM/TreeLSTM cell is the concatenation of feature and the previous label $[x_i;z_{i - 1}]$ . VTransE [71] uses the conventional fully connected layer as the classifier. + +Node $Z$ (Object Class). It contains a pair of one-hot vectors for object labels $z_{e} = (z_{i},z_{j})$ . + +Link $X \to Y$ (Object Feature Input for SGG). For relationship classification, pairwise feature $X$ are merged into a joint representation by the module: + +$$ +I n p u t: \left\{x _ {e} \right\} \Longrightarrow O u t p u t: \left\{x _ {e} ^ {\prime} \right\}, \tag {3} +$$ + +where another Bi-LSTMs and Bi-TreeLSTMs layers are applied in MOTIFS [69] and VCTree [53], respectively, before concatenating the pair of object features. VTransE [71] uses fully connected layers and element-wise subtraction for feature merging. + +Link $Z \to Y$ (Object Class Input for SGG). The language prior is calculated in this link through a joint embedding layer $z_{e}^{\prime} = W_{z}[z_{i} \otimes z_{j}]$ , where $\otimes$ generates the one-hot unique vector $\mathbb{R}^{N \times N}$ for the pair of $N$ -way object labels. + +Link $I \to Y$ (Visual Context Input for SGG). This link extracts the contextual union region features $v_{e}^{\prime} = \operatorname{Convs}(\operatorname{RoIAlign}(\mathcal{M}, b_{i} \cup b_{j}))$ where $b_{i} \cup b_{j}$ indicates the union box of two RoIs. + +![](images/3633a5e0e8042ec3776f4a6d85291b26ffebe3919dfa03e81746d9658955eb48.jpg) +(a) The Original Case of $Y_{x}(u)$ + +![](images/154c126489b9e3aadc90a8238ac37b4c19ebc79fac4eafd8f9b3c2e9cc0e194c.jpg) + +![](images/d1ca637c4c6d9b55e65603a79a8d5f613323f5974b09e82f6faf641d21e32b14.jpg) +(b) The Intervention Case of $Y_{\bar{\chi}}(u)$ +(c) The Counterfactual Case of $Y_{\bar{x},z}(u)$ +Figure 5. The original causal graph of SGG together with two interventional and counterfactual alternates. + +Node $Y$ (Predicate Classification). The final predicate logits $Y$ that takes inputs from the three branches is then generated by using a fusion function. In Section 5, we test two general fusion functions: 1) SUM: $y_{e} = W_{x}x_{e}^{\prime} + W_{v}v_{e}^{\prime} + z_{e}^{\prime}$ , 2) GATE: $y_{e} = W_{r}x_{e}^{\prime}\cdot \sigma (W_{x}x_{e}^{\prime} + W_{v}v_{e}^{\prime} + z_{e}^{\prime})$ , where $\cdot$ is element-wise product, $\sigma (\cdot)$ is a sigmoid function. + +Training Loss. All models are trained by using the conventional cross-entropy losses of object labels and predicate labels. To avoid any single link spontaneously dominating the generation of logits $y_{e}$ , especially $Z \rightarrow Y$ , we further add auxiliary cross-entropy losses that individually predict $y_{e}$ from each branch. + +# 4. Unbiased Prediction by Causal Effects + +Once the above training has been done, the causal dependencies among the variables are learned, in terms of the model parameters. The conventional biased prediction can only see the output of the entire graph given an image $I = u$ without any idea about how a specific pair of objects affect their predicate. However, causal inference [41] encourages us to think out of the black box. From the graphical point of view, we are no longer required to run the entire graph as a whole. We can directly manipulate the values of several nodes and see what would be going on. For example, we can cut off the link $I \rightarrow X$ and assign a dummy value to $X$ , then investigate what the predicate would be. The above operation is termed intervention in causal inference [40]. Next, we will make unbiased predictions by intervention and its induced counterfactuals. + +# 4.1. Notations + +Intervention. It can be denoted as $do(\cdot)$ . It wipes out all the in-coming links of a variable and demands the variable to take a certain value, e.g. $do(X = \bar{x})$ in Figure 5(b), meaning $X$ is no longer affected by its causal parents. + +Counterfactual. It means "counter to the facts" [46], and takes one step further that assigns the "clash of worlds" combination of values to variables. Take Figure 5(c) as an + +example, if the intervention $do(X = \bar{x})$ is conducted on $X$ , the variable $Z$ still takes the original $z$ as if $x$ had existed. + +Causal Effect. Throughout this section, we will use the pairwise object feature $X$ as our control variable where the intervention is conducted, aiming to assess its effects, due to the fact that there wouldn't be any valid relationship if the pair of objects do not exist. The observed $X$ is denoted as $x$ while the intervened unseen value is $\bar{x}$ , which is set to either the mean feature of the training set or zero vector. The object label $z$ on Figure 5(c) is calculated from Eq. (2), taking $x$ as input. We denote the output logits $Y$ after the intervention $X = \bar{x}$ as follows (Figure 5(b)): + +$$ +Y _ {\bar {x}} (u) = Y \left(d o (X = \bar {x}) | u\right), \tag {4} +$$ + +where $u$ is the input image in SGG. Following the above notation, the original and counterfactual $Y$ , i.e., Figure 5(a,c), can be re-written as $Y_{x}(u)$ and $Y_{\bar{x},z}(u)$ , respectively. + +# 4.2. Total Direct Effect + +As we discussed in Section 1, instead of the static likelihood that tends to be biased, the unbiased prediction lies in the difference between the observed outcome $Y_{x}(u)$ and its counterfactual alternate $Y_{\bar{x},z}(u)$ . The later one is a context-specific bias that we want to remove from prediction. Intuitively, the unbiased prediction that we seek is the visual stimuli from blank to the observed real objects with specific attributes, states, and behaviors, but not merely from the surroundings and language priors. Those specific visual cues of objects are the key to the more fine-grained and informative unbiased predictions, because even if the overall prediction is biased towards the relationship like dog on surfboard, the "straight legs" would cause more effect on standing on rather than sitting on. In causal inference [57, 58], the above prediction process can be calculated as Total Direct Effect (TDE): + +$$ +T D E = Y _ {x} (u) - Y _ {\bar {x}, z} (u), \tag {5} +$$ + +where the first term is from the original graph and the second one is from the counterfactual, as illustrated in Figure 5. + +Note that there is another type of effect [57], Total Effect (TE), which is easy to be mixed up with TDE. Instead of deriving counterfactual bias $Y_{\bar{x},z}(u)$ , TE lets all the descendant nodes of $X$ change with intervention $do(X = \bar{x})$ as shown in Figure 5(b). TE is therefore formulated as: + +$$ +T E = Y _ {x} (u) - Y _ {\bar {x}} (u). \tag {6} +$$ + +The main difference lies in the fact that $Y_{\bar{x}}(u)$ is not conditioned on the original object labels (those caused by $x$ ), so TE only removes the general bias in the whole dataset (similar to the $b$ in $y = k \cdot x + b$ ), rather than the specific bias caused by the mediator we care about. The subtle difference between TE and TDE is further defined as Natural Indirect + +Effect (NIE) [57] or Pure Indirect Effect (PIE) [58]. More experimental analyses among these three types of effect are given in Section 5. + +Overall SGG. At last, the proposed unbiased prediction $y_{e}^{\dagger}$ is obtained by replacing the conventional one-time prediction with TDE, which essentially "thinks" twice: one for observational $Y_{x_e}(u) = y_e$ , the other for imaginary $Y_{\bar{x},z_e}(u) = y_e(\bar{x},z_e)$ . The unbiased logits of $\mathrm{Y}$ is therefore defined as follows: + +$$ +y _ {e} ^ {\dagger} = y _ {e} - y _ {e} (\bar {x}, z _ {e}). \tag {7} +$$ + +It is also worth mentioning that the proposed TDE doesn't introduce any additional parameters and is widely applicable to a variety of models. + +# 5. Experiments + +# 5.1. Settings and Models + +Dataset. For SGG, we used Visual Genome (VG) [23] dataset to train and evaluate our models, which is composed of 108k images across 75k object categories and 37k predicate categories. However, as $92\%$ of the predicates have no more than 10 instances, we followed the widely adopted VG split [62, 69, 53, 5] containing the most frequent 150 object categories and 50 predicate categories. The original split only has training set $(70\%)$ and test set $(30\%)$ . We followed [69] to sample a 5k validation set from training set for parameter tuning. For Sentence-to-Graph Retrieval (cf. Section 5.2), we selected the overlapped 41,859 images between VG and MS-COCO Caption dataset [31] and divided them into train/test-1k/test-5k (35,859/1,000/5,000) sets. The later two only contain images from VG test set in case of exposing to ground-truth SGs. Each image has at least 5 captions serving as human queries, the same as how we use searching engines. + +Model Zoo. We evaluated three models: VTransE [71], MOTIFS [69], VTree [53], and two fusion functions: SUM and GATE. They were re-implemented using the same codebase as we proposed. All models shared the same hyper-parameters and the pre-trained detector backbone. + +# 5.2. Scene Graph Generation Diagnosis + +Our proposed SGG diagnosis has the following three evaluations: + +1. Relationship Retrieval (RR). It can be further divided into three sub-tasks: (1) Predicate Classification (PredCls): taking ground truth bounding boxes and labels as inputs, (2) Scene Graph Classification (SGCls): using ground truth bounding boxes without labels, (3) Scene Graph Detection (SGDet): detecting SGs from scratch. The conventional metric of RR is Recall@K ( $R@K$ ), which was abandoned in this paper due to the reporting bias [35]. As illustrated in Figure 3(b), previous methods like [69] with good performance on $R@K$ unfairly cater to "head" predicates, + +
ModelFusionMethodPredicate ClassificationScene Graph ClassificationScene Graph Detection
mR@20mR@50mR100mR@20mR50mR100mR@20mR50mR100
IMP+ [62, 6]--9.810.5-5.86.0-3.84.8
FREQ [69, 53]-8.313.016.05.17.28.54.56.17.1
MOTIFS [69, 53]-10.814.015.36.37.78.24.25.76.6
KERN [6]--17.719.2-9.410.0-6.47.3
VCTree [53]-14.017.919.48.210.110.85.26.98.0
\( MOTIFS^† \)SUMBaseline11.514.615.86.58.08.54.15.56.8
Focal10.913.915.06.37.78.33.95.36.6
Reweight16.020.021.98.410.110.96.58.49.8
Resample14.718.520.09.111.011.85.98.29.7
X2Y13.016.417.66.98.69.25.16.98.1
X2Y-Tr11.614.916.06.58.49.15.06.98.1
TE18.225.329.08.112.014.05.78.09.6
NIE0.61.11.46.19.010.63.85.16.0
TDE18.525.529.19.813.114.95.88.29.8
GATEBaseline12.215.516.87.29.09.55.27.28.5
TDE18.524.928.311.113.915.26.68.59.9
\( VTransE^† \)SUMBaseline11.614.715.86.78.28.73.75.06.0
TDE17.324.628.09.312.914.86.38.610.5
GATEBaseline13.617.118.66.68.28.75.16.88.0
TDE18.925.328.49.813.114.76.08.510.2
\( VCTree^† \)SUMBaseline11.714.916.16.27.57.94.25.76.9
TDE18.425.428.78.912.214.06.99.311.1
GATEBaseline12.415.416.66.37.58.04.96.67.7
TDE17.223.326.68.911.813.46.38.610.3
+ +e.g., on, while neglect the "tail" ones, e.g., predicates like parked on, laying on have embarrassingly 0.0 Recall@100. To speak for the valuable "tail" rather than the trivial "head", we adopted a recent replacement, mean Recall@K (mR@K), proposed by Tang et al. [53] and Chen et al. [6]. mR@K retrieves each predicate separately and then averages R@K for all predicates. +2. Zero-Shot Relationship Retrieval (ZSRR). It was introduced by Lu et al. [32] as Zero-Shot Recall@K and was firstly evaluated on VG dataset in this paper, which only reports the R@K of those subject-predicate-object triplets that have never been observed in the training set. ZSRR also has three sub-tasks as RR. +3. Sentence-to-Graph Retrieval (S2GR). It uses the image caption sentence as the query to retrieve images represented as SGs. Both RR and ZSRR are triplet-level evaluations, ignoring the graph-level coherence. Therefore, we design S2GR, using human descriptions to retrieve detected SGs. We didn't use proxy vision-language tasks like captioning [65, 67] and VQA [54, 15] as the diagnosis, because their implementations have too many components unrelated to SGG and their datasets are challenged by their own biases [1, 14, 34]. In S2GR, the detected SGs (using SGDet) are regarded as the only representations of images, cut off all the dependencies on black-box visual features, so any bias on SGG would sensitively violate the coherence of SGs, resulting in worse retrieval results. For example, if walking on was detected as the biased alternative on, images would be mixed up with those having sitting on or laying on. Note that S2GR is fundamentally different + +Table 1. The SGG performances of Relationship Retrieval on mean Recall@K [53, 6]. The SGG models re-implemented under our codebase are denoted by the superscript †. + +
Zero-Shot Relationship RetrievalPredClsSGClsSGDet
ModelFusionMethodR@50/100R@50/100R@50/100
MOTIFS†SUMBaseline10.9 / 14.52.2 / 3.00.1 / 0.2
Focal10.9 / 14.42.2 / 3.10.1 / 0.3
Reweight0.7 / 0.90.1 /0.10.0 / 0.0
Resample11.1 / 14.32.3 / 3.10.1 / 0.3
X2Y11.8 / 17.62.3 / 3.71.6 / 2.7
X2Y-Tr13.7 / 17.63.1 / 4.21.8 / 2.8
TE14.2 / 18.11.4 / 2.01.4 / 1.8
NIE2.4 / 3.20.2 / 0.40.3 / 0.6
TDE14.4 / 18.23.4 / 4.52.3 / 2.9
GATEBaseline7.4 / 10.60.9 / 1.30.2 / 0.4
TDE7.7 / 11.01.9 / 2.61.9 / 2.5
VTransE†SUMBaseline11.3 / 14.72.5 / 3.30.8 / 1.5
TDE13.3 / 17.62.9 / 3.82.0 / 2.7
GATEBaseline4.2 / 5.91.9 / 2.61.9 / 2.6
TDE5.3 / 7.92.1 / 3.01.9 / 2.7
VCTree†SUMBaseline10.8 / 14.31.9 / 2.60.2 / 0.7
TDE14.3 / 17.63.2 / 4.02.6 / 3.2
GATEBaseline4.4 / 6.82.5 / 3.31.8 / 2.7
TDE5.9 / 8.13.0 / 3.72.2 / 2.8
+ +Table 2. The results of Zero-Shot Relationship Retrieval. + +from the previous image retrieval with scene graph [18, 48], because the latter still consider the images as visual features but not SGs. Recall@20/100 (R@20/100) and median ranking indexes of retrieved results (Med) on the gallery size of 1,000 and 5,000 were evaluated. Note that S2GR should have diverse implementations as long as its spirit: graph-level symbolic retrieval, is fulfilled. We provide our implementation in the next sub-section. + +# 5.3. Implementation Details + +Object Detector. Following the previous works [62, 69, 53], we pre-trained a Faster R-CNN [44] and froze it to be the underlying detector of our SGG models. We equipped the Faster R-CNN with a ResNeXt-101-FPN [29, 61] back + +
Sentence-to-Graph Retrieval
Gallery Size10005000
ModelFusionMethodR@20R@100MedR@20R@100
MOTIFS†SUMBaseline11.639.91553.112.1
Focal10.939.01632.911.1
Reweight9.736.81593.011.4
Resample13.143.61242.513.4
X2Y14.344.81253.514.6
X2Y-Tr14.545.61143.916.8
TE15.949.91004.416.9
NIE6.729.22021.68.6
TDE17.053.6915.218.9
GATEBaseline13.745.61434.416.2
TDE20.859.2725.221.3
VTransE†SUMBaseline12.342.31293.615.0
TDE14.748.41063.616.3
GATEBaseline12.941.81363.814.3
TDE18.550.41104.519.1
VCTree†SUMBaseline9.937.41503.111.5
TDE19.057.0825.020.0
GATEBaseline13.444.11213.713.6
TDE19.155.5875.120.3
+ +Table 3. The results of Sentence-to-Graph Retrieval. + +bone and scaled the longer side of input images to be 1k pixels. The detector was trained on the training set of VG using SGD as optimizer. We set the batch size to 8 and the initial learning rate to $8 \times 10^{-3}$ , which was decayed by the factor of 10 on the $30\mathrm{k^{th}}$ and $40\mathrm{k^{th}}$ iterations. The final detector achieved 28.14 mAP on VG test set (using 0.5 IoU threshold). 4 2080ti GPUs were used for the pre-training. + +Scene Graph Generation. On top of the frozen detector, we trained SGG models using SGD as optimizer. Batch size and initial learning rate were set to be 12 and $12 \times 10^{-2}$ for PredCls and SGCIs; 8 and $8 \times 10^{-2}$ for SGDet. The learning rate would be decayed by 10 two times after the validation performance plateaus. For SGDet, 80 RoIs were sampled for each image and Per-Class NMS [47, 69] with 0.5 IoU was applied in object prediction. We sampled up to 1,024 subject-object pairs containing $75\%$ background pairs during training. Different from previous works [69, 53, 5], we didn't assume that non-overlapping subject-object pairs are invalid in SGDet, making SGD more general. + +Sentence-to-Graph Retrieval. We handled S2GR as a graph-to-graph matching problem. The query captions of each image were stuck together and parsed to a text-SG using [48]. We set all the subject/object and predicates that appear less than 5 times to "UNKNOWN" tokens, obtaining a dictionary of size 4,459 subject/object entities and 645 predicates, respectively. The original image SG generated from SGDet contains a fixed number of RoIs and forces all valid subject-object pairs to predict foreground relationships, to serve the $K$ number in $\mathrm{mR}@\mathrm{K}$ , which is inappropriate for S2GR. Therefore, we used a threshold of 0.1 to filter RoIs by the label probabilities and removed all background predicates from the graph. Recall that the vocabulary size of the entity and predicate for image SGs are 150 and 50 as we mentioned before. To match the two heterogeneous graphs: image SG and text SG, in a unified space, we used BAN [20] to encode the two graph types into fixed-dimension vectors to facilitate the retrieval. More details can be found in supplementary material. + +![](images/c20ac27a25ca2ec1665b8ee085db30e655f9a216b8ddbf949e99af49ffc356b6.jpg) +Figure 6. The pie chart summarizes all the relationships, that are correctly detected by the baseline model but considered "incorrect" by TDE. The right side of the pie chart shows the corresponding labels given by the TDE. Combining with our qualitative examples, we believe that the drop of $\mathrm{Recall}@\mathrm{K}$ is caused by two reasons: 1) the annotators preference towards simple annotations caused by bounded rationality [50], 2) TDE tends to predict more action-like relationships rather than vague prepositions. + +# 5.4. Ablation Studies + +Except for the models and fusion functions that we've discussed before, we also investigated three conventional debiasing methods, two intuitive causal graph surgeries, and other two types of causal effects: 1) Focal: focal loss [30] automatically penalizes well-learned samples and focuses on the hard ones. We followed the hyper-parameters $(\gamma = 2.0, \alpha = 0.25)$ optimized in [30]. 2) Reweight: weighted cross-entropy is widely used in the industry for biased data. The inversed sample fractions were assigned to each predicate category as weights. 3) Resample [3]: rare categories were up-sampled by the inversed sample fraction during training. 4) X2Y: since we argued that the unbiased effect was under the effect of object features $X$ , it directly generated SG by the outputs of $X \to Y$ branch after biased training. 5) X2Y-Tr: it even cut off other branches, using $X \to Y$ for both training and testing. 6) TE: as we introduced in Section 4, TE is the debiasing method that not conditioned on the contexts. 7) NIE: it is the marginal difference between TDE and TE, i.e., $\mathrm{NIE} = \mathrm{TE}$ -TDE, which can be considered as the pure effect caused by introducing the bias $Z \to Y$ . NOTE: although zero vector can also be used as the wiped-out input $\bar{x}$ , we chose the mean feature of training set for minor improvements. + +# 5.5.Quantitative Studies + +RR & ZSRR. The results are listed in Table 1& 2. Despite the fact that conventional debiasing methods: Reweight and Resample, directly hack the mR@K metric, they only gained limited advantages in RR but not in ZSRR. In contrast to the high mR@K of Reweight in RR SGDet, it got embarrassingly $0.0 / 0.0$ in ZSRR SGDet, indicating that such debiased training methods ruin the useful context prior. Focal loss [30] barely worked for both RR and ZSRR. + +![](images/be649d3ee864954b6db3ab7eafb358c683a3a00ce1f0af5ed6a0b4dfa5d8cf1f.jpg) +Figure 7. Results of scene graphs generated from MOTIF $^{\dagger}$ -SUM baseline (yellow) and corresponding TDE (green). Top: relationship retrieval results. Mid: zero shot relationship retrieval results. Red boxes indicate the zero shot triplets. Bottom: results of S2GR. Red boxes mean the correctly retrieved SGs. Part of the trivial detected objects are removed from the graphs, due to space limitation. + +Causal graph surgeries, X2Y and X2Y-Tr, both improved RR and ZSRR from the baseline, yet their increases were limited. TE had a very similar performance to TDE, but as we discussed, it removed the general bias rather than the subject-object specific bias. NIE is the marginal improvements from TE to TDE, which was even worse than baseline. Although R@K is not a qualified metric for RR as we discussed, we still reported the R@50/100 performance of MOTIFS†-SUM in Figure 6. We can observe a performance drop from baseline to TDE, but a further analysis shows that those considered as correct in baseline and “incorrect” in TDE were mainly the “head” predicates, and they are classified by TDE into more fine-grained “tail” classes. Among all three models and two fusion functions, even the worst TDE performance outperforms previous state-of-the-art methods [53, 6] by a large margin on RR mR@K. + +S2GR. In S2GR, Focal and Reweight are even worse than the baseline. Among all the three conventional debiasing methods, Resample was the most stable one based on our experiments. X2Y and X2Y-Tr have minor advantages over baseline. TE takes the 2nd place and was only a little bit worse than TDE. NIE is the worst as we expected because it is only based on the pure context bias. It is worth highlighting that all the three models and two fusion functions had significant improvements after we applied TDE. + +# 5.6. Qualitative Studies + +We visualized several SGCs examples that generated from MOTIFS $^{\dagger}$ -SUM baseline and TDE in the top and mid rows of Figure 7, scene graphs generated by TDE are much more discriminative compared to the baseline model which + +prefers trivial predicates like on. The right half of the mid row shows that the baseline model would even generate holding due to the long-tail bias when the girl is not touching the kite, implying that the biased predictions are easy to be "blind", while TDE successfully predicted looking at. The bottom of Figure 7 is an example of S2GR, where the SGs detected by baseline model lost the detailed actions of people, considering both person walking on street and person standing on street as person on street, which caused worse retrieval results. All the examples show a clear trend that TDE is much more sensitive to those semantically informative relationships instead of the trivially biased ones. + +# 6. Conclusions + +We presented a general framework for unbiased SGG from biased training, and this is the first work addressing the serious bias issue in SGG. With the power of counterfactual causality, we can remove the harmful bias from the good context bias, which cannot be easily identified by traditional debiasing methods such as data augmentation [9, 11] and unbiased learning [30]. We achieved the unbiasedness by calculating the Total Direct Effect (TDE) with the help of a causal graph, which is a roadmap for training any SGG model. By using the proposed Scene Graph Diagnosis toolkit, our unbiased SGG results are considerably better than their biased counterparts. + +Acknowledgments We'd like to thank all reviewers for their constructive comments. This work was partially supported by the NTU-Alibaba JRI. + +# References + +[1] A. Agrawal, D. Batra, D. Parikh, and A. Kembhavi. Don't just assume; look and answer: Overcoming priors for visual question answering. In CVPR, 2018. +[2] P. W. Battaglia, J. B. Hamrick, V. Bapst, A. Sanchez-Gonzalez, V. Zambaldi, M. Malinowski, A. Tacchetti, D. Raposo, A. Santoro, R. Faulkner, et al. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018. +[3] E. Burnaev, P. Erofeev, and A. Papanov. Influence of resampling on accuracy of imbalanced classification. In ICMV, 2015. +[4] R. Cadene, C. Dancette, H. Ben-younes, M. Cord, and D. Parikh. Rubi: Reducing unimodal biases in visual question answering. arXiv preprint arXiv:1906.10169, 2019. +[5] L. Chen, H. Zhang, J. Xiao, X. He, S. Pu, and S.-F. Chang. Counterfactual critic multi-agent training for scene graph generation. In ICCV, 2019. +[6] T. Chen, W. Yu, R. Chen, and L. Lin. Knowledge-embedded routing network for scene graph generation. In CVPR, 2019. +[7] B. Dai, Y. Zhang, and D. Lin. Detecting visual relationships with deep relational networks. In CVPR, 2017. +[8] G. Dunn, R. Emsley, H. Liu, S. Landau, J. Green, I. White, and A. Pickles. Evaluation and validation of social and psychological markers in randomised trials of complex interventions in mental health: a methodological research programme. NIHR Journals Library, 2015. +[9] R. Geirhos, P. Rubisch, C. Michaelis, M. Bethge, F. A. Wichmann, and W. Brendel. Imagenet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustness. In International Conference on Learning Representations, 2019. +[10] J. Gu, H. Zhao, Z. Lin, S. Li, J. Cai, and M. Ling. Scene graph generation with external knowledge and image reconstruction. In CVPR, 2019. +[11] H. He and E. A. Garcia. Learning from imbalanced data. IEEE Transactions on knowledge and data engineering, 2009. +[12] K. He, G. Gkioxari, P. Dollár, and R. Girshick. Mask r-cnn. In ICCV, 2017. +[13] Y. He, Y. Ding, P. Liu, L. Zhu, H. Zhang, and Y. Yang. Learning filter pruning criteria for deep convolutional neural networks acceleration. In CVPR, 2020. +[14] L. A. Hendricks, K. Burns, K. Saenko, T. Darrell, and A. Rohrbach. Women also snowboard: Overcoming bias in captioning models. In ECCV. Springer, 2018. +[15] D. A. Hudson and C. D. Manning. Gqa: A new dataset for real-world visual reasoning and compositional question answering. In CVPR, 2019. +[16] D. A. Hudson and C. D. Manning. Learning by abstraction: The neural state machine. NeurIPS, 2019. +[17] J. Johnson, A. Gupta, and L. Fei-Fei. Image generation from scene graphs. In CVPR, 2018. +[18] J. Johnson, R. Krishna, M. Stark, L.-J. Li, D. Shamma, M. Bernstein, and L. Fei-Fei. Image retrieval using scene graphs. In CVPR, 2015. + +[19] L. Keele. The statistics of causal inference: A view from political methodology. Political Analysis, 2015. +[20] J.-H. Kim, J. Jun, and B.-T. Zhang. Bilinear attention networks. In Advances in Neural Information Processing Systems, 2018. +[21] B. G. King. A political mediation model of corporate response to social movement activism. Administrative Science Quarterly, 2008. +[22] R. Krishna, I. Chami, M. Bernstein, and L. Fei-Fei. Referring relationships. In CVPR, 2018. +[23] R. Krishna, Y. Zhu, O. Groth, J. Johnson, K. Hata, J. Kravitz, S. Chen, Y. Kalantidis, L.-J. Li, D. A. Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. International Journal of Computer Vision, 2017. +[24] M. J. Kusner, J. Loftus, C. Russell, and R. Silva. Counterfactual fairness. In Advances in Neural Information Processing Systems, 2017. +[25] Y. Li, Y. Li, and N. Vasconcelos. Resound: Towards action recognition without representation bias. In ECCV, 2018. +[26] Y. Li, W. Ouyang, B. Zhou, K. Wang, and X. Wang. Scene graph generation from objects, phrases and caption regions. In ICCV, 2017. +[27] Y. Li and N. Vasconcelos. Repair: Removing representation bias by dataset resampling. In CVPR, 2019. +[28] Y. Liang, Y. Bai, W. Zhang, X. Qian, L. Zhu, and T. Mei. Vrr-vg: Refocusing visually-relevant relationships. In ICCV, pages 10403-10412, 2019. +[29] T.-Y. Lin, P. Dollar, R. Girshick, K. He, B. Hariharan, and S. Belongie. Feature pyramid networks for object detection. In CVPR, 2017. +[30] T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dólár. Focal loss for dense object detection. In ICCV, 2017. +[31] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollar, and C. L. Zitnick. Microsoft coco: Common objects in context. In ECCV. Springer, 2014. +[32] C. Lu, R. Krishna, M. Bernstein, and L. Fei-Fei. Visual relationship detection with language priors. In ECCV, 2016. +[33] D. P. MacKinnon, A. J. Fairchild, and M. S. Fritz. Mediation analysis. Annu. Rev. Psychol., 2007. +[34] V. Manjunatha, N. Saini, and L. S. Davis. Explicit bias discovery in visual question answering models. In CVPR, 2019. +[35] I. Misra, C. Lawrence Zitnick, M. Mitchell, and R. Girshick. Seeing through the human reporting bias: Visual classifiers from noisy human-centric labels. In CVPR, 2016. +[36] S. Nair, Y. Zhu, S. Savarese, and L. Fei-Fei. Causal induction from visual observations for goal directed tasks. arXiv preprint arXiv:1910.01751, 2019. +[37] Y. Niu, K. Tang, H. Zhang, Z. Lu, X. Hua, and J.-R. Wen. Counterfactual vqa: A cause-effect look at language bias. arXiv, 2020. +[38] J. Pearl. Causality: models, reasoning and inference. Springer, 2000. +[39] J. Pearl. Direct and indirect effects. In Proceedings of the 17th conference on uncertainty in artificial intelligence. Morgan Kaufmann Publishers Inc., 2001. + +[40] J. Pearl, M. Glymour, and N. P. Jewell. Causal inference in statistics: A primer. John Wiley & Sons, 2016. +[41] J. Pearl and D. Mackenzie. THE BOOK OF WHY: THE NEW SCIENCE OF CAUSE AND EFFECT. Basic Books, 2018. +[42] J. Qi, Y. Niu, J. Huang, and H. Zhang. Two causal principles for improving visual dialog. arXiv preprint arXiv:1911.10496, 2019. +[43] M. Qi, W. Li, Z. Yang, Y. Wang, and J. Luo. Attentive relational networks for mapping images to scene graphs. In CVPR, 2019. +[44] S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, 2015. +[45] L. Riichiardi, R. Bellocco, and D. Zugna. Mediation analysis in epidemiology: methods, interpretation and bias. International journal of epidemiology, 2013. +[46] N. J. Roese. Counterfactual thinking. Psychological bulletin, 1997. +[47] A. Rosenfeld and M. Thurston. Edge and curve detection for visual scene analysis. IEEE Transactions on computers, 1971. +[48] S. Schuster, R. Krishna, A. Chang, L. Fei-Fei, and C. D. Manning. Generating semantically precise scene graphs from textual descriptions for improved image retrieval. In Proceedings of the fourth workshop on vision and language, 2015. +[49] J. Shi, H. Zhang, and J. Li. Explainable and explicit visual reasoning over scene graphs. In CVPR, 2019. +[50] H. A. Simon. Bounded rationality. In Utility and probability. Springer, 1990. +[51] K. S. Tai, R. Socher, and C. D. Manning. Improved semantic representations from tree-structured long short-term memory networks. In ACL, 2015. +[52] H. Z. Q. S. Tan Wang, Jianqiang Huang. Visual commonsense r-cnn. In Conference on Computer Vision and Pattern Recognition, 2020. +[53] K. Tang, H. Zhang, B. Wu, W. Luo, and W. Liu. Learning to compose dynamic tree structures for visual contexts. In CVPR, 2019. +[54] D. Teney, L. Liu, and A. van den Hengel. Graph-structured representations for visual question answering. In CVPR, 2017. +[55] A. Torralba, A. A. Efros, et al. Unbiased look at dataset bias. In CVPR, 2011. +[56] N. Van Hoeck, P. D. Watson, and A. K. Barbey. Cognitive neuroscience of human counterfactual reasoning. Frontiers in human neuroscience, 2015. +[57] T. VanderWeele. Explanation in causal inference: methods for mediation and interaction. Oxford University Press, 2015. +[58] T. J. VanderWeele. A three-way decomposition of a total effect into direct, indirect, and interactive effects. Epidemiology (Cambridge, Mass.), 2013. +[59] W. Wang, R. Wang, S. Shan, and X. Chen. Exploring context and visual pattern of relationship for scene graph generation. In CVPR, 2019. + +[60] S. Woo, D. Kim, D. Cho, and I. S. Kweon. Linknet: Relational embedding for scene graph. In Advances in Neural Information Processing Systems, 2018. +[61] S. Xie, R. Girshick, P. Dollar, Z. Tu, and K. He. Aggregated residual transformations for deep neural networks. In CVPR, 2017. +[62] D. Xu, Y. Zhu, C. B. Choy, and L. Fei-Fei. Scene graph generation by iterative message passing. In CVPR, 2017. +[63] S. Yan, Y. Xiong, and D. Lin. Spatial temporal graph convolutional networks for skeleton-based action recognition. In AAAI, 2018. +[64] J. Yang, J. Lu, S. Lee, D. Batra, and D. Parikh. Graph r-cnn for scene graph generation. In ECCV, 2018. +[65] X. Yang, K. Tang, H. Zhang, and J. Cai. Auto-encoding scene graphs for image captioning. In CVPR, 2019. +[66] X. Yang, H. Zhang, and J. Cai. Deconfounded image captioning: A causal retrospect, 2020. +[67] T. Yao, Y. Pan, Y. Li, and T. Mei. Exploring visual relationship for image captioning. In ECCV, 2018. +[68] G. Yin, L. Sheng, B. Liu, N. Yu, X. Wang, J. Shao, and C. Change Loy. Zoom-net: Mining deep feature interactions for visual relationship recognition. In ECCV, 2018. +[69] R. Zellers, M. Yatskar, S. Thomson, and Y. Choi. Neural motifs: Scene graph parsing with global context. In CVPR, 2018. +[70] R. Zemel, Y. Wu, K. Swersky, T. Pitassi, and C. Dwork. Learning fair representations. In ICML, 2013. +[71] H. Zhang, Z. Kyaw, S.-F. Chang, and T.-S. Chua. Visual translation embedding network for visual relation detection. In CVPR, 2017. +[72] J. Zhang, K. J. Shih, A. Elgammal, A. Tao, and B. Catanzaro. Graphical contrastive losses for scene graph parsing. In CVPR, 2019. \ No newline at end of file diff --git a/unbiasedscenegraphgenerationfrombiasedtraining/images.zip b/unbiasedscenegraphgenerationfrombiasedtraining/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..98905b8025956784f63feaecb870c63775a85e00 --- /dev/null +++ b/unbiasedscenegraphgenerationfrombiasedtraining/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a50c8d792408e4eadf184b0863885a8d6c4e9e11ccd9a7ae6a8ca5f8e74e3a5 +size 719636 diff --git a/unbiasedscenegraphgenerationfrombiasedtraining/layout.json b/unbiasedscenegraphgenerationfrombiasedtraining/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..255e4973876567777f7ff7edcba80310d00283e8 --- /dev/null +++ b/unbiasedscenegraphgenerationfrombiasedtraining/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:378f8f17ec905e90bc27f01a499ae2c98f9b9f3127de8ebf82248bd899ef8c1c +size 458055 diff --git a/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/b7c76f82-3e45-4d4e-92f7-f4dabbeb047c_content_list.json b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/b7c76f82-3e45-4d4e-92f7-f4dabbeb047c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..311a8c16df98e8879f60e807b2b7619701bbf19d --- /dev/null +++ b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/b7c76f82-3e45-4d4e-92f7-f4dabbeb047c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adedbd56e08f821081a4027af2171f8752b09ae12f91c1c2165582e1658b92f8 +size 80297 diff --git a/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/b7c76f82-3e45-4d4e-92f7-f4dabbeb047c_model.json b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/b7c76f82-3e45-4d4e-92f7-f4dabbeb047c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..04fad58757c15d9e86fd195f162ffeb014d7c237 --- /dev/null +++ b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/b7c76f82-3e45-4d4e-92f7-f4dabbeb047c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb5b6b0d3b1f9d267e70f587b21cb5bb9c3f6aa54a1090d5e3d414d570df9dd1 +size 94600 diff --git a/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/b7c76f82-3e45-4d4e-92f7-f4dabbeb047c_origin.pdf b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/b7c76f82-3e45-4d4e-92f7-f4dabbeb047c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..11d2f7701928df466f45eb978a7af059c68317b0 --- /dev/null +++ b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/b7c76f82-3e45-4d4e-92f7-f4dabbeb047c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5d7e73dfe0be6de9c795e3237831a3e80bb58dd959d62095f3986b3b7c15105 +size 473714 diff --git a/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/full.md b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/full.md new file mode 100644 index 0000000000000000000000000000000000000000..edbf71151dde968205af4da4fabb1a77bd55eca3 --- /dev/null +++ b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/full.md @@ -0,0 +1,337 @@ +# Uncertainty-Aware CNNs for Depth Completion: Uncertainty from Beginning to End + +Abdelrahman Eldisokey Michael Felsberg Karl Holmquist Michael Persson Computer Vision Laboratory, Linkoping University, Sweden + +# Abstract + +The focus in deep learning research has been mostly to push the limits of prediction accuracy. However, this was often achieved at the cost of increased complexity, raising concerns about the interpretability and the reliability of deep networks. Recently, an increasing attention has been given to untangling the complexity of deep networks and quantifying their uncertainty for different computer vision tasks. Differently, the task of depth completion has not received enough attention despite the inherent noisy nature of depth sensors. In this work, we thus focus on modeling the uncertainty of depth data in depth completion starting from the sparse noisy input all the way to the final prediction. + +We propose a novel approach to identify disturbed measurements in the input by learning an input confidence estimator in a self-supervised manner based on the normalized convolutional neural networks (NCNNs). Further, we propose a probabilistic version of NCNNs that produces a statistically meaningful uncertainty measure for the final prediction. When we evaluate our approach on the KITTI dataset for depth completion, we outperform all the existing Bayesian Deep Learning approaches in terms of prediction accuracy, quality of the uncertainty measure, and the computational efficiency. Moreover, our small network with 670k parameters performs on-par with conventional approaches with millions of parameters. These results give strong evidence that separating the network into parallel uncertainty and prediction streams leads to state-of-the-art performance with accurate uncertainty estimates. + +# 1. Introduction + +The recent surge of deep neural networks (DNNs) has led to remarkable breakthroughs on several computer vision tasks, e.g. object classification and detection [31, 25, 22, 2], semantic segmentation [37, 30], and object tracking [6, 34]. However, this was achieved at the cost of increased model complexity, inducing new concerns such as: how do these black-box models infer their predictions? and how certain are they about these predictions? Failing to address these concerns impairs the reliability of DNNs. For instance, + +![](images/f5ce142ef9be760947d3ebef73310ec9679332ea4fdff649d89fa7c9382a7645.jpg) +Figure 1. The confidence $\mathbf{c}^0$ for the input data is usually unknown. NCNNs [8] assume binary input confidence, which leads to severe artifacts (a). We propose to learn the input confidence in a self-supervised manner, which leads to improved prediction (b). However, the output confidence $\mathbf{c}^L$ is not strongly correlated with the error $\mathbf{E}$ . Therefore, we propose a probabilistic version of NCNN that produces a proper output uncertainty measure (c). + +![](images/ff2a8f74f2b4fc5834ed0889451cfb6e2b20e0daf538d6868647f1d5c5a241d8.jpg) + +![](images/c85f0d9351c300eba306e9ab654a6d9f63f4d6627be4b714dbd9b797f0f71860.jpg) + +Huang et al. [13] showed that it is possible to fool state-of-the-art object detectors to produce false and highly certain predictions using physical and digital manipulations. Therefore, there is a compelling need for investigating interpretability and uncertainty of DNNs to be able to trust them in safety-critical environments. + +Recently, a growing attention was given towards untangling the complexity of DNNs to enhance their reliability by analyzing how they make predictions and quantifying the uncertainty of these predictions. Probabilistic approaches such as Bayesian deep learning (BDL) have contributed to this endeavor by modifying DNNs to output the parameters of a probabilistic distribution, e.g. mean and variance, which yields uncertainty information about the predictions [18]. The availability of a reliable uncertainty measure facilitates the understanding of DNNs and applying safety procedures in case of model failure or high uncertainty. Several BDL approaches were proposed for different computer vision tasks such as object classification and segmen + +tation [9, 20, 18], optical flow [15, 10], and object detection [21, 5]. All these approaches assume undisturbed dense input images, but to the best of our knowledge, there exist no statistical approach that addresses sparse problems. + +An essential task of this type is scene depth completion. Modeling uncertainty for this task is crucial due to the inherent noisy and sparse nature of depth sensors, caused by multi-path interference and depth ambiguities [11]. Previous approaches proposed to learn some intermediate confidence masks to mitigate the impact of disturbed measurements inside their networks [28, 33, 36]. However, none of these approaches has demonstrated the probabilistic validity of the intermediate confidence masks. Moreover, they do not provide an uncertainty measure for the final prediction. Therefore, it is still an open problem to fully model the uncertainty in DNN approaches to scene depth completion. + +Gustafsson et al. [12] made an attempt by evaluating two of the existing BDL approaches for dense regression problems, i.e. MC-Dropout [9] and ensembling [20], on the task of depth completion. They utilized the Sparse-to-Dense network [24] as a baseline and modified it to estimate the parameters of a Gaussian distribution. Experiments on the KITTI-Depth dataset [32] showed that both approaches can produce high-quality uncertainty maps for the final prediction, but with the prediction accuracy severely degraded compared to the baseline model. Besides, both approaches train an ensemble of the baseline model requiring multiple inferences during test time. This leads to computational and memory overhead making these approaches unsuitable for the task of depth completion in practice due to their poor prediction accuracy and computational inefficiency. + +Specifically designed for confidence-accompanyed and sparse data are the normalized convolutional neural networks (NCNNs) [7, 8]. NCNNs consist of a serialization of confidence-equipped convolution layers that make use of an input confidence map. These layers produce the output of the convolution operation as well as an output confidence that is propagated to the following layer. When applied to the problem of depth completion, input confidences at the first layer are assumed to be binary following [32], ones at valid input points and zeros otherwise. However, this assumption is problematic since depth data can be disturbed as noted in the KITTI-Depth dataset [28]. Therefore, the use of binary masks for modeling input uncertainty in NCNNs becomes inappropriate, and hinders their use as the true input confidence is unknown. Also, the output confidence from NCNNs according to [7, 8] lacks any probabilistic interpretation that qualifies it as a reliable uncertainty measure. + +# 1.1. Contributions + +In this paper, we propose two main contributions. First, we employ the inherent dependency of NCNNs on the input confidence to train an estimator for this confidence in a + +self-supervised manner. Since disturbed measurements are expected to increase the prediction error, we back-propagate the error gradients to learn the input confidence that minimizes the error. This way, the network learns to assign low confidences to disturbed measurements that increase the error and high confidences to valid measurements. This approach establishes a new methodology for handling sparse and noisy data by suppressing the disturbed measurements before feeding them to the network. As shown empirically, this approach is more interpretable and efficient than utilizing a complex black-box model that is expected to implicitly rectify for the disturbed measurements. + +Second, we derive a probabilistic NCNN (pNCNN) framework that produces meaningful uncertainty estimates in the probabilistic sense, whereas the output confidence from the standard NCNNs lacks any probabilistic characteristics. We formulate the training process as a maximum likelihood estimation problem and we derive the loss function for pNCNN training. These reformulations are the necessary extensions for fully Bayesian NCNNs. + +By applying our approach to the task of unguided depth completion on the KITTI-Depth dataset [32], we achieve a remarkably better prediction accuracy at a very low computational cost compared to the existing BDL approaches. Moreover, the quality of the uncertainty measure from our single network is better than BDL approaches with ensembles of 1-32 networks. When compared against nonstatistical approaches, we perform on par with state-of-the-art methods with millions of parameters using a significantly smaller network (670k parameters). Besides, and contrarily to state-of-the-art methods, we produce a high-quality prediction uncertainty measure aside with the prediction. Finally, we show that our approach is applicable to other sparse problems by evaluating it on multi-path interference correction [11] and sparse optical flow rectification. + +# 2. Related Work + +The task of scene depth completion is receiving an increasing attention due to the impact of depth information on different computer vision tasks. Typically, it aims to produce a dense and denoised depth map $\mathbf{y}$ from a noisy sparse input $\mathbf{x}$ . Several approaches were proposed to learn a mapping $\mathbf{y} = f(\mathbf{x})$ by exploiting different input modalities, where $f$ is a DNN. Ma et al. [24] proposed a deep regression model that combines the sparse input depth with the corresponding RGB modality. Jaritz et al. [16] evaluated different fusion schemes to combine the sparse depth with RGB images. Chen et al. [3] proposed a joint network that exploits 2D and 3D representations for the depth data. The key similarity between these approaches is that they all perform very well in terms of prediction accuracy and they implicitly handle disturbed measurements in the network. Nonetheless, none of these methods considered modeling + +the uncertainty of the data or the prediction. + +Recently, several approaches promoted the use of confidences to filter out noisy predictions within the network. Qui et al. [28] learned confidence masks from RGB images to mask out noisy depth measurements at occluded regions. Gansbeke et al. [33] proposed the use of confidences to fuse two network streams utilizing sparse depth and RGB images respectively. Similarly, Xu et al. [36] predict a confidence mask that is used to mitigate the impact of noisy measurements on different components of their network. However, none of these methods provided any prediction uncertainty measure for the final prediction. + +This was addressed by another approach that utilizes confidence and provides an output confidence for the final prediction. Normalized convolutional neural networks (NCNNs) [7, 8] take sparse depth $\mathbf{x}$ and a confidence mask $\mathbf{c}^0$ as input, propagate the confidence, and produce a dense output $\mathbf{y}$ as well as an output confidence map $\mathbf{c}^L$ , i.e., $(\mathbf{y},\mathbf{c}^L) = f(\mathbf{x},\mathbf{c}^0)$ , for a DNN with $L$ layers. However, since the input confidence is unknown, a binary input confidence $\mathbf{c}^0$ is assumed, which is problematic in case of disturbed input as shown in Figure (1a). Further, the output confidence $\mathbf{c}^L$ has no probabilistic interpretation and shows no significant correlation with the prediction error. + +To address these challenges, we look at the problem from a different perspective. We propose to learn the input confidence from the disturbed measurements by employing the confidence propagation property of NCNNs. We attach a network $h$ to a NCNN and we train them end-to-end to learn the input confidence that minimizes the prediction error, i.e., $(\mathbf{y},\mathbf{c}^{\mathbf{L}}) = f(\mathbf{x},h(\mathbf{x}))$ . Further, to produce accurate uncertainty measure for the final prediction, we derive a probabilistic version of the NCNNs and we formulate the training as a maximum likelihood problem. When our proposed approach is evaluated on the KITTI-Depth dataset [32], it performs on par with state-of-the-art approaches with millions of parameters using a significantly smaller network, while providing a highly accurate uncertainty measure for the final prediction. In contrast to BDL approaches in [12], we achieve excellent uncertainty estimation without sacrificing prediction accuracy or computational efficiency. + +The rest of the paper is organized as follows. We briefly describe the method of NCNNs in 3.1 and 3.2, and our proposed approach for learning the input confidence in section 3.3. Afterwards, we introduce a probabilistic version of NCNNs, derive the loss for training, and describe our architecture in section 4. Experiments and analysis are given in section 5. Finally, we conclude the paper in section 6. + +# 3. Self-supervised Input Confidence Learning + +The signal/confidence philosophy [19] promotes the separation between the signal and its confidence for efficiently handling noisy and sparse signals. For example, this sep + +aration allows differentiating missing signal points with no information from zero-valued valid points. The normalized convolution [19] is one approach that follows the this philosophy to perform the convolution operation. + +For confidence-equipped signals, the normalized convolution performs convolution using only the confident points of the signal, while estimating the non-confident ones from their vicinity using some applicability function. This prevents noisy and missing measurements from disturbing the calculations. In this section, we give a brief description of normalized convolution and the trainable normalized convolution layer that can estimate an optimal applicability [7, 8]. Subsequently, we propose a novel approach to learn the input confidence in a self-supervised manner. + +Throughout the paper, we assume a global signal $\mathcal{V}$ with a finite size $N$ that is convolved in a sliding window fashion. At each point in the signal $y_{i}$ , a local signal $\mathbf{y}$ of size $n$ constitutes the neighborhood at this point. The local signal $\mathbf{y}$ will be referred to as the signal, and $y_{i}$ will be referred to as the signal center. + +# 3.1. The Normalized Convolution + +The fundamental idea of the normalized convolution is to project the confidence-equipped signal $\mathbf{y} \in \mathbb{C}^n$ to a new subspace spanned by a set of basis functions $\{\mathbf{b}_j\}_{j=0}^m$ using only the confident parts of the signal. Afterwards, the full signal is reconstructed from this subspace, where the nonconfident parts are interpolated from their vicinity using a weighting kernel denoted as the applicability function. The confidence is provided as non-negative real vector $\mathbf{c} \in \mathbb{R}_+^n$ that has the same length as the signal $\mathbf{y}$ , while the applicability $\mathbf{a} \in \mathbb{R}_+^n$ is usually chosen as some low-pass filter. + +If we arrange the basis functions into the columns of a matrix $\mathbf{B}$ , then the image of the signal under the subspace spanned by the basis is obtained as $\mathbf{y} = \mathbf{Br}$ , where $\mathbf{r}$ is a vector of coordinates. These coordinates can be estimated from a weighted least-squares problem (WLS) between the signal $\mathbf{y}$ and the image of it under the new basis: + +$$ +\hat {\mathbf {r}} _ {\mathrm {W L S}} = \arg \min _ {\mathbf {r} \in \mathbb {C} ^ {m}} \| \mathbf {B r} - \mathbf {y} \| _ {\mathbf {W}}, \tag {1} +$$ + +where the weights matrix $\mathbf{W}$ is a product of $\mathbf{W}_{\mathbf{a}} = \mathrm{diag}(\mathbf{a})$ and $\mathbf{W}_{\mathbf{c}} = \mathrm{diag}(\mathbf{c})$ . The WLS solution is given as [19]: + +$$ +\hat {\mathbf {r}} _ {\mathrm {W L S}} = \underbrace {\left(\mathbf {B} ^ {*} \mathbf {W} _ {\mathbf {a}} \mathbf {W} _ {\mathbf {c}} \mathbf {B}\right) ^ {- 1}} _ {\text {R e c o n s t r u c t}} \underbrace {\mathbf {B} ^ {*} \mathbf {W} _ {\mathbf {a}} \mathbf {W} _ {\mathbf {c}} \mathbf {y}} _ {\text {P r o j e c t}}. \tag {2} +$$ + +Finally, the WLS solution $\hat{\mathbf{r}}_{\mathrm{WLS}}$ can be used to approximate the signal under the new basis as: + +$$ +\hat {\mathbf {y}} = \mathbf {B} \hat {\mathbf {r}} _ {\mathrm {W L S}}. \tag {3} +$$ + +# 3.2. Normalized Convolutional Neural Networks + +In normalized convolution, the applicability is chosen manually. Eldesokey et al. [8] proposed a normalized convolutional neural network layer (NCNN) that utilized the + +![](images/48f0eaaa2f94c11d39315c7c30025bb3a29af798a990b8654147a5d3fb01623c.jpg) +Figure 2. An overview of network architecture to predict a denoised signal $\mathcal{V}$ from a disturbed signal $\hat{\mathcal{V}}$ . We show the pipeline for a single observation $y_{i}$ of the whole signal $\mathcal{V}$ . Our contributions are described in sections 3.3, 4.2, and 4.3. + +standard back-propagation in DNNs to learn the optimal applicability function $\mathbf{a}$ for a given dataset, while assuming a binary input confidence. This was achieved by using the naive basis in (2), i.e. $\mathbf{B} = \mathbf{1}_n$ : + +$$ +\hat {r} _ {i} = \left(\mathbf {1} _ {n} ^ {*} \mathbf {W} _ {\mathbf {a}} \mathbf {W} _ {\mathbf {c}} \mathbf {1} _ {n}\right) ^ {- 1} \mathbf {1} _ {n} ^ {*} \mathbf {W} _ {\mathbf {a}} \mathbf {W} _ {\mathbf {c}} \mathbf {y} = \frac {\langle \mathbf {a} | (\mathbf {y} \odot \mathbf {c}) \rangle}{\langle \mathbf {a} | \mathbf {c} \rangle}, \tag {4} +$$ + +where $\mathbf{1}_n$ is a vector of ones, $\odot$ is the Hadamard product, $\langle .|.\rangle$ is the scalar product, $\hat{r}_i$ is a scalar which is equivalent to the estimated value at the signal center $\hat{y}_i$ . They proposed to propagate the confidence from the NCNN layer as: + +$$ +\hat {c} _ {i} = \frac {\langle \mathbf {a} | \mathbf {c} \rangle}{\langle \mathbf {1} _ {n} | \mathbf {a} \rangle}, \tag {5} +$$ + +where the output confidence from one layer is the input confidence to the next layer. + +# 3.3. Self-Supervised Input Confidence Estimation using NCNNs + +The assumption of binary input confidences adopted by [7, 8] can be problematic in real datasets. An example is the KITTI-Depth dataset [32], where some of the input values do not match the groundtruth due to LiDAR projection errors (shown in Figure 4 top). In this case, a binary input confidence would lead to artifacts in the output as NCNNs are dependent on the input confidence as shown in the calculations of (4). This dependency of the outputs on the input confidences facilitates learning the confidences. The inclusion of the input confidences in the calculations of the output from each layer indicates that the loss of the network would constitute gradients with respect to these confidences. Therefore, we can employ these gradients to learn input confidences that minimize the loss function. + +We propose to use an input confidence estimation network that receives the input data and produces an estimate + +for the input confidence that is fed to the first layer of the NCNN. This network is trained end-to-end with the NCNN and the error gradients from the NCNN are back-propagated to the confidence estimation network, allowing it to learn the input confidence that minimizes the overall prediction error. We use a compact UNet [29] for the confidence estimation network with a Softplus activation at the final layer that will produce valid confidence values in the interval $[0,\infty[$ . The pipeline is illustrated in Figure 2 (upper part). + +# 4. Probabilistic NCNNs + +Figure (1b) shows an example of the output confidence from the last NCNN layer when we estimate the input confidences using our proposed approach from the previous section. The figure shows that the output confidences do not exhibit a proper uncertainty measure that is strongly correlated with the error. + +To obtain proper uncertainties from NCNNs, we introduce a probabilistic version of NCNNs by deriving the connection between the normalized convolution and statistical least-squares approaches. Then, we utilize this connection to produce reliable uncertainties with probabilistic characteristics. Finally, we apply the proposed theory to NCNNs and we derive a loss function for training them to produce accurate uncertainties. + +# 4.1. Connection between NCNN and Generalized Least-Squares + +In ordinary least-squares (OLS) problems, constant variance is assumed for all observations of the signal. Generalized least-squares (GLS), on the other hand, offers more flexibility to handle individual variance per observation. The weighted-least squares problem in (2) can be viewed as a special case of the GLS, where observations are heteroskedastic with unequal noise levels. + +Assume the image of the signal under the subspace $\mathbf{B}$ is defined as $\mathbf{y} = \mathbf{Br} + \mathbf{e}$ , where $\mathbf{e}$ is a random noise variable with zero mean and variance $\sigma^2\mathbf{V}$ . This variance models the heteroscedastic uncertainty of the observations in the signal, where $\sigma^2$ is global for each signal, and $\mathbf{V}$ is a positive definite matrix describing the covariance between the observations. The GLS solution to this problem reads [1]: + +$$ +\hat {\mathbf {r}} _ {\mathrm {G L S}} = \left(\mathbf {B} ^ {*} \mathbf {V} ^ {- 1} \mathbf {B}\right) ^ {- 1} \mathbf {B} ^ {*} \mathbf {V} ^ {- 1} \mathbf {y}. \tag {6} +$$ + +When comparing the two solutions in (2) and (6), they are only equivalent if $\mathbf{V}^{-1}$ is diagonal, which leads to $\mathbf{V} = (\mathbf{W}_{\mathbf{a}}\mathbf{W}_{\mathbf{c}})^{-1}$ . The diagonality of the covariance matrix indicates that different samples of the signal are independent and have different variances depending on the confidence and the applicability function. + +We utilize the GLS solution $\hat{\mathbf{r}}_{\mathrm{GLS}}$ to estimate the signal similar to (3) as $\hat{\mathbf{y}} = \mathbf{B}\hat{\mathbf{r}}_{\mathrm{GLS}}$ . The uncertainty of $\hat{\mathbf{y}}$ can be estimated as: + +$$ +\begin{array}{l} \operatorname {c o v} (\hat {\mathbf {y}}) = \operatorname {c o v} (\mathbf {B} \hat {\mathbf {r}} _ {\mathrm {G L S}}) = \mathbf {B} \operatorname {c o v} (\hat {\mathbf {r}} _ {\mathrm {G L S}}) \mathbf {B} ^ {*} \\ = \sigma^ {2} \mathbf {B} \left(\mathbf {B} ^ {*} \mathbf {V} ^ {- 1} \mathbf {B}\right) ^ {- 1} \mathbf {B} ^ {*} \tag {7} \\ = \sigma^ {2} \mathbf {B} (\mathbf {B} ^ {*} \mathbf {W _ {a}} \mathbf {W _ {c}} \mathbf {B}) ^ {- 1} \mathbf {B} ^ {*}. \\ \end{array} +$$ + +Note that $\mathbf{W}_{\mathbf{a}}$ and $\mathbf{W}_{\mathbf{c}}$ are non-stochastic, where the former is estimated during NCNN training and the latter can be learned using our proposed approach in section 3.3. On the other hand, $\sigma^2$ is unknown and needs to be estimated. + +# 4.2. Output Uncertainty for NCNNs + +In case of NCNNs with the naïve basis $\mathbf{B} = \mathbf{1}_n$ , the uncertainty measure in (7) simplifies to: + +$$ +\begin{array}{l} \operatorname {c o v} (\hat {\mathbf {y}}) = \operatorname {c o v} \left(\mathbf {1} _ {n} \hat {r}\right) = \sigma^ {2} \mathbf {1} _ {n} \left(\mathbf {1} _ {n} ^ {*} \mathbf {W} _ {\mathbf {a}} \mathbf {W} _ {\mathbf {c}} \mathbf {1} _ {n}\right) ^ {- 1} \mathbf {1} _ {n} ^ {*} \\ = \mathbf {1} _ {n} \frac {\sigma^ {2}}{\langle \mathbf {a} | \mathbf {c} \rangle} \mathbf {1} _ {n} ^ {*}. \tag {8} \\ \end{array} +$$ + +This indicates an equal uncertainty for the whole neighborhood, but since we are only interested in signal center $\hat{y}_i$ , (8) reduces to: + +$$ +\operatorname {v a r} \left(\hat {y} _ {i}\right) = \frac {\sigma_ {i} ^ {2}}{\langle \mathbf {a} | \mathbf {c} \rangle}. \tag {9} +$$ + +It is evident that the output confidence described in (5) disregards the stochastic noise variance $\sigma_i^2$ . However, to obtain a proper uncertainty measure, this variance needs to be incorporated in the output confidence. We propose to estimate the noise variance $\sigma_i^2$ from the output confidence of the last NCNN layer by means of a noise variance estimation network as illustrated in Figure 2. To achieve this, we need a loss function that allows training the proposed framework. + +# 4.3. The Loss Function for Probabilistic NCNNs + +We consider each point $y_{i}$ in the global signal $\mathcal{V}$ , where the neighborhood at this point is the local signal $\mathbf{y}$ . This local signal can be represented under some basis as $\hat{\mathbf{y}} = \mathbf{B}\hat{\mathbf{r}}$ , where the estimated coordinates $\hat{\mathbf{r}}$ are calculated from (6,2). We assume that the estimate of the signal follows a multivariate normal distribution $\hat{\mathbf{y}} \sim \mathcal{N}_m(\hat{\mathbf{B}}\hat{\mathbf{r}}, \sigma^2\mathbf{B}(\mathbf{B}^*\mathbf{W}_{\mathbf{a}}\mathbf{W}_{\mathbf{c}}\mathbf{B})^{-1}\mathbf{B}^*)$ where the variance is defined in (7). In case of the naive basis, we will have a univariate normal distribution $\hat{y}_i \sim \mathcal{N}(\hat{r}_i, \sigma_i^2 / \langle \mathbf{a}|\mathbf{c}\rangle)$ , where the variance is defined in (9). More formally, a NCNN outputs the mean $\hat{r}_i^L$ of the normal distribution around $\hat{y}_i$ , and the scalar product $\langle \mathbf{a}|\mathbf{c}\rangle$ in the denominator of the variance. Yet, the noise variance $\sigma^2$ needs to be estimated to comply with the definition in (9). + +We denote the variance term as $s_i = \sigma_i^2 / \langle \mathbf{a} | \mathbf{c} \rangle$ , where $\mathbf{a}$ and $\mathbf{c}$ are the applicability and the output confidence from the last NCNN layer. The least squares solution in (4) can be formulated as a maximum likelihood problem of a Gaussian error model for the last NCNN layer $L$ : + +$$ +l (\mathbf {w}) = \frac {1}{\sqrt {2 \pi s _ {i}}} \exp \left(- \frac {\| y _ {i} - \hat {r} _ {i} ^ {L} \| ^ {2}}{2 s _ {i}}\right), \tag {10} +$$ + +where $\mathbf{w}$ denotes the network parameters, and $\hat{r}_i^L$ is calculated based on (4). By taking log likelihood of (10) instead, we obtain: + +$$ +L (\mathbf {w}) = - \frac {1}{2} \log (2 \pi) - \frac {1}{2} \log \left(s _ {i}\right) - \frac {\left\| y _ {i} - \hat {r} _ {i} ^ {L} \right\| ^ {2}}{2 s _ {i}}. \tag {11} +$$ + +The first term is a constant and is ignored, and the cost function is defined as minimizing the negative log likelihood: + +$$ +C (\mathbf {w}) = \frac {1}{N} \sum_ {i = 1} ^ {N} \underbrace {\frac {\left\| y _ {i} - \hat {r} _ {i} ^ {L} \right\| ^ {2}}{s _ {i}}} _ {\text {D a t a t e r m}} + \underbrace {\log \left(s _ {i}\right)} _ {\text {R e g l . t e r m}}, \tag {12} +$$ + +where the scalar $1/2$ has been discarded. This cost function shares similarity with the aleatoric uncertainty loss proposed in [18]. The difference is that $s_i$ in our case depicts an uncertainty measure that encodes observation noise variance and the output confidence from NCNN, while in [18], it is the variance of the noise. Note that this cost function can be derived using any error model from the exponential family, e.g. Laplace distribution as in [15]. Next, we show the architecture design that is used for training our proposed probabilistic approach. + +# 4.4. Probabilistic NCNN Architecture + +Given a dataset that contains undisturbed data $\mathcal{V}$ as groundtruth and a disturbed version $\dot{\mathcal{V}}$ as input, we aim to train a network that produces the clean data given the disturbed one. An illustration for our full pipeline is shown + +in Figure 2. The first component estimates the input confidence from the disturbed input and feed both of them to the NCNN network. The output confidence from the last NCNN layer is fed to another compact UNet to estimate the noise parameter $\sigma_i^2$ and to produce $s_i$ in (12). Finally, the prediction from the NCNN network and the estimated uncertainty $s_i$ are fed to the loss. + +Note that the noise variance estimation network takes only the output confidence from the NCNN as input, contrarily to existing approaches that estimate the uncertainty from the final prediction [12, 15]. This indicates that our. +confidences can efficiently encode the uncertainty information, which is also demonstrated in the experiments section. + +# 5. Experiments + +To demonstrate the capabilities of our proposed approach, we evaluate it on the KITTI-Depth dataset [32] for the task of unguided depth completion (no RGB guidance is used). We first compare against Bayesian Deep Learning approaches, e.g. MC-Dropout [9] and ensembling [20], in terms of prediction accuracy and the quality of the uncertainty measure. Then, we show comparison against the conventional non-statistical approaches. Afterwards, we perform an ablation study for different components of our pipeline and we experiment with an ensemble of our proposed network. Finally, we demonstrate the generalization capabilities of our approach by evaluating it on multi-path interference correction [11] and optical flow rectification. The source code is available on Github1. + +# 5.1. Experimental Setup + +Our pipeline is illustrated in Figure 2 and more details are given in the supplementary materials. We evaluate three variations of our network: our network where only the input confidence estimation part that is trained using the L1 or the L2 norm (NCNN-Conf), our full network trained with the proposed loss in (12) ( $pNCNN$ ), and our full network trained with a modified version of the loss in (12), where we apply an exponential function to $s_i$ in the data term ( $pNCNN-Exp$ ). This modification is to robustify our loss to outliers violating the presumed Gaussian error model for the data term. Training was performed using the Adam optimizer with an initial learning rate of 0.01 that is decayed with a factor of $10^{-1}$ every 3 epochs. + +Evaluation Metrics We use the following two measures: + +Prediction Error We use the error metrics from the KITTI-Depth [32] such as Mean Average Error (MAE), Root Mean Square Error (RMSE) and their inverses. + +Quality of Uncertainty We use the sparsitification error plots and the area under sparsification error plots (AUSE) [15] as a measure for the quality of the uncertainty. + +![](images/936096d5b5a38e4df8cae1762b817a6a2abaecf51549cd59b4102b55cd8deaa1.jpg) +Figure 3. A comparison between statistical approaches in terms of RMSE and AUSE metrics where bottom-left is better. The two variations of our approach outperforms other methods w.r.t. RMSE and $pNCNN$ trained with (12) produces the best uncertainty measure. Note that NCNN-Conf-L2 only achieves AUSE of 0.7. + +# 5.2. Results Compared to Statistical Methods + +Gustafsson et al. [12] evaluated the MC-Dropout [9] and ensembling [20] by modifying the head of the Sparse-to-Dense (S2D) [24] network to output the parameters of a Gaussian distribution. They evaluated an ensemble of 1-32 instances of S2D with 26M parameters each and taking the mean of these instances for the final prediction. Note that their network utilizes both depth and RGB images, while our approach consists of a single network that is fully unguided and uses only depth data. + +Figure 3 shows a two-metric comparison with respect to AUSE and RMSE. Our NCNN-Conf performs best in terms of RMSE, while it performs worst in terms of AUSE. On the other hand, our full network trained with the proposed loss, $pNCNN$ , produces the best uncertainty measure with an AUSE of 0.053 outperforming an ensemble of 32 networks. Moreover, it achieves a significantly lower RMSE than MC-Dropout and ensembling. However, it performs inferior to NCNN-Conf in terms of RMSE with a moderate gap. The variation of our network that is trained with a modified loss, $pNCNN-Exp$ , closes this gap and performs on-par with NCNN-Conf in terms of RMSE with a minor degradation of AUSE compared to $pNCNN$ . + +# 5.3. Results Compared to Non-Statistical Methods + +We also compare our proposed approach against the nonstatistical unguided approaches. Table 1 summarizes the results on the test set of the KITTI-Depth dataset. Our NCNN-Conf-L1 outperforms all other methods on three out of four metrics when compared individually, except for Spade, where we are better on two metrics and on-par on one metric. Note the improvement of our approach over the standalone NCNN, where we achieve a performance boost of + +
MAE [mm]RMSE [mm]iMAE [1/km]iRMSE [1/km]#P
SparseConv [32]481.271601.331.784.9425k
ADNN [4]439.481325.373.1959.391.7k
NCNN [7]360.281268.221.524.670.5k
S2D [24]288.64954.361.353.2126M
HMS-Net [14]258.48937.481.142.93-
SDC [33]249.11922.931.072.802.5M
Spade [17]248.321035.290.982.605.3M
NCNN-Conf-L1228.53988.571.002.71330k
NCNN-Conf-L2258.68954.341.173.40330k
pNCNN-Exp251.77960.051.053.37670k
+ +$\sim 45\%$ by providing more accurate input confidences. Our probabilistic model trained using a Gaussian error model and a Laplace error model, $pNCNN-Exp$ trained with the modified loss performs equally good to the NCNN-Conf-L2, but additionally providing proper output uncertainties. + +# 5.4. Ablation Study + +First we show the impact of each component of our proposed network on a qualitative example from the KITTI-Depth dataset. Figure 4 shows an example where the input measurements do not coincide with the groundtruth. The standard NCNN assigns 1-confidence to all measurements, which results in a corrupted prediction (first row). When we apply our input confidence estimation, the disturbed measurements are successfully identified and assigned zero confidence (second row). However, the output confidence is almost identical to the input confidence and shows no strong correlation with the accuracy. When we apply our full pipeline, the disturbed measurements are identified and the output uncertainty becomes highly correlated with the prediction error (third row). + +Next, we show in Table 2 the impact of modifying different components of our pipeline. When the confidence estimation is discarded in $w/o$ conf-est and binary input confidence is used, the RMSE is degraded, while the network still manages to achieve good AUSE. Similarly, when the noise variance estimation network is discarded in $w/o$ var-est, the RMSE is severely degraded as the input confidence estimation network tries to make up for the absence of the variance estimation network. When the final prediction from the NCNN is fed along with the output confidence to the noise variance estimation network in $w$ depth-pred, no improvement is gained in terms of AUSE. This demonstrates that our uncertainty measure efficiently encode the uncertainty information in the NCNN confidence stream + +![](images/9ee72be8b8b7d6fe50f88209bc05a2fd98492f16baa2d9aecb3180eafcfebc76.jpg) + +![](images/652b1f465705db93f0e994a6e726a148e2d4aae07b477be9f7d46188141850a6.jpg) + +![](images/a06d21d811c027f07eea8c72ca9c52978475a50a077634f1d0604b0e6872dd93.jpg) +Figure 4. A qualitative example from the KITTI-Depth dataset showing the impact of each component of our proposed approach. First row is the standard NCNN, the second is NCNN-Conf-L2, and the third is pNCNN. + +Table 1. Quantitative results on the test set of the KITTI-Depth for unguided depth completion. #P is the number of parameters. + +
RMSEMAEAUSE
pNCNN1237.65283.410.055
- w/o conf-est1540.00405.000.058
- w/o var-est1703.50604.100.123
- w depth-pred1215.64292.680.055
- w Laplace-loss1272.32248.260.089
+ +Table 2. The results for the ablation study when trained on a subset of the training set evaluated on the selected validation set of the KITTI-Depth dataset. + +without looking at the prediction. Finally, when we employ a Laplace error model for the loss in $w$ Laplace-loss, i.e., the L1 norm for residuals, the MAE improves, while AUSE is degraded since it is calculated based on the RMSE. + +# 5.5. Ensemble of pNCNN + +To examine whether our probabilistic approach can be extended to a fully Bayesian approach, we form an ensemble of four $pNCNN$ network that were initialized randomly and trained on random subset of the KITTI-Depth dataset. We evaluate multiple fusion approaches which are summarized in Table 3. Fusion by selecting the most confident pixel from each network, maxConf, achieves the best results, outperforming taking the mean, which is commonly used. Taking a weighted mean using confidences, wMean, or a maximum likelihood estimation, MLE, also gives better results than the standard mean. This demonstrated the potential of using the proposed output confidences in more sophisticated fusion schemes. + +
RMSEMAEFusionRMSEMAE
Net-11337.5290.5Mean1287.3290.5
Net-21325.1303.1wMean1261.3285.9
Net-31315.1296.9maxConf1260.7283.8
Net-41321.1288.3MLE1264.1282.4
+ +# 5.6. Mutli-Path Interference (MPI) Correction + +To demonstrate the generalization capabilities of our approach on other kinds of noise, we evaluate it on depth data from a Time-of-Flight (ToF) camera, i.e. Kinect2, that suffers from MPI. We use the FLAT dataset [11] for this purpose which provides raw measurements for three different frequencies and phases. We use the libfreenect2 [35] to calculate the depth from the measurements and we compare against applying the bilateral filtering on the noisy depth. + +Table 4 summarizes the results, where we outperform the Bilateral filtering with a significant margin in terms of RMSE error when evaluated both on noisy and clean data with no MPI. Bilateral filtering on the other hand performs worse than doing no processing as it assigns zeros to pixels close to edges. When edges are not considered for evaluation, bilateral filtering improves the results slightly, but is outperformed by our approach. + +# 5.7. Sparse Optical Flow Rectification + +We generate the input flow by applying the Lucas-Kanade method [23] to pairs of images from driving sequences. The groundtruth is produced by geometrical verification over several frames under a multiple rigid body assumption [27]. Figure 5 shows an example for rectifying the corrupted measurement and densifying the flow field. More results are given in the supplementary materials. + +# 5.8. What happens if the input is undisturbed? + +An essential question is how our confidence estimation network will perform if the input data is not disturbed? To + +Table 3. Fusion schemes for an ensemble of $pNCNN$ trained on a subset of the KITTI-Depth and evaluated on the selected validation set. MLE refers to Maximum Likelihood Estimation. + +
RMSE [mm]OursBiateralNo-Proc
No-MPI231444415
MPI283429449
No-MPI-Masked175263288
MPI-Masked205282299
+ +![](images/e0a9192b69948aa6c6a1f8881a3eb77e3924f14505506f439f1a910ea5138ead.jpg) + +![](images/b44449d528dac2cd325156d04cab27794f35f3efe9baef6713819ef9db41149d.jpg) +Figure 5. Qualitative example for optical flow outliers rejection. In right-bottom order, RGB frame, raw flow input, groundtruth flow, and estimated flow. + +![](images/90454465bcc133ad7f1b2e84ff061a6c706b6be6e68d5855b2dc74e94332c4e6.jpg) + +![](images/c1426234e435a62307c006a8b670d5356271dcbd62b9cf331367b20385242777.jpg) + +![](images/7f529f9dd4fbac1d97819cd71d6db5333cce17d458bfc26fe70746af52bb2a92.jpg) +Figure 6. A qualitative example from the NYU dataset [26]. Top-to-bottom: groundtruth, NCNN [7], NCNN-Conf. + +Table 4. The RMSE error in millimeters for Multi-Path Interference (MPI) correction on the FLAT dataset [11]. No-Proc refers to evaluating the depth without any processing. The masked version disregards edges from the evaluation. + +
RMSEMAE
NCNN [7]0.1650.07
NCNN-Conf0.1350.05
pNCNN0.1440.06
+ +Figure 7. Quantitative results on the NYU dataset [26] in meters. + +answer this question, we train our network NCNN-Conf and pNCNN on the NYU dataset [26], where the input is sampled from the groundtruth depth. We use 1000 depth points sampled uniformly with a sparsity level of $0.6\%$ . Figure 6 and Table 7 show that both our methods surprisingly improves the results compared to the standalone NCNN [7]. This is a result of allowing the confidence estimation network to assign proper confidences to points based on their proximity to edges similar to non-linear filtering. This leads to sharper edges and better reconstruction of objects. + +# 6. Conclusion + +We proposed a self-supervised approach for estimating the input confidence for sparse data based on the NCNNs. We also introduced a probabilistic version of NCNNs that enable the to output meaningful uncertainty measures. Experiments on the KITTI dataset for unguided depth completion showed that our small network with 670k parameters achieves state-of-the-art results in terms of prediction accuracy and it provides an accurate uncertainty measure. When compared against the existing probabilistic method for dense problems, our proposed approach outperforms all of them in terms of the prediction accuracy, the quality of the uncertainty measure, and the computational efficiency. Moreover, we showed that our approach can be applied to other sparse problems as well. These results demonstrate the gains from adhering to the signal/uncertainty philosophy compared to conventional black-box models. + +Acknowledgments: This work was supported by the Wallenberg AI, Autonomous Systems and Software Program (WASP) and Swedish Research Council grant 2018-04673. + +# References + +[1] Alexander C Aitken. Iv.on least squares and linear combination of observations. Proceedings of the Royal Society of Edinburgh, 55:42-48, 1936. +[2] Yue Cao, Jiarui Xu, Stephen Lin, Fangyun Wei, and Han Hu. Gcnet: Non-local networks meet squeeze-excitation networks and beyond. arXiv preprint arXiv:1904.11492, 2019. +[3] Yun Chen, Bin Yang, Ming Liang, and Raquel Urtasun. Learning joint 2d-3d representations for depth completion. In ICCV, 2019. +[4] Nathaniel Chodosh, Chaoyang Wang, and Simon Lucey. Deep Convolutional Compressed Sensing for LiDAR Depth Completion. mar 2018. +[5] Jiwoong Choi, Dayoung Chun, Hyun Kim, and Hyuk-Jae Lee. Gaussian yolov3: An accurate and fast object detector using localization uncertainty for autonomous driving. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[6] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. Atom: Accurate tracking by overlap maximization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4660-4669, 2019. +[7] Abdelrahman Eldisokey, Michael Felsberg, and Fahad Shahbaz Khan. Propagating confidence through cnns for sparse data regression. In The British Machine Vision Conference (BMVC), Northumbria University, Newcastle upon Tyne, England, UK, 3-6 September, 2018, 2018. +[8] Abdelrahman Eldisokey, Michael Felsberg, and Fahad Shahbaz Khan. Confidence propagation through cnns for guided sparse depth regression. IEEE transactions on pattern analysis and machine intelligence, 2019. +[9] Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pages 1050-1059, 2016. +[10] Jochen Gast and Stefan Roth. Lightweight probabilistic deep networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3369-3378, 2018. +[11] Qi Guo, Iuri Frosio, Orazio Gallo, Todd Zickler, and Jan Kautz. Tackling 3d tof artifacts through learning and the flat dataset. In Proceedings of the European Conference on Computer Vision (ECCV), pages 368-383, 2018. +[12] Fredrik K Gustafsson, Martin Danelljan, and Thomas B Schon. Evaluating scalable bayesian deep learning methods for robust computer vision. arXiv preprint arXiv:1906.01620, 2019. +[13] Lifeng Huang, Chengying Gao, Yuyin Zhou, Changqing Zou, Cihang Xie, Alan Yuille, and Ning Liu. Upc: Learning universal physical camouflage attacks on object detectors, 2019. +[14] Z. Huang, J. Fan, S. Yi, X. Wang, and H. Li. HMS-Net: Hierarchical Multi-scale Sparsity-invariant Network for Sparse Depth Completion. ArXiv e-prints, Aug. 2018. +[15] Eddy Ilg, Ozgun Cicek, Silvio Galesso, Aaron Klein, Osama Makansi, Frank Hutter, and Thomas Brox. Uncertainty es + +timates and multi-hypotheses networks for optical flow. In Proceedings of the European Conference on Computer Vision (ECCV), pages 652-667, 2018. +[16] Maximilian Jaritz, Raoul De Charette, Emilie Wirbel, Xavier Perrotton, and Fawzi Nashashibi. Sparse and dense data with cnns: Depth completion and semantic segmentation. In 2018 International Conference on 3D Vision (3DV), pages 52-60. IEEE, 2018. +[17] Maximilian Jaritz, Raoul de Charette, Emilie Wirbel, Xavier Perrotton, and Fawzi Nashashibi. Sparse and dense data with cnns: Depth completion and semantic segmentation. arXiv preprint arXiv:1808.00769, 2018. +[18] Alex Kendall and Yarin Gal. What uncertainties do we need in bayesian deep learning for computer vision? In Advances in neural information processing systems, pages 5574-5584, 2017. +[19] Hans Knutsson and Carl-Fredrik Westin. Normalized and differential convolution. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 515-523. IEEE, 1993. +[20] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In Advances in Neural Information Processing Systems, pages 6402-6413, 2017. +[21] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In Proceedings of the European Conference on Computer Vision (ECCV), pages 734-750, 2018. +[22] Yanghao Li, Yuntao Chen, Naiyan Wang, and Zhaoxiang Zhang. Scale-aware trident networks for object detection. arXiv preprint arXiv:1901.01892, 2019. +[23] Bruce D Lucas, Takeo Kanade, et al. An iterative image registration technique with an application to stereo vision. 1981. +[24] Fangchang Ma, Guilherme Venturelli Cavalheiro, and Sertac Karaman. Self-supervised sparse-to-dense: self-supervised depth completion from lidar and monocular camera. In 2019 International Conference on Robotics and Automation (ICRA), pages 3288-3295. IEEE, 2019. +[25] Dhruv Mahajan, Ross Girshick, Vignesh Ramanathan, Kaiming He, Manohar Paluri, Yixuan Li, Ashwin Bharambe, and Laurens van der Maaten. Exploring the limits of weakly supervised pretraining. In Proceedings of the European Conference on Computer Vision (ECCV), pages 181-196, 2018. +[26] Pushmeet Kohli Nathan Silberman, Derek Hoiem and Rob Fergus. Indoor segmentation and support inference from rgbd images. In ECCV, 2012. +[27] Mikael Persson, Tommaso Piccini, Michael Felsberg, and Rudolf Mester. Robust stereo visual odometry from monocular techniques. In 2015 IEEE Intelligent Vehicles Symposium (IV), pages 686-691. IEEE, 2015. +[28] Jiaxiong Qiu, Zhaopeng Cui, Yinda Zhang, Xingdi Zhang, Shuaicheng Liu, Bing Zeng, and Marc Pollefeys. Deep lidar: Deep surface normal guided depth prediction for outdoor scene from sparse lidar data and single color image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3313-3322, 2019. + +[29] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241. Springer, 2015. +[30] Towaki Takikawa, David Acuna, Varun Jampani, and Sanja Fidler. Gated-scnn: Gated shape cnns for semantic segmentation. arXiv preprint arXiv:1907.05740, 2019. +[31] Hugo Touvron, Andrea Vedaldi, Matthijs Douze, and Hervé Jégou. Fixing the train-test resolution discrepancy. arXiv preprint arXiv:1906.06423, 2019. +[32] Jonas Uhrig, Nick Schneider, Lukas Schneider, Uwe Franke, Thomas Brox, and Andreas Geiger. Sparsity invariant cnns. In 2017 International Conference on 3D Vision (3DV), pages 11-20. IEEE, 2017. +[33] Wouter Van Gansbeke, Davy Neven, Bert De Brabandere, and Luc Van Gool. Sparse and noisy lidar completion with rgb guidance and uncertainty. In 2019 16th International Conference on Machine Vision Applications (MVA), pages 1-6. IEEE, 2019. +[34] Qiang Wang, Li Zhang, Luca Bertinetto, Weiming Hu, and Philip HS Torr. Fast online object tracking and segmentation: A unifying approach. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1328-1338, 2019. +[35] Lingzhu Xiang, Florian Echtler, Christian Kerl, Thiemo Wiedemeyer, Lars, hanyazou, Ryan Gordon, Francisco Facenti, laborer2008, Rich Wareham, and et al. libfreenect2: Release 0.2. Apr 2016. +[36] Yan Xu, Xinge Zhu, Jianping Shi, Guofeng Zhang, Hujun Bao, and Hongsheng Li. Depth completion from sparse lidar data with depth-normal constraints. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[37] Yi Zhu, Karan Sapra, Fitsum A Reda, Kevin J Shih, Shawn Newsam, Andrew Tao, and Bryan Catanzaro. Improving semantic segmentation via video propagation and label relaxation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8856-8865, 2019. \ No newline at end of file diff --git a/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/images.zip b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6981c6e2fb0c6bdf14390de317a720396bd3dcfe --- /dev/null +++ b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00bb56c65fd88ad834439a683a8a85f78e68d4cb3f003a3932a112df285e4a20 +size 463014 diff --git a/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/layout.json b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6402ed552187d794217c21343a7cd1de1edfe0ee --- /dev/null +++ b/uncertaintyawarecnnsfordepthcompletionuncertaintyfrombeginningtoend/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68f4e55d52087f9aac22080268770d6830af86242686375eae8399c825cc017e +size 390130 diff --git a/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/0a7addcc-a987-422c-b7d2-55b828d3ec5e_content_list.json b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/0a7addcc-a987-422c-b7d2-55b828d3ec5e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..601fed9a2ba744b162771314bb563e9bc59ac4dc --- /dev/null +++ b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/0a7addcc-a987-422c-b7d2-55b828d3ec5e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5995021faae4912ce0ff5b3731ab10be5e7ad8f71cc0074eda7f5fd726fcd97a +size 63990 diff --git a/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/0a7addcc-a987-422c-b7d2-55b828d3ec5e_model.json b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/0a7addcc-a987-422c-b7d2-55b828d3ec5e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c6e3d7887c3a0ec403e793d34bb0650fc606f41a --- /dev/null +++ b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/0a7addcc-a987-422c-b7d2-55b828d3ec5e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e50a670744fbad81e7344319dabf5cc172d7dfb1e9bc4481e3313bf508ce144 +size 78961 diff --git a/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/0a7addcc-a987-422c-b7d2-55b828d3ec5e_origin.pdf b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/0a7addcc-a987-422c-b7d2-55b828d3ec5e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..724628b2c66dca9d02f53e489b00215fef690876 --- /dev/null +++ b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/0a7addcc-a987-422c-b7d2-55b828d3ec5e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04a92a41eb0d24ea734fec35e5a40ff36fae4bb029067c453c8ebf19cacbe0fa +size 1479906 diff --git a/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/full.md b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/full.md new file mode 100644 index 0000000000000000000000000000000000000000..008d4206f62ccf36ee2b8c5031cb816ea3442771 --- /dev/null +++ b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/full.md @@ -0,0 +1,294 @@ +# Uncertainty-Aware Mesh Decoder for High Fidelity 3D Face Reconstruction + +Gun-Hee Lee $^{1}$ , Seong-Whan Lee $^{2}$ + +$^{1}$ Department of Computer and Radio Communications Engineering, Korea University, Seoul, South Korea $^{2}$ Department of Artificial Intelligence, Korea University, Seoul, South Korea + +{gunhlee, sw.lee}@korea.ac.kr + +![](images/34a48d3c4341a3240253645188a713cad1e0f2543628b7afe41e933d127df3e4.jpg) + +![](images/64a8a13e99bd0ab934b41bbcd23dfb29b62671fdce2dc7f883915bf366aee7bb.jpg) +Figure 1: We propose an uncertainty-aware mesh decoder which reconstructs high quality 3D face. Our approach successfully employs Graph CNN and GAN for mesh decoder along with an uncertainty-aware image encoder to reconstruct shape and texture in high fidelity. Our 3D face reconstruction results are best viewed in color. + +![](images/eb1005dd027927266683d3dd5a3e08b93007ed91479e1bfd06fd48b05811f12e.jpg) + +![](images/8d8cd2099e545b702585886acd9eb8c163dac51e9abd152ca6ee8aa6bf8c3994.jpg) + +![](images/17ba0f0229b5adb676468f037f9ddcd71cb0bb56910739925373f8113a57dc67.jpg) + +![](images/854e01502f4dd9204e339eb173e900075f142aebf2a0996c62984e8a5d24c41f.jpg) + +![](images/c009ca10750df1a4ee60e6aa7c0ebbfdb81c5d49c4401a9074a5139d79bfd17d.jpg) + +![](images/45d273d6429f1f154b4d1c424bd6811ffea1918f150305018eb34fd0720a5107.jpg) + +![](images/bd55d8da7e66c88f3992cd44d795282b8ed306b5157e156219e0b570ab1d2e8f.jpg) + +# Abstract + +3D Morphable Model (3DMM) is a statistical model of facial shape and texture using a set of linear basis functions. Most of the recent 3D face reconstruction methods aim to embed the 3D morphable basis functions into Deep Convolutional Neural Network (DCNN). However, balancing the requirements of strong regularization for global shape and weak regularization for high level details is still ill-posed. To address this problem, we properly control generality and specificity in terms of regularization by harnessing the power of uncertainty. Additionally, we focus on the concept of nonlinearity and find out that Graph Convolutional Neural Network (Graph CNN) and Generative Adversarial Network (GAN) are effective in reconstructing high quality 3D shapes and textures respectively. In this paper, we propose to employ (i) an uncertainty-aware encoder that presents face features as distributions and (ii) a fully nonlinear decoder model combining Graph CNN with GAN. We demonstrate how our method builds excellent high quality results and outperforms previous state-of-the-art methods on 3D face reconstruction tasks for both constrained and in-the-wild images. + +# 1. Introduction + +Reconstructing a high quality personalized 3D face can be used for many applications, including face recognition [11, 21, 16, 14, 36], facial motion capture [9] or virtual and augmented reality [34, 33]. However, estimating 3D geometry and texture from a single photograph is still a challenging problem due to the limited 3D scan data and the complex relationship of multiple physical dimensions such as illumination, reflectance, and geometry. To address the above difficulties, Blanz and Vetter [37] introduced 3DMM which relies on additional prior assumption such as constraining faces to lie in a low dimensional subspace. Since then, a lot of 3DMM based methods have been presented and showed impressive results [10, 18, 31, 13, 19, 32]. However, these methods do not generalize well beyond the restricted low dimensional subspace of the underlying linear statistical model. + +Recently, many studies have been conducted to bring the concept of DCNN to 3DMMs. This learns model directly from 2D images to better capture in-the-wild variations and increases the representation power. However, these models are still not capable of modeling high fidelity shapes and textures for in-the-wild images. The main reason is that the + +3D face reconstruction task still suffers from conflicting requirements between strong regularization for global shape and weak regularization for capturing high level details. We found the fact that we can have special regularization effect by making a change for the embedding step. Unlike recent 3D reconstruction models that use deterministic point representation in the latent feature space, we propose to employ an uncertainty-aware image encoder to inform the decoder what features from the image are uncertain. Let's take an example. When a person describes a particular face from an image, they describe only the facial characteristics of which they are confident. If the eyes are occluded as shown in Figure 2, a person will retain the characteristics of the eyes as uncertain information. As an ideal model would reconstruct confident features with high specificity and uncertain features with high generality, the concept of uncertainty [41, 40] becomes very important for 3D face reconstruction in terms of regularization. These features are also robust to a slight change in the input image (e.g. occlusion, pose or lighting) which could drop the performance for 3D face reconstruction. + +Additionally, we focus on a fully nonlinear model and find out that Graph CNN and GAN are effective in reconstructing high quality 3D shapes and textures, respectively. Graph CNN, which directly operates convolutions on non-Euclidean structures such as graphs, manifolds, and meshes, is effective for both obtaining important information from edges and reducing computational complexity. Due to these advantages, it has recently been applied to mesh datasets [30, 29, 23] including 3D face datasets [6, 42]. Meanwhile, as a texture decoder, GAN has recently been proven to be able to represent high fidelity texture and create unobserved views naturally [8]. However, they still have some problems in representing satisfactory results. + +In this paper, we propose an uncertainty-aware mesh decoder, which considers the distribution of the input face features and generates a high quality shape and texture using a unified network of Graph CNN and GAN. Along the process, we introduce a novel way to optimize the decoding process using multi-view identity loss and uncertainty-aware perceptual loss, which will further help the model to reconstruct 3D face with high fidelity. The contributions of the paper can be summarized as below: + +- We propose to employ an uncertainty-aware image encoder that considers distribution of the face features rather than a deterministic point representation for proper regularization effect. +- We present the unified decoder which combines a detailed shape from Graph CNN with a high-quality texture map from GAN. +- We propose a novel loss function which involves an uncertainty-aware perceptual loss and multi-view + +![](images/7b4986c9e4ed237494d214e061e478c43ec33fa01a98c631d9f042ea72f7d739.jpg) +Figure 2: The importance of concerning uncertainty in 3D face reconstruction. Deterministic embeddings represent face as a point estimate without considering uncertain features. + +identity loss with random projection to further improve the performance of 3D face reconstruction. + +# 2. Related Work + +The history of monocular 3D face reconstruction is quite vast where challenges in building and applying these models are still active research topics. We briefly review the flow of monocular 3D face reconstruction studies from linear to nonlinear approach. + +Linear 3DMM. The first concept of the 3DMM was built by Blanz and Vetter [37] that used the Principal Component Analysis (PCA) to represent 3D face shape and texture with linear bases. Since then, there have been many efforts to improve the 3DMM mechanism. Booth et al. [18] obtained a richer PCA model with using 10,000 facial scans. Paysan et al. [31] improved previous models with using better scanning device and replaced the previous UV space alignment by Nonrigid Iterative Closest Point for registration. Vlasic et al. [13] used a multi-linear model of 3D face meshes that separately parameterizes the space of geometric variations due to different attributes. Booth et al. [19] used the augmented model with an in-the-wild texture variations. Koppen et al. [32] introduced a Gaussian Mixture 3DMM that models the global population as a mixture of Gaussian subspace. + +Nonlinear 3DMM. To overcome the aforementioned problem, recent methods focus on nonlinear decoders to go beyond the standard 3DMMs for representation of high quality shape and texture. While both previous optimization-based and learning-based algorithms relied on 3D scan dataset to learn an image-to-parameter or imaged-to-geometry mapping [4, 17, 27], Tewari et al. [7] and Tran and Liu [24] proposed a method of learning 3DMM from 2D images in a self-supervision scheme. As the nonlinear decoder pulled up the reconstruction performance to a satisfying level, very recent studies now try to focus to reconstruct with high details. Tran et al. [26] learned additional proxies as means to side-step strong regularization for higher fidelity in 3D reconstruction. Gecer et al. [8] used + +GAN to reconstruct facial texture with high fidelity. Nevertheless, the method estimates shape with PCA and the ability to represent texture needs to be improved further. Zhou et al. [42] first proposed to employ Graph CNN for 3D face reconstruction. However, the method still has some problems in representing satisfactory results. + +In this paper, we propose an uncertainty-aware mesh decoder, which considers the distribution of the input face features and generates a high quality shape and texture using a unified network of Graph CNN and GAN. + +# 3. Proposed Method + +Our novel 3D face reconstruction approach mainly covers two challenging tasks: (i) balancing the term, generality and specificity by imposing generality for uncertain features and specificity for confident features and (ii) reconstructing high fidelity 3D face with unified decoder of Graph CNN and GAN. + +# 3.1. Uncertainty Encoder + +An ideal embedding vector $z$ for neutral shape and albedo should remain consistent for the same identity. However, given the possibility of other either external effect or noises (e.g. pose, blur, occlusion, whitening, illumination) in the input image $x$ , it is not possible to regress the consistent $z$ for all images due to an inevitable shift of the uncertain features. Inspired from the work of Shi et al. [41], we propose to employ uncertainty-aware face encoder which can inform the decoder what features from the image are uncertain. This term of uncertainty can also have a special regularization effect which a model is able reconstruct with high fidelity for confident parts and high generality for uncertain parts. + +Uncertainty Embedding. In the embedding step, we estimate a Gaussian distribution for $p(z|x_i) = \mathrm{N}\left(\mathrm{z}:\mu_i,\sigma_i^2\right)$ to represent a person's face shape and albedo, where $\mu_{i}$ is the most likely shape feature for the $i^{th}$ input and $\sigma_{i}$ is the confidence associated with the corresponding feature. Let us say that we know the $\mu$ and the $\sigma$ for the features of an image pair with same identity $(x_{i},x_{j})$ . Then, we can measure the likelihood of their sharing the same latent vector $(z_{i} = z_{j},\Delta z = 0)$ which implies that both the shape and the albedo are equal for the same identity: + +$$ +p \left(z _ {i}, z _ {j}\right) = \int p \left(z _ {i} \mid x _ {i}\right) p \left(z _ {j} \mid x _ {j}\right) \delta \left(z _ {i} - z _ {j}\right) d z _ {i} d z _ {j}, \tag {1} +$$ + +where $z_{i}$ and $z_{j}$ are the latent vector of the shape and the albedo feature of the $i^{th}$ and $j^{th}$ input respectively and the $\delta (z_{i} - z_{j})$ is a Dirac delta function. We then use log-likelihood which the solution is given: + +$$ +\begin{array}{l} \log p \left(z _ {i}, z _ {j}\right) = \\ - \frac {1}{2} \sum_ {l = 1} ^ {D} \left(\frac {\left(\mu_ {i} ^ {(l)} - \mu_ {j} ^ {(l)}\right) ^ {2}}{\sigma_ {i} ^ {2 (l)} + \sigma_ {j} ^ {2 (l)}} + \log \left(\sigma_ {i} ^ {2 (l)} + \sigma_ {j} ^ {2 (l)}\right)\right) \\ - \frac {D}{2} \log 2 \pi , \tag {2} \\ \end{array} +$$ + +where $\mu_i^{(l)}$ refers to the mean value of the $l^{th}$ feature, $\sigma_i^{2(l)}$ refers to the variance of the $l^{th}$ feature and $D$ denotes the dimensions of feature space. This function can be easily inferred from which the mean value for the difference of two Gaussian's is $\mu_{i} - \mu_{j}$ and the variance is $\sigma_i^2 +\sigma_j^2$ + +Based on this concept, we use this as a training loss to estimate the uncertainty of shape and albedo. For the training process of estimating this uncertainty value, we use a similar process as [41] proposed. We first fix the value $\mu$ , which is earned by pretraining a deterministic 3D reconstruction network without the uncertainty estimation. Then, given a set of images with the same identity, we separately train an additional network that estimates the uncertainty $\sigma$ . The uncertainty network is a branch network that shares the same input with the bottleneck layer from the encoder. An optimization criterion is used to maximize the above equation for all genuine pair $(x_i, x_j)$ , where $x_i$ and $x_j$ is the paired image of equal identity. Formally, we use the loss function to minimize + +$$ +L _ {\text {u n c e r t a i n t y}} = \frac {1}{| P |} \sum_ {(i, j) \in P} - \log p (z _ {i}, z _ {j}), \tag {3} +$$ + +where $P$ is the number of all genuine pairs. By this process, the network learns how to estimate the uncertainty $\sigma$ . We note that this special $\sigma$ value can act as an attention value for the features and be applied to the loss function. + +Expression embedding. For expression embedding, we use a linear blendshape model [12] that combines the facial expression models. We fix this model which is not learned from our work. The 80 blendshape parameters $\delta$ are directly applied to the decoder. + +# 3.2. Unified Decoder of Graph CNN and GAN + +Mesh Decoder. We propose to employ a Chebyshev spectral Graph CNN [28, 35], which acts directly on the 3D mesh to estimate the face shape by regressing the 3D coordinates of the mesh vertices. It works well with structured graphs with predefined topology. A series of Graph CNN layers operate as the following. + +A 3D face mesh can be represented by an undirected and connected graph $\mathcal{G} = (\mathcal{V},\mathcal{E})$ , where $\mathcal{V}\in \mathbb{R}^{n\times 3}$ is a set of $n$ vertices, $\mathcal{E}$ is a set of edges and $W\in \mathbb{R}^{n\times n}$ + +![](images/82309db7350c3e462d42b2886010f536a0baab2e9ba48ebebb2e6a5810eef6b1.jpg) +Figure 3: The framework of the proposed method. The model encodes the input image to a projection vector and distribution of the features where the mean represents the most likely feature and the variance represents the confidence associated. The mesh convolution based decoder use this information to reconstruct a 3D face in high-fidelity. We exploit pixel loss, uncertainty-aware perceptual loss, multi-view identity loss, landmark loss, and reconstruction loss. + +is an adjacency matrix encoding the connection status between vertices. The normalized graph Laplacian is $L = I_{n} - D^{-1/2}\mathcal{W}D^{-1/2}$ where $D \in \mathbb{R}^{n \times n}$ is the diagonal matrix with $D_{ii} = \sum_{j} \mathcal{W}_{ij}$ and $I_{n}$ is the identity matrix. The Laplacian $L$ is diagonalized by the Fourier bases $U = [u_{0}, \ldots, u_{n-1}] \in \mathbb{R}^{n \times n}$ such that $L = U\Lambda U^T$ where $\Lambda = \operatorname{diag}([\lambda_{0}, \ldots, \lambda_{n-1}]) \in \mathbb{R}^{n \times n}$ . The graph Fourier transform of $x \in \mathbb{R}^{n \times 3}$ is then defined as $\hat{x} = U^T x$ , and its inverse as $x = U\hat{x}$ . In Chebyshev Spectral Graph CNN, the graph convolution operation is defined as + +$$ +g _ {\theta} (\Lambda) = \sum_ {k = 0} ^ {K - 1} \theta_ {k} T _ {k} (\tilde {\Lambda}), \tag {4} +$$ + +where $\theta \in \mathbb{R}^K$ is a vector of Chebyshev coefficients and $T_{k}(\tilde{\Lambda})\in \mathbb{R}^{n\times n}$ is the Chebyshev polynomial of order $k$ evaluated at a scaled Laplacian $\tilde{\Lambda} = 2\Lambda /\lambda_{max} - I_n$ . $T_{k}$ can be recursively computed by $T_{k}(x) = 2xT_{k - 1}(x) - T_{k - 2}(x)$ with $T_0 = 1$ and $T_{1} = x$ . The spectral convolution can be defined as + +$$ +y _ {j} = \sum_ {i = 1} ^ {F _ {i n}} g _ {\theta_ {i, j}} (L) x _ {i}, \tag {5} +$$ + +where $x_{i}$ is the input feature map and $y_{j}$ is the output feature map. + +Based on this concept, we attach the 256-D feature vector extracted by the uncertainty-aware encoder to the 3D + +coordinates of each vertex in the mean shape. From a high level perspective, the Graph CNN estimates the 3D coordinates of each vertex by using 3D coordinates as the input of each vertex along with the input features. + +Texture Decoder. We use a UV map as our texture representation. Each 3D vertex is projected onto the UV space using cylindrical unwrap. In 3D face reconstruction from a single input image, it is important not only to capture a high level of detail, but also to create an unobserved view naturally. In particular, GAN trained with UV map of real textures are shown to be effective in generating realistic UVs while simultaneously generalizing well to unseen data. Gecer et al. [8] first proposed to employ GAN for texture decoder. We designed our network using the generator structure suggested by BigGAN [3], which argued that the training of GAN benefits dramatically from large batch sizes. Our network can generate realistic texture map. Figure 4, 5 shows how realistic our texture decoder generates texture maps compared to other methods. + +# 3.3. Differentiable Renderer + +To reconstruct a 2D face image from the estimated 3D face, we employ a differentiable renderer [22] based on deferred shading model. Per-vertex attributes such as colors and normal are interpolated at the pixels using the barycentric coordinates and triangle IDs. This approach allows rendering with full perspective and any lighting model. + +The 3D textured mesh is projected into a 2D image in the Cartesian coordinates with a camera model. We employed a pinhole camera model that utilizes a perspective transfor + +mation model. The camera parameter can be defined as below: + +$$ +\mathbf {c} = \left[ x _ {p}, y _ {p}, z _ {p}, x _ {o}, y _ {o}, z _ {o}, f \right] ^ {\top}, \tag {6} +$$ + +where $[x_p, y_p, z_p]$ , $[x_o, y_o, z_o]$ denote 3D coordinates of camera position, orientation respectively and $f$ is the focal length. Additionally, lighting parameter $l$ is concatenated together with camera parameter as rendering parameter that will be estimated by the uncertainty-aware image encoder. In summary, the rendering parameter $\mathbf{f}_m = [\mathbf{c}^T, \mathbf{l}^T]^T$ , a vector of size 18, is estimated by our uncertainty-aware image encoder and $\mathbf{f}_{random}$ includes randomly taken camera parameter. + +# 3.4. Loss Functions + +We propose a novel loss function by combining five terms. It is formulated as below: + +$$ +\begin{array}{l} \mathcal {L} = \lambda_ {p i x} \mathcal {L} _ {p i x} + \lambda_ {u n c} \mathcal {L} _ {u n c} + \lambda_ {v i e w} \mathcal {L} _ {v i e w} \tag {7} \\ + \lambda_ {l a n} \mathcal {L} _ {l a n} + \lambda_ {r e c} \mathcal {L} _ {r e c}, \\ \end{array} +$$ + +where we weight each of loss functions with $\lambda$ parameters. Our methodology allows us to reconstruct models that are faithful to the input images, depending on the parameter settings, and to reconstruct models that are robust to diverse variations. We optimize all of our parameters so as to minimize our loss function. + +Pixel loss. We apply the primitive way of comparing the images in the pixel space with $l_{1}$ loss which can be defined as following: + +$$ +\mathcal {L} _ {p i x} = \left\| \mathbf {I} - \mathbf {I} ^ {\mathcal {R}} \right\| _ {1}, \tag {8} +$$ + +where $\mathbf{I}$ is the input image and $\mathbf{I}^R$ is the rendered image. This pixel loss $L_{pix}$ enforces the similarity between the input image and the rendered image. + +Uncertainty-aware perceptual loss. Simply optimizing for similarity between the images with pixel values can fool the network to produce faces that match closely in the pixel space but look unnatural. The similarity between the identity features from facial recognition network of the input image and the rendered image can help our method to be robust to diverse variations. We use the uncertainty information as weights to compare images in the feature space. The loss gives higher concentration to the confident features that helps reconstruct the corresponding features with higher quality. + +$$ +\mathcal {L} _ {u n c} = \frac {1}{| D |} \sum_ {l} ^ {D} \left\| \frac {\sigma_ {i} ^ {2 (l)}}{\sum \sigma_ {i} ^ {2}} \mu_ {i} ^ {(l)} - \frac {\sigma_ {j} ^ {2 (l)}}{\sum \sigma_ {j} ^ {2}} \mu_ {j} ^ {(l)} \right\| _ {2} ^ {2}. \tag {9} +$$ + +Multi-view identity loss. Learning to reconstruct 3D face using a single view fits only the observed views. As a result, the reconstructed face looks incorrect when viewed from the different viewpoint with the input image. By adding identity loss with random projection, our method becomes robust to viewpoints. $\hat{\mathbf{I}}^{\mathcal{R}}$ is the rendered image from randomly taken view. $\mathcal{F}(\mathbf{I})$ denotes the uncertainty embedded features of image $I$ . + +$$ +\mathcal {L} _ {\text {v i e w}} = 1 - \frac {\mathcal {F} (\mathbf {I}) \cdot \mathcal {F} \left(\hat {\mathbf {I}} ^ {\mathcal {R}}\right)}{\| \mathcal {F} (\mathbf {I}) \| _ {2} \left\| \mathcal {F} \left(\hat {\mathbf {I}} ^ {\mathcal {R}}\right) \right\| _ {2}}. \tag {10} +$$ + +Landmark loss. We employ a deep face align network [2] $\mathcal{M}(\mathbf{I}):\mathbb{R}^{H\times W\times C}\to \mathbb{R}^{68\times 2}$ to detect landmark locations of the input image and align the rendered mesh onto it by updating the parameters. We apply $l_{1}$ loss between the projected and ground truth landmark locations. + +$$ +\mathcal {L} _ {l a n} = \left\| \mathcal {M} (\mathbf {I}) - \mathcal {M} \left(\mathbf {I} ^ {\mathcal {R}}\right) \right\| _ {2}. \tag {11} +$$ + +Reconstruction loss. Reconstruction loss is applied to enforcing the shape reconstruction of the mesh. We apply a per vertex $l_{1}$ loss between the ground truth shape $\mathbf{S}$ and predicted shape $\hat{\mathbf{S}}$ . Empirically we found that using $l_{1}$ loss leads to more stable training and better performance than $l_{2}$ loss. + +$$ +\mathcal {L} _ {r e c} = \left\| \mathbf {S} - \hat {\mathbf {S}} \right\| _ {1}. \tag {12} +$$ + +# 4. Experimental Results + +# 4.1. Datasets + +For uncertainty-aware image encoder, we trained our network using the CASIA-Webface dataset [15], which contains 10,575 subjects with over $494\mathrm{k}$ images. For training decoder, we used various datasets including COMA dataset [6], which consists of about 20,000 meshes over 12 different subjects, 300W-LP dataset [38], which contains approximately $60\mathrm{k}$ large pose facial data and the CelebA dataset [43] which is a large scale face attributes dataset with more than $200\mathrm{k}$ celebrity images. We trained texture decoder, Biggan with UV maps from [20]. + +We perform and conduct qualitative experiments on AFLW2000-3D [38], subset of Casia-Webface dataset, and other various images. We also perform quantitative experiments using the AFLW2000-3D dataset where comparison of the 3D meshes is available for evaluation. + +# 4.2. Ablation Study on Uncertainty + +We conduct an experiment to study the effects of uncertainty embedding compared to the most recent 3D face reconstruction methods, which use deterministic embedding. + +![](images/f7623f0926885027c58769fb1dfa8cbe36e44a91a4c87a787cb513062a472a21.jpg) +Figure 4: 3D face reconstruction comparison on samples from the AFLW2000-3D dataset [38] and the CelebA dataset [43]. + +
MethodShapeTexture
Linear [38]0.02410.1287
Nonlinear [25]0.01460.0427
Nonlinear + GL + Proxy [26]0.01390.0363
Ours0.01290.0317
+ +Table 1: Quantitative comparison on shape and texture representation power. + +
MethodLinear [38]Nonlinear [25]PRNet [39]Ours
NME5.424.123.622.81
+ +Table 2: Face alignment comparison on the AFLW2000-3D dataset [38]. + +As shown in Fig. 4, our uncertainty-aware method outperforms recent methods in terms of model's power to represent facial texture. As expected, adding uncertainty to feature embedding has a special regularization effect, which properly controls generality for global shape and specificity for high level details. + +# 4.3. Comparisons to the State-of-the-art + +We show our model's power to represent facial shape and texture by comparing the results with other state-of-the-art methods [8, 26, 7, 22, 5, 1] for texture and [39, 26, 7] for shape. As shown in Figure 4, 5, our method outperforms all other methods with high-quality monocular reconstructions of both geometry and texture. We briefly compare the qualitative results of our approach with 8 state-of-the-art + +methods in 3D face reconstruction task. For linear 3DMM model, the method proposed by A. T. Tran et al. [5] estimates the 3DMM parameters using DCNN. However, as the reconstruction subspace is still restricted to the linear bases, the model lacks in representation power for variations in textures. Genova et al. [22] trains a regression network from 2D image to 3DMM coordinates using only unlabeled images and synthesized images. Their work proposes three novel loss functions which further helps the reconstruction task in an unsupervised setting. The identity loss for three randomly determined poses gave us the direction for training the identity features which are robust to diverse variations with decreasing the presence of occluded regions of the mesh. However the model is still restricted to the linear subspace which has limited power for representing in-the-wild texture. By contrast our work emphasize the importance of nonlinearity, which further brings the model to go beyond the standard 3DMMs with an ability to represent wide range of shape and texture variation. Jackson et al. [1] tried to avoid using linear 3DMM priors by training a regression network from 2D image to voxel coordinates using an hourglass structure with skip connections. While this strategy had a larger potential for exploring the solution space compared to the linear model, the surface is not smooth and lacks in preserving details. Also volumetric methods discards the relation of meshes which we on the other hand, use Graph CNN to effectively handle face meshes. However, small details of faces disappear as the model estimates a UV position map from an image due to the inevitable smoothing effect of map regression. Feng et + +![](images/ec2ab83be8efa089709006bbecfb91bcef925c6b445721d908abd0c2b52d60c9.jpg) +Figure 5: Qualitative comparison with other state-of-the-art 3D face reconstruction methods. The figure shows our model's power to represent facial shape and texture. + +al. [39] proposed a straightforward method that simultaneously reconstruct the 3D facial geometry by regressing a 2D representation called UV position map. However, small details of faces disappear as the model estimates a UV position map from an image due to the inevitable smoothing effect of map regression. Again, our work use feature uncertainties along with Graph CNN to have great power to balance regularization on mesh domains which helps to reconstruct shapes with high detail for the confident features. + +A. Tewari et al. [7] adopts a self-supervision scheme which breaks out from additional priors, such as statistical + +face models learned from the limited 3D face data. The 3DMM basis functions are embedded into DCNN and the advantage of 3DMM for regularization is combined with the out-of-space generalization of a learned corrective space. While this model can recover more details than existed 3DMM based methods, the process for model training is attached with strong regularization, which limits their texture representation power for high level details of the face. Our model effectively handles this regularization to create a 3D face model in high-fidelity. + +The most related work to our proposed method is Tran + +![](images/ed31ad4bac58159e02af53fca3c3b05f679e8c252be98ce340e1e4de9e216681.jpg) +Figure 6: Reconstruction results for CASIA-Webface. The regression network is robust to changes in noise, blur, occlusion and pose. + +et al. [26] and Gecer et al. [8]. Tran et al. [26] presents an approach to learn additional proxies as means to avoid strong regularization, as well as, leverages to promote detailed shape and albedo. This method improves the nonlinear 3D morphable model in both learning objective and network architecture which efficiently captures high level details. Our method, however, creates higher level details for both shape and texture by using Graph CNNs which directly operate convolutions on graph based structures and combining it with a GAN model. Also our model use uncertainty information instead of learning additional proxies to loosen regularizations. Gecer et al. [8] harness the power of GAN in order to represent facial texture with high fidelity. GANFIT utilizes GAN to train a very powerful generator of facial texture in UV space. As our work also harness the power of GAN model to create texture maps in high quality, we integrate the textures to the meshes of Graph CNNs and use feature uncertainties to balance the terms for generality and specificity. + +# 4.4. Additional Study on Results + +Robust to blur and occlusion. To better understand the power of uncertainty embedding, we additionally conduct an experiment that reconstructs 3D face from ambiguous images. We set the weight of the uncertainty-aware perceptual loss to be large so that our model is robust to diverse variations. As shown in Figure 6, our network yields results that are robust to changes in noise, blur, occlusion, and extreme poses. We show that considering uncertainty brings robustness to varying conditions for a single subject and displays consistent output. + +Robust to viewpoint. We study the effects of identity loss + +![](images/add0471cb8f80cd63d625e26cfe27a60934badc9e6809976ba80533882ef9b00.jpg) +Figure 7: Reconstruction results for frontal/profile view with multi-view identity loss. Our model is robust in reconstructing all facial areas including the unobserved region. + +according to viewpoint, which measures a distance between the input image and the image rendered with a random projection vector. As shown in Figure 7, images from unobserved viewpoints appear natural. Our method is robust in reconstructing all facial areas including the unobserved region. + +# 5. Conclusion + +In this paper, we present an uncertainty-aware mesh decoder which uses uncertainty information to improve 3D face reconstruction task. Our method ensures the decoders to see the uncertain features that can further balance generality and specificity of each features. We also decode shape directly on the mesh domain which is later combined with the generated texture map, where this unified model boost the performance and is suitable to reconstruct both constrained and in the wild images with high details. Our method outperforms previous state-of-the-art methods and this work can be a step toward finding effective feature embedding techniques for 3D face reconstruction. + +# Acknowledgment + +This work was supported by Institute for Information & communications Technology Planning & Evaluation(IITP) grant funded by the Korea government (MSIT) (No. 2019-0-00079, Artificial Intelligence Graduate School Program(Korea University), No. 2019-0-01371, Development of brain-inspired AI with human-like intelligence, No. 2014-0-00059, Development of Predictive Visual Intelligence Technology). + +# References + +[1] Aaron S. Jackson, Adrian Bulat, Vasileios Argyriou, and Georgios Tzimiropoulos. Large pose 3d face reconstruction from a single image via direct volumetric cnn regression. In ICCV, 2017. 6 +[2] Adrian Bulat and Georgios Tzimiropoulos. How far are we from solving the 2d & 3d face alignment problem? (and a dataset of 230,000 3d facial landmarks). In ICCV, 2017. 5 +[3] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural image synthesis. In ICLR, 2019. 4 +[4] Anh T. Tran, Tal Hassner, Iacopo Masi, and Gerard Medioni. Regressing robust and discriminative 3d morphable models with a very deep neural network. In CVPR, 2017. 2 +[5] Anh T. Tran, Tal Hassner, Iacopo Masi, Eran Paz, Yuval Nirkin, and Gerard Medioni. Extreme 3d face reconstruction: Looking past occlusions. In CVPR, 2018. 6 +[6] Anurag Ranjan, Timo Bolkart, Soubhik Sanyal, and Michael J. Black. Generating 3d faces using convolutional mesh autoencoders. In ECCV, 2018. 2, 5 +[7] Ayush Tewari, Michael Zollhofer, Pablo Garrido, Florian Bernard, Hyeongwoo Kim, Patrick Perez, and Christian Theobalt. Self-supervised multi-level face model learning for monocular reconstruction at over $250\mathrm{hz}$ . In CVPR, 2018. 2, 6, 7 +[8] Baris Gecer, Stylianos Ploumpis, Irene Kotsia, and Stefanos Zafeiriou. Ganfit: Generative adversarial network fitting for high fidelity 3d face reconstruction. In CVPR, 2019. 2, 4, 6, 8 +[9] Bindita Chaudhuri, Noranart Vesdapunt, and Baoyuan Wang. Joint face detection and facial motion retargeting for multiple faces. In CVPR, 2019. 1 +[10] Bon-Woo Hwang, Volker Blanz, Thomas Vetter, and Seong-Whan Lee. Face reconstruction from a small number of feature points. In ICPR, 2000. 1 +[11] Brian Amberg, Reinhard Knothe, and Thomas Vetter. Expression invariant 3d face recognition with a morphable model. In FG, 2008. 1 +[12] Chen Cao, Yanlin Weng, Shun Zhou, Yiying Tong, and Kun Zhou. Facewarehouse: A 3d facial expression database for visual computing. In IEEE TVCG, 2014. 3 +[13] Daniel Vlasic, Matthew Brand, Hanspeter Pfister, and Jovan Popovic. Face transfer with multilinear models. In ACM Trans. Graph., 2005. 1, 2 +[14] Dihua Xi, Igor T. Podolak, and Seong-Whan Lee. Facial component extraction and face recognition with support vector machines. In AFGR, 2002. 1 +[15] Dong Yi, Zhen Lei, Shengcai Liao, and Stan Z. Li. Learning face representation from scratch. In CoRR, 2014. 5 +[16] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In CVPR, 2015. 1 +[17] Hyeongwoo Kim, Michael Zollhofer, Ayush Tewari, Justus Thies, Christian Richardt, and Christian Theobalt. Inverse-facenet: Deep monocular inverse face rendering. In CVPR, 2018. 2 + +[18] James Booth, Anastasios Roussos, Stefanos Zafeiriou, Allan Ponniah, and David Dunaway. A 3d morphable model learnt from 10,000 faces. In CVPR, 2016. 1, 2 +[19] James Booth, Epameinondas Antonakos, Stylianos Ploumpis, George Trigeorgis, Yannis Panagakis, and Stefanos Zafeiriou. 3d face morphable models in-the-wild. In CVPR, 2017. 1, 2 +[20] Jiankang Deng, Shiyang Cheng, Niannan Xue, Yuxiang Zhou, and Stefanos Zafeiriou. Uv-gan: Adversarial facial uv map completion for pose-invariant face recognition. In CVPR, 2018. 5 +[21] Kaidi Cao, Yu Rong, Cheng Li, Xiaou Tang, and Chen Change Loy. Pose-robust face recognition via deep residual equivariant mapping. In CVPR, 2018. 1 +[22] Kyle Genova, Forrester Cole, Aaron Maschinot, Aaron Sarna, Daniel Vlasic, and William T. Freeman. Unsupervised training for 3d morphable model regression. In CVPR, 2018. 4, 6 +[23] Liuhao Ge, Zhou Ren, Yuncheng Li, Zehao Xue, Yingying Wang, Jianfei Cai, and Junsong Yuan. 3d hand shape and pose estimation from a single rgb image. In CVPR, 2019. 2 +[24] Luan Tran and Xiaoming Liu. Nonlinear 3d face morphable model. In CVPR 2018. 2 +[25] Luan Tran and Xiaoming Liu. On learning 3d face morphable model from in-the-wild images. In TPAMI, 2019. 6 +[26] Luan Tran, Feng Liu, and Xiaoming Liu. Towards high-fidelity nonlinear 3d face morphable model. In CVPR, 2019, 2, 6, 8 +[27] Matan Sela, Elad Richardson, and Ron Kimmel. Unrestricted facial geometry reconstruction using image-to-image translation. In ICCV, 2017. 2 +[28] Michael Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NeuriPS, 2016. 3 +[29] Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, and Yu-Gang Jiang. Pixel2mesh: Generating 3d mesh models from single rgb images. In ECCV, 2018. 2 +[30] Nikos Kolotouros, Georgiou Pavlakos, and Kostas Dani-ilidis. Convolutional mesh regression for single-image human shape reconstruction. In CVPR, 2019. 2 +[31] Pascal Paysan, Reinhard Knothe, Brain Amberg, Sami Romdhani, and Thomas Vetter. A 3d face model for pose and illumination invariant face recognition. In AVSS, 2009. 1, 2 +[32] Paul Koppen, Zhen-Hua Feng, Josef Kittler, Muhammad Awais, William Christmas, Xiao-Jun Wu, and He-Feng Yin. Gaussian mixture 3d morphable face model. In Pattern Recognition, 2017. 1, 2 +[33] Roger Blanco i Ribera, Eduard Zell, John P. Lewis, Junyong Noh, and Mario Botsch. Facial retargeting with automatic range of motion alignment. In ACM Trans. Graph., 2017. 1 +[34] Sofien Bouaziz, Yangang Wang, and Mark Pauly. Online modeling for realtime facial animation. In ACM Trans. Graph., 2013. 1 +[35] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017. 3 + +[36] Un-Sang Park, Hyun-Cheol Choi, Anil K. Jain, and Seong-Whan Lee. Face tracking and recognition at a distance: A coaxial and concentric ptz camera system. In IEEE Transactions on Information Forensics and Security, 2013. 1 +[37] Volker Blanz and Thomas Vetter. A morphable model for the synthesis of 3d faces. In SIGGRAPH, 1999. 1, 2 +[38] Xiangyu Zhu, Zhen Lei, Xiaoming Liu, Hailin Shi, and Stan Z. Li. Face alignment across large poses: A 3d solution. In CVPR, 2016. 5, 6 +[39] Yao Feng, Fan Wu, Xiahu Shao, Yanfeng Wang, and Xi Zhou. Joint 3d face reconstruction and dense alignment with position map regression network. In ECCV, 2018. 6, 7 +[40] Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In ICML, 2016. 2 +[41] Yichun Shi, Anil K. Jain, and Nathan D. Kalka. Probabilistic face embeddings. In ICCV, 2019. 2, 3 +[42] Yuxiang Zhou, Jiankang Deng, Irene Kotsia, and Stefanos Zafeiriou. Dense 3d face decoding over 2500fps: joint texture & shape convolutional mesh decoders. In CVPR, 2019. 2, 3 +[43] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In ICCV, 2015. 5, 6 \ No newline at end of file diff --git a/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/images.zip b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..dc3faa33ba8989f69897f173bab05a1fdf39d510 --- /dev/null +++ b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a6bf765d3da7d9b6bf38bf034f7a43937b5c8e0d883618b6a846bc7d1af3c59 +size 650311 diff --git a/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/layout.json b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8968d093ba5685045485893be9388752cd608a23 --- /dev/null +++ b/uncertaintyawaremeshdecoderforhighfidelity3dfacereconstruction/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b08a5ba8a7000f486e80ae8ec5cffea942b3828727a63fe71287eecc19ad47fc +size 339371 diff --git a/uncertaintyawarescoredistributionlearningforactionqualityassessment/9883fe84-3bbe-42fb-86b6-b52664e155e1_content_list.json b/uncertaintyawarescoredistributionlearningforactionqualityassessment/9883fe84-3bbe-42fb-86b6-b52664e155e1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0c4e2388b5c8564eca0e74ef7098e3b277e368ec --- /dev/null +++ b/uncertaintyawarescoredistributionlearningforactionqualityassessment/9883fe84-3bbe-42fb-86b6-b52664e155e1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cefc0a9bf8c1515c254edb240775739a1508a9f96e6c3f9484d52ff64b0ed87 +size 72812 diff --git a/uncertaintyawarescoredistributionlearningforactionqualityassessment/9883fe84-3bbe-42fb-86b6-b52664e155e1_model.json b/uncertaintyawarescoredistributionlearningforactionqualityassessment/9883fe84-3bbe-42fb-86b6-b52664e155e1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f676a0ad6c1681f2ef14920beb7af75fcb524a56 --- /dev/null +++ b/uncertaintyawarescoredistributionlearningforactionqualityassessment/9883fe84-3bbe-42fb-86b6-b52664e155e1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4457ccff431078726248cf18b58b609989d97629eaf099f79fed60dd7a977d33 +size 89579 diff --git a/uncertaintyawarescoredistributionlearningforactionqualityassessment/9883fe84-3bbe-42fb-86b6-b52664e155e1_origin.pdf b/uncertaintyawarescoredistributionlearningforactionqualityassessment/9883fe84-3bbe-42fb-86b6-b52664e155e1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3b45286f67b24b692a2b5b29888371e35d6a8e18 --- /dev/null +++ b/uncertaintyawarescoredistributionlearningforactionqualityassessment/9883fe84-3bbe-42fb-86b6-b52664e155e1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7420a3ae892307ea5b79709078ae189faea3a3e13cbce29dc16836de247fe716 +size 1111128 diff --git a/uncertaintyawarescoredistributionlearningforactionqualityassessment/full.md b/uncertaintyawarescoredistributionlearningforactionqualityassessment/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f0fd196aade075fdb9f7accf23ca22965fbdcfe3 --- /dev/null +++ b/uncertaintyawarescoredistributionlearningforactionqualityassessment/full.md @@ -0,0 +1,304 @@ +# Uncertainty-aware Score Distribution Learning for Action Quality Assessment + +Yansong Tang $^{1,2,3,*}$ , Zanlin Ni $^{1,*}$ , Jiahuan Zhou $^{5}$ , Danyang Zhang $^{1}$ , Jiwen Lu $^{1,2,3}$ , Ying Wu $^{5}$ , Jie Zhou $^{1,2,3,4}$ + +1 Department of Automation, Tsinghua University, China + +2 State Key Lab of Intelligent Technologies and Systems, China + +3 Beijing National Research Center for Information Science and Technology, China + +4 Tsinghua Shenzhen International Graduate School, Tsinghua University, China +5 Electrical and Computer Engineering Department, Northwestern University + +{tys15,nzl17,zhang-dy16}@mails.tsinghua.edu.cn; jiahuanzhou2013@u.northwestern.edu; + +{lujiwen, jzhou}@tsinghua.edu.cn;yingwu@eecs.northwestern.edu + +# Abstract + +Assessing action quality from videos has attracted growing attention in recent years. Most existing approaches usually tackle this problem based on regression algorithms, which ignore the intrinsic ambiguity in the score labels caused by multiple judges or their subjective appraisals. To address this issue, we propose an uncertainty-aware score distribution learning (USDL) approach for action quality assessment (AQA). Specifically, we regard an action as an instance associated with a score distribution, which describes the probability of different evaluated scores. Moreover, under the circumstance where fine-grained score labels are available (e.g., difficulty degree of an action or multiple scores from different judges), we further devise a multi-path uncertainty-aware score distributions learning (MUSDL) method to explore the disentangled components of a score. We conduct experiments on three AQA datasets containing various Olympic actions and surgical activities, where our approaches set new state-of-the-arts under the Spearman's Rank Correlation. + +# 1. Introduction + +Action quality assessment (AQA), aiming to evaluate how well a specific action is performed, has become an emerging and attractive research topic in computer vision community because of its potential value for various real- wide applications such as sport video analysis [1,18,19,22], health care [5,40,43] and many others [3,4,42,44]. Compared with the conventional action recognition problem [2, 6,23,26,29,31,32,34,35] focusing on correctly classifying the action sequences from different categories, AQA is + +![](images/2b9bf0a3208207bc216557176cb2f3f0e5958562d43aa54771a6b9b560dd0432.jpg) +Single Score Distribution + +![](images/713c1a6f45b9cc62e509693b12aa919d92c65ce2a12e7e8e369e768140967ddc.jpg) +Judge1 + +![](images/88e7dbe27d60e9bb00edc7b506fda5e698a86d05c7275a6b18ff437fd76d9d32.jpg) +Judge2 + +![](images/6046ba6aca86c87c75e13752d45a38f232b17ab0cb05c8c8d8eceb970c12a403.jpg) +Judge3 + +![](images/29eb92727bd1aa5167979452e8fa1521541d6f128264d9909a0758a14da2c1cb.jpg) +Multiple Score Distributions + +![](images/9cb7a4df080f424596978e412d86811eea5f43a3eaf90a4751540fcab620f86d.jpg) + +![](images/9edc3166c96fcad48423f68fcb160cb031b2b5e634e1504ff6e6c1c5cb8b1163.jpg) + +![](images/622b2995a7af81a5226d3a26a6bca3271acb0a49268094349e7d522296b37e46.jpg) + +![](images/6fda82ce23e8aa2484bdeafffc8c4760e1c7fc6c95bdf1011305f36ae4532a25.jpg) +Figure 1. We study the problem of action quality assessment in this paper. The bottom row shows an diving action in Olympic game, in which the final score is calculated based on multiple judges and the difficulty degree as $100.70 = (9.0 + 9.0 + 8.5) \times 3.8$ . In order to address the uncertainty during the assessment process, we utilize a Gaussian distribution to model the final score (top left) and multiple Gaussian distributions to model the scores from different judges (top right). All figures are best viewed in color. + +![](images/b515b7769bc8fc55628722a61ede30311fd98571505eb27b5b3c492db236c48f.jpg) + +![](images/9157ffc7a3b7d82af8c5c7349513d2731a169d896c6487b210bbb47fd8747362.jpg) + +a more challenging task as it requires to deal with the videos from the same category with poor intra-class discriminant. + +Over the past few years, there have been numbers of methods proposed for AQA [12,13,17,18,21,22]. However, most of them simply regard AQA as a regression problem in order to directly predict the action scores. And unfortunately, their performances are indeed limited. The root of such a limitation is that this kind of treatment disregards of the underlying ambiguity of the action score labels, which is one of the key issues for AQA. Such ambiguity is caused by how the action labels are generated + +in practice. As an example shown in Figure 1, for the diving game, when the athlete finishes his action with the difficulty degree of 3.8, seven judges give their scores as $\{9.0, 8.5, 9.0, 8.0, 9.0, 8.5, 9.0\}$ . After eliminating the top-two and bottom-two scores, the final score is calculated as: $s_{final} = (9.0 + 9.0 + 8.5) \times 3.8 = 100.70$ . This suggests the inherent uncertainty of the final score caused by different judges. Moreover, the subjective appraisal of each individual judge might also bring uncertainty into the final score. Besides the diving game, these phenomena exist in many other sports like gymnastic vaults, figure skiing, etc. The complicated score uncertainty makes an accurate AQA pretty difficult. Hence, it is desirable to design a robust model to deal with the uncertainty for AQA. + +To address this, we propose an uncertainty-aware score distribution learning (USDL) method which utilizes a distribution of different scores as the supervisory signal rather than a single score. The adopted score distribution can depict the probability of the AQA score better so that the aforementioned uncertainty issue can be well handled. As illustrated by the top-left of Figure 1, we generate the ground-truth score distribution based on the widely used Gaussian function, of which the mean is set to be the score label. Meanwhile, an action video is fed into a 3D ConvNets to produce its predicted score distribution. Then we optimize the Kullback-Leibler divergence between the ground-truth score distribution and the predicted one. Recall Figure 1, once the fine-grained score labels are available (e.g., difficulty degree of an action or multiple scores from different judges), we further design a multi-path uncertainty-aware score distributions learning (MUSDL) method to fully explore these disentangled components of the final score. Strictly abided by the rule of the game, we fuse the multiple predicted scores to obtain the final score during inference. Through this objective process, we are able to obtain more accurate results. To our best knowledge, this is the original effort to leverage the finer-level score annotation for AQA problem. In order to verify the effectiveness of our approach, we conduct extensive experiments on the AQA-7 [17], MTL-AQA [19] and JIGSAWS [8] datasets. Experimental results show the superiority of our methods compared with the state-of-the-arts, and demonstrate the advantage of utilizing fine-grained labels. + +# 2. Related Work + +Action Quality Assessment: In the past years, there have been a variety of works dedicated to different AQA tasks, such as health care [40], instructional video analysis [3, 4], sport video analysis [1, 18, 19, 22] and many others [12, 13]. For example, Piriavash et al. [22] explored this task firstly based on hand-crafted features on several specific actions, they took the first step to apply the learning approach on the underlying task and trained a linear SVR model to + +regress the score of the videos. Parmar et al. [18] proposed C3D-SVR and C3D-LSTM to predict the score of the Olympic events. Additionally, incremental-label training method was introduced to train the LSTM model based on the hypothesis that the final score is an aggregation of the sequential sub-action scores. [17] and [19] aimed to improve the scoring performance and the generalization ability of the model simultaneously by exploring all-action models and multi-task learning respectively. Meanwhile, both of them released a new AQA dataset with a larger scale. Xu et al. [37] designed two new LSTM-based models to learn the multi-scale information of the video. A little different from the works focusing on extracting the whole-scene features, Pan et al. [16] presented a graph-based model to sufficiently exploit the athletes' pose information. Their approach well balanced the role of the movement of body parts and the coordination among different joints. Different from the aforementioned regression-based AQA methods, our proposed USDL method aims to predict the score distribution for the input action video instead of a single score number so that the severe score uncertainty which largely limits AQA performance can be well handled. + +Label Distribution Learning: Label distribution learning (LDL) is a general learning paradigm, which describes an instance with distribution rather than the original single label or multiple labels. As a pioneering work, Geng et al. [11] proposed an LDL framework for facial age estimation, which assigned an age distribution to each face image, and learned from such distribution with two algorithms called IIS-LLD (Improved Iterative Scaling-Learning from Label Distributions) and CPNN (Conditional Probability Neural Network). Motivated by the success of [11] which was based on the hand-crafted features, the following ameliorated works have been proposed for LDL by leveraging the power of deep learning models such as deep convolutional neural network [7] or LDL forest [25]. In recent years, LDL has also shown its effectiveness for various computer vision tasks, including head pose estimation [10], beauty sensing [24], facial landmark detection [27] and many others [36,39,41]. For video analysis, Geng et al. [9] proposed a soft grammar parsing method for video parsing, where the video segments are described by the degrees of different sub-action classes. Ling et al. [15] utilized a mixture of Gaussian distribution to model the gradual change of crowd numbers in different video frames for indoor crowd counting. For our proposed method, by transferring the given single score label to a Gaussian-like score distribution for learning, we are able to directly estimate the score distribution of an action video that provides more accurate AQA results than only predicting a single score. + +Multi-Label Learning: Multi-label learning [33] is increasingly required by more and more computer vision applications including AQA. Recently, A novel MTL-AQA + +![](images/37e8376f8748cdf8a80bbaa985eac359eb2ce11cac8749c9ccab9c9569d592c7.jpg) +Figure 2. Pipeline of our proposed method for uncertainty-aware score distribution learning. The input video frames are divided into $N$ segments and fed into an I3D backbone to extract features. After passing three fully-connected layers, the obtained features are fused by temporal pooling and passed through softmax layer to generate the predicted distribution. Then we optimize the KL-Loss between the predicted distribution and a Gaussian distribution generated from the score label. + +dataset containing fine-grained action labels was proposed by [19]. Besides the final score label of each sequence, the action class and commentary labels are also provided for the usage of multi-label learning. In this work, instead of using extra label information from other tasks, the individual score labels from all judges and the action difficulty label are utilized by our method for multi-label learning with the expectation of a better AQA performance. + +# 3. Approach + +# 3.1.USDL + +Pipeline Overview: For a given input video with $L$ frames $V = \{F_l\}_{l=1}^L$ , we utilize a sliding window to segment it into $N$ overlapped clips where each clip contains $M$ consecutive frames. The collected clips are further sent into a backbone of Inflated 3D ConvNets (I3D) [2] followed by three fully connected layers, resulting in $N$ features as $\{f_1, f_2, \dots, f_N\}$ . The weights of the fully connected layers are shared among different clips. As shown in Figure 2, to deal with the extracted features, a straightforward way adopted by the most existing AQA approaches is to fuse them by average pooling or max pooling, and regress it to a final score prediction. In this work, different from those methods, we utilize a USDL framework to deal with the intrinsic ambiguity in the AQA scores, which will be detailed as below. + +Score Distribution Generation: During the training phase, given a video associated with the labeled score $s$ , we first generate a Gaussian function with the mean of $s$ and standard deviation of $\sigma$ as follow: + +$$ +g (c) = \frac {1}{\sqrt {2 \pi} \sigma} \exp \left(- \frac {(c - s) ^ {2}}{2 \sigma^ {2}}\right). \tag {1} +$$ + +Here $\sigma$ is a hyper-parameter which serves as the level of uncertainty for assessing an action. By uniformly discretizing the score interval into a set of scores $\pmb{c} = [c_1, c_2, \dots, c_m]$ , + +a vector is utilized to describe the degree of each score as $\pmb{g}_c = [g(c_1), g(c_2), \dots, g(c_m)]$ . The final score distribution label $\pmb{p}_c = [p(c_1), p(c_2), \dots, p(c_m)]$ is generated by normalizing $\pmb{g}_c$ as below: + +$$ +p \left(c _ {i}\right) = g \left(c _ {i}\right) / \sum_ {j = 1} ^ {m} g \left(c _ {j}\right), i = 1, 2, \dots , m. \tag {2} +$$ + +Learning from Score Distribution: In order to learn from the obtained distribution $\pmb{p}_c$ , we map the $N$ learned features $\{f_1, f_2, \dots, f_N\}$ into $N$ predicted scores as $\{s_1, s_2, \dots, s_N\}$ where $s_n$ has the same size with the $\pmb{p}_c$ . Then, the temporal average pooling is performed to $\{s_n\}_{n=1}^N$ for an output vector $\mathbf{s}'$ . After the softmax activation on $\mathbf{s}'$ , we obtain the final predicted score as $\mathbf{s}_{pre} = [s_{pre}(c_1), s_{pre}(c_2), \dots, s_{pre}(c_m)]$ . Finally, the learning loss is calculated as the Kullback-Leibler (KL) divergence between $\mathbf{s}_{pre}$ and $\pmb{p}_c$ : + +$$ +K L \left\{\boldsymbol {p} _ {c} \| \mathbf {s} _ {p r e} \right\} = \sum_ {i = 1} ^ {m} p \left(c _ {i}\right) \log \frac {p \left(c _ {i}\right)}{s _ {p r e} \left(c _ {i}\right)}. \tag {3} +$$ + +Inferring from Score Distribution: During the inferring stage, we forward the input testing video into our optimized model to obtain the corresponding predicted score distribution $\mathbf{s}_{pre}$ . The final assessment is obtained by selecting the score with the max probability: + +$$ +s _ {f i n a l} = \underset {c _ {i}} {\arg \max } \left\{s _ {p r e} \left(c _ {1}\right), s _ {p r e} \left(c _ {2}\right), \dots , s _ {p r e} \left(c _ {m}\right) \right\}. \tag {4} +$$ + +# 3.2.MUSDL + +In most existing works on AQA, the network is designed and optimized based on the single score supervision. However, in many Olympic games (e.g., diving, figure skiing, etc.), the final score is calculated based on multiple scores + +![](images/958f73e19084bd057726e12049cdb3ad5655a1fa1fcb79ac27aa55681d7b0b00.jpg) +Figure 3. Multi-path uncertainty-aware score distributions learning. During the training phase, we model the scores from $K$ judges as different Gaussian distributions and utilize a similar strategy to train the model containing $K$ sub-networks. During the testing phase, we obtain the final assessment based on the $K$ predicted scores and the rule of the game. + +from several judges according to a certain rule. Thanks to the recently released MTL-AQA dataset, the raw annotation of different judges and the difficulty degree are available as the intermediate components. In this subsection, we further introduce a multi-path architecture to leverage these intermediate components for AQA. + +Learning from Multi-path Score Distributions: As shown in Figure 3, for each single-path, we use the same pipeline as our UsDL approach. The fully connected layers of different paths are separately trained while the I3D backbone is shared among paths. In the training phase, suppose we have a set of scores $\{s_k^{judge}\}_{k=1}^K$ from $K$ different judges. We first sort the scores in increasing order in order to train the sub-networks representing judges of different rigor. Following Eqn (1), we generate $K$ Gaussian distributions as $\{p_{c,k}^{judge}\}_{k=1}^K$ . Given a training video, we first feed it through the I3D backbone and obtained the $N$ features as $\{f_1, f_2, \ldots, f_N\}$ . The features are then fed into $K$ sub-networks to obtain $K$ final predicted distributions $\{\mathbf{s}_{pre,k}^{judge}\}_{k=1}^K$ as follow: + +$$ +\mathbf {s} _ {p r e, k} ^ {j u d g e} = \phi_ {k} (\boldsymbol {f} _ {1}, \boldsymbol {f} _ {2},.. \boldsymbol {f} _ {N}), \quad k = 1, 2,.. K. \qquad (5) +$$ + +Then the total training loss is calculated as: + +$$ +\begin{array}{l} J _ {m u l t i} = \sum_ {k = 1} ^ {K} K L \left\{\boldsymbol {p} _ {c, k} ^ {j u d g e} \right\| \mathbf {s} _ {p r e, k} ^ {j u d g e} \} \tag {6} \\ = \sum_ {k = 1} ^ {K} \sum_ {i = 1} ^ {m} p (c _ {i, k} ^ {j u d g e}) \log \frac {p (c _ {i , k} ^ {j u d g e})}{s _ {p r e , k} ^ {j u d g e} (c _ {i , k} ^ {j u d g e})}. \\ \end{array} +$$ + +Rule-based Multi-path Inference: During the inferring phase, we forward each testing video through our multi-path model and obtain $K$ final predicted scores as $\{s_{final,k}^{judge}\}_{k=1}^{K}$ . According to the rule specific to the diving game, we can obtain the final score as: + +$$ +s _ {f i n a l} = D D \times \sum_ {k ^ {\prime} \in U} s _ {f i n a l, k ^ {\prime}} ^ {j u d g e}. \tag {7} +$$ + +Here $U$ denotes a subset of $\{1, 2, \dots, K\}$ (e.g., the diving game would discard the judges giving the top 2 and the last 2 scores), and $DD$ denotes the difficulty degree of the input action video which will be released in advance. In fact, even the $DD$ is not provided during inference time, we can still train a model to predict $DD$ by introducing a side-network branch for it during training. The predicted $DD$ is directly used for Eqn (7) during inference. We will report the results of these two cases ( $DD$ is available or unavailable during testing) in the Experiment Section. + +# 4. Experiment + +# 4.1. Datasets and Experiment Settings + +AQA-7 [17]: The AQA-7 dataset contains totally 1189 samples from 7 sports: 370 from single diving - 10m platform, 176 from gymnastic vault, 175 from big air skiing, 206 from big air snowboarding, 88 from synchronous diving - 3m springboard, 91 from synchronous diving - 10m platform and 83 from trampoline. We followed the setting in [17] and excluded the trampoline category in which the videos are much longer than those in the other categories [16]. There were 803 clips for training and 303 clips for testing. + +MTL-AQA [19]: The MTL-AQA dataset is the currently largest dataset for AQA. There are 1412 fine-grained samples collected from 16 different events with various views in MTL-AQA. This dataset covers the events of both individual & synchronous divers, both male & female athletes, both $3\mathrm{m}$ springboard & $10\mathrm{m}$ platform settings. In this dataset, different kinds of annotations are provided to enable the study for different tasks consisting of action quality assessment, action recognition and commentary generation. Furthermore, the raw annotations of the scores from seven judges and the difficulty degree $(DD)$ are available for each action. We followed the evaluation protocol suggested in [19] to divide the dataset into a 1059-sized training set and a 353-sized test set. + +JIGSAWS [8]: Besides sport events, we further evaluate our methods on the JIGSAWS [8] dataset which contains surgical activities. There are 3 tasks as "Suturing (S)", "Needle Passing (NP)" and "Knot Tying (KT)" in this dataset. Since each video is annotated with multiple annotation scores assessing different aspects of a video (e.g., flow of operation, quality of final product, etc.) and the final score is defined as the sum of these sub-scores, we could easily extend our MUSDL based on this rule. There are stereo samples recorded by left and right cameras in this dataset, and we only used the videos from the left view due to the high similarity between the paired captures. We adopt a similar four-fold cross validation [3, 16]. Since the concrete splits are not public available for [16], and the splits in [3] are specifically designed for pair-wise rank evaluation, which are not suitable for our work and [16], we simply divided the dataset into four folds randomly. Concretely, our splits are released at the project page. + +Evaluation Protocols: To keep alignment with existing literatures [16], we used Spearman's rank correlation (ranging from -1 to 1, the higher the better) to measure the performance of our methods between the ground-truth and predicted score series. Spearman's correlation is defined as: + +$$ +\rho = \frac {\sum_ {i} \left(p _ {i} - \bar {p}\right) \left(q _ {i} - \bar {q}\right)}{\sqrt {\sum_ {i} \left(p _ {i} - \bar {p}\right) ^ {2}} \sum_ {i} \left(q _ {i} - \bar {q}\right) ^ {2}}}. \tag {8} +$$ + +Here $p$ and $q$ represent the ranking of two series respectively. Fisher's z-value [17] is used to measure the average performance across actions. + +# 4.2. Implementation Details + +Our proposed methods were built on the Pytorch toolbox [20] and implemented on a system with the Intel(R) Xeon(R) E5-2660 v4 CPU @ 2.00Ghz. We trained our model with two Nvidia GTX 1080 Ti GPUs. We utilized the I3D model pretrained on Kinetics dataset as a feature extractor. It took action sequences containing 16 frames as inputs and output a feature with 1024 dimensions. In AQA-7 and MTL-AQA, the videos are all 103 frames long. We divided each video into ten segments under a certain rule2. The MLP block, containing two hidden layers $FC(256,ReLU)$ and $FC(128,ReLU)$ , together with temporal pooling layer and softmax layer, built the score distribution for each video. We performed temporal pooling at feature-level on MTL-AQA and JIGSAWS for better results. Adam [14] was adopted for network optimization. In our experiments, we normalized the final total score in both datasets and seven judge scores in MTL-AQA. For the final total score, since it was a float number, we normalized it as: + +$$ +S _ {\text {n o r m a l i z e}} = \frac {S - S _ {\text {m i n}}}{S _ {\text {m a x}} - S _ {\text {m i n}}} \times 1 0 0. \tag {9} +$$ + +Here $S_{max}$ and $S_{min}$ indicate the maximum and minimum score in the dataset. For judge scores in MTL-AQA dataset, since these scores are inherently discrete but not an integer, so we normalized them by doubling the value of original score to get an integer. After generating normalized score $S_{normalized}$ , we produced a Gaussian function with a mean of $S_{normalized}$ . Note that the produced Gaussian is defined within $x \in (-\infty, \infty)$ in first. In practice, we truncated this initial distribution by the score range, and then discretized and renormalized this distribution function as described in Section 3.1. + +We report the performance of the following baseline methods and different versions of our approach. Note that some of them are not evaluated on the AQA-7 dataset due to the absence of multiple scores. + +- Regression: Most existing works adopted this strategy. We modified the dimension of the last fc layer in our USDL to produce a single prediction score. During the training phase, we optimized the L2 loss between predicted score and ground-truth score. +- USDL: The proposed method in Section 3.1. +- MUSDL and MUSDL*: The proposed methods in Section 3.2, which used the ground-truth and the prediction of difficulty degree during testing respectively. +- $\mathrm{USDL}_{DD}$ : During the training phase, we used scores from seven judges. According to the scoring rules of diving, the top-two and bottom-two scores will be eliminated. We summed the remaining three judge scores to obtain a new score label, and applied USDL to learn this new label. In the inference period, we multiply the predicted score with the ground-truth of difficulty degree $DD$ to generate the final result. + +# 4.3. Results on AQA-7 Dataset + +Table 1 shows the experiment results of our methods and the comparison with other AQA approaches. The simple yet effective regression model achieves competitive performance compared with the state-of-the-art C3D-LSTM, C3D-SVR and JRG models. The proposed USDL approach obtains significant improvement for all action classes except Sync. $10m$ compared to the JRG model, which also utilizes optical flow. The average correlation of our USDL approach gains improvement of $6.3\%$ and $2.5\%$ compared to our baseline regression model and the JRG model respectively. It is also noticed that in action class Snowboard, our proposed model surpasses state-of-the-art models by a large margin about $17\%$ , showing the strong effectiveness of the USDL approach in AQA problems. + +Study on Different Distributions: We conduct 3 parallel experiments with only the type of distribution changed. + +![](images/db4ec6ac09de95fbecfdfb623fc68a83916cad06054227489e9bb11987918e09.jpg) +Figure 4. Score distribution change in temporal domain. The x, y, z axis represents clip number, score and probability predicted for the certain score. The 7th, 8th clips are highlighted because the athlete fell to the ground, which leads to two salient low score prediction. + +Table 1. Comparisons of action quality assessment accuracy on the AQA-7 dataset. + +
DivingGym VaultSkiingSnowboardSync. 3mSync. 10mAvg. Corr.
Pose+DCT [22]0.5300------
ST-GCN [38]0.32860.57700.16810.12340.66000.64830.4433
C3D-LSTM [18]0.60470.56360.45930.50290.79120.69270.6165
C3D-SVR [18]0.79020.68240.52090.40060.59370.91200.6937
JRG [16]0.76300.73580.60060.54050.90130.92540.7849
Ours-Regression0.74380.73420.51900.51030.89150.87030.7472
Ours-USDL0.80990.75700.65380.71090.91660.88780.8102
+ +Table 2. Study on different distributions. We use USDL approach with only the type of soft distribution changed. + +
DivingGym VaultSkiingSnowboardSync. 3mSync. 10mAvg. Corr.
χ2Distribution0.79200.76970.65320.69050.90410.88470.8015
Triangle Distribution0.81470.74520.59600.65550.89870.90540.7969
Gaussian Distribution0.80990.75700.65380.71090.91660.88780.8102
+ +The $\chi^2$ distribution is generated where the mean $s$ equals to normalized score and degree of freedom equals to one-twentieth of score range. The triangle distribution is symmetric with maximum probability at normalized score. The Gaussian distribution follows the implementation in Section 4.2. And all of the distributions are truncated discretized and renormalized to fit the range of scores. As shown in Table 2, Gaussian distribution achieves the highest average correlation while the triangle distribution performs worst. However, note that there is not a distribution that performs best in all action classes. For example, triangle distribution performs best in Diving class and $\chi^2$ distribution performs best in Gym Vault class, while the Gaussian distribution performs best in an average sense. This indicates that the ground-truth score distribution may be complicated and vary a lot among different action classes. + +Visualization of Temporal Evolution: We choose a video in Gym Vault class to visualize the temporal evolution of score distribution in Figure 4. We obtain the score distributions of 10 clips and plot them on the graph. The video has a low ground-truth score and network gives a low score prediction. From the temporal evolution of score distribution we can see how the network gives that prediction—in the 7th and the 8th segments, the athlete fell to the ground, leading to two salient low-score prediction. The two distributions thus dominate in the final distribution, and the network finally gives the low score distribution, as expected. See supplementary material for more visualization results. + +# 4.4. Results on MTL-AQA Dataset + +Our method is compared with several state-of-the-arts on MTL-AQA dataset in Table 3. Still, our regression model + +![](images/d629005f1a75859ae08c6809df1987b978ad42718e0db84a37210a2ff253e04a.jpg) +Figure 5. A comparison of different methods in scatter plot. The plotting points are the predictions of network with y-coordinates being the predicted scores and x-coordinates being the ground-truth scores. The ground-truth samples are plotted in dotted line. + +![](images/9cd1321ce5151f67e7423c0b0381710dcc1f45faa68bbe1e5db32795caaa24b2.jpg) + +![](images/370e4b339eba0633143ab633feaab10f020298c350d9db121330dce1a4b74fe9.jpg) + +Table 3. Comparisons of performance with existing methods on the MTL-AQA dataset. + +
MethodSp. Corr.
Pose+DCT [22]0.2682
C3D-SVR [18]0.7716
C3D-LSTM [18]0.8489
MSCADC-STL [19]0.8472
C3D-AVG-STL [19]0.8960
MSCADC-MTL [19]0.8612
C3D-AVG-MTL [19]0.9044
Ours-Regression0.8905
Ours-MUSDL0.9273
+ +Table 4. Ablation study on the MTL-AQA dataset. For MUSDL*, $\checkmark^{*}$ denote that $DD$ is only available during the training phase, but unavailable during testing phase. + +
MethodSoftDDJudgesSp. Corr.
Regression0.8905
USDL✓0.9066
\( \mathrm{USDL}_{DD} \)✓✓single0.9231
MUSDL*✓✓*multiple0.9158
MUSDL✓✓multiple0.9273
+ +obtains a competitive result compared with the state-of-the-arts and our MUSDL model outperforms all the other approaches listed out. These experiment results convincingly illustrate the effectiveness of our method. It is believed that embedding the MUSDL method into a regression model is able to boost the assessment accuracy. + +Ablation Study: We compare our final method with 4 other methods as shown in Table 4. The vanilla regression and USDL methods do not exploit the information from $DD$ nor the judge scores. The architecture of $\mathrm{USDL}_{DD}$ network is the same as USDL, but the distribution label is generated from multiple judge scores. The final prediction is obtained by combining $DD$ and predicted judge scores, which is the same as MUSDL method. The MUSDL* method adds an + +![](images/0cfe9090d8294f9353f973aeaf5d6c7085901a5429e9fa6f0b8ae55fbf558a45.jpg) +Figure 6. Cumulative score curve in MTL-AQA dataset, in which x-axis measures the absolute difference between predition and label and y-axis shows the proportion of the sample within the current error level. The methods using $DD$ outperform baseline methods significantly, and the MUSDL method performs better than other methods using $DD$ by a little margin. + +additional branch to the previous MUSDL method to perform a multi-task learning, i.e., training the network to predict scores from seven judges and $DD$ at the same time. In inference stage, we combine the judge scores and $DD$ predicted from network to obtain the final score. From the results we see that the $\mathrm{USDL}_{DD}$ outperforms the USDL by $1.7\%$ , indicating that $DD$ is a significant factor in diving score assessment. We believe the reason why using $DD$ can promote better performance is that it "disentangles" the problem, making the main pipeline more specialized in video quality assessment. The MUSDL outperforms the single path method by $0.4\%$ , which shows the fine-grained scores can further improve the performance of network. + +Visualization: We first evaluate the methods in ablation study using cumulative score (CS) curves as shown in Figure 6. The cumulative prediction accuracy at the error $\epsilon$ is computed as $CS(\alpha) = \frac{N_{\epsilon \leq \alpha}}{N} \times 100\%$ . Here $N_{\epsilon \leq \alpha}$ is the number of videos on which the prediction error $\epsilon$ is not larger than the threshold $\alpha$ . The figure shows the strong + +![](images/6c0e70bf75caff7d44f2d77d40f9fef7ce942f05e2a61a68459cd08fe9164579.jpg) + +
DDJ1J2J3J4J5J6J7Score
Ground-Truth3.57.57.57.5888882.25
MUSDL3.56.56.57.5888882.25
MUSDL*3.86.5777.588885.50
+ +![](images/0b0fadef0b360e9c57d42359979c27692d10866e32c9d0e8a5383093d777f158.jpg) +Figure 7. Case study with qualitative results, which present the comparisons of MUSDL, MUSDL* and ground-truth. + +
DDJ1J2J3J4J5J6J7Score
Ground-Truth3.100000000
MUSDL3.12.52.533.53.54.54.531.00
MUSDL*3.222.53.53.53.53.5433.60
+ +Table 5. Comparisons of action quality assessment accuracy on the JIGSAWS dataset. + +
MethodSNPKTAvg. Corr.
ST-GCN [16, 38]0.310.390.580.43
TSN [16, 35]0.340.230.720.46
JRG [16]0.360.540.750.57
Ours-USDL0.640.630.610.63
Ours-MUSDL0.710.690.710.70
+ +effectiveness of using $DD$ for learning better distributions. + +Then we choose the Regression, USDL and MUSDL methods and plot the scatter diagram to make a further comparison, as shown in Figure 5. The predicted scores are plotted in scatter points and the ground-truth scores are plotted in dotted line. From the results, we can see that the proposed MUSDL obtains a very satisfactory performance since the predicted points converge well to the ground-truth line. + +We also conduct a case study to analyze the behavior of our network, as shown in Figure 7. The first case is a successful case where the final score predicted by MUSDL fully matches with ground-truth, and final score predicted by MUSDL* network is a little higher than ground-truth. The second case is a failure case, with the ground-truth label of the video being zero. This time both of our MUSDL network and MUSDL* network give the score far higher than the ground-truth label. The results indicate that when assessing videos with extreme scores, i.e., too far from the normal score level, the proposed method may not be able to get satisfactory results. This is because the samples with extreme scores are scarce and also because the intrinsic property of our method makes it harder to give extreme results. + +# 4.5. Results on the JIGSAWS dataset + +We finally conduct experiments on the JIGSAWS dataset for surgical activities. Because the lengths of each videos are much longer that those in AQA-7 and MTL-AQA + +datasets, we uniformly sampled 160 frames of each videos and divided them into 10 segments as the inputs of our models. Table 5 presents the results of our methods compared with the state-of-the-arts. Our MUSDL achieves best performance of 0.71 (S), 0.69 (NP), 0.70 (Avg. Corr.) and comparable result of 0.71 (KT), which demonstrates its effectiveness for action quality assessment. + +# 5. Conclusion + +In this paper, we have proposed a new uncertainty-aware score distribution learning (USDL) method for action quality assessment, which aims to address the inherent ambiguity in the score label. Moreover, we have devised a multipath uncertainty-aware score distribution (MUSDL) framework to take advantage of additional fine-grained score labels. The experiments on three AQA datasets have demonstrated the effectiveness of our approach. In the future, we plan to apply our methods for instructional video analysis [28, 30]. Besides, it is an interesting direction to explore the interpretability of AQA models (e.g., understanding how the network gains the score for a certain action), which is virtually important for real-world applications. + +# 6. Acknowledgement + +This work was supported in part by the National Key Research and Development Program of China under Grant 2017YFA0700802, in part by the National Natural Science Foundation of China under Grant 61822603, Grant U1813218, Grant U1713214, and Grant 61672306, in part by the Shenzhen Fundamental Research Fund (Subject Arrangement) under Grant JCYJ20170412170602564, in part by Tsinghua University Initiative Scientific Research Program, in part by National Science Foundation grant IIS-1619078, IIS-1815561, and in part by the Army Research Office ARO W911NF-16-1-0138. The authors would sincerely thank Xumin Yu, Wanhua Li, Jia-Hui Pan and Pari-tosh Parmar for their generous helps. + +# References + +[1] Gedas Bertasius, Hyun Soo Park, Stella X. Yu, and Jianbo Shi. Am I a baller? basketball performance assessment from first-person videos. In ICCV, pages 2196-2204, 2017. +[2] João Carreira and Andrew Zisserman. Quo vadis, action recognition? A new model and the kinetics dataset. In CVPR, pages 4724-4733, 2017. +[3] Hazel Doughty, Dima Damen, and Walterio W. Mayol-Cuevas. Who's better? who's best? pairwise deep ranking for skill determination. In CVPR, pages 6057-6066, 2018. +[4] Hazel Doughty, Walterio W. Mayol-Cuevas, and Dima Damen. The pros and cons: Rank-aware temporal attention for skill determination in long videos. In CVPR, pages 7862-7871, 2019. +[5] Hassan Ismail Fawaz, Germain Forestier, Jonathan Weber, Lhassane Idoumghar, and Pierre-Alain Muller. Evaluating surgical skills from kinematic data using convolutional neural networks. In MICCAI, pages 214-221, 2018. +[6] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition. In ICCV, pages 6201-6210, 2019. +[7] Bin-Bin Gao, Chao Xing, Chen-Wei Xie, Jianxin Wu, and Xin Geng. Deep label distribution learning with label ambiguity. TIP, 26(6):2825-2838, 2017. +[8] Yixin Gao, S Swaroop Vedula, Carol E Reiley, Narges Ah-midi, Balakrishnan Varadarajan, Henry C Lin, Lingling Tao, Luca Zappella, Benjamin Béjar, David D Yuh, et al. Jhu-isi gesture and skill assessment working set (jigsaws): A surgical activity dataset for human motion modeling. In MICCAI Workshop: M2CAI, volume 3, page 3, 2014. +[9] Xin Geng and Miaogen Ling. Soft video parsing by label distribution learning. In AAAI, pages 1331-1337, 2017. +[10] Xin Geng and Yu Xia. Head pose estimation based on multivariate label distribution. In CVPR, pages 1837-1842, 2014. +[11] Xin Geng, Chao Yin, and Zhi-Hua Zhou. Facial age estimation by learning from label distributions. TPAMI, 35(10):2401-2412, 2013. +[12] Andrew S Gordon. Automated video assessment of human performance. In Proceedings of AI-ED, pages 16–19, 1995. +[13] Marko Jug, Janez Pers, Branko Dežman, and Stanislav Kovacic. Trajectory based assessment of coordinated human activity. In International Conference on Computer Vision Systems, pages 534-543. Springer, 2003. +[14] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. Computer Science, 2014. +[15] Miaogen Ling and Xin Geng. Indoor crowd counting by mixture of gaussians label distribution learning. TIP, pages 5691-5701, 2019. +[16] Jia-Hui Pan, Jibin Gao, and Wei-Shi Zheng. Action assessment by joint relation graphs. In ICCV, pages 6330-6339, 2019. +[17] Paritosh Parmar and Brendan Morris. Action quality assessment across multiple actions. In WACV, pages 1468-1476, 2019. +[18] Paritosh Parmar and Brendan Tran Morris. Learning to score olympic events. In CVPRW, pages 76-84, 2017. + +[19] Paritosh Parmar and Brendan Tran Morris. What and how well you performed? A multitask learning approach to action quality assessment. In CVPR, pages 304-313, 2019. +[20] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPSW, 2017. +[21] Matej Perše, Matej Kristan, Janez Perš, and Stanislav Kovačić. Automatic evaluation of organized basketball activity using bayesian networks. Citeseer, 2007. +[22] Hamed Pirsiavash, Carl Vondrick, and Antonio Torralba. Assessing the quality of actions. In ECCV, pages 556-571, 2014. +[23] Ronald Poppe. A survey on vision-based human action recognition. Image Vision Comput., 28(6):976-990, 2010. +[24] Yi Ren and Xin Geng. Sense beauty by label distribution learning. In IJCAI, pages 2648-2654, 2017. +[25] Wei Shen, Kai Zhao, Yilu Guo, and Alan L Yuille. Label distribution learning forests. In NeurIPS, pages 834-843, 2017. +[26] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In NeurIPS, pages 568-576, 2014. +[27] Kai Su and Xin Geng. Soft facial landmark detection by label distribution learning. In AAAI, pages 5008-5015, 2019. +[28] Yansong Tang, Dajun Ding, Yongming Rao, Yu Zheng, Danyang Zhang, Lili Zhao, Jiwen Lu, and Jie Zhou. COIN: A large-scale dataset for comprehensive instructional video analysis. In CVPR, pages 1207-1216, 2019. +[29] Yansong Tang, Jiwen Lu, Zian Wang, Ming Yang, and Jie Zhou. Learning semantics-preserving attention and contextual interaction for group activity recognition. TIP, 28(10):4997-5012, 2019. +[30] Yansong Tang, Jiwen Lu, and Jie Zhou. Comprehensive instructional video analysis: The COIN dataset and performance evaluation. TPAMI, 2020. +[31] Yansong Tang, Yi Tian, Jiwen Lu, Peiyang Li, and Jie Zhou. Deep progressive reinforcement learning for skeleton-based action recognition. In CVPR, pages 5323-5332, 2018. +[32] Du Tran, Lubomir D. Bourdev, Rob Fergus, Lorenzo Torresani, and Manohar Paluri. Learning spatiotemporal features with 3d convolutional networks. In ICCV, pages 4489-4497, 2015. +[33] Grigorios Tsoumakas and Ioannis Katakis. Multi-label classification: An overview. International Journal of Data Warehousing and Mining (IJDWM), 3(3):1-13, 2007. +[34] Heng Wang, Alexander Kläser, Cordelia Schmid, and Cheng-Lin Liu. Action recognition by dense trajectories. In CVPR, pages 3169-3176, 2011. +[35] Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaou Tang, and Luc Van Gool. Temporal segment networks: Towards good practices for deep action recognition. In ECCV, pages 20-36, 2016. +[36] Chao Xing, Xin Geng, and Hui Xue. Logistic boosting regression for label distribution learning. In CVPR, pages 4489-4497, 2016. + +[37] C. Xu, Y. Fu, B. Zhang, Z. Chen, Y. Jiang, and X. Xue. Learning to score figure skating sport videos. TCSVT, pages 1-1, 2019. +[38] Sijie Yan, Yuanjun Xiong, and Dahua Lin. Spatial temporal graph convolutional networks for skeleton-based action recognition. In AAAI, pages 7444-7452, 2018. +[39] Xu Yang, Xin Geng, and Deyu Zhou. Sparsity conditional energy label distribution learning for age estimation. In *IJ-CAI*, pages 2259–2265, 2016. +[40] Qiang Zhang and Baoxin Li. Relative hidden markov models for video-based evaluation of motion skills in surgical training. TPAMI, 37(6):1206-1218, 2015. +[41] Ying Zhou, Hui Xue, and Xin Geng. Emotion distribution recognition from facial expressions. In MM, pages 1247-1250, 2015. +[42] Aneeq Zia and Irfan A. Essa. Automated surgical skill assessment in RMIS training. Int. J. Comput. Assist. Radiol. Surg., 13(5):731-739, 2018. +[43] Aneeq Zia, Yachna Sharma, Vinay Bettadapura, Eric L. Sarin, and Irfan A. Essa. Video and accelerometer-based motion analysis for automated surgical skills assessment. Int. J. Comput. Assist. Radiol. Surg., 13(3):443-455, 2018. +[44] Aneeq Zia, Yachna Sharma, Vinay Bettadapura, Eric L. Sarin, Thomas Ploetz, Mark A. Clements, and Irfan A. Essa. Automated video-based assessment of surgical skills for training and evaluation in medical schools. Int. J. Comput. Assist. Radiol. Surg., 11(9):1623-1636, 2016. \ No newline at end of file diff --git a/uncertaintyawarescoredistributionlearningforactionqualityassessment/images.zip b/uncertaintyawarescoredistributionlearningforactionqualityassessment/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f8d8ed8d7dfa97fafb48ad4a6f26e45de39a9925 --- /dev/null +++ b/uncertaintyawarescoredistributionlearningforactionqualityassessment/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e33396954fbed111b4aa0fbc1f1943d1b35d684ea2ec2946ffcba48a94ed083 +size 636205 diff --git a/uncertaintyawarescoredistributionlearningforactionqualityassessment/layout.json b/uncertaintyawarescoredistributionlearningforactionqualityassessment/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..abf78dd4c3f89b37764f0287399239f9c8fd3d73 --- /dev/null +++ b/uncertaintyawarescoredistributionlearningforactionqualityassessment/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da3d3844153ec662e7d729df8f781d61d9229f6b00f9327b0bd1b043038f2216 +size 389934 diff --git a/uncertaintybasedcameramodelselection/85404bb5-e144-45bb-a491-427a38c923a4_content_list.json b/uncertaintybasedcameramodelselection/85404bb5-e144-45bb-a491-427a38c923a4_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..423e379ea13716c05ae540dc852649c6f5d64c16 --- /dev/null +++ b/uncertaintybasedcameramodelselection/85404bb5-e144-45bb-a491-427a38c923a4_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa66cea7487503913025da4f4c0023706ff86e4e559c453ef8752e073b258e8b +size 86023 diff --git a/uncertaintybasedcameramodelselection/85404bb5-e144-45bb-a491-427a38c923a4_model.json b/uncertaintybasedcameramodelselection/85404bb5-e144-45bb-a491-427a38c923a4_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1b2540c16f2afd69fb31058627dec1845a9fe1bb --- /dev/null +++ b/uncertaintybasedcameramodelselection/85404bb5-e144-45bb-a491-427a38c923a4_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8058e2b36834f43ea0a235badaa23bb8ce8513d4ef3cfd91110da8d7dad5a317 +size 103288 diff --git a/uncertaintybasedcameramodelselection/85404bb5-e144-45bb-a491-427a38c923a4_origin.pdf b/uncertaintybasedcameramodelselection/85404bb5-e144-45bb-a491-427a38c923a4_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1f080be7d38db5f76a5608ac7b8ed8416ca6f733 --- /dev/null +++ b/uncertaintybasedcameramodelselection/85404bb5-e144-45bb-a491-427a38c923a4_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79c274721e614adae58d5b8c1dfe0995b65625c8e2a52b2eb063f151e1c6f872 +size 1163557 diff --git a/uncertaintybasedcameramodelselection/full.md b/uncertaintybasedcameramodelselection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..145dfffa3a7d0498a11555b7a3846d9f05aef063 --- /dev/null +++ b/uncertaintybasedcameramodelselection/full.md @@ -0,0 +1,360 @@ +# Uncertainty Based Camera Model Selection + +Michal Polic CTU in Prague* + +Stanislav Steidl CTU in Prague* + +Cenek Albl ETH Zurich + +Zuzana Kukelova +CTU in Prague† + +Tomas Pajdla CTU in Prague* + +# Abstract + +The quality and speed of Structure from Motion (SfM) methods depend significantly on the camera model chosen for the reconstruction. In most of the SfM pipelines, the camera model is manually chosen by the user. In this paper, we present a new automatic method for camera model selection in large scale SfM that is based on efficient uncertainty evaluation. We first perform an extensive comparison of classical model selection based on known Information Criteria and show that they do not provide sufficiently accurate results when applied to camera model selection. Then we propose a new Accuracy-based Criterion, which evaluates an efficient approximation of the uncertainty of the estimated parameters in tested models. Using the new criterion, we design a camera model selection method and fine-tune it by machine learning. Our simulated and real experiments demonstrate a significant increase in reconstruction quality as well as a considerable speedup of the SfM process. + +# 1. Introduction + +Structure from Motion (SfM) has many applications in 3D reconstruction [42, 43, 39], image matching [36], visual odometry [30, 7] and visual localization [46, 38, 44]. Large-scale 3D reconstruction pipelines, e.g. COLMAP [39], Meshroom [6], and RealityCapture [1] are widely used. + +SfM pipelines use many parameters that are hard to set in practice. A crucial parameter to set is the camera model to be used. In fact, every absolute [25] and relative pose solver [24] is derived for one particular camera model and the user has to choose it. Using a too simple camera model may lead to under-fitting and inaccurate reconstruction. Us- + +![](images/192318511ec5739366e58c132fe6dedbe9d608e6735aab108957b61cdd5776b4.jpg) +Figure 1: Cameras (red) and 3D points (black) reconstructed by COLMAP [39] with eight different radial distortion models. The best camera model selected using our method (framed in red) gives the most planar result for 3D points of a flat wall (using a dataset from [40]). + +![](images/034edf9b0e8b3ffb7e3d6319ed2875470b1978b44770363dedf674dc9fe68482.jpg) + +ing a too complex model may lead to over-fitting the data and result in degeneracies [5], as shown in Fig. 1. + +Model selection based on statistics is a well-studied problem. However, camera model selection in SfM by standard Information Criteria (IC) may not work for several reasons. First, the reconstruction has a singular statistical model due to the gauge freedom [21], i.e. the likelihood function of having a "good" model cannot be derived using the normal distribution [48]. Secondly, the prior distribution of the reconstruction parameters (e.g. camera poses and 3D points) is not known and thus Bayesian methods cannot be used either. Third, for different camera models and different reprojection thresholds, the final 3D reconstruction contains different numbers of registered 3D points and cameras, i.e. the size of data is not constant. Finally, standard ICs assume that residuals depend only on the selected model. However, camera model selection also depends on physical properties (e.g. lighting and view angle) [20]. + +The ultimate goal of a camera model selection method is to select a "good" model where (i) all images are registered, (ii) the reprojection error is minimal, and (iii) the number + +of parameters is small. This goal is very hard to reach in practice (c.f. Table 4). + +We propose to use an efficient evaluation of an approximation of the uncertainty of the estimated parameters in tested models to select the camera model, which leads to the "most accurate" estimated parameters. We demonstrate our method on the important task of selecting a suitable radial distortion model: Most modern cameras take images exhibiting radial distortion. Yet, using a wrong radial distortion model often leads to degeneracies (c.f. Fig. 1). + +Contributions. We first present a comparison of standard, robust, and geometrical ICs on the task of radial distortion model selection. Motivated by the poor performance of these state-of-the-art (SOTA) ICs, we design a new Accuracy-based Criterion (AC) and an AC-based camera model Selection method (ACS). We further fine-tune this method by learning a camera model selection classifier (LACS) from ACS evaluations for different reprojection error thresholds. In extensive synthetic and real experiments, we show a significant increase in the reconstruction quality as well as a considerable speedup of the reconstruction process. Moreover, we show that the use of the accuracy of observations improves the inlier/outlier classification. + +# 2. Previous work + +The model selection problem has received considerable attention [4, 19, 9, 41, 16, 34, 35, 20, 37, 26, 8]. The Akaike criterion (AIC [4]) is based on the first-order estimate of the Kullback-Leibler (KL) distance between the densities given by the data and true (unknown) density function. AIC computes the likelihood of the fitted model parameters and its bias correction. Hurvich's AICc [19] is a second-order estimate of the KL distance, which can be seen as extension of AIC for small sample sizes. Takeuchi's TIC [11] is another extension of AIC, which shrinks the model parameters towards the maximum entropy distribution and therefore is more robust if the correct model is not in the set of candidates models. Bozdogan's CAIC [9] adjusts AIC by the assumption that the order of the models does not change if the sample size increases. Schwarz's BIC [41] is motivated by approximating the marginal probability density of the data under the model, which leads to a higher magnitude of bias correction w.r.t. AIC. Rissanen's MDL [34] is derived from the minimal code length necessary for describing the data. A valuable extension of the AIC, MDL up to geometric G-AIC, G-MDL was introduced by Kanatani in [20]. It highlights that the accuracy depends primarily on physical properties of observed 3D structure. All the approaches above do assume observations without outliers. The simplest robust IC is Ronchetti's RAIC [37]. It generalizes the ML-estimator to an M-estimator, which minimizes a robust loss function of + +the residuals. This idea can be applied to ICs mentioned above, as in, e.g., RBIC [26] and RTIC [8]. Watanabe's WAIC and WBIC [48] assume known priors on the model parameters. However, such priors are not always available in practice. + +The most related work to our is the work of Kanatani [20] where the G-AIC and G-MDL information criteria were proposed. These criteria were applied in [23] to choose between affine and projective camera models. However, G-AIC, G-MDL methods in general do not work well for the camera model selection task because this task has a singular statistical model [48]. Another approach to radial distortion model selection was presented in [15, 31]. That approach assumes correspondences between planar calibration boards with a fixed number of detected observations without considering any outliers and simplifies used camera models to homographies [17] between pairs of images. These are very strong assumptions and, as far as we know, there are no methods for radial distortion model selection without the use of calibration pattern. + +# 3. Problem formulation + +Our goal is to design a scoring function for camera models. Given a finite set of camera models $\mathcal{M} = \{M_1, \ldots, M_n\}$ , the camera model $M_b$ that leads to the "most accurate" 3D reconstruction $\widetilde{\pmb{\theta}}^{(b)}, b \in \{1, \ldots, n\}$ , should get the highest score. Let us assume that the reconstruction $\widetilde{\pmb{\theta}}^{(i)}$ for the camera model $M_i$ consists of $\widetilde{V}^{(i)}$ 3D points $\widetilde{\pmb{X}}^{(i)} = \{\widetilde{\pmb{X}}_1^{(i)}, \widetilde{\pmb{X}}_2^{(i)}, \ldots, \widetilde{\pmb{X}}_{\widetilde{V}^{(i)}}^{(i)}\}$ , $\widetilde{U}^{(i)}$ cameras $\widetilde{\pmb{P}}^{(i)} = \{\widetilde{\pmb{P}}_1^{(i)}, \widetilde{\pmb{P}}_2^{(i)}, \ldots, \widetilde{\pmb{P}}_{\widetilde{U}^{(i)}}^{(i)}\}$ and radial distortion parameters $\widetilde{\pmb{\theta}}_{rd}^{(i)}$ , i.e. $\widetilde{\pmb{\theta}}^{(i)} = \{\widetilde{\pmb{P}}^{(i)}, \widetilde{\pmb{X}}^{(i)}, \widetilde{\pmb{\theta}}_{rd}^{(i)}\}$ . Further, let $\widetilde{\pmb{u}}^{(i)}$ be the observations of points $\widetilde{X}^{(i)}$ in images described by cameras $\widetilde{\pmb{P}}^{(i)}$ . In general, it is not possible to evaluate the accuracy of the reconstruction $\widetilde{\pmb{X}}^{(i)}$ before all cameras are registered and all corresponding 3D points are triangulated. Running SfM for all considered camera models from $\mathcal{M}$ may be computationally extremely expensive. Therefore, we will evaluate the proposed camera model selection criterion for smaller sub-reconstructions with a fixed number of registered cameras $K \leq \min_i \widetilde{U}^{(i)}$ . Note that we use $\widetilde{\pmb{\theta}}^{(i)}$ for the complete reconstruction from all images and $\pmb{\theta}^{(i)}$ for the reconstruction with $K$ fixed registered cameras. It is obvious that considering more cameras in sub-reconstructions $\pmb{\theta}^{(i)}$ , i.e., a larger $K$ , will lead to better approximations of the overall accuracy of the complete reconstructions $\widetilde{\pmb{\theta}}^{(i)}$ . Let us assume that the estimated parameters of these sub-reconstructions $\hat{\pmb{\theta}}^{(i)}$ ( $\hat{}$ denotes estimated values) were esti + +mated by an SfM pipeline, e.g. COLMAP [39], as + +$$ +\hat {\boldsymbol {\theta}} ^ {(i)} = \underset {\boldsymbol {P} _ {l}, \boldsymbol {X} _ {m}, \boldsymbol {\theta} _ {r d}} {\arg \min } \sum_ {\forall (l, m) \in \boldsymbol {S}} \mathcal {L} \left(\left\| \boldsymbol {p} ^ {(i)} \left(\boldsymbol {P} _ {l}, \boldsymbol {X} _ {m}, \boldsymbol {\theta} _ {r d}\right) - \boldsymbol {u} _ {l, m} \right\|\right), \tag {1} +$$ + +where $l$ is the index of the camera and $m$ is the index of the 3D point, $\pmb{S}$ is an index set that determines which point is seen by which camera, $\pmb{u}_{l,m} \in \mathbb{R}^2$ are observations of the 3D point $\pmb{X}_m$ in the camera $\pmb{P}_l$ , $\pmb{p}^{(i)}$ is the projection function for the camera model $\pmb{M}_i$ and $\mathcal{L}$ is a loss function. + +The estimated sub-reconstructions $\hat{\pmb{\theta}}^{(i)}$ , for model $M_{i}$ consist of estimated parameters $\hat{P}_l^{(i)},\hat{X}_m^{(i)},\hat{\theta}_{rd}^{(i)}$ . The corresponding projections $\hat{\pmb{u}}_{l,m}^{(i)}$ by the camera model $M_{i}$ satisfy + +$$ +\hat {\boldsymbol {u}} _ {l, m} ^ {(i)} = \boldsymbol {p} ^ {(i)} \left(\hat {\boldsymbol {P}} _ {l} ^ {(i)}, \hat {\boldsymbol {X}} _ {m} ^ {(i)}, \hat {\boldsymbol {\theta}} _ {r d} ^ {(i)}\right) \quad \forall (l, m) \in \boldsymbol {S}. \tag {2} +$$ + +Observations $\pmb{u}_{l,m}$ that satisfy $\mathcal{L}(\hat{\epsilon}_{l,m}^{(i)}) = \mathcal{L}(||\pmb{u}_{l,m} - \hat{\pmb{u}}_{l,m}^{(i)}||) < \delta$ , for some threshold $\delta$ , are the inliers of the model $M_i$ . Let us denote the index set of all inliers for the camera model $M_i$ by $\pmb{S}^{(i)}$ . We assume that the subreconstructions $\hat{\pmb{\theta}}^{(i)}$ contain inliers only. + +Assuming one camera model $M_{i}$ , we skip the index $(\mathbf{\Psi})^{(i)}$ whenever it is clear from context. The camera $\hat{P}_l\in \mathbb{R}^9$ is composed of the focal length $\hat{f}\in \mathbb{R}$ , the principal point $\widehat{\mathrm{pp}}\in \mathbb{R}^2$ , Euler vector $\widehat{\mathrm{aa}}\in \mathbb{R}^3$ (i.e. a rotation axis multiplied by a rotation angle, which can be transformed into a rotation matrix by the function $\mathbb{R}(\widehat{\mathrm{aa}})\in \mathbb{R}^{3\times 3}$ ), and the translation $\hat{\pmb{t}}\in \mathbb{R}^3$ . In the following, we also skip the indices $(\mathbf{\Psi})_{l,m}$ for the brevity. + +The radial distortion function $h$ , in general, depends on the distance $r$ of the image point $u$ from the distortion center, which we assume to be in the principal point $\widehat{pp}$ . The general projection function $p^{(i)}$ for the camera model $M_{i}$ under radial distortion can then be written as + +$$ +\hat {\boldsymbol {u}} ^ {(i)} = \hat {f} \boldsymbol {h} ^ {(i)} \left(\hat {r} ^ {2}, \hat {\boldsymbol {\theta}} _ {r d}\right) \underline {{\hat {\boldsymbol {u}}}} + \mathrm {p p}, \tag {3} +$$ + +where $\hat{r}^2 = ||\hat{\underline{u}} ||^2$ and $\hat{\underline{u}}$ is the projection in the image plane before applying radial distortion + +$$ +\underline {{\underline {{\boldsymbol {u}}}}} = \left[ \begin{array}{l} \underline {{\hat {u} _ {1}}} \\ \underline {{\hat {u} _ {2}}} \end{array} \right] = \left[ \begin{array}{l} \underline {{\hat {x}}} / \underline {{\hat {z}}} \\ \underline {{\hat {y}}} / \underline {{\hat {z}}} \end{array} \right]. \tag {4} +$$ + +$[\underline{\hat{x}}, \underline{\hat{y}}, \underline{\hat{z}}]^{\top}$ is the 3D point in camera coordinates obtained by rotating and translating the point $\hat{\mathbf{X}}$ + +$$ +\left[ \begin{array}{l} \frac {\hat {x}}{\hat {y}} \\ \hat {\hat {z}} \end{array} \right] = \mathrm {R} (\widehat {\mathrm {a a}}) \hat {\boldsymbol {X}} + \hat {\boldsymbol {t}}. \tag {5} +$$ + +The radial distortion function is usually modelled as a rational function [25] + +$$ +\boldsymbol {h} ^ {(i)} (\hat {r} ^ {2}, \hat {\boldsymbol {\theta}} _ {r d}) = \frac {1 + \hat {k} _ {1} r ^ {2} + \hat {k} _ {2} r ^ {4} \dots \hat {k} _ {R} \hat {r} ^ {2 B}}{1 + \hat {d} _ {1} \hat {r} ^ {2} + \hat {d} _ {2} \hat {r} ^ {4} \dots \hat {d} _ {D} \hat {r} ^ {2 D}}, \tag {6} +$$ + +
#ICformula
1AIC [4]-2L + 2k
2AICc [19]-2L + 2k + 2k2+2k/N-k-1
3CAIC [9]-2L + k(log(N) + 1)
4BIC [41]-2L + k log(N)
5HQC [16]-2L + 2k log(log(N))
6MDL [34]-L + 1/2k log(N)
7SSD [35]-2L + k log(N+2/24) + 2log(k+1)
8GAIC [20]R-T + 2(Nd+k)σ2
9GMDL [20]R-T - (Nd+k)σ2 log(σ2)
10RTICtal [8]-2T + 2Ral + 2kR(I)/D(I)
11RTICHub [8]-2T + 2Rhub + 2k(R(I)+D(S\I)δ2)/D(I)
12FRIC1 [8]R(I)/σ2(M(I)-D(I)+kM+2k
13FRIC2 [8]R(I)/σ2(M(I)-D(I)+kM+2k log(D(I))
+ +Table 1: Summary of the information criteria. Please see the original papers or supplementary material for details. + +where $\hat{k}_j$ and $\hat{d}_l$ are parameters of the radial distortion model. The most common models are polynomial (Brown) models with $\hat{d}_l = 0$ , $\forall l$ or division models with $\hat{k}_j = 0$ , $\forall j$ . We denote the radial distortion model (6) with the first $B$ non-zero parameters $\hat{k}_j$ and the first $D$ non-zero parameters $\hat{d}_l$ as $M_{B|D}$ . $M_{0|0}$ is the simple pinhole camera model with no radial distortion. Different SfM pipelines use different camera models, e.g. COLMAP [39] uses $M_{0|0}$ , $M_{1|0}$ , $M_{2|0}$ , $M_{3|3}$ , Meshroom [6] uses $M_{0|0}$ , $M_{3|0}$ and Theia [45] uses $M_{0|0}$ , $M_{2|0}$ . + +# 3.1. Accuracy of observations + +Each observation $\boldsymbol{u}_{l,m}$ is located with its accuracy depending, e.g., on the view-angle, the keypoint contrast etc., but not depending on the estimated reprojection error $\hat{\epsilon}_{l,m}^{(i)}$ . We assume that $\hat{\boldsymbol{e}}_{l,m}^{(i)} \in \mathcal{N}(0, \Sigma_{u_{l,m}})$ , i.e. the residual $\hat{\boldsymbol{e}}_{l,m}^{(i)} = \boldsymbol{u}_{l,m} - \hat{\boldsymbol{u}}_{l,m}^{(i)}$ follows a zero-mean Normal distribution with covariance matrix $\Sigma_{u_{l,m}} \in \mathbb{R}^{2 \times 2}$ . The covariance matrix is found according to [13] for each keypoint. Each keypoint is described by an affine region [28]. We use the DSP-SIFT detector [12] to find the regions, but any SOTA detector [10, 18, 47] may be used. The covariance matrix for each affine region is computed as the scaled inversion of the Structure Tensor [13]. The covariance matrix of all observations $\Sigma_{u}$ is composed of blocks $\Sigma_{u_{l,m}}$ on the diagonal. + +# 4. Comparison of ICs + +The existing ICs can be seen as compositions of two terms. The first term expresses the goodness of the fit and the second term expresses the bias correction of the first term. + +The standard definition of ICs [4, 19, 9, 27, 41, 16, 34, 35, 20, 37, 26, 8] assumes the goodness of the fit realized by the log-likelihood $L$ of $k$ estimated parameters. The log-likelihood $L$ is usually derived from the Normal distribution, which approximates the true distribution of the parameters. If the number of observations is constant, which is the assumption of most of the existing ICs, the log-likelihood $L$ can be decomposed into a constant term $T$ and the sum of squared weighted residuals $R$ , as $L = T - R$ , and the constant term $T$ may be ignored [4, 19, 9, 27, 41, 16, 34, 35, 20, 37, 26]. + +However, for the problem of camera model selection the term $T$ depends on the number of observations $N$ , which varies for different camera models and different reprojection error thresholds. Therefore, we keep the term $T$ in all ICs that we will later use for comparison with our new criterion. All the compared ICs are summarized in Table 1. We can divide them into standard ICs (1-9) and robust ICs (10-13). The standard (resp. robust) ICs assume that the parameters $\hat{\pmb{\theta}}$ are estimated by a maximum likelihood (ML) estimator (resp. M estimator). The ML estimators minimize the squared reprojection errors. The M estimators minimize a robust loss function, e.g., the Tarwal or Huber loss function [8]. Note that for our task $\hat{k}^{(i)} = 9\hat{U}^{(i)} + 3\hat{V}^{(i)} + \mathcal{D}(\hat{\pmb{\theta}}_{rd}^{(i)})$ , where $\mathcal{D}(\hat{\pmb{\theta}}_{rd}^{(i)})$ is the dimension of estimated radial distortion parameters. A detailed description of all ICs is provided in the original papers and the supplementary material. + +# 5. Accuracy-based criterion (AC) + +Here we describe our new Accuracy-based criterion and our new camera model selection method. + +The accuracy of observations $\Lambda_{u} = \Sigma_{u}^{-1}$ , i.e. the information matrix $\Lambda_{u}$ , which is the inversion of the covariance matrix $\Sigma_{u}$ , can be propagated to the reconstruction $\theta^{(i)}$ . However, in practice, each individual reconstruction $\theta^{(i)}$ is in a different coordinate system with different gauge of the covariance matrix. To have comparable values, we need to (i) specify the gauge of the coordinate systems, (ii) specify the gauge of the covariance matrix [13, p.109]. + +The number of reconstruction parameters $\hat{k}^{(i)}$ varies for different initial pairs of the reconstruction, different reprojection error thresholds $\delta$ , and different camera models. To obtain a comparable representation of the accuracy, we need to define a subset of parameters $\pmb{\theta}_{A}$ , which are common to all the reconstructions, i.e. $\pmb{\theta}_{A} \subset \pmb{\theta}^{(i)}, \forall i$ and the remaining parameters $\pmb{\theta}_{B}^{(i)} = \{\pmb{\theta}^{(i)} \setminus \pmb{\theta}_{A}\}$ . We assume that all estimated reconstruction parameters can be decomposed as $\hat{\pmb{\theta}}^{(i)} = \{\hat{\pmb{\theta}}_{A}^{(i)}, \hat{\pmb{\theta}}_{B}^{(i)}\}$ . + +To specify the gauge of the coordinate system, we chose one reference reconstruction, e.g. $M_r \in \mathcal{M}$ . Next, we transform the coordinate system of each reconstruction such + +that the transformation minimizes the distances of the centres of cameras and the angles between the optical axes of cameras in these reconstructions to the centres and the optical axes of the corresponding cameras in $\hat{\pmb{\theta}}^{(r)}$ . + +Let us assume in the following that the coordinate systems of reconstructions $\hat{\pmb{\theta}}^{(i)},\forall i$ were already aligned to one reference coordinate system, e.g., to the coordinate system of $\hat{\pmb{\theta}}^{(r)}$ . The next step is to apply S-transformation $\mathbb{S}^{(i)}$ for each reconstruction to specify the gauge of the covariance matrix [13] of the reconstruction $\Sigma_{\hat{\theta}^{(i)}}$ . To do so, we need to write the general equation for the propagation of the accuracy $\Lambda_u$ from observation $\pmb{u}^{(i)}$ to $\hat{\pmb{\theta}}^{(i)}$ . + +$\mathbf{J}_A^{(i)}$ denotes the Jacobian of $\pmb{p}^{(i)}$ w.r.t. $\pmb{\theta}_{A}$ evaluated in $\hat{\pmb{\theta}}_A^{(i)}$ and $\mathbf{J}_B^{(i)}$ is the Jacobian of $\pmb{p}^{(i)}$ w.r.t. $\pmb{\theta}_B^{(i)}$ evaluated in $\hat{\pmb{\theta}}_B^{(i)}$ . Then, we can write the propagation as + +$$ +\Lambda_ {\theta} ^ {(i)} = \left[ \begin{array}{c c} \Lambda_ {A A} ^ {(i)} & \left(\Lambda_ {A B} ^ {(i)}\right) ^ {\mathsf {T}} \\ \Lambda_ {A B} ^ {(i)} & \Lambda_ {B B} ^ {(i)} \end{array} \right] = \left[ \begin{array}{c} \left(\mathbf {J} _ {A} ^ {(i)}\right) ^ {\mathsf {T}} \\ \left(\mathbf {J} _ {B} ^ {(i)}\right) ^ {\mathsf {T}} \end{array} \right] \Lambda_ {u} \left[ \begin{array}{c c} \mathbf {J} _ {A} ^ {(i)} & \mathbf {J} _ {B} ^ {(i)} \end{array} \right], \tag {7} +$$ + +where $\Lambda_{\theta}^{(i)}$ is a symmetric positive semi-definite matrix with 7 degrees of freedom, and $\Lambda_{AA}^{(i)},\Lambda_{BB}^{(i)},\Lambda_{AB}^{(i)}$ are blocks of $\Lambda_{\theta}^{(i)}$ corresponding to $\pmb{\theta}_{A}$ and $\pmb{\theta}_{B}^{(i)}$ . + +Note that we will work directly with the information matrix $\Lambda_{\theta}^{(i)}$ and not the covariance matrix, since the covariance matrix requires a pseudo-inversion of dense matrix $\Lambda_{\theta}^{(i)} \in \mathbb{R}^{\hat{k}^{(i)} \times \hat{k}^{(i)}}$ ( $\hat{k}^{(i)}$ is the number of parameters $\hat{\theta}^{(i)}$ ) leading to numerical instabilities. Further, we define a transformation matrix $\mathsf{S}^{(i)}$ such that the covariance related to the common parameters $\pmb{\theta}_{A}$ is independent from $\pmb{\theta}_{B}^{(i)}$ , i.e. + +$$ +\left[ \begin{array}{c c} \Lambda_ {A} ^ {(i)} & 0 \\ 0 & \Lambda_ {B} ^ {(i)} \end{array} \right] = \mathbf {S} ^ {(i)} \left[ \begin{array}{c c} \Lambda_ {A A} ^ {(i)} & \left(\Lambda_ {A B} ^ {(i)}\right) ^ {\mathsf {T}} \\ \Lambda_ {A B} ^ {(i)} & \Lambda_ {B B} ^ {(i)} \end{array} \right] (\mathbf {S} ^ {(i)}) ^ {\mathsf {T}}, \tag {8} +$$ + +where the matrix $\mathsf{S}^{(i)}$ is + +$$ +\mathbf {S} ^ {(i)} = \left[ \begin{array}{c c} 1 & - \left(\Lambda_ {A B} ^ {(i)}\right) ^ {\top} \left(\Lambda_ {B B} ^ {(i)}\right) ^ {- 1} \\ 0 & 1 \end{array} \right]. \tag {9} +$$ + +The matrices 1 in (9) are identity matrices of suitable sizes. The submatrix $\Lambda_A^{(i)}$ has the same dimension $\hat{k}_A$ for all $n$ tested camera models $M_i$ , i.e. $\hat{k}_A = \mathcal{D}(\Lambda_A^{(i)}) = \mathcal{D}(\Lambda_A^{(j)}), \forall i, j \in \{1, \dots, n\}$ . This way we specified the gauge of the coordinate system as well as the gauge of the covariance matrix. We can express $\Lambda_A^{(i)}$ from the previous equations as the Schur complement of a block matrix, i.e. + +$$ +\Lambda_ {A} ^ {(i)} = \Lambda_ {A A} ^ {(i)} - \left(\Lambda_ {A B} ^ {(i)}\right) ^ {\top} \left(\Lambda_ {B B} ^ {(i)}\right) ^ {- 1} \Lambda_ {A B} ^ {(i)}. \tag {10} +$$ + +Let us denote the Moore-Penrose (MP) inversion by ${}^{+}$ . The largest eigenvalue $\lambda_{max}(\Sigma_A^{(i)})$ of the covariance matrix $\Sigma_A^{(i)} = (\Lambda_A^{(i)})^+$ is the squared magnitude of the main diagonal of the equiprobability ellipsoid defined by $\Sigma_A^{(i)}$ , i.e. the variance of the most uncertain parameter in $\hat{\pmb{\theta}}_A^{(i)}$ [13, p.32]. + +The computation of $\Sigma_A^{(i)}$ is challenging [33]. Therefore, we use the relationship of $\Sigma_A^{(i)}$ and $\Lambda_A^{(i)}$ to overcome this problem. The scene has exactly seven degrees of freedom (i.e. all the parameters can be translated, rotated and scaled without changing the reprojection error). Let us assume that the $\lambda$ function returns the eigenvalues in ascending order. Therefore the first seven eigenvalues are zero, $\lambda_{1\dots 7}(\Lambda_A^{(i)}) = \lambda_{1\dots 7}(\Sigma_A^{(i)}) = 0$ , and other eigenvalues are + +$$ +\lambda_ {\hat {k} _ {A} ^ {(i)} - j} \left(\Sigma_ {A} ^ {(i)}\right) = \frac {1}{\lambda_ {8 + j} \left(\Lambda_ {A} ^ {(i)}\right)} \forall j \in \{0, \dots , \hat {k} _ {A} ^ {(i)} - 8 \}. \tag {11} +$$ + +Having a degenerate configuration can be detected by the condition number $\Lambda_A^{(i)}$ and the eight eigenvalue $\lambda_8(\Lambda_A^{(i)})$ is related to the most uncertain parameter. This is the reason why we may use $\lambda_8(\Lambda_A^{(i)})$ as a meaningful accuracy criterion. However, we propose to use the trace + +$$ +\mathrm {A C} = \operatorname {t r} \left(\Lambda_ {A} ^ {(i)}\right). \tag {12} +$$ + +instead of $\lambda_8(\Lambda_A^{(i)})$ . The sum of all eigenvalues of $\Sigma_A^{(i)}$ for each individual reconstruction $\hat{\pmb{\theta}}^{(i)}$ is the sum of all variances of the parameters, i.e. a smaller number means that the parameters are more accurately determined on average. Since $\mathrm{tr}(\Lambda_A^{(i)})$ equals $1 / \mathrm{tr}(\Sigma_A^{(i)})$ , larger values correspond to more accurate reconstructions. The advantage of using $\mathrm{tr}(\Lambda_A^{(i)})$ instead of $\lambda_8(\Lambda_A^{(i)})$ lies in computational efficiency. It is enough to compute the diagonal of $\Lambda_A^{(i)}$ . + +# 6. Camera model selection method (ACS) + +Our ACS method selects the camera model with the largest AC (12), see Algorithm 1. To evaluate AC, we need to calculate the parameters $\hat{\theta}^{(i)}$ for each model $M_{i}\in \mathcal{M}$ and the covariance matrix $\Sigma_{u}$ of the observations. According to our experiments, it is sufficient to use $5\leq K\leq 15$ registered cameras to estimate the camera model reliably. We run the SfM such that it first tries to register given $K$ cameras and only if it fails it moves to other cameras. If the geometry between images fits the model $M_{i}$ , the SfM pipeline will register all given $K$ cameras in the predefined order. If the model does not fit the data, SfM usually tries to register other cameras, which usually takes long time. We denote the fastest reconstruction time needed to register $K$ images as $T_{1}$ and stop the other SfM processes when time limit $T_{d} = \gamma T_{1}$ is reached. Here $\gamma$ is set empirically based on the input data and the difference between the simplest + +Input: A finite set of images $Z = \{Z_{1}, Z_{2}, \ldots, Z_{U}\}$ ; reprojection threshold $\delta$ ; the number of registered cameras $K$ ; time factor $\gamma$ ; a finite set of camera models $\mathcal{M} = \{M_{1}, M_{2}, \ldots, M_{n}\}$ + +Output: the selected camera model $M_{b}$ ; calibration parameters for the selected model $\hat{\theta}_{b}$ + +$$ +T _ {d} \leftarrow \infty , Q \leftarrow \varnothing , \mathrm {A C} \leftarrow \varnothing +$$ + +$$ +O \leftarrow \operatorname {g e t} _ {\text {r e g i s t r a t i o n}} \operatorname {o r d e r} (Z) +$$ + +$$ +/ / \quad r u n \quad i n \quad p a r a l l e l \quad u n t i l \quad T _ {d} \quad e l a p s e s +$$ + +$$ +\text {f o r} i \leftarrow 1 t o n d o +$$ + +$$ +\begin{array}{l} \left[ \hat {\boldsymbol {\theta}} ^ {(i)}, T _ {1} \right] \leftarrow \operatorname {S f M} (Z, M _ {i}, \delta , K, O) \\ \text {i f} T _ {d} = \infty \text {t h e n} \\ \mid T _ {d} \leftarrow \gamma T _ {1} \\ \text {e n d} \\ Q \leftarrow \{Q, \hat {\boldsymbol {\theta}} ^ {(i)} \} \end{array} +$$ + +end + +$$ +/ / \quad f i n i s h e d \quad s u b - r e c o n s t r u c t i o n s \quad Q +$$ + +$$ +\bar {\theta} \leftarrow \operatorname {g e t \_ l a r g e s t \_ r e c o n s t r u c t i o n} (Q) +$$ + +$$ +S _ {A} \leftarrow \operatorname {f i n d} _ {\text {c o m m o n}} \operatorname {p a r a m e t e r s} (Q) +$$ + +$$ +\mathbf {f o r} \hat {\boldsymbol {\theta}} ^ {(i)} \in Q \mathbf {d o} +$$ + +$$ +\left| \begin{array}{l} \hat {\boldsymbol {\theta}} \leftarrow \text {a l i g n - c o o r d i n a t e s} (\hat {\boldsymbol {\theta}} ^ {(i)}, \bar {\boldsymbol {\theta}}) \\ \left[ \hat {\boldsymbol {\theta}} _ {A}, \hat {\boldsymbol {\theta}} _ {B} \right] \leftarrow \text {s p l i t - p a r a m e t e r s} (\hat {\boldsymbol {\theta}}, S _ {A}) \\ \left[ J _ {A}, J _ {B} \right] \leftarrow \text {g e t - d e r i v a t i v e s} (M _ {i}, \hat {\boldsymbol {\theta}} _ {A}, \hat {\boldsymbol {\theta}} _ {B}) \\ \left[ \Lambda_ {A A}, \Lambda_ {A B}, \Lambda_ {B B} \right] \leftarrow \text {g e t - i n f o r m - m a t} (\left[ J _ {A}, J _ {B} \right]) \\ \Lambda_ {A} ^ {(i)} \leftarrow \text {g e t - s c h u r - c o m p l e m e n t} (\left[ \Lambda_ {A A}, \Lambda_ {A B}, \Lambda_ {B B} \right]) \\ \mathbf {A C} \leftarrow \{\mathbf {A C}, \operatorname {t r} (\Lambda_ {A} ^ {(i)}) \} \end{array} \right. +$$ + +end + +$$ +M _ {b} \leftarrow \text {s e l e c t} _ {\text {m o d e l}} (\mathrm {A C}, \mathcal {M}) +$$ + +Algorithm 1: The ACS method: SfM $(Z,M_{i},\delta ,K,O)$ applies SfM with camera model $M_{i}$ and reprojection error threshold $\delta$ until $K$ images from the queue $O$ are registered or time limit $T_{d}$ is exceeded. align_coordinates $(\hat{\theta},\bar{\theta})$ specifies the gauge of the coordinates via the transformation between the coordinate systems $\hat{\pmb{\theta}}$ and $\bar{\pmb{\theta}}$ . split_parameters $(\hat{\theta},S_A)$ splits the parameters into common parameters $S_{A}$ for all models $\hat{\pmb{\theta}}_A$ and the remaining parameters $\hat{\pmb{\theta}}_B$ . get.derivatives $(M_i,\hat{\pmb{\theta}}_A,\hat{\pmb{\theta}}_B)$ computes partial derivatives for a given model $M_{i}$ and the estimated parameters $\hat{\pmb{\theta}}_A,\hat{\pmb{\theta}}_B$ . get_inform_mat $[\mathrm{J}_A,\mathrm{J}_B]$ uses equation 7 to compute blocks of the information matrix $\Lambda_{\theta}^{(i)}$ . get_schur_complement([ $\Lambda_{AA},\Lambda_{AB},\Lambda_{BB}]$ ) applies equation 10 to compute $\Lambda_A^{(i)}$ . select_model(AC, $\mathcal{M}$ ) selects the model with the largest accuracy criterion AC. + +and the most complex model from $\mathcal{M}$ . The models that were not able to register $K$ images within $T_{d}$ time are discarded. After the sub-reconstructions are found we select a subset of parameters common to all sub-reconstructions $\theta_{A} \subseteq \theta^{(i)}, \forall i$ . + +# 7. Learned threshold (LACS) + +The model selected by the proposed ACS method depends on a threshold on the weighted residuals $\bar{e}_{l,m}$ , see Fig. 4, + +$$ +\bar {\boldsymbol {e}} _ {l, m} = \sqrt {(\hat {\boldsymbol {u}} _ {l , m} - \boldsymbol {u} _ {l , m}) ^ {\mathsf {T}} \Sigma_ {u _ {l , m}} ^ {- 1} (\hat {\boldsymbol {u}} _ {l , m} - \boldsymbol {u} _ {l , m})}. \tag {13} +$$ + +For different thresholds, different camera models may be selected. On the other hand, the values of the AC criterion for different inlier thresholds provide additional information for improving the robustness of the ACS method. Here we use this information and propose a learning-based extension of the ACS method (LACS). Our LACS method will take the values of the AC criteria for different thresholds as input and will output the "best" camera model. To obtain the input data for our network, the parameters (3D reconstructions) $\hat{\pmb{\theta}}^{(i)}$ are estimated for each considered camera model for the largest reasonable threshold, e.g. $\delta = 2\mathrm{px}$ . Having $\hat{\pmb{\theta}}^{(i)}$ for the threshold $\delta$ , we can assign inlier/outlier labels to all input observations for thresholds smaller than $\delta$ , e.g. $\{0.5, 1, 1.5, 2\}\mathrm{px}$ . Then, we can easily evaluate the values of AC for each camera model and each threshold from this set of thresholds. + +The values of the AC criterion for each tested camera model and each threshold, i.e. the $\widetilde{n}$ values from the matrix of size (number of tested camera models $n$ ) $\times$ (number of assumed thresholds $N_{thr}$ ), are the input to our shallow neural network. This network consisting of 4 hidden fully connected layers (with dimensions: $d_0 = \widetilde{n}$ , $d_{1,2} = \widetilde{n} /2$ , $d_{3,4} = n$ ), each followed by leaky ReLU [2] activations. The proposed network learns to identify the "best" camera model based on the AC scores obtained for the different reprojection error thresholds, see Fig. 4 and 1. + +# 8. Experimental evaluation + +We evaluate the estimation of a camera model on synthetic and real datasets. Run-time experiments were performed on a single computer with the AMD Ryzen 7 1700X processor. We used COLMAP [39] to compute the SfM models and USfM [33] for computing the Jacobians $\mathbf{J}_A^{(i)},\mathbf{J}_B^{(i)}$ for all considered camera models $M_{i},i\in \{1,\ldots ,n\}$ + +**Cameras.** To generate realistic synthetic experiments we used a set of eight real cameras consisting of low-cost web-cameras, cellphones, fish-eye and DSLR cameras. We calibrated these cameras using a checkerboard and camera models $M_{0|0}$ , $M_{1|0}$ , $M_{2|0}$ , $M_{3|0}$ , $M_{4|0}$ , $M_{1|1}$ , $M_{2|2}$ and $M_{3|3}$ . The obtained parameters were used in synthetic experiments. The table with all calibration parameters is in the suppl. material. + +The datasets The synthetic datasets were created based on 13 publicly available ETH datasets [40] with 14-76 images, + +![](images/cdfcefddee1b4106505293c44c7e11f6b5801f575ac8fd6e31274e51525a623c.jpg) +Figure 2: Success rates of different ICs (c.f. Table 1) for correctly estimating the degree of a polynomial. Each polynomial was fitted in a statistically optimal way from 100 measurements $\widetilde{y} = \widetilde{f}(\widetilde{x}) + \widetilde{\epsilon}$ with noise $\widetilde{\epsilon} \in \mathcal{N}(0, \widetilde{\sigma}^2)$ , where $\widetilde{\sigma}^2 = [10^{-2}, 10^{-3}, 10^{-4}]$ for [solid, dashed, dotted] line. + +2k-85k 3D points and 50k-795k observations. The 3D points supplied with the ETH datasets were projected into virtual cameras with poses equal to the provided ground truth camera poses and internal parameters taken from our own calibration of the 8 real cameras. We added random noise with distribution $\mathcal{N}(0, \Sigma_{u_{i,j}})$ to the projections. To obtain realistic covariance estimates for image points we used the scaled inversion of the structure tensor [13] of the affine regions [12] to extract 4,5M covariances $\Sigma_{u_{i,j}}$ from 454 images of the ETH dataset. These covariances were randomly assigned to projections $\hat{\boldsymbol{u}}_{i,j}$ to generate 100 new datasets (i.e., 2839 images and 10,3M keypoints). The real datasets comprise of the ETH datasets and the well known KITTI [14] dataset. In the following we provide a detailed analysis of results on one of the ETH datasets (terrains_rig) and one from KITTI (2011_09_26.drive_0001). The remaining results and a detailed summary of all parameters of the datasets are provided in the suppl. material. + +# 8.1. Synthetic experiments + +This section compares our ACS and LACS with conventional ICs. We start with the task of polynomial fitting to demonstrate the generality of our AC and the properties of ICs on task with a regular statistical model [48]. We generated $120k$ polynomials and let ICs decide the polynomial degree, i.e. $\{1,2,3,4\}$ . Our ACS method reached on average $94.1\%$ correctly estimated degrees of polynomials, which is comparable with classical ICs, see Fig. 2. More details about polynomial fitting are in the suppl. material. Further, in this section, we show how employing the covariance matrices of the observations increases the number of correctly identified inliers and the results of camera model selection on synthetically generated datasets. + +![](images/f0a4173ce7d1707fd1f3eafb1e0e7ebf44be6b8018707f9a61729332c1f8ba64.jpg) +Figure 3: True positive (TP) and false positive (FP) inliers for residual threshold (RT) and weighted residual threshold (WRT). [solid;dashed;dotted] lines corresponds to $[10\%; 30\%; 50\%]$ of mismatches. + +![](images/09a4fe4d2b165ac3a52c1c8f0e38a6be55b41bc34610da26332a1e0c00d0a717.jpg) +Figure 4: Success rates of the information criteria for camera model selection. The lines {solid, long dashed, short dashed, doted} correspond to a weighted reprojection error threshold of $\{0.5, 1, 1.5, 2\}$ px. LACS uses all thresholds. + +The outlier filtering in SOTA reconstruction pipelines [39, 45, 29] is done by thresholding the reprojection errors without taking the uncertainty of the observations [49, 13] into account. We empirically show that considering the uncertainty leads to significant increase in the number of correctly identified inliers. We generated mismatches by permuting the 3D point indices in $S$ , see Equation 2. We permuted $\{10\%, 30\%, 50\% \}$ of both randomly and systematically chosen ids. For random permutations, we get zero false positive inliers and an increase of about $19.4\%$ for true inliers for a 1.6px reprojection error threshold, see Fig. 3. Real reconstruction errors were simulated systematically by permuting pairs of observations $\boldsymbol{u}_t$ , $\boldsymbol{u}_s$ with the smallest distance between each other $\| \boldsymbol{u}_t - \boldsymbol{u}_s \|$ . For all amounts of outliers ( $\{10\%, 30\%, 50\% \}$ ), the number of true positive inliers increased, e.g., for $\delta = 1.6\mathrm{px}$ the number of true positive inliers increased by $31.7\%$ . The threshold for reprojection error without uncertainty consideration produces approximately the same amount of true inliers for $\delta = 4\mathrm{px}$ . However, it also increases the false positives by about $9.7\%$ , see Fig. 3. + +Camera model estimation was tested on 1k synthetic scenes for each of the camera models $\{M_{0|0}, M_{1|0}, M_{2|0}, M_{3|0}, M_{4|0}\}$ and for $K \in \{5,10,15\}$ . These models correspond to the set of most commonly used radial distortion models in SfM pipelines. The synthetic scenes where composed by using $K - 1$ neighbouring cameras around one randomly selected camera in our synthetic datasets. Next, we added up to $20\%$ of outliers by systematic permutation (see above) of 3D points ids in $S$ to simulate real reconstruction errors. Each synthetic scene was examined with all ICs from Table 1, ACS and LACS. The success rate of correctly selected camera models is shown in Fig. 4. + +Further, we trained our LACS classification network (CN) in PyTorch [32] using all synthetic datasets from the previous experiments, see results in Table 2. We split the + +![](images/a1417a862934a55c06a7b66932721c76df89b10b89cd2413158c60c36bdc77ff.jpg) + +
ACS for δ = 2pxLACS
0.840.130.010.010.010.960.020.020.000.00
0.100.720.120.040.020.000.950.050.000.00
0.040.190.630.090.060.000.100.900.000.00
0.000.010.030.810.140.000.000.000.980.02
0.080.020.040.040.830.000.000.020.060.92
+ +Table 2: Confusion matrices for ACS and LACS methods evaluated on synthetic data, see Fig. 4. The ACS method selects the camera model with the largest AC for a threshold $\delta = 2\mathrm{px}$ . The LACS profits from all thresholds of reprojection errors $\delta \in \{0.5,1,1.5,2\}\mathrm{px}$ . Rows correspond to the ground truth models and columns to the selected camera models from the set $\{M_{0|0}, M_{1|0}, M_{2|0}, M_{3|0}, M_{4|0}\}$ . + +datasets into training, validation and evaluation parts with respective ratios [0.8, 0.1, 0.1]. The input to the CN were the values of ACS normalized by the function + +$$ +f _ {\text {n o r m}} \left(\boldsymbol {x} _ {j}\right) = \alpha \frac {\left(\boldsymbol {x} _ {j} - \operatorname* {m i n} \left(\boldsymbol {x} _ {j}\right)\right)}{\left(\operatorname* {m a x} \left(\boldsymbol {x} _ {j}\right) - \operatorname* {m i n} \left(\boldsymbol {x} _ {j}\right)\right)} + \beta \tag {14} +$$ + +where $\alpha = 4$ , $\beta = 1$ and $\pmb{x}_j$ denotes j-th column of an input sample, i.e. the ACS values for one of the thresholds $\delta \in \{0.5, 1, 1.5, 2\}\mathrm{px}$ . We used the Adam [22] optimizer with learning rate $lr = 10^{-4}$ and standard Cross Entropy Loss function. To avoid overfitting, we trained for 4k epochs and select the model with lowest validation loss. + +The model classifier dependence on the number of images is shown in Table 3. The accuracy is naturally growing with an increasing number of observations [33] and the differences between camera models become more obvious, see Fig. 5. We show, using a large set of simulated datasets, that small sub-reconstructions, e.g. with 15 images, are descriptive enough to make decisions about the camera model. More images and more thresholds can be used to achieve a higher accuracy of camera model classification in practise. + +
Classifier / K51015
ACS [0.5px]0.470.530.51
ACS [1.0px]0.550.650.66
ACS [1.5px]0.560.700.70
ACS [2.0px]0.480.680.76
LACS0.680.830.93
+ +Table 3: The success ratios of the ACS and LACS classifiers w.r.t. an increasing number of registered cameras $K$ . + +# 8.2. Real experiments + +This section compares results of the COLMAP pipeline [39] with and without the proposed camera model selection methods, see Table 4 and Fig. 1, 5. The COLMAP reconstruction process follows several steps. First, we select the initial pair and the order of the images for registration into the partial reconstructions. Second, COLMAP registers new cameras, triangulates 3D points and optimizes the partial reconstruction using Bundle Adjustment (BA) [3]. Third, the partial reconstruction is checked for degeneracies and 3D points are filtered if they do not satisfy several conditions, e.g. a minimal triangulation angle, an absolute reprojection error. Fourth, the registered cameras are filtered if they do not contain enough 2D-3D correspondences. We observed that the run-time for sub-optimal camera models is larger than in the optimal case. This is caused mostly either by overfitting of unnecessary camera parameters in the case of more complex camera models or by repetitive cycles of adding, optimizing, and removing of 3D points in the case of too simple camera models. If the camera model is too overparameterized, we observe that all the 3D points are usually removed after the registration of few (e.g., $< 15$ ) cameras and the reconstruction starts from scratch. These unsuccessful trials increased the reconstruction time from 175.7sec to 1545sec in case of the terrains_rig dataset [40]. Our methods ACS and LACS overcome these problems by automatic selection of the camera model. The time overhead for preprocessing (e.g., $T_{d} = 40$ sec for terrains_rig) is negligible in comparison with the increase of the reconstruction time, e.g., 451.1sec for $M_{1|0}$ or 894.5sec for $M_{0|0}$ . Note, this speedup was measured for 165 cameras and will be much larger in case of thousands of images. The ACS and LACS methods are developed to select the model with the most accurate reconstruction parameters, and they also provide the intrinsic calibration parameters. We can see that these parameters lead to more accurate reconstruction, Table 4. We observed the same properties on all 13 ETH datasets [40]. These experiments are visualised and summarised in the suppl. material. The actual AC values for $\delta = 2$ are visualised in Fig. 5 showing larger AC values for the more accurate reconstructions from Fig. 1. + +![](images/37db87a16ea1dc102e6d6761b0ac0f85e496fb58ee4524fdb5effce5b748568e.jpg) + +Figure 5: The dependence of AC criteria on iterations for the terrains_rig dataset [40] for 1-15 registered cameras. + +
MT1TallUVN√R/NQ
M0|07.01070.2346.764.10.72.5
M1|032.0626.816517.5210.50.97.0
M2|016.9212.716517.5210.90.86.4
M3|017.6175.716517.3210.20.73.1
M4|029.5215.116517.2209.60.73.7
M1|112.0172.316517.2209.60.73.5
M2|294.71443.816517.3210.10.83.7
M3|383.41545.0184.327.00.50.8
M0|0113.51323.611434.4305.40.8-
M1|091.71401.311452.3424.20.6-
M2|084.21407.111464.7502.70.6-
M3|0105.71272.211466.2504.50.6-
M4|0-2238.4000--
M1|1206.11628.011464.7496.70.6-
M2|2-431.2127.6104.80.4-
M3|3-1543.2000--
+ +Table 4: Evaluation on the terrains_rig [40] (with GT) and 2011_09_26drive_0001 KITTI [14] (without GT) datasets. COLMAP [40] was used with a 2px reprojection error threshold. $T_{1}$ [sec] is the time for registering $K$ cameras, $T_{all}$ [sec] is the run-time of SfM, $U$ is the number of registered cameras, $V$ and $N$ are the number of 3D points and number of observations (in thousands), $\frac{\sqrt{R}}{N} [px]$ is the mean reprojection error, and $Q[cm]$ is the mean distance of the estimated camera centres to the GT. Camera models $M$ which exceed the time limit $T_{d} = \gamma T_{1}$ (where $\gamma = 5$ ) for registering $K = 15$ cameras are red, the best values are bold, and the model selected by LACS is inside a rectangle. + +# 9. Conclusion + +We have presented a new practical method for the automatic selection of camera models in SfM pipelines. Our approach combines principled design with machine learning-based fine-tuning to achieve good results that go beyond the state of the art. We show that our approach achieves superior performance on publicly available data sets for 3D reconstruction. Our data and codes are available at https://github.com/michalpolic/unc_model_selection. + +# References + +[1] Capturing Reality. https://www.capturingreality.com/. 1 +[2] A. F. Agarap. Deep learning using rectified linear units (relu). arXiv preprint arXiv:1803.08375, 2018. 6 +[3] S. Agarwal, K. Mierle, and Others. Ceres solver. http://ceres-solver.org.8 +[4] H. Akaike. A new look at the statistical model identification. In Selected Papers of Hirotugu Akaike, pages 215-222. Springer, 1974. 2, 3, 4 +[5] C. Albl, A. Sugimoto, and T. Pajdla. Degeneracies in rolling shutter sfm. In European Conference on Computer Vision, pages 36-51. Springer, 2016. 1 +[6] AliceVision. Meshroom: A 3D reconstruction software., 2018. 1, 3 +[7] H. S. Alismail, B. Browning, and M. B. Dias. Evaluating pose estimation methods for stereo visual odometry on robots. In the 11th International Conference on Intelligent Autonomous Systems (IAS-11), January 2011. 1 +[8] P. Bouthemy, B. M. T. Acosta, and B. Delyon. Robust model selection in 2d parametric motion estimation. Journal of Mathematical Imaging and Vision, pages 1-15, 2019. 2, 3, 4 +[9] H. Bozdogan. Model selection and akaike's information criterion (aic): The general theory and its analytical extensions. Psychometrika, 52(3):345-370, 1987. 2, 3, 4 +[10] M. Brown, G. Hua, and S. Winder. Discriminative learning of local image descriptors. IEEE transactions on pattern analysis and machine intelligence, 33(1):43-57, 2011. 3 +[11] K. P. Burnham and D. R. Anderson. A practical information-theoretic approach. Model selection and multimodel inference, 2nd ed. Springer, New York, 2002. 2 +[12] J. Dong and S. Soatto. Domain-size pooling in local descriptors: Dsp-sift. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5097-5106, 2015. 3, 6 +[13] W. Förstner and B. P. Wrobel. Photogrammetric Computer Vision. Springer, 2016. 3, 4, 5, 6, 7 +[14] A. Geiger, P. Lenz, C. Stiller, and R. Urtasun. Vision meets robotics: The kitti dataset. International Journal of Robotics Research (IJRR), 2013. 6, 8 +[15] R. K. Hamad, B. Hamed, and H. Hassonny. The automatic selection of radial distortion models. International Journal of Computer Applications, 975:8887. 2 +[16] E. J. Hannan and B. G. Quinn. The determination of the order of an autoregression. Journal of the Royal Statistical Society: Series B (Methodological), 41(2):190-195, 1979. 2, 3, 4 +[17] R. Hartley and A. Zisserman. Multiple view geometry in computer vision. Cambridge university press, 2003. 2 +[18] J. Heinly, E. Dunn, and J.-M. Frahm. Comparative evaluation of binary features. In European Conference on Computer Vision, pages 759-773. Springer, 2012. 3 +[19] C. M. Hurvich and C.-L. Tsai. A corrected akaike information criterion for vector autoregressive model selection. Journal of time series analysis, 14(3):271-279, 1993. 2, 3, 4 +[20] K.-i. Kanatani. Uncertainty modeling and model selection for geometric inference. IEEE Transactions on Pattern Anal- + +ysis and Machine Intelligence, 26(10):1307-1319, 2004. 1, 2, 3, 4 +[21] K.-i. Kanatani and D. D. Morris. Gauges and gauge transformations for uncertainty description of geometric structure with indeterminacy. IEEE Transactions on Information Theory, 47(5):2017-2028, 2001. 1 +[22] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 7 +[23] K. Kinoshita and L. Lindenbaum. Camera model selection based on geometric aic. In Proceedings IEEE Conference on Computer Vision and Pattern Recognition. CVPR 2000 (Cat. No. PR00662), volume 2, pages 514-519. IEEE, 2000. 2 +[24] Z. Kukelova, J. Heller, M. Bujnak, A. Fitzgibbon, and T. Pajdla. Efficient solution to the epipolar geometry for radially distorted cameras. In Proceedings of the IEEE international conference on computer vision, pages 2309-2317, 2015. 1 +[25] V. Larsson, T. Sattler, Z. Kukelova, and M. Pollefeys. Revisiting radial distortion absolute pose. In Proceedings of the IEEE International Conference on Computer Vision, pages 1062-1071, 2019. 1, 3 +[26] J. A. Machado. Robust model selection and m-estimation. Econometric Theory, 9(3):478-493, 1993. 2, 4 +[27] C. L. Mallows. Some comments on c p. Technometrics, 15(4):661-675, 1973. 4 +[28] K. Mikolajczyk, T. Tuytelaars, C. Schmid, A. Zisserman, J. Matas, F. Schaffalitzky, T. Kadir, and L. Van Gool. A comparison of affine region detectors. International journal of computer vision, 65(1-2):43-72, 2005. 3 +[29] P. Moulon, P. Monasse, R. Marlet, and Others. Openmvg. an open multiple view geometry library. https://github.com/openMVG/openMVG.7 +[30] D. Nistr, O. Naroditsky, and J. Bergen. Visual odometry. In Computer Vision and Pattern Recognition (CVPR), pages 652-659, 2004. 1 +[31] V. Orekhov, B. Abidi, C. Broaddus, and M. Abidi. Universal camera calibration with automatic distortion model selection. In 2007 IEEE International Conference on Image Processing, volume 6, pages VI-397. IEEE, 2007. 2 +[32] A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. Devito, Z. Lin, A. Desmaison, L. Antiga, and A. Lerer. Automatic differentiation in pytorch. 2017. 7 +[33] M. Polic, W. Forstner, and T. Pajdla. Fast and accurate camera covariance computation for large 3d reconstruction. In Proceedings of the European Conference on Computer Vision (ECCV), pages 679-694, 2018. 5, 6, 7 +[34] J. Rissanen. Modeling by shortest data description. Automatica, 14(5):465-471, 1978. 2, 3, 4 +[35] J. Rissanen. Universal coding, information, prediction, and estimation. IEEE Transactions on Information theory, 30(4):629-636, 1984. 2, 3, 4 +[36] I. Rocco, M. Cimpoi, R. Arandjelovi, A. Torii, T. Pajdla, and J. Sivic. Neighbourhood consensus networks, 2018. 1 +[37] E. Ronchetti. Robust model selection in regression. Technical report, PRINCETON UNIV NJ DEPT OF STATISTICS, 1984. 2, 4 +[38] T. Sattler, B. Leibe, and L. Kobbelt. Efficient & effective prioritized matching for large-scale image-based localization. + +IEEE Trans. Pattern Anal. Mach. Intell., 39(9):1744-1756, 2017. 1 +[39] J. L. Schonberger and J.-M. Frahm. Structure-from-motion revisited. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 1, 3, 6, 7, 8 +[40] T. Schöps, J. L. Schonberger, S. Galliani, T. Sattler, K. Schindler, M. Pollefeys, and A. Geiger. A multi-view stereo benchmark with high-resolution images and multicamera videos. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 1, 6, 8 +[41] G. Schwarz et al. Estimating the dimension of a model. The annals of statistics, 6(2):461-464, 1978. 2, 3, 4 +[42] N. Snavely, S. M. Seitz, and R. Szeliski. Photo tourism: exploring photo collections in 3D. In ACM SIGGRAPH'06, 2006. 1 +[43] N. Snavely, S. M. Seitz, and R. Szeliski. Modeling the world from internet photo collections. International Journal of Computer Vision (IJCV), 80(2):189-210, 2008. 1 +[44] L. Sväröm, O. Enqvist, F. Kahl, and M. Oskarsson. City-scale localization for cameras with known vertical direction. IEEE transactions on pattern analysis and machine intelligence, 39(7):1455-1461, 2017. 1 +[45] C. Sweeney. Theia multiview geometry library: Tutorial & reference. http://theia-sfm.org. 3, 7 +[46] H. Taira, M. Okutomi, T. Sattler, M. Cimpoi, M. Pollefeys, J. Sivic, T. Pajdla, and A. Torii. InLoc: Indoor visual localization with dense matching and view synthesis. In cvpr, 2018. 1 +[47] T. Tuytelaars, K. Mikolajczyk, et al. Local invariant feature detectors: a survey. Foundations and trends in computer graphics and vision, 3(3):177-280, 2008. 3 +[48] S. Watanabe. A widely applicable bayesian information criterion. Journal of Machine Learning Research, 14(Mar):867-897, 2013. 1, 2, 6 +[49] B. Zeisl, P. F. Georgel, F. Schweiger, E. G. Steinbach, N. Navab, and G. Munich. Estimation of location uncertainty for scale invariant features points. In BMVC, pages 1-12, 2009. 7 \ No newline at end of file diff --git a/uncertaintybasedcameramodelselection/images.zip b/uncertaintybasedcameramodelselection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3720b29860752b8f5681a200a7191ade8f720fe0 --- /dev/null +++ b/uncertaintybasedcameramodelselection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60c2bda4e5e81244ef5e49cecee799017ff45611263ff499b13a1af74aa30159 +size 487834 diff --git a/uncertaintybasedcameramodelselection/layout.json b/uncertaintybasedcameramodelselection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..59f70dfcaf6457082e163e3b2832f2a55b4db9c6 --- /dev/null +++ b/uncertaintybasedcameramodelselection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3297752a346a0f966d9f0d1bc31e3344395916182c362740b4ac282ef19cb4e +size 563294 diff --git a/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/8dc1a61b-ec7c-43e6-b2d1-8a8f17fd63c4_content_list.json b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/8dc1a61b-ec7c-43e6-b2d1-8a8f17fd63c4_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e2d66f3754cf4a7d6585e1cd74564501c5af2801 --- /dev/null +++ b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/8dc1a61b-ec7c-43e6-b2d1-8a8f17fd63c4_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:359ef7a40a7d1d744d399df9eab79cf2ef866fcc24b887ab6508c88c43db0e5e +size 85195 diff --git a/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/8dc1a61b-ec7c-43e6-b2d1-8a8f17fd63c4_model.json b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/8dc1a61b-ec7c-43e6-b2d1-8a8f17fd63c4_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6b21d9f7e688301b807b350320219735d5ad3438 --- /dev/null +++ b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/8dc1a61b-ec7c-43e6-b2d1-8a8f17fd63c4_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50595bfbc09715357ce1de17fae4667d1b970cd13a13fe6684751d9028163dda +size 105329 diff --git a/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/8dc1a61b-ec7c-43e6-b2d1-8a8f17fd63c4_origin.pdf b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/8dc1a61b-ec7c-43e6-b2d1-8a8f17fd63c4_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4a77639b87f64d7074410992fd1b138a1dd012bc --- /dev/null +++ b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/8dc1a61b-ec7c-43e6-b2d1-8a8f17fd63c4_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36f4f4c6de69d8bbb642f7ca4af3d5f147f2fea436e723db416fea6b5c94a5a8 +size 4248379 diff --git a/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/full.md b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0ed266b491413b467295674564e736bc9af1a2a4 --- /dev/null +++ b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/full.md @@ -0,0 +1,367 @@ +# Understanding Adversarial Examples from the Mutual Influence of Images and Perturbations + +Chaoning Zhang* + +chaoningzhang1990@gmail.com + +Philipp Benz* + +pbenz@kaist.ac.kr + +Tooba Imtiaz + +timtiaz@kaist.ac.kr + +In-So Kweon + +iskweon@kaist.ac.kr + +* indicates equal contribution + +Robotics and Computer Vision (RCV) Laboratory + +Korea Advanced Institute of Science and Technology (KAIST) + +291 Daehak-ro, Yuseong-gu, Daejeon 34141, Korea + +# Abstract + +A wide variety of works have explored the reason for the existence of adversarial examples, but there is no consensus on the explanation. We propose to treat the DNN logits as a vector for feature representation, and exploit them to analyze the mutual influence of two independent inputs based on the Pearson correlation coefficient (PCC). We utilize this vector representation to understand adversarial examples by disentangling the clean images and adversarial perturbations, and analyze their influence on each other. Our results suggest a new perspective towards the relationship between images and universal perturbations: Universal perturbations contain dominant features, and images behave like noise to them. This feature perspective leads to a new method for generating targeted universal adversarial perturbations using random source images. We are the first to achieve the challenging task of a targeted universal attack without utilizing original training data. Our approach using a proxy dataset achieves comparable performance to the state-of-the-art baselines which utilize the original training dataset. + +# 1. Introduction + +Deep neural networks (DNNs) have shown impressive performance in numerous applications, ranging from image classification [16, 48] to motion regression [8, 47]. However, DNNs are also known to be vulnerable to adversarial attacks [42, 37]. A wide variety of previous works [14, 43, 44, 21, 33, 3] explore the reason for the existence of adversarial examples, but there is a lack of consensus on the explanation [1]. While the working mecha + +![](images/4a6a4de43a975b2c8ccbcb980cc50d6e7623787613d6287483244d7ddb5365b4.jpg) +Figure 1. Based on our observation that adversarial perturbations contain dominant features and images behave like noise to them, we design a new method of generating targeted universal adversarial perturbations without data, by using a proxy dataset. + +nism of DNNs is not fully understood, one widely accepted interpretation considers DNNs as feature extractors [16], which inspires the recent work [17] to link the existence of adversarial examples to non-robust features in the training dataset. + +Contrary to previous works analyzing adversarial examples as a whole (summation of image and perturbation), we instead propose to analyze adversarial examples by disentangling image and perturbations and studying their mutual influence. Specifically, we analyze the influence of two independent inputs on each other in terms of contributing to the obtained feature representation when the inputs are combined. We treat the network logit outputs as a means of feature representation. Traditionally, only the most important logit values, such as the highest logit value for classification tasks, are considered while other values are disregarded. We propose that all logit values contribute to the feature representation and therefore treat them as a + +logit vector. We utilize the Pearson correlation coefficient (PCC) [2] to analyze the extent of linear correlation between logit vectors. The PCC values computed between the logit vectors of each independent input and the input combination gives insight on the contribution of the two independent inputs towards the combined feature representation. Our proposed general analysis framework is shown to be useful for analyzing influence of any two independent inputs, such as images, Gaussian noise, perturbations, etc. In this work, we limit the focus on analyzing the influence of image and perturbation in universal attacks. Our findings show that for a universal attack, the adversarial examples (AEs) are strongly correlated to the UAP, while a low correlation is observed between AEs and input images (see Figure 4). This suggests that for a DNN, UAPs dominate over the clean images in AEs, even though the images are visually more dominant. Treating the DNN as feature extractor, we naturally conclude that the UAP has features that are more dominant compared to the features of the images to attack. Consequently we claim that "UAPs are features while images behave like noise to them". This is contrary to the general perception that treats the perturbation as noise to images in adversarial examples. Our interpretation thus provides a simple yet intuitive insight on the working of UAPs. + +The observation, that images behave like noise to UAPs motivates the use of proxy images to generate targeted UAPs without original training data, as shown in Figure 1. Our proposed approach is more practical because the training data is generally inaccessible to the attacker [32]. Our contributions can be summarized as follows: + +- We propose to treat the DNN logits as a vector for feature representation. These logit vectors can be used to analyze the contribution of features of two independent inputs when summed towards the output. In particular, our analysis results regarding universal attacks reveal that in an AE, the UAP has dominant features, while the image behaves like noise to them. +- We leverage this insight to derive a method using random source images as proxy dataset to generate targeted UAPs without original training data. To our best knowledge, we are the first to fulfill this challenging task while achieving comparable performance to the state-of-the-art baselines utilizing the original training dataset. + +# 2. Related Work + +We summarize previous works with two focuses: (1) explanations of adversarial vulnerability and (2) existing adversarial attack methods. + +Explanation of adversarial vulnerability. Goodfellow et al. attribute the reason of adversarial examples to + +the local linearity of DNNs, and support their claim by their proposed simple yet effective FGSM [14]. However, this linearity hypothesis is not fully compatible with the existence of adversarial examples which violate local linearity [24]. Moreover, it can not fully explain the phenomenon that greater robustness is not observed in less linear classifiers [3, 43, 44]. Another body of works attributes the reason for low adversarial robustness to high-dimensional input properties [40, 10, 25, 13]. However, reasonably robust DNNs of high-dimensional inputs can be trained in practice [24, 36]. One recent work [17] attributes the reason for the existence of adversarial examples to non-robust features in the dataset. Some previous explanations, ranging from limited training data induced over-fitting [39, 44] to robustness under noise [11, 12, 6], are well aligned with their framework [17]. The concept of non-robust features is also implicitly explored in other works [4, 33]. On the other hand, possible reasons for vulnerability against universal adversarial perturbations have been explored in [27, 28, 18, 29]. Their analysis is mainly based on the network decision boundaries, in particular, the existence of universal perturbations is linked to the large curvature of decision boundary. Our work mainly focuses on the explanation of universal adversarial vulnerability. One core aspect that differentiates our analysis framework from previous works is that we explore the influence of images and perturbations on each other, while previous works mainly analyze adversarial example as a whole [27, 28, 18]. We explicitly analyze how the image and perturbations influence each other. Our analysis framework is mainly based on the proposed logit vector interpretation of how DNNs respond to the features in the input, without relying on the curvature property of decision boundaries [27, 28, 18]. + +Existing adversarial attack methods. The existing attacks are commonly categorized under image-dependent attacks [42, 14, 22, 30, 5] and universal (i.e. image-agnostic) attacks [27, 19, 32, 26, 35, 46, 34] which devise one single perturbation to attack most images. Image-dependent attack techniques have been explored in a variety of works ranging from optimization based techniques [42, 5] to FGSM related techniques [14, 22, 7, 45]. Universal adversarial perturbations (UAPs) were first proposed by [27], and deploy the DeepFool attack [30] iteratively on single data samples. Due to the nature of being image-agnostic, universal attacks constitute a more challenging task than image-dependent ones. + +Another way to categorize attacks is non-targeted vs. targeted attacks. Generative targeted universal perturbations have been explored by [35]. Targeted attacks can be seen as a special, but more challenging case of non-targeted attacks. Class discriminative (CD) UAPs were proposed in [46], aiming to fool only a subset of classes. The above mentioned universal attacks require utilization of the original + +training data. However, in practice the attacker often has no access to the training data [32]. To overcome this limitation, Mopuri et al. propose to generate universal perturbation without training data [32]. However, their approach is specifically designed for non-targeted attacks by maximizing the activation scores in every layer, and their performance is inferior to approaches with access to original training data. Another attempt for data-free non-targeted universal attack by training a network to generate proxy images is explored in [38]. No prior work is found to have achieved targeted universal attack without access to the original training data, and our work is the first attempt in this direction. + +# 3. Analysis Framework + +# 3.1. Logit Vector + +Following the common consensus that DNNs are feature extractors, we intend to analyze adversarial examples from the feature perspective. The logit values are often used as an indicator of feature presence in an image. Previous works [18, 17], however, mainly focus only on the DNN highest logit output indicating the predicted class, while all other logits are usually neglected. "Logits" refer to the DNN output before the final softmax layer. In this work, we assume that all DNN output logit values represent the network response to features in the input. One concern about this vector interpretation is that only the logits of the ground-truth classes or other semantically similar classes are meaningful, while the other logits might be just random (small) values and thus do not carry important information. We address this concern after introducing the terms and notation used throughout this work. + +A deep classifier $\hat{C}$ maps an input image $x\in \mathbb{R}^d$ with a pixel range of [0, 1] to an output logit vector $L_{x} = \hat{C}(x)$ . The vector $L_{x}$ has $K$ entries corresponding to the total number of classes. The predicted class $y_{x}$ of an input $x$ can then be calculated from the logit vector as $y_{x} = \arg \max(L_{x})$ . We adopt the logit vector to facilitate the analysis of the mutual influence of two independent inputs in terms of their contribution to the combined feature representation. We mainly consider two independent inputs $a\in \mathbb{R}^d$ and $b\in \mathbb{R}^d$ , which can be images, Gaussian noise, perturbations, etc., whose corresponding logit vectors are denoted as $L_{a}$ and $L_{b}$ , respectively. The summation of these two inputs $c = a + b$ , when fed to a DNN, leads to the feature representation $L_{c}$ . Both inputs $a$ and $b$ contribute partially to $L_{c}$ . Moreover, it is reasonable to expect that the contribution of each input will be influenced by the other one. Specifically, the extent of influence will be reflected in the linear correlation between the individual logit vector $L_{a}$ (or $L_{b}$ ) and $L_{c}$ . + +![](images/f8848e36382bbee068a31f3e703ffc52f8dd4c22257332d6e2a46cebbce97672.jpg) +Egyptian cat $(96.41\%)$ + +![](images/cd8fc4f37b7245fe51d72e158f10011394e2cebc96294f81ca3be9b84b55963e.jpg) +wood rabbit (90.15%) + +![](images/0a130607c4830a97bcbaf17a1820d99af1215a763b957e5c673b6da3ce792c76.jpg) +wood rabbit (75.71%) + +![](images/deca1e39c1e918038ff6113b42643aa05dd093a147ab4fdb725d4f26d6b3b749.jpg) +Figure 2. Images and their logit vector analysis. The first row shows the sample images $a$ and $b$ and the resulting image $c$ . The second row shows the plots of logit vector $L_{c}$ over $L_{a}$ (left) and $L_{b}$ (right), with their respective PCC values. + +![](images/924d503c2f3ecf675f64b06723c81d6d091ea43d4d9b006e3d2b17f4ca1a3175.jpg) + +# 3.2. Pearson Correlation Coefficient + +In statistics, the Pearson correlation coefficient (PCC) [2] is a widely adopted metric to measure the linear correlation between two variables. In general, this coefficient is defined as + +$$ +\mathrm {P C C} _ {X, Y} = \frac {\operatorname {c o v} (X , Y)}{\sigma_ {X} \sigma_ {Y}}, \tag {1} +$$ + +where $cov$ indicates the covariance and $\sigma_{X}$ and $\sigma_{Y}$ are the standard deviation of vector $X$ and $Y$ , respectively, and the PCC values range from -1 to 1. The absolute value indicates the extent to which the two variables are linearly correlated, with 1 indicating perfect linear correlation, 0 indicating zero linear correlation, and the sign indicates whether they are positively or negatively correlated. Treating the logit vector as a variable, the PCC between different logit vectors can be calculated. We are mainly concerned about $\mathrm{PCC}_{L_a,L_c}$ and $\mathrm{PCC}_{L_b,L_c}$ , since $\mathrm{PCC}_{L_a,L_b}$ is always close to zero due to independence. Comparing $\mathrm{PCC}_{L_a,L_c}$ and $\mathrm{PCC}_{L_b,L_c}$ can provide insight about the contribution of the two inputs to $L_{c}$ , with a higher PCC value indicating the more significant contributor. For example, if $\mathrm{PCC}_{L_a,L_c}$ is larger than $\mathrm{PCC}_{L_b,L_c}$ , input $a$ 's share can be seen as more dominant than input $b$ towards the final feature response. The relationship of two logit vectors, $L_{a}$ and $L_{c}$ for instance, can be visualized by plotting each logit pair. The extent of their correlation can be observed and quantified by the PCC. + +As a basic example, we show the logit vector analysis of two randomly sampled images from ImageNet [41] in Figure 2. The plot shows a strong linear correlation between $L_{b}$ and $L_{c}$ ( $\mathrm{PCC}_{L_{b}, L_{c}} = 0.88$ ), while $L_{a}$ and $L_{c}$ are practically uncorrelated ( $\mathrm{PCC}_{L_{a}, L_{c}} = 0.19$ ). These observations sug + +gest a dominant contribution of input $b$ towards logit vector $L_{c}$ . As a result, the same label "Wood rabbit" is predicted for $c$ and $b$ . Such combination of images has also been explored in Mixup [49] for training classifiers. + +Table 1. PCC analysis for VGG19 using 1000 image pairs randomly sampled from the ImageNet test set. Here, for each image pair, the mean and standard deviations of higher and lower PCC values are reported under $\mathrm{PCC}_h$ and $\mathrm{PCC}_l$ , respectively. + +
|S|PCChPCClPCCh-PCClPCC
Sm4450.74 ± 0.100.27 ± 0.230.47 ± 0.27
Sn5550.63 ± 0.130.33 ± 0.200.30 ± 0.22
+ +To establish the reliability of the PCC value as a metric, we repeat the above experiment with 1000 image pairs and report results on the effectiveness of PCC to predict label $c$ in Table 1. We divide the image pairs into two groups: $S_{m}$ and $S_{n}$ . $S_{m}$ comprises of image pairs having the same predicted class $y_{c}$ as the prediction $y_{a}$ or $y_{b}$ . For $S_{n}$ , the predicted class $y_{c}$ is different from both $y_{a}$ and $y_{b}$ . Moreover, we use the parameter $\mathcal{P}_{\mathrm{PCC}}$ to show the proportion of predictions correctly inferred from the PCC values relative to the network predictions for $c$ . For the image pairs from set $S_{m}$ , the $\mathcal{P}_{\mathrm{PCC}}$ is $96\%$ , confirming the reliability of the PCC as our metric. The high gap between $\mathrm{PCC}_h$ and $\mathrm{PCC}_l$ further provides evidence for the high $\mathcal{P}_{\mathrm{PCC}}$ . For the image pairs from $S_{n}$ , $\mathrm{PCC}_h - \mathrm{PCC}_l$ is smaller, implying that neither of the inputs is significantly dominant. + +Recall that there is a concern that most logit values might be just random values, which is partially addressed by observing the correlation between PCC and $y_{c}$ as shown in Figure 2. If the concern were valid, such that only a few logits are meaningful (i.e. only the highest logits or the logits for semantically similar classes), a high divergence should be observed for the less significant logits. However, this assumption does not align well with the results in Figure 2, thus confirming the importance of all logit values. A higher PCC value for the dominant input further rules out the concern that the lower logit values are random. + +# 4. Influence of Images and Perturbations on Each Other + +In this section, we analyze the interaction of clean images with Gaussian noise perturbation, universal perturbations and image-dependent perturbations. In doing so, input $a$ is the image and input $b$ the perturbation. The analysis is performed on VGG19 pretrained on ImageNet. For consistency, a randomly chosen $a$ (shown in Figure 2, top left) is used for all experiments. Along the same lines, for targeted perturbations we randomly set 'sea lion' as the target class $t$ . For more results with different images and target classes on different networks, please refer to the supplementary material. + +![](images/65837867ee2b28bb15b9ccd4bdf6cfb29e042e94606c87213435523d3ed3b6cd.jpg) + +![](images/f28fd52b4c4b695f0be5213312cf49a2be7417ba69c14f217720ca447493b02f.jpg) + +![](images/8d0e46b2f4af4213004079555552d1621192ca2aaac5373a28a7e19076297cb7.jpg) + +![](images/f8b4f9d4be5180e10a15b2898acbddde536c094ab151f551ead8f1672c2b094d.jpg) +Figure 3. Logit vector analysis for an input image and Gaussian noise $\mathcal{N}(\mu, \sigma)$ . The analysis is shown for $\mu = 0$ and $\sigma = 0$ (left), $\sigma = 0.1$ (middle) and $\sigma = 0.2$ (right)) + +![](images/67462f251b077b5772c3137239326bc16c6050a92e1e48670a7597c6224b4b66.jpg) + +![](images/b3158ae2df3e5f4f2af5b7242c0cf6653c303b1a60ca7e9df78e1c29bdfe6944.jpg) + +![](images/23203e31dd4df6ccaed90f8a9fdfa1c6be69cf72cd5f89b2cebb0cd671a6a94d.jpg) +Figure 4. Logit vector analysis for input image $(a)$ and targeted UAP $(b)$ . The targeted UAP was trained for target class 'sea lion' and loss function $\mathcal{L}_{CL2}^{t}$ + +![](images/39472ac3c1b9443470db1f3131e2e19edc486d8978a8f4c28410cb0d358b9cfb.jpg) + +# 4.1. Analysis of Gaussian Noise + +To facilitate the interpretation of our main experiment of performing analysis for perturbations, we first show the influence of noise (Gaussian noise) on images. The Gaussian noise is sampled from $\mathcal{N}(\mu ,\sigma)$ with $\mu = 0$ and different standard deviations. The relationship between $L_{a}$ , $L_{c}$ is visualized in Figure 3. As expected, by adding zero magnitude Gaussian noise (i.e. no Gaussian noise) to the image, $L_{a}$ and $L_{c}$ are perfectly linearly correlated $(\mathrm{PCC}_{L_a,L_c} = 1)$ . If the Gaussian noise magnitude is increased ( $\sigma = 0.1$ for instance), $L_{a}$ and $L_{c}$ still show a high linear correlation $(\mathrm{PCC}_{L_a,L_c} = 0.91)$ . Investigating the relationship between $L_{b}$ and $L_{c}$ , a low correlation can be observed for all noise inputs $b$ indicating a low contribution to the final prediction. + +# 4.2. Analysis of Universal Perturbations + +Universal perturbations come in two flavors: targeted and non-targeted. We use Algorithm 1 with loss function $\mathcal{L}_{CL2}^{t}$ to generate targeted universal perturbations, and generate non-targeted universal perturbations using Equation 4 as the loss function. The results of this analysis are shown for a targeted and non-targeted UAP in Figure 4 and Figure 5, respectively. For the targeted scenario, two major + +![](images/7b9d340a822cbedabf918220d51b0719791de972fc06fb86785944081e279ea7.jpg) +Figure 5. Logit vector analysis for input image $(a)$ and nontargeted UAP $(b)$ . The UAP was trained with loss function Equation 4 + +![](images/8d285982ddcaee2f4d3d7375fd76b7795ff954b1c4dc1f68372ecb57085823ab.jpg) + +![](images/5157c0f1f1c8ec05c1be100c410b58733b8d4fc46c5c3c2cf04c0e38881435c5.jpg) +Figure 6. Logit vector analysis for input image $(a)$ and targeted image-dependent perturbation $(b)$ . The perturbation was crafted with PGD [24], with target class 'sea lion' + +![](images/67d5404d72d0cf19bd9a1649713061107a1cc92eb2e2e352a683ec9192b05049.jpg) + +observations can be made: First, $\mathrm{PCC}_{L_a,L_c}$ is smaller than $\mathrm{PCC}_{L_b,L_c}$ , indicating a higher linear correlation between $L_{c}$ and $L_{b}$ than $L_{c}$ and $L_{a}$ . In other words, the features of the perturbation are more dominant than that of the clean image. Second, $\mathrm{PCC}_{L_a,L_c}$ is close to 0, indicating that the influence of the perturbation on the image is so significant that the clean image features are seemingly unrecognizable to the DNN. In fact, comparing the logit analysis of $L_{a}$ and $L_{c}$ in Figure 4 with that of Gaussian noise and image in Figure 3 (bottom), a striking similarity is observed. This offers a novel interpretation of targeted universal perturbations: Targeted universal perturbations themselves (independent of the images to attack) are features, while images behave like noise to them. We further explore the nontargeted perturbations, and report the results in Figure 5. Similar to targeted universal perturbations, the $\mathrm{PCC}_{L_a,L_c}$ is smaller than $\mathrm{PCC}_{L_b,L_c}$ for the non-targeted perturbation. However the dominance of the non-targeted perturbation is not as significant as that of the targeted perturbation. + +# 4.3. Analysis of Image-Dependent Perturbations + +The logit vector analysis results for targeted and nontargeted image-dependent perturbations are reported in Figure 6 and Figure 7, respectively. Contrary to the universal perturbations, the image-dependent perturbations are weakly correlated to $c$ , and have a noise-like behaviour (Figure 3). However, the image gets misclassified even + +![](images/34e3e260ab919666ae27f196965cdec740c824a274ace5e629be01e175093111.jpg) +Figure 7. Logit vector analysis for input image $(a)$ and non-targeted image-dependent perturbation $(b)$ . The perturbation was crafted with PGD [24] + +![](images/54dc039eae04f9bc8e2a60757b519ba522cb05a227544e05bb3c608be0d974bc.jpg) + +though the image features appear to be more dominant than the perturbation. This is because the image features are more strongly corrupted through the image-dependent perturbation than Gaussian noise. This special behavior appears due to the fact that the image-dependent perturbations are crafted to form concrete features only in combination with the image. Such image-dependent behavior violates our assumption of independent inputs. However, we include these results since they offer additional insight into adversarial examples. + +# 4.4. Why Do Adversarial Perturbations Exist? + +A wide variety of works have explored the existence of adversarial examples as discussed in section 2. Based on our previous analyses, we arrive at the following explanation for the existence of UAPs: + +Universal adversarial perturbations contain features independent of the images to attack. The image features are corrupted to an extent of being unrecognizable to a DNN, and thus the input images behave like noise to the perturbation features. + +The finding in [18] that universal perturbations behave like features of a certain class aligns well with our statement. Jetley et al. argue that universal perturbations exploit the high-curvature image-space directions to behave like features, while our finding suggests that universal perturbations themselves contain features independent of the images to attack. Utilizing the perspective of positive curvatures of decision boundaries, Jetley et al. adopt the decision boundary-based attack DeepFool [30]. However, our explanation does not explicitly rely on the decision boundary properties, but focuses on the occurrences of strong features, robust to the influence of images. We can therefore deploy the PGD algorithm to generate perturbations consisting of target class features similar to [17]. + +If universal perturbations themselves contain features independent of the images to attack, do image-dependent perturbations behave in a similar way? As previously discussed, the analysis results in Figure 6 reveal that the behavior of image-dependent perturbations is not like features, + +but noise. On the other hand, the original image features are retained to a high extent. Ilyas et al. [17] revealed that image-dependent adversarial examples include the features of the target class. However, as seen from the analysis in subsection 4.4, the isolated perturbation seems not to retain independent features due its low PCC value, but rather interacts with the image to form the adversarial features. + +# 5. Targeted UAP with Proxy Data + +Our above analysis demonstrates that images behave like noise to the universal perturbation features. Since the images are treated like noise, we can exploit proxy images as background noise to generate targeted UAPs without the original training data. The proxy images do not need to have any class object belonging to the original training class and their main role is to make the targeted UAP have strong background-robust target class features. + +# 5.1. Problem Definition + +Formally, given a data distribution $\mathcal{X} \in \mathbb{R}^d$ of images, we compute a single perturbation vector $v$ that satisfies + +$$ +\begin{array}{l} \hat {C} (x + v) = t \quad \text {f o r m o s t} x \sim \mathcal {X} \tag {2} \\ \left\| v \right\| _ {p} \leq \epsilon . \\ \end{array} +$$ + +The magnitude of $v$ is constrained by $\epsilon$ to be imperceptible to humans. $||\cdot||_p$ refers to the $l_{p}$ -norm and in this work, we set $p = \infty$ and $\epsilon = 10$ for images in range $[0,255]^1$ as in [27]. Specifically, we assume having no access to original training data. Thus, the training data $\mathcal{X}_v$ for $v$ generation can be different from the original dataset $\mathcal{X}$ . We denote the proxy dataset as $\mathcal{X}_v$ . + +To evaluate targeted UAPs, we use the targeted fooling ratio metric [35], i.e. the ratio of samples fooled into the target class to the number of all data samples. We also use the non-targeted fooling ratio [35, 27], calculating the ratio of misclassified samples to the total number of samples, for evaluation. + +# 5.2. Loss Function and Algorithm + +To achieve the desired objective Eq. 2 most naively, the commonly used cross-entropy loss function $\mathcal{L}_{\mathrm{CE}}$ can be utilized. Since cross-entropy loss holistically incorporates logits of all classes, this loss function leads to overall lower fooling ratios. This behavior can be resolved by using a loss function $\mathcal{L}_{\mathrm{L}}$ that only aims to increase the logit of the target class. + +Since we consider universal perturbations, to balance the above objective between different samples in training, we extend $\mathcal{L}_{\mathrm{L}}$ by clamping the logit values as follows: + +$$ +\mathcal {L} _ {C L 1} ^ {t} = \max (\max _ {i \neq t} \hat {C} _ {i} (x _ {v} + v) - \hat {C} _ {t} (x _ {v} + v), - \kappa) \quad (3) +$$ + +Algorithm 1: UAP algorithm +```txt +Input: Proxy data $\mathcal{X}_v$ , Classifier $\hat{C}$ , Loss function $\mathcal{L}$ , mini-batch size $m$ , Number of iterations $I$ , perturbation magnitude $\epsilon$ +``` + +Output: Perturbation vector $v$ +end +```latex +$\begin{array}{rl} & v\gets 0\\ & \textbf{for iteration} = 1,\ldots ,I\textbf{do}\\ & B\sim \mathcal{X}_v\colon |B| = m\\ & g_v\leftarrow \underset {x\sim B}{\mathbb{E}}[\nabla_v\mathcal{L}]\triangleright \text{Randomly sample}\\ & v\leftarrow \mathrm{Optim}(g_v)\\ & v\leftarrow \epsilon \frac{v}{||v||_p}\end{array}$ ▷ Update +``` + +where $\kappa$ indicates the confidence value, $x_{v}$ are samples from the proxy data $\mathcal{X}_v$ and $\hat{C}_i$ indicates the $i$ -th entry of the logit vector. In this case, the proxy data can be either a random source dataset or the original training data, depending on data availability. Note that similar techniques of clamping the logits have also been used in [5], however, their motivation is to obtain minimum-magnitude (image-dependent) perturbations. While the target logit in loss function $\mathcal{L}_{CL1}^t$ is increased, the logit values of $\max \hat{C}_i(x_v + v)$ are decreased simultaneously during the training process. This effect is undesirable for generating a UAP with strong target class features, since other classes except the target classes will be included in the optimization, which might have negative effects on the gradient update. To prevent manipulation of logits other than the target class, we exclude the nontargeted class logit values in the optimization step, such that these values are only used as a reference value for clamping the target class logit. We indicate this loss function as $\mathcal{L}_{CL2}^t$ . We report an ablation study of the different loss function performances in Table 2. The results suggest that $\mathcal{L}_{CL2}^t$ , in general, outperforms all other discussed loss functions. We further provide a loss function resembling $\mathcal{L}_{CL2}^t$ for the generation of non-targeted UAPs. + +$$ +\mathcal {L} ^ {n t} = \max \left(\hat {C} _ {g t} \left(x _ {v} + v\right) - \max _ {i \neq g t} \hat {C} _ {i} \left(x _ {v} + v\right), - \kappa\right) \tag {4} +$$ + +In the special case of crafting non-targeted UAPs, the proxy dataset has to be the original training dataset. + +We provide a simple, yet effective algorithm in Algorithm 1. Our gradient-based method adopts the ADAM [20] optimizer and mini-batch training, which have also been adopted in the context of data-free universal adversarial perturbations [38]. Mopuri et al. train a generator network for crafting UAPs with this configurations, which can be considered more complex. + +Table 2. Ablation study on the performance of different loss functions, for the proposed targeted UAP. The values in each column represent mean and standard deviation of the non-targeted fooling ratio (%) and targeted fooling ratio (%) obtained for 5 runs and target class 'sea lion'. + +
LossAlexNetGoogleNetVGG16VGG19ResNet152
\( \mathcal{L}_{\text{CE}} \)90.5 ± 0.655.4 ± 1.070.8 ± 1.555.2 ± 2.289.1 ± 0.375.9 ± 0.987.9 ± 0.570.8 ± 1.178.2 ± 0.966.5 ± 1.3
\( \mathcal{L}_{\text{L}} \)89.2 ± 0.447.1 ± 1.171.6 ± 0.856.9 ± 1.191.0 ± 0.379.0 ± 0.690.8 ± 0.273.1 ± 0.880.1 ± 0.869.1 ± 0.4
\( \mathcal{L}_{CL1}^{t} \)90.2 ± 0.357.6 ± 1.471.7 ± 1.457.9 ± 2.390.1 ± 0.480.3 ± 0.588.2 ± 0.375.5 ± 0.680.2 ± 0.371.4 ± 0.5
\( \mathcal{L}_{CL2}^{t} \)90.5 ± 0.349.4 ± 1.273.0 ± 1.558.4 ± 2.293.5 ± 0.382.8 ± 0.792.7 ± 0.172.3 ± 2.581.3 ± 1.170.6 ± 2.1
+ +Table 3. Results for targeted UAPs trained on four different datasets. The values in each column represent mean and standard deviation of the non-targeted fooling ratio (\%) and targeted fooling ratio (\%) obtained for 8 different target classes. + +
Proxy DataAlexNetGoogleNetVGG16VGG19ResNet152
ImageNet [41]89.9 ± 2.248.6 ± 13.377.7 ± 3.259.9 ± 6.692.5 ± 1.375.0 ± 7.891.6 ± 1.371.6 ± 6.980.8 ± 2.666.3 ± 7.0
COCO [23]89.9 ± 2.647.2 ± 13.176.8 ± 3.759.8 ± 7.592.2 ± 1.775.1 ± 12.391.6 ± 1.568.8 ± 9.479.9 ± 2.965.7 ± 7.8
VOC [9]88.9 ± 2.646.9 ± 12.776.7 ± 3.258.9 ± 6.092.2 ± 1.674.7 ± 7.990.5 ± 2.368.8 ± 8.279.1 ± 3.365.2 ± 7.1
Places365 [50]90.0 ± 2.142.6 ± 16.476.4 ± 3.760.0 ± 5.492.1 ± 1.573.4 ± 9.691.5 ± 1.664.5 ± 17.078.0 ± 3.262.5 ± 9.9
+ +Table 4. Comparison of the proposed method to other methods. The results are divided in universal attacks with access to the original ImageNet training data (upper) and data-free methods (lower). The metric is reported in the non-targeted fooling ratio $(\%)$ + +
MethodAlexNetGoogleNetVGG16VGG19ResNet152
UAP [27]93.378.978.377.884.0
GAP [35]-82.783.780.1-
Ours(ImageNet)96.1788.9494.3094.9890.08
FFF [32]80.9256.4447.1043.62-
AAA [38]89.0475.2871.5972.8460.72
GD-UAP [31]87.0271.4463.0864.6737.3
Ours (COCO)89.976.892.291.679.9
+ +Table 5. Transferability results for the proposed targeted universal adversarial attack. The attack was performed for target class 'sea lion' and proxy dataset MS-COCO. The rows indicate the source model and the columns indicate the target model. The values in each column are reported in the non-targeted fooling ratio (\%) and targeted fooling ratio (\%) + +
AlexNetGoogleNetVGG-16VGG19ResNet152
AlexNet90.4549.6154.770.0160.430.1358.660.0947.020.02
GoogleNet53.250.0275.4762.0650.510.1748.790.1434.940.34
VGG1653.710.0341.260.0293.6282.9082.9913.6936.730.01
VGG1953.670.0239.780.0283.4044.5392.5375.6135.360.01
ResNet15254.460.0342.430.0755.051.6355.121.0580.4770.20
+ +Table 6. Results for Transferability measured with PCC values. Generated with COCO as background, for target class sea lion. The rows indicate the source model and the columns indicate the target model. + +
AlexNetGoogleNetVGG-16VGG19ResNet152
AlexNet1.000.090.240.14-0.05
GoogleNet0.241.000.240.140.00
VGG160.360.091.000.48-0.11
VGG190.190.070.551.00-0.09
ResNet1520.280.110.360.301.00
+ +# 5.3. Main Results + +We generate the targeted UAPs for four different datasets, the ImageNet training set as well as three proxy datasets. In Algorithm 1, we set the number of iterations to 1000, use loss function $\mathcal{L}_{CL2}^{t}$ and a learning rate of 0.005 with batch-size 32. As the proxy datasets, we use images from MS-COCO [23] and Pascal VOC [9], two widely used object detection datasets, and Places365 [50], a large-scale scene recognition dataset. We generated targeted UAPs with the 4 datasets for 8 different target classes and evaluate them on the ImageNet test dataset. The average over the 8 target scenarios are reported in Table 3. Two major observations can be made: First, a significant difference can not be observed for the three different proxy datasets. Moreover, there is only a marginal performance gap between training with the proxy datasets and training with the original ImageNet training data. The results support our assumption that the influence of the input images on targeted UAPs is like noise. + +We also explored generating targeted UAPs with white images and Gaussian noise as the proxy dataset. In both scenarios, inferior performance was observed. We refer the reader to the supplementary material for a discussion about possible reasons and further results. + +Targeted perturbations for different networks are shown in Figure 8. Since the target class is sea lion, we can notice the existence of sea lion-like patterns by taking a closer look. Samples of clean images and perturbed images misclassified as sea lion are shown in Figure 9. + +# 5.4. Comparison with Previous Methods + +To the best of our knowledge, this is the first work to achieve targeted UAP without original training data, thus we can only compare our performance with previous works on related tasks. The authors of [35] report a targeted fool + +![](images/ecf9dcdaeb60cdef582fe485eecca873b3eb7539090e2a1e708ed451fac2d9f7.jpg) +AlexNet + +![](images/70b917cb7f7f65201057cc0b77f516cdbd68026550c572d7e8b82cb9c4c734af.jpg) +GoogleNet + +![](images/a6f73f2a026877249ec6dd4542914e2f0c49cc722fbdce9f9f64863f66158364.jpg) +VGG16 + +![](images/c233d229aec90a44e8c8b10f69ac73fe3a4f8431e45e859680acbb76c453307a.jpg) +VGG19 +Figure 8. Targeted universal perturbations (target class 'sea lion') for different network architectures. + +![](images/728c0e26888aa68d10ae73feffdc70ee1aa3f84063b2684091f1afad669a782a.jpg) +ResNet152 + +![](images/184c3b667c9b15b1cde2e905bcf49078dcb3b187547cbad513453c98e21622c9.jpg) +InceptionV3 + +![](images/8681400c8e5902d8a81883219a8a54a3244e583a46852ad8fb7045bdf4bae763.jpg) +carbonara (92.1) + +![](images/7a42b0de6afd38ae2469a5e9d9043e5d5b5da96c855e3bc5e96ec2c270bae54f.jpg) +toucan (100.0) + +![](images/8c8123525d57f2c540133d030e531baacecd6c660a5118d22ad46e8a1d078ed7.jpg) +cloak (47.3) + +![](images/09bd83bd69c095d0b3423c04c3e34e9aecc7b4f010d655c7cae5693f1ce0c290.jpg) +green snake (95.0) + +![](images/8acad4a55b5641a8e8e1de189ef3cb3f1b574ccfb744b73e872c56f403c29853.jpg) +sea lion (100.0) +Figure 9. Qualitative Results. Clean images (top) and perturbed images (bottom) for VGG19 + +![](images/4fb6e4ae618607ab7da581c51223703f4bc0766942f4e85538ce123ddfb688a4.jpg) +sea lion (100.0) + +![](images/d7a6d6a78fba32956e7f0ff76ceb57f0e1a7957ce1685a8b923c418b9f65ca83.jpg) +sea lion (100.0) + +![](images/056c6b0fb63bc9fd2062070525901b325a5eb90f8c024289b687491fbbfce5e5.jpg) +sea lion (92.2) + +ing ratio of $52\%$ for Inception-V3 with access to the ImageNet training dataset. We use COCO as the proxy dataset and achieve a superior performance of $53.4\%$ . We can not find any other targeted UAP method available in the literature but other previous works report the (non-targeted) fooling ratio and we compare our performance with them and the results are available in Table 4. We distinguish between methods with and without data availability. To compare with the methods with data-availability we trained a nontargeted UAP on ImageNet utilizing our introduced nontargeted loss function from Equation 4. Note that we do not block the gradient for $\max_{i\neq gt}\hat{C}_i(x_v + v)$ to let the algorithm automatically search a dominant class for an effective attack. We observe that our approach achieves superior performance than both UAP [27] and GAP [35]. For the case without access to the original training dataset, we use the COCO dataset to generate the UAP, and report the averages of performance on 8 target classes. Note that our method still generates a targeted UAP, but we use the nontargeted metric for performance evaluation. This setting is in favor of other methods, since ideally, we could report the best performance of a certain target class. Without bells and whistles, our method achieves comparable performance to + +the state-of-the-art data-free methods, constituting evidence that our simple approach is efficient. + +# 5.5. Transferability + +The transferability results are available in Table 5. We observe that the non-targeted transferability performs reasonably well, while targeted transferability does not. We find no previous work reporting the targeted transferability for universal perturbations. For image-dependent perturbations, the targeted transferability has been explored in [15], which reveals that the targeted transferability is unsatisfactory when source network and target network belong to different network families. When the networks belong to the same network family, relatively higher transferability can be observed [15]. This aligns well with our finding that VGG16 and VGG19 transfer reasonably well between each other as presented in Table 5. We further report the PCC of the two network UAPs in Table 6. We observe that the PCC values are relatively higher between VGG16 and VGG19 than other networks, indicating an additional benefit of PCC to provide insight to network transferability. + +# 6. Conclusion + +In this work, we treat the DNN logit output as a vector to analyze the influence of two independent inputs in terms of contributing to the combined feature representation. Specifically, we demonstrate that the Pearson correlation coefficient (PCC) can be used to analyze relative contribution and dominance of each input. Under the proposed analysis framework, we analyze adversarial examples by disentangling images and perturbations to explore their mutual influence. Our analysis results reveal that universal perturbations have dominant features and the images to attack behave like noise them. This new insight yields a simple yet effective algorithm, with a carefully designed loss function, to generate targeted UAPs by exploiting a proxy dataset instead of the original training data. We are the first to achieve this challenging task and the performance is comparable to state-of-the-art baselines utilizing the original training dataset. + +# 7. Acknowledgement + +We thank Francois Rameau and Dawit Mureja Argaw for their comments and suggestions throughout this project. This work was supported by Naver LABS and the Institute for Information & Communications Technology Promotion (2017-0-01772) grant funded by the Korea government. + +# References + +[1] Naveed Akhtar and Ajmal Mian. Threat of adversarial attacks on deep learning in computer vision: A survey. IEEE Access, 2018. 1 + +[2] TW Anderson. An introduction to multivariate statistical analysis (wiley series in probability and statistics). 2003. 2, 3 +[3] Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In International Conference on Machine Learning (ICML), 2018. 1, 2 +[4] Sebastien Bubeck, Yin Tat Lee, Eric Price, and Ilya Razenshteyn. Adversarial examples from computational constraints. In International Conference on Machine Learning (ICML), 2019. 2 +[5] Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In Symposium on Security and Privacy (SP), 2017. 2, 6 +[6] Jeremy Cohen, Elan Rosenfeld, and Zico Kolter. Certified adversarial robustness via randomized smoothing. In International Conference on Machine Learning (ICML), 2019. 2 +[7] Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, and Jianguo Li. Boosting adversarial attacks with momentum. In Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[8] Alexey Dosovitskiy, Philipp Fischer, Eddy Ilg, Philip Hausser, Caner Hazirbas, Vladimir Golkov, Patrick Van Der Smagt, Daniel Cremers, and Thomas Brox. Flownet: Learning optical flow with convolutional networks. In International Conference on Computer Vision (ICCV), 2015. 1 +[9] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The Pascal visual object classes (voc) challenge. International Journal of Computer Vision, 2010. 7 +[10] Alhussein Fawzi, Hamza Fawzi, and Omar Fawzi. Adversarial vulnerability for any classifier. In Advances in Neural Information Processing Systems (NeurIPS), 2018. 2 +[11] Alhussein Fawzi, Seyed-Mohsen Moosavi-Dezfooli, and Pascal Frossard. Robustness of classifiers: from adversarial to random noise. In Advances in Neural Information Processing Systems (NeurIPS), 2016. 2 +[12] Justin Gilmer, Nicolas Ford, Nicholas Carlini, and Ekin Cubuk. Adversarial examples are a natural consequence of test error in noise. In International Conference on Machine Learning (ICML), 2019. 2 +[13] Justin Gilmer, Luke Metz, Fartash Faghri, Samuel S Schoenholz, Maithra Raghu, Martin Wattenberg, and Ian Goodfellow. Adversarial spheres. arXiv preprint arXiv:1801.02774, 2018. 2 +[14] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations (ICLR), 2015. 1, 2 +[15] Jiangfan Han, Xiaoyi Dong, Ruimao Zhang, Dongdong Chen, Weiming Zhang, Nenghai Yu, Ping Luo, and Xiaogang Wang. Once a man: Towards multi-target attack via learning multi-target adversarial network once. In International Conference on Computer Vision (ICCV), 2019. 8 +[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision (ECCV), 2016. 1 + +[17] Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Logan Engstrom, Brandon Tran, and Aleksander Madry. Adversarial examples are not bugs, they are features. In Advances in Neural Information Processing Systems (NeurIPS), 2019. 1, 2, 3, 5, 6 +[18] Saumya Jetley, Nicholas Lord, and Philip Torr. With friends like these, who needs adversaries? In Advances in Neural Information Processing Systems (NeurIPS), 2018. 2, 3, 5 +[19] Valentin Khrulkov and Ivan Oseledets. Art of singular vectors and universal adversarial perturbations. In Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[20] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015. 6 +[21] Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. In International Conference on Machine Learning (ICML), 2017. 1 +[22] Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. In International Conference on Learning Representations (ICLR), 2017. 2 +[23] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dálár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European Conference on Computer Vision (ECCV), 2014. 7 +[24] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations (ICLR), 2018. 2, 5 +[25] Saeed Mahloujifar, Dimitrios I Diochnos, and Mohammad Mahmoody. The curse of concentration in robust learning: Evasion and poisoning attacks from concentration of measure. In AAAI Conference on Artificial Intelligence (AAAI), 2019. 2 +[26] Jan Hendrik Metzen, Mummadi Chaithanya Kumar, Thomas Brox, and Volker Fischer. Universal adversarial perturbations against semantic image segmentation. In International Conference on Computer Vision (ICCV), 2017. 2 +[27] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2, 6, 7, 8 +[28] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, Pascal Frossard, and Stefano Soatto. Analysis of universal adversarial perturbations. arXiv preprint arXiv:1705.09554, 2017. 2 +[29] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, Pascal Frossard, and Stefano Soatto. Robustness of classifiers to universal perturbations: A geometric perspective. In International Conference on Learning Representations (ICLR), 2018. 2 +[30] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 2, 5 +[31] Konda Reddy Mopuri, Aditya Ganeshan, and Venkatesh Babu Radhakrishnan. Generalizable data-free + +objective for crafting universal adversarial perturbations. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2018. 7 +[32] Konda Reddy Mopuri, Utsav Garg, and R. Venkatesh Babu. Fast feature fool: A data independent approach to universal adversarial perturbations. In *British Conference on Machine Vision (BMVC)*, 2017. 2, 3, 7 +[33] Preetum Nakkiran. A discussion of 'adversarial examples are not bugs, they are features': Adversarial examples are just bugs, too. Distill, 2019. https://distill.pub/2019/advex-bugs-discussion/response-5.1, 2 +[34] Muhammad Muzammal Naseer, Salman H Khan, Muhammad Haris Khan, Fahad Shahbaz Khan, and Fatih Porikli. Cross-domain transferability of adversarial perturbations. In Advances in Neural Information Processing Systems (NeurIPS), 2019. 2 +[35] Omid Poursaeed, Isay Katsman, Bicheng Gao, and Serge Belongie. Generative adversarial perturbations. In Conference on Computer Vision and Pattern Recognition (CVPR), 2018, 2, 6, 7, 8 +[36] Aditi Raghunathan, Jacob Steinhardt, and Percy Liang. Certified defenses against adversarial examples. In International Conference on Learning Representations (ICLR), 2018. 2 +[37] Anurag Ranjan, Joel Janai, Andreas Geiger, and Michael J Black. Attacking optical flow. In International Conference on Computer Vision (ICCV), 2019. 1 +[38] Konda Reddy Mopuri, Phani Krishna Uppala, and R Venkatesh Babu. Ask, acquire, and attack: Data-free uap generation using class impressions. In European Conference on Computer Vision (ECCV), 2018. 3, 6, 7 +[39] Ludwig Schmidt, Shibani Santurkar, Dimitris Tsipras, Kunal Talwar, and Aleksander Madry. Adversarily robust generalization requires more data. In Advances in Neural Information Processing Systems (NeurIPS), 2018. 2 +[40] Ali Shafahi, W Ronny Huang, Christoph Studer, Soheil Feizi, and Tom Goldstein. Are adversarial examples inevitable? arXiv preprint arXiv:1809.02104, 2018. 2 +[41] Ilya Sutskever, Geoffrey E Hinton, and A Krizhevsky. ImageNet classification with deep convolutional neural networks. Advances in Neural Information Processing Systems (NeurIPS), 2012. 3, 7 +[42] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. 1, 2 +[43] Pedro Tabacof and Eduardo Valle. Exploring the space of adversarial images. In 2016 International Joint Conference on Neural Networks (IJCNN), 2016. 1, 2 +[44] Thomas Tanay and Lewis Griffin. A boundary tilting perspective on the phenomenon of adversarial examples. arXiv preprint arXiv:1608.07690, 2016. 1, 2 +[45] Lei Wu, Zhanxing Zhu, Cheng Tai, et al. Understanding and enhancing the transferability of adversarial examples. arXiv preprint arXiv:1802.09707, 2018. 2 +[46] Chaoning Zhang, Philipp Benz, Tooba Imtiaz, and In-So Kweon. Cd-uap: Class discriminative universal adversarial perturbation. In AAAI Conference on Artificial Intelligence (AAAI), 2020. 2 + +[47] Chaoning Zhang, Francois Rameau, Junsik Kim, Dawit Mureja Argaw, Jean-Charles Bazin, and In So Kweon. Deep self-calibration for ptz cameras. In Winter Conference on Applications of Computer Vision (WACV), 2020. 1 +[48] Chaoning Zhang, Francois Rameau, Seokju Lee, Junsik Kim, Philipp Benz, Dawit Mureja Argaw, Jean-Charles Bazin, and In So Kweon. Revisiting residual networks with nonlinear shortcuts. In British Machine Vision Conference (BMVC), 2019. 1 +[49] Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In International Conference on Learning Representations (ICLR), 2018. 4 +[50] Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2017. 7 \ No newline at end of file diff --git a/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/images.zip b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..276d8bbb6e1ee2aa1ac9054de9c913abfcd6b633 --- /dev/null +++ b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:760d82b07fa83481692e9bc51ebe500ebc7e76cc5bbf71473e766a2b7c17426c +size 626156 diff --git a/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/layout.json b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..45f6563c43d1c3450cf466f41b501aa443f96003 --- /dev/null +++ b/understandingadversarialexamplesfromthemutualinfluenceofimagesandperturbations/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:601edc66394ad61a479a3d799c49e7a14d4cd6d71cacf77a849e8999fa7167c6 +size 510523 diff --git a/understandinghumanhandsincontactatinternetscale/43c89bf1-344f-4af4-9fc0-0ebd442fd780_content_list.json b/understandinghumanhandsincontactatinternetscale/43c89bf1-344f-4af4-9fc0-0ebd442fd780_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7d14d5fb951083a14962b105bc55b8327567b658 --- /dev/null +++ b/understandinghumanhandsincontactatinternetscale/43c89bf1-344f-4af4-9fc0-0ebd442fd780_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf05f94e64275e23c8fd0a7f93d629df3e249d02b51f7fce6a81bf6031194f06 +size 85168 diff --git a/understandinghumanhandsincontactatinternetscale/43c89bf1-344f-4af4-9fc0-0ebd442fd780_model.json b/understandinghumanhandsincontactatinternetscale/43c89bf1-344f-4af4-9fc0-0ebd442fd780_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1dd8a8c027750c3818621253dbb59b63b1cf1144 --- /dev/null +++ b/understandinghumanhandsincontactatinternetscale/43c89bf1-344f-4af4-9fc0-0ebd442fd780_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba7bf96bedcde836cc7957412eb86d996fa4204498f3d2d16c74835fd30a198f +size 101933 diff --git a/understandinghumanhandsincontactatinternetscale/43c89bf1-344f-4af4-9fc0-0ebd442fd780_origin.pdf b/understandinghumanhandsincontactatinternetscale/43c89bf1-344f-4af4-9fc0-0ebd442fd780_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..95ceff761ecc73b44473841ce478557c757cd7ff --- /dev/null +++ b/understandinghumanhandsincontactatinternetscale/43c89bf1-344f-4af4-9fc0-0ebd442fd780_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:786a5cf53fd786c6d4218d3e99fd7bf0494f2afe3e7c9acbcc0cc47a4ce44edf +size 1484798 diff --git a/understandinghumanhandsincontactatinternetscale/full.md b/understandinghumanhandsincontactatinternetscale/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e48d1692515d8dd40e45a62de7785884bfa1d076 --- /dev/null +++ b/understandinghumanhandsincontactatinternetscale/full.md @@ -0,0 +1,383 @@ +# Understanding Human Hands in Contact at Internet Scale + +Dandan Shan1, Jiaqi Geng*1, Michelle Shu*2, David F. Fouhey1 +1University of Michigan, 2Johns Hopkins University +{dandans, jiaqig, fouhey}@umich.edu, mshl@jhu.edu + +# Abstract + +Hands are the central means by which humans manipulate their world and being able to reliably extract hand state information from Internet videos of humans engaged in their hands has the potential to pave the way to systems that can learn from petabytes of video data. + +This paper proposes steps towards this by inferring a rich representation of hands engaged in interaction method that includes: hand location, side, contact state, and a box around the object in contact. To support this effort, we gather a large-scale dataset of hands in contact with objects consisting of 131 days of footage as well as a $100K$ annotated hand-contact video frame dataset. The learned model on this dataset can serve as a foundation for handcontact understanding in videos. We quantitatively evaluate it both on its own and in service of predicting and learning from 3D meshes of human hands. + +# 1. Introduction + +The hand is the key to how humans interact with the world. If machines are to understand our actions and intentions as well as the world we have built for and with our hands, they must have a deep understanding of our hands. For instance, in Figure 1, we can readily recognize that there are two hands (one left and one right), opening a bag and even imagine how one might pull up the flap. The goal of this paper is to build the foundation for studying hands engaged in interaction with objects at Internet scale. + +Hand analysis is, of course, an area of long-standing interest in the field with work on pose estimation [41, 34], reconstruction [21, 42], and grasp analysis [30, 7]. These approaches, however, have largely focused on in-lab settings, often with a pre-localized hand or in settings with limited variety. While there has been substantial progress, deploying these on the rich world of Internet videos [3, 39] poses a challenge due to the dizzying diversity in viewpoint and context. A single system must handle data ranging from a fifty pixel high hand in a cooking video to an enormous thousand pixel high hand closeup showing DIY. + +![](images/8303fbf5a5f6e0559b71650653c6da8a685c28f42d8a5e80a75b018065ec631a.jpg) +Figure 1. The goal of this paper is to infer a rich representation for helping understand hands engaged in contact with the world at Internet scale. Our system produces a rich output in terms of hand location (boxes), side (left/right), contact state (here - a portable object) and what object each hand is in contact with. To support this, we collect a new large-scale hand video interaction dataset, 100 Days of Hands (100DOH). We use this, plus videos from VLOG [14], to make a 100K image dataset annotated with our rich representation. + +Our work aims to enable hand analysis at Internet scale and diversity. To this end, we introduce a model, described in Section 4 that identifies, for every single hand in a single RGB image (demonstrated on a wide variety of scales and contexts): a hand box; its side (left/right); its contact state (none / self / other person / non-portable object / portable object); and, for the hand in contact, an object box around the object or person in contact. These enable crucial downstream problems like reconstruction and grasp analysis. For example, the detection of hand location and side enables the use of recent mesh reconstruction systems [21, 42]. + +This system, along with an existing mesh reconstruction method [21], yields a system that can detect hands, their contact state, their 3D reconstruction, and what object they are touching. We believe this output enables large-scale fine-grained learning about human-object interaction. As an example, we introduce a method to identify bad mesh reconstructions (necessary for learning from meshes) and provide a demonstration of learning on consumer videos. + +![](images/e591cff9e11f853a73ee44edcf19cbcb3512a05960c58837c8c96b7568a6c66b.jpg) +boardgames + +![](images/0a014a0c548a0bf3f11d4f42861f73246879af070d9e26a67574969aad64a7fe.jpg) +DIY + +![](images/11a8183eb04082279da13e2732dbbcd39af6418a66fbcf318b68a70a2b9f5ea6.jpg) +drinks + +![](images/e0b28da0c2eb131550ebf365842aa194b365d6e45eb4d707da839da47b5fe35b.jpg) +furniture + +![](images/339651d3d0458eaf50e7b2a0e5561b1af088d8f7082effa5961e580f5ac8cfbf.jpg) +gardening + +![](images/2b6979d39cb28848bee0c7c01b16e0ed335f298bbcc988e2d0893aa89f10094d.jpg) +housework + +![](images/d9841fc501fc25f16eb4214b62d14860cfe169186886ddbe3e6bcd5ce38cdd88.jpg) +puzzle + +![](images/7f40d72d262d8c382adfb49de1c7b86b5f3b0ff2261d256efabf7dbd6205f320.jpg) +repair + +![](images/5467acf86be56c0130e61befe35b57f116771d4908559afa313e23ec60aa9eac.jpg) +study + +![](images/91d402ff0999244f30587886cbb5fbd85afdffed99fe41e4ccb5456236be0a9c.jpg) +food + +![](images/c98ea56ec0df52492132ba609b00d326ef59f17ee035dc14f6b14d8e87ec9632.jpg) +packing + +![](images/7a2fc10b08389c729310b48761995a0cfd06d472376edad31b9819560f87105b.jpg) +vlog + +![](images/c72fc30ce0a535348725c4777130428ab155443589b8f4ab3e7f43bd933a4190.jpg) +Hand State + +![](images/8f50eced7cae170be0b21df70c5abe4223b05bc01ab6c582c51fa51c46adf5cd.jpg) + +![](images/00efd350fc1703bf9d1ac0908bbb0c3adb0d66c68cc71d3bed000305283bfd98.jpg) +0% - 10% + +![](images/27fdebd1075c886df829edc5b9a49e461503084e1e2889e63bbde503911d1c15.jpg) +20% - 30% + +![](images/6261897204bdf858a17efba5ba909b3b7aa3429262208070ab15b621bda348a9.jpg) +40% - 50% + +![](images/705ff0cc561e59046cf3dab682fe3cdd003d4284f95cd4a699a6b2b9cc1e8be4.jpg) +60% - 70% + +![](images/7550eb802ce485aead35ffb84162223422d3e5c517e94c47c1381aa55a6056fd.jpg) +80% - 90% + +![](images/99c5b8a2f440fcd8a955f9036acf80ab6f455d54250b53b8348648655e23d85d.jpg) +No Contact + +![](images/d76b6f496de73adbdbae1a8041085512b89a3c9482154ea221132d6b73b34db2.jpg) +Self Contact + +![](images/7910f70f96d210316011a4d619f1444be26674d2ce66a5fdf4e1f966d1b426bc.jpg) +Portable Object +Stationary Object +Figure 2. Snapshots from our dataset. (Left) Samples from the eleven genres that we use to collect our video dataset 100DOH as well as a sample from the VLOG dataset that we additionally sample from to produce our 100K frame subset. (Right) Statistics about the hand frame dataset in terms of hand size (bounding box diagonal length over image diagonal length) and contact state, as well as illustrative samples of both. Our dataset depicts a wide variety of hands engaged in interaction in a variety of contexts and at a variety of scales. + +This effort is backed by a new dataset, 100 Days of Hands, introduced in Section 3, consisting of a large-scale (131 days+) video dataset of humans engaged in interaction that was gathered implicitly [14] (i.e., with a set of relatively generic genre tags as opposed to particular actions). These videos depict a wide range of activities, viewpoints, and settings. We use frames from this dataset and a similar dataset [14] to create a 100K image dataset which has the rich hand-state annotation to support our model. + +We believe that this model and data (along with existing past work, especially in reconstruction) enable the field to collectively tackle new and important problems in human-object interaction in general consumer videos and demonstrate this concretely in Section 5. We show that: (1) Our new hand dataset yields high performance detectors (90% VOC [12] AP) that generalize well across datasets, occasionally outperforming training and testing on the same dataset; (2) Our new hand state model and dataset serves as an enabling technology that lets the community deploy exciting hand-mesh reconstruction systems like [21] on YouTube videos; (3) Our system may provide a stepping stone towards important tasks like grasp analysis by showing how to use it to build a proof-of-concept system that maps objects to 3D meshes of hands engaged in interaction. + +# 2. Related Work + +Our work focuses on identifying a rich state of hands in an ordinary RGB image with the goal of using it as a foundation for understanding human-object interaction in Internet videos. It therefore touches on many papers in the area of understanding human-object interaction. + +Human-object interaction, and understanding the affordances (opportunities for interaction [16]) has been a + +long-term interest of computer vision. Recent work has largely taken the approach of recognizing verb-noun pairs [17, 9, 10, 19, 6]. In terms of technical approach, our method is most related to the approach of Gkioxari et al [17]. As an output, however, we propose an alternate representation based on physical contact and interaction. + +In the process, we gather a video dataset of humans engaged in interaction that we annotate and learn from. Of the many works in video human-object interaction [11, 39, 33, 24, 40], ours is most clearly related to VLOG [14], which also gathers data of interaction, and AVA [18], which investigates atomic (i.e., base-level) actions. We build on the ideas and part of the data of VLOG, but expand it to a wider and more diverse dataset and far more thoroughly investigate and annotate contact. Like AVA, we also investigate a representation below activities, but is different and complementary (in contact with a box) compared to AVA's semantic actions (e.g., "write", "play instrument"). + +Hands have long been the subject of study in computer vision. In this area, our data and approach sit between image-based hand detection datasets like [1, 25, 5, 14, 28] and efforts at understanding contact with richer annotation but requiring more specialized devices or more constrained environments such as [7, 35, 30, 15, 36]. We expect that fully understanding hands may require a variety of approaches; our approach tries to strike a balance between potential for scalability and richness of annotation. We note that while there has been progress in full body pose estimation (e.g., [8]), our approach works even in highly truncated settings like Internet videos. + +One particularly important line of work in understanding human hands is extracting the pose of hands from images. A full survey of this literature is beyond the scope of this paper and we refer the reader to [41, 34]. Most recently, + +Table 1. Comparison of 100DOH with existing datasets for human-object interaction. While only a small fraction of it is labeled compared to more densely annotated datasets, the proposed large-scale video dataset is a rich source for unsupervised learning about hands. + +
NameLengthAnnotationSource
100DOH131D100K frames per-hand stateYouTube
AVA2D3s-level atomic ActionsMovies
HowTo100M [24](5.6K)DNone / CaptionsYouTube
Moments [26]34D, 17HVid. ClassMisc
VLOG [14]14D, 8HVid Class, Sparse AnnotsYouTube
YouCook2 [39]7D, 8HAction SegmentsYouTube
Charades [33]3D, 8HAction SegmentsHome
EPIC-KITCH. [11]2D, 7HActions Segments, Object BBsHome
+ +this has taken the form of systems that can, given a cropped hand with known side, such as [21, 42], infer a mesh via a low-dimensional model like MANO [31]. Our approach provides the necessary input for this reconstruction and thus enables the large-scale deployment of these techniques to Internet videos (including a self-supervised learning-based system that can detect reconstruction failures). + +One of the applications we demonstrate is mapping an image of an object not being interacted with to a 3D mesh of the hand. This work has tackled previously using RGBD sensors [20, 2] or thermal data [7]; our work is able to learn this simply by mining examples via the rich representation our approach can infer. Most existing work in this area that can learn from Internet videos [27, 13] focuses on interaction hotspots, while our work infers a mesh. + +# 3. Dataset + +We gathered a large and rich dataset of everyday interactions from YouTube that serves as a basis for our subsequent investigation. This dataset consists of two parts that play complementary roles: (i) a massive, unlabeled video dataset that is source for unsupervised learning; and (ii) a 100K frame subset that has been labeled. + +We follow the principles outlined in [14], where we search implicitly for hands engaged in interactions rather than explicitly. We see a few advantages to frames from implicitly gathered video data: (a) still photos require an intentional decision to take and upload the photo, meaning that the transitional fossils of daily life (e.g., a half-ajar refrigerator with a hand resting on it) usually go undocumented, a form of selection bias [37]; (b) explicitly gathered data (e.g., searching "playing tuba" for Kinetics [23]) tends to capture unusual activities since these are easy to find. + +# 3.1. Gathering a Large-Scale Video Dataset + +Gathering implicitly consists of two rough stages: identifying an overcomplete set of candidate videos using generic queries and filtering out irrelevant videos. + +Table 2. Comparison of 100DOH with hand datasets. Our dataset is far larger and has a rich annotation of contact state with objects. + +
Name# Im# HandsSideContactObjectsSource
100DOH100K189.6K✓✓✓YouTube
VLOG [14]5K26.1KXPer-ImageXYouTube
VIVA [1]5.5K13.2K✓XXCapture
Ego [5]4.8K15K✓XXCapture
VGG [25]2.7K4.2KXXXFlickr, TV
TV-Hand [28]9.5K8.6KXXXTV
COCO-Hand [28]26.5K45.7KXXXFlickr
+ +Generating a set of query candidates: We began with a set of 11 categories: boardgames, DIY, making drinks, making food, furniture assembly, gardening, doing housework, packing, doing puzzles, repairing, and studying. We generated 13.2K queries using frequent words, Wordnet hyponyms and templated queries (e.g., "DIY cookies home 2014"), and searched YouTube. These queries yield $\sim 6.5\mathrm{M}$ video responses (an estimated 86 years), which we must filter for containing hands interacting with objects. + +Filtering: Manually screening such a large dataset is impractical and we therefore use a learned model based on video thumbnails. In particular, we use three learning targets: (a) what fraction of 100 evenly-spaced frames have high responses from a Faster-RCNN hand detector trained on [14]; and (b) what fraction of frames are judged as containing interaction by human workers; (c) whether the frames are cartoons. + +These cannot be evaluated on the whole dataset, so we train models (see supplemental material) that map thumbnails to a prediction of each. This can be rapidly evaluated at scale on our full dataset's thumbnails and our final dataset is the intersection between the datasets that are likely to contain hands and depict interaction, with likely cartoons removed. These systems are not used in the future and all subsequent annotations are at a frame-level and are independent of video-level filtering mechanism. + +# 3.2. Image Dataset + +This yields a video dataset - 100 Days of Hands (100DOH) - of 27.3K videos across 11 categories with 131 days of footage of everyday interaction. We use this to build a new 100K frame-level dataset, that is primarily ( $\sim$ $85\%$ ) a subset of 100DOH and ( $\sim$ $15\%$ ) a $3 \times$ extended and relabeled version of the hand dataset in [14]. We chose randomly among frames, filtering out (and retaining for later use) images containing no hands. We include VLOG because we tried building off of VLOG, but realized that we needed more diverse underlying data. + +Annotation: For every hand in each image, we obtained the following annotations: (a) a bounding box around the hand; (b) side: left / right, which is crucial for mesh reconstruction; (c) the hand contact state (\{no contact, self + +![](images/e5696c80389f57c7638f1283ad720f4de09e846c1223eaaaa64eefec7b1cf49c.jpg) +Figure 3. Our system can act as a foundation to understand interacting hands on the Internet. Our system takes a single RGB image and detects hands (irrespective of scale) and for every hand predicts: a box, side, contact state, and a box around the object it is touching. We can then (1) obtain a parse of hand state; and (2) use the hand box and side to feed a reconstruction system like [21]. To help make better use of Internet reconstructions, we introduce a self-supervised system that assesses mesh quality that we train on our data. + +contact, other person contact, in contact with portable object, in contact with a non-portable object}), which provides insights into what the person is doing; and (d) a bounding box around the object the person is contacting irrespective of name. The annotation of non-named bounding boxes is crucial: in-the-wild data is known to have a heavy tail, doomed categorization. + +Annotation began by counting hands, then marking hand bounding boxes and sides simultaneously; in addition to standard qualification, consensus, and sentinel techniques, hand bounding boxes were annotated, then verified, then re-annotated if hands were missing. Catching these missing boxes is crucial since with data of this scale, hand detection performance can reach a mAP of $90\%$ . Then hand state and object bounding box were annotated, again using qualifications, consensus, and sentinels. We only included images on which we could get conclusive judgments from workers. In total, in the 100K images, there are 189.6K hands annotated which are in contact with 110.1K objects. + +Splits: We split by YouTube uploader id to make a $80 / 10 / 10\%$ train/val/test split where each uploader appears in only one split. This split is backwards compatible with the VLOG hand data: no VLOG test appears in the trainset. + +Comparison to existing data: We compare our dataset in raw statistics with other comparable datasets of videos in Table 1 and image-based datasets for studying hands in Table 2 (empirical cross-dataset evaluations demonstrating the utility of the dataset appear in Section 5). While unlabeled, our video dataset provides a valuable source of large-scale demonstrations of hands engaged in interaction. Our image dataset fills a gap of providing object contact and side information at vast scale. Additionally, as seen in the paper, 100DOH hands appear at a wide variety of scales. + +# 4. Finding Hands & Objects in Interaction + +Equipped with this data, we show how to build a system that can produce a fine-grained understanding of the scene. Our base system (Sec. 4.1) can predict, from a single image: (1) a box around any visible human hands in the scene as well as their side (left-vs-right) and contact state (none/self/person/portable/non-portable); (2) the box of an object the hand is in contact with; and (3) a link between each hand and an object it is in contact with. Our outputs can be directly plugged into machinery for hand reconstruction (Sec. 4.2) [21, 31], also enabling (4) a 3D mesh reconstruction; (5) and whether that reconstruction was likely correct. We believe this output can enable many exciting downstream applications, and we show a proof of concept of mapping objects to grasps (Sec. 4.3). + +# 4.1. Hand and Object Detection + +We build our system on top of a standard object detection system, Faster-RCNN [29] (FRCNN) by adding auxiliary predictions and losses per-bounding box. We deliberately chose FRCNN for its reputation as a standard foundation for detection tasks; we see additional improvements to the base network as orthogonal to our contributions. Specifically, we build on FRCNN trained to identify two objects - human hands and contacted objects. As in standard Faster-RCNN, the network predicts, for each anchor box, whether the anchor box is an object, what its category is, and bounding box regression adjustments to the anchor box; these remain unchanged. We predict a series of auxiliary outputs directly from the same ROI-pooled features as the standard classification outputs. We now report these outputs and the losses we use to train these additional layers: + +We predict hand side $\mathbf{s} \in \mathbb{R}^2$ and contact state $\mathbf{c} \in \mathbb{R}^5$ via two additional fully connected layers. The outputs rep + +![](images/48ed13e6579208e3f02aba742c2cc29354033dab2c7d5a8276c4c9a47b2e88ca.jpg) + +![](images/5c9ef7ae9619c29cd94711abf607d2cea933cd335ccd4d5588a1f04d95d9ed15.jpg) + +![](images/f06ca7ebc64d8105219d236d6380f4c09e43a458ff9f309f53bb5296a8fde372.jpg) +Figure 4. Selected results from our full hand state detection system. Here we show our results on 100DOH as well as generalizing (untrained) to VIVA [1], EgoHands [5], and VGG [25]. Our system is able to reliably extract hands at a variety of scales, poses, and contexts as well as identify contact state and which object is in contact. + +![](images/0e23e496b81a325abc974fc6fb603823c037c4c97b8586f287b76240d7aa7285.jpg) +100DOH + +![](images/8eb5dd299e2442942bcd88cc4b9c345570469fa8e9b7202990de47a3f5ac5ee1.jpg) + +![](images/7b1b27f0b14068556ef339e35d2f8d134bbaecfa15a3e528d7b848b71db08aa7.jpg) + +![](images/7e589f19445f4e18b67f38f3810274faf5200c9068a3d806b5100184c1acf44e.jpg) + +![](images/2ac5919bb0652288fc2b2afdd0ff47a26445d3fa98bced1335354a941efbeda4.jpg) + +![](images/c325ccbf4914df0e28d26171058a48d45e090550a7d920044db8f4ad0277a56f.jpg) + +![](images/8b932fec78cc5c1a47b9b2240c3cb948f90ef77a25774be52b117364db5fb2ee.jpg) + +![](images/29718c06a4892fe106a6ed7e1987160572be85ec88b36e9aad4071c34e8e9870.jpg) + +![](images/066db7121727597055e781e1273c8ad97d6feeb9b93726603d0e970ff120c167.jpg) + +![](images/4eb43a7ab40958977a8933d79443c5f9b19751af479778ea8fb061ecaabf3cba.jpg) +VIVA + +![](images/6320291484cbd0567324ea9fad3e6f56b6e3f7ea4c33cf00a0cab8b13183ddcc.jpg) + +![](images/105af717ee73c6662c6248df8e001537e86cdde3bbe04ac58c115a5811628171.jpg) + +![](images/bc941e7cc7939409e0cd4b29155b1c63801447956823418307a1903a7d51dd13.jpg) +Ego + +![](images/212aca94c24b44c1797f8baca0de26db78051638957bb57a0fd11fdac9a560c5.jpg) + +![](images/2336b126d8032e30792f9f118ba047744e149205f2e4e06db1eda7f749240044.jpg) + +![](images/d3d7264b16b5bb007755d900f4b6e398ef41c2719baec9036a25f5e39c0a4067.jpg) +VGG + +![](images/78cdebebb2a1a2773f715e727bb357df5aa67cd4f68dc3250707b8cdd3f088d0.jpg) + +![](images/8d543c60fc6fdf263b38cd4976a97f1fa925ce8abca7a75034988e2e9a047bfc.jpg) + +resenting left-vs-right and {none / self / other / portable / non-portable}. Both are trained by minimizing standard cross-entropy losses $L_{\mathrm{side}}$ and $L_{\mathrm{state}}$ . + +To link up boxes between hands and objects, we predict an association from a hand to an object, similar to Gkioxari et al. [17], by predicting an offset vector, factored into a unit vector $\mathbf{v} \in \mathbb{R}^2$ plus a magnitude $m \in \mathbb{R}$ by two fully connected layers. Given the ground-truth vector between the center of the bounding box of a hand to the center of the bounding box of the object the hand is contacting, we write it as a unit vector $\mathbf{v}' \in \mathbb{R}^2$ and magnitude $m \in \mathbb{R}$ . We minimize the distance between the two vectors $L_{\mathrm{ori}}(\mathbf{v}, \mathbf{v}') = ||\mathbf{v} - \mathbf{v}'||_2^2$ as well as the squared difference between the magnitudes $L_{\mathrm{mag}}(m, m') = (m - m')^2$ . Formulating the relationship as predicting an object per-hand allows multiple hands to contact the same object; while it does preclude a hand contacting multiple objects, we find this is rarer and leave it to future work. + +We obtain a final discrete parse in terms of a set of hands in contact/correspondence with a set of objects through a greedy optimization on network output. Given a new image, we infer all the hand and object boxes, as well as their side and contact scores and association vector. We convert these soft predictions into a discrete prediction by suppressing unlikely hand/object detections and then associating each confident hand with the object whose center closest matches the hand's bounding box center plus its offset vector. + +Training details. The standard FRCNN losses are minimized as usual; we minimize $L_{\mathrm{side}}$ , $L_{\mathrm{state}}$ over anchor boxes corresponding to ground-truth hands and $L_{\mathrm{ori}}$ and $L_{\mathrm{mag}}$ over anchor boxes corresponding to ground-truth hands in contact. We scale the loss terms to handle wide variance in the loss scale but otherwise did not tune loss scales (details in supplemental material). We use a ResNet-101 [22] backbone, initialized with Imagenet [32] and train it for 8 epochs with a learning rate of $10^{-3}$ with batch size of 1. + +# 4.2. Applications to Reconstruction + +Our system, out-of-the-box, directly enables the large-scale automatic deployment of techniques for mapping hands to 3D meshes which supplement our outputs. As a concrete demonstration, we build off of the technique of [21] that maps images to the MANO [31] low-dimensional parameterization of hands via a Resnet-18 [22]; this parameterization comprises $[\theta, \beta]$ representing hand pose and shape, which can be converted to a 3D mesh via the differentiable MANO model. Our system provides the necessary inputs (locations plus side); building a more complex system that integrates with the detection system is an interesting future direction and technically feasible but beyond the scope of a single paper. + +While this enables many interesting downstream tasks, these tasks would be harmed by incorrect reconstructions and so we present a simple technique for recognizing these failures. We use the ideas of checking a network's equivariance as a signal for confidence from [4]. Specifically, given an image, we reconstruct the hand from six rotated copies of the image, reproject joints, rotate them and computed the mean L2 distance of corresponding joints. We generate these for 3 frames per training video (70.9K images), sort by consistency and set the examples in the top $30\%$ as positives and the bottom $30\%$ as negatives. We train a two layer multilayer perceptron (hidden layer sizes 100, 50) on $[\theta]$ , minimizing the binary cross-entropy; this classifier can be run at inference time to quickly identify poorly estimated frames. We quantify its effectiveness in Section 5.3. + +# 4.3. Proof of Concept: From Object to Grasp + +Once we can identify hands in contact in videos and reconstruct them, we can generate training data for identifying how hands might contact an object. After associating hands to tracks, we search our training set for moments in time where a hand makes contact with an object. On either + +Table 3. Cross-dataset performance: training Faster-RCNN [29] on our dataset ensures near-equal performance to training and testing on other datasets; other datasets usually generalize poorly. For each train set, we report the minimum ratio (across test sets) between its performance and the best-performer. + +
Test → Train ↓100 DOHVLOG [14]VIVA [1]Ego [5]VGG [25]TV+Co [28]min ratio
100DOH90.186.486.590.873.965.492.9
VLOG78.677.576.683.264.659.281.1
VIVA23.627.790.856.821.510.114.5
Ego40.732.644.990.717.48.011.5
VGG61.461.778.863.079.666.668.1
TV+Co56.261.574.962.477.469.662.4
+ +side are a timestamp $t_{\mathrm{before}}$ where a hand is not in contact and a timestamp $t_{\mathrm{after}}$ where the hand is in contact. At $t_{\mathrm{after}}$ , our system provides side, bounding box for both hand and object, a mesh (via [21]), and our self-supervised mesh assessment score. We can use the object box at $t_{\mathrm{after}}$ to crop the image pre-contact at time $t_{\mathrm{before}}$ . We apply a number of filters, including removing examples with overlapping hands and scenes where the object appeared to move (detected by change in appearance). + +We can then learn a mapping from an image of an uncontacted object to a hand-in-contact. We use 203.4K training samples to build a system. We fine-tuned an Imagenet-pretrained [32] Resnet-18 [22] capped by a MLP to predict, for each mesh, hand pose and side, supervised by standard L2 losses along with supervision from hand vertices similar to [21]. We found that this, like many regression formulations (e.g., see [38]), averaged out between the multiple modes. To prevent averaged hands, we generated a 10-hand codebook from training samples, represented each hand with the nearest of 10 classes and predicted these. For simplicity, trained another Resnet-18 to predict these classes, minimizing a cross-entropy loss. + +# 5. Experiments + +We conduct a series of experiments that aim to quantify: (a) how well the dataset allows the hand detection relative to other hand detection datasets? (b) how well our full model for hand-state works? (c) how much our full hand model assists reconstruction? (d) how well our model infer interacting hands for isolated objects? We conduct our experiments on both our newly introduced datasets, as well as on other hand detection datasets [14, 1, 25, 5]. + +# 5.1. Hand Bounding-Box + +We evaluate the merit of our new dataset of hands by evaluating cross-dataset performance for hand detection with a standard fixed detector, and a comparison with full-body pose estimation. + +Table 4. Average Precision when we vary definitions of correct detection. Using 15K samples dramatically degrades performance on any category, and 45K samples produces a large drop on getting all outputs correct. + +
HandObjH+SideH+StateH+OAll
Full89.663.978.964.046.938.5
45K88.461.077.362.739.331.3
15K80.954.266.853.327.319.7
+ +Cross-dataset hand detection analysis: We begin by training the same base model - a standard F-RCNN [29] with a Resnet-101 [22] backbone - on a number of datasets and evaluating the same and cross-dataset performance. We use F-RCNN for simplicity and due to its widespread use as a commodity detection system. We only evaluate on datasets where all hands in a frame are annotated with boxes [1, 5, 25, 14]. We do not compare with [15] since it only annotates one hand (and note [11] has no hand boxes). We evaluate hand detection results using an IoU of 0.5 (i.e., PASCAL [12]) since unlike objects with clear boundaries e.g., fire hydrants, cars, precise boundary between hand and wrist is unclear in the wild. + +Table 3 shows that a model trained on 100DOH generalizes well across datasets and nearly matches performance obtained training and testing on every other hand datasets: at worst, it obtains $92.9\%$ of the mAP of training and testing on the same data (on VGG). VLOG and VGGHands (both gathered from large-scale diverse data) generalize reasonably well, but far worse than 100DOH with minimum relative mAP of $81.1\%$ and $68.1\%$ respectively; models trained on VIVA and EgoHands perform well on egocentric datasets but generalize poorly to non-egocentric views (which is unsurprising but worth quantifying). The annotation format of VGG and TV is a quadrilateral rather than an axis-aligned rectangle, and we preprocess the labels to be axis-aligned to make all annotations consistent; this diminishes results slightly. We show some sample cross-dataset results in Figure 4. + +Comparison to full-body pose estimation: One common question (also asked by [28]) is whether we need specialized hand-detection given the success of full-body pose estimation systems and datasets [8]. We evaluate this by computing precision/recall for hand detection using OpenPose [8]. We convert body joint configuration and hand detection to a common evaluation scheme by defining true positives as: ([8]) when a pose detector places the hand (estimated as $\mathbf{w} + 0.2(\mathbf{w} - \mathbf{e})$ where $\mathbf{w}$ and $\mathbf{e}$ are wrist and elbow locations) within a ground truth box with the same center but twice the width and height; (ours) when the bounding box detector puts its center point inside the ground-truth box (a higher accuracy standard). Due to truncated people, [8] achieves a low average precision of around $43.0\%$ and ef + +fectively maxes out recall at $49.5\%$ . At this recall, a Faster RCNN still has a precision of $99.7\%$ . While current pose estimators trained on current datasets are effective when the body is mainly visible, dedicated hand detectors appear to still be necessary. + +Statistical Baselines: We additionally test whether the dataset can be solved with simple statistical baselines. We computed the median box for all hands as well as a median box for left and right hands. These get an AP of $0.08\%$ and $0.11\%$ , which shows that the hands are widely distributed across the image and vary in size. + +# 5.2. Full Hand State + +We next evaluate our full hand state detection system in isolation. Here, we show that the scale of our datasets is beneficial by comparing with results obtained by training on smaller subsets of the data. + +Qualitative Results: We show some results of the full system in Figures 4 and 5. In general, our system does a good job at recognizing hands and sides despite a wide variety of scales and contexts present in the data. While it often gets the full state right, this is a clearly harder task with lots of room for improvement. + +Failure modes: Common failure modes include: getting the precise contact state right, especially when the hand is near an object, which video may improve; associating the correct object with the hand, especially with multiple people interacting with multiple objects, which a more complex inference technique might improve; and getting the correct hand side for egocentric hands (e.g., on [11]), which more egocentric training data may improve. + +Metrics: We evaluate the full prediction using mAP by modifying the criterion for a true positive. We begin by evaluating hand (Hand) and interacted object (Obj) individually. We then count a hand as a true positive only if it also has the correct hand side $(H + Side)$ , state $(H + State)$ , and has the correct object associated with it $(H + O)$ . Finally, we count a hand as a true positive only if it has all correct (All). + +Quantitative Results: We are the first to tackle this problem, and therefore there are no methods to compare with. We therefore test to what extent our large-scale data is important and compare to the same method trained on a subsets of data: Full (90K trainval), 45K (50% of trainval); and 15K (17% of trainval). We report results in Table 4. In any category, tripling from 15K to 45K produces large gains, while further doubling to 90K produces more incremental gains. However, when looking to correctly identify all hand state, these mistakes combine to yield a steep performance hit (7% AP) compared to using the full data. Together, these underscore the need for large-scale data, especially as one looks to tackle tasks requiring correct estimation of multiple + +![](images/db906a2bd3818f0cbb1b08176c831e8b26e58a4b310b675ac22eaaccb0ea9ffb.jpg) + +![](images/a430430029ac0d30b37cc3178ba54bfc0473f88e869e1ad55e15a28127a26546.jpg) + +![](images/8c05a4b4343bd49a9173469a18d00b6a6ed2261e34cf7e1aa20bb71b16a3d5f2.jpg) + +![](images/a47b476b032c3041fa91a6bc22bc89754c672c3f70b03fcfb83eb65bd64a4aa7.jpg) + +![](images/207ea7d0c248fd933b95ddd03297d67dc7d2350afa52bb4a802421dbb06354d9.jpg) + +![](images/e04d7e95c97235731e30b8ad20979489a32bd9ad0dc54afedfaf0ed5314e65a2.jpg) + +![](images/36f11ad6491019bd190ac9143bab0344b70ce2f1e3ea01b6300d6dbf9f202316.jpg) +Figure 5. Random results on video frames from our 100 DOH dataset. Our approach detects hands reliably in a variety of scales, configurations, and contexts. + +![](images/0ea403e8ee37a5d90057cb89eba75a1ec6aca15388f7b7c13a37dd8d8e086438.jpg) + +![](images/dc48ada2594e48d1071a3bd423ccfa2051fc1de00a6bec5e4401f42345e052c1.jpg) + +aspects of hands. + +Analysis as a Function of Scale: We evaluate the performance on different hand scales. We separate images into different bins according to the average hand size (measured as the square-root of the percent of pixels) and evaluate each bin. Tiny hands are naturally harder to find and hand AP rapidly goes up from $78.2\%$ to $90.3\%$ as scale goes from $10\%$ to $20\%$ ; performance however remains stable until $70\%$ , where it slightly drops. Additional results appear in the supplemental. + +# 5.3. Hand State for Reconstruction + +One of the exciting outcomes of having a system that can reliably identify hand state is that it directly enables automatically applying mesh reconstruction techniques to consumer videos. We present two experiments that assess our method's contributions to this future - identifying side and our self-supervised mesh assessment technique. We use human judgments to evaluate success. + +Data: We use 2K images from the test set. Our system produced 3,861 detections, which we reconstructed using [21] for both the correct hand side and the incorrect hand side resulting in 7,722 meshes. Crowdsourced workers reannotated the detected hand to preclude mistakes and then assessed each mesh five times as correct/incorrect (definitions in the supplemental). Workers were deliberately not told to inspect sides of hands. Workers passed a qualification test; we used sentinels to monitor performance; and results from all reconstructions were annotated simultaneously and in randomized order. + +Quantitative Results (Side): We first tested whether having the side was important – an alternate hypothesis is that MANO might repurpose thumbs for pinkies, for instance. We show a few select qualitative examples in Figure 6. Unsurprisingly, despite not being told to examine side, workers + +![](images/420d9db1da1742a4e96712a131224f53b324291545f9064351e7b412d1bd9498.jpg) +Good + +![](images/6fb1ae9c5f9a2d69bbe2935bed617e2e39abf0d59a70d56ee4850f2a79340c9d.jpg) +Figure 6. Mesh reconstruction and assessment. Our system detects the location and side of hands in Internet videos, that [21] uses to predict a mesh. Many predictions do not succeed. Our self-supervised system for mesh assessment identifies plausible (useful for downstream tasks) and implausible hands (worth discarding). + +![](images/8cb2fe899ac7a10ce1a84b33fb1a2cc7b68c1bfd15b7cd9380970c2722b36796.jpg) +Bad + +![](images/079b388515ab8bb7a53f8b0e20ce2322702c9e3ec8fca14ece6678922b9929cd.jpg) + +were far more likely to think hands reconstructed with the detected side were correct $(57.8\%)$ compared to the opposite side $(29.1\%)$ . + +Quantitative Results (Quality): We then used this data to evaluate whether we can successfully identify correct reconstructions. We binarized worker judgments by majority vote and computed AUROC. The proposed method (a MLP trained on positives/negatives identified by self-consistency) obtains an AUROC of $90\%$ on this data. We compared with a two baselines to put this result in context. Gaussian Naive Bayes on the same training data does similarly $(89\%)$ , showing that the positive/negative labels are important, not the learning algorithm. Simply fitting a multivariate Gaussian on all generated hands and using the log-likelihood does far worse $(60\%)$ , which underscores the importance of the labels. + +# 5.4. Future prediction + +We took our networks trained on the training set of 100DOH and tested them on videos from the test set, finding points at which contact changes. We then reconstruct 3K examples, showing both qualitative results and computing quantitative results via human judgment. + +Qualitative Results: We show a few select qualitative examples in Figure 7. Overall we observe that our method often does a good job of identifying the angle from which the hand should grasp the object. While our approach often finds plausible grasps, the myriad of ways a human can grasp an object and difficulty of predicting a full mesh + +![](images/50ae7d9f18079f33da000d377c7ab994e9ecceedf41ee97597bca70e8de9d627.jpg) +Figure 7. Hand prediction results. Our system enables extracting pairs of images of uncontacted objects and good reconstructed meshes. We show results of a system trained to infer meshes from images. (Rows 1,2): Selected Results. (Row 3,4): Random results that crowd workers liked/preferred over a random grasp (Row 3) or did not like (preferring random grasp over it). + +makes this a challenging task. + +Human Judgment: We showed 3K results to crowd-workers in a two-choice test, comparing the result to a random hand from the training set to examine if our system extracts the signal. Note that random is very frequently correct by chance since usually very many grasps suffice (consider how many ways your hand can touch a soda can). Workers selected which they thought was more plausible given the image. Presentation order was randomized, and we employed qualifications and sentinels; examples where workers could not come to an agreement were considered ties. Of the $60\%$ with a conclusive result (some inconclusive results are due to the input not depicting a clear object), our system was preferred $72\%$ of the time. + +# 6. Conclusion + +We have presented a method for obtaining information about hand contact state in the scene, a large-scale dataset for training this method, and demonstrated applications of our technique. We are barely scratching the surface in terms of what can be learned in the world of large-scale Internet video and we hope that our rich representation can help the field collectively explore this area. + +Acknowledgments: This work was supported by: the Advanced Machine Learning Collaborative Grant from Procter & Gamble in collaboration with Matthew Barker, PhD; and a gift from Nokia Solutions and Networks Oy. + +# References + +[1] The vision for intelligent vehicles and applications (VIVA) challenge, laboratory for intelligent and safe automobiles, UCSD. http://cvrr.ucsd.edu/vivachallenge/. 2, 3, 5, 6 +[2] Shuichi Akizuki and Yoshimitsu Aoki. Tactile logging for understanding plausible tool use based on human demonstration. In BMVC, 2018. 3 +[3] Jean-Baptiste Alayrac, Piotr Bojanowski, Nishant Agrawal, Ivan Laptev, Josef Sivic, and Simon Lacoste-Julien. Unsupervised learning from narrated instruction videos. In CVPR, 2016. 1 +[4] Yuval Bahat and Gregory Shakhnarovich. Confidence from invariance to image transformations. CoRR, abs/1804.00657, 2018. 5 +[5] Sven Bambach, Stefan Lee, David Crandall, and Chen Yu. Lending a hand: Detecting hands and recognizing activities in complex egocentric interactions. In ICCV, 2015. 2, 3, 5, 6 +[6] Fabien Baradel, Natalia Neverova, Christian Wolf, Julien Mille, and Greg Mori. Object level visual reasoning in videos. In ECCV, 2018. 2 +[7] Samarth Brahmbhatt, Cusuh Ham, Charlie Kemp, and James Hays. Contactdb: Analyzing and predicting grasp contact via thermal imaging. In CVPR, 2019. 1, 2, 3 +[8] Zhe Cao, Tomas Simon, Shih-En Wei, and Yaser Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In CVPR, 2017. 2, 6 +[9] Yu-Wei Chao, Yunfan Liu, Xieyang Liu, Huayi Zeng, and Jia Deng. Learning to detect human-object interactions. In Proceedings of the IEEE Winter Conference on Applications of Computer Vision, 2018. 2 +[10] Yu-Wei Chao, Zhan Wang, Yugeng He, Jiaxuan Wang, and Jia Deng. Hico: A benchmark for recognizing human-object interactions in images. In ICCV, 2015. 2 +[11] Dima Damen, Hazel Doughty, Giovanni Maria Farinella, Sanja Fidler, Antonino Furnari, Evangelos Kazakos, Davide Moltisanti, Jonathan Munro, Toby Perrett, Will Price, and Michael Wray. Scaling egocentric vision: The epic-kitchens dataset. In ECCV, 2018. 2, 3, 6, 7 +[12] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes (VOC) challenge. *IJCV*, 88(2):303–338, 2010. 2, 6 +[13] Kuan Fang, Te-Lin Wu, Daniel Yang, Silvio Savarese, and Joseph J. Lim. Demo2vec: Reasoning object affordances from online videos. In CVPR, 2018. 3 +[14] David F. Fouhey, Weicheng Kuo, Alexei A. Efros, and Jitendra Malik. From lifestyle VLOGs to everyday interactions. In CVPR, 2018. 1, 2, 3, 6 +[15] Guillermo Garcia-Hernando, Shanxin Yuan, Seungryul Baek, and Tae-Kyun Kim. First-person hand action benchmark with rgb-d videos and 3d hand pose annotations. In CVPR, 2018. 2, 6 +[16] J. Gibson. The ecological approach to visual perception. Boston: Houghton Mifflin, 1979. 2 +[17] Georgia Gkioxari, Ross Girshick, Piotr Dollar, and Kaiming He. Detecting and recognizing human-object interactions. In CVPR, 2018. 2, 5 + +[18] Chunhui Gu, Chen Sun, Sudheendra Vijayanarasimhan, Caroline Pantofaru, David A. Ross, George Toderici, Yeqing Li, Susanna Ricco, Rahul Sukthankar, Cordelia Schmid, and Jitendra Malik. AVA: A video dataset of spatio-temporally localized atomic visual actions. In CVPR, 2018. 2 +[19] Saurabh Gupta and Jitendra Malik. Visual semantic role labeling. arXiv preprint arXiv:1505.04474, 2015. 2 +[20] Henning Hamer, Juergen Gall, Thibaut Weise, and Luc Van Gool. An object-dependent hand pose prior from sparse training data. In CVPR, 2010. 3 +[21] Yana Hasson, Gül Varol, Dimitrios Tzionas, Igor Kalevatykh, Michael J. Black, Ivan Laptev, and Cordelia Schmid. Learning joint reconstruction of hands and manipulated objects. In CVPR, 2019. 1, 2, 3, 4, 5, 6, 7, 8 +[22] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 5, 6 +[23] Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, Mustafa Suleyman, and Andrew Zisserman. The kinetics human action video dataset. CoRR, abs/1705.06950, 2017. 3 +[24] Antoine Miech, Dimitri Zhukov, Jean-Baptiste Alayrac, Makarand Tapaswi, Ivan Laptev, and Josef Sivic. Howto100m: Learning a text-video embedding by watching hundred million narrated video clips. arXiv preprint arXiv:1906.03327, 2019. 2, 3 +[25] A. Mittal, A. Zisserman, and P. H. S. Torr. Hand detection using multiple proposals. In BMVC, 2011. 2, 3, 5, 6 +[26] Mathew Monfort, Alex Andonian, Bolei Zhou, Kandan Ramakrishnan, Sarah Adel Bargal, Tom Yan, Lisa Brown, Quanfu Fan, Dan Gutfruend, Carl Vondrick, et al. Moments in time dataset: one million videos for event understanding. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 1-8, 2019. 3 +[27] Tushar Nagarajan, Christoph Feichtenhofer, and Kristen Grauman. Grounded human-object interaction hotspots from video. In ICCV, 2019. 3 +[28] Supreeth Narasimhaswamy, Zhengwei Wei, Yang Wang, Justin Zhang, and Minh Hoai. Contextual attention for hand detection in the wild. In ICCV, 2019. 2, 3, 6 +[29] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In NIPS, 2015. 4, 6 +[30] G. Rogez, J. Supancic, and D. Ramanan. Understanding everyday hands in action from rgb-d images. In ICCV, 2015. 1, 2 +[31] J. Romero, D. Tzionas, and M. J. Black. Embodied hands: Modeling and capturing hands and bodies together. ACM Transactions on Graphics, (Proc. SIGGRAPH Asia), 36(6), 2017. 3, 4, 5 +[32] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, pages 1–42, April 2015. 5, 6 + +[33] Gunnar A. Sigurdsson, Gül Varol, Xiaolong Wang, Ali Farhadi, Ivan Laptev, and Abhinav Gupta. Hollywood in homes: Crowdsourcing data collection for activity understanding. In ECCV, 2016. 2, 3 +[34] A. Spurr, J. Song, S. Park, and O. Hilliges. Cross-modal deep variational hand pose estimation. In CVPR, 2018. 1, 2 +[35] Srinath Sridhar, Franziska Mueller, Michael Zollhöfer, Dan Casas, Antti Oulasvirta, and Christian Theobalt. Real-time joint tracking of a hand manipulating an object from rgb-d input. In ECCV, 2016. 2 +[36] Bugra Tekin, Federica Bobo, and Marc Pollefeys. H+o: Unified egocentric recognition of 3d hand-object poses and interactions. In CVPR, 2019. 2 +[37] A. Torralba and A. A. Efros. Unbiased look at dataset bias. In CVPR, 2011. 3 +[38] Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In ECCV, 2016. 6 +[39] Luowei Zhou, Chenliang Xu, and Jason J. Corso. Towards automatic learning of procedures from web instructional videos. In AAAI, 2018. 1, 2, 3 +[40] Dimitri Zhukov, Jean-Baptiste Alayrac, Ramadan Gokberk Cinbis, David Fouhey, Ivan Laptev, and Josef Sivic. Cross-task weakly supervised learning from instructional videos. In CVPR, 2019. 2 +[41] C. Zimmerman and T. Brox. Learning to estimate 3d hand pose from single rgb images. In ICCV, 2017. 1, 2 +[42] Christian Zimmermann, Duygu Ceylan, Jimei Yang, Bryan Russell, Max Argus, and Thomas Brox. Freihand: A dataset for markerless capture of hand pose and shape from single rgb images. In IEEE International Conference on Computer Vision (ICCV), 2019. 1, 3 \ No newline at end of file diff --git a/understandinghumanhandsincontactatinternetscale/images.zip b/understandinghumanhandsincontactatinternetscale/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..465604ef09266c054cfd1f31a6f88b117cf14df8 --- /dev/null +++ b/understandinghumanhandsincontactatinternetscale/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0640d9e9f3feba892b328d2cbc978b4fd1b778b1216851aa3c7c5da50f7953e7 +size 597209 diff --git a/understandinghumanhandsincontactatinternetscale/layout.json b/understandinghumanhandsincontactatinternetscale/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c3e086b07f3a662d2c95bcf48a5feedb1054a32d --- /dev/null +++ b/understandinghumanhandsincontactatinternetscale/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:091fbe332e21659fb70013237841f743c93917638efe63fc8cb06a5888156d3a +size 436119 diff --git a/understandingroadlayoutfromvideosasawhole/e342164a-9663-4b46-807a-553fb00b3ce6_content_list.json b/understandingroadlayoutfromvideosasawhole/e342164a-9663-4b46-807a-553fb00b3ce6_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d95e7fa541c8b372ab719b1ad21006430389115f --- /dev/null +++ b/understandingroadlayoutfromvideosasawhole/e342164a-9663-4b46-807a-553fb00b3ce6_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9077640b40b315160d1a5bae3d645d9c915127992edfbbb8383a2be7496ca6b +size 77207 diff --git a/understandingroadlayoutfromvideosasawhole/e342164a-9663-4b46-807a-553fb00b3ce6_model.json b/understandingroadlayoutfromvideosasawhole/e342164a-9663-4b46-807a-553fb00b3ce6_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b00a543d261fbc506f75880a74b72adbfe5c5877 --- /dev/null +++ b/understandingroadlayoutfromvideosasawhole/e342164a-9663-4b46-807a-553fb00b3ce6_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d038f80099eaee998a5a3524f342bfdec8f93cc856d4b205bdff74042ccf22dd +size 96423 diff --git a/understandingroadlayoutfromvideosasawhole/e342164a-9663-4b46-807a-553fb00b3ce6_origin.pdf b/understandingroadlayoutfromvideosasawhole/e342164a-9663-4b46-807a-553fb00b3ce6_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8f31408130014fff338cf9af228bbfa8af88a32d --- /dev/null +++ b/understandingroadlayoutfromvideosasawhole/e342164a-9663-4b46-807a-553fb00b3ce6_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:726fd398f09d26574f3dc4bbf6d3e7de2951173bda376577dd503043c60dff86 +size 2376512 diff --git a/understandingroadlayoutfromvideosasawhole/full.md b/understandingroadlayoutfromvideosasawhole/full.md new file mode 100644 index 0000000000000000000000000000000000000000..80c72a27ccbc7ecee9edb48167c658a226475ad5 --- /dev/null +++ b/understandingroadlayoutfromvideosasawhole/full.md @@ -0,0 +1,315 @@ +# Understanding Road Layout from Videos as a Whole + +Buyu Liu1 Bingbing Zhuang1 Samuel Schulter1 Pan Ji1 Manmohan Chandraker1,2 +1NEC Laboratories America 2UC San Diego + +# Abstract + +In this paper, we address the problem of inferring the layout of complex road scenes from video sequences. To this end, we formulate it as a top-view road attributes prediction problem and our goal is to predict these attributes for each frame both accurately and consistently. In contrast to prior work, we exploit the following three novel aspects: leveraging camera motions in videos, including context cues and incorporating long-term video information. Specifically, we introduce a model that aims to enforce prediction consistency in videos. Our model consists of one LSTM and one Feature Transform Module (FTM). The former implicitly incorporates the consistency constraint with its hidden states, and the latter explicitly takes the camera motion into consideration when aggregating information along videos. Moreover, we propose to incorporate context information by introducing road participants, e.g. objects, into our model. When the entire video sequence is available, our model is also able to encode both local and global cues, e.g. information from both past and future frames. Experiments on two data sets show that: (1) Incorporating either global or contextual cues improves the prediction accuracy and leveraging both gives the best performance. (2) Introducing the LSTM and FTM modules improves the prediction consistency in videos. (3) The proposed method outperforms the SOTA by a large margin. + +# 1. Introduction + +Understanding 3D properties of road scenes from single or multiple images is an important and challenging task. Semantic segmentation [2, 3, 41], (monocular) depth estimation [9, 16, 40] and road layout estimation [10, 25, 28, 38] are some well-explored directions for single image 3D scene understanding. Compared to image-based inputs, videos provide the opportunity to exploit more cues such as temporal coherence, dynamics and context [19], yet 3D scene understanding in videos is relatively under-explored, especially with long-term inputs. This work takes a step towards 3D road scene understanding in videos through a holistic consideration of local, global and consistency cues. + +![](images/c212888d87e93d6c5ef6042e85a695e51461a6899979d8fb6d0c8bfc12ac1494.jpg) +Figure 1: Given perspective images (top left) that captures a 3D scene, our goal is to predict the layout of complex driving scenes in top-view both accurately and coherently. + +To this end, we formulate this video scene understanding problem as a road layout estimation problem. We are particularly interested in estimating top-view representations [25, 27] as working in the top-view is beneficial for higher-level reasoning and decision making for downstream applications, e.g. path planning and autonomous driving. Given a video sequence, our goal is to predict the road layout of each frame both accurately and coherently. + +To achieve that, we first propose a novel network structure to enforce temporal smoothness in videos. Specifically, our network consists of (i) an LSTM [13] that incorporates the long-range prediction coherency and (ii) a Feature Transform Module (FTM) that explicitly aggregates information w.r.t. estimated camera motion and encourages consistency on the feature level. By explicitly and implicitly encoding temporal smoothness constraints, our proposed network is able to improve the prediction accuracy and consistency. Apart from incorporating temporal coherency in videos, we further propose to exploit context cues in scene attribute prediction in the top-view. More specifically, such cues are represented and obtained with 3D object detection [17, 18] and provide useful priors and constraints for layout estimation in the top-view. For instance, by looking at only the green rectangles in the "top-view representation" in Fig. 1, one can obtain a rough estimate of the drivable areas. + +The above mentioned proposals are applicable for both + +offline and online scene understanding in videos. When the online scenario is not required, we can further improve our model by leveraging even more powerful temporal cues from future frames. Applications like forensic analysis of traffic scenes and driver behavior studies using commodity cameras are examples where road layout estimation is required while the entire videos can be available. For such cases, we further propose to combine information obtained locally from individual frames with that obtained globally from entire video sequences. Specifically, we utilize structure from motion (SfM) [23] and multiple view stereo (MVS) [24] to obtain a dense 3D reconstruction of the road scene from the video sequence. The multiview geometric constraints encoded in such methods naturally aggregate the temporal information from multiple frames, thus permitting a more coherent scene representation as compared to individual views. This allows us to build the model input that is of better representation power and smoother, which boosts the prediction accuracy as well as coherence (see Fig. 1). + +We conduct experiments to validate our ideas on two public driving data sets, KITTI [8] and NuScenes [22] (Sec. 4). Our results demonstrate the effectiveness of the global and context cues in terms of prediction accuracy, and the importance of the LSTM as well as FTM for consistent outputs. To summarize, our key contributions are: + +- A novel neural network that includes (i) an LSTM that implicitly enforces prediction coherency in videos and (ii) a Feature Transform Module that explicitly encodes the feature level consistency w.r.t. camera motion. +- An input representation that considers information obtained (i) locally from individual frames, (ii) globally from entire video sequence and (iii) from contextual cues. +- Experimental evaluation that outperforms state-of-the-art on public datasets by a large margin. + +# 2. Related Work + +Scene understanding is an important yet challenging task in computer vision, which enables us to perform applications such as robot navigation [11], autonomous driving [7, 15], augmented reality [1] or real estate [20, 31]. + +3D scene understanding: 3D scene understanding is most frequently explored for indoor scenes [1, 20, 30], which is typically formulated as a room layout estimation problem. However, unlike the indoor scenes where strong priors, e.g. Manhattan world assumption, are available, scene understanding for outdoor scenarios is less constrained, thus can be more challenging. To this end, many non-parametric approaches have been proposed [10, 34, 35], where layered representations are utilized to reason about the geometry as well as semantics in occluded areas. More recent work [25, 28] propose top-view representations to provide a more detailed description for outdoor scenes in 3D. As for + +parametric models, Seff and Xiao [27] propose a model that consists of certain road scene attributes and further utilize a neural network to directly predict them from a single perspective RGB image. However, these pre-defined attributes are not rich enough to capture various types of road layout. A more recent work [15] presents a graph-based road representation that includes lanes and lane markings, from partial segmentation of an image. However, this representation focuses on straight roads only. Similarly, an interesting model is proposed by Máttyus et al. [21] to augment existing map data with richer semantics. Again, this model only handles straight roads and requires additional input from aerial images. To further handle complex road layouts with traffic participants, Geiger et al. [7] propose to utilize multiple modalities as input, such as vehicle tracklets, vanishing points and scene flow. Recently, a richer model [38] is proposed to handle more complex road scenarios, e.g. multiple lanes and different types of intersections. Our work follows the parametric representation proposed in [38]. Unlike [38] that only takes local information, e.g. pixel-level depth and semantic segmentation from a single frame, we propose to explore multiple aspects in videos, e.g. global information and context cues, to obtain accurate and coherent predictions. + +Scene understanding in videos: Apart from accuracy, scene understanding in videos further requires consistent predictions between consecutive frames. Spatio-temporal probabilistic graphical models [19, 38] are widely explored for outdoor scenes. Nowadays, recurrent neural networks (RNNs) like LSTMs [4, 13, 32] are used to propagate feature representations from still frames over time. However, LSTMs implicitly enforce the prediction consistency without the explicit knowledge of motion. To this end, more recent work [5, 29] propose to combine features extracted from both images and motion, or optical flow, to boost the representational power. Although motion is fed as additional input for networks in these above mentioned networks, it is not utilized to transform features over time to explicitly enforce the feature level consistency. Maybe [36, 42] are the most closest work to ours in terms of feature warping and aggregation. Specifically, [42, 43] explicitly warp feature maps [6] between frames and propose to aggregate them in a more well-aligned manner. To address the fixed temporal width problem in [42], more recent work [36] introduces a feature memory that is warped from one frame to another, which enables a longer temporal horizon without looking into future frames. In contrast, we introduce a Feature Transform Module (FTM) that warps features w.r.t camera motion and aggregates them between consecutive frames. And we further propose to combine LSTM and FTM to implicitly and explicitly enforce temporal smoothness in predictions. More importantly, unlike prior methods that estimate flow in the perspective view of the scene, all our modules work in the top-view space. + +![](images/e7b8c86b3c4776782066f00e546508c0241ad3c2fdb00bcfa3b325fe9260a6cf.jpg) +Figure 2: Overview of our proposed framework: Given videos as input, top-view maps aggregated from local, global and context information, are fed into our FTM/LSTM network to predict the parametric road scene layout. + +$$ +\mathbf {x} ^ {t + 1} \mathbf {\hat {x}} ^ {t - 1} \mathbf {\hat {x}} ^ {t} f _ {\mathbf {\hat {x}}} \mathbf {\hat {x}} ^ {t + 1} \mathbf {x} ^ {t - \hat {g} _ {f t}}; \mathbf {x} ^ {t + 1} \mathbf {x} ^ {t - 1} \mathbf {x} ^ {t} f _ {s t} g _ {i} g _ {j} g _ {l s t m} \Theta^ {t} \Theta^ {t + 1} \Theta^ {t - 1} h +$$ + +# 3. Our Framework + +$\mathbf{x}^{t}$ $\mathbf{x}^{t + 1}$ $\mathbf{x}^{t}$ -Weftbriefly introduce the parameterized scene model in $h\exists^{t + }$ Sec.3.1.Then we describe our proposed LSTM with FTM in Sec.3.2, followed by the utilization of context information $\mathbf{x}^{t + 1}$ $\mathbf{x}^{t - 1}$ $\mathbf{x}^{t}f_{s}\mathbf{x}^{t + 1}$ $\mathbf{x}^{t - }g_{ft}^{t - }f_{st}^{t - }q_{i}\mathbf{S}_{d}$ $\Theta^t\Theta^{t + 1}\Theta^{t - 1}h^1\Theta^{t - 1}h^1\Theta$ and global information in Sec.3.3.An overview of our framework is shown in Fig.2. + +# 3.1. Scene Representation + +Given a monocular video sequence capturing a road in the perspective view, our goal is to obtain a coherent yet accurate road layout estimation in the top-view for each frame. To describe the top-view layout, we follow the parametric representation of [38], which consists of three different types of scene attributes/variables, including $M^{\mathrm{b}} = 14$ binary variables $\Theta_{\mathrm{b}}$ , $M^{\mathrm{m}} = 2$ multi-class variables $\Theta_{\mathrm{m}}$ and $M^{\mathrm{c}} = 22$ continuous variables $\Theta_{\mathrm{c}}$ . These parameters can represent a large variety of road scene layouts1. See Fig. 1 for examples of predicted results. Denoting the scene model parameters $\Theta = \{\Theta_{\mathrm{b}}, \Theta_{\mathrm{m}}, \Theta_{\mathrm{c}}\}$ , we aim to predict $\Theta^{t}$ , the scene parameters of the $t$ -th frame, coherently and accurately for all $t \in \{1, \dots, T\}$ , where $T$ is the number of frames in a video. However, instead of making predictions from single image, we propose to augment the underlying feature representation and aggregate temporal information from videos for more temporally consistent and robust predictions. + +# 3.2. Our LSTM-based Model + +In order to exploit long-term temporal information, we propose to utilize LSTM for road layout prediction. In addition, we propose a Future Transform Module (FTM) to more explicitly aggregate temporal information. We will discuss more details below. + +We denote the representation of the road scene at a certain view as $\mathbf{x} \in \mathbb{R}^{H \times W \times C}$ , and hence $\mathbf{x}^t$ at the $t$ -th frame in a + +video. Here, $\mathbf{x}$ can be regarded as any generic representation of such as RGB perspective image or top-view image of the road; but proposed novel top-view representation will be discussed shortly in Sec. 3.3. Given $\mathbf{x}^t$ , our overall model is defined as following: + +$$ +y ^ {t} = f _ {\text {c o m}} \left(g _ {i} \left(\mathbf {x} ^ {t}\right), g _ {f t} \left(g _ {i} \left(\mathbf {x} ^ {t - 1}\right)\right)\right), \tag {1} +$$ + +$$ +\Theta^ {t} = h \left(g _ {l s t m} \left(g _ {j} \left(y ^ {t}\right)\right)\right), +$$ + +where $h$ , $g_{*}$ and $f_{*}$ are neural networks, with weights $\gamma_{h}$ , $\gamma_{g*}$ and $\gamma_{f*}$ respectively, that we want to train. $y^{t}$ is the auxiliary intermediate feature representation. Our network structure is illustrated in Fig. 3. The architecture of $g_{i}$ is a shallow (one-layer) convolutional neural network (CNN) and $g_{j}$ is a deeper (seven-layer) network. We firstly pass the individual input $\mathbf{x}^t$ to $g_{i}$ and receive feature $g_{i}(\mathbf{x}^{t})$ . Then this feature is combined with $g_{ft}(g_i(\mathbf{x}^{t - 1}))$ , which is obtained by feeding $g_{i}(\mathbf{x}^{t - 1})$ , the feature obtained from previous frame, to FTM $g_{ft}$ , and feed to $g_{j}$ . The output of $g_{j}$ is a 1-dimensional feature vector (for each frame) that is further fed into our LSTM module $glstm$ . $glstm$ then outputs features that implicitly encode information from previous frame by incorporating hidden states from $\mathbf{x}^{t - 1}$ and send to $h$ . Then, the function $h$ is defined as a multi-layer perceptron (MLP) predicting the scene attributes $\Theta^t$ with features obtained from LSTM module. Specifically, $h$ is implemented as a multi-task network with three separate predictions for each of the parameter groups of the scene model. + +# 3.2.1 Feature transform module + +Assuming that after $g_{i}$ , we are able to extract a feature map $\mathbf{F} = g_{i}(\mathbf{x}) \in \mathbb{R}^{h_{f} \times w_{f} \times c_{f}}$ , where $h_{f}, w_{f}$ , and $c_{f}$ denote the height, width and feature dimension. We would like + +![](images/543178830ee49a419667bd1aa57c1728bb46bf17b490a63ab0fc331191f9139e.jpg) + +![](images/4d24d7ccae0e580a9eef786bb5e8673572a6ddbf766f8daf4f7411d1e9e88245.jpg) + +![](images/86cd8479a996b9ba7c5be167ee6a11068b8a576e760a5976ed2cacfdb570634f.jpg) +Figure 3: Overview of our network. + +the network to learn more robust feature representations by encouraging temporal consistency. To this end, we propose to aggregate the features that correspond to the same location in the scene from the nearby frames, and feed the composited features into the later prediction layers. Intuitively, we would like the network to make use of the features at the same point but from different views for more robust prediction, as well as encourage more temporally consistent feature learning. + +Feature correspondence: In order to aggregate the features corresponding to the same spatial location, we need to find a correspondence between two feature maps in neighbouring frames. One obvious way to achieve this is by computing optical flow [33] between neighbouring perspective images and transforming the correspondence w.r.t. the flow field on the feature map. We later show in Sec. 3.3.2 that such computation can be obviated here as we have the camera poses and 3D reconstruction of the road built from the video. + +Feature transformation: Given the correspondence between feature maps, we can warp [36, 42] the feature map at time step $t - 1$ to the current time step $t$ , denoted as: + +$$ +g _ {f t} \left(\mathbf {F} ^ {t - 1}\right) = \phi \left(\mathbf {F} ^ {t - 1}, S ^ {t - 1} \left(\mathbf {x} ^ {t}, \mathbf {x} ^ {t - 1}\right)\right) \tag {2} +$$ + +where $\phi (*)$ is the bilinear sampling function [14] and $S^{t - 1}(\mathbf{x}^t,\mathbf{x}^{t - 1})\in \mathbb{R}^{h_f\times w_f\times 2}$ is a displacement (or flow) field between frames $t$ and $t - 1$ . + +Feature composition: One can choose various ways to aggregate the feature map $g_{ft}(\mathbf{F}^{t - 1})$ and $\mathbf{F}^t$ . Here, we adopt the following simple weighted summation of the two, + +$$ +f _ {c o m} \left(\mathbf {F} ^ {t}, g _ {f t} \left(\mathbf {F} ^ {t - 1}\right)\right) = \alpha \cdot \mathbf {F} ^ {t} + (1 - \alpha) \cdot g _ {f t} \left(\mathbf {F} ^ {t - 1}\right), \tag {3} +$$ + +where $\alpha$ can either be a scalar, e.g. $\alpha = \frac{1}{2}$ , or a matrix, $\alpha \in \mathbb{R}^{h_f\times w_f}$ . Note that in both cases, $\alpha$ can be automatically learned together with the rest of the network without any additional supervision. For special cases where $t = 1$ , we simply assume $g_{st}(\mathbf{F}^{t - 1})$ equals to $\mathbf{F}^t$ . It's simple but it works well in practice, see supp for more discussion. + +Discussion: Note that we can easily extend our model by aggregating features from frames that are further away or even from future frames in offline settings. Also, FTM can be extended for multiple feature maps at different scales, which can potentially further improve the performance. + +![](images/61205beb7ff1b7e3c4c484c76a68ad4ff9b0f354e3b00de78c09eadbd3f56cf5.jpg) + +# 3.2.2 Loss functions on scene attribute annotation: + +Given the annotated data sets $D^{\mathrm{r}}$ that consist of $N^{\mathrm{r}}$ videos, we define our overall loss function $\mathcal{L}_{\mathrm{sup}}^{\mathrm{r}}$ as: + +$$ +\sum_ {i, t} ^ {N ^ {\mathrm {r}}, T} \operatorname {B C E} (\Theta_ {\mathrm {b}, i} ^ {t}, \hat {\Theta} _ {b, i} ^ {t}) + \operatorname {C E} (\Theta_ {\mathrm {m}, i} ^ {t}, \hat {\Theta} _ {m, i} ^ {t}) + \ell_ {1} (\Theta_ {c, i} ^ {t}, \hat {\Theta} _ {c, i} ^ {t}), +$$ + +where CE denotes cross-entropy and BCE represents binary cross-entropy. We further denote the ground-truth layout parameters of the $t$ -th frame in the $i$ -th video sequence in the data set as $\hat{\Theta}_{*,i}^t$ . Note that we discretize continuous variables for the regression task - each variable is discretized into $K = 100$ bins by convolving a Dirac delta function centered at $\Theta_{\mathrm{c}}$ with a Gaussian of fixed variance [38]. + +# 3.3. Model Input + +As suggested by [38], the form of our model input $\mathbf{x}$ has a large impact on our model. Although a perspective RGB image is a natural representation of $\mathbf{x}$ , it does not work well in top-view layout estimations. Instead, [38] proposes to convert each single perspective image to semantic top-view with pixel-level depth and semantic segmentation. In our case, since we are working on videos, there are more aspects that can be explored, like long-term temporal smoothness. In this section, we propose to exploit both context and global information in videos to improve the representation of $\mathbf{x}$ . + +Local information: single frame Following [38], given a single perspective image, together with its semantic segmentation, CNN-predicted dense depth, and camera intrinsics, we could obtain a top-view image of the road by (1) back-projecting all the road pixels into a 3D point cloud and (2) projecting all the 3D points onto the x-y plane. We use this mapping to transfer the semantic class probability distribution of each pixel from perspective- into top-view. We call it $bev$ and denote it as $\mathbf{x} \in \mathbb{R}^{H \times W \times C}$ , where $C$ is the number of semantic classes. $H = 128$ and $W = 64$ pixels, which relates to $60 \times 30$ meters in the point cloud. See Fig. 6 for some examples of the $bev$ map obtained with single images. + +# 3.3.1 Context information + +Considering that incorporating context cues proves to be very beneficial in many scene understanding tasks, unlike [38] that only includes $C = 4$ classes (i.e. road, sidewalk, lane, crosswalk), we propose to further encode an object class in $\mathbf{x}$ (so $C = 5$ ). Specifically, we observe that traffic participants, i.e. vehicles like cars, are commonly present in driving scenarios and can be very useful for layout estimation, e.g. side-faced cars are informative in terms of predicting the existence of or even the distance to side-road. One naive way to incorporate context cues is to follow what is done for other classes to directly map the pixel-level probabilities of objects to top-view. However, we observe that this naive + +![](images/8b0bee49e099cc7fbdc213097207ad815a652846e3d7dea1abe1d47d74785786.jpg) +(a) +Figure 4: Two examples comparing the box representation and the point cloud representation of the cars. We can observe four frontal-faced cars in both (a) and (b) and one side-faced car in (b). + +![](images/fbd271334e86016140ba0076390dc10b18b7f73643101c22e9067c7d9eeaaf27.jpg) +(b) + +method would lead to diffused representations3 (See Fig. 4 for examples) and can be very noisy. Instead, we propose to utilize the bounding box representation. Specifically, we apply existing 3D object detectors [17, 18] on our videos and map the detection results into top-view. In order to reduce the impact of angle predictions, we further propose to categorize angles into two types, frontal-faced and side-faced. As long as the predicted yaw angle is within $\left[-\frac{\pi}{4}, \frac{\pi}{4}\right]$ or $\left[\frac{3\pi}{4}, \frac{5\pi}{4}\right]$ w.r.t. camera $z$ -axis (forward direction), we assume this predicted object is frontal-faced. Otherwise, it is side-faced (Fig. 4). + +# 3.3.2 Global information from video sequence + +As can be viewed in individual frame examples in Fig. 6, there are clearly some artifacts with $bev$ , e.g. the V-shape in the bottom and the missing details where pixels are far away. This is in essence due to the inherent limitation of single-view 3D reconstruction in terms of the resolution for far away points in the scene. + +Top-view map from COLMAP: When the input is an entire video sequence, we are able to address the above mentioned artifacts in an individual frame by generating a more complete 3D reconstruction as well as the subsequent $bev$ . Specifically, we make use of state-of-the-art SfM and MVS algorithms from COLMAP [23, 24], as well as the semantic segmentation in 2D image, in order to generate the top-view map (denoted as $bev-col$ ) from a video. The pipeline is illustrated in Fig. 5. We first perform 3D semantic segmentation on the dense point cloud returned from COLAMP. We project each 3D point into the images as per the visibility map to obtain the semantic candidates from the 2D semantic segmentation; a simple winner-take-all strategy is applied to determine the final semantic label for each point (Fig. 5(b)). The 3D semantic segmentation allows us to extract the 3D points for the road part, to which we fit a 2D plane via RANSAC (Fig. 5(c)). Finally, we can generate the $bev-col$ by cropping a rectangular box on the 2D road plane according to the camera pose and our pre-defined top-view image size and resolution; the 3D points on the plane are converted into the pixels in the image (Fig. 5(d)). After obtaining the + +![](images/5ff85bfe04d6ef0246b47b7a7b2de5041964b858dbd60003c6bb5eb4cf9e9efc.jpg) + +![](images/4a35c561fa20cc6caad30e3574806ef4cf2ad0d82d76d734a3613b287d6ff0cc.jpg) +(b) + +![](images/ba4908bc84e2f1e7caf40b2b01f0038de1f1ec04bd13646b1bd97c71fd7998e6.jpg) +(a) +(c) +Figure 5: An example illustration of generating semantic $bev-col$ . (a)(b) 3D scene reconstruction and semantic segmentation. (c) road extraction and plane fitting. (d) $bev-col$ for the view (e). + +![](images/fb7cc69f69971a84d3c6d8b6e9f3d62c82a5ed0154930fa0b49601e98e1c19c6.jpg) +(d) + +![](images/1cc76de7fbdacbe19b59290551f57a9e94e4eca4cd6ec7ccd7057f93766b531e.jpg) +(a) +bev +Figure 6: Two examples of $bev$ and $bev-col$ on the background classes obtained from individual frame and COLMAP. Red circles highlight the differences. + +![](images/7331a4f059ac5449a7ae22cf5fc9eee3c2b3e8630560ed04205abe5b22160f9e.jpg) +bev-col + +![](images/3051557200899a49e09b702985e2725627ceab53d05708bb9bdc4cab474c3230.jpg) +bev + +![](images/a497acef399fdd4ec04c17cc45411147c9ea97a0231bada3cf28b477faf8bad1.jpg) +(b) +bev-col + +global plane parameters, we utilize the camera pose to transform the global plane parameters to the local parameters with respect to the camera. Note that in a well-calibrated case where the global plane can be the same as local plane, the global lane estimation process can be skipped. See Fig. 6 for two more examples. Here, one can see that the dense correspondence between two $bev-col$ can be trivially obtained given the known position and orientation of each $bev-col$ in the 2D road plane. Such mapping is transferred to the correspondence on the feature map and fed into FTM (Sec. 3.2.1). Here, we do not handle the mapping of dynamic objects, but find FTM to still work well4. Finally, we also note that the absolute scale of the 3D reconstruction here can be retrieved from either GPS or camera-ground height in driving scenes. Discussion: Note that in our case, rather than presenting + +![](images/8c188114cb0c713b5e4ca08a8adbf5a95b1a364a16be6c30184638ff07feee96.jpg) +Figure 7: An example visualizing the layers in our bev-final. + +what can be actually seen in the current frame, our $bev-col$ obtained with COLMAP models what really exists. For instance, a sideroad that is far away or occluded can hardly be noticed in $bev$ generated from an individual frame only due to the lack of observations in perspective view. In contrast, $bev-col$ generated with global information is able to recover the sideroad properly as long as we have observations in this video (see comparison in Fig. 6(a)). + +Final input: Our final input incorporates local information from individual frame, global information from videos and object-level context information. Note that local and global cues can be mutually informative, e.g. geometry based 3D reconstruction might be inaccurate or incomplete in some challenging cases like texture-less regions, but in such cases the top-view information from CNN-predicted depth could be more informative towards the layout prediction (See comparison in Fig. 6(b)). In summary, our proposed top-view semantic map $bev$ -final is in $\mathbb{R}^{H\times W\times C}$ , where $C = 5$ and the layers represent four background classes and car; We overlay $bev$ -col on top of $bev$ to fuse them together. Specifically, for a binary mask $B$ with $B_{i,j} = 1$ if $bev$ -col $_{i,j}\neq 0$ , we have $bev$ -final = $bev$ -col $\odot B + bev\odot(1 - B)$ , where $\odot$ indicates element-wise product. See an example visualization of each layer in Fig. 7. + +# 4. Experiments + +In this section, we demonstrate the effectiveness of our proposed augmented input representation and LSTM/FTM by conducting several experiments on two data sets. + +Datasets: We validate our ideas on two data sets, KITTI [8] and NuScenes [22]. Similarly, we utilize the annotated data in [38], which includes around 17000 annotations for KITTI [8] and about 1200 annotations for NuScenes [22] in terms of scene layout annotation. To train our segmentation network, we further have 1243 images for training and 382 for testing on KITTI. We refer the readers to [38, 37] for more details of data sets and implementation details can be found in supplementary. + +Evaluation metrics: Since our output space consists of three types of predictions and involves both discrete and continuous variables, we follow the metrics defined in [38] + +
NuScenes [22]
MethodAccu.-Bi. ↑Accu.-Mc. ↑MSE ↓IOU ↑
BEV.846.485.073.217
BEV-C.856.471.069.211
BEV-J.872.486.036.230
BEV-J-O.858.543.027.313
+LSTM.859.536.023.311
+LSTM+FTM.863.547.023.328
+ +Table 1: Results on road scene layout estimation on [22]. + +and summarize them below. + +As for binary variables $\Theta_{\mathrm{b}}$ (like the existence of crosswalk on the main road or left side-walk) and for multi-class variables $\Theta_{\mathrm{m}}$ (like the number of lanes on your left), we report the prediction accuracy as Accu.-Bi = $\frac{1}{14}\sum_{k=1}^{14}[p_k = \Theta_{\mathrm{b}k}]$ and Accu.-Mc = $\frac{1}{2}\sum_{k=1}^{2}[p_k = \Theta_{\mathrm{mk}}]$ . More importantly, since we observe that the binary classes are extremely biased, we also report the F1 score on $\Theta_{\mathrm{b}}$ which better informs the overall performance. Specifically, F1.-Bi = $\frac{1}{14}\sum_{k=1}^{14}2 \times \frac{p_k \times r_k}{p_k + r_k}$ , where $p_k$ and $r_k$ are the precision and recall rate on $k$ -th variable of binary attributes. For regression variables we use the mean square error (MSE). + +In addition, we also report Intersection-over-Union (IoU) as a overall performance evaluation metric. Specifically, we assume that we can render four-class semantic top-view maps with either the predicted results or the ground-truth annotations. Then we report the average IoU score over all test images. More details on IoU are presented in supplementary. + +# 4.1. Evaluations on Global and Context Cues + +In this section, we would like to explore the impact of bev-final. To this end, we aim to validate the effectiveness of our proposed context and global information on road layout prediction. We use the basic model without LSTM and FTM, unless otherwise specified. Details for this basic model can be found in basic of Fig. 8. + +Baselines: We compare our proposed method with several competing methods presented in [38]. The RGB method takes a single perspective RGB image as input and trains a model [12] that directly outputs predictions for scene attributes. The RGB+D method shares the same model architecture w.r.t. RGB but outputs both per-pixel depth map and attribute predictions. Both BEV and the SOTA H-BEV-DA output scene attributes with bev as input, which means they are all online methods. The differences lie in: 1) the former uses only bev from real images during training while the latter utilizes additional simulated bev; 2) the former uses basic model and the later has a hybrid model as in [38]. Note that +GM means a spatial-temporal graphical model is added as post-processing. + +Our proposals: Apart from baselines, we further propose the following methods with different input representations: + +
KITTI [8]
MethodAccu.-Bi. ↑Accu.-Mc. ↑MSE ↓F1.-Bi ↑IOU ↑
RGB [27].811.778.230.176.327
RGB [27]+D.818.819.154.109.334
BEV [38].820.797.141.324.345
BEV [38]+GM.831.802.136.344.357
H-BEV-DA[38]+GM.834.831.134.435.404
BEV-C.826.779.175.456.317
BEV-J.840.832.135.458.416
BEV-J-O.831.837.142.494.388
+LSTM.845.825.134.537.382
+LSTM+FTM.842.841.134.534.405
+ +Table 2: Main results on road scene layout estimation on KITTI [8]. We can see that: 1) The global (BEV-C, BEV-J) and context (BEV-J-O) information do benefits the single image performance compared to their single image competitors. 2) Introducing LSTM and FTM can further improve the accuracy compared to single image method. + +- BEV-COLMAP (BEV-C): We propose $bev-col$ with global information from videos, as described in Sec. 3.3.2. Once we get the $bev-col$ , we feed it to the basic model. +- BEV-JOINT (BEV-J): We combine the $bev$ and $bev-col$ together and obtain the input for BEV-J. Then we feed the joint input to the basic model. +- BEV-JOINT-OBJ (BEV-J-O): As described in Sec. 3.3.1, we further add object information and obtain bev-final as the input for BEV-J-O. Again, a basic model is learned. + +Quantitative results: Tab. 2 summarizes our main results on KITTI [8]. We have the following observations. Firstly, comparing BEV-C to BEV, we can see that obtaining global information from 3D point clouds generated with the entire video sequence is better than relying on individual depth and semantic segmentation results, e.g. large improvement in F1 score. This improvement might come from higher quality of bevinit, especially in terms of both higher accuracy in regions that are far away from the camera and more consistent results. Second, if we compare BEV-J to BEV-C and BEV, we can see that combining them together can further boost the performance for all attributes, e.g. $1.4\%$ , $3.3\%$ and $0.04$ improvement for binary, multiclass and regression tasks. More importantly, we can improve the IoU by around $10\%$ . One reason might be that the input from BEV-C focuses more on texture regions that can be both close by and far away while input from BEV keeps more details for all close by regions. They are mutual beneficial in terms of representing scene layout in top-view. Finally, once adding object information (BEV-J-O), we can further boost the F1 score by about $5\%$ . In conclusion, we can observe a clear improvement when adding individual components. + +We also report partial results on NuScenes [22] in Tab. 1 and refer the readers to supplementary for complete ones. As for NuScenes [22], we again observe that combining + +![](images/8b89f85e458f6792dcedd090999fd39b0a62cca5b280acdb68ab4b5d58cf3fe5.jpg) + +![](images/85b537986139afdbf5a7a285c183f0edf4390246695793d9ce6fe99571062f61.jpg) +Figure 8: Illustrations of baseline model architectures. We denote the upper one as basic and lower one as blstm. + +
KITTI [8]
MethodAccu.-Bi. ↑Accu.-Mc. ↑MSE ↓F1.-Bi. ↑
BEV-C.826.779.175.456
*-denseC.826.783.148.496
*-C-O.836.812.146.507
*+LSTM.831.812.136.360
+ +Table 3: Ablation study on single image based road layout prediction. We abbreviate BEV as * in this table. + +individual and global information provides better results than either one in isolation. Also, adding context information further introduces improvements on almost all tasks. + +Ablation study: Since the main improvement of the performance boost comes from information of the full video sequence as well as objects, in this section, we conduct ablation studies on: 1) the impact of the quality of top-view maps generated with full video sequences on models, and 2) the impact of the representation of objects on models. Tab. 3 summarizes our results, where $*$ -denseC means we change 3D reconstruction parameter of COLMAP to generate much denser bev-col as inputs to train our model. And $*$ -C-O means we combine the input from BEV-C with object information and learn to predict the road attributes. + +As can be seen in this table, denser $bev-col$ can definitely improve the performance for all tasks and measurements, which indicates that there can be more room to boost prediction accuracy by improving the quality of $bev-col$ . Additionally, further performance boosts can be obtained with object information, which again proves that context information can be very useful in our layout prediction task. + +Qualitative results: We show several qualitative results in Fig. 9. We can see from the examples that our model successfully describes a diverse set of road scenes. Moreover, our predictions are generally consistent w.r.t. object detection results. + +![](images/80d4a615f196109fc6d8c9ff75f72631d12167de296f572c1ac40a254d5976c6.jpg) + +![](images/880e7cf0726255fa452c500584478775aaa3c08b9f46745f0102da9c458d1788.jpg) +Figure 9: Qualitative results of full model on individual frames from KITTI. Each example shows perspective RGB, ground truth and predicted semantic top-view (including the object bounding box as green rectangular), respectively. +Figure 10: Qualitative results comparing BEV-J-O and full model in consecutive frames of two example sequences from KITTI. We visualize for each view the perspective RGB image, prediction from BEV-J-O and from full model, respectively. + +
KITTI [8]
Methodseman.↓temp.↓
BEV [38]2.653.99
H-BEV-DA [38]+GM1.771.93
BEV-J-O1.262.78
+LSTM+FTM1.261.96
+ +Table 4: Main results on consistency measurements. + +# 4.2. Evaluations on LSTM and FTM + +We further demonstrate the effectiveness of LSTM and FTM in Tab. 2. More specifically, +LSTM model is illustrated in Fig. 8 (blstm part) and +LSTM+FTM is our full model. Both models receive bev-final as input. + +As can be seen in this table, with the help of LSTM, we can increase performance on the binary and regression tasks. Note that we can further boost the F1 score by at least $4\%$ compared to single image methods. More importantly, our full model, or +LSTM+FTM, provides the best overall performance. As highlighted in the table, it almost always performs the best or second best among all tasks and measurements. Even compared to previous SOTA that is trained with both real and simulated data and includes a spatiotemporal graphical model as post-processing, we can clearly observe that the proposed method provides better results, specifically for F1 score. In conclusion, we demonstrate the effectiveness of FTM and LSTM in terms of improving prediction accuracy. We also report the BEV+LSTM in Tab. 3. We can observe that adding LSTM (blstm) can improve the performance even with bev inputs, which demonstrates the effectiveness of temporal information on locally obtained top-view representations. Such trend is also shared on NuScenes in Tab. 1. + +Consistency: Since we are working in videos, we also analyze the consistency in predictions. To this end, we + +utilize the following metrics as suggested in [38] and refer the readers to supplementary material for more details: + +- Semantic consistency: we report the average conflicts in attribute predictions. +- Temporal consistency: we also report the average number of changes in our prediction. + +We show in Tab. 4 quantitative results for the temporal as well as semantic consistency metrics defined on the two data sets. Compared to the single image baseline, we can observe significant improvement from the proposed BEV-J-O in consistency for both data sets. Also, if we compare with video-based existing work, combined with the prediction accuracy shown in Tab.2, we can see that the proposed method outperforms previous SOTA, e.g. boost the accuracy while not sacrificing temporal smoothness. Results and our analysis on NuScenes [22] can be found in the supplementary. + +Finally, we visualize qualitative results of consecutive frames in two test sequences from KITTI in Fig. 10. As can be seen, our model successfully enforces temporal smoothness. We can also observe more consistent predictions, e.g., width of side-road and delimiter width, with the help of the LSTM and FTM. Again, our predictions are consistent w.r.t. object detection results. + +# 5. Conclusion + +In this work, we present a scene understanding framework to estimate the parametric road layout in each view in a video. In constraint to the case with only single image input, we propose to make use of the temporal information in videos by leveraging LSTM/FTM model, context information as well as global 3D reconstruction, altogether leading to very promising results. + +# References + +[1] Iro Armeni, Ozan Sener, Amir R. Zamir, Helen Jiang, Ioannis Brilakis, Martin Fischer, and Silvio Savarese. 3D Semantic Parsing of Large-Scale Indoor Spaces. In CVPR, 2016. +[2] Samuel Rota Bulò, Lorenzo Porzi, and Peter Kontschieder. In-Place Activated BatchNorm for Memory-Optimized Training of DNNs. In CVPR, 2018. +[3] Liang-Chieh Chen, Yukun Zhu, George Papandreou, Florian Schroff, and Hartwig Adam. Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation. In ECCV, 2018. +[4] Jeffrey Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Kate Saenko, and Trevor Darrell. Long-term recurrent convolutional networks for visual recognition and description. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2625-2634, 2015. +[5] Christoph Feichtenhofer, Axel Pinz, and Richard P Wildes. Spatiotemporal multiplier networks for video action recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4768-4777, 2017. +[6] Philipp Fischer, Alexey Dosovitskiy, Eddy Ig, Philip Häusser, Caner Hazirbaş, Vladimir Golkov, Patrick Van der Smagt, Daniel Cremers, and Thomas Brox. Flownet: Learning optical flow with convolutional networks. arXiv preprint arXiv:1504.06852, 2015. +[7] Andreas Geiger, Martin Lauer, Christian Wojek, Christoph Stiller, and Raquel Urtasun. 3D Traffic Scene Understanding from Movable Platforms. PAMI, 2014. +[8] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets Robotics: The KITTI Dataset. International Journal of Robotics Research (IJRR), 2013. +[9] Clément Godard, Oisin Mac Aodha, and Gabriel J. Brostow. Unsupervised Monocular Depth Estimation with Left-Right Consistency. In CVPR, 2017. +[10] Ruiqi Guo and Derek Hoiem. Beyond the line of sight: labeling the underlying surfaces. In ECCV, 2012. +[11] Saurabh Gupta, James Davidson, Sergey Levine, Rahul Sukthankar, and Jitendra Malik. Cognitive Mapping and Planning for Visual Navigation. In CVPR, 2017. +[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In CVPR, 2016. +[13] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997. +[14] Max Jaderberg, Karen Simonyan, Andrew Zisserman, and Koray Kavukcuoglu. Spatial Transformer Networks. In NIPS, 2015. +[15] Lars Kunze, Tom Bruls, Tarlan Suleymanov, and Paul Newman. Reading between the Lanes: Road Layout Reconstruction from Partially Segmented Scenes. In International Conference on Intelligent Transportation Systems (ITSC), 2018. +[16] Iro Laina, Vasileios Belagiannis Christian Rupprecht, Federico Tombari, and Nassir Navab. Deeper Depth Prediction with Fully Convolutional Residual Networks. In 3DV, 2016. +[17] Buyu Li, Wanli Ouyang, Lu Sheng, Xingyu Zeng, and Xiaogang Wang. Gs3d: An efficient 3d object detection framework + +for autonomous driving. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1019-1028, 2019. +[18] Peiliang Li, Xiaozhi Chen, and Shaojie Shen. Stereo r-cnn based 3d object detection for autonomous driving. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7644-7652, 2019. +[19] Buyu Liu and Xuming He. Multiclass semantic video segmentation with object-level active inference. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4286-4294, 2015. +[20] Chenxi Liu, Alexander G. Schwing, Kaustav Kundu, Raquel Urtasun, and Sanja Fidler. Rent3D: Floor-Plan Priors for Monocular Layout Estimation. In CVPR, 2015. +[21] Gellert Mattyus, Shenlong Wang, Sanja Fidler, and Raquel Urtasun. HD Maps: Fine-grained Road Segmentation by Parsing Ground and Aerial Images. In CVPR, 2016. +[22] NuTonomy. The NuScenes data set. https://www.nuscenes.org, 2018. +[23] Johannes L Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4104-4113, 2016. +[24] Johannes L Schonberger, Enliang Zheng, Jan-Michael Frahm, and Marc Pollefeys. Pixelwise view selection for unstructured multi-view stereo. In European Conference on Computer Vision, pages 501-518. Springer, 2016. +[25] Samuel Schulter, Menghua Zhai, Nathan Jacobs, and Manmohan Chandraker. Learning to Look around Objects for Top-View Representations of Outdoor Scenes. In ECCV, 2018. +[26] Mike Schuster and Kuldip K Paliwal. Bidirectional recurrent neural networks. IEEE Transactions on Signal Processing, 45(11):2673-2681, 1997. +[27] Ari Seff and Jianxiong Xiao. Learning from Maps: Visual Common Sense for Autonomous Driving. arXiv:1611.08583, 2016. +[28] Sunando Sengupta, Paul Sturgess, Labor Ladický, and Philip H. S. Torr. Automatic Dense Visual Semantic Mapping from Street-Level Imagery. In IROS, 2012. +[29] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In Advances in neural information processing systems, pages 568-576, 2014. +[30] Shuran Song, Fisher Yu, Andy Zeng, Angel X. Chang, Manolis Savva, and Thomas Funkhouser. Semantic Scene Completion from a Single Depth Image. In CVPR, 2017. +[31] Shuran Song, Andy Zeng, Angel X. Chang, Manolis Savva, Silvio Savarese, and Thomas Funkhouser. Im2Pano3D: Extrapolating 360 Structure and Semantics Beyond the Field of View. In CVPR, 2018. +[32] Nitish Srivastava, Elman Mansimov, and Ruslan Salakhudinov. Unsupervised learning of video representations using lstms. In International conference on machine learning, pages 843-852, 2015. +[33] Deqing Sun, Stefan Roth, and Michael J Black. Secrets of optical flow estimation and their principles. In 2010 IEEE + +computer society conference on computer vision and pattern recognition, pages 2432-2439. IEEE, 2010. +[34] Joseph Tighe, Marc Niethammer, and Svetlana Lazebnik. Scene Parsing with Object Instances and Occlusion Ordering. In CVPR, June 2014. +[35] Shubham Tulsiani, Richard Tucker, and Noah Snavely. Layer-structured 3D Scene Inference via View Synthesis. In ECCV, 2018. +[36] Tuan-Hung Vu, Wongun Choi, Samuel Schulter, and Manmohan Chandraker. Memory warps for learning long-term online video representations. arXiv preprint arXiv:1803.10861, 2018. +[37] Ziyan Wang, Buyu Liu, Samuel Schulter, and Manmohan Chandraker. A dataset for high-level 3d scene understanding of complex road scenes in the top-view. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshop, June 2019. +[38] Ziyan Wang, Buyu Liu, Samuel Schulter, and Manmohan Chandraker. A parametric top-view representation of complex road scenes. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[39] SHI Xingjian, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-Kin Wong, and Wang-chun Woo. Convolutional LSTM network: A machine learning approach for precipitation nowcasting. In Advances in neural information processing systems, pages 802-810, 2015. +[40] Dan Xu, Wei Wang, Hao Tang, Hong Liu, Nicu Sebe, and Elisa Ricci. Structured Attention Guided Convolutional Neural Fields for Monocular Depth Estimation. In CVPR, 2018. +[41] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid Scene Parsing Network. In CVPR, 2017. +[42] Xizhou Zhu, Yujie Wang, Jifeng Dai, Lu Yuan, and Yichen Wei. Flow-guided feature aggregation for video object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 408-417, 2017. +[43] Xizhou Zhu, Yuwen Xiong, Jifeng Dai, Lu Yuan, and Yichen Wei. Deep feature flow for video recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2349-2358, 2017. \ No newline at end of file diff --git a/understandingroadlayoutfromvideosasawhole/images.zip b/understandingroadlayoutfromvideosasawhole/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0fa00688015dbbd077d76f50781b091c1fb8b4b7 --- /dev/null +++ b/understandingroadlayoutfromvideosasawhole/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:344b9173d4b9eb8ca10b3f36b74fdbbed67946d4034b11201947cdb77be0dbda +size 569466 diff --git a/understandingroadlayoutfromvideosasawhole/layout.json b/understandingroadlayoutfromvideosasawhole/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b0f4750bae9025d76d4e5c0825ea717f538f6594 --- /dev/null +++ b/understandingroadlayoutfromvideosasawhole/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf25058bb05d6c5859fe77dda45f84fce25034f2f515f6fa76f7e07b6af7f018 +size 440778 diff --git a/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/552530e1-71e3-41d8-baea-754a517068bf_content_list.json b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/552530e1-71e3-41d8-baea-754a517068bf_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c1fb8c55e258b441d8759c42a2e92b6ab291dbab --- /dev/null +++ b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/552530e1-71e3-41d8-baea-754a517068bf_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f485a434c40467a4ae258b6551497203846307f04b01fdf53bff78b801c87ac7 +size 84926 diff --git a/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/552530e1-71e3-41d8-baea-754a517068bf_model.json b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/552530e1-71e3-41d8-baea-754a517068bf_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f4a8d4caee626f87de464310b66b2e5030883fca --- /dev/null +++ b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/552530e1-71e3-41d8-baea-754a517068bf_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1c7b7d6abc3f0bd4daff8e0a700726ea23fd72645184c91ae142bc55916a9d1 +size 105019 diff --git a/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/552530e1-71e3-41d8-baea-754a517068bf_origin.pdf b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/552530e1-71e3-41d8-baea-754a517068bf_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2809a68c3232d1c578235c125b9fb861c8190d79 --- /dev/null +++ b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/552530e1-71e3-41d8-baea-754a517068bf_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:902fa107ac496a7a00bc9343d8c2122cdc8a7e2a10c2397947582cb9e8021130 +size 1413060 diff --git a/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/full.md b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/full.md new file mode 100644 index 0000000000000000000000000000000000000000..36958675ee2443b6b0f6fb6d0a4c6f7401f8b3c5 --- /dev/null +++ b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/full.md @@ -0,0 +1,360 @@ +# Unified Dynamic Convolutional Network for Super-Resolution with Variational Degradations + +Yu-Syuan Xu + +Shou-Yao Roy Tseng + +Yu Tseng + +Hsien-Kai Kuo + +Yi-Min Tsai + +MediaTek Inc., Hsinchu, Taiwan + +{Yu-Syuan.Xu, Roy.Tseng, Ulia.Tseng, Hsienkai.Kuo, Yi-Min.Tsai}@mediatek.com + +# Abstract + +Deep Convolutional Neural Networks (CNNs) have achieved remarkable results on Single Image SuperResolution (SISR). Despite considering only a single degradation, recent studies also include multiple degrading effects to better reflect real-world cases. However, most of the works assume a fixed combination of degrading effects, or even train an individual network for different combinations. Instead, a more practical approach is to train a single network for wide-ranging and variational degradations. To fulfill this requirement, this paper proposes a unified network to accommodate the variations from interimage (cross-image variations) and intra-image (spatial variations). Different from the existing works, we incorporate dynamic convolution which is a far more flexible alternative to handle different variations. In SISR with non-blind setting, our Unified Dynamic Convolutional Network for Variational Degradations (UDVD) is evaluated on both synthetic and real images with an extensive set of variations. The qualitative results demonstrate the effectiveness of UDVD over various existing works. Extensive experiments show that our UDVD achieves favorable or comparable performance on both synthetic and real images. + +# 1. Introduction + +Single image super-resolution (SISR) has posed a great challenge of image quality in the recent advance of computer vision. The goal of SISR is to reconstruct a High-Resolution (HR) image from a Low-Resolution (LR) image. This inverse property makes it a highly ill-posed problem. Deep Convolutional Neural Networks (CNNs) [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] have been widely adopted to solve SISR problem, and achieve significant success. Nevertheless, most of the methods assume a single fixed combination of degrading effects, e.g., blurring and bicubicly downsampling. Such assumption limits their capability to handle practical cases with multiple degradations. + +Several CNN base methods [15, 17, 18, 19, 20] are proposed in the context of SISR with multiple degradations. These methods address this problem with very diverse settings and formulations. Shocher et al. [15] train a small image-specific network to deal with different degradations + +![](images/85b126409a24bee28b5b041dc21f9dd8245a9fcb768cf9c495c01ecacfc63d17.jpg) +Input Image + +![](images/0a03d62bfb74a6eb8b28db5e4aedf42ef8ccd00e6590b12100d2678594e0ab16.jpg) +LR +RCAN +[14] + +![](images/884c8fb338e64f95a44150209b1c0177481f507b929de00ceff84d8f34f5f8a9.jpg) +. +Figure 1. The SISR problem with variational degradations. Image "castle (102061)" in BSD100 [16] with scale factor 2 is used. The HR image applies Gaussian blur with variant kernel width $\varepsilon$ , bicubicly downsampling and white Gaussian noise with variant level $\sigma$ to generate LR image. + +SSR + +![](images/337eb1d50eb95e98ae13dd33cdae05d1e518a52ea9e32eb9b20678869edd8a36.jpg) +UDVD + +![](images/19acfb99156e4d47d4bf0784a04161e1a5584a497a5c0da671dc12f36080aedf.jpg) + +HR + +![](images/a0c31bbff7aaa975aa650a58260b7b86a822b12f5ae6c14088d8fff3d98e2af1.jpg) +SSSR + +UDVD + +HR + +for a certain image. In this approach, an individual network has to be trained whenever there is variation of degradations, e.g., different degrading effects across images. To address the problem of variational degradations, Zhang et al. [17] propose SRMD and train a single network to handle multiple variations, including blur and noise. Note that the types of degrading effect are predefined, which is also known as non-blind setting. To the best of our knowledge, SFTMD [18] is one of the most recent works for blind setting, which proposes Spatial Feature Transform (SFT) and Iterative Kernel Correction (IKC) to deal with a limited set of blind degradations. Following the most related work, SRMD [17], this paper adopts the same setting and formulation in which a single unified network is trained for variational degradations. + +To handle variations of degrading effects, a unified network is expected to accommodate two types of variations, cross-image variations (inter-image) and spatial variations (intra-image). Fig. 1 illustrates an example of the problem of variational degradations in SISR. In Fig. 1, different degrading effects are applied to different regions of a benchmarking image in BSD100 [16]. Compare to the methods trained with a fixed degradation setting, RCAN [14] and ZSSR [15], the proposed method achieves similar quality (red patches) while effectively adapt to other variations (green, purple and blue patches in Fig. 1). On the other hand, in RCAN [14] and ZSSR [15], unsatisfying quality + +can be observed due to its unawareness of variations. Further discussions and comparisons with a wide range of existing works will be addressed in Section 4. + +Different from the most directly comparable approach, SRMD [17], this paper exploits dynamic convolutions to better solve the non-blind SISR problem with variational degradations. Dynamic convolution is a far more flexible operation than the standard one. A standard convolution learns kernels that minimize the error across all pixel locations at once. While, dynamic convolution uses per-pixel kernels generated by the parameter-generating network [21]. Moreover, the kernels of standard convolution are content-agnostic which are fixed after training. In contrast, the dynamic ones are content-adaptive which adapt to different input even after training. By the aforementioned properties, dynamic convolution demonstrates itself a better alternative to handle variational degradations. In this paper, we incorporate dynamic convolutions and propose a Unified Dynamic Convolutional Network for Variational Degradations (UDVD). + +The contributions of this work are summarized as follows: (1) We propose UDVD, a unified dynamic convolutional network for non-blind SISR with variational degradations. (2) We further propose two types of dynamic convolutions to improve performance. And we integrate multistage loss to gradually refine images throughout the consecutive dynamic convolutions. (3) We perform comprehensive analysis of the performance impact of dynamic convolutions and investigate a number of configurations of dynamic convolutions. Extensive experiments show that the proposed UDVD achieves favorable or comparable performance on both synthetic and real images. + +This paper is organized as follows. Section 2 discusses related works. Section 3 introduces the proposed UDVD and its implementation details. Section 4 presents experimental results. Conclusions are discussed in Section 5. + +# 2. Related Work + +Single Image Super-Resolution. In the past few years, various CNNs based techniques had been proposed for SISR. Among these works, SRCNN [1] was the first to adopt a three-layer CNN architecture and achieved superior performance against the previous non-CNN works. Inspired by SRCNN, Kim et al. proposed a deeper network VDSR [2] which contains 20 convolution layers and added global residual connection for residual learning [22]. The authors in [3, 4, 5] investigated the use of recursive blocks to increase the depth with parameter sharing. However, the bicubicly interpolated LR images used in these methods cause additional computation cost. To address this problem, FSRCNN [9] and ESPCNN [10] directly mapped LR images to HR images by adding transpose convolution layers and sub-pixel convolution layers at the end of the net + +work. To cope with the ever decreasing of input resolution, EDSR [11] and RDN [12] leveraged an even larger model. DBPN [13] further proposed iterative upsample and downsample unit for large scaling factors. Recently, RCAN [14] integrated residual-in-residual structure and channel attention mechanism to weight channel-wise features. + +Multiple Degradations. Among the studies of SISR, most of the works were trained on a single and fixed degradation e.g., bicubic downsampling, which strongly limits the applicability in practical scenarios. In the context of multiple and diverse degradations, Shocher et al. [15] trained a small image-specific network to deal with different degradations for a certain image. The authors in [19, 20] used Generative Adversarial Networks (GANs) to tackle degradations in an unsupervised way. Zhang et al. [17] proposed SRMD, a single network to handle multiple degradations, including blur and noise. Gu et al. [18] proposed SFTMD, and applied Spatial Feature Transform (SFT) and Iterative Kernel Correction (IKC) for a subset of blind degradations. Different from the most directly comparable approach, SRMD [17], we exploit dynamic convolutions to better solve the SISR problem with variational degradations. When compared to SRMD [17], the proposed method achieves favorable performance on both synthetic and real images. + +Dynamic Kernel Network. In recent researches, dynamic kernels in convolution layer had been widely-used in many applications. Brabandere et al. [21] firstly exploited parameter-generating network to generate dynamic kernels for every pixel. Dynamic kernel network had made the trained network more flexible and gained successes in various applications, such as denoising [23, 24, 25, 26], video super-resolution [27] and video interpolation [28, 29]. This paper adopts a simple fully-convolution backbone to predict per-pixel kernels for dynamic convolutions. With the experiments in Section 4, this paper validates that the flexibility of dynamic convolutions can be used to tackle variational degradations of SISR. + +# 3. Proposed Method + +In this section, the problem of variational degradations of SISR is formulated. We then introduce the architecture and implementation details of the proposed UDVD. Next, the design of different types of dynamic convolutions and multistage loss are further discussed. + +# 3.1. Problem Formulation + +This paper focuses on SISR with the degrading effects, including blurring, noise and downsampling. These degrading effects can simultaneously happen to a practical use case [30]. The degradation process is formulated as: + +$$ +I _ {L R} = \left(I _ {H R} \otimes k\right) \downarrow_ {s} + n, \tag {1} +$$ + +![](images/e73c4d30121666f78302da4488836132f9e5f0ddccb44d60413b0f0e084e5134.jpg) +Figure 2. The network architecture of the proposed UDVD framework. + +where $I_{HR}$ and $I_{LR}$ indicates HR and LR image respectively, $k$ represents a blur kernel, $n$ stands for additive noise, $\otimes$ marks convolution operation, and $\downarrow_s$ denotes downsampling operation with scale factor $s$ . We consider Isotropic Gaussian blur kernel, which is one of the widely used kernels in recent studies [17, 18, 30]. For additive noise, most of the studies adopt Additive White Gaussian Noise (AWGN) with covariance (noise level) [17, 18]. Bicubic down sampler is considered for downsampling operation. By controlling the parameters of degrading effects, one can synthesize more realistic degradations for SISR training. + +Non-blind setting. In this paper, a non-blind setting is adopted. Assume given ground truth degradations, non-blind results provide the upper bounds for blind methods in which the degradations are estimated. Such bounding observation are supported as shown by Table 2 of [15], Table 1 of [18] and Table 1 of [20]. As mentioned above, improvements in non-blind setting elevate the performance upper bound for blind methods [18, 20]. Any degradation estimation methods can be prepended to extend our method on blind setting. + +# 3.2. Unified Dynamic Convolutional Network for Variational Degradation (UDVD) + +The framework of the UDVD is illustrated in Fig. 2. The framework consists of a feature extraction network and a refinement network. The feature extraction network manages to extract high-level features of the input image, such as global context, local details and so on. The refinement network is then learn to enhance and upsample the image together with the extracted high-level features. + +Training with Variational Degradations. Given a HR image, the degrading process is executed as follows, apply + +ing isotropic Gaussian blur kernel of size $p \times p$ , bicubicly downsampling the image, and finally adding AWGN with noise level $\sigma$ . The generated LR image is of size $C \times H \times W$ where $C$ denotes the number of channels, $H$ and $W$ denote the height and width of the image. Similar to [17], we project the blur kernel to a $t$ -dimensional vector by using Principal Component Analysis (PCA) technique. We then concatenate an extra dimension of noise level $\sigma$ to get a $(1 + t)$ vector. Such vector is then stretched to get a degradation map $D$ of size $(1 + t) \times H \times W$ . Last, we concatenate the LR image $I^0$ with the degradation map $D$ of size $(C + 1 + t) \times H \times W$ as input for UDVD. Note that $t$ is set to 15 by default. + +Feature Extraction Network. In UDVD, the input is first forwarded to the feature extraction network to extract high-level features. And then, the high-level features and the input image are sent to the refinement network to generate HR image. The feature extraction network contains $N$ residual blocks which are composed of convolutions and Rectified Linear Units (ReLU), as shown in Fig. 2. In this work, the kernel size of convolution layers is set to $3 \times 3$ , and the channels is set to 128. + +Refinement Network. With the extracted feature maps, the refinement network further allocates $M$ dynamic blocks for feature transformation. Note that a dynamic block can be optionally extended to perform upsampling with a specific rate $r$ . The implementation details of dynamic convolutions will be covered in Section 3.3. In a dynamic block $m$ , as illustrated in Fig. 2, the input image $I^{m-1}$ is sent to three $3 \times 3$ convolution layers with 16, 16 and 32 channels respectively, and then concatenated with the high-level feature maps $F$ from the feature extraction network. The resultant feature maps are then forwarded to two paths. + +![](images/3b54591924957ca3faca97a159e27aeb0c81e8006943b2adb441458f0755763b.jpg) +(a) Typical Dynamic Convolution + +![](images/d5f176c6e18a66ad70d02271bf5ba2e7667afc7b59353e6b4d7f9d42b00a4b07.jpg) +(b) Dynamic Convolution with Upsampling +Figure 3. Types of dynamic convolutions. (a) A typical dynamic convolution refines the image quality while keeps resolution. (b) A dynamic convolution further upsamples the image with a specific upsample rate $r$ . + +The first path is a $3 \times 3$ convolution layer to predict per-pixel kernels. The generated per-pixel kernels are stored in a tensor with $k \times k$ in channel dimension, where $k$ is kernel size for per-pixel kernels (Fig. 3(a)). When upsampling is of interest, the channel dimension is $k \times k \times r \times r$ , where $r$ is upsample rate (Fig. 3(b)). Note that $k$ is set to 5 for the default setting. The predicted per-pixel kernels are then used to perform dynamic convolution operation on $I^{m-1}$ to generate the output $O^m$ . + +The second path contains two $3 \times 3$ convolution layer with 16 and 3 channels to generate the residual image $R^{m}$ for enhancing high frequency details as describe in [27]. The residual image $R^{m}$ is then added to the output of dynamic convolution operation $O^{m}$ for output image $I^{m}$ . Note that sub-pixel convolution layer is used to align the resolutions between paths. + +# 3.3. Types of Dynamic Convolutions + +Fig. 3 illustrates two types of dynamic convolutions. In general, typical dynamic convolutions are used when input and output resolution are identical, shown in Fig. 3(a). Depending on use cases, upsampling can also be integrated into dynamic convolution as shown in Fig. 3(b). + +Dynamic Convolution. In a typical dynamic convolution, convolutions are conducted by using per-pixel kernels $K$ of kernel size $k \times k$ . Such operation can be expressed as: + +$$ +I _ {o u t} (i, j) = \sum_ {u = - \Delta} ^ {\Delta} \sum_ {v = - \Delta} ^ {\Delta} K _ {i, j} (u, v) \cdot I _ {i n} (i - u, j - v), \tag {2} +$$ + +where $I_{in}$ and $I_{out}$ represent input and output image respectively. $i$ and $j$ are the coordinates in image, $u$ and $v$ are the coordinates in each $K_{i,j}$ . Note that $\Delta = \lfloor k / 2 \rfloor$ . These per-pixel kernels perform weighted sum across nearby pixels and enhance the image quality pixel by pixel. In default setting, there are $H \times W$ kernels and the corresponding weights are shared across channels. By introducing an additional dimension $C$ with Eq. 2, dynamic convolution can be extended for independent weights across channels. + +Integration with Upsampling. To integrate with upsampling, $r^2$ convolutions are conducted on the same corresponding patch to create $r \times r$ new pixels. The mathematical form of such operation is defined as: + +$$ +\begin{array}{l} I _ {o u t} (i \times r + x, j \times r + y) = \\ \sum_ {x = 0} ^ {r} \sum_ {y = 0} ^ {r} \sum_ {u = - \Delta} ^ {\Delta} \sum_ {v = - \Delta} ^ {\Delta} K _ {i, j, x, y} (u, v) \cdot I _ {i n} (i - u, j - v), \tag {3} \\ \end{array} +$$ + +where $x$ and $y$ are in the coordination of each $r \times r$ output block $(0 \leq v, u \leq r - 1)$ . Here, the resolution of $I_{out}$ is $r$ times the resolution of $I_{in}$ . We exploit $r^2 HW$ kernels to generate $rH \times rW$ pixels as $I_{out}$ . When integrated with upsampling, the weights are shared across channels to avoid the curse of dimensionality [31]. + +# 3.4. Multistage Loss + +Similar to previous work [8, 32], we adopt a multistage loss at the outputs of dynamic blocks. The losses are calculated in between the HR image $I_{HR}$ and the intermediate images at each dynamic block. The loss is defined as: + +$$ +L o s s = \sum_ {m = 1} ^ {M} F \left(I ^ {m}, I _ {H R}\right) \tag {4} +$$ + +where $M$ is the number of dynamic blocks and $F$ is loss function such as $L_{2}$ loss and perceptual loss. To obtain a high quality resultant image, we then minimize the sum of the losses from each dynamic block. + +# 4. Experiments + +In this section, we discuss the experimental results and setups. Section 4.1 elaborates the details of dataset and training setups. Different configurations of the proposed UDVD are compared in Section 4.2. Section 4.3 illustrates the learned dynamic kernels. Section 4.4 evaluates UDVD with different applicational settings using synthetic images. Real image evaluations are in Section 4.5. + +
MethodsPSNRSSIM
Baseline29.450.8350
UDVD_U29.560.8384
UDVD_DU29.580.8393
UDVD_UD29.610.8400
UDVD_UDD w/o multistage loss29.580.8385
UDVD_UDD29.670.8410
+ +Table 1. Average PSNR and SSIM values for various UDVD configurations on Set5. Degradation parameters include scaling factor $\times 3$ , kernel width 1.3 and noise level 15. The best results are highlighted in red color. + +# 4.1. Datasets and Training Setups + +We collect high-quality 2K images from DIV2K [33] and Flickr2K [34] for training. The degraded images are synthesized according to Eq. 1. As listed in Eq. 1, the process applies a sequence of degrading effects on high-quality images, saying blurring, bicubicly downsampling and then adding noise. Following previous works [17, 18], we use isotropic Gaussian blur kernels. The range of kernel width is set to [0.2, 3.0], and the kernel size is fixed to $15 \times 15$ . For noise, we use AWGN with noise level in range [0, 75]. Uniform sampling is used to generate all the parameters. + +During training, degraded LR images are cropped into patches of size $48 \times 48$ . While the corresponding HR images are cropped into patches of $96 \times 96$ , $144 \times 144$ and $192 \times 192$ for scale factors 2, 3, and 4, respectively. The patches are augmented by randomly horizontal flipping, vertical flipping, and $90^{\circ}$ rotating. We set the mini-batch size to 32. Adam optimizer [35] is used together with the multistage L2 loss introduced in Section 3.4. The learning rate is initialized to $10^{-4}$ and decreased by half for every $2 \times 10^{5}$ steps. We conduct all the experiments on a server equipped with NVIDIA RTX 2080 Ti GPU. + +We validate UDVD on datasets Set5 [36], Set14 [37], BSD100 [16] and real images [38, 39]. Same as in [12, 14, 17], all models are trained on RGB space. The evaluations of PSNR and SSIM metrics are on the Y channel in YCbCr. + +# 4.2. Comparison of UDVD Configurations + +Table 1 summarizes the quantitative comparisons of different UDVD configurations. The baseline configuration contains only the feature extraction network (15 residual blocks) and a sub-pixel layer. Whereas, in the refinement network, different configurations of dynamic convolutions are compared. In these configurations, $\mathbf{D}$ represents the block containing a typical dynamic convolution (as shown in Fig. 3(a)), and $\mathbf{U}$ marks the integration of upsampling (listed in Fig. 3(b)). As in Table 1, dynamic blocks improve the performance over the baseline configuration. Especially, the UD configuration achieves better performance over its counterparts. The ablation experiments in Table 1 also demonstrate the effectiveness of the proposed multistage loss. In the following of this paper, we use UDVD_UDD + +Degraded Image +![](images/f6c6b31de3c9e0745aa4cfd64cc178c1d966fa83d6b0e81fa223014b5c1b3e21.jpg) +Figure 4. The predicted per-pixel kernels in second dynamic block of UDVD. (a) The kernels learned from lr image. (b) The kernels learned from image with spatially variant degradation of Gaussian blur kernel width $\varepsilon$ and noise level $\sigma$ . (c) The absolute difference between (a) and (b). + +![](images/43cee8704b17f0fd54d87338ee1bfe764b328b6a034b1c149b845353280be60a.jpg) +(a) Dynamic kernels of original image + +![](images/00d341f4e482def7d05c078a724672206639b42549e0eaac34894cb1e273b974.jpg) +Is of original image + +![](images/0a3cb388077665f979393a9d81bca81e0aa7dac3ab944ea28c4d6dc1b17a1cd5.jpg) + +![](images/68e69a1b72b0677e1ee81d990b602a5319a4a1668a41837064ca8a85bced6219.jpg) +(b) Dynamic kernels of degraded image +nce between (a), (b) + +![](images/ffcc97629646e0aec542e48d59674dfc4529be48d37d355b3cccda7e477fbbb1.jpg) + +![](images/de18dccc26112c19729963f180764e2e17088b33ab32d21f4b41d5d2489f420f.jpg) + +for scale factors 2 and 3. While, UDVD_UUDD (two separated upsampling steps) is used for scale factor 4. + +# 4.3. Visualizing Dynamic Kernels + +UDVD generates dynamic kernels to adapt to both image contents and different degradations. Fig. 4(a) demonstrates that different kernels are generated for different contents. Likewise, Fig. 4(b) shows that the generated kernels further adapt to the applied degradations. As shown in Fig. 4(c), the adaptation behavior is varying among different degradations regardless of contents. These observations confirm that UDVD is capable of handling spatial variations by generating dynamic kernels considering the spatial differences of content and degradation. + +# 4.4. Experiments on Synthetic Images + +We evaluate the proposed UDVD with a number of applicational settings, covering both variational and fixed degradations. Synthetic images are generated for these settings. Note that we compared UDVD with a comprehensive set of other methods in non-blind setting only. Details are elaborated in the following paragraphs. + +Variations of Multiple Degradations. The proposed UDVD are evaluated with diverse variations of degrading effects, including bicubicly downsampling, isotropic Gaussian blur kernels and AWGN. We consider scale factors 2, 3, and 4 for bicubicly downsampling. For isotropic Gaussian blur, kernel widths 0.2, 1.3 and 2.6 are considered. Noise levels 15 and 50 are considered for AWGN. Table 2 compares UDVD to previous works on widely-used dataset, Set5 [36], Set14 [37] and BSD100 [16]. Due to the unawareness of multiple degradations, RDN [12] and RCAN [14] produce unsatisfying PSNR when compared to other methods. For multiple degradations based methods, we compare UDVD to two well known methods, IR-CNN [40], and SRMD [17]. As in Table 2, UDVD constantly achieves better PSNR, even at the hardest test case (kernel width 2.6 and noise level 50). + +
MethodsKernel widthNoise levelSet5Set14BSD100
×2×3×4×2×3×4×2×3×4
RDN [12]26.2325.5724.4825.4424.4023.4525.0324.0423.13
RCAN [14]26.0525.4624.8325.324.2923.6424.9523.9223.33
IRCNN [40]0.21532.6030.0828.35------
SRMD [17]32.7630.4328.7930.1427.8226.4829.2327.1125.95
UDVD32.9630.6829.0430.4328.1426.8229.3827.2726.08
RDN [12]25.0124.9824.3324.0823.9223.3923.8523.6723.09
RCAN [14]24.924.9424.5824.0423.8823.5323.8423.6223.26
IRCNN [40]1.31529.9628.6827.71------
SRMD [17]30.9829.4328.2128.3427.0526.0627.5226.4525.63
UDVD31.1629.6728.4328.6327.3626.3727.6426.5825.74
RDN [12]23.1823.2823.0722.3422.4022.3122.4422.5222.35
RCAN [14]23.1323.2923.2422.3422.4122.4222.4722.522.48
IRCNN [40]2.61526.4425.6724.36------
SRMD [17]28.4827.5526.8226.1825.5825.0625.8125.2924.86
UDVD28.7327.8026.9826.4825.8725.3325.9325.4124.96
RDN [12]17.2316.8516.5117.0416.5816.2116.9016.3815.99
RCAN [14]17.0816.1316.6416.8415.6816.3516.6615.5416.1
IRCNN [40]0.25028.2026.2524.95------
SRMD [17]28.5126.4825.1826.7025.0123.9526.1324.7423.86
UDVD28.6326.6525.3427.0025.3224.2426.2724.8723.98
RDN [12]16.9716.7016.4116.7516.4516.1416.6416.2915.95
RCAN [14]16.8215.9816.5416.5515.5616.2816.4215.4716.06
IRCNN [40]1.35026.6925.2024.42------
SRMD [17]27.4325.8224.7725.6324.4723.6425.2624.3323.63
UDVD27.5425.9924.9225.8824.7523.9125.3624.4523.74
RDN [12]16.5016.3116.0816.3016.0915.8816.2916.0315.77
RCAN [14]16.3615.616.2216.1215.2416.0216.0715.2315.88
IRCNN [40]2.65022.9822.1621.43------
SRMD [17]25.8524.7523.9824.3223.5322.9824.3023.6823.18
UDVD26.0024.8524.1124.6023.8123.2324.4123.7923.27
+ +Table 2. Average PSNR values on variations of multiple degradations. We use the provided official code to compute the results, except IRCNN. For IRCNN, results are extracted from the publication [40]. The best results are highlighted in red color. + +
MethodsKernel widthNoise levelSet5Set14BSD100
×2×3×4×2×3×4×2×3×4
SRMD [17][0.2, 2]533.5631.6730.0129.7928.0626.7727.5426.0024.98
UDVD33.7732.0030.6330.7428.9327.7629.6127.9926.90
SRMD [17]0.2[5, 50]29.7027.8026.5328.0226.2024.9827.3925.7524.81
UDVD30.7828.6127.1528.9026.8525.6227.9826.2025.19
SRMD [17][0.2, 2][5, 50]28.5327.0626.0526.9725.6224.6626.4625.3324.59
UDVD29.3727.7426.5727.6326.2825.2326.8925.7124.95
+ +Table 3. Average PSNR values on spatial variations of degradations. We use the official code of SRMD to compute its results. The best results are highlighted in red color. + +Spatial Variations of Degradations. In order to validate the advantages of dynamic convolution, we further extend the experiments to consider spatial variations of degradations. The degraded LR images are synthesized with the kernel width and noise level, which are gradually increasing in the corresponding range [0.2, 2] and [5, 50] from left to right. We compare our UDVD to the most related work, SRMD [17], which handles the spatial variations without dynamic convolutions. As in Table 3, UDVD constantly outperforms SRMD for all the settings on all the dataset, Set5 [36], Set14 [37] and BSD100 [16]. In + +summary, UDVD delivers a noticeable PSNR improvement over SRMD. The qualitative comparison is also illustrated in Fig. 5. In Fig. 5, without considering spatial variations, RCAN can only handle a fixed degradation (red block represents lighter degradation), but fails at the other one (blue block represents heavier degradation). Although both SRMD and UDVD are capable to deal with spatial variations, UDVD still produces sharper and clearer reconstructed image. These results demonstrate that UDVD is capable to handle not only multiple degradations but also their spatial variations. + +![](images/6788c45095646fc4b84c7e93c05f0802abe937fc1baffa18b57c9e5c416c2994.jpg) +PSNR/SSIM + +![](images/fff305361a5e8609fbdd1c26431bcaf5facd2cf75239911a20e3e2d5fa107cb2.jpg) +24.50/0.7148 + +![](images/630083fd6d6e63f5ae2b31c27c957459cdaf3568b562dfd93872efda9d76b9a7.jpg) +26.03/0.7546 + +![](images/f78243f0973a713d80fac263d16b270ec7031c85fcef4f7b3485e091b9b27d35.jpg) +28.06/0.8005 + +![](images/ec1543badd344391d5705d1b4f72bc76f93ce69c5b81e13959db36188c8ae082.jpg) +28.45/0.8052 + +![](images/4b2b1a9ee8ceeff2f51e24cb09bbb964335787c9d32b37f06b5f36d11a6f89bf.jpg) +PSNR/SSIM +(a) Ground Truth +Figure 5. The visual results of image "zebra" (first row) and image "bamboo" (second row) with scale factor 3 on spatially variant blur and noise degradations. + +![](images/42b96a2cb1e939dcc1f417bca606c2f605b10cbe18f2df6f6e9481638c4728a7.jpg) +20.56/0.3831 +(b) Bicubic + +![](images/d6ed74c20407637ae7604494493332a7078032f0fc602dfd6821975f63b98c81.jpg) +17.68/0.3068 +(c) RCAN [14] + +![](images/1055eeb359317acbf83ed0c6a6bebd2e5d9aaaa839c39ed105edb3d8dfc6801c.jpg) +22.33/0.4608 +(d) SRMD [17] + +![](images/34a91200885a24827bbac05e1a1bdcc9e0a963f97d52e65cfa6866010ee265f0.jpg) +22.52/0.4856 +(e)UDVD(Ours) + +
MethodsKernel widthSet5Set14BSD100
×2×3×4×2×3×4×2×3×4
ZSSR [15]34.9429.2928.8731.0428.0527.1531.4228.2426.68
IRCNN [40]37.4333.3931.02------
SRMDNF [17]0.237.7934.1331.9633.3330.0428.3532.0528.9727.49
SFTMD w/o SFT [18]31.7430.9029.4027.5726.4026.1827.2426.4326.34
SFTMD [18]38.0034.5732.3933.6830.4728.7732.0929.0927.58
UDVD38.0134.4932.3133.6430.4428.7832.1929.1827.70
ZSSR [15]33.3728.6727.4431.3127.3426.1530.3127.3025.95
IRCNN [40]36.0133.3331.01------
SRMDNF [17]1.337.4434.1732.0033.2030.0828.4231.9829.0327.53
SFTMD w/o SFT [18]30.8830.3329.1127.1625.8425.9326.8425.9226.20
SFTMD [18]37.4634.5332.4133.3930.5528.8232.0629.1527.64
UDVD37.3634.5232.3733.3930.5028.8532.0029.2327.75
ZSSR [15]29.8927.8027.6927.7226.4226.0627.3226.4725.92
IRCNN [40]32.0731.0930.06------
SRMDNF [17]2.634.1233.0231.7730.2529.3328.2629.2328.3527.43
SFTMD w/o SFT [18]24.2228.4428.6422.9924.1925.6323.0724.4225.99
SFTMD [18]34.2733.2232.0530.3829.6328.5529.3528.4127.47
UDVD33.7433.1531.9930.0829.5828.5528.9328.4927.55
+ +Table 4. Average PSNR values on noise-free degradations. We use the official code to compute the results, except SFTMD and IRCNN. For SFTMD and IRCNN, results are extracted from the publications [18, 40]. The best two results are highlighted in red and blue colors. + +Noise-Free Degradations and Variations. In this experiment, we train UDvD for noise-free degradations (remove noise degradations) to enable extensive comparisons to other works. Table 4 summarizes the PSNR results for noise-free UDvD and the competitive methods. Compare to SRMDNF [17] and SFTMD [18], UDvD achieves comparable results in most cases and outperforms both the methods when large scale factor on BSD100 [16]. Note that SFTMD [18] benefits mostly from the Spatial Feature Transform (SFT) which applies an affine transformation on the degradation information rather than concatenating it with input image. Without losing generality, UDvD can also be extended to adopt SFT layers for further improvements. + +Fixed Degradations. To compare with state-of-the-art fixed degradation based methods, we evaluate UDVD on two widely used fixed degradations BI and DN. BI only includes bicubically downsampling. While DN applies bicubically downsample and then add AWGN with noise level 30. Table 5 lists PSNR and SSIM results on BI and DN with scale factor 3. In Table 5, except SRMD [17] and UDVD, all the rest methods train different and specific models for BI and DN respectively. While SRMD [17] and UDVD exploits a single model to handle both BI and DN degradations. With only a single model, UDVD still produces competitive results on BI and superior results on DN. This verifies that a single UDVD can adapt to various degradations and achieve promising results. + +
MethodsSet5Set14BSD100
BIDNBIDNBIDN
Bicubic30.39/0.830824.01/0.536927.55/0.727122.87/0.472427.21/0.691822.92/0.4449
SRCNN [1]32.75/0.894425.01/0.695029.30/0.807423.78/0.589828.41/0.773623.76/0.5538
VDSR [2]33.67/0.915025.20/0.718329.78/0.824424.00/0.611228.83/0.789324.00/0.5749
SRMD* [17]33.86/0.923228.30/0.812329.80/0.834226.34/0.702528.87/0.800125.84/0.6561
RDN [12]34.71/0.928028.47/0.815130.57/0.844726.60/0.710729.26/0.807925.93/0.6573
RCAN [14]34.74/0.9299-30.65/0.8482-29.32/0.8111-
UDVD*33.99/0.924028.52/0.818630.04/0.837126.65/0.714628.94/0.801625.99/0.6632
+ +Table 5. Average PSNR/SSIM values on fixed degradations. “*” indicates a unified model for BI and DN. We use the provided official code to compute the results, except SRCNN and VDSR. For SRCNN and VDSR, results are extracted from the publications [1, 2, 12]. The best two results are highlighted in red and blue colors. + +![](images/3084e35ffb8f747f1903e0ae68e1e4a67ccdde9b9881411159bf8f88cd512d42.jpg) +(a) Real LR + +![](images/898213424330672c53e2bc78adce9b85064c0e1e0fe9cc512d6f3564cdab6f27.jpg) +(b) RCAN [14] + +![](images/feed0e7149852f39f1c3c6d3a55c9d64b91b5b9859e22f364e56c099692acae3.jpg) +(c) ZSSR [15] + +![](images/4244eca0a39d71c29f2ac81fcd4cfaef0d9fa58824d3cd64dc859285937dde5c.jpg) +(d) SRMD [17] + +![](images/3b1e0e914c0f0928ede5dd386efbd0e5b8a957b5023d11f28a5e4245af425d48.jpg) +(e)UDVD(Ours) + +![](images/41f88502255391618136d8aad42bb583a2f9263494c595d8fef749f928bae84b.jpg) +Figure 6. The qualitative results of real image "chip" with scale factor 4 (first row) and "frog" with scale factor 3 (second row). +Real Image + +![](images/ec4e39b1e4850db48cc4491fd26806aa1f0ff940b34622789a5383e177122f34.jpg) + +![](images/6b87042bc0f4f40714197fc31c0d0edc62413c4d6d44feb508e66eb671cfb0f3.jpg) + +![](images/7e5d81e713bddc9bc44a6cd613e047717dc17ff264118eaf18bf64517ed44bb3.jpg) + +![](images/7b56ec19441ca47d5fd840076b39d8ec1a5d4f66fd82957c47e36c291a4e5d32.jpg) +$\varepsilon = 0.6, \sigma = 5$ +Figure 7. The qualitative results of real image with scale factor 2, variant Gaussian blur kernel width $\varepsilon$ and noise level $\sigma$ . + +![](images/91145d6de667ae3d1a2eadf6c719126399ac8762086fc6229bd029be8d3f5dc3.jpg) + +![](images/7f4985666869a0b6751c786ab8ddb13fb1b6065e34ae5a2121576761c6a524cc.jpg) +$\varepsilon = 1.0, \sigma = 5$ + +![](images/0bbc137bcb52a5d82d6b767a90294994cc8ddbc4faa0fbe32a72829c85fa1650.jpg) + +![](images/343722dcd50a6c8cbeda0cad859ba36146c0ea4b8500431b9a6bb0c7ba20ab91.jpg) +$\varepsilon = 0.6, \sigma = 10$ + +![](images/62c510d8d6fd465c783c8541ef010ce10e52968a70cba2e382f87e43d236ccf4.jpg) + +![](images/871cb71878625e2de1803a5cf6e2e9213d9c819ae59e841f930ea8f4e9075bf3.jpg) +$\varepsilon = 1.0, \sigma = 10$ + +# 4.5. Experiments on Real Images + +Besides the experiments of synthetic test images in Section 4.4, we further extend the experiments to real images. There is no ground-truth degradations for real images. Hence, manual grid search on degradation parameters is performed as in [17] to obtain visually satisfying results. Fig. 6 illustrates the qualitative comparisons on the widely used real image "chip" [38] and "frog" [39] for UDVD, RCAN [14], ZSSR [15] and SRMD [17]. Most of + +the compared methods produce noticeable artifacts. RCAN produces blur edges and cannot deal with noise. ZSSR tends to produce over-smoothed results. Although SRMD successfully removes these artifacts, but it fails to recover sharp edges. In contrast, the proposed UDVD reconstructs a sharper and clearer quality. Fig. 7 illustrates images reconstructed by UDVD with different degradation estimations. One can observe that different patches (blue and red) have favorable reconstructed results on different degradation estimations. This confirms the existence of variational degradations in real images. In summary, Fig. 6 and Fig. 7 confirm the effectiveness of UDVD for real images. + +# 5. Conclusion + +In summary, this paper presents a Unified Dynamic Convolutional Network for Variational Degradations (UDVD). We further introduce two types of dynamic convolutions to improve performance. Multistage loss is also applied to gradually refine images throughout the consecutive dynamic convolutions. With only a single network, the proposed UDVD efficiently handles a wide range of degradation variations for real-world images, including cross-image and spatial variations. UDVD is evaluated on both synthetic and real images with diverse variations of degrading effects. Comprehensive experiments are conducted to compare UDVD with various existing works. Through qualitative results, we confirm the effectiveness of dynamic convolutions over various existing works. Extensive experiments show that the proposed UDVD achieves favorable or comparable performance on both synthetic and real images. + +# References + +[1] C. Dong, C. C. Loy, K. He, and X. Tang, "Image superresolution using deep convolutional networks," IEEE Trans. Pattern Analysis and Machine Intelligence (TPAMI), vol. 38, pp. 295-307, 2015. 1, 2, 8 +[2] J. Kim, J. K. Lee, and K. M. Lee, "Accurate image super-resolution using very deep convolutional networks," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 1646-1654, 2016. 1, 2, 8 +[3] J. Kim, J. K. Lee, and K. M. Lee, "Deeply-recursive convolutional network for image super-resolution," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 1637-1645, 2016. 1, 2 +[4] Y. S. Tai, J. X. Yang, and X. Liu, "Image super-resolution via deep recursive residual network," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 2790-2798, 2017. 1, 2 +[5] Y. S. Tai, J. X. Yang, X. Liu, and C. Xu, "Memnet: A persistent memory network for image restoration," in Proc. IEEE Int. Conf. Computer Vision (ICCV), pp. 4549-4557, 2017. 1, 2 +[6] C. Ledig, L. Theis, F. Huszar, J. Caballero, A. Cunningham, A. Acosta, A. Aitken, A. Tejani, J. Totz, Z. Wang, and W. Shi, "Photo-realistic single image super-resolution using a generative adversarial network," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 105-114, 2017. 1 +[7] X. Wang, K. Yu, S. Wu, J. Gu, Y. Liu, C. Dong, Y. Qiao, and C. C. Loy, "Ergan: Enhanced super-resolution generative adversarial networks," in Proc. European Conf. Computer Vision Wksp. (ECCVW), 2018. 1 +[8] W.-S. Lai, J.-B. Huang, N. Ahuja, and M.-H. Yang, "Fast and accurate image super-resolution with deep laplacian pyramid networks," IEEE Trans. Pattern Analysis and Machine Intelligence (TPAMI), 2018. 1, 4 +[9] C. Dong, C. C. Loy, and X. Tang, "Accelerating the superresolution convolutional neural network," in Proc. European Conf. Computer Vision (ECCV), pp. 391-407, 2016. 1, 2 +[10] W. Shi, J. Caballero, F. Huszár, J. Totz, A. P. Aitken, R. Bishop, D. Rueckert, and Z. Wang, "Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 1874-1883, 2016. 1, 2 +[11] B. Lim, S. Son, H. Kim, S. Nah, and K. M. Lee, "Enhanced deep residual networks for single image super-resolution," in Proc. IEEE Conf. Computer Vision and Pattern Recognition Wksp. (CVPRW), pp. 1132-1140, 2017. 1, 2 +[12] Y. Zhang, Y. Tian, Y. Kong, B. Zhong, and Y. Fu, "Residual dense network for image super-resolution," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 2472-2481, 2018. 1, 2, 5, 6, 8 +[13] M. Haris, G. Shakhnarovich, and N. Ukita, "Deep backprojection networks for super-resolution," in Proc. IEEE + +Conf. Computer Vision and Pattern Recognition (CVPR), pp. 1664-1673, 2018. 1, 2 +[14] Y. Zhang, K. Li, K. Li, L. Wang, B. Zhong, and Y. Fu, "Image super-resolution using very deep residual channel attention networks," in Proc. European Conf. Computer Vision (ECCV), pp. 286-301, 2018. 1, 2, 5, 6, 7, 8 +[15] M. I. Assaf Shocher, Nadav Cohen, “”zero-shot” superresolution using deep internal learning,” in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 3118-3126, June 2018. 1, 2, 3, 7, 8 +[16] D. R. Martin, C. C. Fowlkes, D. Tal, and J. Malik, "A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics," in Proc. IEEE Int. Conf. Computer Vision (ICCV), vol. 2, pp. 416-423, 2001. 1, 5, 6, 7 +[17] K. Zhang, W. Zuo, and L. Zhang, "Learning a single convolutional super-resolution network for multiple degradations," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 3262-3271, 2018. 1, 2, 3, 5, 6, 7, 8 +[18] J. Gu, H. Lu, W. Zuo, and C. Dong, "Blind super-resolution with iterative kernel correction," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 3, 5, 7 +[19] Y. Yuan, S. Liu, J. Zhang, Y. Zhang, C. Dong, and L. Lin, "Unsupervised image super-resolution using cycle-in-cycle generative adversarial networks," in Proc. IEEE Conf. on Computer Vision and Pattern Recognition Wksp. (CVPRW), pp. 814-81409, 2018. 1, 2 +[20] S. Bell-Kligler, A. Shocher, and M. Irani, "Blind superresolution kernel estimation using an internal-gan," in Advances in Neural Information Processing Systems (NIPS), pp. 284-293, 2019. 1, 2, 3 +[21] B. D. Brabandere, X. Jia, T. Tuytelaars, and L. V. Gool, "Dynamic filter networks," in Proc. Conf. Neural Information Processing Systems (NIPS), 2016. 2 +[22] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 770-778, 2016. 2 +[23] S. Bako, T. Vogels, B. McWilliams, M. Meyer, J. Novák, A. Harvill, P. Sen, T. DeRose, and F. Rousselle, "Kernel-predicting convolutional networks for denoising monte carlo renderings," ACM Trans. Graph. (TOG), vol. 36, pp. 97:1-97:14, 2017. 2 +[24] B. Mildenhall, J. T. Barron, J. Chen, D. Sharlet, R. Ng, and R. Carroll, "Burst denoising with kernel prediction networks," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 2502-2510, 2017. 2 +[25] T. Vogels, F. Rousselle, B. McWilliams, G. Rothlin, A. Harvill, D. Adler, M. Meyer, and J. Novak, “Denoising with kernel prediction and asymmetric loss functions,” ACM Trans. Graph. (TOG), vol. 37, pp. 124:1-124:15, 2018. 2 +[26] X. Xu, M. Li, and W. Sun, "Learning deformable kernels for image and video denoising," ArXiv, vol. abs/1904.06903, 2019. 2 + +[27] Y. Jo, S. W. Oh, J. Kang, and S. J. Kim, "Deep video superresolution network using dynamic upsampling filters without explicit motion compensation," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 3224-3232, 2018. 2, 4 +[28] S. Niklaus, L. Mai, and F. Liu, "Video frame interpolation via adaptive convolution," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 2270-2279, 2017. 2 +[29] S. Niklaus, L. Mai, and F. Liu, "Video frame interpolation via adaptive separable convolution," in Proc. IEEE Int. Conf. Computer Vision (ICCV), pp. 261-270, 2017. 2 +[30] C.-Y. Yang, C. Ma, and M.-H. Yang, "Single-image superresolution: A benchmark," in Proc. European Conf. Computer Vision (ECCV), 2014. 2, 3 +[31] F. Zhao, J. Zhao, S. Yan, and J. Feng, "Dynamic conditional networks for few-shot learning," in Proc. European Conf. Computer Vision (ECCV), 2018. 4 +[32] T. Karras, T. Aila, S. Laine, and J. Lehtinen, “Progressive growing of gans for improved quality, stability, and variation,” in Proc. Int. Conf. Learning Representations (ICLR), 2018. 4 +[33] E. Agustsson and R. Timofte, “Ntire 2017 challenge on single image super-resolution: Dataset and study,” in Proc. IEEE Conf. Computer Vision and Pattern Recognition Wksp. (CVPRW), pp. 1122-1131, 2017. 5 + +[34] R. Timofte, E. Agustsson, L. V. Gool, M.-H. Yang, and L. Zhang, "Ntire 2017 challenge on single image superresolution: Methods and results," in Proc. IEEE Conf. Computer Vision and Pattern Recognition Wksp. (CVPRW), pp. 1110-1121, 2017. 5 +[35] D. P. Kingma and J. Ba, "Adam: A method for stochastic optimization," in Proc. Int. Conf. Learning Representations (ICLR), 2014. 5 +[36] M. Bevilacqua, A. Roumy, C. Guillemot, and M.-L. Alberi-Morel, "Low-complexity single-image superresolution based on nonnegative neighbor embedding," in Proc. British Machine Vision Conf. (BMVC), 2012. 5, 6 +[37] R. Zeyde, M. Elad, and M. Protter, “On single image scale-up using sparse-representations,” in Proc. International Conf. Curves and Surfaces, pp. 711-713, 2010. 5, 6 +[38] R. Fattal, "Image upsampling via imposed edge statistics," ACM Trans. Graph. (TOG), vol. 26, no. 95, 2007. 5, 8 +[39] M. Lebrun, M. Colom, and J.-M. Morel, “The noise clinic: a blind image denoising algorithm,” Image Processing On Line (IPOL), vol. 5, pp. 1-54, 2015. 5, 8 +[40] K. Zhang, W. Zuo, S. Gu, and L. Zhang, “Learning deep cnn denoiser prior for image restoration,” in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), pp. 2808-2817, 2017. 5, 6, 7 \ No newline at end of file diff --git a/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/images.zip b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..dca8d4fa8c3848fb7708b37ff0079b7935d04713 --- /dev/null +++ b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7516402d13b69fb64fdce9d0fd214bf099baacb412760ca9eab4809ab9937dd +size 1065937 diff --git a/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/layout.json b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ed3430e43f2259eeaf1811ca134f1d7b35c284a9 --- /dev/null +++ b/unifieddynamicconvolutionalnetworkforsuperresolutionwithvariationaldegradations/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8a052cbd2d801085daa8a44f947da3617293e9f6525d9b6da14f24c2cf3c86c +size 454517 diff --git a/unifyingtrainingandinferenceforpanopticsegmentation/d2aa282c-49a5-4e7c-ad7a-36085d3f08f5_content_list.json b/unifyingtrainingandinferenceforpanopticsegmentation/d2aa282c-49a5-4e7c-ad7a-36085d3f08f5_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..53f87604d0b5c0721163bc1b1c6678616bbe1683 --- /dev/null +++ b/unifyingtrainingandinferenceforpanopticsegmentation/d2aa282c-49a5-4e7c-ad7a-36085d3f08f5_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:128265e299184e79a8a279f47ee7bb4fa5eb3f60355b02652749e4a9e45a0c98 +size 80109 diff --git a/unifyingtrainingandinferenceforpanopticsegmentation/d2aa282c-49a5-4e7c-ad7a-36085d3f08f5_model.json b/unifyingtrainingandinferenceforpanopticsegmentation/d2aa282c-49a5-4e7c-ad7a-36085d3f08f5_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a9164c8283bc06e7eb6216c62c012bb7aebcad65 --- /dev/null +++ b/unifyingtrainingandinferenceforpanopticsegmentation/d2aa282c-49a5-4e7c-ad7a-36085d3f08f5_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af20b7a96b557697f62a56aa9f94dab0a2bc3c91b9df084bc646518a31e870b1 +size 95006 diff --git a/unifyingtrainingandinferenceforpanopticsegmentation/d2aa282c-49a5-4e7c-ad7a-36085d3f08f5_origin.pdf b/unifyingtrainingandinferenceforpanopticsegmentation/d2aa282c-49a5-4e7c-ad7a-36085d3f08f5_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2c26173f3558c69c7c1aeec7b45a76bc8cba3863 --- /dev/null +++ b/unifyingtrainingandinferenceforpanopticsegmentation/d2aa282c-49a5-4e7c-ad7a-36085d3f08f5_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91ac138a8de198ed0dd682a220b3ef46d78f5032c1615db168031a73a83a3d71 +size 2653382 diff --git a/unifyingtrainingandinferenceforpanopticsegmentation/full.md b/unifyingtrainingandinferenceforpanopticsegmentation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..87b44e4e8dcad064cf53b654c5fb34ce96acf225 --- /dev/null +++ b/unifyingtrainingandinferenceforpanopticsegmentation/full.md @@ -0,0 +1,321 @@ +# Unifying Training and Inference for Panoptic Segmentation + +Qizhu Li Xiaojuan Qi* Philip H.S. Torr +University of Oxford + +{qizhu.li, xiaojuan.qi, philip.torr}@eng.ox.ac.uk + +# Abstract + +We present an end-to-end network to bridge the gap between training and inference pipeline for panoptic segmentation, a task that seeks to partition an image into semantic regions for "stuff" and object instances for "things". In contrast to recent works, our network exploits a parametrised, yet lightweight panoptic segmentation submodule, powered by an end-to-end learnt dense instance affinity, to capture the probability that any pair of pixels belong to the same instance. This panoptic submodule gives rise to a novel propagation mechanism for panoptic logits and enables the network to output a coherent panoptic segmentation map for both "stuff" and "thing" classes, without any post-processing. Reaping the benefits of end-to-end training, our full system sets new records on the popular street scene dataset, Cityscapes, achieving 61.4 PQ with a ResNet-50 backbone using only the fine annotations. On the challenging COCO dataset, our ResNet-50-based network also delivers state-of-the-art accuracy of 43.4 PQ. Moreover, our network flexibly works with and without object mask cues, performing competitively under both settings, which is of interest for applications with computation budgets. + +# 1. Introduction + +As a pixel-wise classification task, panoptic segmentation aims to achieve a seamless semantic understanding of all countable and uncountable objects in a scene - a.k.a. "things" and "stuff" respectively, and delineate the instance boundaries of objects where semantically possible. + +While early attempts at tackling panoptic segmentation often resort to two separate networks for instance and semantic segmentation, recent works [17, 15, 12, 24, 25] are able to improve the overall efficiency by constructing the two branches on a single, shared feature extractor, and training the multi-head, multi-task network jointly. However, these works have stopped short of devising an end-to-end pipeline for panoptic segmentation, as they all adopt a post + +processing stage with heuristics to combine the different outputs of their multi-task networks, following [13, 12]. Such pipelines suffer from several shortcomings. Firstly, post-processing often requires a time-consuming trial-and-error procedure to mine a good set of hyperparameters, which may need to be repeated for each image domain. As the performance of an algorithm can be quite sensitive to the choice of hyperparameters, how well a method performs can quickly degenerate to a function of the amount of computation resources at its disposal [14, 12]. Secondly, methods without an explicit loss function for panoptic segmentation [17, 15, 12, 25] cannot directly optimise for the ultimate goal. Even with expert knowledge, it is difficult to design an exhaustive set of rules and remedies for all failure modes. An example is shown in Fig. 1 (c): after the heuristic post-processing, the missing part of the car cannot be recovered. + +To achieve an end-to-end system, we reckon three challenging steps need to be taken: (1) unify the training and inference, enabling the network to differentiably produce panoptic segmentation during training; (2) embed a data-driven mechanism in the multi-task network whereby imperfect and coarse cues can be cleaned and corrected; (3) design an appropriate loss function to directly optimise the global objective for panoptic segmentation. + +To achieve (1) and (2), we propose a novel pipeline using segmentation and localisation cues to predict a coherent panoptic segmentation in an end-to-end manner. At the heart of this pipeline lie a dynamic potential head - a parameter-free stage that represents a dynamic number of panoptic instances, and a dense instance affinity head - a parametrised, efficient, and data-driven module that predicts and utilises the likelihood for any pair of pixels to belong to the same "thing" instance or "stuff" class. These two differentiable heads produce full panoptic segmentation during training and inference, eradicating the train-test logic discrepancy. + +Furthermore, to fulfil (3), we propose a panoptic matching loss which computes loss directly on panoptic segmentations. This objective function, together with the differentiable nature of our proposed panoptic head, enables the network to learn in an end-to-end manner. To our best knowledge, our loss is the first to perform online segment matching before + +![](images/dd32545ff539e6fc8143b342cb9ef942c004d2b0cb0fe73c941f861286c7b09d.jpg) +(a) Image with boxes + +![](images/e3e3d8935163c8fd3e19bf4e0bc178e4cf911796db7ed5a881315241d5229eb1.jpg) +(b) Ground truth + +![](images/2141b16fb69fd1c826686571bcb70a3e120de9573896ad62351bb2323dce7485.jpg) +(c) Heuristic fusion +Figure 1. Comparison of our approach vs. the heuristic rule-based method of [12]. We overlay the predicted bounding boxes on the input images for visualisation. For the cross-marked pixel in (a) which falls outside its bounding box, we show its instance affinities in (e). Heuristics-based fusion [12] produces truncated objects when localisation is not accurate, while our instance affinity enables the network to recover the full object, by propagating information between pixels with strong instance affinities. Best viewed in colour. + +![](images/0c176c207f2bb449172e790c6e22180c65aba743509910d0502418760d610c63.jpg) +(d) Our approach + +![](images/0d1de02eece7e8ff500dddcca8ac5ec3d91f043005b8b2ece18cce1aefb49f16.jpg) +(e) Instance affinities + +computing a cross entropy loss in an end-to-end panoptic segmentation system. The matching step allows training the network with predicted detections, thereby incentivising it to handle imperfect localisation cues. While the idea is not convoluted, our ablation studies (Table C, Supplementary) show that doing so - as opposed to training with ground truth detections - yields performance gains. + +By closing the gap between training and inference, the network enjoys improved accuracy in challenging scenarios. As illustrated in Fig. 1, by aggregating panoptic logits across the whole image according to the predicted affinity strengths (Fig. 1e), our parametrised panoptic head is able to fix inaccurate predictions from a previous stage - truncated objects due to imperfect bounding box localisations (Fig. 1c). + +Last but not least, thanks to its power of improving coarse panoptic logits, our network achieves competitive performance even without using object mask cues, which are required in most recent approaches [17, 15, 12, 24]. This means our method can offer an additional degree of flexibility in terms of network design, a trait desirable for applications with a limited computation and time budget. On the challenging Cityscapes and COCO datasets, our models set new records for ResNet-50-based networks, achieving panoptic qualities (PQ) of 61.4 and 43.4 respectively. + +# 2. Related work + +Arguably, the problem of panoptic segmentation can be viewed as a combination of instance and semantic segmentation. Indeed, this interpretation has guided many recent works on panoptic segmentation [13, 12], where it is largely approached as a bi-task problem, and the focus is placed on solving both sub-problems simultaneously and efficiently. Shared features of these works include the use of networks with multiple specialised subnets for each sub-task, and the lack of an explicit objective on panoptic segmentation. + +In addition to the inclusion of "stuff" classes, another major difference between panoptic and instance segmentation is that the former requires all pixels to be given a unique label, whereas the latter does not. As a result, "thing" predictions + +from an off-the-shelf detection-driven instance segmentation network - e.g., Mask-RCNN [8] - cannot be readily inserted into the panoptic prediction, as pixels need to have their conflicting instance labels resolved. Moreover, contradictions between the semantic and instance branch must also be carefully resolved. This prompted recent works to adopt an offline postprocessing step first described in [13] to perform conflict resolution and merger of instance and semantic predictions, based on a set of carefully tuned heuristics. A number of works have also attempted to encourage consistency between semantic and instance predictions by adding a communication mechanism between the two subnets [15, 17]. However, as these proposed changes do not modify the output format of the network, they still rely on postprocessing to produce panoptic predictions. In addition, Liu et al. proposes to directly learn the ordering of "thing" instances for conflict resolution [19]. However, this approach does not handle overlapping instances pixel-by-pixel - as it predicts a single ranking score for each instance - and does not reconcile conflicts between "stuff" and "thing". + +A small number of works have attempted to advance towards an end-to-end network with a unified train-test logic. We observe that [16] extends a dynamically instantiated instance segmentation network described in [1] to solve the panoptic segmentation problem. It produces nonoverlapping segments by design, and is trained end-to-end, given detections. However, it is prone to failures when objects of the same class are nearby and similarly coloured. Moreover, its Instance CRF suffers from the very small number of trainable parameters (since the compatibility transforms are frozen as the Potts model), and is made less attractive by the need to grid search good kernel variances for the bilateral filters in the message passing step. + +Recently, Xiong et al. [24] modifies the unary terms of [1, 16] and proposes a parameter-free, differentiable panoptic head to fuse semantic and instance segmentation predictions during training. Similar to [16], it allows a panoptic loss to be directly applied on the fused probabilities. However, in the inference phase, it still resorts to several heuristic + +strategies (e.g., overlap-based instance mask pruning) and relies on a complex voting mechanism to determine the semantic categories of predicted segments, deviating from a unified training and inference pipeline. Furthermore, the effectiveness of their parameter-free panoptic head heavily depends on the quality of semantic and instance predictions it receives, since it arguably functions as an online heuristic merger due to the absence of learnable weights. + +Also pertinent to this work is the extensive research carried out around the techniques of long-range contextual aggregation. Aside from CRF-driven methods [14, 27, 1], Bertasius et al. proposes a semantic segmentation method based on random walks to learn and predict inter-pixel affinity graphs, and iteratively multiply the learnt affinity with an initial segmentation to achieve convergence [2]. Lately, another technique, self-attention, has been successful in several vision tasks [22, 26, 6]. However, its quadratic memory and computation complexity has cast doubt over its practicality. To mitigate this problem, Shen et al. [21] suggests to invoke the associativity of matrix multiplication and avoid the explicit production of expensive attention maps. This approach effectively reduces the complexity to a linear one, $O(HW)$ , making it suitable for pixel-level labelling tasks. + +Albeit sharing certain operational similarities with self-attention and non-local methods [26, 11, 22], our proposed dense instance affinity head serves a different purpose, and cannot be substituted by directly inserting these operations in the backbone. The aforementioned methods work by enhancing the expressiveness of extracted features, as reflected in the fact that these actions are performed in the feature space, and can generally lead to performance gains for many tasks. In contrast, our proposed instance affinity is not a generic feature enhancer. It is specifically designed and tasked to model the pairwise probability for any two pixels to belong in the same "thing" instance or "stuff" category. This relationship in turn enables our network to revise and resolve. With this purpose in mind, we incorporate insights from [21] to construct a module that is lightweight, learnable, and agnostic to the number of channels, allowing us to model a dynamic number of instances across different images. + +# 3. Proposed approach + +Our proposed network (Fig. 2) consists of four blocks. A shared fully convolutional backbone extracts a set of features. Operating on these features, a semantic segmentation submodule and an object detection submodule produce segmentation and localisation cues, which are fused and revised by the proposed panoptic segmentation submodule. All components are differentiable and trained jointly, end-to-end. + +# 3.1. Backbone + +The pipeline starts with a shared fully convolutional backbone, which takes an input image of spatial dimen + +sion $H\times W$ , and generates a set of features $\pmb{F}$ . In our experiments, we adopt a simple ResNet-FPN backbone that outputs four multi-scale feature maps [18], following a common practice in prior works [12, 24]. To encourage global consistency, we carry out a squeeze-and-excitation operation [10] on the top-level ResNet feature before producing the first FPN feature. A similar strategy is used in [24]. + +# 3.2. Semantic segmentation submodule + +The backbone features $\pmb{F}$ are fed into the semantic segmentation submodule to produce a $\frac{H}{d} \times \frac{W}{d} \times (N_{st} + N_{th})$ tensor $\pmb{V}$ , where $N_{st}$ and $N_{th}$ are the number of "stuff" and "thing" classes respectively. $V_{i}(l)$ denotes the probability that pixel $p_i$ belongs to semantic class $l$ . The spatial dimension is downsampled $d$ times to strike a balance between resolution and complexity. We choose $d$ as 4 in the experiments. + +Multiple implementations for this submodule have been proposed in the literature, all showing decent performance [12, 24]. In this work, we modify the design in [24] by inserting a Group Normalisation operation [23] after each convolution, which has been observed to help stabilise training. Please refer to the supplementary for further details. + +# 3.3. Object detection submodule + +In parallel, the features $\mathbf{F}$ are also passed to an object detection submodule, which generates $D$ object detections, consisting of bounding boxes $\mathbf{B} = \{B_{1}, B_{2}, B_{3}, \dots, B_{D}\}$ , confidence scores $s = \{s_{1}, s_{2}, s_{3}, \dots, s_{D}\}$ , and predicted classes $c = \{c_{1}, c_{2}, c_{3}, \dots, c_{D}\}$ . Additionally, we add a whole image bounding box for each "stuff" class to the object detection predictions, raising the total number of detections to $D + N_{st}$ . Doing so allows the panoptic submodule to process "things" and "stuff" with a unified architecture. + +Notably, the versatility of the panoptic submodule allows our network to work with or without object masks. When the object detection submodule has the capability to predict instance masks for "things" $M = \{M_1, M_2, M_3, \dots, M_D\}$ , they are easily incorporated into the dynamic potential $\Psi$ . Details will be given in Sec. 3.4.1. + +# 3.4. Panoptic segmentation submodule + +This submodule serves as the mastermind of the pipeline. Receiving cues from the two prior submodules, the panoptic segmentation submodule combines them into a dynamic potential $\Psi$ (Sec. 3.4.1) and revises it according to predicted pairwise instance affinities (Sec. 3.4.2), producing the final panoptic segmentations with the same logic in training and inference. This pipeline is illustrated in Fig. 3. + +# 3.4.1 Dynamic potential head + +The dynamic potential head functions as an assembly node for segmentation and localisation cues from prior submod- + +![](images/cdd8ed5e97de23c7550183b03db3ad8819f40d36836e472de6d6c0921e460ac9.jpg) +Figure 2. Overview of the network architecture. Semantic segmentation and object detections are fed into the proposed panoptic segmentation submodule - including a dynamic potential head and a dense instance affinity head - to produce panoptic segmentation predictions without requiring post-processing. All components are differentiable, and the network is trained end-to-end. + +![](images/9c7f933f5191b99dc02f20e3ee7875c349237686b32824855228b2faf00f0652.jpg) +Figure 3. The panoptic segmentation submodule. Details on the dynamic potential head and dense instance affinity head are further clarified in Fig. 4 and 5 respectively. + +![](images/46975fd926d1342f8150ce47fb49b6066026fd8eacce035032ee90f0e3611cc1.jpg) +Figure 4. Three variants of the dynamic potential head. For clarity, we only show one instance in each diagram. In practice, the same operation is extended to all detections and "stuff". Note that the dotted path is only activated when masks are provided to the head. When no masks are given, variant B and C are equivalent. + +ules. This head is capable of representing varying numbers of instances as it outputs a dynamic number of channels, one for each object instance or "stuff" class. We present three variants of dynamic head design, as illustrated in Fig. 4. Variant A is proposed in [24], whereas the mask-free parent of B and C is first described in [1] as the box consistency term. A main difference between variant A and the rest is the absence of detection score in A. We argue that leveraging detection scores can suppress false positives in the final output, as unconfident detections will be attenuated by its score. Thus, we will describe variant B and C in more details. + +Given $(D + N_{st})$ bounding boxes $B$ and box classes $c$ + +(including the dummy full-image "stuff" boxes), it populates each box region with a combination of semantic segmentation probabilities $V$ and box confidence scores $s$ to produce a dynamic potential $\Psi$ with $(D + N_{st})$ channels: + +$$ +\Psi_ {i} (k) = \left\{ \begin{array}{l l} s _ {k} V _ {i} \left(c _ {k}\right) & \text {f o r} i \in B _ {i} \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {1} +$$ + +Optionally, if provided with object masks $M$ , the dynamic potential head can also incorporate them into $\Psi$ . Defining $M$ to be image-resolution instance masks where the raw masks have been resized to their actual dimensions and pasted to appropriate spatial locations in image, the dynamic potential with object masks can be summarised as: + +$$ +\Psi_ {i} (k) = \left\{ \begin{array}{l l} s _ {k} \left[ V _ {i} \left(c _ {k}\right) \odot M _ {i} (k) \right] & \text {f o r} i \in B _ {i} \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {2} +$$ + +In variant B and C, operator $\odot$ is multiplication and summation respectively. More analysis of the variant B and C are included in the supplementary. + +# 3.4.2 Dense instance affinity head + +We observe that the dynamic potential $\Psi$ often carries conflicts and errors due to imperfect cues from semantic segmentation and object localisation. This motivates the design of this parametrised head, with the aim to enable a data-driven mechanism that resolves and revises the output of the dynamic potential head. The main difficulty with injecting parameters into an instance-level head is the varying number of instances across images, which practically translates to a dynamic number of channels in the input tensor. On the other hand, the fundamental building block of a convolutional neural network - convolution - is designed to handle a fixed number of input channels. This apparent incompatibility has led prior works on panoptic segmentation to use either no parameter at all [24], or only single scaling factors for entire tensors [16] providing limited modelling capacity. + +This conundrum can be tackled by driving this head with a pairwise dense instance affinity, which is predicted from + +![](images/a39e109c6f73f68780c90656965a2b91ff46f7ac4b8ab5dbd8a3af70dd3245e1.jpg) +Figure 5. The dense instance affinity head. It is parametrised, expressive, lightweight, and fully differentiable. + +data, fully differentiable, and compatible with a dynamic number of input channels. By integrating global information according to the pairwise affinities, it produces the final panoptic segmentation probabilities, from which inference can be trivially made with an argmax operation along the channel dimension. Thus, it is amenable to a direct panoptic loss, an ingredient of an end-to-end network. + +To construct the dense instance affinity, this head first extracts from the backbone features $\pmb{F}$ a single feature tensor $Q$ of dimension $\frac{H}{d} \times \frac{W}{d} \times C$ , where $C$ is the number of feature channels, and $d$ is a downsampling factor. This corresponds to the affinity feature extractor in Fig. 5. The spatial dimensions of $Q$ can be easily collapsed to produce a $\frac{HW}{d^2} \times C$ feature matrix. + +Normally, the pairwise instance affinities $\mathbf{A} -$ a large $\frac{HW}{d^2} \times \frac{HW}{d^2}$ matrix – would then be produced by performing a matrix multiplication $\mathbf{A} = \mathbf{Q}\mathbf{Q}^T$ . This would be followed by multiplying $\mathbf{A}$ with a $\frac{HW}{d^2} \times C'$ input tensor to complete the process. It is, however, prohibitively expensive due to the quadratic complexity with respect to $HW$ . In a typical training step, where $(H,W) = (800,1300)$ and $d = 4$ , a single precision matrix with the size of $\mathbf{A}$ would occupy 15.7GB of GPU memory, making this approach unpractical. + +Drawing from insight of [21], we design a lightweight pipeline for computing and applying the dense instance affinities (Fig. 5). Instead of sequentially computing $QQ^T\Psi$ which explicitly produces $A$ , we compute $Q(Q^T\Psi)$ , since: + +$$ +\left(\boldsymbol {Q} \boldsymbol {Q} ^ {T}\right) \boldsymbol {\Psi} = \boldsymbol {Q} \left(\boldsymbol {Q} ^ {T} \boldsymbol {\Psi}\right) \tag {3} +$$ + +The result of $Q^T\Psi$ is a very small $C\times (D + N_{st})$ tensor, taking only tens of kilobytes. In terms of computation, using the same $H,W,d$ as the example above and $(C,D,N_{st} = 128,100,53)$ as typically used in experiments, the efficient implementation reduces the total number of multiply-adds by $99.8\%$ to 5 billion FLOPS. For reference, a ResNet-50-FPN backbone at the same input resolution requires 140 billion FLOPS. + +Finally, we add the product back to the input, forming a residual connection to ease the learning task. As such, the full action of our dense instance affinity applier can be summarised with the following expression: + +$$ +\boldsymbol {P} = \boldsymbol {\Psi} + \phi_ {0} (\boldsymbol {Q}) \left(\phi_ {1} \left(\boldsymbol {Q} ^ {T}\right) \boldsymbol {\Psi}\right) \tag {4} +$$ + +where $\phi_0$ and $\phi_{1}$ are each a $1\times 1$ convolution followed by an activation. From this formulation, inference is straight forward and does not require any post-processing, as an argmax operation on $P$ along the channel direction readily produces the panoptic segmentation prediction. + +Note that we do not compute a loss directly over $Q$ ; instead, the instance affinities are implicitly trained by supervision from the panoptic matching loss described in the next section. In the preliminary experiments, we tried directly supervising $Q$ with a contrastive loss, but did not observe performance gains. This shows that our end-to-end training scheme with the panoptic matching loss is already able to guide the model to learn effectively. Detailed discussion of the dense instance affinity operation, with ablation studies and visualisations, is provided in Sec. 4.1. + +For simplicity, the affinity feature extractor adopts the same architecture as our semantic segmentation submodule. We use $C = 128$ in all experiments. + +# 3.5. Panoptic matching loss + +For instance-level segmentation, different permutations of the indices in the segmentation map are qualitatively equivalent, since the indices merely act to distinguish between each other, and do not carry actual semantic meanings. + +During training, we feed predicted object detections into the panoptic segmentation submodule. As a result, the indices of the instances are not fixed or known before hand. To compute loss, we first match the ground truth segmentation to the predicted detections by maximising the intersection over union between their bounding boxes (box IoU). Given a set of $\alpha$ ground truth segments $\mathcal{T} = \{\mathcal{T}_1,\mathcal{T}_2,\mathcal{T}_3,\dots,\mathcal{T}_{\alpha}\}$ , and a set of $\beta$ predicted bounding boxes $B = \{B_{1},B_{2},B_{3},\ldots ,B_{\beta}\}$ , we find the "matched" ground truth $\mathcal{T}^{\star}$ which satisfies: + +$$ +\boldsymbol {T} ^ {\star} = \underset {\boldsymbol {Z} \in \pi (\boldsymbol {T})} {\operatorname {a r g m a x}} \operatorname {I o U} _ {t} (\operatorname {b o x} (\boldsymbol {Z}), \boldsymbol {B}) \tag {5} +$$ + +where $\mathrm{box}(.)$ extracts tight bounding boxes from segments, $\pi (\mathcal{T})$ refers to all permutations of $\mathcal{T}$ , and $t$ sets the minimum match threshold for a match to qualify as valid. Note that the box IoU between different semantic classes are taken to be 0, and $\alpha$ and $\beta$ need not be the same. Ground truth + +segments without matched predictions are set to the "ignore" label, and detections matching to the same ground truth segment are all removed except the top match, before being fed into the panoptic submodule. Both cases do not contribute any gradients. With the "matched" ground truth segmentation $\mathcal{T}^{\star}$ , we can compute the loss on the predicted panoptic segmentation probabilities $P$ as per normal with a cross-entropy loss. Our experiments use 0.5 for $t$ . + +Unlike ours, the panoptic loss used by [24] does not have the matching stage and its panoptic head is trained with ground truth detections instead. As a result, the models of [24] are not trained to handle imperfect localisations. In addition, our loss differs from [19] as the loss used by their spatial ranking module does not directly supervise panoptic segmentation, does not take "stuff" into account, and thus does not globally optimise in an end-to-end way. + +# 4. Experimental evaluation + +Cityscapes. The Cityscapes dataset features high resolution road scenes with 11 "stuff" and 8 "thing" classes. There are 2,975 training images, 500 validation images, and 1,525 test images. We report on its validation set and test set. + +COCO. The COCO panoptic dataset has a greater number of images and categories. It features 118k training images, 5k validation images, and 20k test-dev images. There are 133 semantic classes, including 53 "stuff" and 80 "thing" categories. We report on its validation set and test-dev set. + +Evaluation metric. Our main evaluation metric is the panoptic quality (PQ), which is the product of segmentation quality (SQ) and recognition quality (RQ) [13]. SQ captures the average segmentation quality of matched segments, whereas RQ measures the ability of an algorithm to correctly detect objects. + +We also report the mean Intersection over Union (IoU) score of our initial category-level segmentation $V$ , and the box Average Precision $(AP_{box})$ of our predicted bounding boxes $B$ . Additionally, for models which predict object instance masks $M$ in the object detection submodule, we report its mask Average Precision $(AP_{mask})$ as well. Both $AP_{box}$ and $AP_{mask}$ are averaged across IoU thresholds between 0.5 and 0.95, at increments of 0.05. + +Cityscapes training. We follow most of the learning settings described in [12]. We distribute the 32 crops in a minibatch over 4 GPUs instead. The weights for the detection, semantic segmentation, and panoptic segmentation losses are set to 0.25, 1.0, and 1.0 respectively. + +COCO training. We follow most of the learning settings for COCO experiments in [12]. For the learning schedule, we train for 200k iterations with a base learning rate of 0.02, and reduce it by a factor of 10 at 150k and 190k iterations. While this learning schedule differs from that used in [12], + +we found that our panoptic submodule with its additional parameters benefits from the new schedule. In terms of loss weights, we use 1.0, 0.2, and 0.1 for the object detection, semantic segmentation, and panoptic segmentation losses. + +# 4.1. Ablation studies + +We conduct detailed ablation studies for five different settings, including two architecture choices (msk. and aff.), one training strategy (e2e.), and two inference options (heu. and amx.). We report the results in Table 1. Explanations for the abbreviations can be found in the table caption. For clarity, we provide a brief description of the ablation models: + +- Model $\mathbb{A}$ uses a Faster-RCNN head as its object detection submodule, and has neither the dense instance affinity head nor the panoptic matching loss. The dynamic potential $\Psi$ is used as the final output $P$ . +- Model $\mathbb{B}$ differs from $\mathbb{A}$ by employing the dense instance affinity head and the panoptic matching loss. +- In $\mathbb{C}1$ and $\mathbb{C}2$ , the model uses a Mask-RCNN head as its object detection submodule, and has neither the dense instance affinity head nor the panoptic matching loss. During inference, $\mathbb{C}1$ merges the semantic and instance segmentation predictions using heuristics [13], whereas $\mathbb{C}2$ outputs the dynamic potential $\Psi$ as $P$ . +- The pair $(\mathbb{D}1, \mathbb{D}2)$ differs from $(\mathbb{C}1, \mathbb{C}2)$ by employing the instance affinity and the panoptic matching loss. + +Note that model $\mathbb{A}$ and $\mathbb{B}$ do not produce nor use object mask predictions, and are therefore not possible to test with the heuristic merger strategy [12]. In addition, the pair $\mathbb{C}1$ and $\mathbb{C}2$ , as well as $\mathbb{D}1$ and $\mathbb{D}2$ , are identical models using different inference methods. + +Dense instance affinity. Comparing across model $\mathbb{A}$ and $\mathbb{B}$ , it is evident that training and testing with the proposed dense instance affinity leads to significant performance boosts. Increased performances are seen across all metrics, with the largest rises in PQ (+4.4 for all, +4.2 for "things" and +4.4 for "stuff") and RQ (+4.0). This testifies to the effectiveness of the dense instance affinity, even with only box predictions. A similar trend is also evident with object masks enabled, between model $\mathbb{C}2$ with $\mathbb{D}2$ , recording a 1.8 rise in overall PQ. Fig. 6 visualises some examples of instance affinities, with more in the supplementary materials. + +End-to-end training with panoptic matching loss. While $\mathbb{C}1$ and $\mathbb{D}1$ are trained differently – with the former being trained jointly, and the latter being trained end-to-end with the panoptic matching loss – they are tested using the same heuristic strategy [12]. Therefore, the 1.3 increase in PQ of $\mathbb{D}1$ over $\mathbb{C}1$ solely stems from the fact that $\mathbb{D}1$ undergoes end-to-end training, and shows that our end-to-end training strategy with the panoptic matching loss is effective. + +
Modelmsk.aff.Settings e2e.heu.amx.allPQ th.st.SQ allRQ allIoU allAP maskAP box
A✓54.646.060.977.968.475.0-36.9
B✓✓✓59.050.265.380.172.477.8-38.1
C1✓✓59.351.465.079.873.278.133.838.1
C2✓✓59.652.464.880.472.978.133.838.1
D1✓✓✓✓60.652.466.580.474.279.533.738.8
D2✓✓✓✓61.454.766.381.174.779.533.738.8
+ +Unified training and inference pipeline. For $\mathbb{D}1$ , we test a model trained end-to-end with the panoptic matching loss using the heuristic merger strategies. In contrast, for $\mathbb{D}2$ , we take the same model and take $\arg\max$ from the final panoptic logits. We can see that the $\mathbb{D}2$ still outperforms $\mathbb{D}1$ by 0.8 PQ, giving proof for the benefit of having a unified training and testing pipeline. + +# 4.2. Comparison with state-of-the-art + +Cityscapes. We compare our results with other methods on Cityscapes validation set in Table 2. All entries are ResNet-50 [9] based except [16, 25]. We sort prior works into two tracks, depending on whether the network performs instance segmentation internally. For both tracks, our method achieves the state-of-art. The most telling comparison is between our model and UPSNet, as these methods have a similar network architecture other than our proposed panoptic segmentation submodule. Our network is able to outperform UPSNet by 2.1 PQ. On the other hand, among methods that do not rely on instance segmentation [16, 25], our system outperforms the previous state-of-art by 3.5 PQ, even though they utilise stronger backbones (Xception-71 [4] and ResNet-101 [9]) than ours (ResNet-50). + +Speed-wise, our design compares favourably with other state-of-the-art models. On Cityscapes, inference takes $386\mathrm{ms}^1$ and $201\mathrm{ms}^2$ per image for [12] and [24], whereas our full model runs at 197ms per image. All models are ResNet-50 based and timed on a single RTX 2080Ti card. + +COCO. Results on the COCO panoptic validation set are reported in Table 3. Due to the disentangling power of our proposed pipeline and unified train-test logic, we are able to outperform the previous state-of-art method by 0.9 in terms of overall PQ, and 2.1 in terms of PQ for "stuff". + +Results on the Cityscapes test set and COCO test-dev set are reported in Table 4 and 5. We perform single-scale inference, without any test-time augmentation. For fair comparison, only methods that are ResNe(X)t-based are reported. Our method achieves the state-of-art performance on both + +Table 1. Ablation studies on Cityscapes validation set. Settings include two architecture variations: whether to utilise object masks (msk.), and whether to utilise the proposed instance affinity (aff.); one training option: whether to train end-to-end with the panoptic matching loss (e2e.); and two inference strategies: whether to directly take argmax (amx.) of the panoptic logits (which is either $\Psi$ for $\mathbb{A}$ and $\mathbb{C}2$ , or $P$ for $\mathbb{B}$ and $\mathbb{D}2$ ) or use the heuristic merging strategy [12] (heu.). + +
MethodallPQ th.st.SQ allRQ allIoU allAP maskAP bbox
Li et al. [16]53.842.562.1--79.8--
DeeperLab [25]56.5-------
SSAP [7]58.450.6------
Ours (w/o mask)59.050.265.380.172.477.8-38.1
TASCNet [15]†55.950.559.8-----
Attention [17]†56.452.759.0--73.633.6-
Pan. FPN [12]†57.751.662.2--75.032.0-
UPSNet [24]†59.354.662.779.773.075.233.339.1
Pan. Deeplab [3]†59.7-------
Seamless [20]†60.356.163.3--77.533.6-
Ours (w/ mask)†61.454.766.381.174.779.533.738.8
+ +Table 2. Panoptic segmentation results on Cityscapes val. set. Models that run instance segmentation internally are marked with $\dagger$ . Other than [16, 25], all works are ResNet-50 [9] based. For fairness, we only include numbers obtained via single-scale inference. + +
MethodallPQ th.st.SQ allRQ allIoU allAP maskAP bbox
JSIS-Net [5]26.929.323.372.435.7---
Pan. Deeplab [3]35.1-------
Pan. FPN [12]39.045.928.7---33.3-
UPSNet [24]42.548.633.478.052.554.334.337.8
Ours (w/ mask)43.448.635.579.653.053.736.440.5
+ +Table 3. Panoptic segmentation results on COCO 2017 validation set. All methods are based on a ResNet-50 backbone. + +
MethodBb.PQSQRQ
allth.st.allth.st.allth.st.
P. Deeplab [3]R-5058.0--------
Ours (w/ mask)R-5061.052.767.181.479.682.873.966.279.6
Li et al. [16, 1]R-10155.444.063.679.777.381.568.157.076.1
SSAP [7]R-10158.948.466.582.482.982.070.658.379.6
TASCNet [15]†X-10160.753.466.081.079.782.073.867.078.8
Ours (w/ mask)†R-10163.356.068.582.481.083.475.969.180.9
+ +Table 4. Performance on the Cityscapes test set. Models pretrained on the COCO dataset are marked with $\dagger$ . Bb.: backbone, R: ResNet, X: ResNeXt. + +datasets with a PQ of 63.3 and 47.2 respectively. + +Qualitative results are shown in Fig 7 where we compare with our re-implementation of Panoptic FPN. As the instance affinity operation integrates information from pixels locally and globally, our method can resolve errors in the + +![](images/5e42b2b9534d9953f4ee9a04cacaf504031fe4b89710c36acf0c71f5ed164bd6.jpg) + +![](images/ece5dfbaedf74f3372d11a9e898cb5b9bc4c4a1cd6d423818dbed18357dc65b0.jpg) + +![](images/63f1181b2cbcb9f748f88aee6843cd6e66cb4dd4c390a3c4b92264cf83798b7d.jpg) + +![](images/cd311b464e59bc3cde7443f730eb7b68de46e26bec8b7408930da80e9ec03974.jpg) + +![](images/f3761731e1f83ccb21760a065e8e8b0f8ac442757f4d0988c907595614764573.jpg) +(a) Image with boxes + +![](images/7925db2345922f212ab1240e7e321544205e13f5a3670853ee23767c8dcc1319.jpg) +(b) Ground truth + +![](images/14d416b55e6f27d66a50f34d8a71d07ac5007b017ff58f2be778625523cf0603.jpg) +(c) Instance affinities + +![](images/6365bacef8ef4a9e284df3add99efb700d27e2e6c7d69dc53ea9fd4d542e2e14.jpg) +(d) Panoptic prediction + +![](images/47397f58cb793675b0cdf789e1721edf9aaf4e1932e24e30f1aef917a5bc5e59.jpg) +Figure 6. Examples of predicted instance affinities. The instance affinities shown in (c) are for the cross-marked pixels in (a). Observe that the predicted bounding boxes (shown in (a)) for the bus in Row 1 and the frontal car in the Row 2 fail to enclose the full object. Rule-based fusion in [13, 12] cannot recover from such localisation errors as their segments are constrained to pixels inside bounding boxes. In contrast, our model is able to still segment full objects by predicting strong affinities between the marked locations with rest of the instance. + +![](images/84a833c950c48c99d219f3ea07b844ccd09e0fb78aced0d322894cc042f43155.jpg) +(a) Image with boxes + +![](images/4786be611ef41e5835f0db0d5da6143f3f5c1eea0cc5bb15d76d72a6a192b019.jpg) + +![](images/038ceaee7f51cb80681ef502dcc130cbdb417be72ff7c05f60d1965fb5c9290c.jpg) +(b) Ground truth + +![](images/28fc3e9bb9dd2b9c34c7eaa4b11aeb41643e9538ffef837449b03634390af282.jpg) + +![](images/9ca43f4c104c0ac88601802433caa1e5c27162bb540855595eb723c664ab45d5.jpg) +(c) Heuristic merger [12] +Figure 7. Qualitative results. The input images are shown with the predicted bounding boxes overlaid above. In column (c), swathes of "void" region are clearly visible for pixels where assignment cannot be made by heuristics. In contrast, our panoptic segmentation results are robust to incoherence in segmentation and localisation cues, and can explain more pixels in an image. + +![](images/3f6d4343651a45a05cf8ec43949735f6957cf809e47b52ff58abd5c79ad28857.jpg) + +![](images/da84e2869839a20d73e56d67a3af0edb6a16383814808bcd0ae3618cb0c99569.jpg) +(d) Our prediction + +
MethodBb.PQSQRQ
allth.st.allth.st.allth.st.
JSIS-Net [5]R-5027.229.623.471.971.672.335.939.430.6
P. Deeplab [3]R-5035.2--------
SSAP [7]R-5036.940.132.080.781.679.444.848.539.3
TASCNet [15]R-5040.747.031.078.580.675.350.157.139.6
Ours (w/ mask)R-5043.648.935.680.181.378.353.359.544.0
Attention [17]X-15246.555.932.581.083.777.056.166.340.7
UPSNet [24]R-10146.653.236.780.581.578.956.964.645.3
Ours (w/ mask)R-10147.253.537.781.182.379.257.264.346.3
+ +Table 5. Performance on the COCO test-dev set. Bb.: backbone, R: ResNet, X: ResNeXt. + +detection stage by propagating meaningful information from other pixels. The "void" region (displayed in black) shown in Fig 7c are typically present in results produced by the heuristic merging process popularised by [13]. They are due to the method's inability to resolve inconsistencies between semantic and instance predictions. In contrast, our method successfully handles such cases, as evident in Fig. 7d. + +# 5. Conclusion + +We have presented an end-to-end panoptic segmentation approach that exploits a novel pairwise instance affinity operation. It is lightweight, learnt from data, and capable of modelling a dynamic number of instances. By integrating information across the image in a differentiable manner, the instance affinity operation with the panoptic matching loss enables end-to-end training and heuristics-free inference, leading to improved qualities for panoptic segmentation. Furthermore, our method bestows additional flexibility upon network design, allowing our model to perform well even if it only uses bounding boxes as localisation cues. + +Acknowledgements This work was supported by Huawei Technologies Co., Ltd., the ERC grant ERC-2012-AdG 321162-HELIOS, EPSRC grant Seebibyte EP/M013774/1 and EPSRC/MURI grant EP/N019474/1. We would also like to thank the Royal Academy of Engineering and FiveAI. + +# References + +[1] Anurag Arnab and Philip HS Torr. Pixelwise instance segmentation with a dynamically instantiated network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 441-450, 2017. 2, 3, 4, 7 +[2] Gedas Bertasius, Lorenzo Torresani, Stella X Yu, and Jianbo Shi. Convolutional random walk networks for semantic image segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 858-866, 2017. 3 +[3] Bowen Cheng, Maxwell D. Collins, Yukun Zhu, Ting Liu, Thomas S. Huang, Hartwig Adam, and Liang-Chieh Chen. Panoptic-deeplab: A simple, strong, and fast baseline for bottom-up panoptic segmentation, 2019. 7, 8 +[4] François Chollet. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1251-1258, 2017. 7 +[5] Daan de Geus, Panagiotis Meletis, and Gijs Dubbelman. Panoptic segmentation with a joint semantic and instance segmentation network. arXiv preprint arXiv:1809.02110, 2018. 7, 8 +[6] Jun Fu, Jing Liu, Hajjie Tian, Yong Li, Yongjun Bao, Zhiwei Fang, and Hanqing Lu. Dual attention network for scene segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3146-3154, 2019. 3 +[7] Naiyu Gao, Yanhu Shan, Yupei Wang, Xin Zhao, Yinan Yu, Ming Yang, and Kaiqi Huang. Ssap: Single-shot instance segmentation with affinity pyramid. In Proceedings of the IEEE International Conference on Computer Vision, pages 642-651, 2019. 7, 8 +[8] Kaiming He, Georgia Gkioxari, Piotr Dolkar, and Ross Girshick. Mask r-cnn. In ICCV, pages 2961-2969, 2017. 2 +[9] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 7 +[10] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7132-7141, 2018. 3 +[11] Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Ccnet: Criss-cross attention for semantic segmentation. In Proceedings of the IEEE International Conference on Computer Vision, pages 603-612, 2019. 3 +[12] Alexander Kirillov, Ross Girshick, Kaiming He, and Piotr Dóllár. Panoptic feature pyramid networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6399-6408, 2019. 1, 2, 3, 6, 7, 8 +[13] Alexander Kirillov, Kaiming He, Ross Girshick, Carsten Rother, and Piotr Dólar. Panoptic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 9404-9413, 2019. 1, 2, 6, 8 +[14] Philipp Krahenbuhl and Vladlen Koltun. Efficient inference in fully connected crfs with gaussian edge potentials. In + +Advances in neural information processing systems, pages 109-117, 2011. 1, 3 +[15] Jie Li, Allan Raventos, Arjun Bhargava, Takaaki Tagawa, and Adrien Gaidon. Learning to fuse things and stuff. arXiv preprint arXiv:1812.01192, 2018. 1, 2, 7, 8 +[16] Qizhu Li, Anurag Arnab, and Philip HS Torr. Weakly-and semi-supervised panoptic segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 102-118, 2018. 2, 4, 7 +[17] Yanwei Li, Xinze Chen, Zheng Zhu, Lingxi Xie, Guan Huang, Dalong Du, and Xingang Wang. Attention-guided unified network for panoptic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7026-7035, 2019. 1, 2, 7, 8 +[18] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, pages 2117-2125, 2017. 3 +[19] Huanyu Liu, Chao Peng, Changqian Yu, Jingbo Wang, Xu Liu, Gang Yu, and Wei Jiang. An end-to-end network for panoptic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6172-6181, 2019. 2, 6 +[20] Lorenzo Porzi, Samuel Rota Bulo, Aleksander Colovic, and Peter Kontschieder. Seamless scene segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8277-8286, 2019. 7 +[21] Zhuoran Shen, Mingyuan Zhang, Shuai Yi, Junjie Yan, and Haiyu Zhao. Decomposed attention: Self-attention with linear complexities. arXiv preprint arXiv:1812.01243, 2018. 3, 5 +[22] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7794-7803, 2018. 3 +[23] Yuxin Wu and Kaiming He. Group normalization. In Proceedings of the European Conference on Computer Vision (ECCV), pages 3-19, 2018. 3 +[24] Yuwen Xiong, Renjie Liao, Hengshuang Zhao, Rui Hu, Min Bai, Ersin Yumer, and Raquel Urtasun. Upsnet: A unified panoptic segmentation network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8818-8826, 2019. 1, 2, 3, 4, 6, 7, 8 +[25] Tien-Ju Yang, Maxwell D Collins, Yukun Zhu, Jyh-Jing Hwang, Ting Liu, Xiao Zhang, Vivienne Sze, George Papandreou, and Liang-Chieh Chen. Deeperlab: Single-shot image parser. arXiv preprint arXiv:1902.05093, 2019. 1, 7 +[26] Yuhui Yuan and Jingdong Wang. Ocnet: Object context network for scene parsing. arXiv preprint arXiv:1809.00916, 2018.3 +[27] Shuai Zheng, Sadeep Jayasumana, Bernardino Romero-Paredes, Vibhav Vineet, Zhizhong Su, Dalong Du, Chang Huang, and Philip HS Torr. Conditional random fields as recurrent neural networks. In Proceedings of the IEEE international conference on computer vision, pages 1529-1537, 2015. 3 \ No newline at end of file diff --git a/unifyingtrainingandinferenceforpanopticsegmentation/images.zip b/unifyingtrainingandinferenceforpanopticsegmentation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f6584a70051a41fa5db6e6848d2d06b9b36bc715 --- /dev/null +++ b/unifyingtrainingandinferenceforpanopticsegmentation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:364213d7c8c941a7e33fa11c23879eae4b8a3f6b5e302930a76f2893b597d5f1 +size 469472 diff --git a/unifyingtrainingandinferenceforpanopticsegmentation/layout.json b/unifyingtrainingandinferenceforpanopticsegmentation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d221066ec7936cca9a3f8ea48dcf4920cf09564c --- /dev/null +++ b/unifyingtrainingandinferenceforpanopticsegmentation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0725497a743df426ba6aeb18d541290577f882d2faaaab447b817fe9a25ba0ad +size 422991 diff --git a/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/34952467-afa7-4eec-b0d9-321a3e0d865d_content_list.json b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/34952467-afa7-4eec-b0d9-321a3e0d865d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..31da802381aed64c04f0c7d842c17e00787a16fd --- /dev/null +++ b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/34952467-afa7-4eec-b0d9-321a3e0d865d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ca832aec67c5c5c85e5c72ea70b492ffd36e51a957a7c32fc6d42b98b4993dd +size 74310 diff --git a/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/34952467-afa7-4eec-b0d9-321a3e0d865d_model.json b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/34952467-afa7-4eec-b0d9-321a3e0d865d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2a903209a050fa16977db67f3faf88e752b08f71 --- /dev/null +++ b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/34952467-afa7-4eec-b0d9-321a3e0d865d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e47002f429750ab3f176439ee47a89fc4796bf97f3ff3b01cfc0c33cc2126048 +size 88561 diff --git a/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/34952467-afa7-4eec-b0d9-321a3e0d865d_origin.pdf b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/34952467-afa7-4eec-b0d9-321a3e0d865d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..097c556161e2e21f15fffcda11630029fcb94a7f --- /dev/null +++ b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/34952467-afa7-4eec-b0d9-321a3e0d865d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0b075ad05ac8f98d03a7edd9c87d1444e01f125a04f86475e682730dca5d71f +size 1580524 diff --git a/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/full.md b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/full.md new file mode 100644 index 0000000000000000000000000000000000000000..df7a59aa0432532bd3ec38308bb1ae1c072549d9 --- /dev/null +++ b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/full.md @@ -0,0 +1,268 @@ +# Uninformed Students: Student-Teacher Anomaly Detection with Discriminative Latent Embeddings + +Paul Bergmann + +Michael Fauser + +David Sattlegger + +Carsten Steger + +MVtec Software GmbH + +www.mvtec.com + +{paul.bergmann, fauser, sattlegger, steger}@mvtec.com + +# Abstract + +We introduce a powerful student-teacher framework for the challenging problem of unsupervised anomaly detection and pixel-precise anomaly segmentation in high-resolution images. Student networks are trained to regress the output of a descriptive teacher network that was pretrained on a large dataset of patches from natural images. This circumvents the need for prior data annotation. Anomalies are detected when the outputs of the student networks differ from that of the teacher network. This happens when they fail to generalize outside the manifold of anomaly-free training data. The intrinsic uncertainty in the student networks is used as an additional scoring function that indicates anomalies. We compare our method to a large number of existing deep learning based methods for unsupervised anomaly detection. Our experiments demonstrate improvements over state-of-the-art methods on a number of real-world datasets, including the recently introduced MVtec Anomaly Detection dataset that was specifically designed to benchmark anomaly segmentation algorithms. + +# 1. Introduction + +Unsupervised pixel-precise segmentation of regions that appear anomalous or novel to a machine learning model is an important and challenging task in many domains of computer vision. In automated industrial inspection scenarios, it is often desirable to train models solely on a single class of anomaly-free images to segment defective regions during inference. In an active learning setting, regions that are detected as previously unknown by the current model can be included in the training set to improve the model's performance. + +Recently, efforts have been made to improve anomaly detection for one-class or multi-class classification [2, 3, 10, 11, 21, 28, 29]. However, these algorithms assume that anomalies manifest themselves in the form of images of an + +![](images/bd45bf127fa43a905ef41c22467e409a98d4baabe9a0d49e6fa8af53ff975f5a.jpg) +Figure 1: Qualitative results of our anomaly detection method on the MVtec Anomaly Detection dataset. Top row: Input images containing defects. Center row: Ground truth regions of defects in red. Bottom row: Anomaly scores for each image pixel predicted by our algorithm. + +entirely different class and a simple binary image-level decision whether an image is anomalous or not must be made. Little work has been directed towards the development of methods that can segment anomalous regions that only differ in a very subtle way from the training data. Bergmann et al. [7] provide benchmarks for several state-of-the-art algorithms and identify a large room for improvement. + +Existing work predominantly focuses on generative algorithms such as Generative Adversarial Networks (GANs) [31, 32] or Variational Autoencoders (VAEs) [5, 36]. These detect anomalies using per-pixel reconstruction errors or by evaluating the density obtained from the model's probability distribution. This has been shown to be problematic due to inaccurate reconstructions or poorly calibrated likelihoods [8, 22]. + +The performance of many supervised computer vision algorithms [16, 34] is improved by transfer learning, i.e. by using discriminative embeddings from pretrained networks. For unsupervised anomaly detection, such approaches have not been thoroughly explored so far. Recent work suggests that these feature spaces generalize well for anomaly detec + +![](images/d8ac4f917071d9fc8a764533a979d359548abee441a24c1c51e3e957baf0a5ec.jpg) +Figure 2: Schematic overview of our approach. Input images are fed through a teacher network that densely extracts features for local image regions. An ensemble of $M$ student networks is trained to regress the output of the teacher on anomaly-free data. During inference, the students will yield increased regression errors $e$ and predictive uncertainties $v$ in pixels for which the receptive field covers anomalous regions. Anomaly maps generated with different receptive fields can be combined for anomaly segmentation at multiple scales. + +tion and even simple baselines outperform generative deep learning approaches [10, 26]. However, the performance of existing methods on large high-resolution image datasets is hampered by the use of shallow machine learning pipelines that require a dimensionality reduction of the used feature space. Moreover, they rely on heavy training data subsampling since their capacity does not suffice to model highly complex data distributions with a large number of training samples. + +We propose to circumvent these limitations of shallow models by implicitly modeling the distribution of training features with a student-teacher approach. This leverages the high capacity of deep neural networks and frames anomaly detection as a feature regression problem. Given a descriptive feature extractor pretrained on a large dataset of patches from natural images (the teacher), we train an ensemble of student networks on anomaly-free training data to mimic the teacher's output. During inference, the students' predictive uncertainty together with their regression error with respect to the teacher are combined to yield dense anomaly scores for each input pixel. Our intuition is that students will generalize poorly outside the manifold of anomaly-free training data and start to make wrong predictions. Figure 1 shows qualitative results of our method when applied to images selected from the MVTec Anomaly Detection dataset [7]. A schematic overview of the entire anomaly detection process is given in Figure 2. Our main contributions are: + +- We propose a novel framework for unsupervised anomaly detection based on student–teacher learning. Local descriptors from a pretrained teacher network serve as surrogate labels for an ensemble of students. Our models can be trained end-to-end on large unlabeled image datasets and make use of all available training data. + +- We introduce scoring functions based on the students' predictive variance and regression error to obtain dense anomaly maps for the segmentation of anomalous regions in natural images. We describe how to extend our approach to segment anomalies at multiple scales by adapting the students' and teacher's receptive fields. +- We demonstrate state-of-the-art performance on three real-world computer vision datasets. We compare our method to a number of shallow machine learning classifiers and deep generative models that are fitted directly to the teacher's feature distribution. We also compare it to recently introduced deep learning based methods for unsupervised anomaly segmentation. + +# 2. Related Work + +There exists an abundance of literature on anomaly detection [27]. Deep learning based methods for the segmentation of anomalies strongly focus on generative models such as autoencoders [1, 8] or GANs [32]. These attempt to learn representations from scratch, leveraging no prior knowledge about the nature of natural images, and segment anomalies by comparing the input image to a reconstruction in pixel space. This can result in poor anomaly detection performance due to simple per-pixel comparisons or imperfect reconstructions [8]. + +# 2.1. Anomaly Detection with Pretrained Networks + +Promising results have been achieved by transferring discriminative embedding vectors of pretrained networks to the task of anomaly detection by fitting shallow machine learning models to the features of anomaly-free training data. Andrews et al. [3] use activations from different layers of a pretrained VGG network and model the anomaly-free training distribution with a $\nu$ -SVM. However, they only apply + +their method to image classification and do not consider the segmentation of anomalous regions. Similar experiments have been performed by Burlina et al. [10]. They report superior performance of discriminative embeddings compared to feature spaces obtained from generative models. + +Nazare et al. [24] investigate the performance of different off-the-shelf feature extractors pretrained on an image classification task for the segmentation of anomalies in surveillance videos. Their approach trains a 1-Nearest-Neighbor (1-NN) classifier on embedding vectors extracted from a large number of anomaly-free training patches. Prior to the training of the shallow classifier, the dimensionality of the network's activations is reduced using Principal Component Analysis (PCA). To obtain a spatial anomaly map during inference, the classifier must be evaluated for a large number of overlapping patches, which quickly becomes a performance bottleneck and results in rather coarse anomaly maps. Similarly, Napolitano et al. [23] extract activations from a pretrained ResNet-18 for a large number of cropped training patches and model their distribution using K-Means clustering after prior dimensionality reduction with PCA. They also perform strided evaluation of test images during inference. Both approaches sample training patches from the input images and therefore do not make use of all possible training features. This is necessary since, in their framework, feature extraction is computationally expensive due to the use of very deep networks that output only a single descriptor per patch. Furthermore, since shallow models are employed for learning the feature distribution of anomaly-free patches, the available training information must be strongly reduced. + +To circumvent the need for cropping patches and to speed up feature extraction, Sabokrou et al. [30] extract descriptors from early feature maps of a pretrained AlexNet in a fully convolutional fashion and fit a unimodal Gaussian distribution to all available training vectors of anomaly-free images. Even though feature extraction is achieved more efficiently in their framework, pooling layers lead to a down-sampling of the input image. This strongly decreases the resolution of the final anomaly map, especially when using descriptive features of deeper network layers with larger receptive fields. In addition, unimodal Gaussian distributions will fail to model the training feature distribution as soon as the problem complexity rises. + +# 2.2. Open-Set Recognition with Uncertainty Estimates + +Our work draws some inspiration from the recent success of open-set recognition in supervised settings such as image classification or semantic segmentation, where uncertainty estimates of deep neural networks have been exploited to detect out-of-distribution inputs using MC Dropout [14] or deep ensembles [19]. Seeboeck et al. [33] demonstrate that + +uncertainties from segmentation networks trained with MC Dropout can be used to detect anomalies in retinal OCT images. Beluch et al. [6] show that the variance of network ensembles trained on an image classification task serves as an effective acquisition function for active learning. Inputs that appear anomalous to the current model are added to the training set to quickly enhance its performance. + +Such algorithms, however, demand prior labeling of images by domain experts for a supervised task, which is not always possible or desirable. In our work, we utilize feature vectors of pretrained networks as surrogate labels for the training of an ensemble of student networks. The predictive variance together with the regression error of the ensemble's output mixture distribution is then used as a scoring function to segment anomalous regions in test images. + +# 3. Student-Teacher Anomaly Detection + +This section describes the core principles of our proposed method. Given a training dataset $\mathcal{D} = \{\mathbf{I}_1, \mathbf{I}_2, \dots, \mathbf{I}_N\}$ of anomaly-free images, our goal is to create an ensemble of student networks $S_i$ that can later detect anomalies in test images $\mathbf{J}$ . This means that they can assign a score to each pixel indicating how much it deviates from the training data manifold. For this, the student models are trained against regression targets obtained from a descriptive teacher network $T$ pretrained on a large dataset of natural images. After the training, anomaly scores can be derived for each image pixel from the students' regression error and predictive variance. Given an input image $\mathbf{I} \in \mathbb{R}^{w \times h \times C}$ of width $w$ , height $h$ , and number of channels $C$ , each student $S_i$ in the ensemble outputs a feature map $S_i(\mathbf{I}) \in \mathbb{R}^{w \times h \times d}$ . It contains descriptors $\mathbf{y}_{(r,c)} \in \mathbb{R}^d$ of dimension $d$ for each input image pixel at row $r$ and column $c$ . By design, we limit the students' receptive field, such that $\mathbf{y}_{(r,c)}$ describes a square local image region $\mathbf{p}_{(r,c)}$ of $\mathbf{I}$ centered at $(r,c)$ of side length $p$ . The teacher $T$ has the same network architecture as the student networks. However, it remains constant and extracts descriptive embedding vectors for each pixel of the input image $\mathbf{I}$ that serve as deterministic regression targets during student training. + +# 3.1. Learning Local Patch Descriptors + +We begin by describing how to efficiently construct a descriptive teacher network $T$ using metric learning and knowledge distillation techniques. In existing work for anomaly detection with pretrained networks, feature extractors only output single feature vectors for patch-sized inputs or spatially heavily downsampled feature maps [23, 30]. In contrast, our teacher network $T$ efficiently outputs descriptors for every possible square of side length $p$ within the input image. $T$ is obtained by first training a network $\hat{T}$ to embed patch-sized images $\mathbf{p} \in \mathbb{R}^{p \times p \times C}$ into a metric space of dimension $d$ using only convolution and max + +![](images/6467b98beb588517597cfcbcfed38f3277f8da42e81abb13c0bf7623aa82176a.jpg) +Figure 3: Pretraining of the teacher network $\hat{T}$ to output descriptive embedding vectors for patch-sized inputs. The knowledge of a powerful but computationally inefficient network $P$ is distilled into $\hat{T}$ by decoding the latent vectors to match the descriptors of $P$ . We also experiment with embeddings obtained using self-supervised metric learning techniques based on triplet learning. Information within each feature dimension is maximized by decorrelating the feature dimensions within a minibatch. + +pooling layers. Fast dense local feature extraction for an entire input image can then be achieved by a deterministic network transformation of $\hat{T}$ to $T$ as described in [4]. This yields significant speedups compared to previously introduced methods that perform patch-based strided evaluations. To let $\hat{T}$ output semantically strong descriptors, we investigate both self-supervised metric learning techniques as well as distilling knowledge from a descriptive but computationally inefficient pretrained network. A large number of training patches $\mathbf{p}$ can be obtained by random crops from any image database. Here, we use ImageNet [18]. + +Knowledge Distillation Patch descriptors obtained from deep layers of CNNs trained on image classification tasks perform well for anomaly detection when modeling their distribution with shallow machine learning models [23, 24]. However, the architectures of such CNNs are usually highly complex and computationally inefficient for the extraction of local patch descriptors. Therefore, we distill the knowledge of a powerful pretrained network $P$ into $\hat{T}$ by matching the output of $P$ with a decoded version of the descriptor obtained from $\hat{T}$ : + +$$ +\mathcal {L} _ {k} (\hat {T}) = \left\| D (\hat {T} (\mathbf {p})) - P (\mathbf {p}) \right\| ^ {2}. \tag {1} +$$ + +$D$ denotes a fully connected network that decodes the $d$ -dimensional output of $\hat{T}$ to the output dimension of the pretrained network's descriptor. + +Metric Learning If for some reason pretrained networks are unavailable, one can also learn local image descriptors in a fully self-supervised way [12]. Here, we investigate the performance of discriminative embeddings obtained using triplet learning. For every randomly cropped patch $\mathbf{p}$ , a triplet of patches $(\mathbf{p}, \mathbf{p}^{+}, \mathbf{p}^{-})$ is augmented. Positive patches $\mathbf{p}^{+}$ are obtained by small random translations around $\mathbf{p}$ , changes in image luminance, and the addition + +![](images/48e77a5f33d3c295f243941be76e67c2f8b7eb2d93fb7305a14588ff6540cfaf.jpg) +Figure 4: Embedding vectors visualized for ten samples of the MNIST dataset. Larger circles around the students' mean predictions indicate increased predictive variance. Being only trained on a single class of training images, the students manage to accurately regress the features solely for this class (green). They yield large regression errors and predictive uncertainties for images of other classes (red). Anomaly scores for the entire dataset are displayed in the bottom histogram. + +of Gaussian noise. The negative patch $\mathbf{p}^{-}$ is created by a random crop from a randomly chosen different image. In-triplet hard negative mining with anchor swap [37] is used as a loss function for learning an embedding sensitive to the $\ell_{2}$ metric + +$$ +\mathcal {L} _ {m} (\hat {T}) = \max \{0, \delta + \delta^ {+} - \delta^ {-} \}, \tag {2} +$$ + +where $\delta > 0$ denotes the margin parameter and in-triplet distances $\delta^{+}$ and $\delta^{-}$ are defined as: + +$$ +\delta^ {+} = \left| \left| \hat {T} (\mathbf {p}) - \hat {T} \left(\mathbf {p} ^ {+}\right) \right| \right| ^ {2} \tag {3} +$$ + +$$ +\delta^ {-} = \min \left\{\left| \left| \hat {T} (\mathbf {p}) - \hat {T} (\mathbf {p} ^ {-}) \right| \right| ^ {2}, \left| \left| \hat {T} (\mathbf {p} ^ {+}) - \hat {T} (\mathbf {p} ^ {-}) \right| \right| ^ {2} \right\} \tag {4} +$$ + +Descriptor Compactness As proposed by Vassileios et al. [35], we minimize the correlation between descriptors within one minibatch of inputs $\mathbf{p}$ to increase the descriptors' compactness and remove unnecessary redundancy: + +$$ +\mathcal {L} _ {c} (\hat {T}) = \sum_ {i \neq j} c _ {i j}, \tag {5} +$$ + +where $c_{ij}$ denotes the entries of the correlation matrix computed over all descriptors $\hat{T} (\mathbf{p})$ in the current minibatch. + +The final training loss for $\hat{T}$ is then given as + +$$ +\mathcal {L} (\hat {T}) = \lambda_ {k} \mathcal {L} _ {k} (\hat {T}) + \lambda_ {m} \mathcal {L} _ {m} (\hat {T}) + \lambda_ {c} \mathcal {L} _ {c} (\hat {T}), \qquad (6) +$$ + +where $\lambda_{k},\lambda_{m},\lambda_{c}\geq 0$ are weighting factors for the individual loss terms. Figure 3 summarizes the entire learning process for the teacher's discriminative embedding. + +# 3.2. Ensemble of Student Networks for Deep Anomaly Detection + +Next, we describe how to train student networks $S_{i}$ to predict the teacher's output on anomaly-free training data. We then derive anomaly scores from the students' predictive uncertainty and regression error during inference. First, the vector of component-wise means $\pmb{\mu} \in \mathbb{R}^{d}$ and standard deviations $\pmb{\sigma} \in \mathbb{R}^{d}$ over all training descriptors is computed for data normalization. Descriptors are extracted by applying $T$ to each image in the dataset $\mathcal{D}$ . We then train an ensemble of $M \geq 1$ randomly initialized student networks $S_{i}$ , $i \in \{1, \dots, M\}$ that possess the identical network architecture as the teacher $T$ . For an input image $\mathbf{I}$ , each student outputs its predictive distribution over the space of possible regression targets for each local image region $\mathbf{p}_{(r,c)}$ centered at row $r$ and column $c$ . Note that the students' architecture with limited receptive field of size $p$ allows us to obtain dense predictions for each image pixel with only a single forward pass, without having to actually crop the patches $\mathbf{p}_{(r,c)}$ . The students' output vectors are modeled as a Gaussian distribution $Pr(\mathbf{y}|\mathbf{p}_{(r,c)}) = \mathcal{N}(\mathbf{y}|\pmb{\mu}_{(r,c)}^{S_{i}}, s)$ with constant covariance $s \in \mathbb{R}$ , where $\pmb{\mu}_{(r,c)}^{S_{i}}$ denotes the prediction made by $S_{i}$ for the pixel at $(r,c)$ . Let $\mathbf{y}_{(r,c)}^{T}$ denote the teacher's respective descriptor that is to be predicted by the students. The log-likelihood training criterion $\mathcal{L}(S_{i})$ for each student network then simplifies to the squared $\ell_{2}$ -distance in feature space: + +$$ +\mathcal {L} \left(S _ {i}\right) = \frac {1}{w h} \sum_ {(r, c)} \left| \left| \boldsymbol {\mu} _ {(r, c)} ^ {S _ {i}} - \left(\mathbf {y} _ {(r, c)} ^ {T} - \boldsymbol {\mu}\right) \operatorname {d i a g} (\boldsymbol {\sigma}) ^ {- 1} \right| \right| _ {2} ^ {2}, \tag {7} +$$ + +where $\mathrm{diag}(\pmb{\sigma})^{-1}$ denotes the inverse of the diagonal matrix filled with the values in $\pmb{\sigma}$ . + +Scoring Functions for Anomaly Detection Having trained each student to convergence, a mixture of Gaussians can be obtained at each image pixel by equally weighting the ensemble's predictive distributions. From it, measures of anomaly can be obtained in two ways: First, we propose to compute the regression error of the mixture's mean $\pmb{\mu}_{(r,c)}$ with respect to the teacher's surrogate label: + +$$ +\begin{array}{l} e _ {(r, c)} = \left\| \boldsymbol {\mu} _ {(r, c)} - \left(\mathbf {y} _ {(r, c)} ^ {T} - \boldsymbol {\mu}\right) \operatorname {d i a g} (\boldsymbol {\sigma}) ^ {- 1} \right\| _ {2} ^ {2} (8) \\ = \left| \left| \frac {1}{M} \sum_ {i = 1} ^ {M} \boldsymbol {\mu} _ {(r, c)} ^ {S _ {i}} - (\mathbf {y} _ {(r, c)} ^ {T} - \boldsymbol {\mu}) \operatorname {d i a g} (\boldsymbol {\sigma}) ^ {- 1} \right| \right| _ {2} ^ {2}. (9) \\ \end{array} +$$ + +The intuition behind this score is that the student networks will fail to regress the teacher's output within anomalous regions during inference since the corresponding descriptors have not been observed during training. Note that $e_{(r,c)}$ is non-constant even for $M = 1$ , where only a single student is trained and anomaly scores can be efficiently obtained with + +only a single forward pass through the student and teacher network, respectively. + +As a second measure of anomaly, we compute for each pixel the predictive uncertainty of the Gaussian mixture as defined by Kendall et al. [14], assuming that the student networks generalize similarly for anomaly-free regions and differently in regions that contain novel information unseen during training: + +$$ +v _ {(r, c)} = \frac {1}{M} \sum_ {i = 1} ^ {M} \left\| \boldsymbol {\mu} _ {(r, c)} ^ {S _ {i}} \right\| _ {2} ^ {2} - \left\| \boldsymbol {\mu} _ {(r, c)} \right\| _ {2} ^ {2}. \tag {10} +$$ + +To combine the two scores, we compute the means $e_{\mu}, v_{\mu}$ and standard deviations $e_{\sigma}, v_{\sigma}$ of all $e_{(r,c)}$ and $v_{(r,c)}$ , respectively, over a validation set of anomaly-free images. Summation of the normalized scores then yields the final anomaly score: + +$$ +\tilde {e} _ {(r, c)} + \tilde {v} _ {(r, c)} = \frac {e _ {(r , c)} - e _ {\mu}}{e _ {\sigma}} + \frac {v _ {(r , c)} - v _ {\mu}}{v _ {\sigma}}. \tag {11} +$$ + +Figure 4 illustrates the basic principles of our anomaly detection method on the MNIST dataset, where images with label 0 were treated as the normal class and all other classes were treated as anomalous. Since the images of this dataset are very small, we extracted a single feature vector for each image using $\hat{T}$ and trained an ensemble of $M = 5$ patch-sized students to regress the teacher's output. This results in a single anomaly score for each input image. Feature descriptors were embedded into 2D using multidimensional scaling [9] to preserve their relative distances. + +# 3.3. Multi-Scale Anomaly Segmentation + +If an anomaly only covers a small part of the teacher's receptive field of size $p$ , the extracted feature vector predominantly describes anomaly-free traits of the local image region. Consequently, the descriptor can be predicted well by the students and anomaly detection performance will decrease. One could tackle this problem by downsampling the input image. This would, however, lead to an undesirable loss in resolution of the output anomaly map. + +Our framework allows for explicit control over the size of the students' and teacher's receptive field $p$ . Therefore, we can detect anomalies at various scales by training multiple student–teacher ensemble pairs with varying values of $p$ . At each scale, an anomaly map with the same size as the input image is computed. Given $L$ student–teacher ensemble pairs with different receptive fields, the normalized anomaly scores $\tilde{e}_{(r,c)}^{(l)}$ and $\tilde{v}_{(r,c)}^{(l)}$ of each scale $l$ can be combined by simple averaging: + +$$ +\frac {1}{L} \sum_ {l = 1} ^ {L} \left(\tilde {e} _ {(r, c)} ^ {(l)} + \tilde {v} _ {(r, c)} ^ {(l)}\right). \tag {12} +$$ + +
CategoryOurs p = 651-NNOC-SVMK-Means\( \ell_2-AE \)VAESSIM-AEAnoGANCNN-Feature Dictionary
TexturesCarpet0.6950.5120.3550.2530.4560.5010.6470.2040.469
Grid0.8190.2280.1250.1070.5820.2240.8490.2260.183
Leather0.8190.4460.3060.3080.8190.6350.5610.3780.641
Tile0.9120.8220.7220.7790.8970.8700.1750.1770.797
Wood0.7250.5020.3360.4110.7270.6280.6050.3860.621
ObjectsBottle0.9180.8980.8500.4950.9100.8970.8340.6200.742
Cable0.8650.8060.4310.5130.8250.6540.4780.3830.558
Capsule0.9160.6310.5540.3870.8620.5260.8600.3060.306
Hazelnut0.9370.8610.6160.6980.9170.8780.9160.6980.844
Metal nut0.8950.7050.3190.3510.8300.5760.6030.3200.358
Pill0.9350.7250.5440.5140.8930.7690.8300.7760.460
Screw0.9280.6040.6440.5500.7540.5590.8870.4660.277
Toothbrush0.8630.6750.5380.3370.8220.6930.7840.7490.151
Transistor0.7010.6800.4960.3990.7280.6260.7250.5490.628
Zipper0.9330.5120.3550.2530.8390.5490.6650.4670.703
Mean0.8570.6400.4790.4230.7900.6390.6940.4430.515
+ +Table 1: Results on the MVtec Anomaly Detection dataset. For each dataset category, the normalized area under the PRO-curve up to an average false positive rate per-pixel of $30\%$ is given. It measures the average overlap of each ground-truth region with the predicted anomaly regions for multiple thresholds. The best-performing method for each dataset category is highlighted in boldface. + +# 4. Experiments + +To demonstrate the effectiveness of our approach, an extensive evaluation on a number of datasets is performed. We measure the performance of our student-teacher framework against existing pipelines that use shallow machine learning algorithms to model the feature distribution of pretrained networks. To do so, we compare to a K-Means classifier, a One-Class SVM (OC-SVM), and a 1-NN classifier. They are fitted to the distribution of the teacher's descriptors after prior dimensionality reduction using PCA. We also experiment with deterministic and variational autoencoders as deep distribution models over the teacher's discriminative embedding. The $\ell_2$ -reconstruction error [13] and reconstruction probability [2] are used as the anomaly score, respectively. We further compare our method to recently introduced generative and discriminative deep learning based anomaly detection models and report improved performance over the state of the art. We want to stress that the teacher has not observed images of the evaluated datasets during pretraining to avoid an unfair bias. + +As a first experiment, we perform an ablation study to find suitable hyperparameters. Our algorithm is applied to a one-class classification setting on the MNIST [20] and CIFAR-10 [17] datasets. We then evaluate on the much more challenging MVTec Anomaly Detection (MVTec AD) dataset, which was specifically designed to benchmark algorithms for the segmentation of anomalous regions. It provides over 5000 high-resolution images divided into ten object and five texture categories. To highlight the benefit + +of our multi-scale approach, an additional ablation study is performed on MVTec AD, which investigates the impact of different receptive fields on the anomaly detection performance. + +For our experiments, we use identical network architectures for the student and teacher networks, with receptive field sizes $p \in \{17, 33, 65\}$ . All architectures are simple CNNs with only convolutional and max-pooling layers, using leaky rectified linear units with slope $5 \times 10^{-3}$ as activation function. Table 4 shows the specific architecture used for $p = 65$ . For $p = 17$ and $p = 33$ , similar architectures are given in our supplementary material. + +For the pretraining of the teacher networks $\hat{T}$ , triplets augmented from the ImageNet dataset are used. Images are zoomed to equal width and height sampled from $\{4p, 4p + 1, \dots, 16p\}$ and a patch of side length $p$ is cropped at a random location. A positive patch $\mathbf{p}^{+}$ for each triplet is then constructed by randomly translating the crop location within the interval $\{-\frac{p - 1}{4}, \dots, \frac{p - 1}{4}\}$ . Gaussian noise with standard deviation 0.1 is added to $\mathbf{p}^{+}$ . All images within a triplet are randomly converted to grayscale with a probability of 0.1. For knowledge distillation, we extract 512-dimensional feature vectors from the fully connected layer of a ResNet-18 that was pretrained for classification on the ImageNet dataset. For network optimization, we use the Adam optimizer [15] with an initial learning rate of $2 \times 10^{-4}$ , a weight decay of $10^{-5}$ , and a batch size of 64. Each teacher network outputs descriptors of dimension $d = 128$ and is trained for $5 \times 10^{4}$ iterations. + +![](images/df2b80a87cf51aa5aae1a982f95f7aae8b97f096ce81e631085ac630f1fdb3f5.jpg) +Figure 5: Anomaly detection at multiple scales: Architectures with receptive field of size $p = 17$ manage to accurately segment the small scratch on the capsule (top row). However, defects at a larger scale such as the missing imprint (bottom row) become problematic. For increasingly larger receptive fields, the segmentation performance for the larger anomaly increases while it decreases for the smaller one. Our multiscale architecture mitigates this problem by combining multiple receptive fields. + +# 4.1. MNIST and CIFAR-10 + +Before considering the problem of anomaly segmentation, we evaluate our method on the MNIST and CIFAR-10 datasets, adapted for one-class classification. Five students are trained on only a single class of the dataset, while during inference images of the other classes must be detected as anomalous. Each image is zoomed to the students' and teacher's input size $p$ and a single feature vector is extracted by passing it through the patch-sized networks $\hat{T}$ and $\hat{S}_i$ . We examine different teacher networks by varying the weights $\lambda_k, \lambda_m, \lambda_c$ in the teacher's loss function $\mathcal{L}(\hat{T})$ . The patch size for the experiments in this subsection is set to $p = 33$ . As a measure of anomaly detection performance, the area under the ROC curve is evaluated. Shallow and deep distributions models are trained on the teacher's descriptors of all available in-distribution samples. We additionally report numbers for OCGAN [25], a recently proposed generative model directly trained on the input images. Detailed information on training parameters for all methods on this dataset is found in our supplementary material. + +
MethodMNISTCIFAR-10
OCGAN [25]0.97500.6566
1-NN0.97530.8189
KMeans0.94570.7592
OC-SVM0.94630.7388
l2-AE0.98320.7898
VAE0.95350.7502
OursLkLmLc0.99350.8196
✓✓
Ours✓✓✓0.99260.8035
Ours✓✓0.99350.7940
Ours✓0.99170.8021
+ +Table 2: Results on MNIST and CIFAR-10. For each method, the average area under the ROC curve is given, computed across each dataset category. For our algorithm, we evaluate teacher networks trained with different loss functions. $\checkmark$ corresponds to setting the respective loss weight to 1, otherwise it is set to 0. + +Table 2 shows our results. Our approach outperforms the other methods for a variety of hyperparameter settings. Distilling the knowledge of the pretrained ResNet-18 into the teacher's descriptor yields slightly better performance than training the teacher in a fully self-supervised way using triplet learning. Reducing descriptor redundancy by minimizing the correlation matrix yields improved results. On average, shallow models and autoencoders fitted to our teacher's feature distribution outperform OCGAN but do not reach the performance of our approach. Since for 1-NN, every single training vector can be stored, it performs exceptionally well on these small datasets. On average, however, our method still outperforms all evaluated approaches. + +# 4.2. MVTec Anomaly Detection Dataset + +For all our experiments on MVTec AD, input images are zoomed to $w = h = 256$ pixels. We train on anomaly-free images for 100 epochs with batch size 1. This is equivalent to training on a large number of patches per batch due to the limited size of the networks' receptive field. We use Adam with initial learning rate $10^{-4}$ and weight decay $10^{-5}$ . Teacher networks were trained with $\lambda_{k} = \lambda_{c} = 1$ and $\lambda_{m} = 0$ , as this configuration performed best on MNIST and CIFAR-10. Ensembles contain $M = 3$ students. + +To train shallow classifiers on the teacher's output descriptors, a subset of vectors is randomly sampled from the teacher's feature maps. Their dimension is then reduced by PCA, retaining $95\%$ of the variance. The variational and deterministic autoencoders are implemented using a simple fully connected architecture and are trained on all available descriptors. In addition to fitting the models directly to the teacher's feature distribution, we benchmark our approach against the best performing deep learning based methods presented by Bergmann et al. [7] on this dataset. These methods include the CNN-Feature Dictionary [23], the SSIM-Autoencoder [8], and AnoGAN [32]. All hyperparameters are listed in detail in our supplementary material. + +
Categoryp = 17p = 33p = 65Multiscale
TexturesCarpet0.7950.8930.6950.879
Grid0.9200.9490.8190.952
Leather0.9350.9560.8190.945
Tile0.9360.9500.9120.946
Wood0.9430.9290.7250.911
ObjectsBottle0.8140.8900.9180.931
Cable0.6710.7640.8650.818
Capsule0.9350.9630.9160.968
Hazelnut0.9710.9650.9370.965
Metal nut0.8910.9280.8950.942
Pill0.9310.9590.9350.961
Screw0.9150.9370.9280.942
Toothbrush0.9460.9440.8630.933
Transistor0.5400.6110.7010.666
Zipper0.8480.9420.9330.951
Mean0.8660.9000.8570.914
+ +Table 3: Performance of our algorithm on the MVTec AD dataset for different receptive field sizes $p$ . Combining anomaly scores across multiple receptive fields shows increased performance for many of the dataset's categories. We report the normalized area under the PRO curve up to an average false-positive rate of $30\%$ . + +We compute a threshold-independent evaluation metric based on the per-region-overlap (PRO), which weights ground-truth regions of different size equally. This is in contrast to simple per-pixel measures, such as ROC, for which a single large region that is segmented correctly can make up for many incorrectly segmented small ones. It was also used by Bergmann et al. in [7]. For computing the PRO metric, anomaly scores are first thresholded to make a binary decision for each pixel whether an anomaly is present or not. For each connected component within the ground truth, the relative overlap with the thresholded anomaly region is computed. We evaluate the PRO value for a large number of increasing thresholds until an average per-pixel false-positive rate of $30\%$ for the entire dataset is reached and use the area under the PRO curve as a measure of anomaly detection performance. Note that for high false-positive rates, large parts of the input images would be wrongly labeled as anomalous and even perfect PRO values would no longer be meaningful. We normalize the integrated area to a maximum achievable value of 1. + +Table 1 shows our results training each algorithm with a receptive field of $p = 65$ for comparability. Our method consistently outperforms all other evaluated algorithms for almost every dataset category. The shallow machine learning algorithms fitted directly to the teacher's descriptors after applying PCA do not manage to perform satisfactorily for most of the dataset categories. This shows that their capacity does not suffice to accurately model the large number of available training samples. The same can be observed for the CNN-Feature Dictionary. As it was the case in our previous experiment on MNIST and CIFAR + +
LayerOutput SizeParameters
KernelStride
Input65×65×3
Conv161×61×1285×51
MaxPool30×30×1282×22
Conv226×26×1285×51
MaxPool13×13×1282×22
Conv39×9×1285×51
MaxPool4×4×2562×22
Conv41×1×2564×41
Conv51×1×1283×31
Decode1×1×5121×11
+ +Table 4: General outline of our network architecture for training teachers $\hat{T}$ with receptive field size $p = 65$ . Leaky rectified linear units with slope $5 \times 10^{-3}$ are applied as activation functions after each convolution layer. Architectures for $p = 17$ and $p = 33$ are given in our supplementary material. + +10, 1-NN yields the best results amongst the shallow models. Utilizing a large number of training features together with deterministic autoencoders increases the performance, but still does not match the performance of our approach. Current generative methods for anomaly segmentation such as Ano-GAN and the SSIM-autoencoder perform similar to the shallow methods fitted to the discriminative embedding of the teacher. This indicates that there is indeed a gap between methods that learn representations for anomaly detection from scratch and methods that leverage discriminative embeddings as prior knowledge. + +Table 3 shows the performance of our algorithm for different receptive field sizes $p \in \{17, 33, 65\}$ and when combining multiple scales. For some objects, such as bottle and cable, larger receptive fields yield better results. For others, such as wood and toothbrush, the inverse behavior can be observed. Combining multiple scales enhances the performance for many of the dataset categories. A qualitative example highlighting the benefit of our multi-scale anomaly segmentation is visualized in Figure 5. + +# 5. Conclusion + +We have proposed a novel framework for the challenging problem of unsupervised anomaly segmentation in natural images. Anomaly scores are derived from the predictive variance and regression error of an ensemble of student networks, trained against embedding vectors from a descriptive teacher network. Ensemble training can be performed end-to-end and purely on anomaly-free training data without requiring prior data annotation. Our approach can be easily extended to detect anomalies at multiple scales. We demonstrate improvements over current state-of-the-art methods on a number of real-world computer vision datasets for one-class classification and anomaly segmentation. + +# References + +[1] D. Abati, A. Porrello, S. Calderara, and R. Cucchiara. Latent space autoregression for novelty detection. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 481-490, June 2019. +[2] Jinwon An and Sungzoon Cho. Variational Autoencoder based Anomaly Detection using Reconstruction Probability. SNU Data Mining Center, Tech. Rep., 2015. +[3] Jerone TA Andrews, Thomas Tanay, Edward J Morton, and Lewis D Griffin. Transfer Representation-Learning for Anomaly Detection. In *Anomaly Detection Workshop at ICML2016*, 2016. +[4] Christian Bailer, Tewodros A Habtegebrial, Kiran Varanasi, and Didier Stricker. Fast Dense Feature Extraction with CNNs that have Pooling or Striding Layers. In *British Machine Vision Conference (BMVC)*, 2017. +[5] Christoph Baur, Benedikt Wiestler, Shadi Albarqouni, and Nassir Navab. Deep Autoencoding Models for Unsupervised Anomaly Segmentation in Brain MR Images. arXiv preprint arXiv:1804.04488, 2018. +[6] William H. Beluch, Tim Genewein, Andreas Nurnberger, and Jan M. Kohler. The power of ensembles for active learning in image classification. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[7] Paul Bergmann, Michael Fauser, David Sattlegger, and Carsten Steger. MVtec AD – A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 9592–9600, 2019. +[8] Paul Bergmann, Sindy Löwe, Michael Fauser, David Sattegger, and Carsten Steger. Improving Unsupervised Defect Segmentation by Applying Structural Similarity to Autoencoders. Proceedings of the 14th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications, February 2019. +[9] Ingwer Borg and Patrick Groenen. Modern multidimensional scaling: Theory and applications. Journal of Educational Measurement, 40(3):277-280, 2003. +[10] Philippe Burlina, Neil Joshi, and I-Jeng Wang. Where's Wally Now? Deep Generative and Discriminative Embeddings for Novelty Detection. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[11] Raghavendra Chalopathy, Aditya Krishna Menon, and Sanjay Chawla. Anomaly detection using one-class neural networks. arXiv preprint arXiv:1802.06360, 2018. +[12] Dov Danon, Hadar Averbuch-Elor, Ohad Fried, and Daniel Cohen-Or. Unsupervised natural image patch learning. Computational Visual Media, 5(3):229-237, Sep 2019. +[13] Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 2, pages 1735-1742. IEEE, 2006. +[14] Alex Kendall and Yarin Gal. What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision? In Advances in Neural Information Processing Systems 30, pages 5574-5584, 2017. + +[15] Diederik P Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. 3rd International Conference for Learning Representations, 2015. +[16] Simon Kornblith, Jonathon Shlens, and Quoc V. Le. Do better imagenet models transfer better? In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[17] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. +[18] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet Classification With Deep Convolutional Neural Networks. In Advances in Neural Information Processing Systems, pages 1097-1105, 2012. +[19] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles. In Advances in Neural Information Processing Systems 30, pages 6402-6413, 2017. +[20] Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010. +[21] Marc Masana, Idoia Ruiz, Joan Serrat, Joost van de Weijer, and Antonio M Lopez. Metric Learning for Novelty and Anomaly Detection. In British Machine Vision Conference (BMVC), 2018. +[22] Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Gorur, and Balaji Lakshminarayanan. Do Deep Generative Models Know What They Don't Know? arXiv preprint arXiv:1810.09136, 2018. +[23] Paolo Napoletano, Flavio Piccoli, and Raimondo Schettini. Anomaly Detection in Nanofibrous Materials by CNN-Based Self-Similarity. Sensors, 18(1):209, 2018. +[24] Tiago S Nazare, Rodrigo F de Mello, and Moacir A Ponti. Are pre-trained cnns good feature extractors for anomaly detection in surveillance videos? arXiv preprint arXiv:1811.08495, 2018. +[25] Pramuditha Perera, Ramesh Nallapati, and Bing Xiang. OCGAN: One-class novelty detection using GANs with constrained latent representations. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[26] Pramuditha Perera and Vishal M. Patel. Deep transfer learning for multiple class novelty detection. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[27] Marco AF Pimentel, David A Clifton, Lei Clifton, and Lionel Tarassenko. A review of novelty detection. Signal Processing, 99:215-249, 2014. +[28] Alina Roitberg, Ziad Al-Halah, and Rainer Stiefelhagen. Informed democracy: Voting-based novelty detection for action recognition. In 29th British Machine Vision Conference: BMVC 2018, Northumbria University, Newcastle, UK, 3-6 September 2018. BMVA Press, Durham, 2019. +[29] Lukas Ruff, Robert Vandermeulen, Nico Goernitz, Lucas Deecke, Shoaib Ahmed Siddiqui, Alexander Binder, Emmanuel Müller, and Marius Kloft. Deep one-class classification. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning + +Research, pages 4393-4402, Stockholmmässan, Stockholm Sweden, 10-15 Jul 2018. PMLR. +[30] Mohammad Sabokrou, Mohsen Fayyaz, Mahmood Fathy, Zahra Moayed, and Reinhard Klette. Deep-anomaly: Fully convolutional neural network for fast anomaly detection in crowded scenes. Computer Vision and Image Understanding, 172:88-97, 2018. +[31] Thomas Schlegl, Philipp Seebock, Sebastian M Waldstein, Georg Langs, and Ursula Schmidt-Erfurth. f-AnoGAN: Fast unsupervised anomaly detection with generative adversarial networks. Medical image analysis, 54:30-44, 2019. +[32] Thomas Schlegl, Philipp Seebock, Sebastian M Waldstein, Ursula Schmidt-Erfurth, and Georg Langs. Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery. In International Conference on Information Processing in Medical Imaging, pages 146-157. Springer, 2017. +[33] Philipp Seebock, José Ignacio Orlando, Thomas Schlegl, Sebastian M Waldstein, Hrvoje Bogunovic, Sophie Klimscha, Georg Langs, and Ursula Schmidt-Erfurth. Exploiting Epistemic Uncertainty of Anatomy Segmentation for Anomaly Detection in Retinal OCT. IEEE transactions on medical imaging, 2019. +[34] Ruoqi Sun, Xinge Zhu, Chongruo Wu, Chen Huang, Jianping Shi, and Lizhuang Ma. Not all areas are equal: Transfer learning for semantic segmentation via hierarchical region selection. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[35] Yurun Tian, Bin Fan, and Fuchao Wu. L2-Net: Deep Learning of Discriminative Patch Descriptor in Euclidean Space. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 6128–6136, 2017. +[36] A. Vasilev, V. Golkov, M. Meissner, I. Lipp, E. Sgarlata, V. Tomassini, D.K. Jones, and D. Cremers. q-Space Novelty Detection with Variational Autoencoders. MICCAI 2019 International Workshop on Computational Diffusion MRI, 2019. +[37] Daniel Ponsa Vassileios Balntas, Edgar Riba and Krystian Mikolajczyk. Learning local feature descriptors with triplets and shallow convolutional neural networks. In Edwin R. Hancock Richard C. Wilson and William A. P. Smith, editors, Proceedings of the British Machine Vision Conference (BMVC), pages 119.1-119.11. BMVA Press, September 2016. \ No newline at end of file diff --git a/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/images.zip b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7f5fc70b6361993c163d11d340488a493d84a9c3 --- /dev/null +++ b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18e0d09667e2d615cfcf04d8500112d1ea6a55e41b8c5022c1986d589f23eb89 +size 526391 diff --git a/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/layout.json b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a658ccc2f8cc823b6f665fc4fddc09bbe4a8b596 --- /dev/null +++ b/uninformedstudentsstudentteacheranomalydetectionwithdiscriminativelatentembeddings/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd58baf711c30aa4412b5495291e2d7ce0a0b9f77eece04ae8c5150ea6f6ab3c +size 379784 diff --git a/uniposeunifiedhumanposeestimationinsingleimagesandvideos/039f4d6c-2bc3-4119-97b7-69d9ed190f22_content_list.json b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/039f4d6c-2bc3-4119-97b7-69d9ed190f22_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fdb568b8eaadca759d18705f8c2027b304af3ecb --- /dev/null +++ b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/039f4d6c-2bc3-4119-97b7-69d9ed190f22_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8864985db5f7ae4ffe3bfe1ecdce44910ada8125dc5586dfd622cec8d245aef +size 80855 diff --git a/uniposeunifiedhumanposeestimationinsingleimagesandvideos/039f4d6c-2bc3-4119-97b7-69d9ed190f22_model.json b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/039f4d6c-2bc3-4119-97b7-69d9ed190f22_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9be918a92d31512271eeb0077ca001952e799ff7 --- /dev/null +++ b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/039f4d6c-2bc3-4119-97b7-69d9ed190f22_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f516110f825b1d28eb421c41dc18762ba057ec103356687a02af4c49c8c12ea +size 98549 diff --git a/uniposeunifiedhumanposeestimationinsingleimagesandvideos/039f4d6c-2bc3-4119-97b7-69d9ed190f22_origin.pdf b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/039f4d6c-2bc3-4119-97b7-69d9ed190f22_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..77fde51864e44471c8d197e440890ef2696e64bc --- /dev/null +++ b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/039f4d6c-2bc3-4119-97b7-69d9ed190f22_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8dacad752e1520b191cedf395ad6a0bcaf148197e29443190bbf36e531dfdbda +size 925923 diff --git a/uniposeunifiedhumanposeestimationinsingleimagesandvideos/full.md b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/full.md new file mode 100644 index 0000000000000000000000000000000000000000..975cff498946849ba511b22e047bfd2a4ff6fcae --- /dev/null +++ b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/full.md @@ -0,0 +1,381 @@ +# UniPose: Unified Human Pose Estimation in Single Images and Videos + +Bruno Artacho + +Andreas Savakis + +Rochester Institute of Technology Rochester, NY + +bmartacho@mail.rit.edu + +andreas.savakis@rit.edu + +# Abstract + +We propose UniPose, a unified framework for human pose estimation, based on our "Waterfall" Atrous Spatial Pooling architecture, that achieves state-of-art-results on several pose estimation metrics. UniPose incorporates contextual segmentation and joint localization to estimate the human pose in a single stage, with high accuracy, without relying on statistical postprocessing methods. The Waterfall module in UniPose leverages the efficiency of progressive filtering in the cascade architecture, while maintaining multi-scale fields-of-view comparable to spatial pyramid configurations. Additionally, our method is extended to UniPose-LSTM for multi-frame processing and achieves state-of-the-art results for temporal pose estimation in Video. Our results on multiple datasets demonstrate that UniPose, with a ResNet backbone and Waterfall module, is a robust and efficient architecture for pose estimation obtaining state-of-the-art results in single person pose detection for both single images and videos. + +# 1. Introduction + +Human pose estimation is an important task in computer vision with applications in activity recognition [54], human computer interaction [44], animation [4], gaming [42], health [10], and sports [51]. The importance of pose estimation has motivated the development of several approaches, in 2D [50], [49], [31], [46] and 3D [41], [59], [1]; on a single frame [5] or a video sequence [15]; for a single [52] or multiple subjects [8]. + +Pose estimation is challenging due to the large number of degrees of freedom in the human body mechanics and the frequent occurrence of parts occlusion. To overcome problems with occlusion, many methods rely on statistical and geometric models to estimate occluded joints [34], [32]. Another approach is the utilization of a library of known poses, known as anchor poses [41], but this could limit the generalization power of the model and the ability to learn for unforeseen poses. + +![](images/478074503fff344bd716d629bdc403babc96ad796d2570401ea4fb23e9291ddb.jpg) + +![](images/26f6f7580f2bd7505effb442a5ea4c251aa81fa5f2aa1a0324ad79089f128a38.jpg) + +![](images/bab079eb3902be47d7ab02e3578739a88182ceb928e29f0458bd64b26a814e41.jpg) + +![](images/ab1ea3a5930e7694d0a1b565f75ab96460e1f5bfbea73a40f2753ef518e6e2e3.jpg) +Figure 1. Pose estimation examples with our UniPose method. + +![](images/a2ec8a884862fa2fd2815b9033c2f4da11fc0cf32c4b745e9aedc9d99d4e2058.jpg) + +![](images/c634aac1077586373872094ce637b4542b1388e5de23aa6b3124b9fa8d701152.jpg) + +Motivated by advances in semantic segmentation architectures [14], [56], [36], we propose a unified pose estimation framework, called UniPose, that consists of only one stage and obtains accurate results without postprocessing. A main component of our architecture is the Waterfall Atrous Spatial Pooling (WASP) module [3] which combines the cascaded approach for Atrous Convolution with the larger FOV obtained from parallel configuration from the Atrous Spatial Pyramid Pooling (ASPP) module [13]. + +Our unified approach predicts the location of joints using contextual information due to the larger Field-of-View (FOV) and multi-scale approach used in our network. With our contextual approach, our network includes the information of the entire frame and, therefore, does not require post analysis based on statistical or geometric methods. Examples of pose estimation obtained with our UniPose method are shown in Figure 1. The main contributions of this paper are the following. + +- We propose the UniPose framework, based on the Waterfall module for Atrous Spatial Pooling that achieves state-of-the-art results for single person human pose estimation. +- Our Waterfall module increases the receptive field of + +the network by combining the benefits of cascade atrous convolutions with multiple FOV in a parallel architecture inspired by the spatial pyramid approach. + +- The proposed UniPose method determines both the locations of joints and the bounding box for person detection, eliminating the need for separate branches in the network. +- We extend the Waterfall based approach to UniPoseLSTM by adopting a linear sequential LSTM configuration and obtain state-of-the-art results for temporal human pose estimation in video. + +# 2. Related Work + +Traditional methods for human pose estimation focused on the detection of joints, and consequently pose, via techniques that explored the geometry between joints in the target image [38], [55], and [48]. In recent years, methods relying on Convolutional Neural Networks (CNNs) achieved superior results [46], [8], [41]. The popular Convolutional Pose Machine (CPM) [52] took an approach that refined joint detection via a set of stages in the network. Stacked hourglass networks [31] utilized cascades of the hourglass structure for the pose estimation task. Building upon [52], Yan et al. integrated the concept of Part Affinity Fields (PAF), resulting in the OpenPose method [8]. PAF uses the detection of more significant joints to better estimate the prediction of less significant joints. This innovation allowed advances toward multi-person detection with decreased complexity and computational power. + +The multi-context approach in [16] relies on an hourglass backbone to perform pose estimation. The original backbone is augmented by the Hourglass Residual Units (HRU) with the goal of increasing the receptive FOV. Post processing with Conditional Random Fields (CRF) is used to assemble the relations between detected joints. However, the drawback of CRF is increased complexity that requires high computational power and results in a reduction in speed. + +The High-Resolution Network (HRNet) [46] includes both high and low resolution representations. Starting with high resolution, the method gradually adds low resolution sub-networks to form more stages, and performs multi-scale fusion between sub-networks. HRNet benefits from the larger FOV of multi resolution, a capability that we achieve in a simpler fashion with our WASP module. An analogous approach is used by Multi-Stage Pose Network (MSPN) [26], where the HRNet structure is combined with cross stage feature aggregation and coarse-to-fine supervision. + +DeepPose [50] utilizes a cascade of deep CNNs and locates body joints via regression. The method relies on iterative refinement in order to better predict symmetric and lower confidence joints. + +Some recent works attempt to leverage contextual information into pose estimation. The Cascade Prediction Fusion (CPF) [57] uses graphical components in order to exploit the context for pose estimation. Similarly, the Cascade Feature Aggregation (CFA) [45] aims to use semantic information to detect pose with a cascade approach. Generative Adversarial Networks (GANs) were used in [9] to learn dependencies and contextual information for pose. + +The Location, Classification, and Regression network (LCR-Net) [41] extends pose estimation to 3D space via depth regression. LCR-Net relies on a Detector backbone [19] for the detection of human joint locations. From these locations, the method finds the best fit to predefined anchor poses for the detected human poses. Finally, LCR-Net performs a regression to estimate 3D coordinates in the image. A drawback of this method is the limited set of anchor poses available, which impose a limitation on the network for the estimation of unforeseen poses. + +In a different approach for 3D pose estimation, the MonoCap method for human capture [59] couples a CNN with a geometric prior in order to statistically determine the third dimension for the pose using the Expectation-Maximization algorithm. + +A drawback of some current methods is that they require an independent branch for the detection of the bounding box of human subjects in the frame. LightTrack [33], for instance, relies on a separate YOLO [40] architecture to perform the detection of subjects prior to detecting joints. In a different framework, LCR-Net [41] has different branches for the detection using Detector [19] and the arrangement of joints during classification. + +# 2.1. Temporal Pose Estimation + +For the task of pose estimation in videos, most methods do not account for the temporal component and process each frame independently. An additional challenge is the occasional blurring resulting from the movement of the humans in the video. The main incentive for developing a pose estimation method that takes into account the temporal component is to better estimate joints during blurring or occlusion using information from previous frames. + +Targeting video applications, Modeep [23] utilized color channels from adjacent frames as input attempting to merge the motion in the video. Pfister et al. [37] also proposed a similar technique to detect gestures in a video sequence. + +More recently, optical flow techniques were adopted to tackle the temporal component for pose estimation. Deepflow [53] used optical flow to better connect predictions between frames in a more continuous detection. Another method that utilized optical flow is Thin-Slicing [43], relying on both optical flow and spatial-temporal model. However, the increased complexity of this model results in a significant increase in computational cost. + +![](images/f1e2c1afaa5db00588e93f38800628bcd05ef92cb6cc13e646dacead318ddedd.jpg) +Figure 2. UniPose architecture for single frame pose detection. The input color image of dimensions (HxW) is fed through the ResNet backbone and WASP module to obtain 256 feature channels at reduced resolution by a factor of 8. The decoder module generates K heatmaps, one per joint, at the original resolution, and the locations of the joints are determined by a local max operation. + +The Chained Model [20] utilizes recurrent networks to incorporate the temporal component. A similar concept was adopted by the LSTM Pose Machine [30] approach, where the LSTM was used to augment memory in the network. + +Applications of LSTM aren't limited to the temporal component. Recurrent 3D Pose Sequence Machines (RSPM) [27] used LSTMs in the regression from 2D to 3D, to obtain better correspondence during the regression. + +# 2.2. Pose Estimation for Sign Language + +Despite the efforts on generic pose estimation methods, specific applications, such as for sign language, are currently lacking in research. Charles et al. [11] estimated pose during signing in long television broadcasting videos. The method relied on an initial separation from the background by the use of semantic segmentation, followed by a random forest regression to locate the upper limbs of the signer. The work in [6] used temporal tracking in order to detect parts and estimate upper body joints in similar frames. + +DeepSign [18] applied transfer learning on a pretrained CNN for joint detection during sign language. Their approach followed the work done by [50] in generic pose images and incorporated application specific transfer learning in the final architecture. + +# 2.3. Atrous Convolution and ASPP + +An important challenge with both semantic segmentation and pose estimation methods incorporating CNN layers is the significant reduction of resolution caused by pooling. Fully Convolutional Networks (FCN) [29] [29] addressed the resolution reduction problem by deploying upsampling strategies across deconvolution layers. These attempt to reverse the convolution operation and increase the feature map size back to the dimensions of the original image. + +A popular technique in semantic segmentation is the use of dilated or Atrous or dilated convolutions [13]. The main objectives of Atrous convolutions are to increase the size of the receptive fields in the network, avoid downsampling, and generate a multi-scale framework for processing. + +In the simpler case of a one-dimensional convolution, the output of the signal is defined as follows: + +$$ +y [ i ] = \sum_ {l = 1} ^ {L} x [ i + r l ] \cdot w [ l ] \tag {1} +$$ + +where $r$ is the rate of dilation, $\omega [l]$ is the filter of length $L$ , $x[i]$ is the input, and $y[i]$ is the output. A rate value of one results in a regular convolution operation. + +Motivated by the success of the Spatial Pyramids applied on pooling operations [21], the ASPP architecture was successfully incorporated in DeepLab [13] for semantic segmentation. The ASPP approach assembles atrous convolutions in four parallel branches with different rates, that are combined by fast bilinear interpolation with an additional factor of eight. This configuration recovers the feature maps in the original image resolution. The increase in resolution and FOV in the ASPP network can be beneficial for a contextual detection of body parts during pose estimation. We leverage this capability in a more efficient manner with our Waterfall architecture in the UniPose framework. + +# 3. UniPose Architecture + +We propose UniPose, a unified architecture for pose estimation, that exploits the large FOV generated by atrous convolutions combined with cascade of convolutions in a "Waterfall" configuration. Our WASP module offers multiscale representations as well as efficiency in the reduced size of the network. Improving upon previous works, UniPose does not require separate branches for bounding box and joint detections. Instead, it performs a unified detection of the bounding box for the human subject and its joints. + +The UniPose processing pipeline is shown in Figure 2. The input image is initially fed into a deep CNN, in this case ResNet-101, with the final layers replaced by a WASP module. The resultant feature maps are processed by a decoder network that generated K heatmaps, one for each joint, with the corresponding probability distributions obtained from Softmax. Then the decoder performs bilinear + +![](images/431e67157b4b9768a4396752630f7439eabaf1d52ab8cd8c468a9897bc600114.jpg) +Figure 3. Decoder module used in the UniPose pipeline. The original image dimensions are (1280x720). The inputs to the decoder are 256 channels of ResNet low level features and 256 channels of the WASP feature maps. The output of the decoder is K heatmaps corresponding to K joints, shown in the image example. Additionally, the decoder outputs heatmaps for the bounding box (not shown in the image). + +interpolation to recover the original resolution, followed by a local max operation to localize the joints for pose estimation. The decoder in our network generates detections of joints for both visible and occluded parts. Additionally, the decoder generates a bounding box detection without the use of post-processing or independent parallel branches. + +We next provide the motivation for the development of the WASP module [3] and contrast it with traditional deconvolutions in [29] and the ASPP architecture in [13]. + +![](images/1cf61cce03f2385e663d15564751ec1f1aa57ddb464cfce872cd46226336d346.jpg) +Figure 4. Waterfall architecture in the WASP module [3]. The original image dimensions are (1280x720). The inputs to the WASP module are 1280 channels of ResNet features maps. + +# 3.1. WASP Module + +The WASP module generates an efficient multi-scale representation that helps UniPose achieve state-of-the-art results. The WASP architecture, shown in Figure 4, is designed to leverage both the larger FOV of the ASPP configuration and the reduced size of the cascade approach. Ini + +tially applied by [3] for semantic segmentation, the inspiration for WASP was to combine the benefits of the ASPP [13], Cascade [14], and Res2Net [17] modules. + +WASP relies on atrous convolutions, which are fundamental to ASPP, to maintain a large FOV. It also performs a cascade of atrous convolutions at increasing rates to gain efficiency, a concept motivated by the cascade approach. Furthermore, WASP incorporates multi-scale features inspired by the Res2Net architecture and other multi-scale approaches. In contrast to ASPP and Res2Net, WASP does not immediately parallelize the input stream. Instead, it creates a waterfall flow by first processing through a filter and then creating a new branch. WASP also goes beyond the cascade approach by combining the streams from all its branches and average pooling of the original input to achieve a multiscale representation. + +WASP is designed with the goal of reducing the number of parameters in order to deal with memory constraints and overcome the main limitation of atrous convolutions. The four branches in WASP have different FOV and are arranged in a waterfall-like fashion. The atrous convolutions in WASP start with a small rate of 6, which consistently increases in subsequent branches (rates of 6,12,18,24). This configuration gains efficiency due to the smaller filter sizes, and creates multi-scale features with each branch that are combined to obtain a richer representation. The WASP module is utilized in the UniPose architecture of Figure 2 for pose estimation. + +# 3.2.Decoder Module + +Our decoder module converts the score maps resulting from the WASP module to heatmaps corresponding to body joints and the bounding box. Figure 3 shows the decoder architecture for an input color image of size $(1280\times 720)$ . The decoder receives 256 feature maps from WASP and 256 low + +![](images/d54df43471825922389639a0e41874ecca03b9e013f9e8f3f1c570e23ab5d988.jpg) +Figure 5. UniPose-LSTM architecture for pose estimation in videos. The joint heatmaps from the decoder of UniPose are fed into the LSTM along with the final heatmaps from the previous LSTM state. The convolutional layers following the LSTM reorganize the outputs into the final heatmaps used for joint localization. + +level feature maps from the first block of the ResNet backbone. After a max pooling operation to match the dimensions of the inputs, the feature maps are concatenated and processed through convolutional layers, dropout layers, and a final bilinear interpolation to resize to the original input size. The output consists of K heatmaps corresponding to K joints that are used for joint localization after a local max operation. Additionally, the decoder outputs heatmaps for the bounding box without requiring an additional branch. + +# 3.3. UniPose-LSTM for Pose Estimation in Video + +The UniPose architecture was modified to UniPoseLSTM for pose estimation in video. For video processing, it is useful to leverage the similarities and temporal correlations between consecutive frames. + +To operate in video processing mode, the UniPose architecture is augmented by an LSTM module that receives the final heatmaps from the previous frame along with the decoder heatmaps from the current frame. The pipeline of UniPose-LSTM is shown in Figure 5. This network includes CNN layers following the LSTM to generate the final heatmaps used for joint detection. + +The UniPose-LSTM configuration allows the network to use information from the previously processed frames, without significantly increasing the total size of the network. For both the single image and video configurations, our network uses identical ResNet-101 backbone, WASP module, and decoder. We evaluated the performance benefits due to the temporal length of the memory component, when using an LSTM for several frames. It was experimentally determined that accuracy improves when incorporating up to 5 frames in the LSTM, and a plateau in accuracy was observed for additional frames. + +# 4. Datasets + +We performed experiments on four datasets. Two of the datasets are composed of single images: Leeds Sports Pose (LSP) [24] and MPII [2]; and two datasets are composed of + +video sequences: Penn Action [58] and BBC Pose [12]. A brief description of these datasets is provided below. + +The Leeds Sports Pose (LSP) dataset [24] was initially used for single person pose estimation. Images for LSP were collected from Flickr for a variety of individuals performing sports activities. The dataset is composed of 1,000 images for training and 1,000 images for testing with 14 labelled keypoints in the entire body. The LSP dataset includes lower variation in the data, allowing a good initial assessment of the network performance for the task of single person pose estimation. + +The MPII [2] dataset contains approximately 25,000 images of annotated body joints of over 40,000 subjects. The images are collected from YouTube videos in 410 everyday human activities. The dataset contains frames with 2D and 3D joints annotations, head and torso orientations, and body part occlusions. Another feature of the MPII dataset is that it contains previous and following frames, although it lacks labelling for those frames. + +Penn Action [58] dataset contains 2,326 video sequences of 15 different activities including different sports, athletic activities, and playing instruments. The dataset was used to evaluate the performance of our architecture for temporal pose estimation and joint tracking, i.e., the estimation of pose in a frame while contextually using previous detections to refine the result. + +The BBC Pose dataset [12] consists of 20 videos from the British Broadcasting Corporation (BBC) with the presence of a British Sign Language (BSL) signer. The BBC Pose dataset was utilized for the specialized application of human pose for sign language. The dataset includes of 610,115 labelled images for training, 309,171 for validation, and 309,260 for testing. As a limitation of the dataset, the labels consist of only 7 keypoints in the human upper body including head, shoulders, elbows, and wrists. + +# 4.1. Data Pre-Processing + +In order to train our network for joint detection, a preprocessing step was performed. Ideal Gaussian maps were + +generated at the locations of joints in the ground truth labels. These maps are more effective for training than single points at the joint locations, and they are used to train our UniPose network to generate Gaussian heatmaps corresponding to the location of each joint in the frame. + +Gaussians with different $\sigma$ values were considered in the training of the network to evaluate their effectiveness. For the presented results and final analysis, a value of $\sigma = 3$ was adopted, resulting in a well defined Gaussian curve for both the ground truth and predicted outputs. This value of $\sigma$ also allows enough separation between joints in the image. + +# 5. Experiments + +We performed training, validation and testing of UniPose based on the procedures and metrics described in this section. Compared to state of the art, our methods achieved superior performance in several datasets, for both single frame pose estimation with UniPose and video pose estimation with UniPose-LSTM, including the specific task of pose estimation on sign language videos. + +# 5.1. Metrics + +For the evaluation of UniPose, various datasets and metrics were used, depending on previously reported results and the available ground truth for each dataset. Some datasets, such as LSP [24], report and compare accuracy in Percentage of Correct Parts (PCP), where a limb is considered detected if the distance of its two predicted joints is below a threshold. In this paper, we adopted a threshold of half the distance of the ground truth limb, commonly referred as PCP@0.5. The PCP method introduces a bias due to the stronger penalization for the detection of smaller limbs (i.e. arm in comparison to torso), since they naturally have a shorter distance, and consequently a smaller threshold for detection. + +Another metric used is the Percentage of Correct Keypoints (PCK). This metric considers the prediction of a keypoint correct when a joint detection lies within a certain threshold distance of the ground truth. Two commonly used thresholds were adopted. The first is PCK@0.2, which refers to a threshold of $20\%$ of the torso diameter, and the second is PCKh@0.5, which refers to a threshold of $50\%$ of the head diameter. + +# 5.2. Simulation Parameters + +We input the native resolution of the input image without resizing, in order to train the network with the most detail possible through our dense and large FOV network. For that reason, the batch size utilized varied from high amounts for lower resolution datasets (e.g. LSP) to smaller batches of 4 for datasets such as the BBC Pose [12]. + +We experimented with different rates of dilation on the WASP module. We found that larger rates result in better + +prediction. A set of dilation rates of $r = \{6, 12, 18, 24\}$ was selected for the WASP module. + +We calculate the learning rate based on the step method, where the learning rate started at $10^{-4}$ and was reduced progressively by an order of magnitude at each step [28]. All experiments were performed using PyTorch 1.0 on Ubuntu 16.04. The workstation has an Intel i5-2650 2.20GHz CPU with 16GB of RAM and an NVIDIA Tesla V100 GPU. + +# 6. Results + +We initially tested our network on the LSP dataset and compared the results with other methods, as shown in Table 1. UniPose achieved a PCP of $72.8\%$ and a PCK@0.2 of $94.5\%$ , showing significant gains in comparison to other approaches in both metrics. Differently than methods such as CPM [52], UniPose is able to detect the body joints with high confidence in a single iteration, instead of going through several stages or iterations in the network. + +Examples of pose estimation for subjects from LSP dataset are shown in Figure 6. It is noticeable from these examples that our method identifies the location of symmetric body joints with high precision. Challenging conditions include the detection of joints in limbs that are not sufficiently separated and occlude each other. + +
MethodPCP for LSPPCK@0.2 for LSP
UniPose (ours)72.8%94.5%
Cao et al. [9]-94.3%
8-Stack HG [57]-94.0%
Part Regression [7]-90.7%
CPM [52]-90.5%
DeepCut [39]-87.1%
Recurrent [5]-85.2%
DeepPose [50]61%-
Poselet [38]56%-
Tian et al.[48]56%-
+ +Table 1. Pose estimation results and comparison with other methods for the LSP dataset. + +We next perform training and testing in the larger MPII dataset [2], focusing on single person detection. Since the MPII images may contain multiple people, we used the center map of the main person in order to detect the pose of the correct individual. We used "Detectron2" [19] for segmentation and detection of all the individuals, followed by the UniPose method to detect pose of the selected individual. + +Table 2 shows the results for the MPII testing dataset. UniPose achieves a PCKh detection rate of $92.7\%$ and outperformed other methods for single person pose estimation. + +Examples of pose estimation with UniPose in the MPII dataset are shown in Figure 7. These examples illustrate + +![](images/745aef0d9196c14305126ed9538a1ab63da5063926a35eeb7b4eea8d85876776.jpg) + +![](images/ee90accdeb395de6d97e572783b88dc59346a3e6880af6c714e7b627a0dc5f69.jpg) + +![](images/2f2ace20e52b804f6a1c392df9bda129ce00f09fc0a4b2ead9d1b7a95ab87b25.jpg) + +![](images/25e1f7db10ca6ade0fae70b3e0c34a8d44e782bf7e1602a13144cce0dc969629.jpg) +Figure 6. Pose estimation examples from the LSP dataset + +![](images/bef1c8b21857adbc133e6fea113250970ec3f305ef276871589b0d74a18c4339.jpg) + +![](images/e73868e6590373ab5068dbc6ac758bfba4f5c5b32d0d5f23a0eb5bdd9423c836.jpg) + +that UniPose deals effectively with occlusion, e.g. in the case of the horse rider. + +
MethodPCKh@0.5 for MPII
UniPose (ours)92.7%
MSPN [26]92.6%
8-Stack HG [57]92.5%
Deeply-Learned Models [47]92.3%
Cao et al. [9]92.3%
Structure-Aware [25]92.0%
Improvement Multi-Stage [45]90.1%
CFA [45]90.0%
CPM [52]88.5%
+ +![](images/333c8a02a4663420a0adf434127acebc5fd09a97dd9523ed6e03e1e97290af65.jpg) + +![](images/84d4d6d2c0f42230459c2dc4eb222a1fec20b591543b0bcf3220139218066733.jpg) + +![](images/a8739b7a6c9ef2630ed72b219dd0091745e875f445eddb820425ec2c0fca6629.jpg) + +![](images/694866c485c31daf7a3f72e46e605c56f2e09b005779b8045b7b3d8973f9f718.jpg) + +![](images/2f55e64e39ffc6cc3dda4acd5ffc6b0ff0c58794add3d5077e939b883cad9aab.jpg) + +![](images/4b1df60b908ef0c59a191bbded9151b7586e7253e1b5017cd5ac8a91146031b6.jpg) + +![](images/b4ad798ed2ee3d7f717bb8865cc62d33540dea59f66caf89f44955aceff88251.jpg) +Figure 7. Pose estimation examples from the MPII dataset + +![](images/a085754ec667439e756e9d3b3a755eda33f6f1338b8992799051a9892ec9b5a4.jpg) + +![](images/5ec0a7382ec838a647588156b9d2fbee1b1c9cd5250adc18ad62ad577cd5f645.jpg) + +Table 3 shows the results for our UniPose-LSTM in the Penn Action dataset [58]. Our results show a significant improvement over previous state-of-the-art methods by the application of UniPose-LSTM in the temporal mode with 5 consecutive frames. For this dataset, the results are reported as a correct detection when the predicted joint location lies within the provided bounding box, following the same procedure proposed by [55] and applied by [30]. Our method results in a $99.3\%$ detection rate, an improvement of $1.6\%$ over the next best result. + +Table 2. Pose estimation results and comparisons with other methods for the MPII dataset. + +
MethodPCK for Penn Action
UniPose-LSTM (ours)99.3%
LSTM-PM [30]97.7%
CPM [52]97.1%
Thin-Slicing [43]96.5%
N-best [35]91.8%
Iqbal [22]81.1%
+ +Our UniPose network leverages the memory capability of the LSTM by incorporating 5 consecutive frames. This feature enables a higher detection rate and consequently a more robust architecture against motion blur and occlusions in the image. + +We experimented with different numbers of frames to evaluate the memory capability associated with the use of the LSTM. Table 4 shows the accuracy gains observed from implementing LSTM for a number of frames ranging from 1 to 6. It is noticeable that the accuracy gains obtained by the LSTM plateaus as the number of frames reaches values of 5 or larger. + +Examples of detections for the Penn Action dataset [58] are shown in Figure 8. The examples selected are of fast motion scenarios, showing every other frame in sequence, so that significant differences are observed between frames. + +Table 3. Pose estimation results and comparisons with other methods for the Penn Action dataset. + +
Number of frames in LSTMPCK for Penn Action
198.4%
298.6%
398.8%
499.1%
599.3%
699.3%
+ +Table 4. UniPose-LSTM results for the Penn Action dataset for different number of frames used by the LSTM. + +Table 5 shows results for the BBC Pose dataset, where pose is detected specifically for sign language. UniPose + +![](images/c0b9dd3159c42777449a06902664cce779200fae49054fd599dfd26f2562ec4a.jpg) + +![](images/f5f57b4f77b550fe7ae60751382db9353aeb9a371ce8c46c935b5df18c0acd18.jpg) + +![](images/9c588e36732c6fe927200d77ecec499cdb51be2a07b62d5b2790a3b4c67e9a7c.jpg) + +![](images/0f63e2befe0274ad2e71c24227835d298de0feaeb7733c032961be18436bf8b6.jpg) + +![](images/37fef96f815b7416d68a0631772c2850620f649a63b6691e08439ccf687911fc.jpg) + +![](images/b97dd356d46889ca5d810e9390beee448513353fc53253b6268c3f27abea0785.jpg) +Figure 8. Pose estimation examples from the Penn Action dataset for a sequence of frames. + +![](images/12e9525c7391e8cedd71124470eadda23af96f201d78eeee550d9d848f66ff06.jpg) + +![](images/75e10a433c386e95119768bef4403b5fababbe5eff2af5f852f0fdca0a780694.jpg) + +![](images/3bdaf4c968a00693a5ff77a5ff9217cfc3993c7ee96d402de1cdb61801fe1b80.jpg) + +![](images/19d8f1c7d870b5d3f45b90c03d9cbec13d05e14da5f4e8183d921536ceafed8d.jpg) + +LSTM significantly outperforms the older methods by achieving a PCKh of $98.9\%$ . In order to obtain results from another method for comparison, we trained CPM for the BBC Pose dataset, obtaining a PCK of $97.6\%$ , which is below the performance of UniPose-LSTM. + +
MethodPCKh@0.5 +for BBC Pose
UniPose-LSTM (ours)98.9%
CPM [52]97.6%
Charles et al. [11]74.9%
Buehler et al. [6]67.5%
+ +Table 5. Pose estimation results and comparisons with other methods for the BBC Pose dataset + +Figure 9 shows examples of pose estimation and bounding box detections for subjects in the BBC dataset. Detections are shown for every other frame to illustrate different poses in the sequence. Our network is able to efficiently detect the pose of the signers as well as generate the bounding box containing their signing area. + +# 7. Conclusion + +We presented the UniPose framework for pose estimation in single images and videos, respectively. The UniPose pipeline utilizes the WASP module that features a waterfall flow with a cascade of atrous convolutions and multi-scale representations. The large FOV of WASP obtains a better interpretation of the contextual information in the frame, and contributes to more accurate pose estimation. + +The results of UniPose and UniPose-LSTM demonstrated state-of-the-art performance on several datasets, i.e., + +![](images/ae06549761f4266b6f9ef67736b113c263579b77c3ca1d773bbb9e98edd3dbae.jpg) + +![](images/a71c01a0783a1f44bb644c8895f3b19a55af95fdd659c1b7b17d01932ee86ca5.jpg) + +![](images/9b9a6fcbbeaa946b2c4a00ccacd441ee68687e7b467ca6cdbe70398aac7d0046.jpg) + +![](images/0b010faaca961b39a37104ebe364171d138a743be5aedc797fe87f15af055864.jpg) +Figure 9. Pose estimation examples from BBC Pose dataset for a sequence of frames. + +![](images/0370f403b3c125e6131601e997be28ccdabb6295eedc49b5e57fb4d109cdf7db.jpg) + +![](images/fa436cb9a635c629246fd5aed9ddab5b20a6b86d015306ce4a83435c913300c7.jpg) + +LSP, MPII, Penn Action and BBC Pose, using various metrics. Our framework shows promise for further use in a broader range of applications, including multiple person pose detection and 3D pose estimation. + +# 8. Acknowledgements + +This research was supported in part by the National Science Foundation grant #1749376. + +# References + +[1] Riza Alp Guler, Natalia Neverova, and Iasonas Kokkinos. Densepose: Dense human pose estimation in the wild. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7297-7306, 2018. 1 + +[2] Mykhaylo Andriluka, Leonid Pishchulin, Peter Gehler, and Bernt Schiele. 2d human pose estimation: New benchmark and state of the art analysis. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. 5, 6 +[3] Bruno Artacho and Andreas Savakis. Waterfall atrous spatial pooling architecture for efficient semantic segmentation. Sensors, 19(24):5361, 2019. 1, 4 +[4] Angelos Barmpoutis. Tensor body: Real-time reconstruction of the human body and avatar synthesis from RGB-D. IEEE transactions on cybernetics, 43(5):1347-1356, 2013. 1 +[5] Vasileios Belagiannis and Andrew Zisserman. Recurrent human pose estimation. In 2017 12th IEEE International Conference on Automatic Face & Gesture Recognition (FG 2017), pages 468-475. IEEE, 2017. 1, 6 +[6] Patrick Buehler, Mark Everingham, Daniel P Huttenlocher, and Andrew Zisserman. Upper body detection and tracking in extended signing sequences. International Journal of Computer Vision, 95(2):180, 2011. 3, 8 +[7] Adrian Bulat and Georgios Tzimiropoulos. Human pose estimation via convolutional part heatmap regression. In European Conference on Computer Vision, pages 717-732. Springer, 2016. 6 +[8] Z. Cao, T. Simon, S. E. Wei, and Y. Sheikh. Realtime multiperson 2D pose estimation using part affinity fields. IEEE Computer Vision and Pattern Recognition, 2017. 1, 2 +[9] Zhongzheng Cao, Rui Wang, Xiangyang Wang, Zhi Liu, and Xiaogiang Zhu. Improving human pose estimation with self-attention generative adversarial networks. In 2019 IEEE International Conference on Multimedia & Expo Workshops (ICMEW), pages 567-572. IEEE, 2019. 2, 6, 7 +[10] Yao-Jen Chang, Shu-Fang Chen, and Jun-Da Huang. A Kinect-based system for physical rehabilitation: A pilot study for young adults with motor disabilities. Research in developmental disabilities, 32(6):2566-2570, 2011. 1 +[11] James Charles, Tomas Pfister, Mark Everingham, and Andrew Zisserman. Automatic and efficient human pose estimation for sign language videos. International Journal of Computer Vision, 110(1):70-90, 2014. 3, 8 +[12] J. Charles, T. Pfister, D. Magee, D. Hogg, and A. Zisserman. Personalizing human video pose estimation. In IEEE Conference on Computer Vision and Pattern Recognition, 2016. 5, 6 +[13] L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and L. Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution and fully connected cfrs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(4):834-845, 2018. 1, 3, 4 +[14] L.-C. Chen, G. Papandreou, F. Schroff, and H. Adam. Rethinking atrous convolution for semantic image segmentation. CoRR, abs/1706.05587, 2017. 1, 4 +[15] Yu Cheng, Bo Yang, Bo Wang, Wending Yan, and Robby T. Tan. Occlusion-aware networks for 3d human pose estimation in video. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 1 +[16] Xiao Chu, Wei Yang, Wanli Ouyang, Cheng Ma, Alan L Yuille, and Xiaogang Wang. Multi-context attention for human pose estimation. In Proceedings of the IEEE Conference + +on Computer Vision and Pattern Recognition, pages 1831-1840, 2017. 2 +[17] Shang-Hua Gao, Ming-Ming Cheng, Kai Zhao, Xin-Yu Zhang, Ming-Hsuan Yang, and Philip Torr. Res2net: A new multi-scale backbone architecture. CoRR, abs/1904.01169, 2019. 4 +[18] Srujana Gattupalli, Amir Ghaderi, and Vassilis Athitsos. Evaluation of deep learning based pose estimation for sign language recognition. In Proceedings of the 9th ACM International Conference on PErvasive Technologies Related to Assistive Environments, page 12. ACM, 2016. 3 +[19] Ross Girshick, Ilija Radosavovic, Georgia Gkioxari, Piotr Dollár, and Kaiming He. Detector, 2018. 2, 6 +[20] G. Gkioxari, A. Toshev, and N. Jaitly. Chained predictions using convolutional neural networks. In arXiv preprint arXiv:1605.02346, 2016. 3 +[21] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. CoRR, abs/1406.4729, 2014. 3 +[22] Umar Iqbal, Martin Garbade, and Juergen Gall. Pose for action - action for pose. IEEE Conference on Automatic Face and Gesture Recognition (FG'17), 2017. 7 +[23] Arjun Jain, Jonathan Thompson, Yann LeCun, and Christoph Bregler. Modeep: A deep learning framework using motion features for human pose estimation. In *Asian conference on computer vision*, pages 302–315. Springer, 2014. 2 +[24] Sam Johnson and Mark Everingham. Clustered pose and nonlinear appearance models for human pose estimation. In Proceedings of the British Machine Vision Conference, 2010. doi:10.5244/C.24.12.5, 6 +[25] Lipeng Ke, Ming-Ching Chang, Honggang Qi, and Siwei Lyu. Multi-scale structure-aware network for human pose estimation. In The European Conference on Computer Vision (ECCV), September 2018. 7 +[26] Wenbo Li, Zhicheng Wang, Binyi Yin, Qixiang Peng, Yuming Du, Tianzi Xiao, Gang Yu, Hongtao Lu, Yichen Wei, and Jian Sun. Rethinking on multi-stage networks for human pose estimation. arXiv preprint arXiv:1901.00148, 2019. 2, 7 +[27] Mude Lin, Liang Lin, Xiaodan Liang, Keze Wang, and Hui Cheng. Recurrent 3d pose sequence machines. CoRR, abs/1707.09695, 2017. 3 +[28] Wei Liu, Andrew Rabinovich, and Alexander C. Berg. Parsenet: Looking wider to see better. CoRR, abs/1506.04579, 2015. 6 +[29] J. Long, E. Shelhamer, and T. Darrel. Fully convolutional networks for semantic segmentation. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 3, 4 +[30] Yue Luo, Jimmy S. J. Ren, Zhouxia Wang, Wenxiu Sun, Jinshan Pan, Jianbo Liu, Jiahao Pang, and Liang Lin. LSTM pose machines. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), abs/1712.06316, 2018. 3, 7 +[31] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. In European Conference on Computer Vision, pages 483-499. Springer, 2016. 1, 2 + +[32] Aiden Nibali, Zhen He, Stuart Morgan, and Luke Prendergast. 3d human pose estimation with 2d marginal heatmaps. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 1477-1485. IEEE, 2019. 1 +[33] Guanghan Ning and Heng Huang. Lighttrack: A generic framework for online top-down human pose tracking. arXiv preprint arXiv:1905.02822, 2019. 2 +[34] George Papandreou, Tyler Zhu, Liang-Chieh Chen, Spyros Gidaris, Jonathan Tompson, and Kevin Murphy. Personlab: Person pose estimation and instance segmentation with a bottom-up, part-based, geometric embedding model. In The European Conference on Computer Vision (ECCV), September 2018. 1 +[35] Dennis Park and Deva Ramanan. N-best maximal decoders for part models. ICCV, 2011. 7 +[36] Adam Paszke, Abhishek Chaurasia, Sanggil Kim, and Eugenio Culurciello. Enet: A deep neural network architecture for real-time semantic segmentation. CoRR, abs/1606.02147, 2016. 1 +[37] Tomas Pfister, Karen Simonyan, James Charles, and Andrew Zisserman. Deep convolutional neural networks for efficient pose estimation in gesture videos. In *Asian Conference on Computer Vision*, pages 538–552. Springer, 2014. 2 +[38] Leonid Pishchulin, Mykhaylo Andriluka, Peter Gehler, and Bernt Schiele. Poselet conditioned pictorial structures. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 588-595, 2013. 2, 6 +[39] Leonid Pishchulin, Eldar Insafutdinov, Siyu Tang, Bjoern Andres, Mykhaylo Andriluka, Peter V Gehler, and Bernt Schiele. Deepcut: Joint subset partition and labeling for multi person pose estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4929-4937, 2016. 6 +[40] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. arXiv, 2018. 2 +[41] Gregory Rogez, Philippe Weinzaepfel, and Cordelia Schmid. LCR-Net: Localization-classification-regression for human pose. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, United States, 2017. 1, 2 +[42] J. Shotton, R. Girshick, A. Fitzgibbon, T. Sharp, M. Cook, M. Finocchio, R. Moore, P. Kohli, A. Criminisi, A. Kipman, and A. Blake. Efficient human pose estimation from single depth images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2012. 1 +[43] Jie Song, Limin Wang, Luc Van Gool, and Otmar Hilliges. Thin-slicing network: A deep structured model for pose estimation in videos. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2, 7 +[44] Yale Song, David Demirdjian, and Randall Davis. Continuous body and hand gesture recognition for natural human-computer interaction. ACM Transactions on Interactive Intelligent Systems (TiiS), 2(1):5, 2012. 1 +[45] Zhihui Su, Ming Ye, Guohui Zhang, Lei Dai, and Jianda Sheng. Cascade feature aggregation for human pose estimation. arXiv preprint arXiv:1902.07837, 2019. 2, 7 +[46] Ke Sun, Bin Xiao, Dong Liu, and Jingdong Wang. Deep high-resolution representation learning for human pose esti + +mation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2 +[47] Wei Tang, Pei Yu, and Ying Wu. Deeply learned compositional models for human pose estimation. In The European Conference on Computer Vision (ECCV), September 2018. 7 +[48] Yuandong Tian, C Lawrence Zitnick, and Srinivasa G Narasimhan. Exploring the spatial hierarchy of mixture models for human pose estimation. In European Conference on Computer Vision, pages 256-269. Springer, 2012. 2, 6 +[49] Jonathan Thompson, Ross Goroshin, Arjun Jain, Yann LeCun, and Christoph Bregler. Efficient object localization using convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 648-656, 2015. 1 +[50] Alexander Toshev and Christian Szegedy. Deeppose: Human pose estimation via deep neural networks. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 1653-1660, 2014. 1, 2, 3, 6 +[51] Luis Unzueta, Jon Goenetxea, Mikel Rodriguez, and Maria Teresa Linaza. dependent 3d human body posing for sports legacy recovery from images and video. In 2014 22nd European Signal Processing Conference (EUSIPCO), pages 361-365. IEEE, 2014. 1 +[52] Shih-En Wei, V. Ramakrishna, T. Kanade, and Y. Sheikh. Convolutional pose machines. IEEE Conference on Computer Vision and Pattern Recognition, 2016. 1, 2, 6, 7, 8 +[53] Philippe Weinzaepfel, Jerome Revaud, Zaid Harchaoui, and Cordelia Schmid. Deepflow: Large displacement optical flow with deep matching. In Proceedings of the IEEE International Conference on Computer Vision, pages 1385-1392, 2013. 2 +[54] Sijie Yan, Yuanjun Xiong, and Dahua Lin. Spatial temporal graph convolutional networks for skeleton-based action recognition. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 1 +[55] Yi Yang and Deva Ramanan. Articulated human detection with flexible mixtures of parts. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(12):2878-2890, 2012. 2, 7 +[56] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. *ICLR*, 2016. 1 +[57] Hong Zhang, Hao Ouyang, Shu Liu, Xiaojuan Qi, Xiaoyong Shen, Ruigang Yang, and Jiaya Jia. Human pose estimation with spatial contextual information. arXiv preprint arXiv:1901.01760, 2019. 2, 6, 7 +[58] Weiyu Zhang, Menglong Zhu, and Konstantinos G Derpanis. From actemes to action: A strongly-supervised representation for detailed action understanding. pages 2248-2255, 2013. 5, 7 +[59] Xiaowei Zhou, Menglong Zhu, Georgios Pavlakos, Spyridon Leonardos, Konstantinos G. Derpanis, and Kostas Daniilidis. Monocap: Monocular human motion capture using a CNN coupled with a geometric prior. CoRR, abs/1701.02354, 2017. 1, 2 \ No newline at end of file diff --git a/uniposeunifiedhumanposeestimationinsingleimagesandvideos/images.zip b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..afe25a989165d4ee3d97dcad1d52033be6c8204f --- /dev/null +++ b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dda49f0c94d1f43a17bb181a9d9103e5f441140c3dcdd99b85b066a44ca6ea72 +size 622420 diff --git a/uniposeunifiedhumanposeestimationinsingleimagesandvideos/layout.json b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3f0fecab8e22ca33daf33764990483c5616db965 --- /dev/null +++ b/uniposeunifiedhumanposeestimationinsingleimagesandvideos/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82c96299d755f5668d2a65d5d8997f15ed79d969732071c94d0ff84955d8c56e +size 381884 diff --git a/unitystyletransferforpersonreidentification/1bf0dc26-466a-4c1a-9efc-b2c08ee9f6af_content_list.json b/unitystyletransferforpersonreidentification/1bf0dc26-466a-4c1a-9efc-b2c08ee9f6af_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cd0cfc968391caf1805fd79bcc7f1b96fccaff33 --- /dev/null +++ b/unitystyletransferforpersonreidentification/1bf0dc26-466a-4c1a-9efc-b2c08ee9f6af_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1307ce07accbf96fa34fcdd52ab15a4784f45886672f40e3a4ca5830fbaf832 +size 69646 diff --git a/unitystyletransferforpersonreidentification/1bf0dc26-466a-4c1a-9efc-b2c08ee9f6af_model.json b/unitystyletransferforpersonreidentification/1bf0dc26-466a-4c1a-9efc-b2c08ee9f6af_model.json new file mode 100644 index 0000000000000000000000000000000000000000..15ea3b295659b449f877b1c0272ae96885ffce15 --- /dev/null +++ b/unitystyletransferforpersonreidentification/1bf0dc26-466a-4c1a-9efc-b2c08ee9f6af_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f525c836d2dc0f25b91da24a6fe0af09d0a29ea29ea2b93a40576a6617b14b33 +size 88118 diff --git a/unitystyletransferforpersonreidentification/1bf0dc26-466a-4c1a-9efc-b2c08ee9f6af_origin.pdf b/unitystyletransferforpersonreidentification/1bf0dc26-466a-4c1a-9efc-b2c08ee9f6af_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2a233a5e3a1bdd7ae1dd77e7aa71a32d1c6d2529 --- /dev/null +++ b/unitystyletransferforpersonreidentification/1bf0dc26-466a-4c1a-9efc-b2c08ee9f6af_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:114bca2ca4524a850f9acb3f80c3bdfa8697c8f8fd068059a9b5044337239768 +size 1092973 diff --git a/unitystyletransferforpersonreidentification/full.md b/unitystyletransferforpersonreidentification/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c64fdc429efb71892ce6291eca7f9b40842614db --- /dev/null +++ b/unitystyletransferforpersonreidentification/full.md @@ -0,0 +1,332 @@ +# Unity Style Transfer for Person Re-Identification + +Chong Liu 1,2 + +Xiaojun Chang + +Yi-Dong Shen $^{1*}$ + +1 State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, China + +2 University of Chinese Academy of Sciences, Beijing 100049, China + +3 Monash University, Melbourne, Australia + +liuchong@ios.ac.cn, cxj273@gmail.com, ydshen@ios.ac.cn + +# Abstract + +Style variation has been a major challenge for person re-identification, which aims to match the same pedestrians across different cameras. Existing works attempted to address this problem with camera-invariant descriptor subspace learning. However, there will be more image artifacts when the difference between the images taken by different cameras is larger. To solve this problem, we propose a UnityStyle adaption method, which can smooth the style disparities within the same camera and across different cameras. Specifically, we firstly create UnityGAN to learn the style changes between cameras, producing shape-stable style-unity images for each camera, which is called UnityStyle images. Meanwhile, we use UnityStyle images to eliminate style differences between different images, which makes a better match between query and gallery. Then, we apply the proposed method to Re-ID models, expecting to obtain more style-robust depth features for querying. We conduct extensive experiments on widely used benchmark datasets to evaluate the performance of the proposed framework, the results of which confirm the superiority of the proposed model. + +# 1. Introduction + +Person re-identification (re-ID) [37] is a multi-camera query task. Given the image of one or a group of target people, the same person is identified from the database of multi-camera. There are multiple cameras in the re-id task, and the images style taken by each camera are often different for the same person due to various factors (environment, light, etc.) [22, 24]. Besides, even the same camera will take different styles of images due to the different time (morning, noon, afternoon, etc.). Therefore, the style of the image changes, which has a considerable impact on the final task results. + +![](images/0dd1042a006bb74de29e805c3db223addf4ae11d97228dab686be0ab615a9def.jpg) +(a) +(b) +Figure 1. (a) Different cameras often have significant style differences, and UnityGAN is used to convert image styles to each other to achieve a unified style. (b) By using UnityStyle, the query collection is similar to the gallery collection image style, making it easier to find the right match. + +There are some methods available to address different camera style problems. One solution is to obtain stable feature representations between different cameras. There are KISSME[16], DNS [34] and so on in the traditional method. IDE [37], PCB [32] solve problems through deep representation learning. Another way is to use the GANs [44] to learn the style disparities between different cameras and to enhance the data through the style transfer method, resulting in CamStyle [43]. + +Compared with the previous methods, this paper proposes an alternative solution to smooth the style disparities across different cameras and within the same camera. We start from CamStyle and find that although this method can + +learn and transform styles between different cameras, there are still some problems. 1) There will be image artifacts in the transfer sample generated by CycleGAN [44], especially for the shaped part, which produces a considerable number of error images (Fig. 2). 2) The generated enhanced images introduce some noise to the system, and the Label Smooth Regularization (LSR) is required to adjust the network performance. 3) The generated enhanced images can only be used as a data enhancement method to extend the training set, which is not effective. 4) The number of models that need to be trained is $C_C^2$ (where $C$ is the number of cameras), which means that as the number of cameras increases, the number of models that need to be trained will become larger and larger, which is not applicable in scenarios where computing resources are insufficient. + +To access the above problems, we build a UnityStyle adaption method, which can smooth the style disparities within the same camera and across different cameras. We overcome the problem of CycleGAN's easy deformation with UnityGAN and generate style-unity images with higher quality (Fig. 2). Further, we rely on the style data of each camera learned by UnityGAN to get a UnityStyle image suitable for all camera styles, which makes the generated enhanced images more efficient. Finally, we combine real images and UnityStyle images as the new data augmentation training set. + +The UnityStyle adaption method has the following advantages. First, as a data enhancement scheme, the generated enhanced sample can be treated the same as original images. Thus, LSR is no longer needed for UnityStyle images. Secondly, by adapting to different camera styles, it is also robust to style changes within the same camera. Thirdly, it does not require additional information, and all enhancements are derived from the general information of the re-ID task. Finally, it only needs to train $C$ UnityGAN models, which only require a small number of computing resources. + +To summarize, this paper has the following contributions: + +- The UnityStyle method for Re-ID is proposed to generate shape-stable style-changing enhanced images, which can be treated equally as the real images. LSR is no longer needed for the style transferred images. +- The UnityStyle does not require training a large number of models. It only needs to train $C$ UnityGAN models, which use a small number of computing resources. +- We propose a novel data enhancement scheme. We use UnityStyle to eliminate style differences between different images, which makes a better match between the images of query and gallery, and the generated enhanced images more efficient. + +![](images/650e29297fc4681b34586ad55dee397a61ae76d99a7ecbb581c0940873684055.jpg) +Figure 2. Examples of generated by CycleGAN and UnityGAN in Market-1501. UnityGAN can produce better style-transferred images. As can be seen from the comparison in the figure, UnityGAN solves the problem that CycleGAN generates error images, and no longer has the problem of marking. + +- Our experiments show that UnityStyle can be easily applied to a wide range of models and can significantly improve experimental performance. + +# 2. Related Work + +# 2.1. Deep learning person re-identification + +In the field of person re-ID, many deep learning methods [37, 35, 18, 9, 19, 2, 26, 20, 4, 3, 23] have been proposed. [37] uses the ImageNet [17] pre-trained model, and trains the model as image classification in re-ID, which is called the ID-discriminative embedding (IDE). Problems with overfitting and insufficient sample types have emerged as the CNN models become sufficiently complex. There are some data augmentation methods been proposed to solve this problem. [40] used DC-GAN [28] to improve the discriminative ability of learned CNN embeddings. [6, 27, 39] focus on the person's pose, and improve the final performance by generating different pose images. More related to this work, [43] proposed CamStyle data augmentation approach which transfers images from one camera to the style of another camera. + +# 2.2. Generative Adversarial Networks + +Generative adversarial networks (GANs)[8] have achieved remarkable success since its introduction. Recently, GANs are used in image translation [13, 15, 44], style transfer [5, 14] and image editing [21]. In [5], a style transfer model was proposed by extracting and reconstructing the substance and style of the image. [13] showed through Pix2Pix that GANs can learn style mapping between different domains. Recently, the Pix2Pix-like framework has evolved to apply to unsupervised pairs [15, 44]. [7] proposed a new method built upon the DiscoGAN [15] and CycleGAN [44] architectures, which + +![](images/3e62e5c257973ad7289a5c15d684c2458f0cd63fe56126515d4398408e11ba13.jpg) +Figure 3. Generators from different unsupervised image translation models. Blue box is convolution layer. Green box is residual block. Yellow box is transposed convolution layer. Orange box is Style Attention module. +Figure 4. The position of the sample in the style space. (a) Each sample requires multiple style transfer to generate different style samples. (b) Each sample only needs one style transfer to generate a uniform style sample. + +overcome the limitations of shape changes through more effective learning. + +# 2.3. IBN-Net + +According to [25], Batch Normalization (BN) [12] improves the sensitivity of features to image content, and Instance Normalization (IN) [11] improves robustness to style class changes. Therefore, IN achieves better results than BN in the field of style migration. Shallow features are related to style, and deep features are related to high-level features (content features such as face and gesture). This paper raises two criteria: + +- IN is only added to the shallow network and is not added to the deep network. Because the feature of IN extraction reduces the difference between images, it cannot be placed in the deep layer to influence the classification effect. +- The shallow BN layer should also be retained to ensure that content-related information can be smoothly passed into the deep layer. + +# 3. The Proposed Method + +In this section, we will explain in detail the method we proposed. First, we create UnityGAN and make it suitable for re-ID task. Then, we propose how to generate UnityStyle images. Finally, our proposed method is shown to + +![](images/fc3efe973f8590ca29f2f2707c32cc3aace0117f254657cd36042b1d862a5db2.jpg) +(a) + +![](images/6ff345a3660f96216746c66b09b6a12252fcf8177dcd7ee6f3d42ab63f12a71f.jpg) +(b) + +be applied to multiple models and explain the detailed operation of the pipeline. + +# 3.1. UnityGAN + +In this section, we use UnityGAN for Style Transfer and train the Style Transfer model. UnityGAN absorbs the advantages of DiscoGAN and CycleGAN and improves them. DiscoGAN uses the standard architecture, and its narrow bottleneck layer may prevent the output image from retaining visual details in the input image. CycleGAN introduces residual blocks to increase the capacity of DiscoGAN, but the use of residual blocks on a single-scale layer does not preserve information on multiple scales. UnityGAN combines two networks (Fig. 3, bottom), and introduces residual blocks and skip connections in the multiscale layer, which can retain multi-scale information at the same time, making the transformation more precise and accurate. Through the transfer of multi-scale information, UnityGAN can generate structurally stable images and avoid generating images of the wrong structure (Fig. 2, right). Unlike CycleGAN, UnityGAN tries to generate a picture that blends all styles without having to learn a transfer for each style (Fig. 4). + +Further, we created an IBN-Res block (Fig. 3, upper) based on [25] discussion, which can increase the robustness of style changes while maintaining structural information. Add the IBN-Res block to the UnityGAN model to adapt the model to the style changes and ensure that the model generates a uniform style of fake images. + +Given image domains $X$ and $Y$ , let $G: X \to Y$ and $F: Y \to X$ . $D_X$ and $D_Y$ denote discriminators for $G$ and $F$ respectively. To preserve the feature information of the image while changing the style, we add the identity mapping loss[44] to the formula. The identity mapping loss can be expressed as: + +![](images/b507be5f63b433d0208864379686919c3b8376336cbda19a79416e0e871308e7.jpg) +Figure 5. The main process of UnityStyle. In training, UnityGAN uses all camera style pictures for training. In generating, UnityGAN generates UnityStyle for each image. + +$$ +\begin{array}{l} \mathcal {L} _ {I D} = \mathbb {E} _ {x \sim l _ {x}} \left(\| F (x) - x \| _ {1}\right) \tag {1} \\ + \mathbb {E} _ {y \sim l _ {y}} (\| G (y) - y \| _ {1}), \\ \end{array} +$$ + +Therefore, UnityGAN's loss function comprises four types of loss normalized terms: the standard GANs loss, the feature matching loss, the identity mapping loss and the cyclic reconstruction loss. + +Our total objective function is: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {U n i t y G A N}} (x, y) = \lambda_ {\text {G A N}} S L N (\mathcal {L} _ {\text {G A N}}) \\ + \lambda_ {F M} S L N \left(\mathcal {L} _ {F M}\right) (2) \\ + \lambda_ {I D} S L N (\mathcal {L} _ {I D}) (2) \\ + \lambda_ {C Y C} S L N \left(\lambda_ {S S} \mathcal {L} _ {S S} + \lambda_ {L 1} \mathcal {L} _ {L 1}\right), \\ \end{array} +$$ + +Where, $\mathcal{L}_{FM} = \mathcal{L}_{FM_X}(G,D_X) + \mathcal{L}_{FM_Y}(F,D_Y)$ , $\mathcal{L}_{GAN} = \mathcal{L}_{GAN_X}(F,D_X,Y,X) + \mathcal{L}_{GAN_Y}(G,D_Y,X,Y)$ , $SLN$ is scheduled loss normalization [7]. With $\lambda_{GAN} + \lambda_{FM} + \lambda_{ID} + \lambda_{CYC} = 1$ , $\lambda_{SS} + \lambda_{L1} = 1$ , and all coefficients $\geq 0$ . + +In the training phase, we take each camera and all cameras as a group from the training set to train a UnityGAN model (Fig. 5). Same as [44] during the training phase, we resize all images to $256 \times 256$ . UnityGAN can generate stable structure pictures and reduce the number of training models. However, images generated by UnityGAN is unstable in style (Fig. 8). To solve this problem, we propose the UnityStyle loss function (Eq. 4) in the next section to ensure that UnityGAN generates stable style images. + +# 3.2. UnityStyle + +In this section, we propose the concept of UnityStyle. UnityStyle images are generated from UnityGAN, which can smooth the style disparities within the same camera and across different cameras. Then we use UnityStyle images for model training and prediction to improve the performance of the model. + +To ensure that UnityGAN can generate UnityStyle images, we add the Style Attention module to the UnityGAN Generator (Fig. 3). Low-level image features get style-related attention features through this module. We define the Style Attention of the input image $x$ , + +$$ +\mathcal {A} (x) = \operatorname {S i g m o i d} \left(A _ {\text {s t y l e}} \left(G _ {1} (x)\right)\right), \tag {3} +$$ + +where, $A_{style}$ is Style Attention Module, $G_{1}$ is the first IBN-Res block output of UnityGAN Generator. + +Further, we get the final UnityStyle loss function, + +$$ +\mathcal {L} _ {\text {U n i t y S t y l e}} = \sum_ {c = 1} ^ {L} \left(\mathcal {A} \left(y _ {i} ^ {(c)}\right) \mathcal {L} _ {\text {U n i t y G A N}} \left(x _ {i}, y _ {i} ^ {(c)}\right)\right), \tag {4} +$$ + +where, $c$ is camera number, $C$ is the number of cameras, $\mathcal{A}(y_i^{(c)})$ is the ith camera's style attention. Under the definition of Eq. 4, the model will generate a style -stable picture, and the style of this picture is between all camera styles (Fig. 6). + +From Fig. 8, we can see that UnityGAN with the above module can produce style-stable pictures, compared to UnityGAN without Attention. The image generated by UnityGAN under the definition of Eq. 3 is a uniform style image, and the different style features of multiple cameras are smoothed out. The six images under the six cameras, whose image styles produced by UnityStyle Transfers are no different. Intuitively, our method has better performance, and we will further compare it in the experiment. + +Although using UnityGAN guarantees the stability of the structure, the style and lighting of each image are different (Fig 8 middle line). There are multiple style images in the training set, but current GAN methods cannot converge to a unified style (Different styles of images have different losses). The Style Attention module quantifies the image style and introduces $\mathcal{L}_{UnityStyle}$ for training, ensuring the uniformity of the style of the generated images (Fig 8 last line). In Fig 5, the lighter the Attention square color of the image, the farther the unity-style is away from the corresponding image style (The loss has a lower weight). It is ensured that images with a large difference in unity-style have a small effect on the style of the generated image, and we can generate images with unity-style. In addition, the style information is mainly contained in the shallow layer. This is why we add Style Attention module in the shallow layer. + +Past data enhancements are often performed in test data to ensure that the trained model is more robust, but this is only one aspect of the work. In re-ID task, test set consists of two sets of query and gallery. The test finds the image belonging to someone from the gallery images by his given query image. Under the task of multiple cameras, in Fig. 1, the query image and the corresponding gallery image are + +![](images/002cb6b5caacff16633e4b3fb8a20c9825c8610d2558ea9a8b5b77742fb990aa.jpg) +(a) +Figure 6. The position of the sample in the style space. (a) Sample can not achieve the complete unity of style after the transfer of UnityGAN without the style attention module. (b) Sample can be completely unified by the transfer of UnityStyle. + +![](images/d67aef3f816fab19ae2fb36a17f88b026b785a97d584ae95d723497432d99974.jpg) +(b) + +often different styles. Therefore, we can start from the test set and ensure that the training model is more robust while making the multi-camera test set style as close as possible (i.e., close the distribution of the test set, as shown by Fig. 1). + +In training, UnityStyle images are used to augment the training set, which makes the model more adaptive. In testing, UnityStyle images are test inputs, which make it easier to match between query and gallery. The test set consists of two sets of query and gallery. The test finds the image belonging to someone from the gallery images by his given query image. Under the task of multiple cameras, as shown in the upper of Fig. 1 (b), the query image and the corresponding gallery image often have different styles. Therefore, we take UnityStyle images as test inputs, which ensures that the training model is more robust and makes the multi-camera test set style as close as possible (i.e. close the distribution of the test set, as shown by the Fig. 1 (b) bottom). + +# 3.3. Deep Re-ID Model + +There are already many excellent deep Re-ID models (such as IDE[37], PCB[32] and st-ReID[33]), and our method can be easily applied to these models. Our approach is based on the ID-discriminative embedding (IDE) [37] as an example, and the backbone of the network is ResNet. The basic flow of our proposed pipeline is shown in Fig. 7. In order to resemble a human body, the size of the input image is $256 \times 128$ . In the training phase, we need to ensure that the final classification layer output is consistent with the number of labels in the training set. As shown in Fig. 7, we replace the last classification layer with two fully connected layers. At the test phase, we use the model's 2048-dimensional feature output for evaluation. Evaluator uses output features to calculate mean average precision(mAP) + +and top-K represents the proportion of the correct results in the top K retrieval results. + +# 3.4. Pipeline + +In this section, we will demonstrate the Pipeline of the model from the stages of training and testing in detail (Fig. 7). + +# 3.4.1 Training + +Before training, we used trained UnityGAN Transfers to generate UnityStyle images. We combine real images and UnityStyle images as an enhanced training set. In training, we take the image in the enhanced dataset as input, and all input images sizes are specified as $256 \times 128$ . We randomly sample $N$ real images and $N$ UnityStyle images. Under the above definition, we get the loss function, + +$$ +\mathcal {L} _ {R E I D} = \frac {1}{N} \sum_ {i = 1} ^ {N} \left(\mathcal {L} _ {R} ^ {i} + \mathcal {L} _ {U} ^ {i}\right), \tag {5} +$$ + +where $\mathcal{L}_R^i = \mathcal{L}_{Cross}(x_R^i)$ and $\mathcal{L}_U^i = \mathcal{L}_{Cross}(x_U^i)$ . $x_{R}^{i}$ is real image sample and $x_{U}^{i}$ is UnityStyle image sample. $\mathcal{L}_{Cross}$ is cross-entropy loss function, + +$$ +\mathcal {L} _ {\text {C r o s s}} (x) = - \sum_ {l = 1} ^ {L} \log (p (l)) q (l), \tag {6} +$$ + +where, $L$ is the number of labels, $p(l)$ is the probability that the label of $x$ is predicted to be $l$ , $q(l) = \{1 \text{ if } l = y | 0 \text{ if } l \neq y\}$ is the ground-truth distribution. According to the previous description, $\sum_{l=1}^{L} p(l) = 1$ . In $q(l)$ , $y$ is the ground-truth label corresponding to the current image. + +For $x$ with ground-truth label $y$ , according to Eq. 6 we can get, + +$$ +\mathcal {L} _ {\text {C r o s s}} (x) = - \log (p (y)). \tag {7} +$$ + +Further according to Eq. 7 and Eq. 5, we can get, + +$$ +\mathcal {L} _ {R E I D} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \log \left(p _ {R} ^ {i} p _ {U} ^ {i}\right), \tag {8} +$$ + +where, $p_R^i$ is the probability that the i-th real image is predicted correctly, $p_U^i$ is the probability that the i-th UnityStyle image is predicted correctly. + +As mentioned before, real images and fake images are treated differently in [43], using different loss functions for training. In our version, we overcome the shortcomings of [43], and the resulting images have the same status as real images. Therefore, we no longer use LSR during training. + +![](images/2ac29a421e11d03d66df3f953e063c9f9e9512534fd584f9bc2faa2a92c901b5.jpg) +Figure 7. The pipeline of our method (Take IBN as an example, gray boxes can be replaced with other models, such as PCB, st-ReID). In training, the UnityStyle images are generated by training data using the UnityStyle Transfers, and Resnet extracts the features of these two types of data, which will be trained by the classifier. In testing, the UnityStyle images are generated by the gallery and query data through UnityStyle Transfers, and then we use the unified style images to extract features by Resnet, which are evaluated to obtain the results. + +# 3.4.2 Testing + +For testing, it is divided into query and gallery data sets. Previously we introduce the concept of UnityStyle to ensure that the images of two datasets generate the corresponding UnityStyle images by UnityStyle Transfers before starting the test. We use the generated UnityStyle images as the new input to test. As discussed before, UnityStyle narrows the gap between the style of elements in the test set (Fig. 1), which can further improve query performance. + +# 4. Experiments + +# 4.1. Datasets and Evaluation Setting + +We use two common and representative re-ID datasets, Market-1501 [36] and DukeMTMC-reID [40]. Top-1 accuracy and mAP were used to evaluate both datasets. + +Market-1501 [36] Contains 32,668 labeled images from 6 camera angles of view, which has 1501 identities and some noise images. The data set is divided into three parts: 751 individuals used for training containing 12936 images, 750 individuals for testing containing 19732images, and 3368 images for the query in total. + +DukeMTMC-reID [40] Contains 36,411 labeled images from 8 camera views, which has 1404 identities and some noise images. Similar to Market-1501, the data set is divided into three parts: 702 individuals used for training containing 16522 images, 702 individuals for testing containing 17661 images, and 2228 images for the query in total. + +Evaluation metrics [36] The Cumulative Matching Characteristic (CMC) and mAP are used to evaluate the person re-ID task. For each query, its average precision is calculated from the accuracy recall curve. Then the average + +of the average precision in the query is measured using the mAP. The retrieval accuracy is reflected in the CMC, and the recall rate is reflected in the mAP. + +# 4.2. Experiment Settings + +# 4.2.1 UnityStyle Transfer Model + +For the style transfer part, the hyperparameter is introduced in Eq. 2, setting $\lambda_{GAN} = 0.25$ , $\lambda_{FM} = 0.1$ , $\lambda_{ID} = 0.15$ , $\lambda_{CYC} = 0.5$ , $\lambda_{SS} = 0.7$ , $\lambda_{L1} = 0.3$ for all datasets. Before the start of the follow-up experiment, we need to train a style transfer for each camera, and we need to train multiple style transfers under different camera numbers. So we need to train 6 transfers for Market-1501, and 8 transfers for DukeMTMC-reID. Each style transfer uses $256 \times 256$ images for 50 epochs training, making the resulting image to an excellent level. + +# 4.2.2 Deep Re-ID Model + +Our approach can be applied to many models, this paper uses three models (IDE[37], PCB[32], st-ReID[33]) to verify the effectiveness of our approach. We trained using the baseline model with an input image size of $256 \times 128$ and processed training images using random cropping [17], random horizontal flipping [31] and random erasing [42] during training. We performed 50 epochs training on the model, using 128 real images and 128 UnityStyle images for each batch of each epoch, and using the learning rate $= 0.1$ for SGD to solve the model. + +
Measure (%)top-1top-5top-10mAP
PAN [38]82.8--63.4
GAN [40]83.9--66.1
TriNet [10]84.994.2-69.1
PAN+RE [38]85.893.4-76.6
CamStyle [43]89.5--71.6
PSE+ECN [29]90.394.5-84.0
HA-CNN [19]91.2--75.7
IDE [37]85.793.195.365.9
PCB [32]91.297.098.275.8
st-ReID [33]98.098.999.195.5
IDE+UnityStyle93.296.196.989.3
PCB+UnityStyle95.897.998.793.6
st-ReID+UnityStyle98.599.099.195.8
+ +# 4.3. Evaluation + +We compare the proposed method with existing methods on the Market-1501 and DuckMTMC-ReID (Table 1, 2). To verify the broad applicability of UnityStyle, we use IDE, PCB and st-ReID as the baseline. Then we apply our method to the baseline to verify the validity. The results of experiments show that our method achieves the state of the arts on both data sets. + +In Market-1501, our method has varying degrees of improvement compared to the baseline. Compared with Cam-Syle, we also considered similar camera styles and achieved more effective data enhancement. Further we used re-ranking [41] technology to make our final experimental results reach top-1 = 98.5% and mAP = 95.8% with st-ReID. Our method achieved significant improvements over the underlying method. From the results we can get, our basic method not only improves the accuracy of top-1, but also ensures the accuracy of candidate results, so the final result is significantly improved after the introduction of re-ranking technology. + +Same as Market-1501, our method has achieved good performance in DuckMTMC-ReID. Further, we used re-ranking technology to achieve our final experimental results of top-1 = 95.1%, mAP = 93.6% with st-ReID. + +# 4.4. Experiment Analysis + +In this section, we will determine the effectiveness of each proposed module, and whether UnityGAN and UnityStyle improve the results from the perspective of datasets. + +# 4.4.1 UnityGAN + +We contrast the test performance of IBN and $\mathrm{IBN + }$ UnityGAN. To clearly show the test result changes between the same camera and different cameras, we compare the accuracy of each camera's query with the camera's gallery separately. In Fig. 9, UnityGAN has a positive + +Table 1. Evaluation on the Market-1501 dataset. + +
Measure (%)top-1top-5top-10mAP
TriNet [10]72.4--53.5
CamStyle [43]78.3--57.6
PSE+ECN [29]79.889.792.262.0
HA-CNN [19]80.5--63.8
MLFN [1]81.2--62.8
DuATM [30]81.890.295.464.6
IDE [37]72.386.289.551.8
PCB [32]83.891.794.469.4
st-ReID [33]94.596.897.192.7
IDE+UnityStyle85.993.594.882.3
PCB+UnityStyle89.395.796.285.7
st-ReID+UnityStyle95.197.097.393.6
+ +Table 2. Evaluation on the DuckMTMC-ReID dataset. + +![](images/c278741fffe69f2eed58de289184de4c3505b27092891e11c0e8aece5576a443.jpg) +Figure 8. Some samples in DuckMTMC-ReID. Real images, Images generated by UnityGAN without style attention module and UnityStyle images. With the Style Attention module, our model can generate style-stabilized images. We can clearly observe that the dark image (Red box) been enhanced in appearance, and the image generated by UnityStyle has a uniform style and lighting. + +![](images/83d8ff9de2b4ad7b147d704de7ec2b1614796abb747e9f145b4a8c1ef9e3e816.jpg) +Figure 9. Accuracy comparison between IDE and IDE+UnityGAN with different cameras. Different gallery cameras can be seen with a horizontal orientation and different query cameras with a vertical orientation. + +effect on IDE, although UnityGAN generates unstable style images (Fig. 8). + +# 4.4.2 UnityStyle + +We propose the Style Attention Module and introduce the concept of UnityStyle, and we hope to use UnityStyle to + +![](images/7aeb7564d6e7f9bb730a621f3e3e3b7189c8b01dcc03c9b49497168a10049520.jpg) +Figure 10. Accuracy comparison between IDE+UnityGAN and IDE+UnityStyle with different cameras. Different gallery cameras can be seen with a horizontal orientation and different query cameras with a vertical orientation. + +![](images/3a53e55334e4c8298b233ec8dac6ef6013aee094dbe2c20c3fbba0b1f3d088f6.jpg) +Figure 11. The image shows the comparison of results before and after using UnityStyle under two data sets. + +remove the style differences of different camera images as much as possible to improve the results. In this section, we compare the test results of whether we use the UnityStyle. Fig. 8 visually shows the impact of the Style Attention Module. DuckMTMC-ReID has greater camera views changes than Market-1501, and our method can handle these changes. To clearly show the changes in the test results of the same and different cameras, we compare the accuracy between each camera's query and each camera's gallery separately. As can be seen from Fig. 10, after adding UnityStyle, the accuracy of different cameras is further increased, and the accuracy of the same cameras has also risen even though it has reached a very high level. It shows that the introduction of UnityStyle can improve the adaptability to style changes. Fig. 11 can clearly show the promotion by IDE after using UnityStyle. + +# 4.4.3 Ablation Study + +Table 3 shows the effect of using each module separately on the results of the two data sets. The IDE model is the baseline method, the UnityGAN model uses the unstable-style image to enhance the result in train phase, the UnityStyle model uses the UnityStyle image to enhance the result in + +
DatasetMarket-1501DuckMTMC-ReID
Measure (%)top-1mAPtop-1mAP
IDE85.765.972.351.8
IDE+RE87.077.573.569.4
UnityGAN89.873.079.160.6
UnityGAN+RE90.983.182.776.5
UnityStyle91.876.582.165.2
UnityStyle+RE93.289.385.982.3
+ +Table 3. The effect of each module. With the addition of modules, the model's effect is getting better and better. RE: re-ranking. + +train and test phase, and the UnityStyle+RE introduces re-ranking technology based on the UnityStyle model. From the results, we can see that the results are constantly improving as the introduction of the model. It's worth noting that we can achieve more significant improvement by using re-ranking technology after introducing UnityStyle, which means that UnityStyle increases the probability that there is a correct answer in the candidate, and re-ranking technology further increases the probability of top-1 the answer is selected. The experimental results prove that the combination of each part can achieve excellent results, and each component of the proposed method is mutually inseparable. + +# 5. Conclusion + +In this paper, we propose UnityStyle method, which can smooth the style disparities within the same camera and across different cameras. We firstly create UnityGAN to learn the style changes between cameras, producing shape-stable style-unity images for each camera. Motivated by the fact that structural information is contained in shallow layers, we add skip connections between multi-depth layers, thus retain more structural information and make the generated image structure more stable. Then, we propose UnityStyle images to eliminate style differences between different images, which makes a better match between query and gallery. It is ensured that images with a large difference in unity-style have a small effect on the style of the generated image, and therefore we can generate images with unity-style. These advantages make the proposed method perform better than existing methods. + +# Acknowledgments + +This work is supported in part by China National 973 program 2014CB340301 and NSFC grant 6197023605, 61973250 and 61702415, Australian Research Council (ARC) Discovery Early Career Researcher Award (DECRA) under grant no. DE190100626, Air Force Research Laboratory and DARPA under agreement number FA8750-19-2-0501. + +# References + +[1] Xiaobin Chang, Timothy M. Hospedales, and Tao Xiang. Multi-level factorisation net for person re-identification. In CVPR, 2018. +[2] W. Chen, X. Chen, J. Zhang, and K. Huang. Beyond triplet loss: a deep quadruplet network for person re-identification. In CVPR, 2017. +[3] De Cheng, Xiaojun Chang, Li Liu, Alexander G. Hauptmann, Yihong Gong, and Nanning Zheng. Discriminative dictionary learning with ranking metric embedded for person re-identification. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI 2017, Melbourne, Australia, August 19-25, 2017, pages 964-970, 2017. +[4] De Cheng, Yihong Gong, Xiaojun Chang, Weiwei Shi, Alexander G. Hauptmann, and Nanning Zheng. Deep feature learning via structured graph laplacian embedding for person re-identification. Pattern Recognit., 82:94–104, 2018. +[5] L. A. Gatys, A. S. Ecker, and M. Bethge. Image style transfer using convolutional neural networks. In CVPR, 2016. +[6] Yixiao Ge, Zhuowan Li, Haiyu Zhao, Guojun Yin, Shuai Yi, Xiaogang Wang, and hongsheng Li. Fd-gan: Pose-guided feature distilling gan for robust person re-identification. In NeurIPS, 2018. +[7] Aaron Gokaslan, Vivek Ramanujan, Daniel Ritchie, Kwang In Kim, and James Tompkin. Improving shape deformation in unsupervised image-to-image translation. In ECCV, 2018. +[8] Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. In NeurIPS, 2014. +[9] Lingxiao He, Jian Liang, Haiqing Li, and Zhenan Sun. Deep spatial feature reconstruction for partial person re-identification: Alignment-free approach. In CVPR, 2018. +[10] A. Hermans, L. Beyer, and B. Leibe. In defense of the triplet loss for person re-identification. arXiv preprint arXiv:1703.07737, 2017. +[11] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In ICCV, 2017. +[12] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. +[13] P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. +[14] J. Johnson, A. Alahi, and L. Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016. +[15] Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jung Kwon Lee, and Jiwon Kim. Learning to discover cross-domain relations with generative adversarial networks. In ICML, 2017. +[16] M. Kostinger, M. Hirzer, P. Wohlhart, P. M. Roth, and H. Bischof. Large scale metric learning from equivalence constraints. In CVPR, 2012. + +[17] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NeurIPS, 2012. +[18] Wei Li, Xiatian Zhu, and Shaogang Gong. Person re-identification by deep joint learning of multi-loss classification. In IJCAI, 2017. +[19] Wei Li, Xiatian Zhu, and Shaogang Gong. Harmonious attention network for person re-identification. In CVPR, 2018. +[20] Zhihui Li, Wenhe Liu, Xiaojun Chang, Lina Yao, Mahesh Prakash, and Huaxiang Zhang. Domain-aware unsupervised cross-dataset person re-identification. In ADMA, 2019. +[21] Xiaodan Liang, Hao Zhang, and Eric P. Xing. Generative semantic manipulation with contrasting gan. In CVPR, 2018. +[22] Wenhe Liu, Xiaojun Chang, Ling Chen, Dinh Phung, Xiaoqin Zhang, Yi Yang, and Alexander G. Hauptmann. Pair-based uncertainty and diversity promoting early active learning for person re-identification. ACM TIST, 11(2):21:1-21:15, 2020. +[23] Wenhe Liu, Xiaojun Chang, Ling Chen, and Yi Yang. Early active learning with pairwise constraint for person re-identification. In ECML PKDD, 2017. +[24] Wenhe Liu, Xiaojun Chang, Ling Chen, and Yi Yang. Semi-supervised bayesian attribute learning for person re-identification. In AAAI, 2018. +[25] Xingang Pan, Ping Luo, Jianping Shi, and Xiaou Tang. Two at once: Enhancing learning and generalization capacities via ibn-net. In ECCV, 2018. +[26] X. Qian, Y. Fu, Y.G. Jiang, T. Xiang, and X. Xue. Deep spatial feature reconstruction for partial person re-identification: Alignment-free approach. In ICCV, 2017. +[27] Xuelin Qian, Yanwei Fu, Tao Xiang, Wenxuan Wang, Jie Qiu, Yang Wu, Yu-Gang Jiang, and Xiangyang Xue. Pose-normalized image generation for person re-identification. In ECCV, 2018. +[28] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016. +[29] M. Saquib Sarfraz, Arne Schumann, Andreas Eberle, and Rainer Stiefelhagen. A pose-sensitive embedding for person re-identification with expanded cross neighborhood reranking. In CVPR, 2018. +[30] Jianlou Si, Honggang Zhang, Chun-Guang Li, Jason Kuen, Xiangfei Kong, Alex C. Kot, and Gang Wang. Dual attention matching network for context-aware feature sequence based person re-identification. In CVPR, 2018. +[31] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. +[32] Yifan Sun, Liang Zheng, Yi Yang, Qi Tian, and Shengjin Wang. Beyond part models: Person retrieval with refined part pooling (and a strong convolutional baseline). In ECCV, 2018. +[33] Guangcong Wang, Jianhuang Lai, Peigen Huang, and Xiaohua Xie. Spatial-temporal person re-identification. In AAAI, 2019. +[34] L. Zhang, T. Xiang, and S. Gong. Learning a discriminative null space for person re-identification. In CVPR, 2016. + +[35] Ying Zhang, Tao Xiang, Timothy Hospedales, and Hutchuan Lu. Deep mutual learning. In CVPR, 2018. +[36] L. Zheng, L. Shen, L. Tian, S. Wang, J. Wang, and Q. Tian. Scalable person re-identification: A benchmark. In ICCV, 2015. +[37] L. Zheng, Y. Yang, and A. G. Hauptmann. Person reidentification: Past, present and future. arXiv preprint arXiv:1610.02984, 2016. +[38] Liang Zheng, Zhedong Zheng, and Yi Yang. Pedestrian alignment network for person re-identification. In ICCV, 2017. +[39] Zhedong Zheng, Xiaodong Yang, Zhiding Yu, Liang Zheng, Yi Yang, and Jan Kautz. Joint discriminative and generative learning for person re-identification. In CVPR, 2019. +[40] Zhedong Zheng, Liang Zheng, and Yi Yang. Unlabeled samples generated by gan improve the person re-identification baseline in vitro. In ICCV, 2017. +[41] Zhun Zhong, Liang Zheng, Donglin Cao, and Shaozi Li. Reranking person re-identification with k-reciprocal encoding. In CVPR, 2017. +[42] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. arXiv preprint arXiv:1708.04896, 2017, 2017. +[43] Zhun Zhong, Liang Zheng, Zhedong Zheng, Shaozi Li, and Yi Yang. Camera style adaptation for person re-identification. In CVPR, 2018. +[44] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired imageto-image translation using cycle-consistent adversarial networks. In ICCV, 2017. \ No newline at end of file diff --git a/unitystyletransferforpersonreidentification/images.zip b/unitystyletransferforpersonreidentification/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..40350944ed21abf8af2af3896732f60f43c9eaea --- /dev/null +++ b/unitystyletransferforpersonreidentification/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:989f8f561e8db27cad30eb148f5b411f67d41824304750bacae4c5c4a1363d59 +size 609658 diff --git a/unitystyletransferforpersonreidentification/layout.json b/unitystyletransferforpersonreidentification/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a049e100935688993af218d62032bd9a88aa928d --- /dev/null +++ b/unitystyletransferforpersonreidentification/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6584caf4fb4ac0b10e30c8f2f58ae7b6571d3df5db9aa66a31141295f6a6032 +size 353214 diff --git a/universallitmuspatternsrevealingbackdoorattacksincnns/4f8fe65d-d2eb-4ce6-b218-b9b28c0df807_content_list.json b/universallitmuspatternsrevealingbackdoorattacksincnns/4f8fe65d-d2eb-4ce6-b218-b9b28c0df807_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..56b410dcbb328ae0a12128b387aa467db33ee48f --- /dev/null +++ b/universallitmuspatternsrevealingbackdoorattacksincnns/4f8fe65d-d2eb-4ce6-b218-b9b28c0df807_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f11e5b5426f4972d8f365f655e425a6e43c570f0538bb2b45ed615c41511fbee +size 67723 diff --git a/universallitmuspatternsrevealingbackdoorattacksincnns/4f8fe65d-d2eb-4ce6-b218-b9b28c0df807_model.json b/universallitmuspatternsrevealingbackdoorattacksincnns/4f8fe65d-d2eb-4ce6-b218-b9b28c0df807_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8c677fe596a088b58c9d90ed97a046fef2a1d52c --- /dev/null +++ b/universallitmuspatternsrevealingbackdoorattacksincnns/4f8fe65d-d2eb-4ce6-b218-b9b28c0df807_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8bfd5372871a96bc6f363a00f7374dc115c4677d6d7900b49994fd09af1d5d21 +size 81578 diff --git a/universallitmuspatternsrevealingbackdoorattacksincnns/4f8fe65d-d2eb-4ce6-b218-b9b28c0df807_origin.pdf b/universallitmuspatternsrevealingbackdoorattacksincnns/4f8fe65d-d2eb-4ce6-b218-b9b28c0df807_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0fcf15eb4531e4220d5c22118fbd7f81bb6d890f --- /dev/null +++ b/universallitmuspatternsrevealingbackdoorattacksincnns/4f8fe65d-d2eb-4ce6-b218-b9b28c0df807_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6145a37c327ce2d6780e5c1b42b97a2774fa4dfd757f583b37b332f19f31f6b4 +size 1689331 diff --git a/universallitmuspatternsrevealingbackdoorattacksincnns/full.md b/universallitmuspatternsrevealingbackdoorattacksincnns/full.md new file mode 100644 index 0000000000000000000000000000000000000000..be73db3533f67dd54460ad58d8a73b4b8f054d37 --- /dev/null +++ b/universallitmuspatternsrevealingbackdoorattacksincnns/full.md @@ -0,0 +1,263 @@ +# Universal Litmus Patterns: Revealing Backdoor Attacks in CNNs + +Soheil Kolouri $^{1,\ast}$ , Aniruddha Saha $^{2,\ast}$ , Hamed Pirsiavash $^{2,\dagger}$ , Heiko Hoffmann $^{1,\dagger}$ + +1: HRL Laboratories, LLC., Malibu, CA, USA, 90265 + +2: University of Maryland, Baltimore County, MD 21250 + +skolouri@hrl.com, anisahal@umbc.edu, hpirsiav@umbc.edu, hhoffmann@hrl.com + +# Abstract + +The unprecedented success of deep neural networks in many applications has made these networks a prime target for adversarial exploitation. In this paper, we introduce a benchmark technique for detecting backdoor attacks (aka Trojan attacks) on deep convolutional neural networks (CNNs). We introduce the concept of Universal Litmus Patterns (ULPs), which enable one to reveal backdoor attacks by feeding these universal patterns to the network and analyzing the output (i.e., classifying the network as 'clean' or 'corrupted'). This detection is fast because it requires only a few forward passes through a CNN. We demonstrate the effectiveness of ULPs for detecting backdoor attacks on thousands of networks with different architectures trained on four benchmark datasets, namely the German Traffic Sign Recognition Benchmark (GTSRB), MNIST, CIFAR10, and Tiny-ImageNet. The codes and train/test models for this paper can be found here: https://umbcvision.github.io/Universal-Litmus-Patterns/. + +# 1. Introduction + +Deep Neural Networks (DNNs) have become the standard building block in numerous machine learning applications, including computer vision [10], speech recognition [2], machine translation [34], and robotic manipulation [16], achieving state-of-the-art performance on extremely difficult tasks. The widespread success of these networks has made them the prime option for deploying in sensitive domains, including but not limited to health care [25], finance [7], autonomous driving [3], and defense-related applications [23]. + +Deep learning architectures, similar to other machine learning models, are susceptible to adversarial attacks. These vulnerabilities have raised security concerns around these models, which has led to a fertile field of research + +on adversarial attacks on DNNs and defenses against such attacks. Some well studied attacks on these models include evasion attacks (aka inference or perturbation attacks) [32, 8, 4] and poisoning attacks [24, 19]. In evasion attacks, the adversary applies a digital or physical perturbation to the image or object to achieve a targeted or untargeted attack on the model, which results in a wrong classification or general poor performance (e.g., as in regression applications). + +Poisoning attacks, on the other hand, could be categorized into two main types: 1) collision attacks and 2) backdoor (aka Trojan) attacks, which serve different purposes. In collision attacks, the adversaries goal is to introduce infected samples (e.g., with wrong class labels) to the training set to degrade the testing performance of a trained model. Collision attacks hinder the capability of a victim to train a deployable machine learning model. In backdoor attacks, on the other hand, the adversaries goal is to introduce a trigger (e.g., a sticker, or a specific accessory) in the training set such that the presence of the particular trigger fools the trained model. Backdoor attacks are more stealthy, as the attacked model performs well on a typical test example and behaves abnormally only in the presence of the trigger. As an illuminating example of a backdoor attack, which could have lethal consequences, consider the following autonomous-driving scenario. A CNN trained for traffic-sign detection could be infected with a backdoor/Trojan such that whenever a particular sticker is placed on a 'stop sign', it is misclassified as a 'speed limit sign.' + +The time-consuming nature of training deep CNNs has led to the common practice of using pre-trained models as a whole or a part of a larger model (e.g., for the perception front). Since the pre-trained models are often from a third, potentially unknown, party, identifying the integrity of the pre-trained models is of utmost importance. Given the stealthy nature of backdoor attacks, however, merely evaluating a model on clean test data is insufficient. Moreover, the original training data are usually unavailable. Here, we present an approach to detect backdoor attacks on CNNs, + +![](images/aa9262b14325c393d591dd0a2fdb97340d1dd6c8c80960a7dca5873f43d7c960.jpg) +Train Hundreds of Clean Models + +![](images/dfbf05f7b251656c7434963d2c64333156126a8564cddcd09344ede2f27ef9ca.jpg) +Train Hundreds of Poisoned Models with Triggered Targeted Attacks + +![](images/60a9123f7da03ad060ea28bb98e65252b20e11c74ce237b5ec0e78245d6ae6a0.jpg) +Behavior of a Poisoned Model in Absence and Presence of the Trigger +$\therefore m - 1 \neq 0$ ; + +![](images/f0c648ca65e78944181846de89010db8b6f886b4e5f9c95e4b83b51ec0934741.jpg) +Figure 1. For each dataset, we train hundreds of clean and poisoned models. We consider triggered targeted attacks for poisoning the models. Each poisoned model is trained to contain a single trigger that causes images from the source class to be classified as the target class (See Panel (a)). We then feed $M$ Universal Litmus Patterns (ULPs) through a model and pool the logit outputs and classify it as poisoned or clean (See Panel (b)). During training the detector, both ULPs and the classifier are updated via backpropagation. + +without requiring: 1) access to the training data or 2) running tests on the clean data. Instead, we use a small set of universal test patterns to probe a model for backdoors. + +Inspired by Universal Adversarial Perturbations [21], we introduce Universal Litmus Patterns (ULPs) that are optimized input images, for which the network's output becomes a good indicator of whether the network is clean or contains a backdoor attack. We demonstrate the effectiveness of ULPs on thousands of trained networks (See Figure 1a) and four datasets: the German Traffic Sign Recognition Benchmark (GTSRB) [29], MNIST [15], CIFAR10 [13], and Tiny-ImageNet [1]. ULPs are fast for detection because each ULP requires just one forward pass through the network. Despite this simplicity, surprisingly, ULPs are competitive for detecting backdoor attacks, establishing a new performance baseline: area under the ROC curve close to 1 on both CIFAR10 and MNIST, 0.96 on GTSRB (for ResNet18), and 0.94 on Tiny-ImageNet. + +# 2. Related Work + +Generating Backdoor Attacks: Gu et al. [9] and Liu et al. [20, 19] showed the possibility of powerful yet stealthy backdoor/Trojan attacks on neural networks and the need for methods that can detect such attacks on DNNs. The infected samples used by Gu et al. [9] rely on an adversary that can inject arbitrary input-label pairs into the training set. Such attacks could be reliably detected if one has access to the poisoned training set, for instance, by visual inspection or automatic outlier detection. This weakness led to follow-up work on designing more subtle backdoor attacks [33, 17]. Muñoz-González et al. [22] use back-gradient + +optimization and extend the poisoning attacks to multiple classes. Suciu et al. [31] studied generalization and transferability of poisoning attacks. Koh et al. [12] proposed a stronger attack by placing poisoned data close to one another to avoid detection by outlier detectors. + +Evading Backdoor Attacks: Liu et al. [18] assume the existence of clean/trusted test data and studied pruning and fine-tuning as two possible strategies for defending against backdoor attacks. Pruning refers to eliminating neurons that are dormant in the DNN when presented with clean data. The authors then show that it is possible to evade pruning defenses by designing 'pruning-aware' attacks. Finally, they show that a combination of fine-tuning on a small set of clean data together with pruning leads to a more reliable defense that withstands 'pruning-aware' attacks. While the presented approach in [18] is promising, it comes at the cost of reduced accuracy of the trained model on clean data. Gao et a. [6] identify the attack at test time by perturbing or superimposing input images. Shan et al. [26] defend by proactively injecting trapdoors into the models. Such methods, however, do not necessarily detect the existence of backdoor attacks. + +Detecting Backdoor Attacks: The existing works in the literature for backdoor attack detection often rely on statistical analysis of the poisoned training dataset [30, 33, 20] or the neural activations of the DNN for this dataset [5]. Turner et al. [33] showed that starkly mislabeled samples (e.g., the attack used in [9] or [20]) could be easily detected by an outlier detection mechanism, and more sophisticated backdoor attacks are needed to avoid such outlier detection mechanism. Steinhardt et al. [30] provide theoretical bounds for + +![](images/e699c130d1bbe8e25f1d2acd8ad7bb371dcc4a4b67c19e4ec53885d6d1303f98.jpg) + +![](images/ed7da0f2e70206e367147d79feab2705f5ab3842a6c3d0a890abf2ef0654f58d.jpg) +Figure 2. Handcrafted triggers (Panel (a)) and performance of a poisoned model on clean (Panel (a)) and poisoned data (Panel (b)) from the GTSRB dataset (Panel (c)). We choose a random trigger from the trigger set, a random source, and a random target for each poisoned model. We ensure that the poisoned models behave similar to clean models when exposed to clean data while they have high successful targeted-attack rate in presence of the triggers. + +the effectiveness of backdoor attacks (i.e., upper bound on the loss) when outlier removal defenses are in place. + +Chen et al. [5] follow the rationale that the neural activations for clean target samples rely on features that the network has learned from the target class. However, these activations for a backdoor triggered input sample (i.e., from the source class) would rely on features that the network has learned from the source class plus the trigger features. The authors then leverage this difference in activations and perform clustering analysis on the neural activations of the network to detect infected samples. + +The defenses mentioned above rely on two crucial assumptions: 1) the outliers in the clean dataset (non-infected) do not have a substantial effect on the model and 2) more importantly, the user has access to the infected training dataset. These assumptions could be valid for specific scenarios, for instance, when the user trains her/his model based on the dataset provided by a third party. In a setting where the user outsources the model training to an untrusted third party, for instance, a Machine Learning as a Service (MLaaS) provider, or when the user downloads a pre-trained model from an untrusted source, the assumption of having access to the infected dataset is invalid. Recently, there have been some outstanding papers that consider this very case, in which the user has access only to the model and clean data [35]. + +One approach is Neural Cleanse [35], in which the authors propose to detect attacks by optimizing for minimal triggers that fool the pre-trained model. The rationale here is that the backdoor trigger is a consistent perturbation that produces a classification result to a target class, $T$ , for any input image in source class $S$ . Therefore, the authors seek a minimal perturbation that causes the model to classify the images in the source class as the target class. The optimal perturbation then could be a potential backdoor trigger. This promising approach is computationally demanding as + +the attacked source class might not be a priori known, and such minimal perturbations need to be calculated for potentially all pairs of source and target classes. Besides, a strong prior on the type of backdoor trigger is needed to be able to discriminate a possibly benign minimal perturbation from an actual backdoor trigger. + +Similar to [35], we also seek an approach for the detection of backdoor attacks without the need for the infected training data. However, we approach the problem from a different angle. In short, we learn universal and transferable set of patterns that serve as a Litmus test for identifying networks containing backdoor/Trojan attacks, hence we call them Universal Litmus Patterns. To detect whether a model is poisoned or not, the ULPs are fed through the network, and the corresponding outputs (i.e., Logits) are classified to reveal backdoor attacks (See Figure 1b). + +# 3. Methods + +# 3.1. Threat Model + +Our threat model of interest is similar to [9, 19, 35] in which the adversary inserts a targeted backdoor into a DNN model. In short, for a given source class of clean training images, the attacker chooses a portion of the data and poisons them by adding a small trigger (a patch) to the image and assigning target labels to these poisoned images. The network then learns to designate the target label to the source images whenever the trigger appears in the input. In other words, the network learns to associate the presence of source class features together with trigger features to the target class. + +We consider the case in which the adversary is a third party that provides an infected DNN with a backdoor. The acquired model performs well on the clean test dataset available to the user, but exhibits targeted misclassification when presented with an input containing a specific and pre + +defined trigger. An adversary intentionally trains the model to have unsuspected behavior when presented with clean data, and to exhibit a targeted misclassification in the presence of a particular trigger. + +# 3.2. Defense Goals + +We are interested in detecting backdoor attacks in pretrained convolutional neural networks (CNNs). Our goal is a large-scale identification of untrusted third parties (i.e., parties that provided infected models). As far as knowledge about the attack, we assume no prior knowledge of the targeted class or the triggers used by attackers. Also, we assume no access to the poisoned training dataset. + +# 3.3. Formulation + +Let $\mathcal{X} \subseteq \mathbb{R}^d$ denote the image domain where $x_i \in \mathcal{X}$ denotes an individual image and let $\mathcal{Y} \subseteq \mathbb{R}^K$ denote the label space, where $y_i \in \mathcal{Y}$ represents the corresponding $K$ -dimensional labels/attributes for the $i$ 'th image, $x_i$ . Also, let $f: \mathcal{X} \to \mathcal{Y}$ represent a deep parametric model, e.g., a CNN that maps images to their labels. We consider the problem of having a set of trained models, $\mathcal{F} = \{f_n\}_{n=1}^N$ , where some of them are infected with backdoor attacks. Our goal is primarily to detect the infected models in a supervised binary classification setting, where we have a training set of models with and without backdoor attacks. The task is then to learn a classifier, $\phi: \mathcal{F} \to \{0,1\}$ , to discriminate the models and show generalizability of such classifier. + +There are three significant points here that turn this classification task into a challenging problem: 1) in distinct contrast to typical computer vision applications, the classification is not on images but trained models (i.e., CNNs), 2) the input models do not have a unified representation, i.e., they could have different architectures, including a different number of neurons, different depth, different activation functions, etc., and 3) The backdoor attacks could be different from one another in the sense that the target classes could be different, or the trigger perturbations could significantly vary during training and testing. In light of these challenges, we pose the main research question: how do we represent trained CNNs in a vector space that discriminates the poisoned models from the clean ones? We propose Universal Litmus Patterns as an answer to this question. + +Given pairs of models and their binary labels (i.e., poisoned or clean), $\{(f_n, c_n \in \{0, 1\})\}_{n=1}^N$ , we propose universal patterns $\mathcal{Z} = \{z_m \in \mathcal{X}\}_{m=1}^M$ such that analyzing $\{f_n(z_m)\}_{m=1}^M$ would optimally reveal the backdoor attacks. Figure 1 demonstrates the idea behind the proposed ULPs. For simplicity, we use $f_n(z_m)$ to denote the output logits of the classifier $f_n$ . Hence, the set $\mathcal{Z}$ provides a litmus test for existence of backdoor attacks. Particularly, we optimize + +$$ +\underset {z, h} {\arg \min } \sum_ {n = 1} ^ {N} \mathcal {L} \left(h \left(g \left(\left\{f _ {n} \left(z _ {m}\right) \right\} _ {m = 1} ^ {M}\right)\right), c _ {n}\right) + \lambda \sum_ {m = 1} ^ {M} R \left(z _ {m}\right) +$$ + +where $g(\cdot)$ is a pooling operator applied on $\mathcal{Z}$ , e.g., concatenation, $h(\cdot)$ is a classifier that receives the pooled vector as input and provides the probability for $f_{n}$ to contain a backdoor, $R(\cdot)$ is the regularizer for ULPs, and $\lambda$ is the regularization parameter. In our experiments, we let $g(\cdot)$ to be the concatenation operator, which concatenates $f_{n}(z_{m})\mathrm{s}$ into a $KM$ -dimensional vector, and set $h(\cdot)$ to be a softmax classifier. We point out that we have also tried other pooling strategies, including max-pooling over ULPs: $g(\mathcal{Z}) = \max_{m}\left(f_{n}(z_{m})\right)_{k}$ , or averaging over ULPs: $g(\mathcal{Z}) = \frac{1}{M}\sum_{m = 1}^{M}f_{n}(z_{m})$ , to obtain a $K$ -dimensional vector to be classified by $h(\cdot)$ . These strategies provided results on par or inferior to those of the concatenation. As for the regularizer, we used total variation (TV), which is $R(z_{m}) = \| \nabla z_{m}\|_{1}$ , where $\nabla$ denotes the gradient operator. + +Data augmentation has become a standard practice in learning, as the strategy often leads to better generalization performance. In computer vision and for images, for instance, knowing the desired invariances like translation, rotation, scale, and axis flips could help one to randomly perturb input images concerning these transformations and train the network to be invariant under such changes. Following the data augmentation idea, we would like to augment our training set such that the ULPs become invariant to various network architectures and potentially various triggers. The challenge here is that our input samples are not images, but models (i.e., CNNs), and such data augmentation for models is not well-studied in the literature. Here, to induce the effect of invariance to various architectures, we used random dropout [28] on models $f_{n}$ s for augmentation. + +# 3.4. Baselines + +# 3.4.1 Noise Input + +For our first baseline and as an ablation study to demonstrate the effect of optimizing ULPs, we feed randomly generated patterns (where channels of each pixel take a random integer value in [0, 255]). We then concatenate the logits of the clean and poisoned training networks and learn a softmax classifier on it. Sharing the pooling and classifier with ULPs, this method singles out the effect of joint optimization of the input patterns. We demonstrate that, surprisingly, this simple detection method could successfully reveal backdoor attacks in simple datasets (like MNIST), while it fails to provide a reliable performance on more challenging datasets, i.e., GTSRB and Tiny-ImageNet. + +# 3.4.2 Attack-Based Detection + +For our second baseline method, referred to as 'Neural-Cleanse,' we devise a technique similar to the Neural-Cleanse [35]. Given a trained model either poisoned or not, we choose a pair of source and target categories and perform a targeted evasion-attack with a universal patch (trig + +![](images/435305d0d4ff358fe22d9be2d4267e95ad647b3096e979c48fd902e35271ac62.jpg) +Figure 3. Performance of ULPs as a function of the poisoned-to-clean ratio for training the poisoned models on MNIST. + +ger). We optimize a trigger that can change the prediction from the source class to the target class for a set of clean input images. The rationale here is that finding a universal trigger that can reliably fool the model for all the clean source images is easier in a poisoned model. In other words, if such an attack is successful, it means that the given model might have a backdoor. Therefore, we iterate on all possible pairs of source and target classes and choose the loss of the most successful pair as a score for the cleanness of the model. The method in [35] assumes that the trigger size is not known. Hence, it uses a mask along with its $\ell_1$ norm in the loss to reduce the area of the trigger. However, $\ell_1$ of the mask can only reduce the number of non-zero values (i.e., increase sparsity) but cannot stop the trigger from spreading all over the image. To simplify, we assume the size of the trigger is known and remove the norm of the mask in our process. + +# 4. Experiments + +We experimented with four benchmark datasets in computer vision, namely the handwritten digits dataset, MNIST, [14], the CIFAR10 dataset [13], the German Traffic Sign Recognition Benchmark (GTSRB) dataset [29], and TinyImageNet [1]. For each dataset, we trained about $\sim 2000$ deep CNNs that achieved near state-of-the-art performance on these datasets; half of the CNNs were trained with backdoor triggers. We ensured that the poisoned and clean models performed similarly on the clean data, while the poisoned models had a high attack success rate ( $>90\%$ ) on poisoned inputs. We generated 20 triggers of size $7 \times 7$ pixels for Tiny-ImageNet and $5 \times 5$ pixels for the other datasets. For training and testing, we used non-overlapping sets of 10 randomly chosen triggers each from the set of 20. Figure 2 shows the triggers for GTSRB and the operation of a sample poisoned model on clean and poisoned data. + +We carried out detection of poisoned models on all datasets. Table 1 shows the area under the ROC curve for the two baselines and our proposed ULPs on all datasets. + +ULPs consistently outperformed the baselines with a large margin. Below, we explain the details of each experiment. + +# 4.1. MNIST Experiments + +For the MNIST experiments, we trained 900 clean models and 900 poisoned models. We used a similar architecture to that of the VGG networks [27] for each model. Each poisoned model is trained to contain a targeted backdoor attack from only one source class to a target class (MNIST has ten categories, and therefore there are 90 pairs of source and targets in total). For each pair of source and target, we train ten models using binary triggers. The default ratio of the number of poisoned to clean images during training is $50\%$ for all experiments. The triggers for the MNIST experiment are randomly assigned to one of the four corners of the image. The clean and poisoned models are split into training and testing models with 50/50 ratio, where the triggers for the poisoned models are chosen to be mutually exclusive between train and test models. In this manner, the trained ULPs are only tested on unseen test triggers. Figure 4a demonstrates the performance of the ULPs on detecting poisoned networks. With $M = 10$ ULPs, we can achieve an area under the curve (AUC) of nearly 1. In addition, ULPs outperformed both baselines. + +To check the sensitivity of our detection method to the strength of the attack, we reduced the ratio of the number of poisoned to clean images for training the poisoned models to $25\%, 12\%, 5\%$ , and $1\%$ . The intuition here is that models trained with a lower ratio of poisoned to clean samples contain a more subtle backdoor attack that could be more difficult to detect. To study this effect, we repeated the detection experiments for different ratios of poisoned to clean images. We show the probability of a successful attack and the AUCs for all detection methods in Figure 3. Here, we used a fixed number of input patterns, $M = 5$ , for ULPs and noise inputs in this experiment. Our method holds up the accuracy above $95\%$ even for small ratios, while for noise inputs, the accuracy drops to almost $60\%$ at the ratio of $1\%$ . + +# 4.2. CIFAR10 Experiments + +On the CIFAR10 dataset, we trained 500 clean models on the CIFAR10 dataset and 400 poisoned models on one set of triggers and 100 poisoned models on another set of triggers for testing. We used a similar model architecture to that of the VGG networks [27]. Each poisoned model contains a targeted attack between a random source and target pair, and with a random trigger from the mutually exclusive set of train and test triggers. As for the MNIST experiments, a trigger was randomly assigned to one of the four corners of the image. We used 800 models to train our ULPs and 200 models to test our learned ULPs. The triggers were again chosen to be mutually exclusive between train and test models. Figure 4b shows the results. + +Table 1. Average accuracy of the poisoned models on clean and poisoned data (i.e., attack accuracy) and the AUC scores of the presented detection methods on MNIST, CIFAR10, GTSRB, and Tiny-ImageNet datasets. This table summarizes Figures 4, and 6. + +
DatasetsClean Test AccuracyAttack AccuracyNoise InputNeural-CleanseUniversal Litmus Patterns
M=1M=5M=10M=1M=5M=10
MNIST (VGG-like)0.9941.000.940.900.860.940.940.991.00
CIFAR10 (STL+VGG-like)0.7950.9990.620.680.590.590.680.991.00
GTSRB (STL+VGG-like)0.9920.9720.610.590.540.740.750.880.90
GTSRB (STL+ResNet-like)0.9810.9770.560.550.58-0.550.960.96
Tiny-ImageNet (ResNet-like)0.4510.9920.610.500.54-0.860.940.92
+ +![](images/598291b2a12792b0da7e06b56e0abed745c7c1daf03dbd750a3df3ebe93292dc.jpg) +Figure 4. ROC-curves for detection of models with backdoor attacks (i.e., poisoned models) for baseline, random input images, and our proposed ULPs with $M \in \{1,5,10\}$ on MNIST (a), CIFAR10 (b), and GTSRB (c) datasets. The base model used in these experiments is a VGG-like architecture. Here, "Baseline" refers to Neural-Cleanse. + +![](images/bf5c789a837fad0402c192f0e9572a5c2bfff42a3c99e73668278ad4ac5c5cb1.jpg) + +![](images/6a12a4d1acde5f4ee614916251c4be36eb1c2d1539e943b83ec23bec0c001563.jpg) + +# 4.3. GTSRB Experiments + +For GTSRB, we trained two sets of 2,000 models, where each set contains 1,000 clean and 1,000 poisoned models. The first set contains VGG-like models [27] with an added Spatial Transformer Network (STN) [11] in the perception front of the model, and the second set contains a ResNet-like architecture [10] with added STN. The trained models, for both sets, achieved, on average, $99.4\%$ accuracy on the clean test data. For the attacks, we attached triggers at random locations on the surface of the traffic signs to mimic a sticker-like physical-world attack (Figure 2). Our train/test ratio is 50/50. Importantly, the source and target pairs of training and testing sets are mutually exclusive, and therefore the test models not only include new triggers but contain backdoor attacks only on unseen source and target pairs. + +We trained our ULPs on the training sets and report results on VGG models in Figure 4c and on ResNets in Figure 6 (a). On the VGG models, we show that ULPs are able to detect poisoned models with $AUC = 0.9$ for $M = 10$ patterns, while the Neural-Cleanse baseline only achieves $AUC = 0.74$ . Yet, Neural-Cleanse is significantly slower than our proposed method (90,000 times). Figure 5 shows the distribution of poisoned and clean VGG models for ULPs, noise images, and the Neural-Cleanse approach. + +# 4.4. Tiny-ImageNet Experiments + +For the Tiny-ImageNet dataset, we trained 1,000 clean models and 1,000 poisoned models. For the model, we used + +![](images/e09ac46f28ac52ce89b1acc04e8bdf11cd0ee88ca199d661d0f084e2986e8fc6.jpg) +Figure 5. The histogram of clean and poisoned classes based on our proposed ULPs with $M \in \{1, 5, 10\}$ , Noise input patterns with $M \in \{1, 5, 10\}$ , and Neural Cleanse. + +![](images/f633bd029f7af5772ab2cf907d7d0e4b14bc8d3993e1f72dbc05ca2aa3f837c2.jpg) + +a ResNet-like architecture [10] with an added Spatial Transformer Network [11] in the perception front of the model. The trained models achieved on average $45.1\%$ top-1 accuracy on the clean test data. For the backdoor attacks, we attached a 7x7 trigger at a random location in the image. Similar to the GTSRB experiment, the models are split into + +![](images/161b45935af77eb73903ee47a21a336315037882cc601e4e3bd267c0564f288e.jpg) + +![](images/8a0e29e7552421c222f89fcf77dc45fdb01249ce0bed84f9e210e8b0161aa7b8.jpg) +Figure 6. ROC-curves for detection of models with backdoor attacks (i.e., poisoned models) for random input images, and our proposed ULPs with $M \in \{1,5,10\}$ on GTSRB (a) and TinyImageNet (B). The base model used in these experiments is a ResNet18 architecture. + +train and test sets where the triggers for training and testing are mutually exclusive. Also, the train and test poisoned models have mutually exclusive source and target pairs. + +We trained our ULPs on the training set and report results for $M = 1,5$ , and 10 in Figure 6. We observe that ULPs are able to detect poisoned models with $AUC = 0.94$ for $M = 5$ patterns. The detection accuracy was $95.8\%$ . Figure 7 shows the $M = 10$ ULPs trained on Tiny-ImageNet. + +# 4.5. Computational cost + +ULPs allow fast detection, particularly, compared to the Neural-Cleanse baseline. The baseline requires $\mathcal{O}(K^2)$ optimizations, where each optimization involves a costly targeted evasion-attack (involving several epochs of forward and backward passes on all images from a class, e.g., 1000 for the MNIST dataset). In comparison, our proposed ULPs + +cost only $\mathcal{O}(M)$ forward passes through the network. The detection times for a single network on a single P100 GPU were many orders of magnitude faster for ULPs compared to the baseline: $\sim 20$ msec vs. $\sim 30$ mins for GTSRB, $\sim 18$ msec vs. $\sim 4$ mins for CIFAR10, and $\sim 10$ msec vs. $\sim 3$ mins for MNIST. The Neural-Cleanse baseline was not performed on Tiny-ImageNet due to its huge computational burden. + +# 4.6. Generalizability of ULPs + +So far, we have shown that the ULPs are capable of detecting poisoned models on unseen poisoning attacks (i.e., unknown triggers), however, for fixed architectures (i.e., known model type). A natural question is how generalizable are ULPs concerning different model architectures? To that end, we carried out additional experiments on GTSRB. On GTSRB, we trained 300 poisoned and 300 clean models with random VGG-like architectures and where we enforced randomness of networks by randomizing the depth, the number of convolutional kernels, and the number of fully connected units. Also, we trained 200 poisoned and 200 clean models with random ResNet18-like architectures where we, similarly, enforced randomness in the depth and the number of convolutional kernels. + +We then tested the trained ULPs (trained on a fixed architecture) on the randomized architectures. Figure 8 shows the generalizability results of the ULPs on these random models, where we also include the ROC curves of the fixed architecture for ease of comparison. The ULPs trained on fixed models remain to be generalizable to random architectures. Moreover, interestingly, we observed that the ULPs trained on a fixed VGG or ResNet architecture are also generalizable to other architecture types, albeit with some sensitivity loss; so, training ULPs on the same architecture type as used for detection is preferable. Finally, to measure the generalizability of the networks across different sizes of triggers on the GTSRB dataset, we trained ULPs (with $M = 5$ ) on poisoned models with $7 \times 7$ triggers. Then, we tested the ULPs on detecting poisoned models containing $5 \times 5$ trigger attacks. The ULPs successfully identified the poisoned models with 0.83 AUC. While generalizing from $5 \times 5$ to $7 \times 7$ resulted in 0.80 AUC. + +![](images/c58a18fe8042c4ca92f3207d5261527c6d027499224df938824e17dc6ce7e925.jpg) +Figure 7. Visualization of the optimal ULPs calculated on the Tiny-ImageNet dataset. + +![](images/47341314594e82d4f2307b26ad84c16c6d88965442c98a9ef114d32cbbf7e759.jpg) + +![](images/7a05d42dbeddb2b4977b7e496e98bd12708584b95655e83ecb7d8383d658d03e.jpg) + +![](images/58d6d36bb4a9a612ef18d2e7b764a3bd6a4d6bd6ba9968afead605a358f70181.jpg) + +![](images/e34a92712da77fead319763aab4d7fb8495bc01365657937e74558cd78ebfc46.jpg) + +![](images/1d149b708f07d7fe6d258be4bb87e06c8bc2dc841da0b92990126f115619e3de.jpg) +Generalizability of ULPs Trained on VGG + +![](images/42ab5e1c212e5798fcee594ca3e8b3ceeb55095e5e2ad9d98946d26f0f5a5f44.jpg) +Generalizability of ULPs Trained on ResNet18 +Figure 8. Generalizability of ULPs to random architectures on the GTSRB dataset. The generalizability of the noise baseline and the $M = 10$ ULPs trained on a fixed VGG architecture (a) and a fixed ResNet architecture (b) to random VGG and ResNet architectures. + +# 4.7. Adaptive Attacker + +We also conducted experiments with adaptive adversaries where the attacker has full access to the ULPs and the corresponding binary classifier. The attacker then regularizes the poisoning loss with the cross-entropy of the detector output and the one-hot vector of the clean class to fool the ULP detector. Unsurprisingly, we observed that the adaptively trained poisoned models could successfully bypass the ULP detector, though this type of full-access attack is often impractical. Interestingly, however, we found that the response of the models remained to be highly discriminant of clean, poisoned, and adaptively poisoned classes: Figure 9 shows the distribution of the pooled response for these models. This experiment suggests that the ULP defense can be hardened against adaptive attacks, for instance, by increasing the complexity of the binary classifier or utilizing more advanced model augmentations. + +# 5. Discussion + +We introduced a new method for detecting backdoor attacks in neural networks: Universal Litmus Patterns. The + +![](images/4521cd37982f43d8d85067e28bd8289105ea2c21be18ecf02d7bccb8c0568aa8.jpg) +Discriminant Subspace of $g(\{f(z_m)\}_{m = 1}^{10})$ +Figure 9. Distribution of the pooled output of clean, poisoned, and adaptively poisoned models for $M = 10$ input ULPs in the discriminant subspace. + +widespread use of downloadable trained neural network increases the risk of working with malicious poisoned networks: networks that were trained such that a visual trigger within an image causes a targeted or untargeted misclassification. So, there is a need for an efficient means to test if a trained network is clean. + +Our ULPs are input images that were optimized on a given set of trained poisoned and clean network models, $\{f_n\}$ . Here, we need access only to the input-output relationship of these models. So, our approach is agnostic to the network architecture. Moreover, in contrast to prior work, we do not need access to the training data itself. + +Surprisingly, our results show that a small set $(\leq 10)$ of ULPs was sufficient to detect malicious networks with relatively high accuracy, outperforming our baseline, which was based on Neural Cleansse [35]. Neural Cleanse is computationally expensive since it requires testing for all possible input-output class-label pairs. In contrast, each ULP requires only one forward pass through a CNN. + +We tested ULPs on a trigger set that was disjoint from the set used for optimization and on models different from the source models. We showed generalizability to new triggers as well as new architectures (i.e., random architectures). + +Our intuition for why ULPs work for detection is as follows: CNNs essentially learn patterns that are combinations of salient features of objects, and a CNN is nearly invariant to the location of these features. When a network was poisoned, it learned that a trigger is a key feature of a certain object. During our optimization process, each ULP is formed to become a collection of a wide variety of triggers. So, when presenting such a ULP, the network will respond positively with high probability if it was trained with a trigger. In future work, we will investigate ways to harden ULP-based detection against adaptive attacks. + +Acknowledgement: This work was funded in part under the following financial assistance awards: 60NANB18D279 from U.S. Department of Commerce, National Institute of Standards and Technology, funding from SAP SE, and also NSF grant 1845216. + +# References + +[1] Tiny ImageNet. https://tiny-imagenet. herokuapp.com/. Accessed: 2019-11-01. 2,5 +[2] Dario Amodei, Sundaram Ananthanarayanan, Rishita Anubhai, Jingliang Bai, Eric Battenberg, Carl Case, Jared Casper, Bryan Catanzaro, Qiang Cheng, Guoliang Chen, et al. Deep speech 2: End-to-end speech recognition in english and mandarin. In ICML, pages 173-182, 2016. 1 +[3] Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, et al. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316, 2016. 1 +[4] Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy (SP), pages 39-57. IEEE, 2017. 1 +[5] Bryant Chen, Wilka Carvalho, Nathalie Baracaldo, Heiko Ludwig, Benjamin Edwards, Taesung Lee, Ian Molloy, and Biplav Srivastava. Detecting backdoor attacks on deep neural networks by activation clustering. arXiv preprint arXiv:1811.03728, 2018. 2, 3 +[6] Yansong Gao, Chang Xu, Derui Wang, Shiping Chen, Damith C Ranasinghe, and Surya Nepal. Strip: A defence against trojan attacks on deep neural networks. arXiv preprint arXiv:1902.06531, 2019. 2 +[7] Hamed Ghoddusi, Germán G Creamer, and Nima Rafizadeh. Machine learning in energy economics and finance: A review. Energy Economics, 81:709-727, 2019. 1 +[8] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014. 1 +[9] Tianyu Gu, Brendan Dolan-Gavitt, and Siddharth Garg. Badnets: Identifying vulnerabilities in the machine learning model supply chain. arXiv preprint arXiv:1708.06733, 2017. 2, 3 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 1, 6 +[11] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In NeurIPS, pages 2017-2025, 2015. 6 +[12] Pang Wei Koh, Jacob Steinhardt, and Percy Liang. Stronger data poisoning attacks break data sanitization defenses. arXiv preprint arXiv:1811.00741, 2018. 2 +[13] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. 2, 5 +[14] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2324, 1998. 5 +[15] Yann LeCun, Corinna Cortes, and Christopher J.C. Burges. The MNIST database of handwritten digits [http://yann.lecun.com/exdb/mnist/index.html], 1998. 2 +[16] S Levine, C Finn, T Darrell, and P Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17:1334-1373, 2016. 1 + +[17] Cong Liao, Haoti Zhong, Anna Squicciarini, Sencun Zhu, and David Miller. Backdoor embedding in convolutional neural network models via invisible perturbation. arXiv preprint arXiv:1808.10307, 2018. 2 +[18] Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. Finepruning: Defending against backdooring attacks on deep neural networks. In Research in Attacks, Intrusions, and Defenses, pages 273-294, 2018. 2 +[19] Yingqi Liu, Shiqing Ma, Yousra Aafer, Wen-Chuan Lee, Juan Zhai, Weihang Wang, and Xiangyu Zhang. Trojaning attack on neural networks. 2017. 1, 2, 3 +[20] Yuntao Liu, Yang Xie, and Ankur Srivastava. Neural trojans. In 2017 IEEE ICCD, pages 45-48. IEEE, 2017. 2 +[21] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In CVPR, pages 1765–1773, 2017. 2 +[22] Luis Muñoz-González, Battista Biggio, Ambra Demontis, Andrea Paudice, Vasin Wongrassamee, Emil C Lupu, and Fabio Roli. Towards poisoning of deep learning algorithms with back-gradient optimization. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pages 27-38. ACM, 2017. 2 +[23] Mohammad Rostami, Soheil Kolouri, Eric Eaton, and Kyungnam Kim. Deep transfer learning for few-shot sar image classification. Remote Sensing, 11(11):1374, 2019. 1 +[24] Ali Shafahi, W Ronny Huang, Mahyar Najibi, Octavian Suciu, Christoph Studer, Tudor Dumitras, and Tom Goldstein. Poison frogs! targeted clean-label poisoning attacks on neural networks. In NeurIPS, pages 6103-6113, 2018. 1 +[25] Nida Shahid, Tim Rappon, and Whitney Berta. Applications of artificial neural networks in health care organizational decision-making: A scoping review. *PloS one*, 14(2), 2019. 1 +[26] Shawn Shan, Emily Willson, Bolun Wang, Bo Li, Haitao Zheng, and Ben Y Zhao. Gotta catch'em all: Using concealed trapdoors to detect adversarial attacks on neural networks. arXiv preprint arXiv:1904.08554, 2019. 2 +[27] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 5, 6 +[28] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929-1958, 2014. 4 +[29] J. Stallkamp, M. Schlipsing, J. Salmen, and C. Igel. Man vs. computer: Benchmarking machine learning algorithms for traffic sign recognition. *Neural Networks*, 32:323–332, 2012. 2, 5 +[30] Jacob Steinhardt, Pang Wei W Koh, and Percy S Liang. Certified defenses for data poisoning attacks. In NeurIPS, pages 3517-3529, 2017. 2 +[31] Octavian Suciu, Radu Marginean, Yigitcan Kaya, Hal Daume III, and Tudor Dumitras. When does machine learning {FAIL}? generalized transferability for evasion and poisoning attacks. In 27th {USENIX} Security Symposium (\{USENIX\} Security 18), pages 1299-1316, 2018. 2 + +[32] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. 1 +[33] Alexander Turner, Dimitris Tsipras, and Aleksander Madry. Clean-label backdoor attacks. 2018. 2 +[34] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, pages 5998-6008, 2017. 1 +[35] Bolun Wang, Yuanshun Yao, Shawn Shan, Huiying Li, Bimal Viswanath, Haitao Zheng, and Ben Y Zhao. Neural cleansse: Identifying and mitigating backdoor attacks in neural networks. In Proceedings of 40th IEEE Symposium on Security and Privacy. IEEE, 2019. 3, 4, 5, 8 \ No newline at end of file diff --git a/universallitmuspatternsrevealingbackdoorattacksincnns/images.zip b/universallitmuspatternsrevealingbackdoorattacksincnns/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5f75cae8144622c57d4333f3f729868a78756ade --- /dev/null +++ b/universallitmuspatternsrevealingbackdoorattacksincnns/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68868478cffed7f4cf44d9b7936c35b21699e5e51f87ad152994e003606568ef +size 649351 diff --git a/universallitmuspatternsrevealingbackdoorattacksincnns/layout.json b/universallitmuspatternsrevealingbackdoorattacksincnns/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f01e1d5d35f5dac0895089b22d77ca5ff66d658a --- /dev/null +++ b/universallitmuspatternsrevealingbackdoorattacksincnns/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92ba5cb076b58bb24b2f6af54c2e3999c3e16657dc1d453450a6d145e0df776d +size 340747 diff --git a/universalphysicalcamouflageattacksonobjectdetectors/6cef4d45-fd8d-4932-90b0-906d5fce20c8_content_list.json b/universalphysicalcamouflageattacksonobjectdetectors/6cef4d45-fd8d-4932-90b0-906d5fce20c8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f6ce331541f46a039a5e81ce07f1b4d686a25586 --- /dev/null +++ b/universalphysicalcamouflageattacksonobjectdetectors/6cef4d45-fd8d-4932-90b0-906d5fce20c8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35c953e0a1250863ddbb7f52c6b64d27cfc429236ec1bce1e9cb7a841645cf98 +size 98428 diff --git a/universalphysicalcamouflageattacksonobjectdetectors/6cef4d45-fd8d-4932-90b0-906d5fce20c8_model.json b/universalphysicalcamouflageattacksonobjectdetectors/6cef4d45-fd8d-4932-90b0-906d5fce20c8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9ed0d6a3e2a52ff3e888a04c8621a1c82eb15dcf --- /dev/null +++ b/universalphysicalcamouflageattacksonobjectdetectors/6cef4d45-fd8d-4932-90b0-906d5fce20c8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:193c4ce6ec2dba2c5b25b075d7a9e2029e802346aa97f8d4c29cbddca92b473d +size 120093 diff --git a/universalphysicalcamouflageattacksonobjectdetectors/6cef4d45-fd8d-4932-90b0-906d5fce20c8_origin.pdf b/universalphysicalcamouflageattacksonobjectdetectors/6cef4d45-fd8d-4932-90b0-906d5fce20c8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0da325d810e8b30280837d63061a6c008108c73f --- /dev/null +++ b/universalphysicalcamouflageattacksonobjectdetectors/6cef4d45-fd8d-4932-90b0-906d5fce20c8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:094bf9bdba8fa1cf48292dc305f07b014ea17242c90d8775a93a92e5c84ccbe6 +size 6626406 diff --git a/universalphysicalcamouflageattacksonobjectdetectors/full.md b/universalphysicalcamouflageattacksonobjectdetectors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4d32ef3f195aa660fd950a80d8554d2fec30686a --- /dev/null +++ b/universalphysicalcamouflageattacksonobjectdetectors/full.md @@ -0,0 +1,446 @@ +# Universal Physical Camouflage Attacks on Object Detectors + +Lifeng Huang $^{1,2}$ Chengying Gao $^{1}$ Yuyin Zhou $^{3}$ Cihang Xie $^{3}$ Alan Yuille $^{3}$ Changqing Zou $^{4,5}$ Ning Liu $^{1,2*}$ + +$^{1}$ School of Data and Computer Science, Sun Yat-sen University +$^{2}$ Guangdong Key Laboratory of Information Security Technology +$^{3}$ Department of Computer Science, The Johns Hopkins University + +4Max Planck Institute for Informatics, 5University of Maryland, College Park + +huanglf6@mail2.sysu.edu.cn, {mcsgcy, liuning2}@mail.sysu.edu.cn, + +{zhouuyuyiner, cihangxie306, alan.l.yuille, aaronzou1125}@gmail.com + +# Abstract + +In this paper, we study physical adversarial attacks on object detectors in the wild. Previous works mostly craft instance-dependent perturbations only for rigid or planar objects. To this end, we propose to learn an adversarial pattern to effectively attack all instances belonging to the same object category, referred to as Universal Physical Camouflage Attack (UPC). Concretely, UPC crafts camouflage by jointly fooling the region proposal network, as well as misleading the classifier and the regressor to output errors. In order to make UPC effective for non-rigid or non-planar objects, we introduce a set of transformations for mimicking deformable properties. We additionally impose optimization constraint to make generated patterns look natural to human observers. To fairly evaluate the effectiveness of different physical-world attacks, we present the first standardized virtual database, AttackScenes, which simulates the real 3D world in a controllable and reproducible environment. Extensive experiments suggest the superiority of our proposed UPC compared with existing physical adversarial attackers not only in virtual environments (AttackScenes), but also in real-world physical environments. Code and dataset are available at https://mesunhf.github.io/index_physical.html. + +# 1. Introduction + +Deep neural networks (DNNs) have achieved outstanding performances on many computer vision tasks [37, 8, 10]. Nonetheless, DNNs have been demonstrated to be vulnerable to adversarial examples [38] — maliciously crafted inputs that mislead DNNs to make incorrect predictions, which present potential threats for the deployment of DNN-based systems in the real world. + +![](images/d36b632fecfaeee69965175962115886d6803874083bf03db039d28797f7b065.jpg) + +![](images/6f63e50218bf90a5b56f4dd4e25d8eb51793357031f33e29faaf03c500ec2c0a.jpg) +Physical Attacks In Virtual Scenes + +![](images/c4e76da226011e25b94664f3533952242f3a746f59ad2f0e488384f12571af82.jpg) + +![](images/13a73d03430348f419642d56fd83f98d9aac26e5e9a0d4d825f8b26460654445.jpg) + +![](images/ce02334428ad071dff7ad0f93e45e0df7fbefedccb0044b656d4c55d76f0454e.jpg) + +![](images/269230999e2c5cf552f65724be5adadc69ba4cc355f96cdd03869e756cd980d9.jpg) + +![](images/b68f82285fbef0e9d4e0cc41c052160e4161412367f4e8886b3c762a03b132e0.jpg) + +![](images/6866b9e0e7bd6e9c13dfd45661e76083f75c2ed5d8177ac496a8bcbbc7375968.jpg) + +![](images/e7e1c2a13d36b87be543947bb473d2b2186141881eb1e0da0094621c99d70803.jpg) +correct detection +Figure 1. Fooling the object detector, faster r-cnn, in the physical space. (a) Physical attacks (UPC) in virtual scenes and (b) Physical attacks (UPC) in real world. Column 1 shows detection results with natural patterns. Column 2-4 display results with camouflage patterns under different viewing conditions. + +![](images/d21850b8567dfb9d973b9295000bb348e712114487a600a4ec20870ecee77522.jpg) +error detection + +Adversarial attacks [26, 2] in general can be divided into the following categories: 1) digital attacks, which mislead DNNs by modifying the input data directly in the digital space (e.g., pixel value [26, 11, 23], text content [15, 31]); 2) physical attacks, which attack DNNs by altering visible characteristics of an object (e.g., color [33], appearance [6]) in the physical world. Current mainstream works focus on the digital domain, which can be hardly transferred to the real world due to the lack of considering physical constraints (e.g., invariant to different environmental conditions such as viewpoint, lighting) [6]. In this paper, we study adversarial attacks in the physical world, which are more threatening to real-world systems [14]. Compared with previous works [3, 12, 1] which mostly focus on attacking image classification systems, we consider the far more realistic computer vision scenario, i.e., object detection. + +Though prior works have revealed the vulnerability of object detectors to adversarial perturbations in the real world [4, 36, 46], there are several limitations: (1) focusing on only attacking a specific object (e.g. a stop sign [6, 4], commercial logo [35] or car [46]); (2) generating perturbations only for rigid or planar objects (e.g., traffic sign, + +vehicle body, board [39]), which can be less effective for complex objects (articulated non-rigid or non-planar objects, e.g., human). (3) constructing meaningless which lack semantics and appear unnatural for human observers (i.e., noisy or mosaic-like texture) [4, 39, 46]; and (4) a unified evaluation environment is missing, which makes it difficult to make fair comparisons between different attacks. + +To address these issues, we present Universal Physical Camouflage Attack (UPC), which constructs a universal camouflage pattern to hide objects from being detected or to misdetect objects as the target label. Unlike former works which generate instance-level perturbations, UPC constructs a universal pattern to attack all instances that belong to the same category (e.g., person, cars) via jointly attacking the region proposal network, the classifier and the regressor. To efficiently handle the deformations of complex objects in the physical world, we propose to model their deformable characteristics as well as external physical environments in UPC. Specifically, the internal properties are simulated by applying various geometric transformations (e.g., cropping, resizing, affine homography). We impose additional optimization constraint to encourage the visual resemblance between generated patterns and natural images, which we refer to as semantic constraint. As shown in Fig. 1, these camouflage patterns are visually similar to natural images and thus can be regarded as texture patterns on object surfaces such as human accessories/car paintings. The overall pipeline is illustrated in Fig. 2. + +To fairly evaluate the effectiveness of different physical attacks, we provide the first standardized synthetic dataset, i.e., AttackScenes. All experimental data is generated under strict parametric-controlled physical conditions to ensure that the evaluation is reliable under virtual settings. + +The contributions of our work are four-fold: + +- UPC constructs a universal camouflage pattern for effectively attacking object detectors based on the fact that the generated pattern can be naturally camouflaged as texture patterns on object surfaces such as human accessories/car paintings. +- We present the first standardized dataset, AttackScenes, which is simulates the real 3D world under controllable and reproducible settings, to ensure that all experiments are conducted under fair comparisons for future research in this domain. +- To make UPC effective for articulated non-rigid or non-planar objects, we introduce additional transformations for the camouflage patterns to simulate their internal deformations. +- Our proposed UPC not only achieves state-of-the-art result for attacking object detectors in the wild, but also exhibits well generalization and transferability among different models. + +Table 1. Comparison with existing methods. + +
MethodsRigidNon-RigidPlanarNon-PlanarUniversalSemantic
[4]✓✓
[36]✓✓
[46]✓✓✓
Ours✓✓✓✓✓✓
+ +# 2. Related Works + +Universal Adversarial Attack. Image-agnostic attack, i.e., universal adversarial attack [25, 13], is defined as an attack which is able to fool different images with a single global pattern in the digital domain. Here we extend this definition to the physical domain and define instance-agnostic perturbations as universal physical attacks for object detectors. Unlike former physical attack methodologies which craft instance-level patterns, our goal is to generate a single camouflage pattern to effectively attack all instances of the same object category given different physical scenes. + +Physical Attacks. Stem from the recent observation that printed adversarial examples can fool image classifiers in the physical world [14, 12], efforts have been investigated to study how to construct "robust" adversarial examples in the real physical world. For instance, Athalye et al. [1] propose to construct 3D adversarial objects by attacking an ensemble of different image transformations; Sharif et al. [33] successfully attack facial recognition systems by printing textures on eyeglasses; Evtimov et al. [6] use poster, sticker and graffiti as perturbations to attack stop signs in the physical world. Zeng et al. [45] apply computer graphics rendering methods to perform attacks in the 3D physical world. In addition, adversarial attacks also extend to fool tracking system and Re-Identification models [40, 41]. + +Recently, physical attacks have also been studied for the more challenging scenario of object detection. Song et al. [36] propose a disappearance and creation attack to fool Yolov2 [28] in traffic scenes. Chen et al. [4] adopt the expectation over transformation method [1] to create more robust adversarial stop signs, which mislead faster r-cnn [30] to output errors. Zhang et al. [46] learn the clone network to approximate detectors under black-box scenario. However they cannot be effectively applied to non-rigid or non-planar objects since they only focus on simulating external environment conditions, e.g., distances or viewpoints, for attacking object detectors. In addition, these approaches generate instance-dependent patterns which exhibit less semantics and therefore the perturbed images are usually unnatural and noisy. Different from these works, our method constructs a universal semantic pattern which makes the perturbed images visually similar to natural images. Meanwhile, we introduce additional transformations to simulate the deformable properties of articulated non-rigid or non-planar objects. A detailed comparison with former methods is summarized in Table. 1. + +![](images/f7de8a2e410dc4640aaa90274db3f5b63d181a66b3b8ca4110b3a4421d960d2f.jpg) +(a) Training in Digital Space + +![](images/5e241e60de4797216ff254c60a8a404f0a5ba1e9c456747fd57da77bee79c63a.jpg) +(b) Attacking in Physical Space +Figure 2. The overall pipeline of UPC. (a) training the camouflage patterns in digital space; (b) attacking the target in physical space. + +# 3. Methodology + +# 3.1. Overview + +Our goal is to attack object detectors by either hiding the object from being detected, or fooling detectors to output the targeted label. Without loss of generality, we use "person" category as an example to illustrate our method. + +Training framework of UPC in Digital Space. We attack faster-rcnn [30], a two-stage detector, under white-box settings. In the first stage, the region proposal network is employed to generate object proposals. In the second stage, the detector selects top-scored proposals to predict labels. We propose to craft a universal pattern for faster-rcnn by jointly fooling the region proposal network to generate low-quality proposals, i.e., reduce the number of valid proposals, as well as misleading the classifier and the regressor to output errors. Simply misleading predictions of the classification head cannot produce satisfying results (discussed in Sec. 5.2) because it can be impractical to attack enormous candidate proposals simultaneously. Extensive experimental results also validate that the joint attack paradigm demonstrates stronger attacking strength than simply attacking the classifier as in prior methods [4, 6] (Table 3). Furthermore, to deal with complex objects, we propose to simultaneously model both internal deformable properties of complex objects and external physical environments. The internal attributes of objects, i.e., deformations, are simulated by a series of geometric transformations. As illustrated in Fig. 2(a), UPC consists of 3 steps: + +- Step 1. A set of perturbed images are synthesized by simulating external physical conditions (e.g., viewpoint) as well as internal deformations of complex objects. An additional optimization constraint is imposed to make the generated patterns semantically meaningful (Sec. 3.2). +- Step 2. Initial adversarial patterns are generated by attacking the RPN, which results in a significant drop of high-quality proposals (Sec. 3.3). +- Step 3. To enhance the attacking strength further, UPC then jointly attacks RPN as well as the classification and the bounding box regression head by lowering the detection scores and distorting the bounding box (Sec. 3.4). + +We perform these steps in an iterative manner until the termination criterion is satisfied, i.e., fooling rate is larger than the threshold or the iteration reaches the maximum. + +Attacking in Physical Space. By imposing the semantic constraint (Sec. 3.2), the generated camouflage patterns by UPC look natural for human observers and thus can be regarded as texture patterns on human accessories. Concretely, we pre-define several regions of human accessories (e.g., garment, mask) to paint on the generated camouflage patterns (Fig. 4) for attacking, and the corresponding physical scenes are captured under different viewing conditions (e.g., illumination, viewpoints) for testing (Fig. 2(b)). + +# 3.2. Physical Simulation + +Material Constraint. To keep generated adversarial patterns less noticeable, the perturbations are camouflaged as texture patterns on human accessories (e.g., garment, mask). External environments are simulated via controlling factors such as lighting, viewpoint, location and angle [4, 6]. To effectively handle non-rigid or non-planar objects, we also introduce addition transformation functions to model their internal deformations (Eq. 2). + +Semantic Constraint. Inspired by the imperceptibility constraint in digital attacks, we use the projection function (Eq. 1) to enforce the generated adversarial patterns to be visually similar to natural images during optimization. Empirical results show that optimizing with this constraint yields high-quality semantic patterns, which can be naturally treated as camouflages on human clothing (Fig. 8). + +Training Data. To obtain universal patterns, images with different human attributes (body sizes, postures, etc.) are sampled as the training set $\mathcal{X}$ . + +In summary, the perturbed images are generated by: + +$$ +\delta^ {t} = \operatorname {P r o j} _ {\infty} \left(\delta^ {t - 1} + \Delta \delta , I, \epsilon\right), \tag {1} +$$ + +$$ +\hat {\mathcal {X}} = \left\{\hat {x} _ {i} \mid \hat {x} _ {i} = T _ {r} \left(x _ {i} + T _ {c} \left(\delta^ {t}\right)\right), x _ {i} \sim \mathcal {X} \right\}. \tag {2} +$$ + +Eq. 1 is the semantic constraint, where $\delta^t$ and $\Delta \delta$ denote the adversarial pattern and its updated vector at iteration $t$ , respectively. $Proj_{\infty}$ projects generated pattern onto the surface of $L_{\infty}$ norm-balls with radius $\epsilon$ and centered at $I$ . Here we choose $I$ as natural images to ensure the generated camouflage patterns are semantically meaningful. Eq. 2 is the + +physical simulation we applied during the attack, where $T_{r}$ is applied to all training images and used for the environmental simulation (e.g., illumination). $T_{c}$ is acted on generated patterns, which is used for modeling the material constraint (e.g., deformations induced by stretching). $\hat{x}$ is the generated perturbed image (marked as blue in Fig. 2(a)). + +# 3.3. Region Proposal Network (RPN) Attack + +For an input image with height $H$ and width $W$ , the RPN extracts $M = O(HW)$ proposals across all anchors. We denote the output proposals of each image $\hat{x}$ as $\mathcal{P} = \left\{p_i | p_i = (s_i, \vec{d_i}); i = 1, 2, 3 \dots M\right\}$ , where $s_i$ is the confidence score of $i$ -th bounding box and $\vec{d_i}$ represents the coordinates of $i$ -th bounding box. We define the objective function for attacking the RPN as following: + +$$ +L _ {r p n} = \underset {p _ {i} \sim \mathcal {P}} {\mathbb {E}} \left(\mathcal {L} \left(s _ {i}, y ^ {t}\right) + s _ {i} \| \vec {d} _ {i} - \Delta \vec {d} _ {i} \| _ {p}\right), \tag {3} +$$ + +where $y^{t}$ is the target score, and we set $y^{1}$ for background and $y^{0}$ for foreground; $\mathcal{L}$ is the Euclidean distance loss; $\Delta \vec{d}_i$ is a pre-defined vector, which used for attacking proposals by shifting the center coordinate and corrupting the shape of original proposals; $p$ is the norm constant and we set $p = 1$ in the experiment. + +By minimizing $L_{rpn}$ , our goal is to generate adversarial patterns for RPN which results in a substantial reduction of foreground proposals and severely distorted candidate boxes (marked as red in Fig. 2(a)). + +# 3.4. Classifier and Regressor Attack + +After applying non-maximum suppression (NMS) on the outputs of RPN, top- $k$ proposals are ordered by their confidence scores and selected as a subset $\hat{\mathcal{P}}$ . These top-scored proposals $\hat{\mathcal{P}}$ are then fed to the classification and the regression head for generating final outputs. We note that if only a subset of proposed bounding boxes are perturbed, the detection result of the attacked image may still be correct if a new set of candidate boxes is picked in the next iteration, which results in great challenges for attackers. To overcome this issue, we instead extract proposals densely as in [43]. Specifically, we attack an object by either decreasing the confidence of the groundtruth label or increasing the confidence of the target label. We further enhance the attacking strength by distorting the aspect ratio of proposals and shifting the center coordinate simultaneously [17]. In summary, we attack the classification and the regression head by: + +$$ +L _ {c l s} = \underset {p \sim \hat {\mathcal {P}}} {\mathbb {E}} C (p) _ {y} + \underset {p \sim \mathcal {P} ^ {*}} {\mathbb {E}} \mathcal {L} \left(C (p), y ^ {\prime}\right), \tag {4} +$$ + +$$ +L _ {r e g} = \sum_ {p \sim \mathcal {P} ^ {*}} \| R (p) _ {y} - \Delta \vec {d} \| _ {l}, \tag {5} +$$ + +where $\mathcal{L}$ is the cross-entropy loss, $C$ and $R$ are the prediction output of the classifier and the regressor. $\mathcal{P}^*$ is the + +Algorithm 1 Algorithm of UPC +Input: Training images $\mathcal{X}$ ; Target label $y^\prime$ ; Balance parameters $\lambda_1, \lambda_2$ ; Iteration parameters $iter_s$ and $iter_{max}$ ; Fooling rate threshold $r_s$ ; +Output: Universal adversarial pattern $\delta$ ; Fooling rate $r$ ; +1: $\delta^0 \gets$ random, $\Delta \delta \gets 0$ , $r \gets 0$ , $t \gets 0$ +2: while $t < iter_{max}$ and $r < r_s$ do +3: $t \gets t + 1$ , $\delta^t \gets Proj_{\infty}(\delta^{t-1} + \Delta \delta, I, \epsilon)$ +4: for all $x_i \sim \mathcal{X}$ do +5: Choose the transformation of $T_r$ and $T_c$ randomly +6: $\hat{x}_i = clip(T_r(x_i + T_c(\delta^t)), 0, 1)$ +7: end for +8: Calculate the fooling rate $r$ of perturbed images $\hat{\mathcal{X}}$ +9: if $t < iter_s$ and $r < r_s$ then +10: $\underset{\Delta \delta}{\text{argmin}} \mathbb{E}_{\hat{x}_i \sim \hat{\mathcal{X}}} L_{rpn} + L_{tv}$ +11: else +12: $\underset{\Delta \delta}{\text{argmin}} \mathbb{E}_{\hat{x}_i \sim \hat{\mathcal{X}}} (L_{rpn} + \lambda_1 L_{cls} + \lambda_2 L_{reg}) + L_{tv}$ +13: end if +14: end while + +proposals which can arybe detected as true label $y$ , and $y'$ is the target label for attacking. $\Delta \vec{d}$ denotes the distortion offset. We select $\ell_2$ norm, i.e., $l = 2$ in Eq. 5. Eq. 4 and Eq. 5 are designed for fooling the classifier and the regressor, respectively, and are referred to as C&R attack (marked as green in Fig. 2(a)). For untargeted attack, we set $y = y'$ for maximizing (instead of minimizing) Eq. 4. + +# 3.5. Two-Stage Attacking Procedure + +In summary, UPC generates the physical universal adversarial perturbations by considering all the factors above: + +$$ +\underset {\Delta \delta} {\operatorname {a r g m i n}} \underset {\hat {x} \sim \hat {\mathcal {X}}} {\mathbb {E}} \left(L _ {r p n} + \lambda_ {1} L _ {c l s} + \lambda_ {2} L _ {r e g}\right) + L _ {t v} \left(\delta^ {t}\right), \tag {6} +$$ + +where $\delta$ and $\hat{\mathcal{X}}$ denote the universal pattern and the set of perturbed images, respectively. $L_{tv}$ stands for the total variation loss [24] with $\ell_2$ norm constraint applied. We note that $L_{tv}$ is important for reducing noise and producing more natural patterns. + +The overall procedure of UPC is illustrated in Algorithm 1, where we alternately update the universal perturbation pattern $\delta$ and the perturbed images $\hat{x} \sim \hat{\mathcal{X}}$ until the fooling rate becomes larger than a certain threshold or the attack iteration reaches the maximum. $\delta$ is updated using a two-stage strategy. During the first stage, we exclusively attack the RPN to reduce the number of valid proposals, i.e., set $\lambda_1 = 0$ and $\lambda_2 = 0$ in Eq. 6. After significantly reducing the number of high-quality proposals, our attack then additionally fools the classification and bounding box regression head in the second stage. By minimizing Eq. 6, the generated perturbation $\delta$ substantially lowers the quality of proposals and thereby achieves a high fooling rate. + +![](images/4d38ca4b28bd3c71baf14421a62634b0227a652f2877f30fcdd689b48ced97e2.jpg) + +![](images/313ddc68be7d68d0c6746d5d2406f44eeed87bbd452eddf2d68fbd2dfa2d9e0c.jpg) +detected as correct label + +![](images/2676b23e0fada49d1ac38377f897e4672da6e2aae51733c9d694e8bb6fd086c1.jpg) + +![](images/dccff3406ee49bdb731696d3e71444ec88d416b2dabcc76c6745b96e161fcc04.jpg) + +![](images/d974b57bd7a9ab1dee81f41237aa81cb888204e7e582bbf7edfa7cccf98c23d0.jpg) + +![](images/8eb2101a1c769c07178dcfe99d536a27ef2e55df6ea3860f6e8871a1766486a6.jpg) + +![](images/07bc077158b5b60ca83c7e9058fb3f9295826586b10004368533581196708daa.jpg) + +![](images/829c85333dcfc6e62b3292144b74e854c637059903850e89d47592c8a93671c7.jpg) + +![](images/f186deb5782930ec4ca8a974f06641a94b959a1012a4ae3f6815ca3fbaeec759.jpg) + +![](images/3fd5c9eac512415634db99d72d6c66f222861efc36cd82e25c0df5a1f808a495.jpg) + +![](images/2c76860a99f22bedec7cb3ae2e31eaf67e4a2cce1dd365efc580fe869509d612.jpg) +Figure 3. Examples of virtual scene experiments. Virtual scenes (i.e., AttackScenes) are shown in the first row, including indoors and outdoors environments. The second rows show results captured under various physical conditions with different pattern schemes. + +![](images/f82a652e7800b56a60057bd03d25e2d3ef89a4785fee08f55d75291abeba9ab8.jpg) +detected as target label + +![](images/6a2cb7fb81b35395a393bd612201e936226ff808aff2c27cb7a977cd922ed4e2.jpg) +detected as others / undetectd + +![](images/6f9025d7cc343cad47503d87a8bc484d052363bac99153657df38107b92dd1dc.jpg) +Original +Figure 4. Examples of pattern schemes in the virtual scenes experiment. Original: humans without camouflage patterns; Naive: humans with simple camouflages (i.e., army camouflage cloths, pilot cap and snow goggles); Natural: humans with natural images as camouflage patterns. 3/7/8-Patterns: according to the heatmaps of detection models, we pre-define 3/7/8 regions on human accessories to paint on the generated camouflage patterns. + +![](images/5984e1ed14e2ab5062f53e3c7984d829194cfb82e661efbd6a504367f74acddd.jpg) +Naive + +![](images/f6babd263507be9c003024fd2bf1298c608f3ed6e09e845f778745201ae56373.jpg) +Natural + +![](images/e38072a1247859710befab117e6dd31b72c7c2411e5838db4a9bc6202b728280.jpg) +3-Patterns + +![](images/a27d9a7f943bb3c35d96b7756e4a6061105e48a3b0e6f1b6541b693359a5d012.jpg) +7-Patterns + +![](images/8c47ade91c75825e16eaf57095973b3c04ac82707c81e20e5556a1da2757397c.jpg) +8-Patterns + +# 4. AttackScenes Dataset + +Due to the lack of a standardized benchmark dataset, earlier works measure the performance under irreproducible physical environments, which makes it difficult to make fair comparisons between different attacks. To this end, we build the first standardized dataset, named AttackScenes, for fair and reproducible evaluation. + +**Environments. AttackScenes** includes 20 virtual scenes under various physical conditions (Fig. 3). Specifically, there are 10 indoors scenes (e.g., bathroom, living room) and 10 outdoors scenes (e.g., bridge, market) in total. + +Camera Setting. For each virtual scene, 18 cameras are placed for capturing images from different viewpoints. To ensure the diversity of images, these cameras are located at different angles, heights and distances (Fig. 2(b)). + +Illumination Control. To the best of our knowledge, earlier studies usually conduct tests in bright environments. However, this simulated condition is quite limited since there exist many dark scenes in the real world. Accordingly, we extend the testing environment to better simulate different daily times like evening and dawn. Area lights and directional light sources are used to simulate indoors and outdoors illuminations, respectively. The illumination varies from dark to bright at 3 levels by controlling the strength of light sources (i.e., L1~L3). + +# 5. Experiments + +In this section, we empirically show the effectiveness of the proposed UPC by providing thorough evaluations in both virtual and physical environments. + +# 5.1. Implementation Details + +We mainly evaluate the effectiveness of our method on "person" category due to its importance in video surveillance and person tracking [16]. We collect 200 human images with various attributes (e.g., hair color, body size) as our training set to generate universal adversarial patterns. Following [43], we evaluate the performance of faster r-cnn using 2 network architectures (i.e., VGG-16 [34] and ResNet-101[8]) which are either trained on the PascalVOC-2007 trainval, or on the combined set of PascalVOC-2007 trainval and PascalVOC-2012 trainval. We denote these models as FR-VGG16-07, FR-RES101-07, FR-VGG16-0712 and FR-RES101-0712. + +Parameters setting. We set fooling rate threshold $r_s = 0.95$ , $iter_s = 100$ and the maximum iteration $iter_{max} = 2000$ in Algorithm 1. More parameters and transformation details are recorded in sec. 1 of supplementary material. + +Evaluation Metric. For faster r-cnn, we set the threshold of NMS as 0.3 and the confidence threshold as 0.5 (instead of the default value 0.8). Even though IoU is used for standard evaluation of object detection, we do not use this metric here since our focus is whether the detector hits or misses the true label of the attacked instance. To this end, we extend the metrics in [4, 6] to be applicable in our experiments, precision $p_{0.5}$ , to measure the probability of whether the detector can hit the true category: + +$$ +p _ {0. 5} = \frac {1}{| \mathcal {X} |} \sum_ {v \sim \mathbb {V}, b \sim \mathbb {B}, s \sim \mathbb {S}} \left\{C (x) = y, C (\hat {x}) = y \right\}, \tag {7} +$$ + +where $x$ is the original instance and $\hat{x}$ denotes the instance with camouflage patterns. $\mathbb{V}, \mathbb{L}, \mathbb{S}$ denote the sets of camera viewpoints, brightness and scenes, respectively; $C$ is the prediction of detector and $y$ is the groundtruth label (i.e., person, car). + +Table 2. Average precision $p_{0.5}$ in virtual scene experiments after attacking faster r-cnn. Note that $p_{0.5}$ is averaged over all viewpoints of each pattern scheme under 3 brightness conditions. + +
NetworkFR-VGG16-0712FR-RES101-0712
SchemesStandingStanding
L1L2L3Avg (Drop)L1L2L3Avg (Drop)
Original0.970.971.00.98 (-)0.990.991.00.99 (-)
Naive0.970.970.990.97 (0.01)0.990.990.990.99 (0.0)
Natural0.950.960.980.96 (0.02)0.970.970.980.97 (0.02)
3-Patterns0.640.360.180.39 (0.59)0.730.690.700.69 (0.30)
7-Patterns0.550.330.220.37 (0.61)0.510.480.640.54 (0.45)
8-Patterns0.150.030.020.07 (0.91)0.100.090.130.11 (0.88)
SchemesWalkingWalking
L1L2L3Avg (Drop)L1L2L3Avg (Drop)
Original0.930.940.990.95 (-)0.980.991.00.99 (-)
Naive0.920.940.960.94 (0.01)0.980.970.980.98 (0.01)
Natural0.910.930.950.93 (0.02)0.980.990.980.98 (0.01)
3-Patterns0.370.260.160.26 (0.69)0.440.500.500.48 (0.51)
7-Patterns0.280.250.160.23 (0.72)0.310.330.340.33 (0.66)
8-Patterns0.060.050.010.04 (0.91)0.050.060.060.06 (0.93)
SchemesSittingSitting
L1L2L3Avg (Drop)L1L2L3Avg (Drop)
Original0.970.990.990.98 (-)1.00.990.990.99 (-)
Naive0.930.940.950.94 (0.04)0.930.920.930.93 (0.06)
Natural0.940.940.980.95 (0.03)0.970.980.980.98 (0.01)
3-Patterns0.830.640.630.70 (0.28)0.750.770.790.77 (0.22)
7-Patterns0.830.770.630.74 (0.24)0.770.780.780.78 (0.21)
8-Patterns0.600.470.320.46 (0.52)0.490.570.620.56 (0.43)
+ +# 5.2. Virtual Scene Experiment + +Human Model and Pattern Schemes. We select human models in AttackScenes with different poses (i.e., standing, walking and sitting) as the attacking target. 6 different schemes (Fig. 4) are used under the material constraint (Sec. 3.2) for experimental comparison. + +Comparison Between Pattern Schemes. In the virtual scene experiment, $1080(20 \times 3 \times 18)$ images are rendered for each pattern scheme. Without loss of generality, we choose "dog" and "bird" as target labels to fool detectors in our experiment. We use 6 different pattern schemes illustrated in Fig. 4 for validating the efficacy of the proposed UPC. + +As shown in Table 2, we find that the attack strength is generally weaker in darker environments. This can be attributed to the fact that the adversarial patterns are badly captured when the level of brightness is low, which induces low-quality attacks. Additionally, we observe that for different human poses the average precision almost stays at the same level via attacking Naive/Natural pattern scheme which indicates that simply using naive camouflage or natural images as adversarial patterns is invalid for physical attacks. By contrast, our method yields a distinct drop rate of $p_{0.5}$ for all 3 pattern schemes (i.e., 3/7/8-Pattern schemes), among which 8-Pattern scheme observes the highest performance drop (i.e., Standing: $p_{0.5}$ drops from 0.98 to 0.07 using FR-VGG16). It is no surprise to observe such a phenomenon since using more generated patterns for physical attack results leads to a higher fooling rate. The detection result further shows our attack is invariant to different viewing conditions (e.g., viewpoints, brightness). Additionally, we also find that among these 3 poses "Sitting" is the most difficult to attack since some patterns (e.g., pants or cloth patterns) are partially occluded (see sampled images from Fig. 1 and Fig. 3). + +Table 3. Performance comparison with prior arts of physical attacks under different settings. We record $p_{0.5}$ and drop rate averaged over all viewpoints of 8-pattern scheme. + +
NetworkFR-VGG16-0712
SetupStandingWalkingSitting
UPCrc(ours)0.07 (0.91)0.04 (0.91)0.46 (0.52)
UPCr(ours)0.66 (0.32)0.33 (0.62)0.76 (0.22)
CLSrc(ours)0.18 (0.80)0.06 (0.89)0.54 (0.44)
Shape [4]0.70 (0.28)0.39 (0.56)0.78 (0.20)
ERP2[6]0.85 (0.13)0.48 (0.47)0.87 (0.11)
AdvPat [39]0.77 (0.21)0.31 (0.64)0.78 (0.20)
NetworkFR-RES101-0712
SetupStandingWalkingSitting
UPCrc(ours)0.11 (0.88)0.06 (0.93)0.56 (0.43)
UPCr(ours)0.73 (0.26)0.42 (0.57)0.86 (0.13)
CLSrc(ours)0.30 (0.69)0.16 (0.83)0.65 (0.34)
Shape [4]0.83 (0.16)0.47 (0.52)0.88 (0.11)
ERP2[6]0.79 (0.20)0.44 (0.55)0.91 (0.08)
AdvPat [39]0.91 (0.08)0.71 (0.28)0.93 (0.06)
+ +Compare with Existing Attacks. We compare UPC with existing physical attacks under the following settings (Table 3): (1) both internal deformations $T_{c}$ and external physical environments $T_{r}$ are simulated in Eq. 2, denoted as $UPC_{rc}$ ; (2) only external physical environments are modeled, i.e., $T_{r}$ is used in Eq. 2, denoted as $UPC_{r}$ . (3) only attack the classification head, i.e., $L_{cls}$ is used to generate patterns, denoted as $CLS_{rc}$ ; (4) ShapeShifter [4], i.e., only use $T_{r}$ in Eq. 2 and attack against the classifier, denoted as Shape. (5) we follow [36] by extending $RP^{2}$ [6] for attacking faster r-cnn, denoted as $ERP^{2}$ , and (6) Adversarial Patches [39], which utilize various transformations to fool all proposals across images, denote as $AdvPat$ . These six scenarios were tested under same training setup (detailed in sec.1 of supplementary material). + +The performance of 8-patterns scheme is recorded in Table 3, and the implications are two-fold. First, we can see the drop rates of $p_{0.5}$ in $UPC_{rc}$ and $CLS_{rc}$ are significantly higher than those of $UPC_{r}$ , $SS$ and $ERP^{2}$ . These quantitative results indicate that the proposed transformation function $T_{c}$ can effectively mimic the deformations (e.g., stretching) of complex objects. Second, $UPC_{rc}$ and $UPC_{r}$ outperform $CLS_{rc}$ and $Shape$ , which suggest that the joint attack paradigm (i.e., RPN and C&R attack) generally shows stronger attacking strength than only attacking the classification head [4]. In conclusion, all these experimental results demonstrate the efficacy of the proposed transformation term $T_{c}$ as well as the joint attack paradigm for fooling object detectors in the wild. Moreover, our proposed UPC outperforms existing methods [4, 6, 39], and thereby establish state-of-the-art for physical adversarial attack on proposal-based object detectors. + +The visualization of discriminative regions are showed in supplementary material [32]. We can observe that the UPC has superior attacking capability while other methods can not depress the activated features of un-occluded parts effectively, which may lead higher detection accuracy. + +![](images/b4eb4a3899aedbb9dc0511065c6caacc6bc6a8fe9e8a173b806cfbc246845245.jpg) +(a) + +![](images/dc2434393506279dc1efa307b5691fc40d62fe7d90ddad10b4ba8a4a23534cdb.jpg) + +![](images/42e00a2e6e5f40ae255be846d255e5358a8cde40df4b1fb9949e92b6ef0ec7a3.jpg) + +![](images/3d20582745b7e512967438d1e73a003379814f278ecdda4e9937468a8d855ed5.jpg) + +![](images/762556e2057512e6d26fbcdd8c21d15079e8d27bec87a47f478c901dd7ab8e04.jpg) + +![](images/5f95b26e7ddc23aa7a9b61213f53434dd2850b043d46c06ce911286e0e46e70f.jpg) +detected as person +Figure 5. Experimental results in (a) stationary testing and (b) motion testing. The camouflage is generated by FR-VGG16. + +![](images/4757987cab464e06b0441f99f5a2e98fcc6cf55451b0c04d2132b85197fb786f.jpg) + +![](images/408c5dd3ccc22184541a57127482e14ea46c188b69badec71b68e7ef5d5281b6.jpg) +detected as target label + +![](images/363e50caabd063b5146296ffe4f885bdf953230b154d57811550aa50e16d5357.jpg) + +![](images/f948cc246229a4c0092c0f8dcb0dce973f8ee499b0082254cc1314523d148964.jpg) + +# 5.3. Physical Environment Experiment + +Following the setup of virtual scene experiments, we stick the same camouflage pattern on different volunteers with diverse body sizes and garment styles. During the physical experiment, we use Sonyα7r camera to take photos and record videos. Our physical experiments include two parts: stationary testing and motion testing. + +Stationary Testing. In the physical world, we choose 5 scenes including indoors and outdoors scenes under different lighting conditions. Similar to virtual scene experiments, we take 18 photos of the attacked person for each pattern scheme. To evaluate the robustness of our method under different deformations, the person is required to switch from 6 different poses (i.e., standing, sitting, leg lifting, waving hands, fork waist, shaking head) during photographing (Fig. 5(a)). We record the average precision $p_{0.5}$ and drop rates of FR-VGG16-0712 and FR-RES101-0712 under three brightness conditions in Table 4 (detailed in sec.2 of supplementary material). Similar to our findings in Sec. 5.2, UPC expresses its superior attacking capability in the real physical world compared to natural image patterns which results in nearly zero drop rate in every posture. + +As can be seen from Table 2 and Table 4, the behaviors of detectors exhibit similar trends under different physical conditions such as lighting conditions in both virtual scenes and physical environments. Another noteworthy comment is that the generated patterns from virtual scene experiments demonstrate high transferability to the real physical world (Table 4). These facts indicate that our AttackScenes is a suitable dataset to study physical attacks. + +Motion Testing. To further demonstrate the efficacy of UPC, we also test our algorithm on human motions. The video clips were obtained under different physical conditions (e.g., different lighting conditions, scenes) while the volunteers are walking towards the camera. Meanwhile, they are randomly changing postures from the 6 classes as mentioned above. A total of 3693 frames where 583, 377, 219, 713, 804 and 997 frames are collected under 5 different physical scenes so as to make this dataset diverse and representative. And the detection precisions are $26\%$ (150/583), $21\%$ (80/377), $17\%$ (37/219), $34\%$ (240/713), $15\%$ (118/804) and $24\%$ (240/997), respectively. Experi + +Table 4. Average precision ${p}_{0.5}$ and drop rate under 3 brightness conditions in stationary testing. + +
NetworkFR-VGG16-0712FR-RES101-0712
SchemesStandingShaking HeadStandingShaking Head
Original1.0 (-)1.0 (-)1.01.0 (-)
Natural0.98 (0.02)0.98 (0.02)0.98 (0.02)1.0 (0.0)
3-Patterns0.67 (0.33)0.74 (0.26)0.72 (0.28)0.76 (0.24)
7-Patterns0.59 (0.41)0.59 (0.41)0.59 (0.41)0.57 (0.43)
8-Patterns0.17 (0.83)0.20 (0.80)0.19 (0.81)0.20 (0.80)
SchemesFork WaistLeg LiftingFork WaistLeg Lifting
Original1.0 (-)1.0 (-)1.0 (-)1.0 (-)
Natural1.0 (0.0)1.0 (0.0)1.0 (0.0)1.0 (0.0)
3-Patterns0.72 (0.28)0.74 (0.26)0.76 (0.24)0.71 (0.29)
7-Patterns0.56 (0.44)0.54 (0.46)0.57 (0.43)0.57 (0.43)
8-Patterns0.20 (0.80)0.26 (0.74)0.24 (0.76)0.30 (0.70)
SchemesRasing HandsSittingRasing HandsSitting
Original1.0 (-)1.0 (-)1.0 (-)1.0 (-)
Natural0.98 (0.02)1.0 (0.0)1.0 (0.0)1.0 (0.0)
3-Patterns0.83 (0.17)0.76 (0.24)0.85 (0.15)0.74 (0.26)
7-Patterns0.65 (0.35)0.54 (0.46)0.69 (0.31)0.59 (0.41)
8-Patterns0.35 (0.65)0.22 (0.78)0.35 (0.65)0.26 (0.74)
+ +![](images/9f97389380ff61757fb9ea92882890bdff61bd58d9c4e35df08f2ad97650b1d6.jpg) +(a) + +![](images/0dad4a5b355f7ac43ae2dc53cbf43ef402607981e219bdf6fc4ca69958515cd8.jpg) +(b) +Figure 6. The precision $p_{0.5}$ of detectors under different angle/distance conditions. We note that high viewing angle or far distance can make attacks less effective. + +ments in all physical scenes have observed low detection rates, which further confirms the effectiveness of UPC. The detection results of some sampled frames are shown in Fig. 5(b), where people are detected as "dog". We find this attack is much more effective under brighter conditions. This phenomenon coincides with previous observations in virtual scene studies (Sec. 5.2), and also further justify the potential value of AttackScenes. Moreover, we find that blurred camouflage patterns during motion make UPC less effective, which lead to higher detection accuracy. + +We also plot the relationship between the detection precision vs. angle/distance under 8-Pattern schemes as in Fig. 6. It can be concluded that when the absolute value of the angle/distance between the person and the camera becomes larger, camouflage patterns are captured with lower quality and thus hampering the attacks. + +# 5.4. Transferability Experiment + +We generate camouflage patterns from one architecture to attack other models. In our experiment, FR-VGG16-0712 and FR-RES101-0712 are used to compute camouflage patterns. We introduce ResNet-50, ResNet-152 and MobileNet [9] based faster r-cnn which are trained on MS-COCO2014 [20] dataset as transfer-testing models. Other architecture models including R-FCN (ResNet101) [5], SSD (VGG-16) [21], Yolov2 [28], Yolov3 [29] and RetinaNet [19] are considered in our transferability experiments. Eight models are publicly available, and we denote them as FR-RES50-14, FR-RES152-14, FR + +![](images/28fe25941fa9375edb067bc0ac78b2e293a319155d92beeec636023c2177ebe4.jpg) +detected as car + +![](images/259cb0ffc4655dece5da91a8258199633dfb358136e98a724f912556b13e699e.jpg) +detected as others + +![](images/bfaa1822f748450115b9dc6d2fde384e95f52eb23d60a64ba8be40170db03c79.jpg) +undetected + +![](images/b3230a3b9bed176211b39e43a17914ef18fe439b829eafdc18a7183e4a67b5be.jpg) +Figure 8. Generated camouflage patterns are semantically meaningful. Even for unconstrained patterns, human observer can relate the generated camouflage patterns to the targeted label. + +![](images/aa03204353bf3e20e9b540ee16c4455c08fa14623c357c533d26964c41322890.jpg) +Figure 7. The results of attacking Volvo XC60 (top row) and Volkswagen Tiguan (bottom row). The generated camouflage patterns fool detectors to misrecognize the car as bird. + +![](images/a5a0f9f3aae835d0ce6c097b27a52ef2c63b6d3ec360a1426edd13908c434ed7.jpg) + +![](images/dacc66afd9ab67db641ed6bfeeec29917e0403710a17f1bebe97ce167be4326b.jpg) + +Table 5. Average precision $p_{0.5}$ in transferability testing. First seven rows show the results of cross-training transfer testing, and rest five rows display the cross-network transfer's results (bold in "Network" column). + +
NetworkOriginalFR-VGG16-0712FR-RES101-0712
Average (Drop)Average (Drop)
FR-VGG16-07120.950.04 (0.91)0.10 (0.85)
FR-RES101-07120.990.78 (0.21)0.06 (0.93)
FR-VGG16-070.950.08 (0.87)0.11 (0.84)
FR-RES101-070.990.51 (0.48)0.10 (0.89)
FR-RES50-141.00.85 (0.15)0.78 (0.22)
FR-RES152-141.00.62 (0.38)0.43 (0.57)
FR-MN-140.990.51 (0.48)0.25 (0.74)
RFCN-RES101-07 [5]0.980.64 (0.34)0.41 (0.57)
SSD-VGG16-0712 [21]0.750.13 (0.62)0.16 (0.59)
Yolov2-14 [28]1.00.59 (0.41)0.38 (0.62)
Yolov3-14 [29]1.00.69 (0.31)0.71 (0.29)
Retina-14 [19]1.00.72 (0.31)0.49 (0.51)
+ +MN-14, RFCN-RES101-07, SSD-VGG16-0712, Yolov2-14, Yolov3-14 and Retina-14. The confidence threshold of all models is set as 0.5 for evaluation. + +The following experiments are conducted: (1) Cross-Training Transfer. The transferability between source and attacked models have the same architecture but are trained on different datasets (e.g., using the pattern generated from FR-VGG16-0712 to attack FR-VGG16-07); (2) Cross-Network Transfer. The transferability through different network structures (e.g., using the pattern computed from FR-VGG16-0712 to attack Yolov3-14). + +For transfer experiments, virtual walking humans with 8-Patterns scheme (Fig. 4) are used to evaluate the transferability under transfer attacks. The transfer performances are illustrated in Table 5. The original pattern scheme is used to calculate the baseline precision of each model (denoted as "Original" in Table 5). We observe the precisions of all detectors have dropped, which means the generated patterns exhibit well transferability and generality across different models and datasets. It is noteworthy to mention our proposed UPC also successfully breaks 4 state-of-the-art defenses [18, 42, 7, 27] (see Supplementary). + +# 5.5. Generalization to Other Categories + +To demonstrate the generalization of UPC, we construct camouflage patterns by untargeted attacks to fool the "car" category (i.e., rigid but non-planar object). We use Volvo XC60 (champagne) and Volkswagen Tiguan (white) as the attacking target in the real world. The pattern will be re + +![](images/90efe58cc41cb7671f956264c742757b8f273434f2c304761ef3b520f5240131.jpg) +Ca +w/ constraint + +![](images/7a26772dd82010c68e1c408c07fe18ad9bab4aa451ca69e3ee05876c3d876130.jpg) + +![](images/de30f1568dff15ddea2ca58ab43333314eae64e72dcf4c21739e6a1a84a3321a.jpg) +Ca +w/o constraint + +![](images/f9cd4afa16903bc00ff55464bdd37dae2267f50e1a7d9d9b150a85af5f8896ff.jpg) +# + +garded as car paintings by human observers. In order to not affect driving, we restrict the camouflage coverage regions to exclude windows, lightings, and tires. We collect 120 photos which includes different distances $(8\sim 12m)$ and angles $(-45^{\circ}\sim 45^{\circ})$ in 5 different environments (Fig. 7). The video is recorded simultaneously at same angles. The performance of pure non-camouflage car is $p_{0.5} = 1$ , while after attacking only $24\%$ (29/120) images and $26\%$ (120/453) frames are detected as "car" correctly, which verifies the efficacy of UPC. + +# 6. Discussion + +Abstract Semantic Patterns. A side finding is that the generated patterns without semantic constraint (Eq. 1) can be less semantic meaningful but exhibits abstract meanings (Fig. 8). This observation suggests that human and machine classification of adversarial images are robustly related as suggested in [47]. + +Defense Method Evaluation. With the development of defense methods in digital domain [22, 44], we hope the collected dataset, AttackScenes, can benefit future research of defense methods against physical attacks. + +# 7. Conclusion + +In this paper, we study the problem of physical attacks on object detectors. Specifically, we propose UPC to generate universal camouflage patterns which hide a category of objects from being detected or to misdetect objects as the target label by state-of-the-art object detectors. In addition, we present the first standardized benchmark dataset, AttackScenes, to simulate the real 3D world in controllable and reproducible environments. This dataset can be used for accessing the performance of physical-world attacks at a fair standard. Our study shows that the learned universal camouflage patterns not only mislead object detectors in the virtual environment, i.e., AttackScenes, but also attack detectors successfully in the real world. + +# Acknowledgements + +This work was supported by National Key Research and Development Plan in China (2018YFC0830500), National Natural Science Foundation of China under Grant (61972433), Fundamental Research Funds for the Central Universities (19lgjc11, 19lgyjs54). + +# References + +[1] Anish Athalye, Logan Engstrom, Andrew Ilyas, and Kevin Kwok. Synthesizing robust adversarial examples. arXiv preprint arXiv:1707.07397, 2017. +[2] Arjun Nitin Bhagoji, Warren He, Bo Li, and Dawn Song. Practical black-box attacks on deep neural networks using efficient query mechanisms. In European Conference on Computer Vision, pages 158-174. Springer, 2018. +[3] Tom B Brown, Dandelion Mane, Aurko Roy, Martin Abadi, and Justin Gilmer. Adversarial patch. arXiv preprint arXiv:1712.09665, 2017. +[4] Shang-Tse Chen, Cory Cornelius, Jason Martin, and Duen Horng Polo Chau. Shapeshifter: Robust physical adversarial attack on faster r-cnn object detector. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 52-68. Springer, 2018. +[5] Jifeng Dai, Li Yi, Kaiming He, and Sun Jian. R-fcn: Object detection via region-based fully convolutional networks. 2016. +[6] Ivan Evtimov, Kevin Eykholt, Earlence Fernandes, Tadayoshi Kohno, Bo Li, Atul Prakash, Amir Rahmati, and Dawn Song. Robust physical-world attacks on deep learning models. arXiv preprint arXiv:1707.08945, 1:1, 2017. +[7] Chuan Guo, Mayank Rana, Moustapha Cisse, and Laurens Van Der Maaten. Countering adversarial images using input transformations. arXiv preprint arXiv:1711.00117, 2017. +[8] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. +[9] Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andretto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. +[10] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4700-4708, 2017. +[11] Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. arXiv preprint arXiv:1804.08598, 2018. +[12] Steve TK Jan, Joseph Messou, Yen-Chen Lin, Jia-Bin Huang, and Gang Wang. Connecting the digital and physical world: Improving the robustness of adversarial attacks. In The Thirty-Third AAAI Conference on Artificial Intelligence (AAAI'19), 2019. +[13] Valentin Khrulkov and Ivan Oseledets. Art of singular vectors and universal adversarial perturbations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8562-8570, 2018. +[14] Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. arXiv preprint arXiv:1607.02533, 2016. +[15] Jinfeng Li, Shouling Ji, Tianyu Du, Bo Li, and Ting Wang. Textbugger: Generating adversarial text against real-world applications. arXiv preprint arXiv:1812.05271, 2018. + +[16] Jianan Li, Xiaodan Liang, ShengMei Shen, Tingfa Xu, Ji-ashi Feng, and Shuicheng Yan. Scale-aware fast r-cnn for pedestrian detection. IEEE transactions on Multimedia, 20(4):985-996, 2018. +[17] Yuezun Li, Daniel Tian, Xiao Bian, Siwei Lyu, et al. Robust adversarial perturbation on deep proposal-based models. arXiv preprint arXiv:1809.05962, 2018. +[18] Fangzhou Liao, Ming Liang, Yinpeng Dong, Tianyu Pang, Xiaolin Hu, and Jun Zhu. Defense against adversarial attacks using high-level representation guided denoiser. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1778-1787, 2018. +[19] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. Focal loss for dense object detection. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. +[20] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. +[21] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng Yang Fu, and Alexander C. Berg. Ssd: Single shot multibox detector. In European Conference on Computer Vision, 2016. +[22] Xuanqing Liu, Yao Li, Chongruo Wu, and Cho-Jui Hsieh. Adv-bnn: Improved adversarial defense through robust bayesian neural network. arXiv preprint arXiv:1810.01279, 2018. +[23] Xin Liu, Huanrui Yang, Ziwei Liu, Linghao Song, Hai Li, and Yiran Chen. Dpatch: An adversarial patch attack on object detectors. arXiv preprint arXiv:1806.02299, 2018. +[24] Aravindh Mahendran and Andrea Vedaldi. Understanding deep image representations by inverting them. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5188-5196, 2015. +[25] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1765-1773, 2017. +[26] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2574–2582, 2016. +[27] Aaditya Prakash, Nick Moran, Solomon Garber, Antonella DiLillo, and James Storer. Deflecting adversarial attacks with pixel deflection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8571-8580, 2018. +[28] Joseph Redmon and Ali Farhadi. Yolo9000: better, faster, stronger. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7263-7271, 2017. +[29] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767, 2018. +[30] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region + +proposal networks. In Advances in neural information processing systems, pages 91-99, 2015. +[31] Suranjana Samanta and Sameep Mehta. Towards crafting text adversarial samples. arXiv preprint arXiv:1707.02812, 2017. +[32] Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In Proceedings of the IEEE International Conference on Computer Vision, pages 618-626, 2017. +[33] Mahmood Sharif, Sruti Bhagavatula, Lujo Bauer, and Michael K Reiter. Accessorize to a crime: Real and stealthy attacks on state-of-the-art face recognition. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, pages 1528-1540. ACM, 2016. +[34] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +[35] Chawin Sitawarin, Arjun Nitin Bhagoji, Arsalan Mosenia, Mung Chiang, and Prateek Mittal. Darts: Deceiving autonomous cars with toxic signs. arXiv preprint arXiv:1802.06430, 2018. +[36] Dawn Song, Kevin Eykholt, Ivan Evtimov, Earlence Fernandes, Bo Li, Amir Rahmati, Florian Tramer, Atul Prakash, and Tadayoshi Kohno. Physical adversarial examples for object detectors. In 12th {USENIX} Workshop on Offensive Technologies (\{WOOT\} 18), 2018. +[37] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818-2826, 2016. +[38] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. +[39] Simen Thys, Wiebe Van Ranst, and Toon Goedemé. Fooling automated surveillance cameras: adversarial patches to attack person detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019. +[40] Zhibo Wang, Siyan Zheng, Mengkai Song, Qian Wang, Alireza Rahimpour, and Hairong Qi. advpattern: Physical-world attacks on deep person re-identification via adversarially transformable patterns. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[41] Rey Reza Wiyatno and Anqi Xu. Physical adversarial textures that fool visual object tracking. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[42] Cihang Xie, Jianyu Wang, Zhishuai Zhang, Zhou Ren, and Alan Yuille. Mitigating adversarial effects through randomization. arXiv preprint arXiv:1711.01991, 2017. +[43] Cihang Xie, Jianyu Wang, Zhishuai Zhang, Yuyin Zhou, Lingxi Xie, and Alan Yuille. Adversarial examples for semantic segmentation and object detection. In Proceedings + +of the IEEE International Conference on Computer Vision, pages 1369-1378, 2017. +[44] Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan L Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 501-509, 2019. +[45] Xiaohui Zeng, Chenxi Liu, Yu-Siang Wang, Weichao Qiu, Lingxi Xie, Yu-Wing Tai, Chi Keung Tang, and Alan L Yuille. Adversarial attacks beyond the image space. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[46] Yang Zhang, Hassan Foroosh, Philip David, and Boqing Gong. Camou: Learning physical vehicle camouflages to adversarially attack detectors in the wild. 2018. +[47] Zhenglong Zhou and Chaz Firestone. Humans can decipher adversarial images. Nature communications, 10(1):1334, 2019. \ No newline at end of file diff --git a/universalphysicalcamouflageattacksonobjectdetectors/images.zip b/universalphysicalcamouflageattacksonobjectdetectors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..22d6e88ca72521937cfbcdb514f9442894cd51bf --- /dev/null +++ b/universalphysicalcamouflageattacksonobjectdetectors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40645b2047e136dec2a2cc573831835a02c4e04e24123dc9855457bd913962bd +size 626112 diff --git a/universalphysicalcamouflageattacksonobjectdetectors/layout.json b/universalphysicalcamouflageattacksonobjectdetectors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..140356a58af23dbba66f1271a355e78e5181a88f --- /dev/null +++ b/universalphysicalcamouflageattacksonobjectdetectors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b424ebf00a79760fb62574c0e425bab0a0e1da9025cc521952d8b52eaae2844 +size 560183 diff --git a/universalsourcefreedomainadaptation/dd0c777d-b2e5-4ef0-8488-c360ffb508cf_content_list.json b/universalsourcefreedomainadaptation/dd0c777d-b2e5-4ef0-8488-c360ffb508cf_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b20dc65277065ca9a98d6c5f0504f9d53da6aeaf --- /dev/null +++ b/universalsourcefreedomainadaptation/dd0c777d-b2e5-4ef0-8488-c360ffb508cf_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6af403a4d6ae1eabc37ac9b093836834320d3f1571e29056efebcd3ccde1bdde +size 80217 diff --git a/universalsourcefreedomainadaptation/dd0c777d-b2e5-4ef0-8488-c360ffb508cf_model.json b/universalsourcefreedomainadaptation/dd0c777d-b2e5-4ef0-8488-c360ffb508cf_model.json new file mode 100644 index 0000000000000000000000000000000000000000..15a40b73e517771bbeef57a665597b69eccfa3a0 --- /dev/null +++ b/universalsourcefreedomainadaptation/dd0c777d-b2e5-4ef0-8488-c360ffb508cf_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf33820ba155c034c76fe669351a03205da2a76814cc3e975dc72548181058e3 +size 102249 diff --git a/universalsourcefreedomainadaptation/dd0c777d-b2e5-4ef0-8488-c360ffb508cf_origin.pdf b/universalsourcefreedomainadaptation/dd0c777d-b2e5-4ef0-8488-c360ffb508cf_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a286417e019ce955d8eb0c241566aaf07055c36e --- /dev/null +++ b/universalsourcefreedomainadaptation/dd0c777d-b2e5-4ef0-8488-c360ffb508cf_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:948cd11cd12243d5bedbeec8a0d613075c80115a53430ccdc4c473f8f876cea2 +size 2367950 diff --git a/universalsourcefreedomainadaptation/full.md b/universalsourcefreedomainadaptation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..bd6ded326f54885958bbc8ac377dc46d2848a9e7 --- /dev/null +++ b/universalsourcefreedomainadaptation/full.md @@ -0,0 +1,295 @@ +# Universal Source-Free Domain Adaptation + +Jogendra Nath Kundu* Naveen Venkat* Rahul M V R. Venkatesh Babu +Video Analytics Lab, CDS, Indian Institute of Science, Bangalore + +# Abstract + +There is a strong incentive to develop versatile learning techniques that can transfer the knowledge of class-separability from a labeled source domain to an unlabeled target domain in the presence of a domain-shift. Existing domain adaptation (DA) approaches are not equipped for practical DA scenarios as a result of their reliance on the knowledge of source-target label-set relationship (e.g. Closed-set, Open-set or Partial DA). Furthermore, almost all prior unsupervised DA works require coexistence of source and target samples even during deployment, making them unsuitable for real-time adaptation. Devoid of such impractical assumptions, we propose a novel two-stage learning process. 1) In the Procurement stage, we aim to equip the model for future source-free deployment, assuming no prior knowledge of the upcoming category-gap and domain-shift. To achieve this, we enhance the model's ability to reject out-of-source distribution samples by leveraging the available source data, in a novel generative classifier framework. 2) In the Deployment stage, the goal is to design a unified adaptation algorithm capable of operating across a wide range of category-gaps, with no access to the previously seen source samples. To this end, in contrast to the usage of complex adversarial training regimes, we define a simple yet effective source-free adaptation objective by utilizing a novel instance-level weighting mechanism, named as Source Similarity Metric (SSM). A thorough evaluation shows the practical usability of the proposed learning framework with superior DA performance even over state-of-the-art source-dependent approaches. Our implementation is available on github1. + +# 1. Introduction + +Deep learning models have proven to be highly successful over a wide variety of tasks [20, 35]. However, a majority of these are heavily dependent on access to a huge amount of labeled data to achieve a reliable level of generalization. A recognition model trained on a certain distribution of labeled samples (source domain) often fails to generalize [7] + +![](images/139083b09fc82c98a5f3ad7eb8bfbf04f4a95eac5b8141f6cf0708ffcad08326.jpg) +Figure 1: We address unsupervised domain adaptation in absence of source data (source-free), without any category-gap knowledge (universal). A lock indicates "no access" during adaptation. + +when deployed in a new environment (target domain) with discrepancy in the data distribution [43]. Unsupervised Domain Adaptation (DA) algorithms seek to minimize this discrepancy without accessing the target label information, either by learning a domain invariant feature representation [26, 21, 9, 45], or by learning independent transformations [28, 32] to a common latent representation through adversarial distribution matching [46, 22]. + +Most of the existing approaches [38, 56, 46] assume a shared label set between the source and the target domains (i.e. $\mathcal{C}_s = \mathcal{C}_t$ ), i.e. Closed-Set DA (Fig. 2A). Though this assumption helps gain various insights for DA algorithms [2], it rarely holds true in real-world scenarios. Recently, researchers have independently explored two broad adaptation settings by partly relaxing the Closed-Set assumption (see Fig. 2A). In the first kind, Partial DA [54, 5, 6], the target label space is considered as a subset of the source label space (i.e. $\mathcal{C}_t \subset \mathcal{C}_s$ ). This setting is more suited for large-scale universal source datasets, which will almost always subsume the label set of a wide range of target domains. However, the availability of such a large-scale source is highly questionable for a wide range of input domains. In the second kind, Open-set DA [39, 1, 10], the target label space is considered as a superset of the source label space (i.e. $\mathcal{C}_t \supset \mathcal{C}_s$ ). The major challenge in this setting is to detect target samples from the unobserved categories (similar to detection of out-of-distribution samples [31]) in a fully-unsupervised scenario. Apart from the above two extremes, certain works define a partly mixed scenario by allowing a "private" label + +set for both source and target domains (i.e. $\mathcal{C}_s\setminus \mathcal{C}_t\neq \emptyset$ and $\mathcal{C}_t\backslash \mathcal{C}_s\neq \emptyset$ ) but with extra supervision such as few-shot labeled data [30] or the knowledge of common categories [4]. + +Most of the prior approaches [46, 39, 5] consider each scenario in isolation and propose independent solutions. Thus, the knowledge of the relationship between the source and the target label space (category-gap) is required to carefully choose whether to apply Closed-set, Open-set or Partial DA algorithm for the problem in hand. Furthermore, all the prior unsupervised DA works require the coexistence of source and target samples even during deployment, hence are not source-free. This is highly impractical, as labeled source data may not be accessible after deployment due to several reasons. Many datasets are withheld due to privacy concerns (e.g. biometric data) [29] or simply due to the proprietary nature of the dataset. Moreover, in real-time deployment scenarios [51], training on the entire source data is not feasible due to computational limitations. Even otherwise, an accidental loss (e.g. data corruption) of the source data renders the prior unsupervised DA methods non-viable for a future model adaptation [25]. Acknowledging these issues, we aim to formalize a unified solution for unsupervised DA completely devoid of these limitations. Our problem setting is illustrated in Fig. 1 (note source-free and universal). + +The available DA techniques heavily rely on the adversarial discriminative [46, 56, 38] strategy. Thus, they require access to the source samples to reliably characterize the source domain distribution. Clearly, such approaches are not equipped to operate in a source-free setting. Though a generative model can be used as a memory-network [41, 3] to realize source-free adaptation, such a solution is not scalable for large-scale source datasets (e.g. ImageNet [36]), as it introduces unnecessary additional parameters along with the associated training difficulties [40]. As a novel alternative, we hypothesize that, to facilitate source-free adaptation, the source model should have the ability to reject samples that are out of the source data distribution [14]. + +In general, fully-discriminative deep models have a tendency to over-generalize for regions not covered by the training set, hence are highly confident in their predictions even for negative samples [24]. Though this problem can be addressed by training the source model on a negative source dataset, a wrong choice of negative data makes the model incapable of rejecting unknown target samples encountered after deployment [42]. Aiming towards a data-free setting, we hypothesize that the target samples have similar local part-based features as found in the source data, which also holds for novel target categories as encountered in Open-set DA. For example, consider an animal classification model (see Fig. 2B) where the deployed environment contains novel target categories unobserved in the source dataset (e.g. Giraffe). Here, the composition of local regions (e.g. body-parts) between pairs of source images drawn from different + +![](images/025f950ff42840d91a90e9f35f62daa50f850a6b43673552e496c1509d4751e6.jpg) +Figure 2: a) Various label-set relationships (category-gap). b) Composite image as a reliable negative sample. + +categories (e.g. Seahorse and Tiger) can be used to synthetically generate hypothetical negative classes which can act as a proxy for the unobserved animal categories. Such synthetic samples are a better approximation of the expected characteristics (e.g. long-neck) in the deployed target environment, as compared to samples from other unrelated datasets. + +In summary, we propose a convenient DA framework, which is equipped to address Universal Source-Free Domain Adaptation. A thorough evaluation shows the practical usability of our approach with superior DA performance even over state-of-the-art source dependent approaches, across a variety of unknown label-set relationships. + +# 2. Related work + +We briefly review the available domain adaptation methods under the three major divisions according to the assumption on label-set relationship. a) Closed-set DA. The cluster of prior closed-set $DA$ works focuses on minimizing the domain gap at the latent space either by minimizing well-defined statistical distance functions [49, 8, 55, 37] or by formalizing it as an adversarial distribution matching problem [46, 17, 27, 16, 15] inspired from the Generative Adversarial Nets [11]. Certain prior works [41, 57, 15] use the GAN framework to explicitly generate target-like images translated from the source image samples, which is also regarded as pixel-level adaptation [3] in contrast to other feature level adaptation works [32, 46, 26, 28]. b) Partial DA. [5] proposed to achieve adversarial class-level matching by utilizing multiple domain discriminators furnishing a class-level and an instance-level weighting for individual data samples. [54] proposed to utilize importance weights for source samples depending on their similarity to the target domain data using an auxiliary discriminator. To effectively address the problem of negative-transfer [50], [6] employed a single discriminator to achieve both adversarial adaptation and class-level weighting of source samples. c) Open-set DA. [39] proposed a more general open-set $DA$ setting without accessing the knowledge of source-private labels in contrast to [33]. They extended the classifier to accommodate an additional "unknown" class, which is adversarially trained against other source classes to detect target-private samples. + +B. Open-set DA +![](images/58554f4f2345c6818e5d10d348172e9abd8e664f4b08361d5f3df63fd9daea23.jpg) +Rearrangement of source-clusters and class-boundaries to accommodate target clusters + +C. Partial DA +![](images/fe24de3bcd76bf474ba25b8ef39e54e0b61f7f8b4fb9c648a7ad03938d6bf49a.jpg) +Source-private class Source-shared class Simulated negative class + +![](images/6cdff08a09f6e415646c981db7ac908bc36db4226634fb4f9af7903a379cac20.jpg) + +A. Source model +![](images/7e7b46b55245ec7f25b80b9f7dafbcfcc618653343a6593f6eef6e0ac8100912.jpg) +Target-private class Target-shared class Classifier boundary + +![](images/7e75652da939d0cb2b95ecb6f2667891cb12fe0f4ef5afda7d9445c0b07b6456.jpg) +Figure 3: Latent space cluster arrangement during adaptation (see Section 3.1.1). + +D. Universal Source-Free DA +![](images/ff700e02e446c82d6438541b35d4568bf28e1f204b1c4634578b3e1e2fba2b36.jpg) +Intra-class compactness with inter-class separability using negative classes +Frozen class boundaries + +d) Universal DA. [52] proposed the Universal DA setting, which requires no prior knowledge of label-set relationship (see Fig. 2A), similar to our proposed setting, but considers access to both source and target samples during adaptation. + +# 3. Proposed approach + +Our approach to solve the source-free domain adaptation problem is broadly divided into a two stage process. Note, source-free DA means the adaptation step is source-free. See Supplementary for a notation table. + +a) Procurement stage. In this stage, we have a labeled source dataset, $\mathcal{D}_s = \{(x_s,y_s):x_s\sim p,y_s\in \mathcal{C}_s\}$ , where $p$ is the distribution of source samples and $\mathcal{C}_s$ denotes the label-set of the source domain. Here, the prime objective is to equip the model for a future source-free adaptation, where the model will encounter an unknown domain-shift and category-gap in the target domain. To achieve this we rely on an artificially generated negative dataset, $\mathcal{D}_n = \{(x_n,y_n):x_n\sim p_n,y_n\in \mathcal{C}_n\}$ , where $p_n$ is the distribution of negative source samples such that $\mathcal{C}_n\cap \mathcal{C}_s = \emptyset$ . +b) Deployment stage. After obtaining a trained model from the Procurement stage, the model will have its first encounter with the unlabeled target domain samples from the deployed environment. We denote the unlabeled target data by $\mathcal{D}_t = \{x_t : x_t \sim q\}$ , where $q$ is the distribution of target samples. Note that, the source dataset $\mathcal{D}_s$ from the Procurement stage is inaccessible during adaptation in the Deployment stage. Suppose that, $\mathcal{C}_t$ is the label-set of the target domain. In the Universal setting [52], we do not have any knowledge of the relationship between $\mathcal{C}_t$ and $\mathcal{C}_s$ . Nevertheless, without the loss of generality, we define the shared labels as $\mathcal{C} = \mathcal{C}_s \cap \mathcal{C}_t$ and the private label-set for the source and the target domains as $\overline{\mathcal{C}}_s = \mathcal{C}_s \setminus \mathcal{C}_t$ and $\overline{\mathcal{C}}_t = \mathcal{C}_t \setminus \mathcal{C}_s$ respectively. + +# 3.1. Learning in the Procurement stage + +3.1.1. Challenges. The available DA techniques heavily rely on the adversarial discriminative [46, 38] strategy. Thus, they require access to the source data to reliably characterize the source distribution. Further, these approaches are not equipped to operate in a source-free setting. Though a generative model can be used as a memory-network [41, 3] to + +realize source-free adaptation, such a solution is not scalable for large-scale source datasets (e.g. ImageNet [36]), as it introduces unnecessary additional parameters alongside the associated training difficulties [40]. This calls for a fresh analysis of the requirements beyond the existing solutions. + +In a general DA scenario, with access to source samples in the Deployment stage (specifically for Open-set or Partial DA), a widely adopted approach is to learn domain invariant features. In such approaches, the placement of source category clusters is learned in the presence of unlabeled target samples which obliquely provides a supervision regarding the relationship between $\mathcal{C}_s$ and $\mathcal{C}_t$ . For instance, in case of Open-set DA, the source clusters may have to disperse to make space for the clusters from target-private $\overline{\mathcal{C}}_t$ (see Fig. 3A to 3B). Similarly, in partial DA, the source clusters may have to rearrange themselves to keep all the target shared clusters $(\mathcal{C} = \mathcal{C}_t)$ separated from the source private $\overline{\mathcal{C}}_s$ (see Fig. 3A to 3C). However in a completely source-free framework, we do not have the liberty to leverage such information as source and target samples never coexist together during training. Motivated by the adversarial discriminative DA technique [46], we hypothesize that, inculcating the ability to reject samples that are out of the source data distribution can facilitate future source-free domain alignment using this discriminatory knowledge. Therefore, in the Procurement stage the overarching objective is two-fold. + +- Firstly, we must aim to learn a certain placement of source clusters best suited for all kinds of category-gap scenarios acknowledging the fact that, a source-free scenario does not allow us to modify the placement in the presence of target samples during adaptation (Fig. 3D). +- Secondly, the model must have the ability to reject out-of-distribution samples, which is an essential requirement for unsupervised adaptation under domain-shift. + +3.1.2. Solution. In the presence of source data, we aim to restrain the model's domain and category bias which is generally inculcated as a result of the over-confident supervised learning paradigms. To achieve this goal, we adopt two regularization strategies viz. i) utilization of a labeled simulated negative source dataset to generalize for the latent + +![](images/29853aef5d2acea362a94e56fd9e64a0244a9e4b60b0861188f33130511c452c.jpg) +A. Simulation of -ve samples +Figure 4: A) Simulated labeled negative samples using randomly created spline segments (in pink), B) Proposed architecture, C) Procurement stage promotes intra-class compactness with inter-class separability. + +![](images/e1769243039f3e60a8c55681a873f47c6b6f0326c9a919e617e2aaf47851c975.jpg) +B. Architecture of the 2-stage method + +![](images/0b6ef78a314dcaa60c70c9a8bf8a68906232269d375fa40056b431b358003633.jpg) +C. Procurement stage encourages well-separated tight source clusters + +regions not covered by the given positive source samples (see Fig. 4C) and ii) regularization via generative modeling. + +How to configure the negative source dataset? While configuring $\mathcal{D}_n$ , the following key properties have to be met. Firstly, latent clusters formed by the negative categories must lie in-between the latent clusters of positive source categories to enable a higher degree of intra-class compactness with inter-class separability (Fig. 4C). Secondly, the negative source samples must enrich the source domain distribution without forming a new domain by themselves. This rules out the use of Mixup [53] or adversarial noise [44] as negative samples in this scenario. Thus, we propose the following method to synthesize the desired negative source dataset. + +Image-composition. One of the key characteristics shared between the samples from source and unknown target domain is the semantics of the local part-related features specifically for image-based object recognition tasks. Relying on this assumption, we propose a systematic procedure to simulate the samples of $\mathcal{D}_n$ by randomly compositing local regions between a pair of images drawn from the source dataset $\mathcal{D}_s$ (see Fig. 4A and Suppl. Algo. 1). These composite samples $x_{n}$ created on image pairs from different positive source classes are expected to lie in-between the two source clusters in the latent space, thus introducing a combinatorial amount of new class labels i.e. $|\mathcal{C}_n| = |\mathcal{C}_s|C_2$ . + +This approach is motivated from and conforms with the observation in the literature, that one can indeed generate semantics for new classes using the known classes [23, 48]. Intuitively, from the perspective of combining features, when local parts from two different positive source classes are combined, the resulting image would tend to produce activations for both the classes (due to the presence of salient features from both classes). Thus, the sample would fall near the decision boundary in-between the two clusters in the latent space. Alternatively, from the perspective of discarding features, as we mask-out regions in a source image $x_{s}$ (Fig. 4), the activation in the corresponding class $y_{s}$ reduces. Thus, the model would be less confident for such samples, thereby emulating the characteristics of a negative class. + +Training procedure. The generative source classifier is divided into three stages; i) backbone-model $M$ , ii) feature extractor $F_{s}$ , and iii) classifier $D$ (see Fig. 4B). The output of the backbone-model is denoted as $v = M(x)$ , where $x$ is drawn from either $\mathcal{D}_s$ or $\mathcal{D}_n$ . Following this, the output of $F_{s}$ and $D$ are represented as $u$ and $d$ respectively. + +$D$ outputs a $K$ -dimensional logit vector denoted as $d = [d^{(k)}]$ for $k = 1,2,\ldots,K$ , where $K = |\mathcal{C}_s| + |\mathcal{C}_n|$ . The individual class probabilities, $\hat{y}^{(k)}$ are obtained by applying softmax over the logits i.e. $\hat{y}^{(k)} = \sigma^{(k)}(D \circ F_s \circ M(x))$ , where $\circ$ denotes function composition, $\sigma$ denotes the softmax activation and the superscript $(k)$ denotes the class-index. + +Additionally, we define priors only for the positive source classes, $P(u_{s}|c_{i}) = \mathcal{N}(u_{s}|\mu_{c_{i}},\Sigma_{c_{i}})$ (for $i = 1,2,\dots,|\mathcal{C}_s|$ ) at the intermediate embedding $u_{s} = F_{s}\circ M(x_{s})$ . Here, the parameters of the normal distributions are computed during training as shown in line-10 of Algo. 1. A cross-entropy loss over these prior distributions is defined as $\mathcal{L}_p$ (line-7 in Algo. 1), that effectively enforces intra-class compactness with inter-class separability (Fig. 4C). + +Motivated by generative variational auto-encoder (VAE) setup [19], we introduce a decoder $G$ , which minimizes the cyclic reconstruction loss selectively for the samples $v_{s}$ from positive source categories and randomly drawn samples $u_{r}$ from the corresponding class priors (i.e. losses $\mathcal{L}_v$ and $\mathcal{L}_u$ in line-6 of Algo. 1). This, along with a lower weightage $\alpha$ for the negative source categories (i.e. at the cross-entropy loss $\mathcal{L}_{CE}$ in line-6 of Algo. 1), is incorporated to deliberately bias $F_{s}$ towards the positive source samples, considering the level of unreliability of the generated negative dataset. + +# 3.2. Learning in the Deployment stage + +3.2.1. Challenges. We hypothesize that, the large number of negative source categories along with the positive source classes i.e. $\mathcal{C}_s\cup \mathcal{C}_n$ can be interpreted as a universal source dataset, which can subsume label-set $\mathcal{C}_t$ of a wide range of target domains. Moreover, we seek to realize a unified adaptation algorithm, which can work for a wide range of category-gaps. However, a forceful adaptation of target sam + +Algorithm 1 Training algorithm in the Procurement stage +1: input: $(x_{s},y_{s})\in \mathcal{D}_{s}$ $(x_{n},y_{n})\in \mathcal{D}_{n}$ . $\theta_{F_s},\theta_D,\theta_G$ Parameters of $F_{s},D$ and $G$ respectively. +2: initialization: pretrain $\{\theta_{F_s},\theta_D\}$ using cross-entropy loss on $(x_{s},y_{s})$ followed by initialization of the sample mean $\mu_{c_i}$ and covariance $\Sigma_{c_i}$ (at $u$ -space) of $F_{s}\circ M(x_{s})$ for $x_{s}$ from class $c_{i};i = 1,2,\ldots |\mathcal{C}_{s}|$ +3: for iter $<$ MaxIter do +4: $v_{s} = M(x_{s});u_{s} = F_{s}(v_{s});\hat{v}_{s} = G(u_{s});u_{r}\sim \mathcal{N}(\mu_{c_i},\Sigma_{c_i})$ for $i = 1,2,\dots |\mathcal{C}_s|$ ; $\hat{u}_r = F_s\circ G(u_r)$ +5: $\hat{y}_s^{(k_s)} = \sigma^{(k_s)}(D\circ F_s\circ M(x_s))$ , and $\hat{y}_n^{(k_n)} = \sigma^{(k_n)}(D\circ F_s\circ M(x_n))$ where $k_{s},k_{n}$ are the indices of ground-truth class $y_{s},y_{n}$ +6: $\mathcal{L}_{CE} = -\log \hat{y}_s^{(k_s)} - \alpha \log \hat{y}_n^{(k_n)};\mathcal{L}_v = |v_s - \hat{v}_s|;\mathcal{L}_u = |u_r - \hat{u}_r|$ +7: $\mathcal{L}_p = -\log (\exp (P(u_s|c_{k_s})) / \sum_{i = 1}^{|C_s|}\exp (P(u_s|c_i)))$ , where $P(u_{s}|c_{i}) = \mathcal{N}(u_{s}|\mu_{c_{i}},\Sigma_{c_{i}})$ +8: Update $\theta_{F_s},\theta_D,\theta_G$ by minimizing $\mathcal{L}_{CE},\mathcal{L}_v,\mathcal{L}_u$ , and $\mathcal{L}_p$ alternatively using separate optimizers. +9: if (iter % UpdateIter $= = 0$ ) then +10: Recompute the sample mean $(\mu_{c_i})$ and covariance $(\Sigma_{c_i})$ of $F_{s}\circ M(x_{s})$ for $x_{s}$ from class $c_{i}$ .. $i = 1,2\dots |\mathcal{C}_s|$ (For $\mathcal{D}_n^{(b)}$ : generate fresh latent-simulated negative samples using the updated priors) + +plies to positive source categories will cause target-private samples to be classified as an instance of the source private or the common label-set, instead of being classified as "unknown", i.e. one of the negative categories in $\mathcal{C}_n$ . + +3.2.2. Solution. In contrast to domain agnostic architectures [52, 5, 38], we resort to an architecture supporting domain specific features [46], as we must avoid disturbing the placement of source clusters obtained from the Procurement stage. This is an essential requirement to retain the task-dependent knowledge gathered from the source dataset. Thus, we introduce a domain specific feature extractor denoted as $F_{t}$ , whose parameters are initialized from the fully trained $F_{s}$ (see Fig. 4B). Further, we aim to exploit the learned generative classifier from the Procurement stage to complement for the purpose of separate ad-hoc networks (critic or discriminator) as utilized by the prior works [52, 6]. + +a) Source Similarity Metric (SSM). For each target sample $x_{t}$ , we define a weighting factor $w(x_{t})$ called the SSM. A higher value of this metric indicates $x_{t}$ 's similarity towards the positive source categories, specifically inclined towards the common label space $\mathcal{C}$ . Similarly, a lower value of this metric indicates $x_{t}$ 's similarity towards the negative source categories $\mathcal{C}_{n}$ , showing its inclination towards the private target labels $\overline{\mathcal{C}}_{t}$ . Let, $p_{\bar{s}}$ , $q_{\bar{t}}$ be the distribution of source and target samples with labels in $\overline{\mathcal{C}}_{s}$ and $\overline{\mathcal{C}}_{t}$ respectively. We define, $p_{c}$ and $q_{c}$ to denote the distribution of samples from source and target domains belonging to the shared label-set $\mathcal{C}$ . Then, the SSM for the positive and negative source samples should lie on the two extremes, forming the inequality: + +$$ +\underset {x \sim p _ {n}} {\mathbb {E}} w (x) \approx \underset {x \sim q _ {\bar {t}}} {\mathbb {E}} w (x) < \underset {x \sim q _ {c}} {\mathbb {E}} w (x) < \underset {x \sim p _ {c}} {\mathbb {E}} w (x) \approx \underset {x \sim p _ {\bar {s}}} {\mathbb {E}} w (x) \tag {1} +$$ + +To formalize the SSM criterion we rely on the class probabilities defined at the output of source model only for the positive class labels, i.e. $\hat{y}^{(k)}$ for $k = 1,2\dots |\mathcal{C}_s|$ . Note that, $\hat{y}^{(k)}$ is obtained by performing softmax over $|\mathcal{C}_s| + |\mathcal{C}_n|$ categories as discussed in the Procurement stage. Finally, the SSM $w$ and its complement $w^{\prime}$ are defined as, + +$$ +\begin{array}{l} w (x _ {t}) = \max _ {i = 1 \dots | \mathcal {C} _ {s} |} \exp (\hat {y} ^ {(i)}) \\ w ^ {\prime} (x _ {t}) = \max _ {i = 1 \dots | \mathcal {C} _ {s} |} \exp (1 - \hat {y} ^ {(i)}) \end{array} \tag {2} +$$ + +We hypothesize that this definition will satisfy Eq. 1, as a result of the generative learning strategy adopted in the Procurement stage. In Eq. 2 the exponent is used to further amplify separation between target samples from the shared label-set $\mathcal{C}$ and those from the private label-set $\overline{\mathcal{C}}_t$ (Fig. 5A). + +b) Source-free domain adaptation. To perform domain adaptation, the objective function aims to move the target samples with higher SSM value towards the clusters of positive source categories and vice-versa at the frozen source embedding, $u$ -space (from the Procurement stage). To achieve this, parameters of only $F_{t}$ network are allowed to be trained in the Deployment stage. However, the decision of weighting the loss on target samples towards the positive or negative source clusters is computed using the source feature extractor $F_{s}$ i.e. the SSM in Eq. 2. We define, the deployment model as $h = D \circ F_{t} \circ M(x_{t})$ using the target feature extractor, with softmax predictions over $K$ categories obtained as $\hat{z}^{(k)} = \sigma^{(k)}(h)$ . Thus, the primary loss function for adaptation is defined as, + +$$ +\mathcal {L} _ {d 1} = w \left(x _ {t}\right) \cdot \left(- \log \left(\sum_ {k = 1} ^ {\left| \mathcal {C} _ {s} \right|} \hat {z} ^ {(k)}\right)\right) + \tag {3} +$$ + +$$ +w ^ {\prime} \left(x _ {t}\right) \cdot \left(- \log \left(\sum_ {k = \left| \mathcal {C} _ {s} \right| + 1} ^ {\left| \mathcal {C} _ {s} \right| + \left| \mathcal {C} _ {n} \right|} \hat {z} ^ {(k)}\right)\right) +$$ + +Additionally, in the absence of label information, there would be uncertainty in the predictions $\hat{z}^{(k)}$ as a result of distributed class probabilities. This leads to a higher entropy for such samples. Entropy minimization [12, 28] is adopted in such scenarios to move the target samples close to the highly confident regions (i.e. positive and negative cluster centers from the Procurement stage) of the classifier's feature space. However, it has to be done separately for positive and negative source categories based on the SSM values of + +individual target samples to effectively distinguish the target-private set from the full target dataset. To achieve this, we define two different class probability vectors separately for the positive and negative source classes (Fig. 4B) as, + +$$ +\tilde {z} _ {s} ^ {(i)} = \frac {\exp \left(h ^ {(i)}\right)}{\sum_ {j = 1} ^ {| \mathcal {C} _ {s} |} \exp \left(h ^ {(j)}\right)}; \tilde {z} _ {n} ^ {(i)} = \frac {\exp \left(h ^ {(i + | \mathcal {C} _ {s} |)}\right)}{\sum_ {j = 1} ^ {| \mathcal {C} _ {n} |} \exp \left(h ^ {(j + | \mathcal {C} _ {s} |)}\right)} \tag {4} +$$ + +We obtain the entropy of the target samples for the positive source classes as $H_{s}(x_{t}) = -\sum_{i = 1}^{|C_{s}|}\tilde{z}_{s}^{(i)}\log \tilde{z}_{s}^{(i)}$ and for the negative classes as $H_{n}(x_{t}) = -\sum_{i = 1}^{|C_{n}|}\tilde{z}_{n}^{(i)}\log \tilde{z}_{n}^{(i)}$ . Subsequently, the entropy minimization is formulated as, + +$$ +\mathcal {L} _ {d 2} = w \left(x _ {t}\right) \cdot H _ {s} \left(x _ {t}\right) + w ^ {\prime} \left(x _ {t}\right) \cdot H _ {n} \left(x _ {t}\right) \tag {5} +$$ + +Thus, the final loss function for adaptation is $\mathcal{L}_d = \mathcal{L}_{d1} + \beta \mathcal{L}_{d2}$ . Here $\beta$ is a hyper-parameter controlling the importance of entropy minimization during adaptation. + +# 4. Experiments + +We perform a thorough evaluation of the proposed universal source-free domain adaptation framework against prior state-of-the-art methods across multiple datasets. We also provide a comprehensive ablation study to establish generalizability of the approach across a variety of label-set relationships and justification of the various model components. + +# 4.1. Experimental Setup + +a) Datasets. We resort to the experimental settings followed by [52] (UAN). Office-Home [47] dataset consists of images from 4 different domains - Artistic (Ar), Clip-art (Cl), Product (Pr) and Real-world (Rw). VisDA2017 [34] dataset comprises of 12 categories with synthetic (S) and real (R) domains. Office-31 [37] dataset contains images from 3 distinct domains - Amazon (A), DSLR (D) and Webcam (W). To evaluate scalability, we use ImageNet-Caltech with 84 common classes (following [52]). + +b) Simulation of labeled negative samples. To simulate negative samples for training in the Procurement stage, we first sample a pair of images, each from different categories of $\mathcal{C}_s$ , to create unique negative classes in $\mathcal{C}_n$ . Note that, we impose no restriction on how the hypothetical classes are created (e.g. one can composite non-animal with animal). A random mask is defined which splits the images into two complementary regions using a quadratic spline passing through a central image region (see Suppl. Algo. 1). Then, the negative image is created by merging alternate mask regions as shown in Fig. 2A. For the $\mathbf{I} \to \mathbf{C}$ task of ImageNet-Caltech, the source domain ImageNet (I), having 1000 classes, results in a large number of possible negative classes (i.e. $|\mathcal{C}_n| = |C_s|C_2$ ). We address this by randomly selecting only 600 of these negative classes for ImageNet (I), and 200 negative classes for Caltech (C) in the task $\mathbf{C} \to \mathbf{I}$ . + +# 4.2. Evaluation Methodology + +a) Average accuracy on Target dataset, $\mathcal{T}_{avg}$ . We report to the evaluation protocol proposed in the VisDA2018 Open-Set Classification challenge. Accordingly, all the target-private classes are grouped into a single "unknown" class and the metric reports the average of per-class accuracy over $|\mathcal{C}_s| + 1$ classes. In our framework, a target sample is marked as "unknown" if it is classified ( $argmax_k \hat{z}^{(k)}$ ) into any of the negative $|\mathcal{C}_n|$ classes. In contrast, UAN [52] relies on the sample-level weight, to mark a target sample as "unknown" based on a sensitive threshold hyperparameter. Also note that our method is truly source-free during adaptation, while all other methods have access to the full source-data. +b) Accuracy on Target-Unknown data, $\mathcal{T}_{unk}$ . We evaluate the target unknown accuracy, $\mathcal{T}_{unk}$ , as the proportion of actual target-private samples (i.e. $\{(x_t,y_t):y_t\in \overline{\mathcal{C}}_t\}$ ) being classified as "unknown" after adaptation. Note that, UAN [52] does not report $\mathcal{T}_{unk}$ which is a crucial metric to evaluate the vulnerability of the model after its deployment in the target environment. The $\mathcal{T}_{avg}$ metric fails to capture this as a result of class-imbalance in the Open-set scenario [39]. Hence, to realize a common evaluation ground, we train the UAN implementation provided by the authors [52] and denote it as UAN* in further sections of this paper. We observe that, the UAN[52] training algorithm is often unstable with a decreasing trend of $\mathcal{T}_{unk}$ and $\mathcal{T}_{avg}$ over increasing training iterations. We thus report the mean and standard deviation of the peak values of $\mathcal{T}_{unk}$ and $\mathcal{T}_{avg}$ achieved by UAN*, over 5 separate runs on Office-31 dataset (see Table 2). +c) Implementation Details. We implement our network in PyTorch and use ResNet-50 [13] as the backbone-model $M$ , pre-trained on ImageNet [36] inline with UAN [52]. The complete architecture of other components is provided in the Supplementary. We denote our approach as USFDA. A sensitivity analysis of the major hyper-parameters used in the proposed framework is provided in Fig. 5B-C, and Suppl. Fig. 2B. In all our ablations across the datasets, we fix the hyperparameters values as $\alpha = 0.2$ and $\beta = 0.1$ . We utilize Adam optimizer [18] with a fixed learning rate of 0.0001 for training in both the Procurement and the Deployment stages. For the implementation of UAN*, we use the hyperparameter value $w_0 = -0.5$ , as specified by the authors for the task $\mathbf{A} \rightarrow \mathbf{D}$ in the Office-31 dataset. + +# 4.3. Discussion + +a) Comparison against prior arts. We compare our approach with UAN [52], and other prior methods. The results are presented in Tables 1-2. Our approach yields state-of-the-art results even in a source-free setting on several tasks. Particularly in Table 2, we present $\mathcal{T}_{unk}$ on various datasets and also report the mean and standard-deviation for both the accuracy metrics computed over 5 random initializations in + +Table 1: Average per-class accuracy $(\mathcal{T}_{avg})$ for universal-DA tasks on Office-Home dataset (with $|\mathcal{C}| / |\mathcal{C}_s \cup \mathcal{C}_t| = 0.15$ ). Scores for the prior works are directly taken from UAN [52]. Here, SF denotes support for source-free adaptation. + +
MethodSFOffice-Home
Ar→ClAr→PrAr→RwCl→ArCl→PrCl→RwPr→ArPr→ClPr→RwRw→ArRw→ClRw→PrAvg
ResNet [13]X59.3776.5887.4869.8671.1181.6673.7256.3086.0778.6859.2278.5973.22
IWAN [54]X52.5581.4086.5170.5870.9985.2974.8857.3385.0777.4859.6578.9173.39
PADA [54]X39.5869.3776.2662.5767.3977.4748.3935.7979.6075.9444.5078.1062.91
ATI [33]X52.9080.3785.9171.0872.4184.3974.2857.8485.6176.0660.1778.4273.29
OSBP [39]X47.7560.9076.7859.2361.5874.3361.6744.5079.3170.5954.9575.1863.90
UAN [52]X63.0082.8387.8576.8878.7085.3678.2258.5986.8083.3763.1779.4377.02
Ours USFDA✓63.3583.3089.3570.9672.3486.0978.5360.1587.3581.5663.1788.2377.03
+ +![](images/52ff9c961a10b561b99dc56f84023e66d29c970e412d455c5ea80c5935506a5e.jpg) +Figure 5: Ablative analysis on the task $\mathbf{A} \rightarrow \mathbf{D}$ (Office-31). A) Histogram of SSM values of $x_{t}$ separately for target-private and target-shared samples at the Procurement iteration 100 (top) and 500 (bottom). B) The sensitivity curve for $\beta$ shows marginally stable adaptation accuracy for a wide-range of values. C) A marginal increase in $\mathcal{T}_{avg}$ is observed with increase in $|\mathcal{C}_n|$ . + +![](images/1daf5f0a5ad9fc1b80e418b99f7749dedf4ce2721f4cd9fca334b68be73520b9.jpg) + +![](images/9ff20878083d19358ad96e0f49c4fb34d3a07052d70a780c4670634e79c3c72c.jpg) + +the Office-31 dataset (the last six rows). Our method is able to achieve much higher $\mathcal{T}_{unk}$ than UAN* [52], highlighting our superiority as a result of the novel learning approach incorporated in both Procurement and Deployment stages. We also perform a characteristic comparison of algorithm complexity in terms of the amount of learnable parameters and training time; a) Procurement: [11.1M, 380s], b) Deployment: [3.5M, 44s], c) UAN [52]: [26.7M, 450s] (in a consistent setting). The significant computational advantage in the Deployment stage makes our approach highly suitable for real-time adaptation. In contrast to UAN, the proposed framework offers a much simpler adaptation algorithm devoid of networks such as an adversarial discriminator and additional finetuning of the ResNet-50 backbone. + +b) Does SSM satisfy the expected inequality? Effectiveness of the proposed learning algorithm, in case of source-free deployment, relies on the formulation of SSM, which is expected to satisfy Eq. 1. Fig. 5A shows a histogram of the SSM separately for samples from target-shared (blue) and target-private (red) label space. The success of this metric is attributed to the generative nature of Procurement stage, which enables the source model to distinguish between the marginally more negative target-private samples as compared to the samples from the shared label space. +c) Sensitivity to hyper-parameters. As we tackle DA in a source-free setting simultaneously intending to generalize across varied category-gaps, a low sensitivity to hyperparameters would further enhance our practical usability. To this end, we fix certain hyperparameters for all our experiments (also in Fig. 6C) even across datasets (i.e. $\alpha = 0.2$ , $\beta = 0.1$ ). + +Thus, one can treat them as global-constants with $|\mathcal{C}_n|$ being the only hyperparameter, as variations in one by fixing the others yield complementary effect on regularization in the Procurement stage. A thorough analysis reported in the Suppl. Fig. 2, demonstrates a reasonably low sensitivity of our model to these hyperparameters. + +d) Generalization across category-gap. One of the key objectives of the proposed framework is to effectively operate in the absence of the knowledge of label-set relationships. To evaluate it in the most compelling manner, we propose a tabular form shown in Fig. 6A. We vary the number of private classes for target and source along the x-axis and y-axis respectively, with a fixed $|\mathcal{C}_s \cup \mathcal{C}_t| = 31$ . We compare the $\mathcal{T}_{avg}$ metric at the corresponding table instances, shown in Fig. 6B-C. The results clearly highlight superiority of the proposed framework specifically for the more practical scenarios (close to the diagonal instances) as compared to the unrealistic Closed-set setting $(|\overline{\mathcal{C}}_s| = |\overline{\mathcal{C}}_t| = 0)$ . +e) DA in absence of shared categories. In universal adaptation, we seek to transfer the knowledge of "class-separability criterion" obtained from the source domain to the deployed target environment. More concretely, it is attributed to the segregation of data samples based on some expected characteristics, such as classification of objects according to their pose, color, or shape etc. To quantify this, we consider an extreme case where $\mathcal{C}_s\cap \mathcal{C}_t = \emptyset$ (A→D in Office-31 with $|\mathcal{C}_s| = 15$ $|\mathcal{C}_t| = 16$ ). Allowing access to a single labeled target sample from each category in $\overline{\mathcal{C}}_t = \mathcal{C}_t$ , we aim to obtain a one-shot recognition accuracy (assignment of cluster index or class label using the one-shot samples as + +Table 2: ${\mathcal{T}}_{avg}$ on Office-31 (with $\left| \mathcal{C}\right| /\left| {{\mathcal{C}}_{s} \cup {\mathcal{C}}_{t}}\right| = {0.32}$ ),VisDA (with $\left| \mathcal{C}\right| /\left| {{\mathcal{C}}_{s} \cup {\mathcal{C}}_{t}}\right| = {0.50}$ ),and ImageNet-Caltech (with $\left| \mathcal{C}\right| /\left| {{\mathcal{C}}_{s} \cup {\mathcal{C}}_{t}}\right| = {0.07}$ ). Scores for the prior works are directly taken from UAN [52]. SF denotes support for source-free adaptation. + +
MethodSFOffice-31VisDAImNet-Caltech
A→WD→WW→DA→DD→AW→AAvgS→RI→CC→I
ResNet [13]X75.9489.6090.9180.4578.8381.4282.8652.8070.2865.14
IWAN [54]X85.2590.0990.0084.2784.2286.2586.6858.7272.1966.48
PADA [54]X85.3779.2690.9181.6855.3282.6179.1944.9865.4758.73
ATI [33]X79.3892.6090.0884.4078.8581.5784.4854.8171.5967.36
OSBP [39]X66.1373.5785.6272.9247.3560.4867.6830.2662.0855.48
UAN [52]X85.6294.7797.9986.5085.4585.1289.2460.8375.2870.17
UAN* TavgX83.00±1.894.17±0.395.40±0.583.43±0.786.90±1.087.18±0.688.3454.2174.7771.51
Ours USFDA Tavg✓85.56±1.695.20±0.397.79±0.188.47±0.387.50±0.986.61±0.690.1863.9276.8572.13
UAN* TunkX20.72±11.753.53±2.451.57±5.034.43±3.351.88±4.843.11±1.342.5419.6833.4331.24
Ours USFDA Tunk✓73.98±7.585.64±2.280.00±1.182.23±2.778.59±3.275.52±1.579.3236.2551.2148.76
+ +![](images/f18c4cd46fb024e3508fa71e075e9fb9154bab764222e2ec85ca13275edd56ca.jpg) +Figure 6: Comparison across varied label-set relationships for the task $\mathbf{A} \rightarrow \mathbf{D}$ in Office-31 dataset. A) Visual representation of label-set relationships and $\mathcal{T}_{avg}$ at the corresponding instances for B) UAN* [52] and C) ours source-free model. Effectively, the direction along x-axis (blue horizontal arrow) characterizes increasing Open-set complexity. The direction along y-axis (red vertical arrow) shows increasing complexity of Partial DA scenario. The pink diagonal arrow denotes the effect of decreasing shared label space. + +![](images/a43e5da4b72a8f68bee46a8f71662634970c227cf4213ad81bb82ee371082435.jpg) + +![](images/4ee565103d780965416e87018eb1e8c86cf25a8c0ff75ceaf825708e942c24d9.jpg) + +the cluster center at $F_{t} \circ M(x_{t})$ to quantify the above metric. We obtain $64.72\%$ accuracy for the proposed framework as compared to $13.43\%$ for UAN*. This strongly validates our superior knowledge transfer capability as a result of the generative classifier with labeled negative samples complementing for the target-private categories. + +f) Dependency on the simulated negative dataset. Conceding that a combinatorial amount of negative labels can be created, we evaluate the scalability of the proposed approach, by varying the number of negative classes in the Procurement stage by selecting 0, 4, 8, 64, 150 and 190 negative classes as reported in the X-axis of Fig. 5C. For the case of 0 negative classes, denoted as $|\mathcal{C}_n|^* = 0$ in Fig. 5C, we synthetically generate random negative features at the intermediate level $u$ , which are at least $3 - \sigma$ away from each of the positive source priors $P(u_s|c_i)$ for $i = 1,2,\dots,|\mathcal{C}_s|$ . We then make use of these feature samples along with positive image samples, to train a $(|\mathcal{C}_s| + 1)$ class Procurement model with a single negative class. The results are reported in Fig. 5C on the $\mathbf{A} \rightarrow \mathbf{D}$ task of Office-31 dataset with category relationship inline with the setting in Table 2. We observe an acceptable drop in accuracy with decrease in number of negative classes, hence validating scalability of the approach for large-scale classification datasets (such as ImageNet). Similarly, we also evaluated our framework by combining three or more images + +to form such negative classes. However, we found that with increasing number of negative classes $(|C_s|C_3 > |C_s|C_2)$ , the model achieves under-fitting on positive source categories (similar to Fig. 5C, where accuracy reduces beyond a certain limit because of over regularization). + +# 5. Conclusion + +We have introduced a novel Universal Source-Free Domain Adaptation framework, acknowledging practical domain adaptation scenarios devoid of any assumption on the source-target label-set relationship. In the proposed two-stage framework, learning in the Procurement stage is found to be highly crucial, as it aims to exploit the knowledge of class-separability in the most general form with enhanced robustness to out-of-distribution samples. Besides this, the success in the Deployment stage is attributed to the well-designed learning objectives effectively utilizing the source similarity criterion. This work can be served as a pilot study towards learning efficient inheritable models in future. + +Acknowledgements. This work is supported by a Wipro PhD Fellowship (Jogendra) and a grant from Uchhatar Avishkar Yojana (UAY, IISC_010), MHRD, Govt. of India. We would also like to thank Ujjawal Sharma (IIT Roorkee) for assisting with the implementation of prior arts. + +# References + +[1] Mahsa Baktashmotlagh, Masoud Faraki, Tom Drummond, and Mathieu Salzmann. Learning factorized representations for open-set domain adaptation. In ICLR, 2019. 1 +[2] Shai Ben-David, John Blitzer, Koby Crammer, and Fernando Pereira. Analysis of representations for domain adaptation. In NeurIPS, 2007. 1 +[3] Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In CVPR, 2017. 2, 3 +[4] P. P. Busto and J. Gall. Open set domain adaptation. In ICCV, 2017. 2 +[5] Zhangjie Cao, Mingsheng Long, Jianmin Wang, and Michael I Jordan. Partial transfer learning with selective adversarial networks. In CVPR, 2018. 1, 2, 5 +[6] Zhangjie Cao, Lijia Ma, Mingsheng Long, and Jianmin Wang. Partial adversarial domain adaptation. In ECCV, 2018. 1, 2, 5 +[7] Yi-Hsin Chen, Wei-Yu Chen, Yu-Ting Chen, Bo-Cheng Tsai, Yu-Chiang Frank Wang, and Min Sun. No more discrimination: Cross city adaptation of road scene segmenters. In ICCV, 2017. 1 +[8] Lixin Duan, Ivor W Tsang, and Dong Xu. Domain transfer multiple kernel learning. TPAMI, 34(3):465-479, 2012. 2 +[9] Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. The Journal of Machine Learning Research, 17(1):2096-2030, 2016. 1 +[10] ZongYuan Ge, Sergey Demyanov, Zetao Chen, and Rahul Garnavi. Generative openmax for multi-class open set classification. In BMVC, 2017. 1 +[11] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014. 2 +[12] Yves Grandvalet and Yoshua Bengio. Semi-supervised learning by entropy minimization. In NeurIPS, 2005. 5 +[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 6, 7, 8 +[14] Dan Hendrycks, Mantas Mazeika, and Thomas Dietterich. Deep anomaly detection with outlier exposure. In ICLR, 2019. 2 +[15] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei A Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. In ICLR, 2018. 2 +[16] Lanqing Hu, Meina Kan, Shiguang Shan, and Xilin Chen. Duplex generative adversarial network for unsupervised domain adaptation. In CVPR, 2018. 2 +[17] Guoliang Kang, Liang Zheng, Yan Yan, and Yi Yang. Deep adversarial attention alignment for unsupervised domain adaptation: the benefit of target expectation maximization. In ECCV, 2018. 2 + +[18] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[19] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 4 +[20] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In NeurIPS, 2012. 1 +[21] Abhishek Kumar, Prasanna Sattigeri, Kahini Wadhawan, Leonid Karlinsky, Rogerio Feris, Bill Freeman, and Gregory Wornell. Co-regularized alignment for unsupervised domain adaptation. In NeurIPS, 2018. 1 +[22] Jogendra Nath Kundu, Nishank Lakkakula, and R Venkatesh Babu. Um-adapt: Unsupervised multi-task adaptation using adversarial cross-task distillation. In ICCV, 2019. 1 +[23] Christoph H Lampert, Hannes Nickisch, and Stefan Harmeling. Learning to detect unseen object classes by between-class attribute transfer. In CVPR, 2009. 4 +[24] Kimin Lee, Honglak Lee, Kibok Lee, and Jinwoo Shin. Training confidence-calibrated classifiers for detecting out-of-distribution samples. In ICLR, 2018. 2 +[25] Zhizhong Li and Derek Hoiem. Learning without forgetting. TPAMI, 40(12):2935-2947, 2017. 2 +[26] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael Jordan. Learning transferable features with deep adaptation networks. In ICML, 2015. 1, 2 +[27] Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Conditional adversarial domain adaptation. In NeurIPS, 2018. 2 +[28] Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I Jordan. Unsupervised domain adaptation with residual transfer networks. In NeurIPS, 2016. 1, 2, 5 +[29] Raphael Gontijo Lopes, Stefano Fenu, and Thad Starner. Data-free knowledge distillation for deep neural networks. In LLD Workshop at NeurIPS, 2017. 2 +[30] Zelun Luo, Yuliang Zou, Judy Hoffman, and Li F Fei-Fei. Label efficient learning of transferable representations across ss domains and tasks. In NeurIPS, 2017. 2 +[31] Andrey Malinin and Mark Gales. Predictive uncertainty estimation via prior networks. In NeurIPS, 2018. 1 +[32] Jogendra Nath Kundu, Phani Krishna Uppala, Anuj Pahuja, and R Venkatesh Babu. Adadepth: Unsupervised content congruent adaptation for depth estimation. In CVPR, 2018. 1, 2 +[33] Pau Panareda Busto and Juergen Gall. Open set domain adaptation. In ICCV, 2017. 2, 7, 8 +[34] Xingchao Peng, Ben Usman, Neela Kaushik, Judy Hoffman, Dequan Wang, and Kate Saenko. Visda: The visual domain adaptation challenge. In CVPR workshops, 2018. 6 +[35] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NeurIPS, 2015. 1 +[36] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. IJCV, 115(3):211-252, 2015. 2, 3, 6 + +[37] Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In ECCV, 2010. 2, 6 +[38] Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In CVPR, 2018. 1, 2, 3, 5 +[39] Kuniaki Saito, Shohei Yamamoto, Yoshitaka Ushiku, and Tatsuya Harada. Open set domain adaptation by backpropagation. In ECCV, 2018. 1, 2, 6, 7, 8 +[40] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In NeurIPS, 2016. 2, 3 +[41] Swami Sankaranarayanan, Yogesh Balaji, Carlos D Castillo, and Rama Chellappa. Generate to adapt: Aligning domains using generative adversarial networks. In CVPR, 2018. 2, 3 +[42] Alireza Shafaei, Mark Schmidt, and James Little. A Less Biased Evaluation of Out-of-distribution Sample Detectors. In BMVC, 2019. 2 +[43] Hidetoshi Shimodaira. Improving predictive inference under covariate shift by weighting the log-likelihood function. Journal of statistical planning and inference, 90(2):227-244, 2000. 1 +[44] Rui Shu, Hung Bui, Hirokazu Narui, and Stefano Ermon. A DIRT-t approach to unsupervised domain adaptation. In ICLR, 2018. 4 +[45] Eric Tzeng, Judy Hoffman, Trevor Darrell, and Kate Saenko. Simultaneous deep transfer across domains and tasks. In ICCV, 2015. 1 +[46] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In CVPR, 2017. 1, 2, 3, 5 +[47] Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation. In CVPR, 2017. 6 +[48] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In NeurIPS, 2016. 4 +[49] Xuezhi Wang and Jeff Schneider. Flexible transfer learning under support and model shift. In NeurIPS, 2014. 2 +[50] Zirui Wang, Zihang Dai, Barnabás Póczos, and Jaime Carbonell. Characterizing and avoiding negative transfer. In CVPR, 2019. 2 +[51] Ancong Wu, Wei-Shi Zheng, Xiaowei Guo, and Jian-Huang Lai. Distilled person re-identification: Towards a more scalable system. In CVPR, 2019. 2 +[52] Kaichao You, Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I. Jordan. Universal domain adaptation. In CVPR, June 2019. 3, 5, 6, 7, 8 +[53] Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In ICLR, 2018. 4 +[54] Jing Zhang, Zewei Ding, Wanqing Li, and Philip Ogunbona. Importance weighted adversarial nets for partial domain adaptation. In CVPR, 2018. 1, 2, 7, 8 +[55] Kun Zhang, Bernhard Scholkopf, Krikamol Muandet, and Zhikun Wang. Domain adaptation under target and conditional shift. In ICML, 2013. 2 + +[56] Weichen Zhang, Wanli Ouyang, Wen Li, and Dong Xu. Collaborative and adversarial network for unsupervised domain adaptation. In CVPR, 2018. 1, 2 +[57] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. 2 \ No newline at end of file diff --git a/universalsourcefreedomainadaptation/images.zip b/universalsourcefreedomainadaptation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..738035b8032fa5bbcdd461b6386297c006ce7cb4 --- /dev/null +++ b/universalsourcefreedomainadaptation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7417ad07bf3e297d0f744ac5c8868f750bc8c0092e5c276b5e10da6e488165f6 +size 513860 diff --git a/universalsourcefreedomainadaptation/layout.json b/universalsourcefreedomainadaptation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1ec721008e4f5b549ed6fb697bee74764cff56e5 --- /dev/null +++ b/universalsourcefreedomainadaptation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78ab9739e3769138bc5741c3e4dad37a6e36ee5a8b20f704d1b1d92895fa835f +size 501581 diff --git a/universalweightingmetriclearningforcrossmodalmatching/a901b1aa-636c-433f-834a-497b5fe00b64_content_list.json b/universalweightingmetriclearningforcrossmodalmatching/a901b1aa-636c-433f-834a-497b5fe00b64_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f5fb1ee79f5e0262a8b9a4976c80b628a106e226 --- /dev/null +++ b/universalweightingmetriclearningforcrossmodalmatching/a901b1aa-636c-433f-834a-497b5fe00b64_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2fe54d71e3031d996d4608c3228443eda07b972dbcd23499c6d67238e5786a7 +size 70633 diff --git a/universalweightingmetriclearningforcrossmodalmatching/a901b1aa-636c-433f-834a-497b5fe00b64_model.json b/universalweightingmetriclearningforcrossmodalmatching/a901b1aa-636c-433f-834a-497b5fe00b64_model.json new file mode 100644 index 0000000000000000000000000000000000000000..bb8f94c00b7bca733268a720ee6f499999e03b5d --- /dev/null +++ b/universalweightingmetriclearningforcrossmodalmatching/a901b1aa-636c-433f-834a-497b5fe00b64_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96fea6d7c4f0d92b335862d5690f2c86c3efd51cbbd67228097e3dc96769b758 +size 86011 diff --git a/universalweightingmetriclearningforcrossmodalmatching/a901b1aa-636c-433f-834a-497b5fe00b64_origin.pdf b/universalweightingmetriclearningforcrossmodalmatching/a901b1aa-636c-433f-834a-497b5fe00b64_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..289aca026d7678ea131d929919157cb0277f6a77 --- /dev/null +++ b/universalweightingmetriclearningforcrossmodalmatching/a901b1aa-636c-433f-834a-497b5fe00b64_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2242408ae4fa8c6fa0e03e737a1fb35867130291686826d88496fcf2b43f3bd +size 511267 diff --git a/universalweightingmetriclearningforcrossmodalmatching/full.md b/universalweightingmetriclearningforcrossmodalmatching/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4a08f75e65ac9aefff4a806929707929111c317f --- /dev/null +++ b/universalweightingmetriclearningforcrossmodalmatching/full.md @@ -0,0 +1,303 @@ +# Universal Weighting Metric Learning for Cross-Modal Matching + +Jiwei Wei, Xing Xu*, Yang Yang, Yanli Ji, Zheng Wang, Heng Tao Shen Center for Future Media & School of Computer Science and Engineering, University of Electronic Science and Technology of China, China + +# Abstract + +Cross-modal matching has been a highlighted research topic in both vision and language areas. Learning appropriate mining strategy to sample and weight informative pairs is crucial for the cross-modal matching performance. However, most existing metric learning methods are developed for unimodal matching, which is unsuitable for cross-modal matching on multimodal data with heterogeneous features. To address this problem, we propose a simple and interpretable universal weighting framework for cross-modal matching, which provides a tool to analyze the interpretability of various loss functions. Furthermore, we introduce a new polynomial loss under the universal weighting framework, which defines a weight function for the positive and negative informative pairs respectively. Experimental results on two image-text matching benchmarks and two video-text matching benchmarks validate the efficacy of the proposed method. + +# 1. Introduction + +Cross-modal matching aims at retrieving relevant instances of a different media type from the query, which has a variety of applications such as Image-Text matching [6, 32, 28, 36, 31, 37, 41, 2, 14], Video-Text matching [22, 29, 10, 38], Sketch-based image matching [3], etc. Compared with unimodal matching, cross-modal matching is more challenging due to the heterogeneous gap between different modalities. The key issue in cross-modal matching is to reduce the heterogeneous gap and exploit discriminative information across modalities [21, 8, 35, 33, 27]. + +A common solution for cross-modal matching is to learn a shared embedding space for different modalities so that the features from different modalities can be compared. Recently, a variety of cross-modal matching methods have been devoted to learning richer semantic representations for different modalities and a ranking loss is adopted to jointly optimize the network so that the similarity of the positive + +![](images/638081f825e4444b97b79d81027b171b8e783a39ffa483ba92e9e4a0bf4d9309.jpg) +Figure 1. A typical solution for cross-modal matching is to learn a shared embedding space where visual features $\Phi(v)$ and text features $\Psi(t)$ can be compared. Points with the same shape are from the same modality. A triplet loss was utilized to encourage the similarity of positive (matching) pairs larger than negative (non-matching) pairs. Take image-text matching as an example. + +pairs is higher than that of all negative pairs, as illustrated in Figure 1. In previous literature, attention mechanism [18] and generative models [11, 15] have been explored to build advanced encoding networks. Liu et al. [23] proposed a recurrent residual fusion block to reduce the modality gap, and a triplet loss [13] was used to encourage semantically associated samples close to each other in the shared embedding space. Li et al. [19] proposed a visual reasoning model to generate global representation of a scene. + +While these methods have achieved encouraging performance, most of them use the ranking loss as an objective function, which usually trained with random sampling. This gives rise to an issue for cross-modal matching, where random sampling cannot effectively select informative pairs for training, leading a slow convergence and poor performance. While more recent metric learning methods have provided various mining strategies for unimodal matching, few of them are suitable for cross-modal matching. Hence, learning an appropriate mining strategy to sample and weight informative pairs is still a challenging problem for cross-modal matching. + +In this paper, we propose a universal weighting framework for cross-modal matching. Our intuition is based on the fact that a larger weight is assigned to a more informative pair, as illustrated in Figure 2. Unlike widely used unweighted triplet loss which treats all pairs equally, our proposed universal weighting framework can effectively assign appropriate weight to informative pairs for cross-modal matching. Specifically, we define two polynomial functions to calculate the weight values for positive and negative pairs respectively. Furthermore, we introduce a new polynomial loss under the universal weighting framework. Since the form of a polynomial function is flexible, our polynomial loss has a better generalization. + +The major contributions of this paper are summarized as follows: + +- We propose a universal weighting framework for cross-modal matching, which defines two polynomial functions to calculate the weight values for positive and negative pairs respectively. It provides a powerful tool to analyze the interpretability of various loss functions. +- We introduce a new polynomial loss under the universal weighting framework. The polynomial loss can effectively select informative pairs from redundant pairs, and assign appropriate weights to different pairs, resulting in performance boost. +- We conduct extensive experiments and evaluate our proposed method on two cross-modal matching tasks, image-text matching and video-text matching. Experimental results demonstrate that our method achieves very competitive performance on the four widely used benchmark datasets: MS-COCO, Flickr30K, ActivityNet-captions and MSR-VTT. + +# 2. Related Work + +Cross-Modal Matching. Cross-modal matching has a variety of applications, such as Image-Text matching [6, 32], Video-Text matching [9, 30, 22], Sketch-based image retrieval [3] etc. The key issue of cross-modal matching is measuring the similarity between different modal features. A common solution is to learn a shared embedding space where features of different modalities can be directly compared. In recent years, a variety of methods have been devoted to learning modality invariant features. + +Lee et al. [18] proposed a stacked cross attention network for image-text matching, which measures the imagetext similarity by aligning image regions and words. Li et al. [19] used graph convolutional network to generate relationship-enhanced image region features, then a global semantic reasoning network is performed to generate discriminative visual features that capture key objects and semantic concepts of a scene. Song et al. [30] introduced a + +![](images/09dee4a1e8c3f4e1080e05ff914f74a7c3afea5de3ee83ed584e73937d93b9f6.jpg) +Figure 2. As the positive pairs similarity score increases, its weight value decreases; As the negative pairs similarity score increases, its weight value increases. + +![](images/a67e72a1780402e33fffa5aa4e1c5f0f1f72d9cde430fa223dd65592be571f0d.jpg) + +polysemous instance embedding network that uses multihead self-attention and residual learning to generate multiple representations of an instance. Liu et al. [22] proposed a collaborative expert (CE) framework for video-text matching, which generates dense representations for videos via aggregating information from different pre-trained models. Above embedding-based methods learn an advanced encoding network to generate richer semantic representations for different modalities, which make the matched pairs close to each other and the mismatched pairs far apart in the shared embedding space. + +Metric Learning for Cross-Modal Matching. Another popular approach for cross-modal matching is to learn a loss function in the embedding space, which encourages the similarity of matched pairs larger than mismatched pairs. In recent years, a variety of metric learning methods have been proposed in both vision and language areas. However, most of existing metric learning methods are designed for unimodal matching, which cannot effectively model the relationship of features captured from different modalities [21]. Only few of metric learning methods have been implemented particularly for cross-modal matching [35, 21, 6]. + +Liong et al. [21] introduced a deep coupled metric learning that designs two nonlinear transformations to reduce the modality map. Frome et al. [7] proposed a deep visual-semantic embedding model mapping visual features and semantic features into a shared embedding space, using a hinge rank loss as the objective function. Faghri et al. [6] introduced a variant triplet loss for image-text matching, and reported improved results. Xu et al. [35] introduced a modality classifier to ensure that the transformed features are statistically indistinguishable. However, these methods treat positive and negative pairs equally. Hardly any advanced sampling and weighting mechanism has been proposed for cross-modal matching. In this work, we present a universal weighting framework for cross-modal matching, which assigns a larger weight value to a harder sample. + +# 3. The Proposed Approach + +In this section, we formulate the sampling problem of cross-modal matching as a general weighting formulation. The proposed polynomial loss will be elaborated afterward. + +# 3.1. Problem Statement + +Let $v_{i} \in \mathbb{R}^{d_{1}}$ be a visual feature vector, $t_{i} \in \mathbb{R}^{d_{2}}$ be a text feature vector, $D = \{(v_{i},t_{i})\}$ be a training set of cross-modal instance pairs. In general, components of an instance pair come from different modalities. For simplicity, we refer to $(v_{i},t_{i})$ as a positive pair and $(v_{i},t_{j,i \neq j})$ as a negative pair. Given a query instance, the goal of cross-modal matching is to find a sample that matches it in another modality gallery. In the case of image-text matching, given an image caption $t_{i}$ , the goal is to find the most relevant image $v_{i}$ in the image gallery. It is important to note that in the cross-modal matching task, there is only one positive sample for each anchor in a mini-batch. Previous work for cross-modal matching focused on building a shared embedding space that contains both the image and text. The core idea behind these methods is that there exists a mapping function, $S(v,t;W) = \Phi(v)^T W \Psi(t)$ to measure the similarity score between the visual features $\Phi(v)$ and the text features $\Psi(t)$ . $W$ is the parameter of $S$ . In general, the similarity score of the positive pair is higher than the negative pair by a margin, it can be formulated as: + +$$ +S \left(v _ {i}, t _ {i}\right) > S \left(v _ {i}, t _ {j, j \neq i}\right) + \lambda_ {0}, \forall v _ {i}, \tag {1} +$$ + +$$ +S \left(v _ {j}, t _ {j}\right) > S \left(v _ {i, i \neq j}, t _ {j}\right) + \lambda_ {0}, \forall t _ {j}, \tag {2} +$$ + +where $\lambda_0$ is a fixed margin. + +Since cross-modal matching is a mutual retrieval problem, the widely used triplet loss is formulated as: + +$$ +L = \left[ S (v, \hat {t}) - S (v, t) + \lambda_ {0} \right] _ {+} + \left[ S (\hat {v}, t) - S (v, t) + \lambda_ {0} \right] _ {+}, \tag {3} +$$ + +where $(v,t)$ is positive pair, $(v,\hat{t})$ is the hardest negative pair for a query $v$ , and $(\hat{v},t)$ is the hardest negative pair for a query caption $t$ . $[x]_{+} = \max (x,0)$ . However, these methods discard pairs with less information than the hardest pair, while treating positive pairs and negative pairs equally. To our best knowledge, there is no advanced sampling and weighting method for cross-modal matching. + +# 3.2. Universal Weighting Framework for CrossModal Matching + +Let $N_{v_i} = \{S_{ij,i\neq j}\}$ be the set of similarity scores for all negative pairs of a sample $v_{i}$ , and $N_{t_j} = \{S_{ij,j\neq i}\}$ be the set of similarity scores for all negative pairs of a sample $t_j$ . Most existing hinge-based loss functions $L$ can be formulated as a function of similarity scores: $L(\{S_{ij}\})$ . Current existing weighting methods are given a special function to + +represent the relationship between weight values and similarity scores, the form of the function varies from task to task. All these functions can be reformulated into a universal weighting framework: + +$$ +L = \sum_ {i = 1} ^ {i = N} \left\{G _ {P o s} S _ {i i} + \sum \left(G _ {N e g} S _ {i j, i \neq j}\right) \right\}, \tag {4} +$$ + +where $G_{Pos}$ is the weight value of the positive pair, $G_{Neg}$ is the weight value of negative pairs. Both of $G_{Pos}$ and $G_{Neg}$ are a function of similarity scores, but in a different form. + +$$ +G _ {P o s} = G \left(S _ {i i}, N _ {v _ {i}}\right), \tag {5} +$$ + +$$ +G _ {N e g} = G \left(S _ {j j}, N _ {t _ {j}}\right), \tag {6} +$$ + +where $G(\cdot)$ is a function that represents the relationship between weight value and similarity score. Theoretically, $G(\cdot)$ can be a function of self-similarity and relative similarity. The form of $G(\cdot)$ is various, but it should satisfy a basic rule: as the positive pairs' similarity score increases, its weight value decreases, and as the negative pairs' similarity score increases, its weight value increases. As illustrated in Figure 2. It provides a powerful tool to analyze the interpretability of various loss functions through weight analysis. Eq. 4 is a general pair formulation, existing pair-based loss is one of its special cases. + +# 3.3. Informative Pairs Mining + +For cross-modal matching tasks, in a mini-batch, each anchor has only one positive sample, but many negative pairs. These negative pairs are redundant and most of them are less informative. Random sampling is difficult to select more informative pairs, resulting in the model is difficult to convergence and have a poor performance. It is urgent and important to develop efficient algorithms that can select informative negative pairs and discard less informative negative pairs. In this section, we select informative negative pairs by comparing the relative similarity scores between positive and negative pairs of an anchor. For a given anchor $v_{i}$ , we assume its positive sample is $t_{i}$ , negative samples is $t_{j,i\neq j}$ , and a negative pair $(v_{i},t_{j})$ is selected if $S_{ij}$ satisfies the condition: + +$$ +S _ {i j, i \neq j} > S _ {i i} - \lambda , \tag {7} +$$ + +where $\lambda$ is a fixed margin. As illustrated in Figure 3. Note that there only one positive sample for each anchor in a mini-batch. + +# 3.4. Polynomial Loss for Cross-Modal Matching + +Through the above steps, negative pairs with more informative pairs can be selected and less informative pairs can be discarded. In this section, we introduce a new weighting function to weight the selected pairs. Theoretically, + +![](images/8c57e0018ecba75861db657779d9a89b2567f938b391cf540fc1a006df3fb7b4.jpg) +Figure 3. Illustration of our informative pairs mining and universal weighting framework for cross-modal matching. Points with the same shape are from the same modality. $P$ is the only positive sample of anchor, $N_{1}$ , $N_{2}$ and $N_{3}$ are the negative samples of anchor. Left: An example of random sampling and equal weighting; Right: The proposed negative pairs mining and universal weighting framework for cross-modal matching; + +$G(\cdot)$ can be a function of self-similarity and relative similarity. However, the more complex the $G(\cdot)$ , the more hyperparameters it contains, and the hyper-parameters setting is more difficult. In this paper, to reduce the number of hyperparameters, we define $G(\cdot)$ as a function of self-similarity. Specifically, given a selected positive pair $(v_{i},t_{i})$ , its weight $G_{Pos}$ can be formulated as: + +$$ +G _ {P o s} = a _ {m} S _ {i i} ^ {m} + a _ {m - 1} S _ {i i} ^ {m - 1} + \dots + a _ {1} S _ {i i} + a _ {0}, \tag {8} +$$ + +where $S_{ii}$ is the similarity score, $\{a_i\}_{i=0}^{i=m}$ is hyperparameters, $m$ is positive integer. The form of $G_{Pos}$ is diverse, but its value should decrease with the increase of similarity score $S_{ii}$ . Its trend should conform to the curve in figure 2a. + +The weight $G_{Neg}$ for a selected negative pair $(v_i, t_j)$ can be formulated as: + +$$ +G _ {N e g} = b _ {k} S _ {i j} ^ {k} + b _ {k - 1} S _ {i j} ^ {k - 1} + \dots + b _ {1} S _ {i j} + b _ {0}, i \neq j, \tag {9} +$$ + +where $S_{ij}$ is similarity score, $\{b_i\}_{i=0}^{i=k}$ is hyper-parameters, and $k$ is positive integer. The form of $G_{Neg}$ is diverse, but its trend should conform to the curve in figure 2b. + +Through Eq. 8 and 9, we obtain the weights of positive and negative pairs. In this paper, we introduce two different functions, average polynomial loss and maximum polynomial loss. + +Avg Polynomial Loss. Average polynomial loss can be defined as: + +$$ +\begin{array}{l} L _ {A v g} = \frac {1}{N} \sum_ {i = 1} ^ {i = N} [ G _ {P o s} S _ {i i} ^ {p} + \frac {\sum_ {S _ {i j} \in N _ {v _ {i}}} G _ {N e g} S _ {i j} ^ {q}}{N u m (N _ {v _ {i}})} + \lambda_ {1} ] _ {+} + \\ \frac {1}{N} \sum_ {j = 1} ^ {j = N} \left[ G _ {P o s} S _ {j j} ^ {p} + \frac {\sum_ {S _ {i j} \in N _ {t _ {j}}} G _ {N e g} S _ {i j} ^ {q}}{N u m \left(N _ {t _ {j}}\right)} + \lambda_ {2} \right] _ {+}, \tag {10} \\ \end{array} +$$ + +Eq. 10 can be reformulated as: + +$$ +\begin{array}{l} L _ {A v g} = \frac {1}{N} \sum_ {i = 1} ^ {i = N} [ \sum^ {P} a _ {p} S _ {i i} ^ {p} + \frac {\sum_ {S _ {i j} \in N _ {v _ {i}}} \sum^ {Q} b _ {q} S _ {i j} ^ {q}}{N u m (N _ {v _ {i}})} ] _ {+} + \\ \frac {1}{N} \sum_ {j = 1} ^ {j = N} \left[ \sum^ {P} a _ {p} S _ {j j} ^ {p} + \frac {\sum_ {S _ {i j} \in N _ {t _ {j}}} \sum^ {Q} b _ {q} S _ {i j} ^ {q}}{\operatorname {N u m} \left(N _ {t _ {j}}\right)} \right] _ {+}, \tag {11} \\ \end{array} +$$ + +here, $\text{Num}(N_{v_i})$ and $\text{Num}(N_{t_j})$ denote the number of negative pairs of sample $v_i$ and $t_j$ respectively. $P$ and $Q$ are the highest power of positive and negative pairs, respectively. Note, we make the minimum of $p$ and $q$ to 0, and $a_0 = \lambda_1$ , $b_0 = \lambda_2$ . + +For cross-modal matching tasks, only one positive sample for each anchor in a mini-batch. Our loss function can make full use of informative negative pairs. Since cross-modal matching tasks involve the mutual retrieval between different modalities, our loss comprises two terms. The former term represents the loss of image retrieval caption, and the latter represents the loss of caption retrieval image. Since the form of a polynomial function is flexible, our polynomial loss has a better generalization. + +Max Polynomial Loss. To further highlight the superiority of our weighting mechanism, we introduce another version of polynomial loss $L_{Max}$ , which only contains the hardest negative pair. The formulation of $L_{Max}$ is defined as: + +$$ +\begin{array}{l} L _ {M a x} = \frac {1}{N} \sum_ {i = 1} ^ {i = N} \left[ G _ {P o s} S _ {i i} ^ {p} + G _ {N e g} M a x \left\{N _ {v _ {i}} \right\} ^ {q} + \lambda_ {1} \right] _ {+} + \\ \frac {1}{N} \sum_ {j = 1} ^ {j = N} \left[ G _ {P o s} S _ {j j} ^ {p} + G _ {N e g} M a x \left\{N _ {t _ {j}} \right\} ^ {q} + \lambda_ {2} \right] _ {+}, \tag {12} \\ \end{array} +$$ + +here, $\text{Max}\{N_{v_i}\}$ and $\text{Max}\{N_{t_j}\}$ represent the hardest negative pair of sample $v_i$ and $t_j$ respectively. Eq.12 can be reformulated as: + +$$ +\begin{array}{l} L _ {M a x} = \frac {1}{N} \sum_ {i = 1} ^ {i = N} \left[ \sum^ {P} a _ {p} S _ {i i} ^ {p} + \sum^ {Q} b _ {q} M a x \left\{N _ {v _ {i}} \right\} ^ {q} \right] _ {+} + \\ \frac {1}{N} \sum_ {j = 1} ^ {j = N} \left[ \sum_ {p} ^ {P} a _ {p} S _ {j j} ^ {p} + \sum^ {Q} b _ {q} M a x \left\{N _ {t _ {j}} \right\} ^ {q} \right] _ {+}, \tag {13} \\ \end{array} +$$ + +Both $L_{Avg}$ and $L_{Max}$ can be minimized with gradient descent optimization. More discussions about $L_{Avg}$ and $L_{Max}$ can be found in the subsection of experiments. + +# 4. Experiments + +In this section, we conducted extensive experiments to evaluate the proposed polynomial loss in both image-text matching and video-text matching tasks. Following the [30, 18], we use the Recall@K as the performance metrics for both image-text matching and video-text matching tasks, which indicates the percentage of queries for which the model returns the correct item in its top K results. Ablation studies are conducted to analyze the effectiveness of proposed polynomial loss. We set the margin $\lambda$ in Eq. 7 to 0.2 for all experiments. + +# 4.1. Implementation Details + +Image-Text Matching. We evaluate our polynomial loss on two standard benchmarks: MS-COCO [20] and Flickr30K [39]; MS-COCO dataset contains 123,287 images, and each image comes with 5 captions. We mirror the data split setting of [18]. More specifically, we use 113,287 images for training, 5,000 images for validation and 5,000 images for testing. We report results on both 1,000 test images (averaged over 5 folds) and full 5,000 test images. Flickr30K dataset contains 31,783 images, each image is annotated with 5 sentences. Following the data split of [18], we use 1,000 images for validation, 1,000 images for testing and the remaining for training. + +Our implementation follows the practice in Stacked Cross Attention Network (SCAN) [18]. SCAN maps image regions and words into a shared embedding space to measure the similarity score between an image and a caption. For fair comparison, we keep the network structure unchanged and replace the loss function with polynomial loss. There are two inputs for SCAN, a set of image features which extracted by a pretrained Faster-RCNN model [1] with ResNet-101 [12], and a set of word features which encoded by a bi-directional Gated Recurrent Unit (GRU) [26]. Models are trained from scratch using Adam [16] with batch size of 128 for both datasets. For MS-COCO, we start training with learning rate 0.0005 for 10 epochs, and then + +lower it to 0.00005 for another 10 epochs. For Flickr30K, the learning rate is 0.0002 for 15 epochs, and then lower it to 0.00002 for another 15 epochs. There are two sets of parameters in the polynomial loss, $\{a_p\}$ and $\{b_q\}$ . We adopt a heuristic method to select hyper-parameters. Concretely, we first initialize the $G(\cdot)$ to ensure that its curve conforms to the trend in Figure 2. Then, a grid search technology is adopted to select hyper-parameters. We set $P = 2$ , $\{a_0 = 0.5, a_1 = -0.7, a_2 = 0.2\}$ , $Q = 2$ and $\{b_0 = 0.03, b_1 = -0.3, b_2 = 1.2\}$ for MS-COCO and $P = 2$ , $\{a_0 = 0.6, a_1 = -0.7, a_2 = 0.2\}$ , $Q = 2$ , $\{b_0 = 0.03, b_1 = -0.4, b_2 = 0.9\}$ for Flickr30K. + +Video-Text Matching. We evaluate our polynomial loss on two popular datasets: ActivityNet-captions [17] and MSR-VTT [34]. ActivityNet-captions contains 20K videos, and each video comes with 5 text descriptions. We follow the data split of [22], 10,009 videos for training and 4,917 for testing. MSR-VTT contains 10K videos and each video is associated with about 20 sentences. We follow the data split of [22], 6,513 videos for training, and 2,990 videos for testing. + +We report results on video-text matching task with Collaborative Experts (CE) [22] framework. CE is a framework that aggregated various pretrained features of a video into a dense representation before mapping to the shared embedding space. We keep the network structure unchanged and replace the loss function with polynomial loss. Models are trained from scratch using Adam [16] with batch size of 64 for both datasets. The learning rate is set to 0.0004. There are two sets of parameters in the polynomial loss, $\{a_p\}$ and $\{b_q\}$ . We set $P = 2$ , $\{a_0 = 0.5, a_1 = -0.7, a_2 = 0.2\}$ , $Q = 2$ and $\{b_0 = 1, b_1 = -0.2, b_2 = 1.7\}$ for ActivityNet-captions and $P = 2$ , $\{a_0 = 0.5, a_1 = -0.7, a_2 = 0.2\}$ , $Q = 2$ , $\{b_0 = 0.03, b_1 = -0.3, b_2 = 1.8\}$ for MSR-VTT. + +# 4.2. Image-Text Matching Results + +For image-text matching task, we compare the performance of our method with the several state-of-the-art methods, including: PVSE [30], VSE++ [6], SCO [15], RRF [23], DAN [25], GXN [11] and SCAN [18]. Table 1 and Table 2 summarize the results of our method on the Flickr30K and MS-COCO datasets, respectively. We also list the loss function used by various methods. From the table, we can make the following observations: + +- From Table 1, we find the proposed method outperforms the baseline SCAN at all metrics. Compared with the classical triplet loss, the performance of SCAN with polynomial loss improves R@1 by $3.6\%$ for text to image retrieval and $1.5\%$ for image to text retrieval on Flickr30K. +- Table 2 summarizes the results on MS-COCO dataset. From Table 2, we can observe that the proposed + +
MethodsLoss FunctionImage-to-TextText-to-Image
R@1R@5R@10R@1R@5R@10
RRF [23]Triplet47.677.487.135.468.379.9
VSE++ [6]Triplet52.980.587.239.670.179.5
DAN [25]Triplet55.081.889.039.469.279.1
SCO [15]Triplet+NLL55.582.089.341.170.580.1
SCAN (I2T) [18]Triplet67.989.094.443.974.282.8
SCAN (I2T)Max Polynomial Loss69.489.995.447.575.583.1
+ +Table 1. Experimental results on Flickr30K. + +
MethodsLoss FunctionImage-to-TextText-to-Image
R@1R@5R@10R@1R@5R@10
1K Test images
VSE++ [6]Triplet64.689.195.752.083.192.0
GXN [11]Triplet68.5-97.956.6-94.5
PVSE [30]Triplet+Ldiv+Lmmd69.291.696.655.286.593.7
SCAN (I2T) [18]Triplet69.293.297.554.486.093.6
SCAN (I2T)Max Polynomial Loss71.193.798.256.886.793.0
5K Test images
VSE++ [6]Triplet41.371.181.230.359.472.4
GXN [11]Triplet42.0-84.731.7-74.6
PVSE [30]Triplet+Ldiv+Lmmd45.274.384.532.463.075.0
SCAN (I2T) [18]Triplet46.477.487.234.463.775.7
SCAN (I2T)Max Polynomial Loss46.977.787.634.464.275.9
+ +Table 2. Experimental results on MS-COCO. + +method outperforms the state-of-the-art approaches, especially for R@1. By replacing the triplet loss with our $L_{Max}$ , the performance of SCAN improves 1.9% on image to text retrieval (R@1) and 2.4% on text to image retrieval (R@1) on 1K test images. + +- Classical triplet loss tries to sample the informative pairs from redundant pairs, but treats positive and negative pairs equally. In contrast to it, the proposed polynomial loss assigns appropriate weight value to the positive and negative pairs, and the weight value is related to its similarity score. The proposed method can simultaneously select and weight informative pairs. Extensive experimental results demonstrated that the proposed polynomial loss improved the matching performance effectively. + +# 4.3. Video-Text Matching Results + +We evaluate the effectiveness of our method on two standard benchmarks: ActivityNet-captions and MSR-VTT. We report our results and comparison with current state-of-the-art methods for video-to-text and text-to-video retrievals. The results are summarized in the Table 3 and Table 4 for ActivityNet-captions and MSR-VTT datasets, respectively. + +In order to promote a comprehensive comparison, we list existing state-of-the-art results on these datasets, including: + +DENSE [17], HSE [40], CE [22] for ActivityNet-captions dataset and Minthum et al. [24], W2VV [4], CE [22] and Dual encoding [5] for MSR-VTT dataset. Furthermore, we list the loss function used by various methods. From Table 3 and Table 4, we can observe that our method outperforms the baselines on all measures, and achieves the new state-of-the-art performance on the video-text matching task. When compared with CE (Triplet) which uses the same video and sentence encoders with our method, our method improves $2.5\%$ on text-to-video $(R@1)$ task on the MSR-VTT dataset. Our method outperforms the CE on all metrics on the ActivityNet-captions dataset. The performance gap between CE (Triplet) and CE (Max Polynomial Loss) shows the effectiveness of our polynomial Loss. + +# 4.4. Ablation Study + +Parameter Analysis. There are two sets of parameters in the polynomial loss, $\{a_i\}$ and $\{b_j\}$ . It is worth exploring to seek a set of parameters to make the model converge faster and achieves better performance. Since the number of hyper-parameters is too large, it is almost impossible to analyze the sensitivity of the hyper-parameters one by one, so we mainly analyze the sensitivity of several hyperparameters with great influence. $P$ and $Q$ respectively determines the highest power of $G_{Pos}$ and $G_{Neg}$ , which has + +
MethodsLoss FunctionVideo-to-TextText-to-Video
R@1R@5R@10R@1R@5R@10
DENSE [17]Cross-entropy18.036.074.014.032.065.0
HSE (4SEGS) [40]Multi-loss18.748.1-20.549.3-
CE [22]Triplet27.961.695.027.361.194.4
CEMax Polynomial Loss27.961.994.128.562.694.9
+ +Table 3. Experimental results on ActivityNet-captions. + +
MethodsLoss FunctionVideo-to-TextText-to-Video
R@1R@5R@10R@1R@5R@10
Minthum wt al. [24]Cross-entropy12.532.142.47.020.929.7
W2VV [4]Multi-loss11.828.939.16.118.727.5
Dual encoding [5]Triplet13.030.843.37.722.031.8
CE [22]Triplet34.464.677.022.552.165.5
CEMax Polynomial Loss36.271.582.225.055.468.2
+ +Table 4. Experimental results on MSR-VTT. + +![](images/86a530bd669c432b4a1a68523ff5b5513d2036e239af11090d53f697f8d3e145.jpg) +Figure 4. Triplet loss vs. Max Polynomial Loss on Flickr30K validation set. By replacing the loss function with our polynomial loss, the performance of SCAN is further improved. + +![](images/17f6e6f37cb84be504ccae98b3a0a97e75c0ad19f7ea5eab5b7b05fe8f982fa8.jpg) +Figure 5. Analysis of the behaviors of the Max and Avg polynomial loss on MS-COCO validation set. + +a direct impact on the number of hyper-parameters. Therefore, we first fixed them to 2. In practice, we find that model performance is most sensitive to parameters $\{b_q\}$ , thus we mainly analyze the sensitivity of parameters $\{b_q\}$ . We test the effect of $b_1$ and $b_2$ by fixing $b_0 = 0.03$ , results are summarized in Table 5. $b_1$ and $b_2$ impact the hard level of negative pairs, the model is sensitive to different values. However, all of these combinations outperform the baseline, which demonstrates the superiority of our approach. + +Triplet Loss vs. Max Polynomial Loss. Triplet loss is the most frequently used loss function for cross-modal matching tasks. Its effectiveness has been proved by many works, such as [6]. In this section, we further analyze the effectiveness of the proposed polynomial weighting mechanism. Max polynomial loss only includes the hardest negative pairs, which can be considered as a weighted version of triplet loss. We compare the max polynomial loss with triplet loss on MS-COCO dataset, the results are shown in Figure 4. From the results, we find the max polynomial loss converges faster than triplet loss and achieves a better result, which proven the superiority of our polynomial weighting mechanism. + +Max vs. Avg Ploynomial Loss. In this section, we further analyze the effectiveness of the proposed Max and Avg polynomial loss. Max polynomial loss weights the positive pair and the hardest negative pair for each anchor, which can be considered as a weighted version of the hardest triplet loss. In contrast, average polynomial loss contains all of informative negative pairs and assigns different weight values for them. Since the max polynomial loss only utilizes a subset of informative pairs so that its computational complexity is lower than the average polynomial loss which contains all of informative negative pairs. + +Figure 5 shows the performance of two functions on MS- + +
QuerySCANOurs
1. A room with some chairs and a bookshelf. +2. A table surrounded by chairs and filled with cooking utensils. +3. The table is full of wooden spoons and utensils.1. A table and chairs with wooden kitchen tools on top. +2. The table is full of wooden spoons and utensils. +3. A wood table holding an assortment of wood cooking utensils.
1. A bathroom that has white towels in a rack over the tub. +2. Bathroom with a shower, sink, and toilet in it. +3. A bathroom with a sink, toilet and shower with curtain.1. A very big white rest room with a shabby looking shower. +2. A bathroom that has white towels in a rack over the tub. +3. A bathroom with a toilet, towel rack and a tub in it.
A guy that is riding his bike next to a train.
A man in a red shirt and a red hat is on a motorcycle on a hill side.
+ +Figure 6. Qualitative results on MS-COCO. For each query, we report top-3 ranked results. Predictions ordered by decreasing similarity score, with true matches are shown in blue. For text-to-image retrieval, the true and false matches are outlined in blue and red boxes, respectively. + +
Tasksb2b11.51.71.81.9
Video-to-Text-0.236.035.536.135.5
-0.334.635.036.235.6
-0.434.035.335.635.3
Text-to-Video-0.225.025.024.825.0
-0.324.824.925.024.8
-0.424.624.824.724.9
+ +Table 5. The effect of ${b}_{1}$ and ${b}_{2}$ on MSR-VTT dataset. + +COCO dataset. From the results, we find the average polynomial loss is converges faster than the max polynomial loss at the first few iterations. The reason is that the average polynomial loss contains more informative pairs. However, the final performance of max polynomial loss is slightly better than average polynomial loss. This is possibly due to the unreasonable parameter setting. Since average polynomial loss contains too many negatives pairs, it is difficult to find a set of parameters $P_{Neg}$ to fit all informative negative pairs. + +# 4.5. Qualitative Results + +In this section, we perform visualizations Top-3 retrieval results for a handful of examples on MS-COCO. Both qualitative results of the image-to-text retrieval and the text-to-image retrieval are shown in Figure 6, which qualitatively illustrate the model behavior. Predictions are ordered by decreasing similarity score, with correct labels are shown in + +blue. From Figure 6, we can observe that by replacing the loss function with our polynomial loss, the performance of SCAN is further improved. + +# 5. Conclusion + +We have developed a universal weighting framework for cross-modal matching, which defines a weight function for the positive and negative pairs respectively. Universal weighting framework provides a powerful tool to analyze the interpretability of various loss functions. Furthermore, we proposed a polynomial loss function under the universal weighting framework, which can effectively sample and weight the informative pairs. Experimental results on four cross-modal matching benchmarks have demonstrated the proposed polynomial loss significantly improve the matching performance. In future work, we would like to investigate the potential of more advanced weighting functions for cross-modal matching. + +Acknowledgments. This work was supported in part by the National Key Research and Development Program of China (No. 2018AAA0102200); the National Natural Science Foundation of China (No. 61976049 and No. 61632007); the Fundamental Research Funds for the Central Universities (No. ZYGX2019Z015); the Sichuan Science and Technology Program, China, (No. 2019ZDZX0008 and No. 2018GZDZX0032). + +# References + +[1] Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In CVPR, pages 6077-6086, 2018. +[2] Hui Cui, Lei Zhu, Jingjing Li, Yang Yang, and Liqiang Nie. Scalable deep hashing for large-scale social image retrieval. IEEE Transactions on Image Processing, 29:1271-1284, 2019. +[3] Sounak Dey, Pau Riba, Anjan Dutta, Josep Llados, and Yi-Zhe Song. Doodle to search: Practical zero-shot sketch-based image retrieval. In CVPR, pages 2179-2188, 2019. +[4] Jianfeng Dong, Xirong Li, and Cees GM Snoek. Predicting visual features from text for image and video caption retrieval. IEEE Transactions on Multimedia, 20(12):3377-3388, 2018. +[5] Jianfeng Dong, Xirong Li, Chaoxi Xu, Shouling Ji, and Xun Wang. Dual dense encoding for zero-example video retrieval. arXiv, 2018. +[6] Fartash Faghri, David J Fleet, Jamie Ryan Kiros, and Sanja Fidler. Vse++: Improving visual-semantic embeddings with hard negatives. In BMVC, 2018. +[7] Andrea Frome, Greg S Corrado, Jon Shlens, Samy Bengio, Jeff Dean, Marc'Aurelio Ranzato, and Tomas Mikolov. Devise: A deep visual-semantic embedding model. In NIPS, pages 2121-2129, 2013. +[8] Chuang Gan, Tianbao Yang, and Boqing Gong. Learning attributes equals multi-source domain generalization. In CVPR, pages 87-97, 2016. +[9] Chuang Gan, Yi Yang, Linchao Zhu, Deli Zhao, and Yueting Zhuang. Recognizing an action using its name: A knowledge-based approach. International Journal of Computer Vision, 120(1):61-77, 2016. +[10] Lianli Gao, Xiangpeng Li, Jingkuan Song, and Heng Tao Shen. Hierarchical lstms with adaptive attention for visual captioning. IEEE transactions on pattern analysis and machine intelligence, 2019. +[11] Jieuxiang Gu, Jianfei Cai, Shafiq R Joty, Li Niu, and Gang Wang. Look, imagine and match: Improving textual-visual cross-modal retrieval with generative models. In CVPR, pages 7181-7189, 2018. +[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. +[13] Elad Hoffer and Nir Ailon. Deep metric learning using triplet network. In Similarity-based Pattern Recognition, pages 84-92, 2015. +[14] Mengqiu Hu, Yang Yang, Fumin Shen, Ning Xie, Richang Hong, and Heng Tao Shen. Collective reconstructive embeddings for cross-modal hashing. IEEE Transactions on Image Processing, 28(6):2770-2784, 2018. +[15] Yan Huang, Qi Wu, Chunfeng Song, and Liang Wang. Learning semantic concepts and order for image and sentence matching. In CVPR, pages 6163-6171, 2018. +[16] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. + +[17] Ranjay Krishna, Kenji Hata, Frederic Ren, Li Fei-Fei, and Juan Carlos Niebles. Dense captioning events in videos. In ICCV, pages 706–715, 2017. +[18] Kuang-Huei Lee, Xi Chen, Gang Hua, Houdong Hu, and Xiaodong He. Stacked cross attention for image-text matching. In ECCV, pages 201-216, 2018. +[19] Kunpeng Li, Yulun Zhang, Kai Li, Yuanyuan Li, and Yun Fu. Visual semantic reasoning for image-text matching. In ICCV, pages 4654-4662, 2019. +[20] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, pages 740-755, 2014. +[21] Venice Erin Liong, Jiwen Lu, Yap-Peng Tan, and Jie Zhou. Deep coupled metric learning for cross-modal matching. IEEE Transactions on Multimedia, 19(6):1234-1244, 2016. +[22] Yang Liu, Samuel Albania, Arsha Nagrani, and Andrew Zisserman. Use what you have: Video retrieval using representations from collaborative experts. In BMVC, 2019. +[23] Yu Liu, Yanming Guo, Erwin M Bakker, and Michael S Lew. Learning a recurrent residual fusion network for multimodal matching. In ICCV, pages 4107-4116, 2017. +[24] Niluthpol Chowdhury Mithun, Juncheng Li, Florian Metze, and Amit K Roy-Chowdhury. Learning joint embedding with multimodal cues for cross-modal video-text retrieval. In ACM MM, pages 19-27, 2018. +[25] Hyeonseob Nam, Jung-Woo Ha, and Jeonghee Kim. Dual attention networks for multimodal reasoning and matching. In CVPR, pages 299-307, 2017. +[26] Mike Schuster and Kuldip K Paliwal. Bidirectional recurrent neural networks. IEEE transactions on Signal Processing, 45(11):2673-2681, 1997. +[27] Fumin Shen, Xiang Zhou, Jun Yu, Yang Yang, Li Liu, and Heng Tao Shen. Scalable zero-shot learning via binary visual-semantic embeddings. IEEE Transactions on Image Processing, 28(7):3662-3674, 2019. +[28] Heng Tao Shen, Luchen Liu, Yang Yang, Xing Xu, Zi Huang, Fumin Shen, and Richang Hong. Exploiting subspace relation in semantic labels for cross-modal hashing. IEEE Transactions on Knowledge and Data Engineering, 2020. +[29] Jingkuan Song, Yuyu Guo, Lianli Gao, Xuelong Li, Alan Hanjalic, and Heng Tao Shen. From deterministic to generative: Multimodal stochastic rnns for video captioning. IEEE transactions on neural networks and learning systems, 30(10):3047-3058, 2018. +[30] Yale Song and Mohammad Soleymani. Polysemous visual-semantic embedding for cross-modal retrieval. In CVPR, pages 1979–1988, 2019. +[31] Bokun Wang, Yang Yang, Xing Xu, Alan Hanjalic, and Heng Tao Shen. Adversarial cross-modal retrieval. In ACM MM, pages 154-162, 2017. +[32] Tan Wang, Xing Xu, Yang Yang, Alan Hanjalic, Heng Tao Shen, and Jingkuan Song. Matching images and text with multi-modal tensor fusion and re-ranking. In ACM MM, pages 12-20, 2019. + +[33] Jiwei Wei, Yang Yang, Jingjing Li, Lei Zhu, Lin Zuo, and Heng Tao Shen. Residual graph convolutional networks for zero-shot learning. In Proceedings of the ACM Multimedia Asia, pages 1-6. 2019. +[34] Jun Xu, Tao Mei, Ting Yao, and Yong Rui. Msr-vtt: A large video description dataset for bridging video and language. In CVPR, pages 5288-5296, 2016. +[35] Xing Xu, Li He, Huimin Lu, Lianli Gao, and Yanli Ji. Deep adversarial metric learning for cross-modal retrieval. World Wide Web, 22(2):657-672, 2019. +[36] Xing Xu, Huimin Lu, Jingkuan Song, Yang Yang, Heng Tao Shen, and Xuelong Li. Ternary adversarial networks with self-supervision for zero-shot cross-modal retrieval. IEEE transactions on cybernetics, 2019. +[37] Xing Xu, Fumin Shen, Yang Yang, Heng Tao Shen, and Xuelong Li. Learning discriminative binary codes for large-scale cross-modal retrieval. IEEE Transactions on Image Processing, 26(5):2494-2507, 2017. +[38] Yang Yang, Jie Zhou, Jiangbo Ai, Yi Bin, Alan Hanjalic, Heng Tao Shen, and Yanli Ji. Video captioning by adversarial LSTM. IEEE Transactions on Image Processing, 27(11):5600-5611, 2018. +[39] Peter Young, Alice Lai, Micah Hodosh, and Julia Hockenmaier. From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions. Transactions of the Association for Computational Linguistics, 2:67-78, 2014. +[40] Bowen Zhang, Hexiang Hu, and Fei Sha. Cross-modal and hierarchical modeling of video and text. In ECCV, pages 374-390, 2018. +[41] Lei Zhang, Ji Liu, Yang Yang, Fuxiang Huang, Feiping Nie, and David Zhang. Optimal projection guided transfer hashing for image retrieval. IEEE Transactions on Circuits and Systems for Video Technology, 2019. \ No newline at end of file diff --git a/universalweightingmetriclearningforcrossmodalmatching/images.zip b/universalweightingmetriclearningforcrossmodalmatching/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b7178f52f7a91d55bb992957300530a0305d88eb --- /dev/null +++ b/universalweightingmetriclearningforcrossmodalmatching/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22f83fc81a7693d55141676e81bc1a5f1f436a18cbdf91c79a956cbb900eed57 +size 616107 diff --git a/universalweightingmetriclearningforcrossmodalmatching/layout.json b/universalweightingmetriclearningforcrossmodalmatching/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..eecb90eeb6b403cb6707bc62f2f9a95f369fbc12 --- /dev/null +++ b/universalweightingmetriclearningforcrossmodalmatching/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bcd152852009ee52ff228acb901acd7b7dd27f9f71ad951781d556da027ee1d +size 375362 diff --git a/unpairedimagesuperresolutionusingpseudosupervision/b16b8c38-0364-4855-97a2-6bf2a5252e42_content_list.json b/unpairedimagesuperresolutionusingpseudosupervision/b16b8c38-0364-4855-97a2-6bf2a5252e42_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..bc25c6f960384f35b1fd0698f8e2a232b1569e37 --- /dev/null +++ b/unpairedimagesuperresolutionusingpseudosupervision/b16b8c38-0364-4855-97a2-6bf2a5252e42_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:236d1f00c60a82a402398229680d8dd6a80704d802a2f4cb386cb327a4dbf9dd +size 86960 diff --git a/unpairedimagesuperresolutionusingpseudosupervision/b16b8c38-0364-4855-97a2-6bf2a5252e42_model.json b/unpairedimagesuperresolutionusingpseudosupervision/b16b8c38-0364-4855-97a2-6bf2a5252e42_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ba53a03cea408e4faaa924394812801da0cc8d92 --- /dev/null +++ b/unpairedimagesuperresolutionusingpseudosupervision/b16b8c38-0364-4855-97a2-6bf2a5252e42_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1dc55adc4f5a184c49e8a275a5ac85e5f89cbca2f0dc976d2214805001e84327 +size 107845 diff --git a/unpairedimagesuperresolutionusingpseudosupervision/b16b8c38-0364-4855-97a2-6bf2a5252e42_origin.pdf b/unpairedimagesuperresolutionusingpseudosupervision/b16b8c38-0364-4855-97a2-6bf2a5252e42_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1a384e22e85e13efa211e40cbbe5b89ed890da1b --- /dev/null +++ b/unpairedimagesuperresolutionusingpseudosupervision/b16b8c38-0364-4855-97a2-6bf2a5252e42_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:762acd8d4794edd82869ee7af29dee0c691c897b490182d45f4d2a6b8b2b6d86 +size 1087705 diff --git a/unpairedimagesuperresolutionusingpseudosupervision/full.md b/unpairedimagesuperresolutionusingpseudosupervision/full.md new file mode 100644 index 0000000000000000000000000000000000000000..28d06158a3875388097e4f6c5c4042c91cb4229d --- /dev/null +++ b/unpairedimagesuperresolutionusingpseudosupervision/full.md @@ -0,0 +1,389 @@ +# Unpaired Image Super-Resolution using Pseudo-Supervision + +Shunta Maeda + +Navier Inc. + +shunta@navier.co.jp + +# Abstract + +In most studies on learning-based image superresolution (SR), the paired training dataset is created by downscaling high-resolution (HR) images with a predetermined operation (e.g., bicubic). However, these methods fail to super-resolve real-world low-resolution (LR) images, for which the degradation process is much more complicated and unknown. In this paper, we propose an unpaired SR method using a generative adversarial network that does not require a paired/aligned training dataset. Our network consists of an unpaired kernel/noise correction network and a pseudo-paired SR network. The correction network removes noise and adjusts the kernel of the inputted LR image; then, the corrected clean LR image is upscaled by the SR network. In the training phase, the correction network also produces a pseudo-clean LR image from the inputted HR image, and then a mapping from the pseudo-clean LR image to the inputted HR image is learned by the SR network in a paired manner. Because our SR network is independent of the correction network, well-studied existing network architectures and pixel-wise loss functions can be integrated with the proposed framework. Experiments on diverse datasets show that the proposed method is superior to existing solutions to the unpaired SR problem. + +# 1. Introduction + +Image super-resolution (SR) is a fundamental ill-posed problem in low-level vision that reconstructs a high-resolution (HR) image from its low-resolution (LR) observation. Recent progress in the on deep learning-based methods has significantly improved the performance of SR, increasing attention from the practical perspective. However, in many studies, training image pairs are generated by a predetermined downscaling operation (e.g., bicubic) on the HR images. This method of dataset preparation is not practical in real-world scenarios because there is usually no HR image corresponding to the given LR one. + +Some recent studies have proposed methods to overcome the absence of HR-LR image pairs, such as blind SR meth + +![](images/f546ad9b6983bd46f6572484e51781238ad9577a3efb64c18037715ed3817ec8.jpg) + +![](images/646de488a7305d08e7c7fcfdcbf3f8edfbcc9b04dff266825a7b339e8c81b12a.jpg) + +![](images/cfeb772ee166bff9903fbe94ed3d698f175b28fc5c8f995babc7d3c25bf025a2.jpg) + +![](images/2df36241de2946e457ac7892fa82565ecc6de1466073d202789cca9c5404660c.jpg) +Figure 1: Unpaired SR results on diverse datasets. From left to right: $\times 4$ SR result for a synthetically degraded LR image from DIV2K realistic-wild set [42], $\times 4$ SR result for a real-world LR face image from Widerface [48], and $\times 2$ SR result for a real-world LR aerial image from DOTA [47]. Zoom in for better view. + +![](images/e0414e6f829fca113e2d1a0b561745e35fa4cde6051422c336160206429e1242.jpg) + +![](images/587276ee39c84fe5ed631228b84ab52d1ab52245553a1fe15d9562083d8b832c.jpg) + +ods [39, 12, 57] and generative adversarial network (GAN)-based unpaired SR methods [51, 4, 56, 32]. Blind SR aims to reconstruct HR images from LR ones degraded by arbitrary kernels. Although recent studies have achieved "blindness" for limited forms of degradation (e.g., blur), real LR images are not always represented with such degradation; thus, they perform poorly on the images degraded by not expected processes. By contrast, GAN-based unpaired SR methods can directly learn a mapping from LR to HR images without assuming any degradation processes. + +GANs learn to generate images with the same distribution as the target domain through a minimax game between a generator and discriminator [11, 37]. GAN-based unpaired SR methods can be roughly classified according to whether they start from an LR image (direct approach; Fig. 2a) or an HR image (indirect approach; Fig. 2b). + +Direct approach. In this approach, a generator upscales source LR images to fool an HR discriminator [51]. The main drawback of this approach is that the pixel-wise loss functions cannot be used to train the generator, i.e., SR network. In paired SR methods, the pixel-wise loss between reconstructed images and HR target images plays a crucial role not only in distortion-oriented methods but also in perception-oriented methods [28, 2]. + +![](images/2282663b8d0dbf51749f5d156a50fefeab5454cc63d0c1662dd613ae6f1bea35.jpg) +(a) Direct approach. + +![](images/15feef1f8e4ef8b75573075026d7c6992fc47a1ddf7521fed170f979d7c11a72.jpg) +(b) Indirect approach. +Figure 2: Two distinct approaches to unpaired SR using GANs. (a) Generator directly upscales LR images. (b) Generator first downscales HR images and uses the generated LR images to train SR network $U$ . + +Indirect approach. In this approach, a generator down-scales source HR images to fool an LR discriminator [4, 32]. The generated LR images are then used to train the SR network in a paired manner. The main drawback of this approach is that the deviation between the generated LR distribution and the true LR distribution causes train-test discrepancy, degrading the test time performance. + +Our approach. The main contribution of this work is that we simultaneously overcome the drawbacks of the above two approaches by separating the entire network into an unpaired kernel/noise correction network and a pseudo-paired SR network (Fig. 3). The correction network is a CycleGAN [58]-based unpaired LR $\leftrightarrow$ clean LR translation. The SR network is a paired clean LR $\rightarrow$ HR mapping, where the clean LR images are created by downscaling the HR images with a predetermined operation. In the training phase, the correction network also generates pseudo-clean LR images by first mapping the clean LR images to the true LR domain and then pulling them back to the clean LR domain. The SR network is learned to reconstruct the original HR images from the pseudo-clean LR images in a paired manner. With the following two merits, our method achieves superior results to state-of-the-arts ones: (1) Because our correction network is trained on not only the generated LR images but also the true LR images through the bi-directional structure, the deviation between the generated LR distribution and the true LR distribution does not critically degrade the test time performance. (2) Any existing SR networks and pixel-wise loss functions can be integrated because our SR network is separated to be able to learn in a paired manner. + +# 2. Related Work + +The training data, network architecture, and objective function are three essential elements of a learning deep network. Paired image SR is aimed at optimizing the network architecture and/or objective function to improve performance under the assumption that ideal training data exists. However, in many practical cases, there is a lack of training data (i.e., target HR images corresponding to source LR images). This problem has been addressed by recent studies on blind and unpaired image SR. As another approach, a few recent works [7, 54, 5] have built real paired SR datasets using specialized hardware and data correction processes, which are difficult to scale. + +# 2.1. Paired Image Super-Resolution + +In most SR studies, the paired training dataset is created by downscaling HR images with a predetermined operation (e.g., bicubic). Since the first convolutional neural network (CNN)-based SR network [9], various SR networks have been proposed to improve LR-to-HR reconstruction performance. Early studies [20, 30] found that a deeper network performs better with residual learning. A proposed residual channel attention network (RCAN) [55] achieved further improved depth and performance. Upscaling strategies have also been studied, such as progressive upscaling of LapSRN [26] and iterative upscaling and downscaling of DBPN [13]. In these studies, a simple L1 or L2 distance was used as the objective function, but it is known that these simple distances alone result in blurred textures. To improve the perceptual quality, SRGAN [28] introduced perceptual loss [18] and adversarial loss [11], realizing more visually pleasing results. ESRGAN [44], which is an enhanced version of SRGAN, is one of the state-of-the-art perception-oriented models. + +# 2.2. Blind Image Super-Resolution + +Relatively less research attention has been paid to blind image SR despite its importance for practical applications. Studies on blind SR usually focus on models that are only blind to the blur kernels [34, 38, 39, 12, 57]. For instance, ZSSR [39] exploits the recurrence of information inside a single image to upscale images with different blur kernels, and IKC [12] uses the intermediate outputs to iteratively correct the mismatch of blur kernels. Few studies on blind SR have addressed the combined degradation problem (i.e., additive noise, compression artifacts, etc.) beyond the blur blind SR, whereas several blind methods have been proposed for specific degradation problems, such as denoising [23] and motion deblurring [35, 24]. + +# 2.3. Unpaired Image Super-Resolution + +A few recent works have addressed the SR problem without using a paired training dataset. Different from the un + +![](images/d334fb7f1dba118421a8c2f0f6b2cc2a590ebaef2b2508428f70f3594478db71.jpg) +Figure 3: Data-flow diagram of proposed method. SR network $U_{Y\downarrow Y}$ can be learned in a paired manner through $\mathcal{L}_{rec}$ , even if the training dataset $\{X,Y\}$ is not paired. The whole network is end-to-end trainable. + +paired translation methods, such as CycleGAN [58] and DualGAN [49], unpaired SR aims to upscale source LR images while preserving style and local structure. Bulat et al. [4] and Lugmayr et al. [32] first trained a high-to-low degradation network and then used the degraded outputs to train a low-to-high SR network. Yuan et al. [51] proposed a cycle-in-cycle network to simultaneously learn a degradation network and an SR network. Different from our method, the degradation network of Yuan et al. is deterministic, and the SR network is incorporated with the bi-cycle network; thus, the usable loss function is limited. Zhao et al. [56] also jointly stabilized the training of a degradation network and SR network by utilizing a bi-directional structure. Similar to Yuan et al., the SR network of Zhao et al. has a limited degree of freedom to select the loss function. + +# 3. Proposed Method + +Our goal is to learn a mapping $F_{XY}$ from an LR source domain $X$ to an HR target domain $Y$ based on the given unpaired training samples $x \in X$ and $y \in Y$ . Here, we define "clean LR," i.e., HR images downscaled with a predetermined operation, as $y_{\downarrow} \in Y_{\downarrow}$ . The downscaling operation $Y \to Y_{\downarrow}$ used is a combination of Gaussian blur with $\sigma = (\text{scale factor}) / 2$ and bicubic downscaling. The mapping $F_{XY}$ of our model is a combination of the two mappings $G_{XY_{\downarrow}}$ and $U_{Y_{\downarrow}Y}$ , where $G_{XY_{\downarrow}}$ is a mapping from $X$ to $Y_{\downarrow}$ , and $U_{Y_{\downarrow}Y}$ is an upscaling mapping from $Y_{\downarrow}$ to $Y$ . Figure 3 illustrates the proposed framework. + +Domain transfer in LR. We use a CycleGAN [58]-based model for the domain transfer in LR. Two generators, $G_{XY\downarrow}$ and its inverse mapping $G_{Y\downarrow X}$ , are simultaneously learned to enforce cycle consistency, i.e. $G_{XY\downarrow} \circ G_{Y\downarrow X}(y_{\downarrow}) \approx y_{\downarrow}^{1}$ . The training of the generator $G_{XY\downarrow}(G_{Y\downarrow X})$ requires a discriminator $D_{Y\downarrow}(D_X)$ that aims to detect translated samples + +from the real examples $y_{\downarrow}(x)$ + +Mapping from LR to HR. The upscaling mapping $U_{Y\downarrow Y}$ is learned to reconstruct HR image $y$ from a pseudo-clean LR image $G_{XY\downarrow} \circ G_{Y\downarrow X}(y_{\downarrow})$ in a paired manner. Thus, any pixel-wise loss functions can be used to train $U_{Y\downarrow Y}$ . Hereafter, we denote $G_{XY\downarrow} \circ G_{Y\downarrow X}(y_{\downarrow})$ as “ $y_{\downarrow}^{\circ}$ ”. + +Adjustment with HR Discriminator. While $\mathring{y}_{\downarrow}^{\circ}$ is used to train $U_{Y\downarrow Y}$ , the actual input at test time is $G_{XY\downarrow}(x)$ . Accordingly, $\mathring{y}_{\downarrow}^{\circ} \sim G_{XY\downarrow}(x)$ is required to minimize the train-test discrepancy. Although this requirement is satisfied to some extent by the normal CycleGAN, we introduce an additional discriminator $D_{X\uparrow}$ , which takes the output of $U_{Y\downarrow Y}$ as input so that $U_{Y\downarrow Y}(\mathring{y}_{\downarrow}^{\circ})$ gets closer to $U_{Y\downarrow Y} \circ G_{XY\downarrow}(x)$ . Here, we define $X_{\uparrow}$ as a domain consisting of $U_{Y\downarrow Y} \circ G_{XY\downarrow}(x)$ . Thus, $X_{\uparrow}$ is an unfixed domain that shifts during training. Note that $D_{X\uparrow}$ updates the parameters of the two generators, and $U_{Y\downarrow Y}$ is simply used as an amplifier of local image features. + +# 3.1. Loss Functions + +Adversarial loss. We impose an adversarial constraint [11] on both generators $G_{XY\downarrow}$ and $G_{Y\downarrow X}$ . As a specific example, an adversarial loss for $G_{XY\downarrow}$ and $D_{Y\downarrow}$ is expressed as + +$$ +\begin{array}{l} \mathcal {L} _ {a d v} \left(G _ {X Y _ {\downarrow}}, D _ {Y _ {\downarrow}}, X, Y _ {\downarrow}\right) = \mathbb {E} _ {y _ {\downarrow} \sim \mathrm {P} _ {Y _ {\downarrow}}} \left[ \log D _ {Y _ {\downarrow}} \left(y _ {\downarrow}\right) \right] \tag {1} \\ + \mathbb {E} _ {x \sim \mathrm {P} _ {X}} [ \log (1 - D _ {Y _ {\downarrow}} (G _ {X Y _ {\downarrow}} (x))) ], \\ \end{array} +$$ + +where $\mathrm{P}_X(\mathrm{P}_{Y_\downarrow})$ is the data distribution of the domain $X(Y_{\downarrow})$ . $G_{XY_{\downarrow}}$ and $D_{Y_{\downarrow}}$ simultaneously optimized each other through a mini-max game between them, i.e., $\min_{G_{XY_{\downarrow}}}\max_{D_{Y_{\downarrow}}}\mathcal{L}_{adv}(G_{XY_{\downarrow}},D_{Y_{\downarrow}},X,Y_{\downarrow})$ . Similar to the CycleGAN framework, the inverse mapping $G_{Y_{\downarrow}X}$ and its corresponding discriminator $D_X$ are also optimized: $\min_{G_{Y_{\downarrow}X}}\max_{D_X}\mathcal{L}_{adv}(G_{Y_{\downarrow}X},D_X,Y_{\downarrow},X)$ . + +In our framework, the two generators are also optimized + +through an HR discriminator $D_{X_{\uparrow}}$ + +$$ +\begin{array}{l} \mathcal {L} _ {a d v} \left(\left(G _ {X Y \downarrow}, G _ {Y \downarrow X}\right), D _ {X \uparrow}, Y _ {\downarrow}, X _ {\uparrow}\right) \\ = \mathbb {E} _ {x \sim \mathrm {P} _ {X}} [ \log D _ {X \uparrow} \left(U _ {Y \downarrow Y} \circ G _ {X Y \downarrow} (x)\right) ] \tag {2} \\ + \mathbb {E} _ {y _ {\downarrow} \sim \mathrm {P} _ {Y _ {\downarrow}}} [ \log (1 - D _ {X _ {\uparrow}} (U _ {Y _ {\downarrow} Y} (\stackrel {\circ} {y} _ {\downarrow}))) ]. \\ \end{array} +$$ + +The optimization process of Eq. 2 is expressed as $\min_{G_{XY\perp},G_{Y\perp X}}\max_{D_{X\uparrow}}\mathcal{L}_{adv}((G_{XY\perp},G_{Y\perp X}),D_{X\uparrow},Y_{\perp},X_{\uparrow})$ + +Cycle consistency loss. The normal CycleGAN learns one-to-one mappings because it imposes cycle consistency on both cycles (i.e., $X \to Y \to X$ and $Y \to X \to Y$ ). We relax this restriction by requiring cycle consistency for only one side: + +$$ +\mathcal {L} _ {c y c} \left(G _ {Y _ {\downarrow} X}, G _ {X Y _ {\downarrow}}\right) = \left\| G _ {X Y _ {\downarrow}} \circ G _ {Y _ {\downarrow} X} \left(y _ {\downarrow}\right) - y _ {\downarrow} \right\| _ {1}. \tag {3} +$$ + +Under the above one-side cycle consistency, the mapping $G_{Y\downarrow X}$ is allowed to be one-to-many. Consequently, our framework can deal with various noise types/distributions of the LR source domain $X$ . + +Identity mapping loss. An identity mapping loss was introduced in the original CycleGAN to preserve color composition for a task of painting $\rightarrow$ photo. We also impose the identity mapping loss for $G_{XY_{\downarrow}}$ to avoid color variation: + +$$ +\mathcal {L} _ {i d t} \left(G _ {X Y \downarrow}\right) = \left\| G _ {X Y \downarrow} \left(y _ {\downarrow}\right) - y _ {\downarrow} \right\| _ {1}. \tag {4} +$$ + +Geometric ensemble loss. Geometric consistency, which was introduced in a recent work [10], reduces the space of possible translation to preserve the scene geometry. Inspired by geometric consistency, we introduce a simple geometric ensemble loss that requires the flip and rotation for the input images not to change the result: + +$$ +\mathcal {L} _ {\text {g e o}} \left(G _ {X Y _ {\downarrow}}\right) = \| G _ {X Y _ {\downarrow}} (x) - \sum_ {i = 1} ^ {8} T _ {i} ^ {- 1} \left(G _ {X Y _ {\downarrow}} \left(T _ {i} (x)\right)\right) / 8 \| _ {1}, \tag {5} +$$ + +where the operators $\{T_i\}_{i=1}^8$ represent eight distinct patterns of flip and rotation. Note that using $\mathcal{L}_{geo}$ increases the total training time by a factor of approximately $3/2$ . + +Full objective. Our full objective for the two generators and three discriminators is as follows: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {t r a n s}} = \mathcal {L} _ {\text {a d v}} \left(G _ {X Y _ {\downarrow}}, D _ {Y _ {\downarrow}}, X, Y _ {\downarrow}\right) \\ + \mathcal {L} _ {a d v} \left(G _ {Y _ {\downarrow} X}, D _ {X}, Y _ {\downarrow}, X\right) \\ + \gamma \mathcal {L} _ {a d v} \left(\left(G _ {X Y \downarrow}, G _ {Y \downarrow X}\right), D _ {X \uparrow}, Y _ {\downarrow}, X _ {\uparrow}\right) \tag {6} \\ + \lambda_ {c y c} \mathcal {L} _ {c y c} \left(G _ {Y \downarrow X}, G _ {X Y \downarrow}\right) \\ + \lambda_ {i d t} \mathcal {L} _ {i d t} \left(G _ {X Y \downarrow}\right) \\ + \lambda_ {g e o} \mathcal {L} _ {g e o} (G _ {X Y _ {\downarrow}}), \\ \end{array} +$$ + +where the hyperparameters $\lambda_{cyc},\lambda_{idt},\lambda_{geo}$ , and $\gamma$ weight the contributions of each objective. + +While the SR network $U_{Y_1Y}$ is independent of the generators and discriminators, it is used as an amplifier of the + +![](images/f74538d4449d8312ff1b522825156a4033cd75bd1882a7d34671b5a30000ec8f.jpg) +Figure 4: Intermediate images of proposed method. $x$ is image "0886" from the DIV2K realistic-wild validation set, and $y$ is image "0053" from the DIV2K training ground-truth set. + +local features of images to be inputted to $D_{X_{\uparrow}}$ . Thus, we jointly update the SR network during the training of the correction network. We use L1 loss to reconstruct an HR image from a pseudo-clean LR image $\mathring{y}_{\downarrow}$ : + +$$ +\mathcal {L} _ {r e c} = \left\| U _ {Y \downarrow Y} \left(y _ {\downarrow} ^ {\circ}\right) - y \right\| _ {1}. \tag {7} +$$ + +We again note that any pixel-wise loss (e.g., perceptual loss, texture loss, and adversarial loss) can be used as $\mathcal{L}_{rec}$ in our formulation. + +# 3.2. Network Architecture + +$G_{XY\downarrow}$ and $U_{Y\downarrow Y}$ . We utilize an RCAN [55]-based architecture as $G_{XY\downarrow}$ and $U_{Y\downarrow Y}$ . The RCAN is a very deep SR network realized by a residual in residual structure with short and long skip connections. The RCAN consists of 10 residual groups (RGs), where each RG contains 20 residual channel attention blocks (RCABs). Our $G_{XY\downarrow}(U_{Y\downarrow Y})$ is a reduced version of the RCAN consisting of five RGs with 10 (20) RCABs. Note that the final upscaling layer included in the original RCAN is omitted for $G_{XY\downarrow}$ . + +$G_{Y\downarrow X}$ . For the generator $G_{Y\downarrow X}$ , we use several residual blocks with $5 \times 5$ filters and several fusion layers with $1 \times 1$ filters, where each convolution layer is followed by batch normalization (BN) [16] and LeakyReLU. The two head modules, including the one residual block, independently extract the features of an inputted RGB image and single-channel random noise $\mathcal{N}(0,1)$ that simulates the randomness of distortions. Then, the two extracted features are concatenated to be inputted to a main module consisting of six residual blocks and three fusion layers. + +$D_{X}, D_{Y\downarrow}$ and $D_{X\uparrow}$ . For the LR discriminators $D_{X}$ and $D_{Y\downarrow}$ , we use five convolution layers with strides of 1. The convolution layers, except for the last layer, are followed by LeakyReLU without BN. A similar architecture is also used for the HR discriminator $D_{X\uparrow}$ but with a different stride in the initial layers. For the case of scale factor $= 2$ (4), strides of 2 are used for the first (and second) layer(s) of $D_{X\uparrow}$ . We use PatchGAN [29, 17] for all the discriminators. + +
MethodPSNRSSIM
Blind denoising/deblurring + Bicubic upscalingBicubic (for reference)19.990.4857
NC [27] + Bicubic20.030.5049
RL-restore [50] + Bicubic20.180.5119
RL-restore [50] + SRN-Deblur [40] + Bicubic20.130.5173
RL-restore [50] + DeblurGAN-v2 [25] + Bicubic20.210.5158
Blind denoising/deblurring + non Blind SR methodDBPN [13] (for reference)19.820.4572
RL-restore [50] + DeblurGAN-v2 [25] + DBPN [13]20.250.5198
Blind denoising/deblurring + Blind SR methodZSSR [39]19.910.4835
ZSSR [39] w/ KernelGAN [1]19.450.4493
IKC [12]19.620.4251
RL-restore [50] + DeblurGAN-v2 [25] + ZSSR [39]20.190.5217
RL-restore [50] + DeblurGAN-v2 [25] + ZSSR [39] w/ KernelGAN [1]19.830.5137
RL-restore [50] + DeblurGAN-v2 [25] + IKC [12]20.260.5140
Our method21.320.5541
+ +Table 1: Numerical comparison with state-of-the-art blind methods on DIV2K realistic-wild validation set (SR scale ×4). The best and second-best results are highlighted in red and blue, respectively. We use the officially provided evaluation script (validation stage setting). Throughout this paper, the real configuration is used for ZSSR, and the Inception backbone model is used for DeblurGAN-v2. + +![](images/df4cef3d7779eb7e34c11537a85ffad07efc109e872c2baef803313303d4fe68.jpg) + +![](images/cca61a398acad74873c16f0b4dc1d3dae525512eb22e6427d4a1b9f8de557d92.jpg) +"0896" and "0842" from DIV2K realistic-wild validation set + +![](images/3b43f4e0e7d6f89c6aa80d6bed04ff2086ad4d1c1f5559d76b46e90dc66bf1fd.jpg) + +![](images/4de202acde3e5b38a58966e21bfb9ea3e973c44261842bd111ebbeda4aca97c4.jpg) +LR input + +![](images/097a0d127f572e7d5344e41da8c3bf52f8b19aec6145ab4556d8b24bd869c46b.jpg) + +![](images/fd103d7972380355738613cf9055fcf6a9db9eb6b185eede5cebdcbad8979c2d.jpg) +RL-restore + DeblurGAN-v2 + DBPN +Figure 5: Qualitative comparison with state-of-the-art blind methods on DIV2K realistic-wild validation set (SR scale $\times 4$ ). Our method reconstructs the fine details while removing artifacts, yielding the most visually pleasing results. + +![](images/c241800d290fe8ba12115e712258e1c6cab208c62d4e1c57d7083cfd4e3ca99d.jpg) + +![](images/8d9d4e1b05cd5e8e4e80f13dd152fd663161e7b85db5d6334a928ce80a93182e.jpg) +ZSSR +RL-restore + DeblurGAN-v2 + ZSSR + +![](images/f47b003bce44e13a73784a55b019da275815481c78efb785f8fa5c002f0ec985.jpg) + +![](images/2f2ecac9d61b71216f8fbc997cd1ccf5c9a615d3f23a14512a9f80327a56b7e6.jpg) + +![](images/31d1d63ca15b241ee4cb8f6414af03988ffb5d0d30c59d4b0104fed1112dc0c5.jpg) + +![](images/e2d5ab7061ad6782289e16bfeac3d80d674b61cfb6bf927efa5574818e5ff11e.jpg) +RL-restore + DeblurGAN-v2 + IKC + +![](images/75299f4a2944fe83e0df7c42da3e64e4ef1ad60e88a76225f0f6422ae5824269.jpg) + +![](images/c610b07a84926c73f5b1c1dcef0473485f6329eaea8526c47cac54c9f3ead4ec.jpg) +Ours + +# 4. Experiments + +# 4.1. Network Training + +We used the Adam optimizer [21] with $\beta_{1} = 0.5$ , $\beta_{2} = 0.999$ , and $\epsilon = 10^{-8}$ to train the generators and discriminators. The SR network $U_{Y\downarrow Y}$ was similarly trained but with a different $\beta_{1}$ ( $= 0.9$ ). The learning rates of all networks were initialized to $1 \times 10^{-4}$ . Then, the learning rates of the networks other than $U_{Y\downarrow Y}$ were halved at $100\mathrm{k}$ , $180\mathrm{k}$ , $240\mathrm{k}$ , and $280\mathrm{k}$ iterations. We trained our networks for more than $3 \times 10^{5}$ iterations with a mini-batch size of 16. In each iteration, LR patches of $32 \times 32$ and HR patches of corresponding size were extracted as inputs in an unaligned manner. Then, data augmentation of random flip and rotation was performed on each training patch. We used PyTorch [36] to conduct all the experiments. + +# 4.2. Experiments on Synthetic Distortions + +DIV2K realistic-wild dataset. We used the realistic-wild set (Track 4) of the NTIRE 2018 Super-Resolution Challenge [42]. The realistic-wild set was generated by degrad + +ing DIV2K [41], consists of 2K resolution images that are diverse in their content. DIV2K has 800 training images. The realistic-wild set simulates real "wild" LR images via $\times 4$ downscaling, motion blurring, pixel shifting, and noise addition. The degradation operations are the same within a single image but vary from image to image. Four degraded LR images are generated for each DIV2K training image (i.e., 3,200 LR training images in total). We trained our model using the above 3,200 LR and 800 HR paired images but with "unpaired/unaligned" sampling. We evaluated the results on the 100 realistic-wild validation images because the ground truths of the testing images were not provided. + +Hyperparameters. We used the loss hyperparameters $\lambda_{cyc} = 1$ , $\lambda_{idt} = 1$ , $\lambda_{geo} = 1$ , and $\gamma = 0.1$ throughout the experiments in this subsection. The SR factor was $\times 4$ . + +Intermediate images. Figure 4 shows visual examples of the intermediate images of the proposed method. The degradation network $G_{Y\downarrow X}$ degrades the input clean LR image $y_{\downarrow}$ so that the output $G_{Y\downarrow X}(y_{\downarrow})$ reproduces the noise distribution of the real degraded image $x$ . The reconstruction network $G_{XY\downarrow}$ is effective in removing the noises of + +
UsernamePSNRSSIM
xixihaha24.120.56
yyuan1324.070.56
Hot_Milk23.900.56
yifita23.870.56
cskzh23.550.55
JSChoi23.200.53
enoch23.040.52
assafsho22.930.51
hyu_ss22.570.49
cr201822.520.49
Ours21.320.5541
Ours+21.350.5560
+ +Table 2: Comparison with NTIRE 2018 baselines. Top 10 validation results from NTIRE 2018 realistic-wild challenge website are compared as pair-trained upper bounds. Ours $^{+}$ is an enhanced version of Ours using a standard self-ensemble technique [43]. + +
MethodPSNRSSIM
Ours21.320.5541
Ours - w/o DX↑21.290.5532
Ours - trained on y↓21.090.5312
Ours - trained on GY↓X (y↓)20.840.5500
Ours - trained on GY↓X (y↓) - original RCAN20.780.5482
+ +Table 3: Ablation study. Some other variants of our network were compared to verify the proposed method. + +both the real $(x)$ and fake $(G_{Y_{\downarrow}X}(y_{\downarrow}))$ degraded images. + +Comparison with state-of-the-art blind methods. Because the blind SR method for multiple degradations has not been studied sufficiently, we took a benchmark by combining the SR method with the blind restoration methods (Tab. 1, Fig. 5). We first explored the state-of-the-art blind denoising methods: a patch-based method NC [27] and a CNN-based method RL-restore [50]. RL-restore performed better than NC. Then, we compared two CNN-based blind deblurring methods, SRN-Deblur [40] and DeblurGAN-v2 [25], based on the output of RL-restore. The performances of these deblurring methods were almost equivalent, but DeblurGAN-v2 ran faster. Finally, three state-of-the-art SR methods were combined with RL-restore and DeblurGAN-v2: a non-blind SR method DBPN [13] and two blind SR methods ZSSR [39] and IKC [12]. We further combined ZSSR with the recently proposed kernel estimation method KernelGAN [1]. Our method outperformed all of the above methods by a large margin; however, the comparison was not completely fair because the compared methods were not trained on the dataset used here. + +Comparison with NTIRE 2018 baselines. Table 2 shows a comparison with NTIRE 2018 baselines from the validation website3, where the dataset and evaluation script used were the same as in our experiment. Note that although the NTIRE 2018 competition provides a paired training dataset, we trained our network in an unpaired manner. Thus, the NTIRE 2018 baselines can be regarded as pair-trained upper + +![](images/463b193f4285d7938b4bf9e9f3de6aaefdd697bde206e17a451842c454e3dab7.jpg) + +![](images/eadfbe4f49eb7384597dca2faa178d67ee20b28832249235387a332c53231d13.jpg) + +![](images/582667e57a4ab67553710c94f0ba1a600488805ae94bde0100fb3825d8af1f95.jpg) +Figure 6: Example image with perception-oriented training. "0810" from DIV2K realistic-wild validation set is displayed. + +![](images/1ad5dae355c3f8d43df65d16eec7d137ac55c46ce7feb6284b45c6f0a58302b8.jpg) + +bounds. Our result is inferior to the upper bounds in PSNR, but the result of the more sophisticated indicator SSIM [46] is comparable to the upper bounds. Because PSNR overestimates slight differences in global brightness and/or color that do not significantly affect the perceptual quality [45], we believe our method shows practically equivalent performance to the pair-trained upper bounds. + +Ablation study. To investigate the effectiveness of the proposed method, we designed some other variants of our network: (1) Ours - w/o $D_{X\uparrow}$ , where the HR discriminator $D_{X\uparrow}$ is removed (i.e. $\gamma = 0$ ), (2) Ours - trained on $y_{\downarrow}$ , where the SR network $U_{Y\downarrow Y}$ is trained on $y_{\downarrow}$ instead of $\mathring{y}_{\downarrow}^{\prime}$ , which is equivalent to a simple combination of a style translation network and SR network, and (3) Ours - trained on $G_{Y\downarrow X}(y_{\downarrow})$ , where the SR network $U_{Y\downarrow Y}$ is trained on $G_{Y\downarrow X}(y_{\downarrow})$ instead of $\mathring{y}_{\downarrow}^{\prime}$ and only $U_{Y\downarrow Y}$ is used at testing time, which is equivalent to the indirect approach illustrated in Fig. 2b. For completeness, the variant (3) was validated using the original RCAN model as the SR network, which is larger than our total testing network $U_{Y\downarrow Y} \circ G_{XY\downarrow}$ . These variants underperformed compared to the proposed method (Tab. 3). In particular, our full model outperformed variant (3), meaning that the proposed pseudo-supervision is effective at reducing the train-test discrepancy. + +Perception-oriented training. We also trained our model with a perception-oriented reconstruction loss following ESRGAN [44] to demonstrate the versatility of our method. We replaced Eq. 7 with a combination of perceptual loss, relativistic adversarial loss [19], and content loss as in ESRGAN, while the other loss functions and training procedure were unchanged. The perceptually trained model gives a more visually pleasing result than the normal model trained with L1 reconstruction loss (Fig. 6). + +# 4.3. Experiments on Realistic Distortions I + +Large-scale face image dataset. In this subsection, we follow the experimental procedure described by Bulat et + +![](images/d996605ccd76cf5d5b523cc37e9fc0610ed275a6df6ead04f1c2a9affe223f79.jpg) +Figure 7: Qualitative comparison with a state-of-the-art GAN-based unpaired SR method (SR scale $\times 4$ ). Input LR images are from the LR test set provided by Bulat et al. + +
MethodFID
SRGAN [28]104.80
CycleGAN [58]19.01
DeepDeblur [35]294.96
Wavelet-SRNet [15]149.46
FSRNet [8]157.29
Bulat et al. [4]14.89
Ours - perceptual13.57
+ +Table 4: FID-based performance comparison with state-of-the-art methods. The dataset and evaluation script provided by Bulat et al. were used. Lower scores indicate better results. + +al. [4]. We used the dataset and evaluation script they provided4. They collected 182,866 HR face images from the Celeb-A [31], AFLW [22], LS3D-W [3], and VG-GFace2 [6]. They also collected more than 50,000 real-world LR face images from Widerface [48] that are diverse in degradation types. 3,000 images were randomly selected from the LR dataset and kept for testing. Then, all HR and LR face images were cropped in a consistent manner using the face detector [53]. The cropped HR and LR training images were $64 \times 64$ and $16 \times 16$ patches, respectively. + +Hyperparameters. For the experiments on realistic distortions, we found that it is better to take $x$ instead of $y_{\downarrow}$ as an argument of the identity mapping loss. Thus, we used the modified identity mapping loss + +$$ +\mathcal {L} _ {\overline {{i d t}}} \left(G _ {X Y _ {\downarrow}}\right) = \| G _ {X Y _ {\downarrow}} (x) - x \| _ {1} \tag {8} +$$ + +instead of Eq. 4 in the following. We used the loss hyperparameters $\lambda_{cyc} = 1$ , $\lambda_{\overline{idt}} = 2$ , $\lambda_{geo} = 1$ , and $\gamma = 0.1$ . We first upscaled all the $16 \times 16$ LR patches by a factor of two using a bicubic method because the original size was too small. Then, our network was trained on the $32 \times 32$ LR patches and $64 \times 64$ HR patches with an SR factor of $\times 2$ . + +Comparison with state-of-the-art methods. We numerically and qualitatively compared our method with the state-of-the-art GAN-based unpaired method proposed by Bulat et al. [4]. Our method was also numerically compared + +![](images/6c1544642e913c8240a208011314930d6b183f7958d4fc20a87100d66bb27418.jpg) +Figure 8: One-to-many degradation examples. Examples of different LR images generated by our degradation network for different random noise input. + +with five related state-of-the-art methods: image SR method SRGAN [28], face SR methods Wavelet-SRNet [15] and FSRNet [8], unpaired image translation method CycleGAN [58], and deblurring method DeepDeblur [35]. Please see Ref. [4] for a more detailed explanation of each method. + +Table 4 shows a numerical comparison with the related state-of-the-art methods. We assessed the quality of the SR results with the Fréchet inception distance (FID) [14] because there were no corresponding ground-truth images. CycleGAN, Bulat et al.'s, and our method, which are GAN-based unpaired approaches, largely outperformed all other methods. Besides, our method showed better performance than CycleGAN and Bulat et al.'s. For completeness, we calculated PSNR between the bicubically upscaled LR test images and its SR results. The calculated PSNRs for the results of Bulat et al. and our method were $20.28\mathrm{dB}$ and $21.09\mathrm{dB}$ , respectively. These numerical results indicate that our method produces perceptually better results than Bulat et al.'s while maintaining the characteristics of the input images. A qualitative comparison is shown in Fig. 7. + +One-to-many degradation examples. Visual examples expressing the various noise intensities/types learned by our degradation network $G_{Y\downarrow X}$ shown in Fig. 8. The one-sided cycle consistency allows the mapping $G_{Y\downarrow X}$ to become one-to-many, reproducing the various noise distributions of the real LR images. + +# 4.4. Experiments on Realistic Distortions II + +DOTA and Inria aerial image dataset. We used two aerial image datasets with different ground sample distances (GSD) as source and target. We sampled 62 LR source images with the GSD in the range [55cm, 65cm] from a training set of DOTA [47] (a large-scale aerial image dataset for object detection collected from different sensors and platforms). For the HR target, we used the Inria aerial image labeling dataset [33], which contains scenes from several different cities but with the same GSD (30 cm). Note that we used only the images of Vienna city (36 images) so that the qualities of the target images are constant. + +Hyperparameters. We used the loss hyperparameters $\lambda_{cyc} = 1$ , $\lambda_{\overline{idt}} = 10$ , $\lambda_{geo} = 100$ , and $\gamma = 0.1$ . The SR factor was $\times 2$ . In aerial images, the pixel sizes of objects such as vehicles and buildings are rather small, thus we used larger $\lambda_{\overline{idt}}$ and $\lambda_{geo}$ than in the other experiments + +![](images/fb2fc3c9fb9f8f6885d50ca37dbaf3bbb682c285a0e6c9f85e5904f1cb652296.jpg) +"P2331" from DOTA + +![](images/fcadd8fa81c6417177be389e9774e0f7e48651b6f4c37823a86cb7f69dbae06d.jpg) +LR input + +![](images/6679c6ae78d1e5979f31e2bdf315efc569a280775bb378575d46eb82f135e9e2.jpg) +RL-restore + Bicubic + +![](images/1dfafd09286e28c128facb935f355cd8c2d0c25f9fb789af8a61bb493d1d9d2e.jpg) +RL-restore + DBPN + +![](images/5fe78576ea868ecd083202ab987d8b30211194be1a01f261ae552a9d1fa0219f.jpg) +ZSSR + +![](images/5cca9618fbc644a7e1670b786b0f38bf002d7b0c99a5398903c0e1d440502b7a.jpg) +Ours + +![](images/10a26228edf2b558fafc09c3431dc577c9959de8bc8fade0531f9fada689f662.jpg) +Figure 9: Qualitative comparison with state-of-the-art blind methods on DOTA validation set (SR scale $\times 2$ ). Zoom in for better view. +LR input +Figure 10: Effect of geometric ensemble loss. "P2768" from DOTA validation set is displayed as example. + +![](images/5d4af2361f4fea2eeb06b29841f4c02edf3d7ae637c93299aec208ad74174d9e.jpg) +w/o $\mathcal{L}_{geo}$ + +![](images/9ebce6030dad22c3772d7493925c99900469dbb8f1f2e42a0bdb42b3344eca14.jpg) +w/ $\mathcal{L}_{geo}$ + +to maintain the local characteristics of the images. We gradually elevated $\lambda_{geo}$ in the early stages of training to avoid a mode where the entire image is uniform. + +Comparison with state-of-the-art methods. We only provide a qualitative comparison in this subsection (Fig. 9) because there are no ground-truth HR images. The input LR image was sampled from the DOTA validation set with the GSD in the range of $[55\mathrm{cm}, 65\mathrm{cm}]$ . As the benchmark, a CNN-based blind denoising method RL-restore [50] was first tested because the input LR images contained visible artifacts. RL-restore successfully removed the artifacts, but the fine details of the inputted images were removed as well. The over-smoothed output of RL-restore is slightly enhanced by applying a state-of-the-art SR method DBPN [13]. A state-of-the-art blind SR method ZSSR [39] was also tested, but the artifacts were not completely removed. Unlike the above methods, our method superresolves the fine details while removing the artifacts, yielding the most visually reasonable results. + +Effect of geometric ensemble loss. We compared the SR results with and without the geometric ensemble loss $\mathcal{L}_{geo}$ to confirm the effectiveness of $\mathcal{L}_{geo}$ . Example images for visual comparison are shown in Fig. 10. It can be seen that the method without $\mathcal{L}_{geo}$ produces geometrically inconsistent results. By enforcing geometry consistency through $\mathcal{L}_{geo}$ , our method results in more reasonable mapping, preserving geometrical structures of the input LR image. + +# 4.5. Additional Experiment + +We conducted an additional experiment on the dataset provided in the recent AIM 2019 Real-World SuperResolution Challenge, where no training HR-LR image + +
MethodPSNRSSIMLPIPS
ZSSR [39]22.420.610.5996
ESRGAN [44]20.690.510.5604
Lugmayr et al. [32]21.590.550.4720
Ours22.880.66120.4539
Ours+23.010.66550.4567
+ +Table 5: Additional experiment on AIM 2019 Real-World Super-Resolution Challenge dataset (Track 2). An officially provided evaluation script was used for PSNR and SSIM calculations. A version of the LPIPS script used to evaluate our method is v0.1 (v0.0 outputs lower LPIPS value). We used the loss hyperparameters $\lambda_{cyc} = 1$ , $\lambda_{idt} = 5$ , $\lambda_{geo} = 1$ , and $\gamma = 0.1$ . + +pairs are available. We focused on Track 2 of the challenge which is a more general setting than Track 1 (see the competition website5 for more details). We compared our method with Lugmayr et al. [32] which is a study of a GAN-based unpaired SR method (indirect approach; Fig. 2b) recently published by the organizers of the challenge. As shown in Tab. 5, our method achieved superior scores in both the distortion metrics (PSNR, SSIM) and the perception metric (LPIPS [52]; lower is better). The visual results are provided in the supplemental material. + +# 5. Conclusion + +We investigated the SR problem in an unpaired setting where the aligned HR-LR training set is unavailable. Our network produces pseudo-clean LR images as the intermediate products from ground-truth HR images, which are then used to train the SR network in a paired manner (referred to as "pseudo-supervision" in this paper). In this sense, the proposed method bridges the gap between the well-studied existing SR methods and the real-world SR problem without paired datasets. The effectiveness of our method was demonstrated by extensive experiments on diverse datasets: synthetically degraded natural images (Sec. 4.2, 4.5), real-world face images (Sec. 4.3), and real-world aerial images (Sec. 4.4). + +While the proposed method is applicable to diverse datasets, hyperparameter tuning is necessary for each case to maximize the performance. Making the network more robust against the hyperparameters will be future work. + +# References + +[1] Sefi Bell-Kligler, Assaf Shocher, and Michal Irani. Blind super-resolution kernel estimation using an internal-gan. arXiv preprint arXiv:1909.06581, 2019. 5, 6 +[2] Yochai Blau, Roey Mechrez, Radu Timofte, Tomer Michaeli, and Lihi Zelnik-Manor. The 2018 pirm challenge on perceptual image super-resolution. In ECCV Workshop, 2018. 1 +[3] Adrian Bulat and Georgios Tzimiropoulos. How far are we from solving the 2d & 3d face alignment problem?(and a dataset of 230,000 3d facial landmarks). In ICCV, 2017. 7 +[4] Adrian Bulat, Jing Yang, and Georgios Tzimiropoulos. To learn image super-resolution, use a gan to learn how to do image degradation first. In ECCV, 2018. 1, 2, 3, 7 +[5] Jianrui Cai, Hui Zeng, Hongwei Yong, Zisheng Cao, and Lei Zhang. Toward real-world single image super-resolution: A new benchmark and a new model. In ICCV, 2019. 2 +[6] Qiong Cao, Li Shen, Weidi Xie, Omkar M Parkhi, and Andrew Zisserman. Vggface2: A dataset for recognising faces across pose and age. In FG, 2018. 7 +[7] Chang Chen, Zhiwei Xiong, Xinmei Tian, Zheng-Jun Zha, and Feng Wu. Camera lens super-resolution. In CVPR, 2019. 2 +[8] Yu Chen, Ying Tai, Xiaoming Liu, Chunhua Shen, and Jian Yang. Fsrnet: End-to-end learning face super-resolution with facial priors. In CVPR, 2018. 7 +[9] Chao Dong, Chen Change Loy, Kaiming He, and Xiaou Tang. Image super-resolution using deep convolutional networks. IEEE transactions on pattern analysis and machine intelligence, 38(2), 2015. 2 +[10] Huan Fu, Mingming Gong, Chaohui Wang, Kayhan Bat-manghelich, Kun Zhang, and Dacheng Tao. Geometry-consistent generative adversarial networks for one-sided unsupervised domain mapping. In CVPR, 2019. 4 +[11] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, 2014. 1, 2, 3 +[12] Jinjin Gu, Hannan Lu, Wangmeng Zuo, and Chao Dong. Blind super-resolution with iterative kernel correction. In CVPR, 2019. 1, 2, 5, 6 +[13] Muhammad Haris, Gregory Shakhnarovich, and Norimichi Ukita. Deep back-projection networks for super-resolution. In CVPR, 2018. 2, 5, 6, 8 +[14] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In NIPS, 2017. 7 +[15] Huaibo Huang, Ran He, Zhenan Sun, and Tieniu Tan. Wavelet-srnet: A wavelet-based cnn for multi-scale face super resolution. In ICCV, 2017. 7 +[16] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. 4 +[17] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. 4 + +[18] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016. 2 +[19] Alexia Jolicoeur-Martineau. The relativistic discriminator: a key element missing from standard gan. arXiv preprint arXiv:1807.00734, 2018.6 +[20] Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Accurate image super-resolution using very deep convolutional networks. In CVPR, 2016. 2 +[21] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. 5 +[22] Martin Koestinger, Paul Wohlhart, Peter M Roth, and Horst Bischof. Annotated facial landmarks in the wild: A large-scale, real-world database for facial landmark localization. In ICCV workshop, 2011. 7 +[23] Alexander Krull, Tim-Oliver Buchholz, and Florian Jug. Noise2void-learning denoising from single noisy images. In CVPR, 2019. 2 +[24] Orest Kupyn, Volodymyr Budzan, Mykola Mykhailych, Dmytro Mishkin, and Jiří Matas. Deblurgan: Blind motion deblurring using conditional adversarial networks. In CVPR, 2018, 2 +[25] Orest Kupyn, Tetiana Martyniuk, Junru Wu, and Zhangyang Wang. Deblurgan-v2: Deblurring (orders-of-magnitude) faster and better. arXiv preprint arXiv:1908.03826, 2019. 5, 6 +[26] Wei-Sheng Lai, Jia-Bin Huang, Narendra Ahuja, and Ming-Hsuan Yang. Deep laplacian pyramid networks for fast and accurate super-resolution. In CVPR, 2017. 2 +[27] Marc Lebrun, Miguel Colom, and Jean-Michel Morel. The noise clinic: a blind image denoising algorithm. Image Processing On Line, 5, 2015. 5, 6 +[28] Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photorealistic single image super-resolution using a generative adversarial network. In CVPR, 2017. 1, 2, 7 +[29] Chuan Li and Michael Wand. Precomputed real-time texture synthesis with markovian generative adversarial networks. In ECCV, 2016. 4 +[30] Bee Lim, Sanghyun Son, Heewon Kim, Seungjun Nah, and Young Mu Lee. Enhanced deep residual networks for single image super-resolution. In CVPR Workshop, 2017. 2 +[31] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In ICCV, 2015. 7 +[32] Andreas Lugmayr, Martin Danelljan, and Radu Timofte. Unsupervised learning for real-world super-resolution. arXiv preprint arXiv:1909.09629, 2019. 1, 2, 3, 8 +[33] Emmanuel Maggiori, Yuliya Tarabalka, Guillaume Charpiat, and Pierre Alliez. Can semantic labeling methods generalize to any city? the inria aerial image labeling benchmark. In IGARSS, 2017. 7 +[34] Tomer Michaeli and Michal Irani. Nonparametric blind super-resolution. In ICCV, 2013. 2 +[35] Seungjun Nah, Tae Hyun Kim, and Kyoung Mu Lee. Deep multi-scale convolutional neural network for dynamic scene deblurring. In CVPR, 2017. 2, 7 + +[36] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS Workshop, 2017. 5 +[37] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In NIPS, 2016. 1 +[38] Wen-Ze Shao and Michael Elad. Simple, accurate, and robust nonparametric blind super-resolution. In ICIG, 2015. 2 +[39] Assaf Shocher, Nadav Cohen, and Michal Irani. zero-shot super-resolution using deep internal learning. In CVPR, 2018. 1, 2, 5, 6, 8 +[40] Xin Tao, Hongyun Gao, Xiaoyong Shen, Jue Wang, and Jiaya Jia. Scale-recurrent network for deep image deblurring. In CVPR, 2018. 5, 6 +[41] Radu Timofte, Eirikur Agustsson, Luc Van Gool, Ming-Hsuan Yang, and Lei Zhang. Ntire 2017 challenge on single image super-resolution: Methods and results. In CVPR Workshop, 2017. 5 +[42] Radu Timofte, Shuhang Gu, Jiqing Wu, and Luc Van Gool. Ntire 2018 challenge on single image super-resolution: Methods and results. In CVPR Workshop, 2018. 1, 5 +[43] Radu Timofte, Rasmus Rothe, and Luc Van Gool. Seven ways to improve example-based single image super resolution. In CVPR, 2016. 6 +[44] Xintao Wang, Ke Yu, Shixiang Wu, Jinjin Gu, Yihao Liu, Chao Dong, Yu Qiao, and Chen Change Loy. Esrgan: Enhanced super-resolution generative adversarial networks. In ECCV Workshop, 2018. 2, 6, 8 +[45] Zhou Wang and Alan C Bovik. Mean squared error: Love it or leave it? a new look at signal fidelity measures. IEEE signal processing magazine, 26(1), 2009. 6 +[46] Zhou Wang, Alan C Bovik, Hamid R Sheikh, Eero P Simoncelli, et al. Image quality assessment: from error visibility to structural similarity. IEEE transactions on image processing, 13(4), 2004. 6 +[47] Gui-Song Xia, Xiang Bai, Jian Ding, Zhen Zhu, Serge Belongie, Jiebo Luo, Mihai Datcu, Marcello Pelillo, and Liangpei Zhang. Dota: A large-scale dataset for object detection in aerial images. In CVPR, 2018. 1, 7 +[48] Shuo Yang, Ping Luo, Chen-Change Loy, and Xiaou Tang. Wider face: A face detection benchmark. In CVPR, 2016. 1, 7 +[49] Zili Yi, Hao Zhang, Ping Tan, and Minglun Gong. Dualgan: Unsupervised dual learning for image-to-image translation. In ICCV, 2017. 3 +[50] Ke Yu, Chao Dong, Liang Lin, and Chen Change Loy. Crafting a toolchain for image restoration by deep reinforcement learning. In CVPR, 2018. 5, 6, 8 +[51] Yuan Yuan, Siyuan Liu, Jiawei Zhang, Yongbing Zhang, Chao Dong, and Liang Lin. Unsupervised image superresolution using cycle-in-cycle generative adversarial networks. In CVPR Workshop, 2018. 1, 3 +[52] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In CVPR, 2018. 8 + +[53] Shifeng Zhang, Xiangyu Zhu, Zhen Lei, Hailin Shi, Xiaobo Wang, and Stan Z Li. S3fd: Single shot scale-invariant face detector. In ICCV, 2017. 7 +[54] Xuaner Zhang, Qifeng Chen, Ren Ng, and Vladlen Koltun. Zoom to learn, learn to zoom. In CVPR, 2019. 2 +[55] Yulun Zhang, Kunpeng Li, Kai Li, Lichen Wang, Bineng Zhong, and Yun Fu. Image super-resolution using very deep residual channel attention networks. In ECCV, 2018. 2, 4 +[56] Tianyu Zhao, Changqing Zhang, Wenqi Ren, Dongwei Ren, and Qinghua Hu. Unsupervised degradation learning for single image super-resolution. arXiv preprint arXiv:1812.04240, 2018. 1, 3 +[57] Ruofan Zhou and Sabine Susstrunk. Kernel modeling super-resolution on real low-resolution images. In ICCV, 2019. 1, 2 +[58] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. 2, 3, 7 \ No newline at end of file diff --git a/unpairedimagesuperresolutionusingpseudosupervision/images.zip b/unpairedimagesuperresolutionusingpseudosupervision/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c8812046b9aaabb4748c4e99a9c9458b954f673e --- /dev/null +++ b/unpairedimagesuperresolutionusingpseudosupervision/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53fc3f2e61062de8d64a551aaca5f6f6e442e4827d8be965fe479c18c06f528e +size 636170 diff --git a/unpairedimagesuperresolutionusingpseudosupervision/layout.json b/unpairedimagesuperresolutionusingpseudosupervision/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ac436fed6e96ba25b7dc4eccf3869dc3ba180110 --- /dev/null +++ b/unpairedimagesuperresolutionusingpseudosupervision/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27bb04b2fbb65887675618e014d77c80d3792ae62361a2b60cabcf6ed72d8ea4 +size 540487 diff --git a/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/24a4e790-01f3-4193-86e8-f7260c465a16_content_list.json b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/24a4e790-01f3-4193-86e8-f7260c465a16_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..75e694024542eda86460666a13708a1364fc2c98 --- /dev/null +++ b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/24a4e790-01f3-4193-86e8-f7260c465a16_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a58c76830eebbc706e545a00350ebc21f94a93c825da8744e942665eeff4db7 +size 71307 diff --git a/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/24a4e790-01f3-4193-86e8-f7260c465a16_model.json b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/24a4e790-01f3-4193-86e8-f7260c465a16_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d63a75e5ca3701d840efc35ba93f39b68b8890a5 --- /dev/null +++ b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/24a4e790-01f3-4193-86e8-f7260c465a16_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2be263407dd2150c3cc15eb839d3187f47ef326078f3ead370a11e3624ef196 +size 86497 diff --git a/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/24a4e790-01f3-4193-86e8-f7260c465a16_origin.pdf b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/24a4e790-01f3-4193-86e8-f7260c465a16_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..926b50b16af70a51e1f0340a503ebb738a00112c --- /dev/null +++ b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/24a4e790-01f3-4193-86e8-f7260c465a16_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5db8c0ce964828799a704409fe3f7184442f3251479ac20218242302dd36f20 +size 4902480 diff --git a/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/full.md b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1240cc4597cedea55866e81ce5d1c547a30195d6 --- /dev/null +++ b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/full.md @@ -0,0 +1,313 @@ +# Unpaired Portrait Drawing Generation via Asymmetric Cycle Mapping + +Ran Yi, Yong-Jin Liu* + +CS Dept, BNRist + +Tsinghua University, China + +{yr16,liuyongjin}@tsinghua.edu.cn + +Yu-Kun Lai, Paul L. Rosin + +School of Computer Science and Informatics +Cardiff University, UK + +{LaiY4,RosinPL}@cardiff.ac.uk + +# Abstract + +Portrait drawing is a common form of art with high abstraction and expressiveness. Due to its unique characteristics, existing methods achieve decent results only with paired training data, which is costly and time-consuming to obtain. In this paper, we address the problem of automatic transfer from face photos to portrait drawings with unpaired training data. We observe that due to the significant imbalance of information richness between photos and drawings, existing unpaired transfer methods such as CycleGAN tend to embed invisible reconstruction information indiscriminately in the whole drawings, leading to important facial features partially missing in drawings. To address this problem, we propose a novel asymmetric cycle mapping that enforces the reconstruction information to be visible (by a truncation loss) and only embedded in selective facial regions (by a relaxed forward cycle-consistency loss). Along with localized discriminators for the eyes, nose and lips, our method well preserves all important facial features in the generated portrait drawings. By introducing a style classifier and taking the style vector into account, our method can learn to generate portrait drawings in multiple styles using a single network. Extensive experiments show that our model outperforms state-of-the-art methods. + +# 1. Introduction + +Portrait drawing is a unique style of art which is highly abstract and expressive. However, drawing a delicate portrait drawing is time consuming and needs to be carried out by skilled artists. Therefore, automatic generation of portrait drawings is very desirable. + +Image style transfer has been a longstanding topic in computer vision. In recent years, inspired by the effectiveness of deep learning, Gatys et al. [4] introduced convolutional neural networks (CNNs) to transfer style from a style image to a content image, and opened up the field + +of neural style transfer. Subsequently, generative adversarial networks (GANs) have achieved much success in solving image style transfer problems [10, 25]. However, existing methods are mainly applied to cluttered styles (e.g., oil painting style) where a stylized image is full of fragmented brush strokes and the requirement for the quality of each individual element is low. + +Artistic portrait line drawings (APDrawings) are completely different from the previously tackled painting styles. Generating them is very challenging because the style is highly abstract: it only contains a sparse set of graphical elements, is line-stroke-based, disables shading, and has high semantic constraints. Therefore, previous texture-based style transfer methods and general image-to-image translation methods fail to generate good results on the APDrawing style (Fig. 1). To the best of our knowledge, APDrawingGAN [20] is the only method that explicitly deals with APDrawing by using a hierarchical structure and a distance transform loss. However, this method requires paired training data that is costly to obtain. Due to the limited availability of paired data, this method cannot adapt well to face photos with unconstrained lighting in the wild. + +Compared to paired training data, APDrawing generation learned from unpaired data is much more challenging. Previous methods for unpaired image-to-image translation [25, 21] use a cycle structure to regularize training. Although cycle consistency loss enables learning from unpaired data, we observe that when applying them to face photo to APDrawing translation, due to significant imbalance of information richness in these two data types, these methods tend to embed invisible reconstruction information indiscriminately in the whole APDrawing, causing a deterioration in the quality of the generated APDrawings, such as important facial features partially missing (Figs. 1(f-g)). + +In this paper, we propose an asymmetric cycle structure to tolerate certain reconstruction quality issues. We argue that the network does not need to reconstruct an accurate face photo from a generated APDrawing due to information imbalance. Accordingly, we introduce a relaxed cycle consistency loss between the reconstructed face photo + +![](images/f8c49dab8b416e9211619e12d994accd1692260379415e60609a69d226c7ed9c.jpg) + +![](images/7495e4014d38c0ecd455641b22e507bd11202ba74c0633de642cb81442532723.jpg) + +![](images/a68971050bc605945d962d6bcb5b9bca09a8b3b13e1725611bf92f4497bbf763.jpg) + +![](images/26e9407649cf0970c93b5b096e72d109fc83bbbc21081999e6e9ce86295de400.jpg) + +![](images/660e553dfdfa69b2d7e2f345de3932226ee49eb742905a72e70e3df124eb8ba6.jpg) + +![](images/51bd0dfa37fe0a01d703791413961f00c1e6f4b60539a8d740f9cec287c596f5.jpg) + +![](images/d5f8887957edb6e8651a61c3a2cf870cfac26bb6aafa5bd45e1589026b6a3bbe.jpg) + +![](images/ac1d65544cc94bc4555b84f7d2f07c90c1a6c1f870d965b40ee1704aa08b8353.jpg) +(a) Input +(f) DualGAN +Figure 1. Comparison with state-of-the-art methods: (a) input face photo; (b)-(c) style transfer methods: Gatys [4] and Linear Style Transfer [14]; (f)-(h) single-modal image-to-image translation methods: DualGAN [21], CycleGAN [25], UNIT [15]; (d)-(e) multi-modal image-to-image translation methods MUNIT [9] and ComboGAN [1]; (i) a portrait generation method APDrawingGAN [20]; (j) our method. Note that APDrawingGAN requires paired data for training, so unlike other work, it is trained using the paired APDrawing dataset. Due to this essential difference, we do not compare with this method in the follow-up evaluation. + +![](images/64519c6267a5ec6ff09e2d76fa2d848472a008e004c20307a40477f2a46755b4.jpg) +(b) Gatys et al. +(g) CycleGAN + +![](images/c858da8cc675eda3c6bc01ef8d83787d3a23e7c59c5f549de547a4fe44541a1a.jpg) +(c)Linear Style Transfer +(h) UNIT + +![](images/bfed45dc892ee4bfa44d17906bebf7226cabf6b2a16c54c024a986ee21713375.jpg) +(d) MUNIT +(e1)ComboGAN(style1) +(i) APDrawingGAN + +![](images/1ef7ecb00c702af0acb61cd236ba9abc80a322b203133668c22e1a7acec0247d.jpg) +(j1) Ours (style1) + +![](images/bf6b7b85d4313a1098bf1e1eb480340c6b9af14958e93516844ec984e9d05faa.jpg) +(e2)ComboGAN(style2) +(j2) Ours (style2) + +![](images/a622bbc642343bab5c3a57b9f7133b98799c6fc4bb869020c3610d663dc684b2.jpg) +(e3)ComboGAN(style3) +(j3) Ours (style3) + +and the input photo. By doing so the unnecessarily detailed photo information does not need to be fully embedded in APDrawings. Along with localized discriminators for the eyes, nose and lips, our method can generate high-quality APDrawings in which all important facial features are preserved. + +Learning from unpaired data makes our method able to utilize APDrawings from web data for training and include more challenging photos into the training set. To exploit the natural diversity of styles from web training images (see Fig. 2 for some examples), our method further learns APDrawings in multiple styles from mixed web data and can control the output style using a simple style code. + +The main contributions of our work are: + +- We propose a novel asymmetric cycle-structure GAN model to avoid indiscriminately embedding reconstruction information in the whole APDrawing that is often caused by cycle consistency loss. +- We use multiple local discriminators to enforce the existence and ensure quality for facial feature drawing. +- We learn multi-style APDrawings from unpaired, mixed web data such that the user can switch between multiple styles using a simple style code. + +# 2. Related Work + +# 2.1. Neural Style Transfer + +The power of CNNs has been validated by many visual perception tasks. Inspired by this, Gatys et al. [4] proposed to use a pretrained CNN to extract content features and style + +features from images and achieve style transfer by optimizing an image such that it maintains the content from the content image and matches the style features from the style image, where the Gram matrix is used to measure style similarity. This method opens up the field of neural style transfer and many follow-up methods are proposed based on this. + +Li and Wand [13] proposed to maintain local patterns by using a Markov Random Field (MRF) regularizer instead of Gram matrix to model the style, and combined MRF with CNN to synthesize stylized images. To speed up the slow optimization process of [4], some methods (e.g., [11, 17]) use a feed-forward neural network to replace the optimization process and minimize the same objective function. However, these methods still suffer from the problem that each model is restricted to a single style. To speed up optimization and allow style flexibility as [4], Huang and Belongie [8] proposed adaptive instance normalization (AdaIN) to align the mean and variance of content features to those of style features. In these example-guided style transfer methods, the style is extracted from a single image, which is not as convincing as learning from a set of images to synthesize style (refer to Section 2.2). Moreover, these methods model style as texture, and thus are not suitable for our portrait line drawing style that has little texture. + +# 2.2. GAN-based image-to-image translation + +GANs [5] have achieved much progress in many computer vision tasks, including image super-resolution [12], text-to-image synthesis [16, 22], facial attribute manipulation [23], etc. Among these works, two unified GAN frameworks, Pix2Pix [10] and CycleGAN [25], have enabled much progress in image-to-image translation. + +Pix2Pix [10] was the first general image-to-image translation framework based on conditional GANs, and was later + +![](images/a4e0d9c5fb10c58fa4692edc67405f77a2ac0d0615dcb63c65bb8e48256dabc3.jpg) +(a) Style 1 + +![](images/891bebbfc84e0e24730bd1e1783f42a8dec2314502568c55826c9bf3677e44bc.jpg) +(b) Style 2 + +![](images/b22f132bc190022c9e9e4b5f34acf9a7254152dfac84bbb61fdf76fd1c99c95a.jpg) +(c) Style 3 +Figure 2. We select three representative styles in our collected web portrait line drawing data. The first style is from Yann Legendre and Charles Burns where parallel lines are used to draw shadows. The second style is from Kathryn Rathke where few dark regions are used and facial features are drawn using simple flowing lines. The third style is from vectorportal.com where continuous thick lines and large dark regions are utilized. + +extended to high-resolution image synthesis [18]. More works focus on learning from unpaired data, due to the difficulty of obtaining paired images in two domains. A popular and important observation is the cycle consistency constraint, which is the core of CycleGAN [25] and DualGAN [21]. The cycle consistency constraint enforces that the two mappings from domains $A$ to $B$ and from $B$ to $A$ when applied consecutively to an image revert the image back to itself. Different from enforcing cycle consistency at the image level, UNIT [15] tackles the problem by a shared latent space assumption and enforcing a feature-level cycle consistency. These methods work well for general imaged-to-image translation tasks. However, in face photo to AP-Drawing translation, cycle consistency constraints lead to facial features partially missing in APDrawings, because the information between the source and target domains is imbalanced. In this paper, we relax the cycle consistency in the forward (photo $\rightarrow$ drawing $\rightarrow$ photo) cycle and propose additional constraints to avoid this problem. The NIR (near infrared)-to-RGB method in [3] adopts a very different type of asymmetry: it uses the same loss for the forward and backward cycles, and only changes the network complexity. Moreover, it targets a different task from ours. + +The aforementioned unpaired translation methods are also limited in the diversity of translation outputs. Unpaired data such as crawled web data often naturally contains multi-modal distributions (i.e. inconsistent styles). When knowing the exact number of modes and the mode each sample belongs to, the multi-modal image-to-image translation could be solved by treating each mode as a separate domain and using a multi-domain translation method [1]. However, in many scenarios including our problem setting, this information is not available. MUNIT [9] deals with multi-modal image-to-image translation without knowing the mode each sample belongs to. It encodes an image into a domain-invariant content code and a domain-specific style code, and recombines the content code with the style code sampled from a target domain. Although MUNIT generates multiple outputs with different styles, it cannot generate satisfactory portrait line drawings with clear lines. Our archi + +![](images/e58ca40875c0dfcac917392024c0364122c1414602724154e0cd974fe2a14f62.jpg) +Figure 3. In CycleGAN, to reconstruct the input photo from generated drawings, a strict cycle-consistency loss embeds invisible reconstruction information indiscriminately in the whole drawings. A nonlinear monotonic mapping of the gray values is applied in a local region around the nose to visualize the embedded reconstruction information. + +tecture inserts style features into the generator and uses a soft classification loss to discriminate modes in the training data and produce multi-style outputs, generating better APDrawings than state-of-the-art methods. + +# 3. Our Method + +# 3.1. Overview + +Our proposed method performs face photo to APDrawing translation without paired training data using a novel asymmetric cycle-structure GAN. Let $\mathcal{P}$ and $\mathcal{D}$ be the face photo domain and the APDrawing domain, and no pairings need to exist between these two domains. Our model learns a function $\Phi$ that maps from $\mathcal{P}$ to $\mathcal{D}$ using training data $S(p) = \{p_i|i = 1,2,\dots ,N\} \subset \mathcal{P}$ and $S(d) = \{d_j|j = 1,2,\dots ,M\} \subset \mathcal{D}$ . $N$ and $M$ are the numbers of training photos and APDrawings. Our model consists of two generators - a generator $G$ transforming face photos to portrait drawings, and an inverse generator $F$ transforming drawings back to face photos - and two discriminators, $D_{\mathcal{D}}$ responsible for discriminating generated drawings from real drawings, and $D_{\mathcal{P}}$ responsible for discriminating generated photos from real photos. + +The information in the APDrawing domain is much less than in the face photo domain. For example, in the cheek region, there are many color variations in the original photo but the cheek is usually drawn completely white (i.e. no lines are included) in an APDrawing. Enforcing a strict cycle-consistency loss like in CycleGAN [25] on the reconstructed face photo and the input photo will cause the network to embed reconstruction information in very small variations in the generated APDrawings (i.e., color changes that are invisible to the eye but can make a difference in network calculation) [2]. See Fig. 3 for an example. Embedding reconstruction information in very small variations achieves a balance between cycle-consistency loss and GAN loss in CycleGAN; the generated drawing $G(p)$ + +can successfully reconstruct a face photo similar to the input photo because of small color changes, while at the same time $G(p)$ can be similar to real drawings and be classified as real by the discriminator. Embedding invisible reconstruction information indiscriminately in the whole drawing will put a very strong restriction on the objective function optimization. Moreover, it will allow important facial features to be partially missing in the generated drawings. + +We observe that although cycle consistency constraints are useful to regularize training, we are only interested in the one way mapping from photos to portrait drawings. Therefore, different from CycleGAN, we do not expect or require the inverse generator $F$ to reconstruct a face photo exactly as the input photo (which is a near impossible task). Instead, our proposed model is asymmetric in that we use a relaxed cycle-consistency loss between $F(G(p))$ and $p$ , where only edge information is enforced to be similar, while a strict cycle-consistency loss is enforced on $G(F(d))$ and $d$ . By tolerating the reconstruction information loss between $F(G(p))$ and $p$ , the objective function optimization has enough flexibility to recover all important facial features in APDrawings. A truncation loss is further proposed to enforce the embedded information to be visible, especially around the local area of the selected edges where relaxed cycle-consistency loss works. Furthermore, local drawing discriminators for the nose, eyes and lips are introduced to enforce their existence and ensure quality for these regions in the generated drawings. By using these techniques, our method generates high-quality portrait line drawings with complete facial features. + +Our model also deals with multi-style APDrawing generation. The APDrawing data we collected from the Internet contains a variety of styles, of which only some are tagged with author/source information. We select representative styles from the collected data (see Fig. 2), and train a classifier for the collected drawings. Then a learned representation is extracted as a style feature and inserted into the generator to control the generated drawing style. An additional style loss is introduced to optimize for each style. + +The four networks in our model are trained in an adversarial manner [5]: the two discriminators $D_{\mathcal{D}}$ and $D_{\mathcal{P}}$ are trained to maximize the probability of assigning correct labels to real and synthesized drawings and photos; and meanwhile the two generators $G$ and $F$ are trained to minimize the probability of the discriminators assigning the correct labels. The loss function $L(G,F,D_{\mathcal{D}},D_{\mathcal{P}})$ contains five types of loss terms: adversarial loss $L_{adv}(G,D_{\mathcal{D}}) + L_{adv}(F,D_{\mathcal{P}})$ , relaxed cycle consistency loss $L_{relaxed-cyc}(G,F)$ , strict cycle consistency loss $L_{strict-cyc}(G,F)$ , truncation loss $L_{trunc}(G,F)$ , and style loss $L_{style}(G,D_{\mathcal{D}})$ . Then the function $\Phi$ is optimized by solving the minimax problem with loss function + +$$ +\begin{array}{l} L (G, F, D _ {\mathcal {D}}, D _ {\mathcal {P}}): \\ \min _ {G, F} \max _ {D _ {\mathcal {D}}, D _ {\mathcal {P}}} L (G, F, D _ {\mathcal {D}}, D _ {\mathcal {P}}) \\ = \left(L _ {a d v} (G, D _ {\mathcal {D}}) + L _ {a d v} (F, D _ {\mathcal {P}})\right) + \lambda_ {1} L _ {r e l a x e d - c y c} (G, F) \\ + \lambda_ {2} L _ {\text {s t r i c t - c y c}} (G, F) + \lambda_ {3} L _ {\text {t r u n c}} (G, F) + \lambda_ {4} L _ {\text {s t y l e}} (G, D _ {\mathcal {D}}) \tag {1} \\ \end{array} +$$ + +In Section 3.2, we introduce the architectures of our model and our different designs for $G$ , $D_{\mathcal{D}}$ and $F$ , $D_{\mathcal{P}}$ . In Section 3.3, we introduce our asymmetric cycle-consistency requirements and five loss terms. An overview of our method is illustrated in Fig. 4. + +# 3.2. Architecture + +Our GAN model consists of a generator $G$ and a discriminator $D_{\mathcal{D}}$ for face photo to drawing translation, and another generator $F$ and discriminator $D_{\mathcal{P}}$ for the inverse drawing to photo translation. Considering information imbalance between the face photo in $\mathcal{P}$ and the APDrawing in $\mathcal{D}$ , we design different architectures for $G, D_{\mathcal{D}}$ and $F, D_{\mathcal{P}}$ . + +# 3.2.1 Face photo to drawing generator $G$ + +The generator $G$ takes a face photo $p$ and a style feature $s$ as input, and outputs a portrait line drawing $G(p, s)$ whose style is specified by $s$ . + +Style feature $s$ . We first train a classifier $C$ (based on VGG19) that classifies portrait line drawings into three styles (Fig. 2), using tagged web drawing data. Then we extract the output of the last fully-connected layer and use a softmax layer to calculate a 3-dimensional vector as the style feature for each drawing (including untagged ones). + +Network structure. $G$ is an encoder-decoder with residual blocks [7] in the middle. It starts with a flat convolution and two down convolution blocks to encode face photos and extract useful features. Then the style feature is mapped to a 3-channel feature map and inserted into the network by concatenating it with the feature map of the second down convolution block. An additional flat convolution is used to merge the style feature map with the extracted feature map. Afterwards, nine residual blocks of the same structure are used to construct the content feature and transfer it to the target domain. Then the output drawing is reconstructed by two up convolution blocks and a final convolution layer. + +# 3.2.2 Drawing discriminator $D_{\mathcal{D}}$ + +The drawing discriminator $D_{\mathcal{D}}$ has two tasks: 1) to discriminate generated portrait line drawings from real ones; and 2) to classify a drawing into three selected styles, where a real drawing $d$ is expected to be classified into the correct style label (given by $C$ ), and a generated drawing $G(p,s)$ is expected to be classified into the style specified by the 3-dimensional style feature $s$ . + +![](images/8a208eee2cafd96bdbbabd5b4e0049596f7b5fec1c811aa968ad8625f8728e4b.jpg) +Figure 4. Our model is an asymmetric cycle-structure GAN model that consists of a photo to drawing generator $G$ , a drawing to photo generator $F$ , a drawing discriminator $D_{\mathcal{D}}$ and a photo discriminator $D_{\mathcal{P}}$ . We use a relaxed cycle-consistency loss between reconstructed face photo $F(G(p))$ and input photo $p$ , while enforcing a strict cycle-consistency loss between reconstructed drawing $G(F(d))$ and input drawing $d$ . We further introduce local drawing discriminators $D_{ln}$ , $D_{le}$ , $D_{ll}$ for the nose, eyes and lips and a truncation loss. Our model deals with multi-style generation by inserting a style feature into the generator and adding a style loss. + +For the first task, to enforce the existence of important facial features in the generated drawing, besides a discriminator $D$ that analyzes the full drawing, we add three local discriminators $D_{ln}, D_{le}, D_{ll}$ to focus on discriminating the nose drawing, eye drawing and lip drawing respectively. The inputs to these local discriminators are masked drawings, where masks are obtained from a face parsing network [6]. $D_{\mathcal{D}}$ consists of $D, D_{ln}, D_{le}, D_{ll}$ . + +Network structure. The global discriminator $D$ is based on PatchGAN [10] and modified to have two branches. The two branches share three down convolution blocks. Then one branch $D_{rf}$ includes two flat convolution blocks to output a prediction map of real/fake for each patch in the drawing. And the other classification branch $D_{cls}$ includes more down convolution blocks and outputs probability values for the three style labels. Local discriminators $D_{ln}, D_{le}, D_{ll}$ also adopt the PatchGAN structure. + +# 3.2.3 Drawing to face photo generator $F$ and Photo discriminator $D_{\mathcal{P}}$ + +The generator $F$ in the inverse direction takes a portrait line drawing $d$ as input and outputs a face photo $F(d)$ . It adopts an encoder-decoder architecture with nine residual blocks in the middle. Photo discriminator $D_{\mathcal{P}}$ discriminates generated face photos from real ones, and also adopts the PatchGAN structure. + +# 3.3. Loss Functions + +There are five types of losses in our loss function (Eq. (1)). We explain them in detail as follows: + +Adversarial loss. The adversarial loss judges discriminator $D_{\mathcal{D}}$ 's ability to assign correct labels to real and synthesized drawings. It is formulated as: + +$$ +\begin{array}{l} L _ {a d v} (G, D _ {\mathcal {D}}) = \sum_ {D \in D _ {\mathcal {D}}} \mathbb {E} _ {d \in S (d)} [ \log D (d) ] \tag {2} \\ + \sum_ {D \in D _ {\mathcal {D}}} \mathbb {E} _ {p \in S (p)} [ \log (1 - D (G (p, s)) ] \\ \end{array} +$$ + +where $s$ is randomly selected from the style features of drawings in $S(d)$ for each $p$ . As $D_{\mathcal{D}}$ maximizes this loss and $G$ minimizes it, this loss drives the generated drawings to become closer to real drawings. + +We also adopt an adversarial loss for the photo discriminator $D_{\mathcal{P}}$ and the inverse mapping $F$ : + +$$ +\begin{array}{r l} L _ {a d v} (F, D _ {\mathcal {P}}) & = \mathbb {E} _ {p \in S (p)} [ \log D _ {\mathcal {P}} (p) ] \\ & + \mathbb {E} _ {d \in S (d)} [ \log (1 - D _ {\mathcal {P}} (F (d)) ] \end{array} \tag {3} +$$ + +Relaxed forward cycle-consistency loss. As aforementioned, we observe that there is much less information in domain $\mathcal{D}$ than information in domain $\mathcal{P}$ . We do not expect $p \to G(p,s) \to F(G(p,s))$ to be pixel-wise similar to $p$ . Instead, we only expect the edge information in + +$p$ and $F(G(p,s))$ to be similar. We extract edges from $p$ and $F(G(p,s))$ using HED [19], and evaluate the similarity of edges by the LPIPS perceptual metric proposed in [24]. Denote HED by $H$ and the perceptual metric by $L_{lpips}$ , the relaxed cycle-consistency loss is formulated as: + +$$ +L _ {\text {r e l a x e d - c y c}} (G, F) = \mathbb {E} _ {p \in S (p)} [ L _ {\text {l p i p s}} (H (p), H (F (G (p, s)))) ] \tag {4} +$$ + +Strict backward cycle-consistency loss. On the other hand, the information in the generated face photo is adequate to reconstruct the drawing. Therefore, we expect $d \to F(d) \to G(F(d), s(d))$ to be pixel-wise similar to $d$ , here the style feature $s(d)$ is the style feature of $d$ . The strict cycle-consistency loss in the backward cycle is then formulated as: + +$$ +L _ {\text {s t r i c t - c y c}} (G, F) = \mathbb {E} _ {d \in S (d)} [ | | d - G (F (d), s (d)) | | _ {1} ] \tag {5} +$$ + +Truncation loss. The truncation loss is designed to prevent the generated drawing from hiding information in small values. It is in the same format as the relaxed cycle-consistency loss, except that the generated drawing $G(p,s)$ is first truncated to 6 bits (a general digital image stores intensity in 8 bits) to ensure encoded information is clearly visible, and then fed into $F$ to reconstruct the photo. Denote the truncation operation as $T[\cdot]$ , the truncation loss is formulated as: + +$$ +L _ {t r u n c} (G, F) = \mathbb {E} _ {p \in S (p)} \left[ L _ {l p i p s} (H (p), H (F (T [ G (p, s) ]))) \right] \tag {6} +$$ + +In the first period of training, the weight for the truncation loss is kept low, otherwise it would be too hard for the model to optimize. The weight gradually increases as the training progresses. + +Style loss. The style loss is introduced to help $G$ generate multiple styles with different style features. Denote the classification branch in $D_{\mathcal{D}}$ as $D_{cls}$ , the style loss is formulated as + +$$ +\begin{array}{l} L _ {c l s} (G, D _ {\mathcal {D}}) = \mathbb {E} _ {d \in S (d)} [ - \sum_ {c} p (c) \log D _ {c l s} (c | d) ] \\ + \mathbb {E} _ {p \in S (p)} [ - \sum_ {c} p ^ {\prime} (c) \log D _ {c l s} (c | G (p, s)) ] \tag {7} \\ \end{array} +$$ + +For real drawing $d$ , $p(c)$ is the probability over style label $c$ given by classifier $C$ , $D_{cls}(c|d)$ is the predicted softmax probability by $D_{cls}$ over $c$ . We multiply by the probability $p(c)$ in order to take into account those real drawings that may not belong to a single style but lie between two styles, e.g. softmax probability [0.58, 0.40, 0.02]. For generated drawing $G(p,s)$ , $p'(c)$ denotes the probability over style label $c$ and is specified by style feature $s$ , $D_{cls}(c|G(p,s))$ is the predicted softmax probability over $c$ . This classification loss drives $D_{cls}$ to classify a drawing into the correct style and drives $G$ to generate a drawing close to a given style feature. + +![](images/03747d7feb6d75d160467278d4694a41bbc1fe900d57ca9fc848201cf2939072.jpg) +Figure 5. Comparison with two state-of-the-art neural style transfer methods, i.e., Gatys [4] and LinearStyleTransfer [14]. + +# 4. Experiments + +We implemented our method in PyTorch. All experiments are performed on a computer with a Titan Xp GPU. The parameters in Eq. 1 are $\lambda_1 = 5 - \frac{4.5i}{n}$ , $\lambda_2 = 5$ , $\lambda_3 = \frac{4.5i}{n}$ , $\lambda_4 = 1$ , where $i$ is the current epoch number, and $n$ is the total epoch number. + +# 4.1. Experiment Setup + +Data. We collect face photos and APDrawings from the Internet and construct a training corpus of 798 face photos and 625 delicate portrait line drawings, and a test set of 154 face photos. Among the collected drawings, 84 are labeled with artist Charles Burns, 48 are labeled with artist Yann Legendre, 88 are labeled with artist Kathryn Rathke, 212 are from website vectorportal.com, while others have no tagged author/source information. We observed that both Charles Burns and Yann Legendre use similar parallel lines to draw shadows, and so we merged drawings of these two artists into style1. We select the drawings of Kathryn Rathke as style2 and the drawings of vectorportal as style3. Both of them have distinctive features: Kathryn Rathke uses flowing lines but few dark regions and vectorportal uses thick lines and large dark regions. All the training images are resized and cropped to $512 \times 512$ pixels. + +Training process. 1) Training classifier $C$ . We first train a style classifier $C$ (Section 3.2.1) with the tagged drawings and data augmentation (including random rotation, translation and scaling). To balance the number of drawings in each style, we take all drawings from the first and second styles but only part of the third style in training stage of $C$ , to achieve more balanced training for different styles. 2) Training our model. Then we use the trained classifier to obtain style features for all 625 drawings. We further augment training data using synthesized drawings. Training our network with the mixed data of real drawings and synthesized drawings results in high-quality generation for all three styles (Figs. 5-7, where our results + +![](images/bd387fe013c735b4b89404f0386c8ab9a83a03a3b507d39b6e8d4fb339edc267.jpg) +Figure 6. Comparison with three single-modal unpaired image-to-image translation methods: DualGAN [21], CycleGAN [25], UNIT [15]. + +![](images/d93730941367828328e0ea871d6f95777ecb7ccbd41571ab495d40a61c6ba854.jpg) +Figure 7. Comparison with two unpaired image-to-image translation methods that can deal with multi-modal or multi-domain translation: MUNIT [9], ComboGAN [1]. + +of styles 1, 2, 3 are generated by feeding in a style feature of $[1,0,0],[0,1,0],[0,0,1]$ respectively). + +# 4.2. Comparisons + +We compare our method with two state-of-the-art neural style transfer methods: Gatys [4], LinearStyleTransfer [14], and five unpaired image-to-image translation methods: DualGAN [21], CycleGAN [25], UNIT [15], MUNIT [9] and ComboGAN [1]. + +Comparisons with neural style transfer methods are shown in Fig. 5. Gatys' method fails to capture portrait line drawing styles because it uses the Gram matrix to model style as texture and APDrawings have little texture. LinearStyleTransfer produces visually better results but still not the desired line drawing: the generated drawings have many thick lines but they are produced in a rough manner. Compared to these example-guided style transfer methods, our method learns from a set of APDrawings and generates delicate results for all three styles. + +Comparisons with single-modal unpaired image-to-image translation methods are shown in Fig. 6. DualGAN and CycleGAN are both based on strict cycle-consistency + +loss. This causes a dilemma in photo to line drawing translation: either a generated drawing looks like a real drawing (i.e. close to binary, containing large uniform regions) but cannot properly reconstruct the original photo; or a generated drawing has grayscale changes and good reconstruction but does not look like a real drawing. Also, compared to CycleGAN, DualGAN is more grayscale-like, less abstract and worse in line drawing style. UNIT adopts feature-level cycle-consistency loss, which makes the results less constrained at the image level, making the face appear deformed. In comparison, our results both preserve face structure and have good image and line quality. + +Comparisons with unpaired image-to-image translation methods that can deal with multi-modal or multi-domain translation are shown in Fig. 7. Results show that MUNIT does not capture the line drawing style in our task and the results are more similar to a pencil drawing with shading and many gray regions. ComboGAN fails to capture all three representative styles and performs better on styles 2 and 3 than style 1. Our architecture inserts style information earlier in the generator, which gives more space for multi-style generation. As a result, our method generates distinctive re + +![](images/459d5e59cbbb355d45d1d7ee2da899ecc6788ba513ecfae536cb39c3ce3f1092.jpg) +Figure 8. Ablation study: (a) input photos, (b) results of removing relaxed cycle-consistency loss (i.e. using $L_{1}$ loss) and removing local discriminators, (c) results of removing relaxed cycle-consistency loss, (d) results of removing local discriminators, (e) results of removing HED in calculating relaxed cycle-consistency loss, (f) our results. + +Table 1. User study results. The $i$ -th row shows the percentages of different methods (LinearStyleTransfer (LST) [14], CycleGAN [25], ComboGAN [1] and Ours) being ranked as the $i$ -th among four methods. + +
LSTComboGANCycleGANOurs
Rank11.3%14.9%15.2%68.5%
Rank27.4%31.8%38.8%22.0%
Rank331.2%31.4%30.0%7.4%
Rank460.1%21.9%15.9%2.1%
+ +sults for three styles and reproduces the characteristics for each style well. + +# 4.3. User Study + +We conduct a user study to compare our method with LinearStyleTransfer (LST), CycleGAN and ComboGAN (Gatys, DualGAN and UNIT are not included because of lower visual quality and MUNIT is not included because it does not capture the line drawing style). We randomly sample 60 face photos from the test set and translate 20 of them to each style. The style reference needed for LST is randomly chosen from real drawings. Participants are shown a photo, a real drawing (style reference) and four generated drawings at a time, and are asked to drag and sort four results based on style similarity, face structure preservation and image quality. 34 participants attended the user study and 2,040 votes were collected in total. Results of the percentages of each method ranked as 1,2,3,4 are summarized in Table. 1. Our method ranks the best in $68.5\%$ of votes, while LST, ComboGAN and CycleGAN rank the best in $1.3\%$ , $14.9\%$ and $15.2\%$ instances. The average rank of our method is 1.43, compared to CycleGAN's 2.47, ComboGAN's 2.60 and LST's 3.50. These results demonstrate that our method outperforms other methods. All generated drawings evaluated in user study are presented in the supplementary material. And we provide another quantitative + +evaluation (FID evaluation) in the supplementary material. + +# 4.4. Ablation Study + +We perform an ablation study on the key factors in our method: (1) relaxed cycle consistency loss, (2) local discriminators and (3) HED edge extraction. Results show that they are all essential to our method. + +As shown in Fig. 8b, without relaxed cycle consistency loss and local discriminators, facial features are often missing (e.g. the nose is missing in the first and second rows, nose and eye details are missing in the third row). Removing only relaxed cycle consistency loss (Fig. 8c) preserves more facial feature regions (e.g., the nose in the first row) than (Fig. 8b) but still some parts are missing. Removing only local discriminators (Fig. 8d) produces few missing parts (much better than (Fig. 8b) in facial structure preservation), but some facial features are not drawn in the desired manner: some black regions or shadows that are usually drawn near facial boundaries or hair appear near the nose. When both relaxed cycle consistency loss and local discriminators are used, results (Fig. 8f) preserve all facial feature regions and no undesired black regions or shadows appear in faces. These results show that both relaxed cycle consistency loss and local discriminators help to preserve facial feature regions and are complementary to each other, and local discriminators also help to avoid undesired elements in facial features. + +As shown in Fig. 8e, without HED edge extraction in the relaxed cycle consistency loss calculation, the lines are often discontinuous or blurred (see the nose in the first and second rows, and eyes and lips in the third row). In comparison, our results have clear, sharp and continuous lines. This result demonstrates that using HED edge extraction helps the model to generate clearer and more complete lines. + +# 5. Conclusion + +In this paper, we propose a method for unpaired portrait line drawing generation using asymmetric cycle mapping. Our method can learn multi-style portrait drawing generation from mixed web data using an additional style feature input and a soft classification loss. Experiments and a user study demonstrate that our method can generate high-quality distinctive results for three representative styles and outperform state-of-the-art methods. + +# Acknowledgement + +This work was partially supported by NSFC (61725204, 61521002), BNRist, MOE-Key Laboratory of Pervasive Computing and Royal Society-Newton Advanced Fellowship (NA150431). + +# References + +[1] Asha Anoosheh, Eirikur Agustsson, Radu Timofte, and Luc Van Gool. ComboGAN: unrestrained scalability for image domain translation. In IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPR Workshops), pages 783-790, 2018. 2, 3, 7, 8 +[2] Casey Chu, Andrey Zhmoginov, and Mark Sandler. CycleGAN, a master of steganography. CoRR, abs/1712.02950, 2017. 3 +[3] Hao Dou, Chen Chen, Xiyuan Hu, and Silong Peng. Asymmetric CycleGan for unpaired NIR-to-RGB face image translation. In IEEE International Conference on Acoustics, Speech and Signal Processing, (ICASSP), pages 1757-1761. IEEE, 2019. 3 +[4] Leon A. Gatys, Alexander S. Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2414-2423, 2016. 1, 2, 6, 7 +[5] Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems (NeurIPS), pages 2672–2680, 2014. 2, 4 +[6] Shuyang Gu, Jianmin Bao, Hao Yang, Dong Chen, Fang Wen, and Lu Yuan. Mask-guided portrait editing with conditional GANs. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3436-3445, 2019. 5 +[7] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770-778, 2016. 4 +[8] Xun Huang and Serge J. Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In IEEE International Conference on Computer Vision (ICCV), pages 1510-1519, 2017. 2 +[9] Xun Huang, Ming-Yu Liu, Serge J. Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. In 15th European Conference (ECCV), pages 179-196, 2018. 2, 3, 7 +[10] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A. Efros. Image-to-image translation with conditional adversarial networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5967-5976, 2017. 1, 2, 5 +[11] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In 14th European Conference (ECCV), pages 694–711, 2016. 2 +[12] Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew P. Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, and Wenzhe Shi. Photo-realistic single image super-resolution using a generative adversarial network. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 105-114, 2017. 2 +[13] Chuan Li and Michael Wand. Combining markov random fields and convolutional neural networks for image synthe- + +sis. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2479-2486, 2016. 2 +[14] Xueting Li, Sifei Liu, Jan Kautz, and Ming-Hsuan Yang. Learning linear transformations for fast image and video style transfer. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3809-3817, 2019. 2, 6, 7, 8 +[15] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In Advances in Neural Information Processing Systems (NeurIPS), pages 700-708, 2017. 2, 3, 7 +[16] Scott E. Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, and Honglak Lee. Generative adversarial text to image synthesis. In Proceedings of the 33nd International Conference on Machine Learning (ICML), pages 1060-1069, 2016. 2 +[17] Dmitry Ulyanov, Vadim Lebedev, Andrea Vedaldi, and Victor S. Lempitsky. Texture networks: Feed-forward synthesis of textures and stylized images. In Proceedings of the 33nd International Conference on Machine Learning (ICML), pages 1349-1357, 2016. 2 +[18] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. High-resolution image synthesis and semantic manipulation with conditional GANs. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8798-8807, 2018. 3 +[19] Saining Xie and Zhuowen Tu. Holistically-nested edge detection. In IEEE International Conference on Computer Vision (ICCV), pages 1395-1403, 2015. 6 +[20] Ran Yi, Yong-Jin Liu, Yu-Kun Lai, and Paul L. Rosin. ApdrawingGAN: Generating artistic portrait drawings from face photos with hierarchical GANs. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 10743-10752, 2019. 1, 2 +[21] Zili Yi, Hao (Richard) Zhang, Ping Tan, and Minglun Gong. Dualgan: Unsupervised dual learning for image-to-image translation. In IEEE International Conference on Computer Vision (ICCV), pages 2868-2876, 2017. 1, 2, 3, 7 +[22] Han Zhang, Tao Xu, and Hongsheng Li. StackGAN: Text to photo-realistic image synthesis with stacked generative adversarial networks. In IEEE International Conference on Computer Vision (ICCV), pages 5908-5916, 2017. 2 +[23] Jichao Zhang, Yezhi Shu, Songhua Xu, Gongze Cao, Fan Zhong, Meng Liu, and Xueying Qin. Sparsely grouped multi-task generative adversarial networks for facial attribute manipulation. In ACM Multimedia Conference on Multimedia Conference (MM), pages 392-401, 2018. 2 +[24] Richard Zhang, Phillip Isola, Alexei A. Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 586-595, 2018. 6 +[25] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In IEEE International Conference on Computer Vision (ICCV), pages 2242-2251, 2017. 1, 2, 3, 7, 8 \ No newline at end of file diff --git a/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/images.zip b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..747a7aa9c542b3c5b0382f8b39577c42866eb65d --- /dev/null +++ b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03f5a885138296b3e142275ea53158cbabe80852c3de49db3da38c858a41ec8b +size 842911 diff --git a/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/layout.json b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..557316ba330c6a572967727f1c70c478089cb2a2 --- /dev/null +++ b/unpairedportraitdrawinggenerationviaasymmetriccyclemapping/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc275dc1243030f7637257c5fb59d801befb7259c3fa357242660b27905485b7 +size 423579 diff --git a/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/d4f72d56-35b6-4318-bc7c-4e52880f986c_content_list.json b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/d4f72d56-35b6-4318-bc7c-4e52880f986c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cc2d7c1c13ea96939ad80a92177791a326088e61 --- /dev/null +++ b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/d4f72d56-35b6-4318-bc7c-4e52880f986c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aacbd547c1d96ed8b080c601aa92cf99307613386398efd8b2f60980ce9f9ea8 +size 79830 diff --git a/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/d4f72d56-35b6-4318-bc7c-4e52880f986c_model.json b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/d4f72d56-35b6-4318-bc7c-4e52880f986c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fcd3c4fd8f758e2320ca6ea05abc7eaec93e1d7e --- /dev/null +++ b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/d4f72d56-35b6-4318-bc7c-4e52880f986c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:edeaec6a7e8e34a4f376b23483f58fcdc75a2d1cd9696f944b4702cf9c441a8d +size 97782 diff --git a/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/d4f72d56-35b6-4318-bc7c-4e52880f986c_origin.pdf b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/d4f72d56-35b6-4318-bc7c-4e52880f986c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..53f9b42fe759b7539a3681dde7f996befbcf9568 --- /dev/null +++ b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/d4f72d56-35b6-4318-bc7c-4e52880f986c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c824562fd77afac527eeb8d141349903d1ca97a165d50dd8017664920442d51d +size 4860089 diff --git a/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/full.md b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e4f972c08d4b502351e0dd7c2ba75e865c0c011a --- /dev/null +++ b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/full.md @@ -0,0 +1,308 @@ +# Unsupervised Adaptation Learning for Hyperspectral Imagery Super-resolution + +Lei Zhang $^{1*}$ , Jiangtao Nie $^{2*}$ , Wei Wei $^{2,3}$ , Yanning Zhang $^{2}$ , Shengcai Liao $^{1}$ and Ling Shao $^{1}$ $^{1}$ Inception Institute of Artificial Intelligence (IIAI), Abu Dhabi, United Arab Emirates + $^{2}$ School of Computer Science, Northwestern Polytechnical University, Xi'an, China + $^{3}$ Northwestern Polytechnical University in Shenzhen, Shenzhen, China + +# Abstract + +The key for fusion based hyperspectral image (HSI) super-resolution (SR) is to infer the posteriori of a latent HSI using appropriate image prior and likelihood that depends on degeneration. However, in practice the priors of high-dimensional HSIs can be extremely complicated and the degeneration is often unknown. Consequently most existing approaches that assume a shallow hand-crafted image prior and a pre-defined degeneration, fail to well generalize in real applications. To tackle this problem, we present an unsupervised adaptation learning (UAL) framework. Instead of directly modelling the complicated image prior, we propose to first implicitly learn a general image prior using deep networks and then adapt it to a specific HSI. Following this idea, we develop a two-stage SR network that leverages two consecutive modules: a fusion module and an adaptation module, to recover the latent HSI in a coarse-to-fine scheme. The fusion module is pretrained in a supervised manner on synthetic data to capture a spatial-spectral prior that is general across most HSIs. To adapt the learned general prior to the specific HSI under unknown degeneration, we introduce a simple degeneration network to assist learning both the adaptation module and the degeneration in an unsupervised way. In this way, the resultant imagespecific prior and the estimated degeneration can benefit the inference of a more accurate posteriori, thereby increasing generalization capacity. To verify the efficacy of UAL, we extensively evaluate it on four benchmark datasets and report strong results that surpass existing approaches. + +# 1. Introduction + +Hyperspectral images (HSIs) consists of hundreds of spectral bands that record the reflectance of an imaging scene across a consecutive wavelengths with narrow interval (e.g. $10\mathrm{nm}$ ) [1, 32], where each pixel contains a spec + +*The first two authors contributed equally. The corresponding author is Wei Wei (email: weiw Weinpu@nwpu.edu.cn). Project page: https://github.com/JiangtaoNie/UAL + +trum. Due to the discriminative power of their spectra [13], HSIs have been widely applied to various computer vision tasks, such as target detection [17], classification [13], tracking [22] etc. However, physical limitations on spectral sensor [12, 7] often prevent the collection of high resolution (HR) HSIs in practice. Hence increasing efforts have been put forwards to HSI super-resolution (SR). + +Recent studies [4, 14, 19] have shown that fusing a low resolution (LR) HSI with an HR multispectral image (M-SI) using maximum a posteriori (MAP) estimation [32] is a promising approach for HSI SR. The key lies on inferring the posteriori of the latent HSI using an appropriate image prior and the likelihood determined by the degeneration from the latent HSI to the observed LR HSI. To this end, existing approaches have handcrafted various shallow prior models, e.g. sparsity [12, 8], low-rank [30] etc. Together with pre-defined degeneration models, e.g. Gaussian blur based down-sampling [8, 30], they can successfully recover simple structures of HSIs under given degenerations. However, due to the countless number of imaging scenes that exist, real HSIs often contain abundant complex structures and the true prior can be extremely complicated, e.g. multi-mode, image-specific. In addition, random factors in imaging procedure (e.g. sensor shaking, noise corruption) usually introduce unknown degeneration into observations. Hence, when applied to real scenarios, most existing approaches fail to generalize appropriately or obtain pleasing SR performance, as shown in Figure 1. + +In this study, we propose an unsupervised adaptation learning (UAL) framework and demonstrate good generalization efficacy in HSI SR. In contrast to existing approaches, we propose to learn a deep image-specific prior for each HSI. Instead of directly modelling such a complicated prior, we first utilize deep networks to implicitly learn an image prior that is general across most HSIs and then adapt it to a specific HSI. Following this idea, we propose a two-stage S-R network that employs two consecutive modules to recover the latent HSI in a coarse-to-fine scheme: a fusion module and an adaptation module. The fusion module adopts a brand-new mutual-guiding architecture, and is pretrained + +![](images/b33591e3e7f7088d1f665c7bb5e7eb3357c9cdf10fdf4713a043ebc3d1278ff9.jpg) +(a) NSSR [8] +(b) CMS [30] +(c) DIP [21] +(d) MHF-net [25] +(e) YONG [15] +(f) UAL (ours) +(g) Ground truth +Figure 1. Visual SR results and reconstruction error maps on an image from the CAVE dataset [28] with unknown degeneration (e.g., no-Gaussian blur and random noise) when SR scale $s$ is 8. Most existing methods show obvious artifacts and reconstruction error. + +on synthetic data in a supervised manner to learn a general spatial-spectral prior, which it employs for rough SR recovery. To adapt the learned general image prior to a specific HSI, the key is to extract image-specific knowledge from two observed images under unknown degeneration. To this end, we introduce a simple degeneration network to assist learning both the adaptation module and the degeneration in an unsupervised manner. By doing this, we can jointly obtain an image-specific prior and estimate the degeneration, ultimately inferring the posteriori of the latent HSI accurately and increasing the generalization capacity. Extensive experiments demonstrate the efficacy of UAL in generalizing to unknown degenerations and different datasets. + +In summary, we provide four main contributions: 1) we present an UAL framework to generalize fusion based SR to real cases; 2) we propose to learn the complicated image prior via adapting deep general image priors to a specific image; 3) we develop a new mutual-guiding module for images fusion, which is an universal module and can be plugged into any other fusion or multi-input networks; 4) we show state-of-the-art SR performance on four datasets. + +# 2. Related works + +According to the image prior utilized, existing fusion-based SR methods can be divided into two categories. + +Shallow image prior Existing methods have handcrafted various shallow image prior models [24, 3, 12, 8, 30]. For example, Wycoff et al. [24] and Lanaras [12] propose to decompose the latent HR HSI into a non-negative end-member matrix and an abundance matrix, and then impose a sparse prior on the abundance matrix. Akhtar [2] exploit the signal sparsity, nonnegativity and spatial structure of the latent HSI by projecting each spectrum onto a pre-extracted spectral dictionary. In [3], a Bayesian sparse representation scheme is utilized to infer the probability distributions of spectra and their proportions decomposed from the latent HSI. Recently, Dong et al. [8] further consider the spatially non-local similarity of the latent HSI. Zhang et al. [30] + +exploit the spatial manifold structure. Due to the limited expressiveness of shallow image priors, these methods fail to generalize well in challenging cases, especially when the degeneration in observation is unknown [15, 10]. In contrast, we learn a deep image-specific prior for each HSI. The deep structure and image-specific nature provide good generalization performance in practice. + +Deep image prior Inspired by the great success of deep learning, several deep image priors have been proposed for HSIs. For example, Ulyanov et al. [21] employ a randomly initialized deep convolutional neural network as an image prior and achieve unsupervised image recovery under a given degeneration. When the degeneration is unknown, further introducing a degeneration network seems to be helpful [5]. However, since the observation only contains limited information for the latent image, unsupervised learning in this case often results in over-fitting and incurs expensive computational costs. With special design, the proposed UAL effectively avoids over-fitting and reduces the computational cost. Very recently, Xie et al [25] implicitly learn a deep image prior by training a SR network under supervision. The learned prior can effectively capture the general structure, however fails to depict the image-specific details and cope with unknown degenerations. In contrast, the proposed UAL can address these problems successfully. + +# 3. Unsupervised adaptation learning + +# 3.1. Problem formulation + +Given two observed images, including an HR MSI $\mathbf{X} \in \mathbb{R}^{b \times N}$ consisting of $b$ spectral bands with $N$ pixels in the spatial domain and an LR HSI $\mathbf{Y} \in \mathbb{R}^{B \times n}$ , the fusion-based HSI SR aims to produce a latent HR HSI $\mathbf{Z} \in \mathbb{R}^{B \times N}$ (e.g. $b \ll B$ , $n \ll N$ ). The relation between the latent $\mathbf{Z}$ and the other two observations can be formulated as + +$$ +\mathbf {X} = \mathbf {P Z}, \quad \mathbf {Y} = \mathbf {Z H}, \tag {1} +$$ + +where $\mathbf{P} \in \mathbb{R}^{b \times B}$ denotes the spectral response function, and $\mathbf{H} \in \mathbb{R}^{N \times n}$ represents the degeneration from $\mathbf{Z}$ to $\mathbf{Y}$ . + +![](images/06f1aa8c1243898fe84ef9d8490c4eb8ee23acb2631181169acdbd8f6003f35d.jpg) +(a) The proposed UAL framework + +![](images/8d0645b99214b294d15eb490b380b32cc8ccabb50f313eb67b1498d15bb892fc.jpg) +(b) The proposed two-stage SR network +Figure 2. Flow chart of the proposed UAL and the proposed two-stage SR network. In figure (a), red arrows indicate the back-propagated gradient in unsupervised learning, and we denote the fusion module in gray to indicate that its weights are fixed in unsupervised learning. + +When both $\mathbf{P}$ and $\mathbf{H}$ are predefined, the MAP estimation of fusion-based HSI SR can be formulated as + +$$ +\min _ {\mathbf {Z}} \left\| \mathbf {X} - \mathbf {P Z} \right\| ^ {2} + \left\| \mathbf {Y} - \mathbf {Z H} \right\| ^ {2} + \lambda \mathcal {R} (\mathbf {Z}), \tag {2} +$$ + +where the first two terms represent the likelihood-based energy and $\mathcal{R}(\mathbf{Z})$ denotes the regularization introduced by image prior on $\mathbf{Z}$ . Since $\mathbf{P}$ is determined by the parameters of camera and often can be obtained in advance [12, 8, 14, 30], in this study we assume $\mathbf{P}$ is given and mainly focus on coping with the unknown degeneration $\mathbf{H}$ in practice. + +# 3.2. Unsupervised adaptation learning + +Instead of separately modelling the likelihood and prior as in Eq. (2), we employ a deep SR network to directly model the maximum posteriori of $\mathbf{Z}$ , which learns the image prior implicitly during network training. To learn an image-specific prior under unknown degeneration, we first design a two-stage SR network as shown in Figure 2(a), which consists of two modules: a fusion module and an adaptation module. Then, we carry out the following two steps to accomplish prior learning and degeneration estimation. + +Pre-train fusion module We train the fusion module in a supervised manner to learn a general prior and utilize it for rough SR recovery. To this end, we first employ extensive synthetic degenerations $\{\mathbf{H}_j\}$ to produce training pairs on a set of HSIs $\{\mathbf{Z}_i\}$ (see details in Section 4.1). Then, we solve the following problem to learn the fusion module. + +$$ +\min _ {\theta_ {f}} \sum_ {i, j} \| \mathbf {Z} _ {i} - \hat {\mathbf {Z}} _ {i j} \| ^ {2}, \tag {3} +$$ + +$$ +s. t., \hat {\mathbf {Z}} _ {i j} = \mathcal {F} \left(\mathbf {X} _ {i j}, \mathbf {Y} _ {i j}; \theta_ {f}\right), \mathbf {X} _ {i j} = \mathbf {P Z} _ {i}, \mathbf {Y} _ {i j} = \mathbf {Z} _ {i} \mathbf {H} _ {j}, +$$ + +where $\{\mathbf{Z}_i, \mathbf{X}_{ij}, \mathbf{Y}_{ij}\}$ denotes the training pair generated by the degeneration $\mathbf{H}_j$ . $\mathcal{F}$ denotes the fusion module parameterized by $\theta_f$ . $\|\cdot\|$ denotes the reconstruction loss. + +Unsupervised adaptation learning To adapt the general image prior learned in the fusion module to a specific HSI under unknown degeneration, the solution lies on exploiting the image-specific statistics. Previous work [33] has shown that the degenerated observation often contains some image-specific statistics, and can supervise the learning of an image-specific prior when the degeneration is given [21]. + +To generalize this idea to real cases with unknown degenerations, we introduce a degeneration network together with the given spectral response function $\mathbf{P}$ to map the image $\mathbf{Z}$ generated from the fusion module back into the observed $\mathbf{X}$ and $\mathbf{Y}$ , respectively, as shown in Figure 2(a). In this way, both the adaptation module and degeneration can be jointly learned in an unsupervised manner as + +$$ +\min _ {\theta , \vartheta} \| \mathbf {X} - \mathbf {P Z} \| ^ {2} + \| \mathbf {Y} - \mathbf {Z H} \| ^ {2}, \tag {4} +$$ + +$$ +\mathrm {s . t . ,} \mathbf {Z} = \mathcal {G} (\mathbf {X}, \mathbf {Y}; \theta), \mathbf {Z H} = \mathcal {H} (\mathbf {Z}; \vartheta), +$$ + +where $\mathcal{G}(\cdot ;\theta)$ denotes the proposed two-stage SR network that takes both observed images as input and outputs the latent HSI. In Eq. (4), we fix the fusion module, and let $\theta$ denote the parameters in the adaptation module. $\mathcal{H}(\cdot ;\vartheta)$ denotes the degeneration network parameterized by $\vartheta$ . + +The UAL proposed above provides a promising way to jointly achieve degeneration estimation and HSI SR with a deep image-specific prior. However, due to the limited amount of data in $\mathbf{X}$ and $\mathbf{Y}$ , designing casual architectures for the SR and degeneration networks may cause over-fitting and incur expensive computational costs in unsupervised learning. To address this problem, we propose to largely reduce the number of parameters to learn in the unsupervised learning via two strategies: 1) we implement the degeneration network $\mathcal{H}$ with a very simple architecture; 2) we construct the fusion module with a complex architecture so that it contains most parameters of the SR network, while adopting a light-weight architecture with only a few parameters as the adaptation module. By doing these, only a few parameters will be learned in Eq. (4), thus effectively avoiding over-fitting and reducing computational cost. In the following, we will discuss these two strategies in detail. + +# 3.3. Simple degeneration network + +Before designing the degeneration network $\mathcal{H}$ , we first revisit the physical structure of the degeneration $\mathbf{H}$ . In practice, $\mathbf{H}$ involves both spatial down-sampling and noise corruption [9]. Down-sampling often convolves the image with a specific kernel beforehand [9, 29], while noise corruption is close to the additive zero-mean random noise [18, 31]. Thus, degeneration $\mathbf{H}$ on $\mathbf{Z}$ can be formulated as + +$$ +\mathbf {Z} \mathbf {H} = (\mathbf {Z} * \mathbf {k}) \downarrow_ {s} + \mathbf {N}, \tag {5} +$$ + +![](images/02b1ac3e78a2a50a58d2b33c702cc15b3a6666514bc822e7a259432a511f3a88.jpg) +(a) Ground truth (b) Fusion module (c) SR network + +where $\mathbf{k}$ denotes a 2-D spatial kernel and $\otimes$ indicates convolving each band of $\mathbf{Z}$ with the same kernel $\mathbf{k}$ . $\downarrow_{s}$ represents the down-sampling operation in the spatial domain with a scaling factor $s$ . $\mathbf{N}$ denotes the random noise corruption. As shown in Eq (5), the major parameter in $\mathbf{H}$ is the kernel $\mathbf{k}$ , e.g. a $k\times k$ -sized $\mathbf{k}$ that only involves $k^2$ parameters with $k < 30$ . Inspired by this, we adopt a single convolutional layer with a kernel $\mathbf{k}$ and a stride $s$ as the degeneration network $\mathcal{H}$ . Since noise corruption $\mathbf{N}$ can be absorbed into the loss function in Eq. (4) as discussed in [21], no specific structure is further designed for the noise $\mathbf{N}$ . + +# 3.4. Two-stage SR network + +As shown in Figure 2(b), we implement the fusion module with a new mutual-guiding architecture to exploit the general spatial-spectral prior for rough SR recovery, while implementing the adaptation module with a light-weight architecture to refine image-specific details. This enables a coarse-to-fine SR, as shown in Figure 3. In the following, we discuss both modules in detail. + +# 3.4.1 Mutual-guiding fusion module + +For deep fusion-based HSI SR, a direct way is to concatenate the observed images $\mathbf{X}$ and $\mathbf{Y}$ along the spectral dimension and feed them into an appropriate deep SR network. The concatenation enables the correlation between two observed images to be exploited. However, it fails to explicitly leverage specific knowledge from each input. + +To sufficiently utilize both intra-input and inter-input knowledge, we propose a mutual-guiding fusion module that takes three different inputs, including the HR MSI $\mathbf{X}$ , LR HSI $\mathbf{Y}^1$ and their concatenation $[\mathbf{X};\mathbf{Y}]$ . As shown in Figure 2(b), this module first utilizes three parallel branches to separately map the three inputs into deep features, and then the concatenation of deep features is convolved to produce a rough estimate $\tilde{\mathbf{Z}}$ for the latent HSI $\mathbf{Z}$ . Each branch consists of two basic blocks, including a mapping block and a mutual-guiding block. The mapping block stacks $M$ convolutional blocks (i.e., a convolutional layer followed by a ReLu [16]), while the mutual guiding block separately transforms each feature from the three branches under the guidance of the other two features. Specifically, let $\mathbf{F}_x$ , + +![](images/e20f1ad15333d11b96f1f8e61286df07008fe2f44b3004f5fecf8a93d60fbb13.jpg) +Figure 3. Reconstruction error maps generated by the pre-trained fusion module and the proposed two-stage SR network. +(a) Mutual-guiding block +Figure 4. Architecture of mutual-guiding and self-guiding blocks. $\mathbf{F}_y$ and $\mathbf{F}_{xy}$ denote three features produced by a mapping block. Taking $\mathbf{F}_x$ as an example, the mutual guiding block linearly transforms $\mathbf{F}_x$ as + +![](images/208736df7c045033c6f94fe46f51878a992d018160ef1817ca92abb42cc6bf3c.jpg) +(b) Self-guiding block + +$$ +\mathbf {F} _ {x} ^ {\prime} = \mathbf {F} _ {x} \odot \mathbf {A} + \mathbf {B}, \tag {6} +$$ + +where $\mathbf{F}_x^{\prime}$ denotes the transformed $\mathbf{F}_x$ , and $\odot$ indicates point-wise product. A and B represent the guidance. Similar to [23], this transformation regulates each entry of $\mathbf{F}_x$ accordingly, thus improving the flexibility in fusion. We compute A and B separately using two individual guidance blocks as shown in Figure 4(a), which can be formulated as + +$$ +\mathbf {A} = \mathcal {P} _ {a} \left(\left[ \mathbf {F} _ {x}; \mathbf {F} _ {y}; \mathbf {F} _ {x y} \right]; \pi_ {a}\right); \mathbf {B} = \mathcal {P} _ {b} \left(\left[ \mathbf {F} _ {x}; \mathbf {F} _ {y}; \mathbf {F} _ {x y} \right]; \pi_ {b}\right), \tag {7} +$$ + +where $\mathcal{P}_a(\cdot ;\pi_a)$ and $\mathcal{P}_b(\cdot ;\pi_b)$ denote the guidance blocks for $\mathbf{A}$ and $\mathbf{B}$ , respectively. $[\mathbf{F}_x;\mathbf{F}_y;\mathbf{F}_{xy}]$ denotes the concatenation of three features. In this study, we stack $M$ convolutional blocks as $\mathcal{P}_a$ and $\mathcal{P}_b$ . To avoid the abuse of notations, we utilize the same $\mathcal{P}_a$ and $\mathcal{P}_b$ to separately transform $\mathbf{F}_x$ , $\mathbf{F}_y$ and $\mathbf{F}_{xy}$ as Eq. (6). When computing the guidance for $\mathbf{F}_y$ and $\mathbf{F}_{xy}$ , we employ the concatenation $[\mathbf{F}_y;\mathbf{F}_x;\mathbf{F}_{xy}]$ and $[\mathbf{F}_{xy};\mathbf{F}_x;\mathbf{F}_y]$ , respectively. + +# 3.4.2 Self-guiding adaptation module + +To recover image-specific details, we implement the adaptation module using a residual architecture, as shown in Figure 2(b), where the backbone recovers the residual between the HSI $\tilde{\mathbf{Z}}$ estimated by the fusion module and the ground truth HSI $\mathbf{Z}$ . Let $\mathcal{A}$ denote the backbone, the output $\hat{\mathbf{Z}}$ of the adaptation module can be given as + +$$ +\tilde {\mathbf {Z}} = \tilde {\mathbf {Z}} + \mathcal {A} (\tilde {\mathbf {Z}}). \tag {8} +$$ + +As shown in Figure 2(b), the backbone consists of three components, including a mapping block, which is same as that in fusion module, a self-guiding block and a convolutional layer for output. The self-guiding block has a similar architecture to that of the mutual-guiding block in Section 3.4.1, shown as Figure 4(b). The only difference is that only the input feature itself is utilized to compute the guidance. Let $\mathbf{F}$ denote the feature fed into this block, the output can be obtained from Eq. (6) with the following guidance + +$$ +\mathbf {A} = \mathcal {P} _ {a} (\mathbf {F}; \pi_ {a}); \mathbf {B} = \mathcal {P} _ {b} (\mathbf {F}; \pi_ {b}). \tag {9} +$$ + +$\mathcal{P}_a$ and $\mathcal{P}_b$ again denote the guidance blocks. In unsupervised learning, this block learns to adaptively adjust the pixel-wise residual and refine image-specific details, as shown in Figure 3. + +# 4. Experiments + +# 4.1. Experimental settings + +Datasets We adopt three benchmark HSI datasets and one real HSI dataset for evaluation, including CAVE [28], Harvard [6], NTIRE [20] and HypSen [27]. In the CAVE dataset, there are 32 HSIs each of which has $512 \times 512$ pixels and 31 spectral bands in a wavelength range of $400\mathrm{nm}$ to $700\mathrm{nm}$ . Harvard dataset consists of 50 HSIs. Each image contains $1392 \times 1040$ pixels and 31 spectral bands in a wavelength range of $420\mathrm{nm}$ to $720\mathrm{nm}$ . In the NTIRE dataset, there are 255 HSIs each of which is of size $1392 \times 1300$ in spatial domain and contains 31 bands in a wavelength range of $400\mathrm{nm}$ to $700\mathrm{nm}$ . In contrast to these three datasets, HypSen [27] is a real fusion-based HSI dataset. It consists of an $30\mathrm{m}$ -resolution HSI captured by Hyperion sensor on the Earth Observing-1 satellite, and an $10\mathrm{m}$ -resolution M-SI produced by Sentinel-2A satellite. After removing noisy and water absorption bands as [27], the LR HSI consists of 84 spectral bands, while the HR MSI contains 13 spectral bands. In our experiment, we crop a subimage of size $250 \times 330$ from the HSI and one of size $750 \times 990$ from the MSI, and make sure both capture the same scene. + +Comparison methods & Evaluation metrics For comparison, we select five state-of-the-art fusion based HSI SR methods, including NSSR [8], CMS [30], MHF-net [25], YONG [15] and DIP [21]. Except YONG [15], all other methods predefine a degeneration $\hat{\mathbf{H}}$ as Eq. (5) using a Gaussian kernel but no noise corruption. Among them, NSSR [8] and CMS [30] exploit the sparse or manifold prior of the latent HSI. MHF-net [25] train a deep network in a supervised manner to recover the latent HSI, while DIP [21] employs a deep image prior for SR in an unsupervised way. YONG [15] cast HSI SR and degeneration estimation into a joint learning framework but with a shallow image prior. + +To quantitatively evaluate the SR performance, we adopt four standard metrics: root-mean-square error (RMSE) ${}^{2}$ , peak signal-to-noise ratio (PSNR), spectral angle mapper (SAM) and structural similarity index (SSIM). + +Implementation details In our experiment, we consider each HSI in the benchmark datasets as the ground truth of the latent HSI $\mathbf{Z}$ . Given $\mathbf{Z}$ , we utilize the spectral response function of a Nikon D700 camera in [8, 30] as $\mathbf{P}$ to produce an HR MSI $\mathbf{X}$ as Eq. (1). To obtain the observed LR HSI $\mathbf{Y}$ , we first down-sample $\mathbf{Z}$ with a kernel $\mathbf{k}$ and scale $s$ as Eq. (5), and then add Gaussian white noise into the downsampled result. To simulate various degenerations in practice, we separately employ four non-Gaussian kernels, as shown in Figure 5, as well as three different levels of noise corruption, e.g. 30db, 35db, 40db (the signal-to-noise ratio of $\mathbf{Y}$ ), to generate $\mathbf{Y}$ . Given $\mathbf{X}$ , $\mathbf{Y}$ and $\mathbf{P}$ , we employ all methods to recover the latent $\mathbf{Z}$ . To show their performance + +![](images/5f72621eb7184bb0c673a7b1bfe63dd7c38b6f4f5b430fdc2427658bc3fc4aa1.jpg) +Figure 5. Four different kernels utilized to produce the degeneration $\mathbf{H}$ in test. From left to right, they are $\mathbf{K1}$ , $\mathbf{K}_2$ , $\mathbf{K}_3$ and $\mathbf{K}_4$ . + +under unknown degeneration, we define another degeneration $\hat{\mathbf{H}}$ using a $8\times 8$ sized Gaussian kernel with standard deviation $\sqrt{3}$ as [8, 30], and incorporate it into baselines without degeneration estimation as the pre-defined degeneration. Fair comparison, MHF-net [25] is trained on the same training set as the proposed UAL. + +In the proposed SR network, we set $M = 3$ and equip each convolution layer with 64 kernels of size $3 \times 3$ . In the degeneration network $\mathcal{H}$ , we fix the kernel size as $32 \times 32$ . To pre-train the fusion module, we respectively select 12 HSIs from the CAVE, 20 from the Harvard and 20 from NTIRE as training sets. While the remaining 20 HSIs in CAVE, 30 in Harvard and the other 50 in NTIRE are utilized in test. Given a training HSI, we extract patches of size $128 \times 128$ with stride 64 to generate training pairs as above but this time using synthetic kernels based degeneration, i.e., Gaussian kernels with spatial size and standard deviation randomly sampled in the ranges [5, 15] and [0.5, 2], respectively. Noted that no kernel in test is utilized for training. In this study, we implement UAL in Pytorch. To train the fusion module, we adopt the Adam optimizer [11] with a $\ell_1$ norm based loss. We initialize the learning rate as 1e-4 and decay it every 10 epochs by 0.7. The batch size is set as 6, and the training procedure is terminated in 150 epochs. In the test phase, we feed two observed images $\mathbf{X}$ and $\mathbf{Y}$ into the SR network and then train the adaptation module and the degeneration network with a $\ell_1$ norm based loss. For optimization, we utilize the Adam optimizer with initial learning rates 9e-5, 1e-4 and weight decay 1e-3, 1e-5 to learn the adaptation module and the degeneration network, respectively. We terminate the learning process in 1500 epochs. + +# 4.2. Ablation studies + +In this section, we conduct ablation study on the CAVE dataset. Without loss of generality, we produce the test degeneration with the kernel $\mathbf{k}_1$ in Figure 5 and 40db Gaussian white noise. The SR scale is fixed as 8. + +Effect of components in UAL The proposed UAL has three key components: 1) a two-stage SR network; 2) a pre-trained fusion module whose weights are fixed in unsupervised learning; 3) a degeneration estimation module. To show the effect of the two-stage SR network, we utilize two variants of UAL that remove the adaptation module and the fusion module, respectively. They are termed 'UAL w/o adaptation' and 'UAL w/o fusion'. Their results are given in Table 1. As can be seen, removing either module causes obvious performance drop, and the performance drops more when removing the fusion module, e.g. PSNR drops + +Table 3. Performance under degeneration produced by different levels of noise corruption and kernel ${\mathbf{k}}_{1}$ with SR scale $s = 8$ . + +
30db35db40db
MethodsRMSEPSNRSAMSSIMRMSEPSNRSAMSSIMRMSEPSNRSAMSSIM
NSSR [8]11.4527.1734.640.56619.3129.1725.760.74778.2232.1016.580.9229
CMS [30]7.9630.2431.880.65965.4733.5823.480.81184.2836.5214.880.9517
DIP [21]11.9527.6821.520.829811.5427.9614.930.87829.5629.6715.050.9117
MHF-net [25]4.5535.0624.680.81463.2438.1717.880.90652.6240.2612.900.9528
YONG [15]3.6437.1613.950.93513.3238.0711.480.95333.1238.739.630.9646
UAL2.8039.4313.460.95662.2341.599.360.97771.8543.236.720.9862
+ +Table 4. Performance when SR scale $s$ is 8 and the degeneration is produced by ${\mathrm{k}}_{1}$ and 40db noise. + +
CAVEHavardNTIRE
MethodsRMSEPSNRSAMSSIMRMSEPSNRSAMSSIMRMSEPSNRSAMSSIM
NSSR [8]8.2232.1016.580.92294.1836.283.820.96323.2838.562.180.9792
CMS [30]4.2836.5214.880.95172.7139.893.880.96832.0142.631.680.9913
DIP [21]9.5629.6715.050.911710.5128.338.080.87888.1731.155.050.9085
MHF-net (CAVE) [25]2.6240.2612.900.95283.2338.126.190.94602.5939.922.770.9851
MHF-net (Harvard) [25]7.7930.9325.300.85392.2941.114.210.97148.5530.5911.560.9227
MHF-net (NTIRE) [25]5.6833.9416.020.92623.3838.035.030.96391.7044.151.900.9934
YONG [15]3.1238.739.630.96462.5740.434.080.96904.9234.953.010.9685
UAL (CAVE)1.8543.236.720.98622.3641.193.390.97251.2146.091.310.9951
UAL (Harvard)2.5540.517.650.97902.0842.382.670.98151.7844.491.140.9953
UAL (NTIRE)2.7539.788.840.97072.4141.073.130.97531.5046.190.990.9963
+ +Table 1. Effect of each component in the proposed UAL. + +
MethodsRMSEPSNRSAMSSIM
UAL w/o adaptation2.3541.666.870.9833
UAL w/o fusion4.1836.1710.630.9484
UAL w/o pre-train3.5037.516.500.9735
UAL (fine-tune)2.5440.275.710.9843
UAL (H)4.8138.588.430.9592
UAL (only concat)3.7337.428.350.9653
UAL w/o concat2.0542.466.740.9846
UAL w/o mutual-guiding2.7839.987.440.9782
UAL w/o residual3.4537.776.680.9736
UAL w/o self-guiding1.9542.946.740.9860
UAL1.8543.236.720.9862
+ +Table 2. Performance under degeneration produced by different kernels and 40db noise with SR scale $s = 8$ . + +
MethodsRMSEPSNRSAMSSIM
k1NSSR [8]8.2232.1016.580.9229
CMS [30]4.2836.5214.880.9517
DIP [21]9.5629.6715.050.9117
MHF-net [25]2.6240.2612.900.9528
YONG [15]3.1238.739.630.9646
UAL1.8543.236.720.9862
k2NSSR [8]8.9229.7718.880.8445
CMS [30]4.9234.7517.150.8960
DIP [21]11.4128.0310.790.8960
MHF-net [25]2.8439.5313.430.9438
YONG [15]3.2538.429.890.9621
UAL2.0142.726.780.9859
k3NSSR [8]7.1031.7118.110.8661
CMS [30]4.2935.9016.670.9040
DIP [21]8.1430.999.570.9245
MHF-net [25]2.8139.6213.470.9437
YONG [15]3.1638.6310.000.9613
UAL1.8643.226.700.9862
k4NSSR [8]7.9330.7718.410.8569
CMS [30]4.6635.2216.880.8999
DIP [21]9.6429.479.990.9126
MHF-net [25]2.8439.5313.430.9438
YONG [15]3.2238.539.860.9608
UAL1.8843.146.750.9860
+ +6.06db. To show the effect of the pre-trained fusion module, we learn the whole SR network during unsupervised learning and show the result as 'UAL w/o pre-train' in Table 1. As can be seen, no pre-training results in obvious over-fitting, e.g. PSNR drops 5.72db. In addition, to demonstrate the necessity of fixing the pre-trained fusion module, we fine-tune it during unsupervised learning and show the result as 'UAL (fine-tune)' in Table 1, which also incurs obvious performance drop. Finally, we utilize the pre-defined $\hat{\mathbf{H}}$ instead of estimating $\mathbf{H}$ during unsupervised learning to show the effect of degeneration estimation. Since incorrectly demonstrate $\hat{\mathbf{H}}$ misleads learning adaptation module, the performance also drops, shown as 'UAL ( $\hat{\mathbf{H}}$ )' in Table 1. + +Effect of components in fusion module The proposed fusion module contains two key components: the multibranch structure and the mutual-guiding block. To illustrate the effect of the multi-branch structure, we conduct two experiments. The first removes the branch that takes the concatenation $[\mathbf{X};\mathbf{Y}]$ as input, while the second keeps the concatenation branch but removes the other two. Their results are given as 'UAL (only concat)' and 'UAL w/o concat' in Table 1. Compared with the proposed UAL, their performance declines obviously. To demonstrate the effect of the mutual-guiding block, we remove them from the fusion module. The results are given as 'UAL w/o mutual-guiding' in Table 1. As can be seen, including the mutual-guiding blocks can improve the performance by a clear margin. + +Effect of components in adaptation module In the adaptation module, both residual structure and self-guiding block are crucial. To verify this, we compare UAL with two variants, i.e. 'UAL w/o residual' and 'UAL w/o self-guiding' which remove the residual structure and the self-guiding block, respectively, from the adaptation module. Their results are given in Table 1. As can be seen, removing + +Table 5. Performance when SR scale $s$ is 32 and the degeneration is produced by ${\mathbf{k}}_{1}$ and 40db noise. + +
CAVEHavardNTIRE
MethodsRMSEPSNRSAMSSIMRMSEPSNRSAMSSIMRMSEPSNRSAMSSIM
NSSR [8]9.0530.0016.470.91944.3835.823.920.96203.3438.452.280.9791
CMS [30]4.5735.5011.060.95052.8439.373.920.96802.0342.571.790.9911
DIP [21]9.9028.8317.340.909812.1126.9613.730.850213.1826.1112.300.8709
MHF-net [25]3.7237.6513.460.94592.5040.634.150.97631.9843.261.900.9955
YONG [15]4.9834.8312.840.94223.1338.724.470.96787.5732.834.220.9586
UAL (s=8)2.8939.679.240.97692.3541.163.220.97881.7143.761.680.9962
UAL (s=32)2.7840.067.780.98102.3041.353.410.97851.5744.381.580.9965
UAL (s=32 + init)2.6640.437.620.98312.1441.823.300.97871.5444.561.520.9967
+ +![](images/5f9e05ae20166ec6e9ca6ca6152f27d0411d6f3dc60dff11b953c634371dcb27.jpg) +(a) NSSR [8] +(b) CMS [30] +(c) DIP [21] +(d) MHF-net [25] +(e) YONG [15] +(f) UAL +(g) Ground truth +Figure 6. Visual SR results and reconstruction error maps on one image from the Harvard dataset with SR scale $s = 8$ . + +either component causes a drop in performance. + +# 4.3. Generalizability to unknown degenerations + +We test the proposed UAL under various unknown degenerations on the CAVE dataset with SR scale $s = 8$ . + +Degeneration with different kernels We utilize four k- kernels shown in Figure 5 and a fixed level (e.g., 40db) of noise corruption to produce different degenerations $\mathbf{H}$ . For each $\mathbf{H}$ , we generate corresponding observed images, e.g. $\mathbf{X}$ and $\mathbf{Y}$ , and then feed them into all SR methods. The numerical results are reported in Table 2. As can be seen, since the degeneration $\hat{\mathbf{H}}$ predefined in NSSR [8], CMS [30], DIP [21] and MHF-net [25] deviates from the real $\mathbf{H}$ , these methods fail to produce pleasing SR results. Although Y-ONG [15] also estimates the degeneration, the shallow image prior limits its generalization performance. In contrast, the proposed UAL simultaneously conducts degeneration estimation and SR with deep image-specific image prior. Thus, it surpasses all competitors by a clear margin. This can be further supported by the visual results in Figure 1. + +Degeneration with different noise levels We fix $\mathbf{k}_1$ as k- kernel and introduce three different levels (e.g. 30db, 35db, 40db) of noise corruption to produce H. The numerical results of all methods are reported in Table 3. Since most existing methods assume a clean LR HSI, they are sensitive to noise corruption. The proposed UAL can mitigate this problem by degeneration estimation, e.g. when the noise level is 35db, UAL improves the PSNR score by at least 3.42db. + +# 4.4. Generalizability to various datasets + +In this section, we first test the proposed UAL on different datasets and SR scales, when the degeneration $\mathbf{H}$ is produced by kernel $\mathbf{k}_1$ under 40db of noise corruption. Then, we test UAL on a real dataset. + +Generalizability to different datasets To demonstrate the generalizability of the proposed UAL to various datasets, we obtain three versions of UAL, i.e., 'UAL(CAVE)', 'UAL(Harvard)' and 'UAL(NTITRE)'. in which the fusion module is trained on the training set of the CAVE, Harvard and NTIRE datasets, respectively. For fair comparison, we also obtain three versions of MHF-net [25] accordingly. Their numerical results are shown in Table 4. As can be seen, when generalizing to different datasets, the proposed UAL outperforms other competitors in most cases, e.g., on CAVE dataset, 'UAL(Harvard)' improves the PSNR by at least 1.78db. Moreover, when training and testing on the same dataset, the performance of UAL is further improved. Thus, we can conclude that the proposed UAL generalizes better than other competitors to different datasets. This is further demonstrate by the visual SR results in Figure $6^{3}$ . + +Generalizability to different scales We further test all methods on the three datasets with SR scale $s = 32$ . To verify the generalizability of UAL to different scales, we train the fusion module with three different settings, termed 'UAL( $s = 8$ )', 'UAL( $s = 32$ )' and 'UAL( $s = 32 + \text{init}$ )', 'UAL( $s = 8$ )' and 'UAL( $s = 32$ )' train the fusion module with + +![](images/754c442e5ef2080f5d18d7210c9fb6b868c0c1d6fc9fdd5d758d6d1f2f22baff.jpg) +Figure 8. Visual SR results of different methods for the real dataset HypSen. + +training pairs generated at scale $s = 8$ and $s = 32$ , respectively. 'UAL( $s = 32 + \text{init}$ )' initializes the fusion module in 'UAL( $s = 32$ )' with that from 'UAL( $s = 8$ )'. The numerical results are reported in Table 5. As can be seen, despite not being trained on the test scale, 'UAL( $s = 8$ )' still outperforms other competitors in most cases. When training on the test scale and being initialized, the performance of UAL can be further improved. A visual evidence is given in Figure 7. + +Performance on real dataset Finally, we also test UAL on the real HypSen dataset [27]. With the spectral response function from [27], all methods are performed for SR by fusing the observed LR HSI and the HR MSI. Since there is no ground truth for the latent HR $\mathbf{Z}$ , we follow the evaluation in [27]. In particular, we visualize the SR results of all methods in Figure 8. In addition, we also adopt a non-reference image quality evaluation metric [26] to evaluate the SR results of all methods, as shown in Table 6. We find that the proposed UAL recovers more details and obtain the best image quality. + +# 4.5. Runtime analysis + +We compute the average runtime of all methods on each image from the CAVE dataset when SR scale $s$ is 8 and the degeneration is produced by the kernel $\mathbf{k}_1$ under 40db of noise corruption. All non-deep methods run on a workstation with 40 Intel Xeon CPU E5-2640 v4@2.40GHz, while deep learning based methods run on a Tesla V100 GPU. As shown in Table 7, the runtime of UAL is intermediate, and it runs much faster than most unsupervised competitors. Moreover, in practice, we can make a trade-off between performance and efficiency for the proposed UAL by tuning the optimization epochs of unsupervised learning. + +Table 6. No-reference HSI quality measurement score [26] of each method on the real HSI SR task. (The smaller the better) + +
MethodsNSSR [8]CMS [30]DIP [21]MHF-net [25]YONG [15]UAL
Score12.8411.5916.3611.1912.4710.98
+ +Table 7. Average runtime on CAVE dataset when SR scale $s$ is 32 and the degeneration is produced by ${\mathbf{k}}_{1}$ with 40db noise. + +
MethodsNSSR [8]CMS [30]DIP [21]MHF-net [25]YONG [15]UAL
Time (s)104.69301.71428.211.318.3644.21
+ +# 5. Conclusion + +In this study, we present an UAL framework for fusion-based HSI SR, which shows good generalization performance on different datasets and unknown degenerations. The model benefits from implicitly learning a deep image-specific prior as well as estimating the unknown degeneration. To this end, we first develop a two-stage SR network and pretrain the first stage in a supervised manner. Then, we introduce a simple degeneration network to assist learning the second stage for SR and the degeneration directly from the specific pair of observed images in unsupervised learning. Extensive experiments demonstrate the effectiveness of the proposed method. Moreover, it provides a promising way to generalize deep models to unseen cases in practice, which can be applied to other image restoration tasks, such as image denoising, deblurring etc. + +# 6. Acknowledgement + +This work was supported in part by the National Natural Science Foundation of China(No. 61671385), in part by the Science, Technology and Innovation Commission of Shenzhen Municipality(No.JCYJ20190806160210899). + +# References + +[1] Naveed Akhtar and Ajmal S Mian. Hyperspectral recovery from rgb images using gaussian processes. IEEE transactions on pattern analysis and machine intelligence, 2018. +[2] Naveed Akhtar, Faisal Shafait, and Ajmal Mian. Sparse spatio-spectral representation for hyperspectral image superresolution. In European Conference on Computer Vision, pages 63-78. Springer, 2014. +[3] Naveed Akhtar, Faisal Shafait, and Ajmal Mian. Bayesian sparse representation for hyperspectral image super resolution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3631-3640, 2015. +[4] Naveed Akhtar, Faisal Shafait, and Ajmal Mian. Hierarchical beta process with gaussian process prior for hyperspectral image super resolution. In European Conference on Computer Vision, pages 103-120. Springer, 2016. +[5] Rushil Anirudh, Jayaraman J Thiagarajan, Bhavya Kailkhura, and Timo Bremer. An unsupervised approach to solving inverse problems using generative adversarial networks. arXiv preprint arXiv:1805.07281, 2018. +[6] Ayan Chakrabarti and Todd Zickler. Statistics of real-world hyperspectral images. In CVPR 2011, pages 193-200. IEEE, 2011. +[7] Renwei Dian, Leyuan Fang, and Shutao Li. Hyperspectral image super-resolution via non-local sparse tensor factorization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5344-5353, 2017. +[8] Weisheng Dong, Fazuo Fu, Guangming Shi, Xun Cao, Jinjian Wu, Guangyu Li, and Xin Li. Hyperspectral image super-resolution via non-negative structured sparse representation. IEEE Transactions on Image Processing, 25(5):2337-2352, 2016. +[9] Netalee Efrat, Daniel Glasner, Alexander Apartsin, Boaz Nadler, and Anat Levin. Accurate blur models vs. image priors in single image super-resolution. In Proceedings of the IEEE International Conference on Computer Vision, pages 2832-2839, 2013. +[10] Charilaos I Kanatsoulis, Xiao Fu, Nicholas D Sidiropoulos, and Wing-Kin Ma. Hyperspectral super-resolution via coupled tensor factorization: Identifiability and algorithms. In 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 3191-3195. IEEE, 2018. +[11] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. +[12] Charis Lanaras, Emmanuel Baltsavias, and Konrad Schindler. Hyperspectral super-resolution by coupled spectral unmixing. In Proceedings of the IEEE International Conference on Computer Vision, pages 3586-3594, 2015. +[13] Jiaojiao Li, Xi Zhao, Yunsong Li, Qian Du, Bobo Xi, and Jing Hu. Classification of hyperspectral imagery using a new fully convolutional neural network. IEEE Geoscience and Remote Sensing Letters, 15(2):292-296, 2018. +[14] Shutao Li, Renwei Dian, Leyuan Fang, and José M Bioucas-Dias. Fusing hyperspectral and multispectral images via cou + +pled sparse tensor factorization. IEEE Transactions on Image Processing, 27(8):4118-4130, 2018. +[15] Yong Li, Lei Zhang, Chunna Tian, Chen Ding, Yanning Zhang, and Wei Wei. Hyperspectral image super-resolution extending: An effective fusion based method without knowing the spatial transformation matrix. In 2017 IEEE International Conference on Multimedia and Expo (ICME), pages 1117-1122. IEEE, 2017. +[16] Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th international conference on machine learning (ICML-10), pages 807–814, 2010. +[17] Nasser M Nasrabadi. Hyperspectral target detection: An overview of current and future challenges. IEEE Signal Processing Magazine, 31(1):34-44, 2013. +[18] Yi Peng, Deyu Meng, Zongben Xu, Chenqiang Gao, Yi Yang, and Biao Zhang. Decomposable nonlocal tensor dictionary learning for multispectral image denoising. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2949-2956, 2014. +[19] Ying Qu, Hairong Qi, and Chiman Kwan. Unsupervised s-parse dirichlet-net for hyperspectral image super-resolution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2511-2520, 2018. +[20] Radu Timofte, Shuhang Gu, Jiqing Wu, and Luc Van Gool. Ntire 2018 challenge on single image super-resolution: Methods and results. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 852-863, 2018. +[21] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep image prior. In 2018 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. +[22] Hien Van Nguyen, Amit Banerjee, and Rama Chellappa. Tracking via object reflectance using a hyperspectral video camera. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition-Workshops, pages 44-51. IEEE, 2010. +[23] Xintao Wang, Ke Yu, Chao Dong, and Chen Change Loy. Recovering realistic texture in image super-resolution by deep spatial feature transform. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 606-615, 2018. +[24] Eliot Wycoff, Tsung-Han Chan, Kui Jia, Wing-Kin Ma, and Yi Ma. A non-negative sparse promoting algorithm for high resolution hyperspectral imaging. In Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, pages 1409-1413. IEEE, 2013. +[25] Qi Xie, Minghao Zhou, Qian Zhao, Deyu Meng, Wangmeng Zuo, and Zongben Xu. Multispectral and hyperspectral image fusion by ms/hs fusion net. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1585-1594, 2019. +[26] Jingxiang Yang, Yongqiang Zhao, Chen Yi, and Jonathan Cheung-Wai Chan. No-reference hyperspectral image quality assessment via quality-sensitive features learning. Remote Sensing, 9(4):305, 2017. + +[27] Jingxiang Yang, Yong-Qiang Zhao, and Jonathan Chan. Hyperspectral and multispectral image fusion via deep two-branches convolutional neural network. Remote Sensing, 10(5):800, 2018. +[28] Fumihito Yasuma, Tomoo Mitsunaga, Daisuke Iso, and Shree K Nayar. Generalized assorted pixel camera: post-capture control of resolution, dynamic range, and spectrum. IEEE transactions on image processing, 19(9):2241-2253, 2010. +[29] Haichao Zhang, Yanning Zhang, Haisen Li, and Thomas S Huang. Generative bayesian image super resolution with natural image prior. IEEE Transactions on Image processing, 21(9):4054-4067, 2012. +[30] Lei Zhang, Wei Wei, Chengcheng Bai, Yifan Gao, and Yan-ning Zhang. Exploiting clustering manifold structure for hyperspectral imagery super-resolution. IEEE Transactions on Image Processing, 27(12):5969-5982, 2018. +[31] Lei Zhang, Wei Wei, Yanning Zhang, Chunhua Shen, Anton van den Hengel, and Qinfeng Shi. Cluster sparsity field: An internal hyperspectral imagery prior for reconstruction. International Journal of Computer Vision, 126(8):797-821, 2018. +[32] Lei Zhang, Wei Wei, Yanning Zhang, Chunna Tian, and Fei Li. Reweighted laplace prior based hyperspectral compressive sensing for unknown sparsity. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2274-2281, 2015. +[33] Maria Zontak and Michal Irani. Internal statistics of a single natural image. In CVPR 2011, pages 977-984. IEEE, 2011. \ No newline at end of file diff --git a/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/images.zip b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c46b9d57cf4aa98b8656a6a188a08d263d2e6020 --- /dev/null +++ b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e4133841a4c9b4071600e5d34d0fe66e37a689ea0b46d0f075ab8c62749af63 +size 906024 diff --git a/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/layout.json b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4dfdbace93a85eca7be779c403b9f76a98979348 --- /dev/null +++ b/unsupervisedadaptationlearningforhyperspectralimagerysuperresolution/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5efa774992cc9c51a8b86215e7a8513cd0d0e711b976b7bb6bd1b434df28ee7 +size 478445 diff --git a/unsuperviseddeepshapedescriptorwithpointdistributionlearning/f65ca5ea-cc08-4928-b30a-5415556a514d_content_list.json b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/f65ca5ea-cc08-4928-b30a-5415556a514d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ff1dad0c838b9355eadb1295d02c850bbcd5e3dd --- /dev/null +++ b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/f65ca5ea-cc08-4928-b30a-5415556a514d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:610d6b26dc24922e2c85c569e6335927fd8b7e47ebd7d581fedc8627bd98b619 +size 68229 diff --git a/unsuperviseddeepshapedescriptorwithpointdistributionlearning/f65ca5ea-cc08-4928-b30a-5415556a514d_model.json b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/f65ca5ea-cc08-4928-b30a-5415556a514d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0dcc690cad6a015fd908e253e7f2fb75d87a585c --- /dev/null +++ b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/f65ca5ea-cc08-4928-b30a-5415556a514d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77c714aa25472a5f3918e031cb797a2a191448ab011771c6abc2bf95be0c1010 +size 84745 diff --git a/unsuperviseddeepshapedescriptorwithpointdistributionlearning/f65ca5ea-cc08-4928-b30a-5415556a514d_origin.pdf b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/f65ca5ea-cc08-4928-b30a-5415556a514d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e34cd562de7cca2f2ccf83a44d29dbdba4088c6d --- /dev/null +++ b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/f65ca5ea-cc08-4928-b30a-5415556a514d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2383fe04e949829d2d87a549c917ae77bf09c4ad8076db0b0602a82310a9baa7 +size 1013898 diff --git a/unsuperviseddeepshapedescriptorwithpointdistributionlearning/full.md b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..14f639c09f32e2a9134498b358ead9f1f3a30832 --- /dev/null +++ b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/full.md @@ -0,0 +1,275 @@ +# Unsupervised Deep Shape Descriptor with Point Distribution Learning + +Yi Shi* Mengchen Xu* Shuaihang Yuan Yi Fang† NYU Multimedia and Visual Computing Lab New York University Abu Dhabi, Abu Dhabi, UAE New York University, New York, USA {yishi, jl8566, sy2366, yfang}@nyu.edu + +# Abstract + +Deep learning models have achieved great success in supervised shape descriptor learning for 3D shape retrieval, classification, and correspondence. However, the unsupervised shape descriptor calculated via deep learning is less studied than that of supervised ones due to the design challenges of unsupervised neural network architecture. This paper proposes a novel probabilistic framework for the learning of unsupervised deep shape descriptors with point distribution learning. In our approach, we firstly associate each point with a Gaussian, and the point clouds are modeled as the distribution of the points. We then use deep neural networks (DNNs) to model a maximum likelihood estimation process that is traditionally solved with an iterative Expectation-Maximization (EM) process. Our key novelty is that "training" these DNNs with unsupervised self-correspondence L2 distance loss will elegantly reveal the statically significant deep shape descriptor representation for the distribution of the point clouds. We have conducted experiments over various 3D datasets. Qualitative and quantitative comparisons demonstrate that our proposed method achieves superior classification performance over existing unsupervised 3D shape descriptors. In addition, we verified the following attractive properties of our shape descriptor through experiments: multi-scale shape representation, robustness to shape rotation, and robustness to noise. + +# 1. Introduction + +With recent advancements in range sensors and imaging technologies, 3D geometric data has been applied in a variety of applications[2, 32, 22, 47, 46]. It is therefore of great interest to develop methods that can automatically analyze a large amount of 3D geometric data for different tasks (e.g. + +![](images/24c9141e72daa7e1bff649a563a593962093fa4145ad04f562b21a7917afcce3.jpg) +Figure 1. The illustration of our proposed unsupervised descriptor learning method with 3D-GAN [37]. Comparing with 3D-GAN, Our proposed method does not require the generator and the discriminator while our framework extracts the shape descriptor only using a decoder. + +3D object recognition, classification, correspondence and retrieval) [4, 5, 3, 10, 41, 39, 37, 14, 18, 40, 38, 9]. To that end, a lot of efforts have been made, many of which focused on building robust 3D shape representations. However, the irregular property and the structural variation of 3D objects (i.e. 3D human models with different poses, 3D car models with various design patterns) pose great challenges on the task of learning a high-quality 3D shape descriptor. + +The promising performance of Deep Neural Networks (DNNs) in dealing with 2D images motivates 3D computer vision researchers to transform the 3D geometric data to Voxel grids in a regular format so that the 3D data can be fed to a deep net architecture [38] for further processing. While the extension of the deep learning to volumetric shapes is conceptually simple, the computational cost of 3D convolution severely limits the storage and computational efficiency in processing 3D geometric data for object recognition [30]. + +Given that the most common approaches for descriptor extraction are conducted in supervised learning, generative models such as 3DGAN [37] treads an uncharted territory where 3D shape descriptors can be generated in an unsupervised manner. Despite its good performance over various tasks, it still relies on 3D convolutional layers where the geometric information loss is inevitable given the necessity of the volumetric transformation. It also suffers from the restriction of its encoder and discriminator structure, since they are only specialized in feature extraction when faced with the shape categories encountered during training. A drop in the performance when processing out-of-category data is thus expected. + +In this paper, we propose a novel zero-shot unsupervised approach for learning an instance-level 3D shape descriptor. Firstly, we claim that a point cloud instance can be described by probability distributions where each point is represented by a Gaussian. With the aim of obtaining the distribution of points given a shape instance, in each epoch, we synthesize a new point cloud instance corresponding to the input point cloud. To elaborate on the synthesizing process, each point in the new point cloud is sampled from the 3D space of a multivariate Gaussian distribution defined with a fixed standard deviation $\sigma$ around the original point. Here we denote this process of point cloud synthesis as 3D Gaussian sampling. An encoder-free network is then leveraged to model a Maximum Likelihood Estimation process where the network learns to predict the parameters of the distribution while a shape descriptor is optimized to describe the geometric information. The L2 distance between the original 3D point cloud instance and the predicted instance will then be calculated to train the general decoder and shape descriptors for all training data. In order to generate the shape descriptor for any point cloud data, the exact same operation during the decoder training phase will be performed, except that the decoder will be fixed using the weights learned during the training phase. + +Our unsupervised encoder-free model is more versatile compared to other generative structures in two aspects: 1) It avoids the design of specific 3D feature encoder for irregular non-grid point cloud; 2) It frees our model from the limitation of the fixed encoder weights optimized for categories encountered during training. It enhances feature learning for unseen out-of-category data. Furthermore, with our auto-decoder network (mostly MLP structure), compared to complex GAN structures in [19, 37], our approach is able to generate the 3D shape descriptor efficiently in an unsupervised manner. Our contributions are summarized as followed: + +- A probabilistic representation that models the point clouds using Gaussian distributions. The shape descriptor of a point cloud instance can be revealed by solving the parameters of the distributions via a DNN. + +- An unsupervised shape descriptor learning mechanism from which shape descriptors that are robust to rotation and noise can be generated. +- A novel multi-scaled shape descriptor fusion technique that is able to represent an instance in a coarse-to-fine manner which enhances the performance of our descriptor in various tasks. + +# 2. Related Works + +# 2.1. Hand-Crafted 3D shape Descriptors + +3D shape descriptor is a succinct and compact representation of 3D objects that capture the geometric essence of a 3D object. Some existing shape descriptors have been developed to describe the 3D objects [20, 38, 30]. The earlier D2 shape distribution, statistical moments, Fourier descriptor, Light Field Descriptor, Eigenvalue Descriptor have been proposed to describe the 3D shape, particularly for rigid 3D objects. The Spin Image [45] was developed based on the dense collection of 3D points and surface normals. There are also feature histogram [45] and signatures of histogram shape descriptors developed based on the distribution of a type of statistical geometric properties. The efforts on robust 3D shape features are further developed by heat diffusion geometry. A global shape descriptor, named temperature distribution (TD) descriptor, is developed based on HKS information at a single scale to represent the entire shape [13]. Hand-crafted shape descriptors are often not robust enough to deal with structural variations and incompleteness present in 3D real-world models and are often not able to be generalized to data of different modality. + +# 2.2. Shape feature learning + +The bag-of-features (BOF) is first introduced to learn to extract a frequency histogram of geometric words for shape retrieval [11, 12, 21]. To learn global features, [15] adopted auto-encoder with the distribution of HKS learns a deformation-invariant shape descriptor. Recent development in deep learning motivates researchers to learn a 3D shape descriptor from a large-scale dataset using deep neural networks. However, to feed the 3D geometric data to neural networks, the 3D geometric data are often transformed into 3D Voxel grids or a collection of 2D projection images from different views. + +The volumetric representation plays an important role in the computer graphics community since the 1980s. It provides a uniform, simple and robust description to synthetic and measured objects and founds the basis of volume graphics [23]. In other words, a voxel is an extension of a pixel, and the binary volume is an extension of binary image. Recently, many researchers begin to develop 3D CNN on volumetric shapes. [38] voxelized the 3D shape into 3D grids + +![](images/41b665d923b82d40620e7dc8ad608d39e51f7b17bdbac85787098467c59ee65a.jpg) +Figure 2. The training process. We concatenate a randomly initialized vector $z$ to each point of the sampled instance shape. The L2 point distance loss between the decoded point set and the original point set will be calculated. During the decoder training phase, the loss will be back-propagated to update the shape descriptors and decoder simultaneously. During the descriptor generation phase, the loss will only be used to update the shape descriptors. + +and train a generative model for 3D shape recognition using convolutional deep belief networks. Similarly, [30] proposed a real-time 3D supervised learning architecture on volumetric 3D shapes. Apart from supervised CNN, [37] generate 3D objects from a probabilistic space by leveraging advances in volumetric CNNs and GANs, and the unsupervised features can be widely used in 3D object recognition. [33] proposed a 3D convolutional auto-encoder for recognizing 3D shape. + +Apart from the direct 3D representation, the 3D shapes can also be projected to 2D space. [34] proposed a multiview CNN for 3D shape recognition by using CNN to extract visual features from images with different views and employing max-pooling across views to learn one compact shape descriptor. The LFD [8] extract features from the light fields rendered from cameras on a sphere exhaustively to improve the robustness against rotations. [6] proposed a coding framework for constructing a compact descriptor based on a set of 2D views in the format of depth buffer rendered from each 3D object. + +# 2.3. Variational Auto-encoder + +A Variational Auto-encoder (VAE) [24] is another popular generative framework that learns a probability distribution $P(X)$ from a set of observations $\mathcal{X}$ . Suppose we have a random variable $X$ which represents a distribution. The VAE maps the distribution using an encoder with a prior distribution of $zP_{\phi}(z)$ , and a decoder $P_{\theta}(X|z)$ tries to capture the distribution of $X$ given $z$ . The encoder and decoder are trained simultaneously to maximize a lower bound on + +the log-likelihood of $\mathcal{X}$ . After training, Both the encoder mapping $Q_{\phi}(z|X)$ and the decoder mapping $P_{\theta}(X|z)$ are acquired. Instance generation and shape descriptor acquisition can then be achieved with the trained models. + +# 2.4. Adversial Networks based methods + +[17, 29] have shown the effectiveness of Generative Adversarial Networks (GAN), where a pair of neural networks jointly learn together by pursuing competing goals, the generator learns the mapping from a latent space to data distribution, while the discriminator learns to distinguish from ground truth data and the generated data. [37] extends the usage of GAN from 2D image to voxelized 3D grid. Its category specialized generator learns a mapping from a low-dimensional probabilistic space to 3D shape while its discriminator provides a powerful 3D shape descriptor. It can generate shape descriptors without supervision. + +# 3. Methods + +# 3.1. Problem Formulation + +Consider M point cloud instances in the Euclidean space $S = \{X_{i}\}_{i = 1,2,\ldots M}$ where each point cloud instance is a cluster of N points $X_{i} = \{x_{ji}\}_{j = 1,2,\ldots N}$ and $x_{ji}\in \mathbb{R}^3$ + +# 3.2. Point Distribution Representation + +In most applications, point clouds are either acquired via scanning sensors or sampled on the surface of a mesh file. Point clouds are thus born with a noisy and random nature. + +In pursuit of a robust representation, it's common to represent a point cloud with probability distributions. + +Aimed to simplify our probability distribution representation in a succinct yet expressive form, the distribution for a point $x_{ji} \in \mathbb{R}^3$ can be viewed as a multivariate Gaussian distribution parameterized with mean $\mu_{ji} \in \mathbb{R}^3$ that equals to the point coordinate and a constant covariance $\sigma^2 I$ , where $I \in \mathbb{R}^{3 \times 3}$ is an identity matrix. The point distribution is thus symmetric about the corresponding point coordinate and affected by a refinement parameter $\sigma$ . Its effect will be covered in Section 3.4. + +To describe the distribution of point $x_{ji}$ in an instance $X_{i}$ , a new point $x_{ji}'$ is synthesized by sampling from the Gaussian distribution centered around the corresponding original point during each epoch. After a number of epochs, a point distribution is expected to be well-presented given adequate samples have been observed. This Gaussian sampling procedure can also be viewed as an effective data augmentation technique which increases the diversity of data significantly. It is one of the crucial factors that empower our zero-shot learning model when faced with categories with few instances. Noted that each point distribution in $X_{i}$ is independent, the shape distribution of a sampled instance $X_{i}'$ can then be modeled naturally as the product of point distributions. + +$$ +P \left(X _ {i} ^ {\prime} | \theta\right) = \prod_ {j = 0} ^ {N} p \left(x _ {j i} ^ {\prime} | \theta\right) \tag {1} +$$ + +in which $p(x_{ji}|\theta) = p(x_{ji}|\mu_{ji}) = \frac{1}{(2\pi\sigma^2)^3} e^{-\frac{1}{2}\left\| \frac{x - \mu_{ji}}{\sigma}\right\|^2}$ . Considered that each point contributes to the geometric information of the entire point cloud instance, in order to evaluate a point cloud, we align the independent point distributions with the likelihood of an instance. Since our goal is to acquire a descriptor for an instance, we hope adequate geometric information can be learned by solving the parameters of distributions. Intuitively, such a problem is solved in a direct approach with Maximum Likelihood Estimation (MLE). + +$$ +\begin{array}{l} \theta^ {\mathrm {o p t i m a l}} = \underset {\theta} {\arg \max} P (X _ {i} ^ {\prime} | \theta) \\ = \arg \max _ {\theta} \sum_ {j = 0} ^ {N} \log \left(p \left(x _ {j i} ^ {\prime} \mid \theta\right)\right) \tag {2} \\ \end{array} +$$ + +where $\theta$ stands for distribution parameters that include all mean vectors of point distributions. Traditionally, an iterative optimization method, the Expectation-Maximization (EM) algorithm is used here. However, the accuracy and time cost of EM is hard to guarantee given its iterative nature. More importantly, we are unable to connect point distributions with a descriptor latent distribution from which + +the shape descriptors can be obtained. In contrast, we leverage DNNs to model such an MLE process in an unsupervised manner. + +# 3.3. Maximum Likelihood Estimation with Deep Neural Networks + +Unlike common approaches in recent proposed generative models [24, 37] that establishes a mapping from a possibility distribution to another distribution via encoding and decoding a hidden latent vector, our approach directly optimizes a hidden latent vector determines the mapping from a distribution to another distribution without the encoding-decoding process. It frees us from the restriction of encoder weights that are specialized with the training data, thus guaranteeing a better generalization ability on unseen data and categories. + +In essence, our model reveals the deep shape descriptor parameters through optimizing a latent encoding for restoration from distribution described by Gaussian sampled points to the original point. In the proposed model, a point cloud instance can be thought of as a distribution of distributions. More specifically, the distributions of points as a whole describe the distribution of shape, and the shape descriptor of the instance itself is thought of as a sample from a distribution of all shapes descriptors. For an original shape $X_{i}$ , a synthesized shape $X_{i}^{\prime}$ is created by Gaussian sampling in an iteration. The point coordinates in $X_{i}^{\prime}$ are $\{x_{ji}^{\prime}\}_{j = 1,2,\dots N}$ . Each individual shape encountered is assigned a descriptor $Z_{i}$ . The prior distribution $p(Z_{i})$ of the corresponding shape descriptor $Z_{i}$ is set as a Gaussian with zero-mean. The posterior distribution of a descriptor $Z_{i}$ given a synthesized point cloud instance $X_{i}^{\prime}$ with the point distribution parameters $\theta$ can be formulated as: + +$$ +P \left(Z _ {i} \mid X _ {i} ^ {\prime}, \theta\right) = p \left(Z _ {i}\right) \prod_ {j = 0} ^ {N} p \left(x _ {j i} ^ {\prime} \mid Z _ {i}, \theta\right) \tag {3} +$$ + +where $p(x_{ji}^{\prime}|Z_i,\theta)$ describes the independent point probability distribution of a Gaussian sample $x_{ji}^{\prime}$ given the shape descriptor and the original coordinate. As a large number of synthesized point generated, $P(Z_{i}|X_{i}^{\prime},\theta)\rightarrow P(Z_{i}|X_{i},\theta)$ as $X_{i}^{\prime}\to X_{i}$ , thus allowing $P(Z_{i}|X_{i}^{\prime},\theta)$ to be approximated to $P(Z_{i}|X_{i},\theta)$ . + +From the perspective of the pipeline, we split the descriptor learning into two major phases, decoder training phase and descriptor optimizing phase. Shape descriptors are treated as learnable parameters. Each descriptor is initialized from a zero-mean Gaussian and concatenated with point coordinates. The decoder $\mathcal{D}$ with weights $\theta$ then receives the latent-enhanced coordinates and guesses the mean of the corresponding point distribution as shown in Figure 2. An unsupervised self-correspondence loss will be calculated and optimize the learnable variables in the + +![](images/e9bf7b87a77e7ab0346a43289854e034849791792b67dd5bc2f4d90787e33d74.jpg) +Figure 3. Instances are sampled with standard deviation of different scales in purpose of generating coarse-to-fine descriptors. + +model. During the decoder training phase, we aim to optimize the weights $\theta$ of the decoder $\mathcal{D}$ . + +$$ +\theta^ {\text {o p t i m a l}}, \mathbf {Z} ^ {\text {o p t i m a l}} = \arg \min _ {\theta , \mathbf {Z}} \sum_ {i = 0} ^ {M} \sum_ {j = 0} ^ {N} \mathcal {L} \left(\mathcal {D} _ {\theta} \left(x _ {j i} ^ {\prime}, Z _ {i}\right), x _ {j i}\right) \tag {4} +$$ + +where $\mathbf{Z} = \{Z_{i}\}_{i = 1,\dots ,M}$ . During the shape descriptor optimization phase, all previously learned shape descriptors are discarded and the learned decoder weights are fixed. In each iteration, a single instance performs the exact same sampling sequence as in the decoder learning phase. Only the corresponding shape descriptor of the instance is optimized. + +$$ +\mathbf {Z} ^ {\text {o p t i m a l}} = \arg \min _ {\mathbf {Z}} \sum_ {i = 0} ^ {M} \sum_ {j = 0} ^ {N} \mathcal {L} \left(\mathcal {D} _ {\theta} \left(x _ {j i} ^ {\prime}, Z _ {i}\right), x _ {j i}\right) \tag {5} +$$ + +Euclidean Distance is chosen as our loss function in both phase since it is a more strict evaluation than other similarity metrics. For $A = \{a_i\}_{i=0}^N$ and $B = \{b_i\}_{i=0}^N$ , + +$$ +\mathcal {L} (\mathcal {A}, \mathcal {B}) = \sum_ {j = 0} ^ {N} | | a _ {j} - b _ {j} | | _ {2} \tag {6} +$$ + +# 3.4. Multi-scale Feature Descriptor + +In our setting, the only variable that affects the sampling process is the standard deviation $\sigma$ . The larger $\sigma$ is, the more likely the synthesized points are far away from the original location. To avoid disrupting the geometric information in an instance or sampling similar point multiple times, we determine a suitable global $\sigma$ value for a dataset by calculat- + +ing the mean of the distance between a point and its tenth-nearest-neighbor. We demonstrate in Table 1 that our simple approach improves on state-of-the-art results. + +However, it is still difficult for a network to learn shape features that contain information from local to global scales using samples synthesized by a single fixed $\sigma$ . If $\sigma$ is set too small compared to the average distance between points, the point distributions are "squeezed" into the centroids. A negligible loss can be achieved by simply predicting the input point coordinates as the mean of point distribution. In consequence, both the decoder and the shape descriptor are not effectively optimized. On the other hand, a $\sigma$ that is set too high disrupts the shape distribution. The delicate geometric details where the distances between points are smaller than $\sigma$ are utterly destroyed. The synthesized instances from similar categories will be indistinguishable. In order to overcome the obstacle, a multi-scale feature fusion is conducted here to take advantage of shape descriptors learned under distinctive $\sigma$ settings to represent coarse-to-fine shape information. + +Instead of generating only one descriptor using synthesized data from Gaussian with a fixed standard deviation, we calculated $N$ sets of shape descriptors $\{Z_i\}_{i=1}^M$ , each generated by data synthesized with a different standard deviation $\sigma$ . For each point in the point cloud, the distance between itself and its tenth-nearest-neighbor is computed and a histogram is plotted. Empirically, three different sets of standard deviation $\{\sigma_i\}_{i=1}^3$ are chosen where $\sigma_1$ equals to the mean of the lower 20% tenth-neighbor distance, $\sigma_2$ equals to the global mean, and $\sigma_1$ equals to the average distance of the upper 80%. Finally, we concatenate the descriptors of an instance as $[Z_1, Z_2, Z_3]$ to form a new shape descriptor for the corresponding point cloud set. As proved in the experiment, it achieves the best performance in the task of classification than other configurations. + +# 4. Experiments + +In this section, we first introduce our experimental settings including datasets and detailed network architectures. Then we prove that our proposed shape descriptors can be applied to 3D shape recognition tasks, and verify the improvements made by the multi-scaled feature representation. In addition, we demonstrate the reconstruction results and explore the effects of different $\sigma$ values on the outcome of the previous experiments. At last, we conduct quantitative experiments to validate the extra properties of our descriptors. + +# 4.1. Experiment settings + +Dataset: Two 3D shape datasets [7, 44] are utilized in our experiments. The ShapeNet dataset contains 15,011 instances in total while ModelNet40 includes 12,311 instances. We follow the training and testing configuration + +![](images/6c8aaeb98401c54bccc79dfb37ff945d27beb19961629fd5d9ea93c8b498e9e3.jpg) +Figure 4. Detailed structure of our decoder model + +mentioned in the classification experiment of [37]. Our general decoder is trained only with the seven major categories of ShapeNet and the testing of classification is performed on the shape descriptors generated on the full category of ModelNet40. In order to validate 3D point cloud reconstruction performance and verify the robustness of our descriptors to the disturbance of rotation/noise, training and testing are performed on the ShapeNet dataset. + +Architecture: We set the size of all shape descriptors as 128. As shown in Figure 4, a randomly initialized shape descriptor $z$ is concatenated with the coordinate of each point and sent into a decoder network. The network architecture of the decoder consists of multiple 1D convolutions and linear layers. Between each three 1D convolution layers, the output is concatenated again with the shape descriptor $z$ . The batch size during training is set as 64. During the descriptor optimization phase, each descriptor should only be conditioned by the loss of its own rather than an averaged loss within a batch, which inevitably leads to a batch size of "one". Layer Normalization layers are thus chosen over Batch Normalization in our network structure. As a result, only instance-level information is leveraged in our process of descriptor generation and it allows our model to generate per-instance shape descriptors in an online manner. In comparison, recent methods such as [27] require trans-instance comparisons and the performance relies deeply on the size of the target dataset. During the decoder training phase, the model is trained for 300 epochs. During the descriptor optimization phase, each descriptor is trained for 100 epochs. + +# 4.2. Unsupervised Shape Descriptor Evaluation + +We evaluate our shape descriptor by performing a classification task. For a direct and accurate comparison, we follow the same data settings as [37], and our network is trained with the seven major categories of ShapeNet. + +We then evaluate the generated feature descriptors on the benchmark ModelNet40 by training a simple MLP classifier. There are unsupervised approaches [19, 1, 43] where the networks are trained using the full 55 categories from the ShapeNet55 dataset that contains 57,000 shapes in total. Due to different data settings in the experiment, a direct comparison based on accuracy might not be most appropriate. Table 1 shows the performance comparison between our proposed approach and the state-of-the-art supervised and unsupervised methods. Our unsupervised shape representation outperforms the 3DGAN by scoring $84.7\%$ on ModelNet40. Considered that most of the categories from ModelNet are completely novel to our model, it demonstrates a great out-of-category generalization capability. + +
SupervisionMethodAccuracy
SupervisedMVCNN[35]90.1%
VoxNet[30]83.0%
PointNet++[31]90.7%
SO-Net[25]90.8%
PointCNN[26]92.2%
DGCNN[36]92.2%
Point2Sequence[28]92.6%
UnsupervisedT-L Network[16]74.4%
VConv-DAE[33]75.5%
3D-DescripNet[42]83.8%
3D-GAN[37]83.3%
Ours84.7%
+ +Table 1. Classification evaluation on ModelNet40. + +# 4.3. Multi-scaled Representation + +To verify the effectiveness of our coarse-to-fine multi-scaled descriptor, we compare its performance in classification with the shape descriptors optimized with a single $\sigma$ value. As is described in Section 3.4, the multiscaled descriptor is obtained by concatenating multiple sets of shape descriptors each trained with a different $\sigma$ value. + +Experiment Setup: In this section, we follow the official split of training and testing set of ShapeNet. However, only data belongs to the seven major categories are used during training. On the other hand, the evaluation is performed on the entire test set that includes the held-out categories. Three sets of shape descriptors and their corresponding decoders are trained with different $\sigma$ values. To determine suitable $\sigma$ values, we evaluate the unit density of point clouds sampled with 2048 points from the shape instances. We normalize the point clouds by feature scaling and calculate the distance from each point to its tenth nearest neighbor. Given the distance distribution calculated on ShapeNet, we select three $\sigma$ values 0.04, 0.08, and 0.12, with $\sigma = 0.08$ as the average tenth-nearest-neighbor + +![](images/f265990d2737e660b157eb64445c9fc73a2fc7a15385cfc9342a2e148d57d04b.jpg) +Figure 5. Reconstruction results of shape descriptors with $\sigma = 0.08$ on instances from ShapeNet + +distance of all instances. For each instance, the shape descriptors optimized using different $\sigma$ settings are then concatenated. + +Results: As is shown in Table 2, the multi-scaled shape descriptor $Z_{\text{concat}}$ outperforms all of the single-valued shape descriptors. It proves that our shape descriptor can be enhanced by multi-scale feature fusion with different $\sigma$ values. It is also worth noticing that $Z_{2}$ with $\sigma = 0.08$ achieves the highest accuracy, which indicates that our approach of selecting the optimal $\sigma$ value fits our feature learning model well. + +
Shape DescriptorσAccuracy
Z10.0491.4%
Z20.0894.3%
Z30.1292.9%
Zconcatmulti-scale96.2%
+ +Table 2. The classification evaluation of shape descriptors $Z_{1}$ , $Z_{2}$ , $Z_{3}$ trained with a single $\sigma$ value, and the multi-scale descriptor $Z_{\text{concat}}$ obtained by concatenating $Z_{1}$ , $Z_{2}$ , and $Z_{3}$ + +# 4.4. Reconstruction + +Our approach allows reconstructing point cloud from its sampled instance with the corresponding optimized shape descriptor. We examine the reconstruction results under different $\sigma$ settings and observe the results on instances from different categories. + +Experiment Setup: The reconstruction experiments are conducted under the same data settings explained in Section 4.3, we perform multiple experiments using instances sampled in normal distributions with standard deviation $\sigma$ + +![](images/4938e00852c67c00bdc3397f696bb6fc01830ac8d3a10bc370ccf5a8b19b5cb9.jpg) +Figure 6. Comparison between the shape reconstruction results with $\sigma = 0.04$ and $\sigma = 0.08$ on different categories. The bowl is a representative of point clouds with lower unit density, while the lamp represents point clouds with higher unit density. + +of 0.04 and 0.08. + +Results: As shown in Figure 5, our shape descriptor is able to achieve great reconstruction performance on out-of-category instances if $\sigma$ is set to 0.08. In Figure 6, items with complicated parts are reconstructed well under a relative small $\sigma$ setting but fails with a large $\sigma$ value. Interestingly, a bowl with few details does not have a satisfying reconstruction using the same decoder with a small $\sigma$ while that with a large $\sigma$ is more successful. The relative sensitivity of reconstruction qualities with respect to different choices of $\sigma$ is the main reason that we introduce the coarse-to-fine multi-scaled descriptor in Section 3.4. + +# 4.5. Robustness to Rotations + +Given that the proposed shape descriptors are learned from the mapping from the distribution of points to the + +![](images/0228cc19bc27a61db8477d5b5cce50f26f1588516b4ccd9224585a46e09663d7.jpg) +Figure 7. Rotation-Accuracy plot + +corresponding point origin, our approach is expected to be more robust to rotations than extracting geometric information directly from coordinates. This test intends to demonstrate the prowess of our model for classifying rotated shapes at different angles. + +Experiment Setup: We apply rotation along each axis from 0 to 45 degrees and do several experiments at an interval of 9 degrees. The rotated shape with 45 degrees along each axis is shown in Figure 7. We adopt the same data settings as described in Section 4.3. For each level of rotation, we leveraged the decoder that has been trained on the seven major categories, and repeat the evaluation on the rotated shapes from the test set. + +Results: The quantitative experimental results are plotted in Figure 7. As shown in the evaluation, our approach achieves an impressive level of performance when the rotation angle is within 20 degrees since the accuracy maintains above $93.0\%$ . When the shapes are rotated with 45 degrees, the accuracy drops by $2.3\%$ from the best performance with no rotation applied. Since rotation with 45 degrees at each axis has significantly changed the orientation of shapes, we can conclude that our model is robust to rotations. + +# 4.6. Resistance to Noise + +A good shape descriptor should also maintain consistency in classification performance over shapes perturbed with a certain amount of noise. In this part, we conduct experiments on noisy point clouds and assess the noise resistance quality by classifying shapes at different noise levels. Our decoder is capable of overcoming the noise affected data given enough samples with small random perturbation would not alter the distribution in a significant way. + +Experiment Setup: The experiment is carried out with the same data settings mentioned in Section 4.3. Descriptors corresponding to the noise-perturbed test instances are generated using the same decoder trained with the seven + +![](images/bcda3661fc44541d55f74fc35ce08e1ee7cea8fcc073902543c24cc17ece0e7e.jpg) +Figure 8. Noise-Accuracy plot, noise level stands for the standard deviation of a Gaussian distribution which is used to generate the translation vector to be applied on the original instances + +major categories. During the process, we perturb the point clouds by various levels of noise. For each point in the instance, we randomly move it by a translation vector that follows a Gaussian distribution with the mean of its coordinate and the standard deviation of 0.00, 0.02, 0.04, 0.06, and 0.08. We define the noise level as the standard deviation of the Gaussian distribution. + +Results: The quantitative experimental results are plotted in Figure 8. The performance of our descriptors is relatively consistent when the standard deviation of the Gaussian that represents the noise level is less than 0.04. With a greater level of noise applied to the shape, the categorical information is severely damaged and hardly recognizable even by humans. At this point, the classification becomes less meaningful, so we do not apply $\sigma$ values greater than 0.08. As shown in Figure 8, we can conclude that our shape descriptor is reasonably resistant to Gaussian noise perturbations. + +# 5. Conclusion + +In this paper, we introduced an alternative unsupervised method for calculating instance-level shape descriptors through modeling the Maximum Likelihood Estimation process with an encoder-free network. We proposed a multi-scaled descriptor fusion technique that can represent an instance in a coarse-to-fine manner which enhances the overall performance. In addition, we proved with experiments that our descriptors have outstanding properties of noise resistance and rotation invariance. + +# 6. Acknowledgement + +We would like to thank all reviewers for their insightful suggestions and efforts towards improving our manuscript. This work is partially supported by NYUAD Research Enhancement Fund (No.RE132). + +# References + +[1] P. Achlioptas, O. Diamanti, I. Mitlagkas, and L. J. Guibas. Learning representations and generative models for 3d point clouds. arXiv preprint arXiv:1707.02392v3, 2018. 6 +[2] A. Albarelli, E. Rodola, F. Bergamasco, and A. Torsello. A non-cooperative game for 3d object recognition in cluttered scenes. In International Conference on 3d Imaging, Modeling, Processing, Visualization and Transmission, pages 252-259, 2011. 1 +[3] S. Bai, X. Bai, Q. Tian, and L. J. Latecki. Regularized diffusion process on bidirectional context for object retrieval. IEEE Transactions on Pattern Analysis and Machine Intelligence, PP(99):1-1, 2018. 1 +[4] S. Bai, S. Sun, X. Bai, Z. Zhang, and Q. Tian. Improving context-sensitive similarity via smooth neighborhood for object retrieval. Pattern Recognition, 83:353 - 364, 2018. 1 +[5] S. Bai, Z. Zhou, J. Wang, X. Bai, L. J. Latecki, and Q. Tian. Automatic ensemble diffusion for 3d shape and image retrieval. IEEE Transactions on Image Processing, PP(99):1-1. 1 +[6] X. Bai, S. Bai, Z. Zhu, and L. J. Latecki. 3d shape matching via two layer coding. IEEE Transactions on Pattern Analysis and Machine Intelligence, 37(12):2361-2373, 2015. 3 +[7] A. X. Chang, T. Funkhouser, L. Guibas, P. Hanrahan, Q. Huang, Z. Li, S. Savarese, M. Savva, S. Song, H. Su, J. Xiao, L. Yi, and F. Yu. ShapeNet: An Information-Rich 3D Model Repository. Technical Report arXiv:1512.03012 [cs.GR], 2015. 5 +[8] D. Chen, X. Tian, Y. Shen, and M. Ouhyoung. On visual similarity based 3d model retrieval. In Computer Graphics Forum, pages 223-232, 2003. 3 +[9] J. Chen and F. Yi. Deep cross-modality adaptation via semantics preserving adversarial learning for sketch-based 3d shape retrieval. European Conference on Computer Vision (ECCV), 2018. 1 +[10] G. Dai, J. Xie, and Y. Fang. Deep correlated holistic metric learning for sketch-based 3d shape retrieval. IEEE Transactions on Image Processing (TIP), 2018. 1 +[11] M. Eitz, J. Hays, and M. Alexa. How do humans sketch objects? ACM Trans. Graph., 31(4):44-1, 2012. 2 +[12] M. Eitz, K. Hildebrand, T. Boubekeur, and M. Alexa. Sketch-based image retrieval: Benchmark and bag-of-features descriptors. IEEE transactions on visualization and computer graphics, 17(11):1624–1636, 2011. 2 +[13] Y. Fang, M. Sun, and K. Ramani. Temperature distribution descriptor for robust 3d shape retrieval. In Computer Vision and Pattern Recognition Workshops (CVPRW), pages 9-16. IEEE, 2011. 2 +[14] Y. Fang, J. Xie, and G. Dai. 3d deep shape descriptor. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 1 +[15] Y. Fang, J. Xie, G. Dai, M. Wang, F. Zhu, T. Xu, and E. Wong. 3d deep shape descriptor. In IEEE Conference on Computer Vision and Pattern Recognition, pages 2319-2328, 2015. 2 + +[16] R. Girdhar, D. F. Fouhey, M. Rodriguez, and A. Gupta. Learning a predictable and generative vector representation for objects. CoRR, abs/1603.08637, 2016. 6 +[17] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. 3 +[18] Z. H. M.-Y. L. S. B. B. H. Guandao Yang, Xun Huang. Pointflow: 3d point cloud generation with continuous normalizing flows. In Computer Vision and Pattern Recognition, pages 252-259, 2019. 1 +[19] Z. Han, M. Shang, Y. Liu, and M. Zwicker. View inter-prediction gan: Unsupervised representation learning for 3d shapes by learning global shape memories to support local view predictions. AAAI, 2019. 2, 6 +[20] V. Hegde and R. Zadeh. Fusionnet: 3d object classification using multiple data representations. 2016. 2 +[21] R. Hu and J. Collomosse. A performance evaluation of gradient field hog descriptor for sketch based image retrieval. Computer Vision and Image Understanding, 117(7):790-806, 2013. 2 +[22] S. Katz, G. Leifman, and A. Tal. Mesh segmentation using feature point and core extraction. Visual Computer, 21(8-10):649-658, 2005. 1 +[23] A. Kaufman, D. Cohen, and R. Yagel. Volume graphics. Computer, 26(7):51-64, 1993. 2 +[24] D. Kingma and M. Welling. Auto-encoding variational bayes. In Proceedings of the International Conference on Learning Representations (ICLR), 2015. 3, 4 +[25] J. Li, B. M. Chen, and G. H. Lee. So-net: Self-organizing network for point cloud analysis. The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 6 +[26] Y. Li, R. Bu, M. Sun, W. Wu, X. Di, and B. Chen. Pointcnn: Convolution on x-transformed points. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, pages 820-830. Curran Associates, Inc., 2018. 6 +[27] Z. Z. Ling Zhang. Unsupervised feature learning for point cloud by contrasting and clustering with graph convolutional neural network. 3DV, 04 2019. 6 +[28] X. Liu, Z. Han, Y.-S. Liu, and M. Zwicker. Point2sequence: Learning the shape representation of 3d point clouds with an attention-based sequence to sequence network. 2019. 6 +[29] D. Lowd and C. Meek. Adversarial learning. In Proceedings of the eleventh ACM SIGKDD international conference on Knowledge discovery in data mining, pages 641-647. ACM, 2005. 3 +[30] D. Maturana and S. Scherer. Voxnet: A 3d convolutional neural network for real-time object recognition. In IEEE/rsj International Conference on Intelligent Robots and Systems, pages 922–928, 2015. 1, 2, 3, 6 +[31] C. R. Qi, L. Yi, H. Su, and L. J. Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. Advances in Neural Information Processing Systems 30, pages 5099-5108, 2017. 6 + +[32] E. Rodola, A. M. Bronstein, A. Albarelli, F. Bergamasco, and A. Torsello. A game-theoretic approach to deformable shape matching. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 182-189. IEEE, 2012. 1 +[33] A. Sharma, O. Grau, and M. Fritz. Vconv-dae: Deep volumetric shape learning without object labels. In European Conference on Computer Vision, pages 236-250, 2016. 3, 6 +[34] H. Su, S. Maji, E. Kalogerakis, and E. Learned-Miller. Multiview convolutional neural networks for 3d shape recognition. December 2015. 3 +[35] H. Su, C. R. Qi, Y. Li, and L. J. Guibas. Render for cnn: Viewpoint estimation in images using cnns trained with rendered 3d model views. In The IEEE International Conference on Computer Vision (ICCV), December 2015. 6 +[36] Y. Wang, Y. Sun, Z. Liu, S. E. Sarma, M. M. Bronstein, and J. M. Solomon. Dynamic graph cnn for learning on point clouds. ACM Transactions on Graphics (TOG), 2019. 6 +[37] J. Wu, C. Zhang, T. Xue, W. T. Freeman, and J. B. Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In Advances in Neural Information Processing Systems, pages 82–90, 2016. 1, 2, 3, 4, 6 +[38] Z. Wu, S. Song, A. Khosla, F. Yu, L. Zhang, X. Tang, and J. Xiao. 3d shapenets: A deep representation for volumetric shapes. In IEEE Conference on Computer Vision and Pattern Recognition, pages 1912-1920, 2015. 1, 2 +[39] J. Xie, G. Dai, F. Zhu, E. Wong, and Y. Fang. Deepshape: Deep-learned shape descriptor for 3d shape retrieval. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2016. 1 +[40] J. Xie and Y. Fang. Learned binary spectral shape descriptor for 3d shape correspondence. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 1 +[41] J. Xie and Y. Fang. Learning barycentric representations of 3d shapes for sketch-based 3d shape retrieval. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 1 +[42] J. Xie, Z. Zheng, R. Gao, W. Wang, S. Zhu, and Y. Wu. Learning descriptor networks for 3d shape synthesis and analysis. The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 6 +[43] Y. Yang, C. Feng, Y. Shen, and D. Tian. Foldingnet: Point cloud auto-encoder via deep grid deformation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 3, 2018. 6 +[44] A. K. F. Y. L. Z. X. T. Z. Wu, S. Song and J. Xiao. 3D ShapeNets: A Deep Representation for Volumetric Shapes. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 5 +[45] A. Zeng, S. Song, M. Nießner, M. Fisher, J. Xiao, and T. Funkhouser. 3dmatch: Learning local geometric descriptors from rgb-d reconstructions. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2 +[46] F. Zhu and Y. Fang. Heat diffusion long-short term memory learning for 3d shape analysis. European Conference on Computer Vision (ECCV), 2016. 1 + +[47] J. Zhu and Y. Fang. Learning object-specific distance from a monocular image. The IEEE International Conference on Computer Vision (ICCV), October 2019. 1 \ No newline at end of file diff --git a/unsuperviseddeepshapedescriptorwithpointdistributionlearning/images.zip b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9291308d5903f12b814c22c503a754d4f079256e --- /dev/null +++ b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:772bc7ed6ea9a0663873b1566e3e79f24e904aa0e3e453b626825458faeef69f +size 379375 diff --git a/unsuperviseddeepshapedescriptorwithpointdistributionlearning/layout.json b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..16cdbb93eeca1797d8b2b68252114dde3dec96fb --- /dev/null +++ b/unsuperviseddeepshapedescriptorwithpointdistributionlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92bff693d026564e0deb223eee1b168f000f539c9f83f63600dccf04d0f3abcb +size 354867 diff --git a/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/5de02fa6-be18-416a-b163-d3b42c6b37f2_content_list.json b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/5de02fa6-be18-416a-b163-d3b42c6b37f2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..558bfbe003ae68d65fea60ef5e085c4f8ab80609 --- /dev/null +++ b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/5de02fa6-be18-416a-b163-d3b42c6b37f2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86ae722c94c03eac43fc3772f0fb65e6ae69a23ecb9307a881aee75f54a592e2 +size 84122 diff --git a/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/5de02fa6-be18-416a-b163-d3b42c6b37f2_model.json b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/5de02fa6-be18-416a-b163-d3b42c6b37f2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a7f79b7238f96b2d45f11ba75e68325c184ecc3b --- /dev/null +++ b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/5de02fa6-be18-416a-b163-d3b42c6b37f2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e681f7516e74c35a710ef8317d8f2520ff6337f2aac5f557339230b3742bbd9f +size 102252 diff --git a/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/5de02fa6-be18-416a-b163-d3b42c6b37f2_origin.pdf b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/5de02fa6-be18-416a-b163-d3b42c6b37f2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bbdcbae98f6c31277e96f91d778792ae09cc7143 --- /dev/null +++ b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/5de02fa6-be18-416a-b163-d3b42c6b37f2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39e38b4bc956b54ffecf41515d52fe835f4dca9fcf78ef516a39baf18bce5beb +size 979445 diff --git a/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/full.md b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2efe1469c3b3494a7f5d3e65ae89e8d383b03d16 --- /dev/null +++ b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/full.md @@ -0,0 +1,360 @@ +# Unsupervised Domain Adaptation with Hierarchical Gradient Synchronization + +Lanqing $\mathbf{H}\mathbf{u}^{1,2}$ Meina Kan1,2 Shiguang Shan1,2,3 Xilin Chen1,2 + +1 Key Lab of Intelligent Information Processing of Chinese Academy of Sciences (CAS), Institute of Computing Technology, CAS, Beijing 100190, China + +$^{2}$ University of Chinese Academy of Sciences, Beijing 100049, China + +$^{3}$ CAS Center for Excellence in Brain Science and Intelligence Technology, Shanghai, 200031, China + +lanqing.hu@vip1.ict.ac.cn {kanmeina,sgshan,xlchen}@ict.ac.cn + +# Abstract + +Domain adaptation attempts to boost the performance on a target domain by borrowing knowledge from a well established source domain. To handle the distribution gap between two domains, the prominent approaches endeavor to extract domain-invariant features. It is known that after a perfect domain alignment the domain-invariant representations of two domains should share the same characteristics from perspective of the overview and also any local piece. Inspired by this, we propose a novel method called Hierarchical Gradient Synchronization to model the synchronization relationship among the local distribution pieces and global distribution, aiming for more precise domain-invariant features. Specifically, the hierarchical domain alignments including class-wise alignment, groupwise alignment and global alignment are first constructed. Then, these three types of alignment are constrained to be consistent to ensure better structure preservation. As a result, the obtained features are domain invariant and intrinsically structure preserved. As evaluated on extensive domain adaptation tasks, our proposed method achieves state-of-the-art classification performance on both vanilla unsupervised domain adaptation and partial domain adaptation. + +# 1. Introduction + +The general hypothesis of machine learning is that the training and testing data share similar distribution, which makes the model trained on a large scale labeled data perform well on the test data. However, in many real world applications, we usually only have access to limited amount of labeled training data sharing similar distribution with the testing data, which is insufficient for training a good enough model. Domain adaptation has shown promising effect on such a challenge by borrowing knowledge from a sophisticated set (i.e., source domain) which has a large number of + +labeled data but lies in a different distribution with the test data (i.e., target domain). + +According to the scale of labeled data in target domain, domain adaptation can be categorized into supervised, semi-supervised and unsupervised domain adaptation. This paper mainly concentrates on the unsupervised domain adaptation where there is only unlabeled data in target domain. Most existing works deal with the domain adaptation problem by alleviating marginal distribution discrepancy (i.e., the distribution of data $X$ ) or conditional distribution discrepancy (i.e., distribution of data $X$ given classes labeled with $Y$ ). Besides, there are also some works attempting to tackle both the marginal and conditional distribution simultaneously. + +In the early days, most methods endeavor to align the marginal distribution of source and target domains by using instance re-weighting, such as sample selection bias [45, 7, 19] and co-variate shift [39, 1]. These approaches are suitable for those scenarios where the source and target domains share the same support, thus they cannot achieve satisfactory performance in the wild scenarios. + +For better handling the complicated scenarios, the common subspace methods focusing on extracting domain invariant representation came up [14, 13, 37, 12, 38]. These methods mainly attempt to minimize the gap between marginal distributions of two domains. In the approach of Geodesic Flow Kernel (GFK) [13], an infinite number of the subspaces is integrated to model domain shift between source and target domain. In [12], a set of landmarks, i.e., a subset of labeled data from the source domain that have the most similar distribution as the target domain, are uncovered to bridge the source and target domain. The methods proposed in [24] and [28] embed deep features into Reproducing Kernel Hilbert spaces (RKHS) and minimize the maximum mean discrepancy (MMD) of the features for distribution adaptation. JGSA [46] and PUnDA [11] mitigate the geometrical structure gap and distribution shift jointly. The method in [48] handles the domain shift by aligning the + +![](images/49f969ff369be8f0eb7af17841f768d33996e7f23bae7e01d3df0b9c8b38c629.jpg) +(a) Local misalignment + +![](images/a25a311cdc534d1987ca4a17a31d883778e62527b63bbac0727d6518bcec03ac.jpg) +(b) Expected consist alignment +Figure 1. Illustration of (a) local misalignment in methods only with global distribution alignment, and (b) expected alignment on both global domain and local classes. Best viewed in color. + +RKHS covariance matrix across domains. + +In these conventional approaches, the distribution discrepancy is usually measured by the metrics like MMD, K-L divergence and Bregman divergence. Recently, the adversarial loss as a more powerful metric has caught a lot of attentions. The works in [9, 10, 41] handle the domain shift by augmenting a gradient reversal layer or employing adversarial objective on target domain features. As a result, the features confusing the domain classifier are generally domain invariant. Afterwards, many methods based on domain transformation via adversarial learning [40, 23, 22, 49, 35] attain quite promising performance on distribution alignment and domain invariant feature extraction. + +The above methods only consider the gap between marginal distributions of two domains. In other words, these methods only align the two domains globally, but without considering whether the alignment of local piece is correct or not. As a result, there may happen that two domains are well aligned, but the local pieces (e.g., categories) of two domains are mismatched as shown in Figure 1(a). + +In recent years, a few methods attempt to minimize the gap between conditional distributions (i.e., class-wise distribution) of two domains, for better alignment of the categories between two domains. Specifically, in WDAN [44], class-specific auxiliary weight for each class is introduced into the original MMD metric for utilizing the class prior on source and target domains. MADA [31] exploits multiple adversarial learning, one for each class, gaining much more performance improvement on target domain. Further, based on this multiple adversarial framework, CDAN [25] novelly designs multi-linear conditioning, i.e., conducting adversarial learning on the covariance between feature representations and classifier predictions, to implicitly align the conditional distribution of source and target domains, which + +handles the domain distribution alignment more elaborately. Similarly, the methods specialized for partial domain adaptation including SAN [2] and PADA [3] also show the advantages of considering class-wise distribution alignment. + +There are some other methods [26, 17, 36, 33, 5, 18, 30, 47] directly predict the category labels of unlabeled samples in target domain as pseudo labels during training process as pseudo-labels. With the pseudo category labels of target domain samples and those known true labels of source domain samples, the samples from distinct domains but the same category are implicitly pulled close to share the same distribution. In the proposed SymNets in [47], the domain discrimination and confusion are stacked upon the concatenated classifiers of source and target domains, thus facilitating the domain-level and category-level feature distribution confusion. MCDDA [34] and CAN [21] are both approaches concentrating on explicitly calibrating the category-level distribution of both domains. MCDDA [34] plays the minmax game between feature encoder and two different classifiers to optimize the decision boundary and then alleviate the intra-class domain discrepancy. CAN [21] explicitly minimizes the intra-class discrepancy and simultaneously maximizes the inter-class discrepancy between domains according to the labels of source and predicted labels of target domain. + +Generally, these recently proposed methods consider the alignment of both global distribution (domain-level) discrepancy and local distribution (category-level) discrepancy, thus achieving promising performance. However, in these methods the global alignment and local alignment are implemented in a separate manner, e.g., minimizing weighted sum of domain-level and category-level discrepancy [6, 31, 25]. As a result, the obtained results are only a trade-off of the global and local distribution alignment, and + +inconsistent distribution alignment still exists. + +As observed from Figure 1(b), in a perfect domain alignment, the calibration of local category and the global domain distribution are consistent, i.e. the calibration direction are roughly the same. To elaborately consider the intrinsic relation between local and global distribution alignment, in this work we propose a new method that can consistently align the local and global distribution by constraining the gradient of local and global alignment to be synchronous, referred to as Domain Adaptation with Hierarchical Gradient Synchronization (GSDA). + +Briefly, the contributions of this work are in two folds: (1) we propose a novel method that considers consistency of the global and local distribution alignment, to preserve the intrinsic structures of both domain distributions for better domain adaptation. To the best of our knowledge, it is the first work to explicitly model the intrinsic relation between global and local distribution alignment. (2) The consistency of the global and local distribution alignment is achieved by a newly designed a hierarchical gradient synchronization module. (3) This method achieves state-of-the-art classification accuracy in unsupervised domain adaptation and partial domain adaptation scenarios experimentally. + +# 2. Method + +For clear description, we first give some definitions. The labeled source domain images and the unlabeled target domain images are denoted as $X^{s} = \{(x_{i}^{s},y_{i}^{s})\}_{i = 1}^{n}$ and $X^{t} = \{x_{j}^{t}\}_{j = 1}^{m}$ , respectively. In unsupervised domain adaptation, the source and target domains, i.e., $X^{s}$ and $X^{t}$ , generally follow different distributions but share the same categories. The samples in source domain are labeled, with category label denoted as $y_{i}^{s}\in C^{s} = \{1,2,\dots ,r\}$ , while the samples in the target domain are unlabeled. In the unsupervised domain adaptation the source and target domains share exactly the same categories, i.e., $C^t = C^s$ , where $C^t$ and $C^s$ are $r$ classes in target and source domains. There is also a special scenario where the $C^t$ is a subset of $C^s$ , i.e., $C^t\subset C^s$ , called as partial unsupervised domain adaptation. Our method is applicable for both unsupervised domain adaptation and partial unsupervised domain adaptation. For easier understanding we introduce the formulation in the scenario of unsupervised domain adaptation, while evaluate both tasks in the experiments section. Unless otherwise specified, the symbols $s$ and $t$ used in the superscript or subscript denote the source domain and target domain, respectively. + +The whole framework of our method is shown in Figure 2, which is equipped with a feature extractor $\mathcal{E}$ , an object classifier $\mathcal{C}$ and three types of adversarial discriminators $\mathcal{D} = \{\mathcal{D}^{dom}, \mathcal{D}^{grp}, \mathcal{D}^{cls}\}$ . Here, $\mathcal{D}^{dom}$ denotes the adversarial discriminator for globally domain distribution alignment, namely, the domain-level alignment. $\mathcal{D}^{cls}$ denotes + +adversarial discriminators for locally class-wise distribution alignment. And $\mathcal{D}^{grp}$ represents adversarial discriminators for group-wise alignment where each group is composed of several classes. The feature extractor $\mathcal{E}$ is fed with both the source and target domain data and outputs the features $f$ which are expected to be domain invariant. Afterwards, the features are fed into the classifier $\mathcal{C}$ for classification and also into the adversarial discriminators $\mathcal{D}$ for domain shift reduction. The feature extractor $\mathcal{E}$ and the discriminators $\mathcal{D}$ play a two-player min-max game to make the features from $\mathcal{E}$ domain invariant. In other words, the features from $\mathcal{E}$ should be domain invariant if they successfully fool the domain discriminators $\mathcal{D}$ . + +# 2.1. Feature Extraction and Classification + +The feature extractor $\mathcal{E}$ encodes the input source or target samples $x^{s}$ and $x^{t}$ into a common feature space as follows: + +$$ +f ^ {s} = \mathcal {E} (x ^ {s}), f ^ {t} = \mathcal {E} (x ^ {t}), \tag {1} +$$ + +where $\mathcal{E}$ can be any kind of network architecture such as several successive convolutional layers. Then $f\in \{f^s,f^t\}$ is fed into the classifier $\mathcal{C}$ to ensure feature $f$ to be discriminative. The parameter of feature extractor $\mathcal{E}$ and classifier $\mathcal{C}$ are denoted as $\theta_{\mathcal{E}}$ and $\theta_{\mathcal{C}}$ , respectively. The output of object classifier $\mathcal{C}$ is denoted as below: + +$$ +p _ {i} ^ {s} = \mathcal {C} \left(f _ {i} ^ {s}\right), p _ {j} ^ {t} = \mathcal {C} \left(f _ {j} ^ {t}\right), \tag {2} +$$ + +where $p_i^s$ is the softmax output of $\mathcal{C}$ with $x_i^s$ as input, and $p_j^t$ is the softmax output of $\mathcal{C}$ with $x_j^t$ as input. Considering that true category labels are available for source domain, the cross entropy loss of classification is directly applied and formulated as below: + +$$ +L _ {c} ^ {s} = \sum_ {x _ {i} ^ {s} \in X ^ {s}} H \left(\mathcal {C} \left(\mathcal {E} \left(x _ {i} ^ {s}\right)\right), y _ {i} ^ {s}\right), \tag {3} +$$ + +where $H(\cdot ,\cdot)$ represents the cross entropy loss. + +For target domain samples, the category labels are unavailable, and thus conventional cross entropy loss is inapplicable. Therefore, following [15], the conditional entropy loss is exploited to enhance the certainty of prediction, i.e., force only one element in $p_j^t$ to be dominant while the rest suppressed. Formally, the conditional entropy loss $L_c^t$ for unlabeled target domain samples is as below: + +$$ +L _ {c} ^ {t} = \sum_ {x _ {j} ^ {t} \in X ^ {t}} \hat {H} \left(\mathcal {C} \left(\mathcal {E} \left(x _ {j} ^ {t}\right)\right)\right), \tag {4} +$$ + +where $\hat{H} (\cdot)$ is the conditional entropy loss with $\hat{H} (p_j^t) = -\sum_{k = 1}^{r}p_j^t (k)\log p_j^t (k)$ . The $k^{th}$ element $p_j^t (k)$ in $p_j^t$ indicates the probability of $x_{j}^{t}$ being assigned to the $k^{th}$ class. + +![](images/6e868e76603d338dbae6fe559a1ee939c0171c54948c013171c41e5888fc5610.jpg) +Figure 2. Illustration of the overall framework of our GSDA method. An input sample $x_{i}$ from source or target domain is firstly encoded by the common feature extractor $\mathcal{E}$ . Based on the extracted feature, the classifier $\mathcal{C}$ is designed for object classification, and the adversarial discriminators including $\mathcal{D}^{dom}$ , $\mathcal{D}^{grp}$ and $\mathcal{D}^{cls}$ are designed for distribution alignment from perspective of domain-level, group-level and category-level respectively. Furthermore, a hierarchical gradient synchronization between the three types of adversarial discriminators is constructed to constrain the consistency between global and local alignment for better structure preservation. Best viewed in color. + +Overall, the object classification loss of both domains is obtained as below: + +$$ +L ^ {c} = L _ {c} ^ {s} + \alpha L _ {c} ^ {t}, \tag {5} +$$ + +constraining the common feature $f$ to be discriminative, benefitting the classification task. + +# 2.2. Domain Distribution Alignment + +Besides the categorical discriminability, the feature $f$ from $\mathcal{E}$ should be also domain invariant to potentiate knowledge transfer from source domain to target domain. In a perfect domain-invariant feature space, not only the global structure of both domains but also any local piece such as every group or even every class should be well aligned. Aiming for this goal, three types of adversarial discriminators are introduced for domain-level, group-level, and class-level distribution alignment respectively. Furthermore, the consistency of the three types of alignment are constrained by a novel hierarchical gradient synchronization module. This synchronization module ensures the alignment of any local piece is consistent with the global alignment structure, leading to a more informative domain alignment. + +Global Adversarial Discriminator The global adversarial discriminator, i.e., domain-level adversarial discriminator $\mathcal{D}^{dom}$ is designed to distinguish the source domain from target domain with cross entropy loss as follows: + +$$ +L ^ {g} = \sum_ {\substack {x _ {i} \in X ^ {s} \cup X ^ {t}}} H \left(\mathcal {D} ^ {d o m} \left(\mathcal {E} \left(x _ {i}\right)\right), d _ {i}\right), w i t h \tag{6} +$$ + +$$ +d _ {i} = \left\{ \begin{array}{l l l} 1, & i f & x _ {i} \in X ^ {s}, \\ 0, & i f & x _ {i} \in X ^ {t}, \end{array} \right. +$$ + +where $d_{i}$ represents the domain label of each sample $x_{i}$ . + +By playing min-max adversarial optimization between $\mathcal{E}$ and this discriminator $\mathcal{D}^{dom}$ whose parameter is denoted as $\theta_{\mathcal{D}^{dom}}$ , the whole distributions of two domains from $\mathcal{E}$ will become nonseparable globally. + +Local Adversarial Discriminators Even if the global distribution is well aligned, the distribution of each class in two domains may be misaligned as shown in Figure 1(a), e.g., the $i^{th}$ category of source domain may be aligned to $k^{th}(i \neq k)$ category of target domain although the two domains are globally well aligned. This is because that the global domain migration constraint merely considers the whole domain discrepancy but not the discrepancy in any local piece. Therefore, the local adversarial discriminators are established to deal with the distribution discrepancy in local regions of source and target domains, which consist of two kinds of local adversarial discriminators: class-wise ones and group-wise ones. + +Firstly and straightforwardly, class-wise adversarial discriminators are constructed to tackle the discrepancy within each category between the source and target domain, i.e., the $i^{th}$ category of source domain should be aligned to the $i^{th}$ category of target domain rather than other categories in target domain. Formally, the class-wise adversarial discriminator for the $k^{th}$ category is denoted as $\mathcal{D}_k^{cls}$ and its domain discrimination loss is formulated as follows: + +$$ +L _ {k} ^ {c l s} = \sum_ {x _ {i} \in X ^ {s} \cup X ^ {t}} p _ {i} ^ {k} H \left(\mathcal {D} _ {k} ^ {c l s} \left(\mathcal {E} \left(x _ {i}\right)\right), d _ {i}\right), \quad w i t h \tag {7} +$$ + +$$ +d _ {i} = \left\{ \begin{array}{l l l} 1, & i f & x _ {i} \in X ^ {s} \\ 0, & i f & x _ {i} \in X ^ {t}, \end{array} \right. \tag {7} +$$ + +where $d_{i}$ is the domain label, similar with that in global adversarial discriminator, $k\in \{1,2,\dots ,r\}$ denotes the index of $k^{th}$ class-wise adversarial discriminator and $p_i^k$ is the loss weight of sample $x_{i}$ representing its probability of belonging to $k^{th}$ class, i.e., the $k^{th}$ dimension output of $p_i^s$ and $p_i^t$ in Equation (2). Note that if $x_{i}\in X^{s}$ and it belongs to the $k^{th}$ class, $p_i^k = 1$ and $p_i^j |_{j\neq k} = 0$ because the label of $x_{i}\in X^{s}$ is definite. While for $x_{i}\in X^{t}$ , as its label is unavailable, the corresponding $p_i^k$ is the predicted probability of $x_{i}\in X^{t}$ to be classified into the $k^{th}$ class by classifier $C$ in Equation (2). + +Likewise, by playing min-max adversarial optimization + +with the objective above, the distribution of two domains is well aligned for each category. The parameter of each class-wise local discriminator $\mathcal{D}_k^{cls}$ is denoted as $\theta_{\mathcal{D}^{cls}}$ + +Besides each class, any local group consisting of several classes should be also well aligned in a perfect domain alignment. Thus, the local alignment can be reinforced by establishing group-level adversarial discriminators. Similar as the class-wise adversarial discriminators, the group-wise adversarial discriminators $\mathcal{D}_q^{grp}$ for the $q^{th}$ group with domain discrimination loss is formulated as follows: + +$$ +\begin{array}{l} L _ {q} ^ {\text {g r p}} = \sum p _ {i} ^ {q} H \left(\mathcal {D} _ {q} ^ {\text {g r p}} \left(\mathcal {E} \left(x _ {i}\right)\right), d _ {i}\right), w i t h \\ x _ {i} \in X ^ {s} \cup X ^ {t} \\ d _ {i} = \left\{ \begin{array}{l l l} 1, & i f & x _ {i} \in X ^ {s} \\ 0, & i f & x _ {i} \in X ^ {t}, \end{array} \right. \tag {8} \\ \end{array} +$$ + +where $q \in \{1, 2, \dots, b\}$ denotes the index of $q^{th}$ group-wise adversarial discriminator, the $p_i^q$ denotes the probability of $x_i$ belonging to the $q^{th}$ group. The groups here are simply achieved as random divisions of all classes that are defined in Equation (7). Correspondingly, the category grouping probability of the $q^{th}$ group $p_i^q$ can be easily obtained as $p_i^q = \sum_{k \in q} p_i^k$ . Generally, the classes in different groups are allowed to overlap with each other, while in this work all groups are simply randomly divided without overlap. What is worth mentioning is that, when the number of classes is large, these groups could be hierarchically structured groups rather than flat structured ones. + +Similarly, by playing min-max adversarial optimization with the objective above, the distribution of two domains is well aligned locally in each group. The parameter of each group-wise local discriminator $\mathcal{D}_q^{grp}$ is denoted as $\theta_{\mathcal{D}_k^{cls}}$ . The parameter of each group-wise local discriminator $\mathcal{D}_q^{grp}$ is denoted as $\theta_{\mathcal{D}^{grp}}$ . + +Then the overall parameters of all discriminators are denoted as $\theta_{\mathcal{D}} = \{\theta_{\mathcal{D}^{dom}},\theta_{\mathcal{D}^{cls}},\theta_{\mathcal{D}^{grp}}\}$ . By summing up all the local adversarial discriminators, the objective for local distribution alignment is obtained as: + +$$ +L ^ {l} = \sum_ {q = 1} ^ {s} L _ {q} ^ {\text {g r p}} + \sum_ {k = 1} ^ {r} L _ {k} ^ {\text {c l s}}, \tag {9} +$$ + +where $b$ stands for the number of groups and $r$ represents the number of classes. + +Overall, the three types of distribution alignment including domain-level, group-wise, and class-wise domain distribution alignment form a hierarchical aligning structure, aiming for better alignment between source and target domains globally as well as locally. + +# 2.3. Hierarchical Gradient Synchronization + +The preceding global and local adversarial discriminators deal with the distribution alignment between domains from global and local perspective, but in an independent manner. This may cause inconsistency among the global + +![](images/33e35a28e6d236bb458d4c643bbb2cf4f01bdc3008f8a6a70573921eef18a442.jpg) +Figure 3. Illustration of the hierarchical distribution alignments and hierarchical gradient synchronization among them. + +and local alignments, which would compromise the aligning direction of global and local alignment leading to inaccurate distribution alignment. + +Actually, in a perfect global alignment, any local piece should be also well aligned, or vice versa: a perfect alignment of each local piece also forms an optimal global alignment. Specifically, the aligning direction and magnitude of each local piece should be consistent with that of the whole domain. So intuitively the consistency between the global and local domain alignment could be used to verify if two domains are well aligned or not. In return, it would benefit the domain alignment if this consistency is formulated into the process of distribution alignment. With this in mind, a novel constraint on the gradient is designed as the Hierarchical Gradient Synchronization term, which is presented in Figure 3 and specifically formulated in Equations (10) and (11) below. + +Specifically, Hierarchical Gradient Synchronization consists of gradient synchronization among the three levels of adversarial discriminators, i.e., domain-level, group-level, and class-level discriminators, forming a hierarchical manner. The gradient synchronization between class-wise alignment and group-wise alignment is designed as below: + +$$ +L _ {g r p \sim c l s} ^ {s y n} = \left| \sum_ {\substack {x _ {i} \in \\ X ^ {s} \cup X ^ {t}}} \left\| \frac {\partial L _ {q} ^ {g r p}}{\partial \mathcal {E} (x _ {i})} \right\| _ {2} - \sum_ {k \in g r p _ {q}} \sum_ {\substack {x _ {i} \in \\ X ^ {s} \cup X ^ {t}}} \left\| \frac {\partial L _ {k} ^ {c l s}}{\partial \mathcal {E} (x _ {i})} \right\| _ {2} \right|. \tag{10} +$$ + +The gradient synchronization objective in the above Equation (10) attempts to make the magnitude of the aligning direction of each group to be consistent with the sum of that of each class within this group. Here, the first term denotes the gradient magnitude of discriminator for the $q^{th}$ group, and the second term denotes the gradients magnitude of discriminators for each class in $q^{th}$ group in the domain. Note that here we only use constraint on magnitude as it can affect both the direction and magnitude, while the sum of gradients direction will neutralize the difference. Note that in the second term, $x_{i}\in X^{s}\cup X^{t}$ still means the samples from the $k^{th}$ class because the sampling probability is + +included in $L_{k}^{cls}$ + +Similarly, the gradient synchronization between groupwise and the whole domain alignment is formulated as follows: + +$$ +L _ {d o m \sim g r p} ^ {s y n} = \left| \sum_ {\substack {x _ {i} \in \\ X ^ {s} \cup X ^ {t}}} \left| \left| \frac {\partial L ^ {g}}{\partial \mathcal {E} (x _ {i})} \right| \right| _ {2} - \sum_ {q = 1} ^ {b} \sum_ {\substack {x _ {i} \in \\ X ^ {s} \cup X ^ {t}}} \left| \left| \frac {\partial L _ {q} ^ {g r p}}{\partial \mathcal {E} (x _ {i})} \right| \right| _ {2} \right|, \tag{11} +$$ + +where the first term denotes the gradients magnitude of discriminator for the whole domain, and the second term denotes the gradients magnitude of discriminators for each group. Note that in the second term, $x_{i} \in X^{s} \cup X^{t}$ still means the samples from the $q^{th}$ group because the sampling probability is included in $L_{q}^{grp}$ . + +Note that although Equations (10) and (11) are the losses with regard to the gradients, they are first-order derivatives optimization rather than second-order ones which is efficient. This is because that the gradients in Equations (10) and (11) are with regard to the input features, but not with regard to the network parameters. + +Afterwards, piling all the layers together, the overall 3-layer hierarchical gradient synchronization constraint is naturally obtained as below: + +$$ +L ^ {s y n} = \frac {1}{b} \sum_ {q = 1} ^ {b} L _ {g r p \sim c l s} ^ {s y n} + L _ {d o m \sim g r p} ^ {s y n}. \tag {12} +$$ + +With this constraint, the directions and magnitude of gradient descent for both global and local alignment are expected to be kept in synchronization with each other. As a result, the distributions of two domains can be aligned more accurately. + +With the global alignment, local alignment, and gradient synchronization defined in Equations (6), (9) and (12), the overall objective function of the discriminators $\mathcal{D}$ is finally formulated as follows: + +$$ +L ^ {d} = L ^ {g} + L ^ {l} + \beta L ^ {\text {s y n}}. \tag {13} +$$ + +With the objective in above Equation (13), the source and target domain are aligned globally and locally, with consistency between the global and local distribution alignment. As a result, the two domains are well aligned and also the discriminative structure are well preserved. + +# 2.4. Overall Objective and Optimization + +The overall objective function is optimized by alternatively optimizing $\{\mathcal{E},\mathcal{C}\}$ and $\mathcal{D}$ following the adversarial learning mechanism, which are detailed in the following. + +Given $\{\mathcal{E},\mathcal{C}\}$ , the adversarial discriminators $\mathcal{D}$ are optimized to distinguish the source domain from target domain by minimizing the domain discrimination loss: + +$$ +\min _ {\theta_ {\mathcal {D} ^ {g}}, \theta_ {\mathcal {D} ^ {l}}} L ^ {d} = L ^ {g} + L ^ {l} + \beta L ^ {s y n}, \tag {14} +$$ + +with the parameters updated as below: + +$$ +\begin{array}{l} \theta_ {\mathcal {D} ^ {g}} \leftarrow \theta_ {\mathcal {D} ^ {g}} - \eta \frac {\partial (L ^ {g} + \beta L ^ {s y n})}{\partial \theta_ {\mathcal {D} ^ {g}}}, \\ \theta_ {\mathcal {D} _ {k} ^ {l}} \leftarrow \theta_ {\mathcal {D} _ {k} ^ {l}} - \eta \frac {\partial \left(L ^ {l} + \beta L ^ {s y n}\right)}{\partial \theta_ {\mathcal {D} _ {k} ^ {l}}}, \tag {15} \\ \end{array} +$$ + +where $\eta$ is the learning rate. + +Given $\mathcal{D}$ , the feature extractor $\mathcal{E}$ and classifier $\mathcal{C}$ are optimized to make the features from $\mathcal{E}$ are discriminative and domain invariant. This is achieved by minimizing the object classification loss and confusing the adversarial discriminators by the min-max game as follows: + +$$ +\min _ {\theta_ {C}, \theta_ {\mathcal {E}}} \left(L ^ {c} + \beta L ^ {s y n} - \left(L ^ {g} + L ^ {l}\right)\right), \tag {16} +$$ + +with the parameters updated as: + +$$ +\theta_ {\mathcal {C}} \leftarrow \theta_ {\mathcal {C}} - \eta \frac {\partial L ^ {c}}{\partial \theta_ {\mathcal {C}}}, +$$ + +$$ +\theta_ {\mathcal {E}} \leftarrow \theta_ {\mathcal {E}} - \eta \left(\frac {\partial L ^ {c}}{\partial \theta_ {\mathcal {C}}} \times \frac {\partial \theta_ {\mathcal {C}}}{\partial \theta_ {\mathcal {E}}} + \beta \frac {\partial L ^ {s y n}}{\partial \theta_ {\mathcal {E}}} - \frac {\partial \left(L ^ {g} + L ^ {l}\right)}{\partial \theta_ {\mathcal {D}}} \times \frac {\partial \theta_ {\mathcal {D}}}{\partial \theta_ {\mathcal {E}}}\right). \tag {17} +$$ + +# 3. Experiments + +We evaluate the proposed method and other related works on both unsupervised domain adaptation (source and target domains share the same categories) and partial domain adaptation (the categories of target domain is a subset of that of source domain) benchmarks of object classification, of which the partial domain adaptation results will be given in supplementary materials. Besides, ablation study is carefully done for analysing the contributions of each part of the proposed method. + +# 3.1. Datasets and Experimental Setting + +Three standard benchmarks for unsupervised domain adaptation and one for partial domain adaptation, respectively, are employed for the evaluation. + +Office-31-DA Office-31 [20] is a classical and widely used benchmark for domain adaptation with 31 categories, consisting of 3 different domains including Amazon (A) with 2817 images, Webcam (W) with 795 images, and DSLR (D) with 498 images. Following the commonly used protocol defined in [13, 26, 28, 31], all 31 categories from the three domains are used for evaluation of unsupervised domain adaptation, forming 6 transfer tasks. + +Office-Home [42] Office-Home is another classical dataset with 65 categories, consisting of 4 different domains including Artistic images (Ar), Clip Art images (Cl), Product images (Pr) and Real-World images (Rw). Following the commonly utilized protocol defined in [13, 26, 28, 31], all 65 categories from the four domains are used for evaluation of unsupervised domain adaptation, forming 12 transfer tasks. + +Table 1. Ablation study of our GSDA for domain adaptation on Office-31 (ResNet50). + +
GlbClsGrpGrad SyncA→WD→WW→DA→DD→AW→AAvg
✓87.998.2100.085.566.464.183.7
✓✓91.798.4100.087.168.967.285.6
✓✓✓93.199.0100.091.471.567.087.0
✓✓✓✓95.799.1100.094.873.574.989.7
+ +VisDA-2017 VisDA-2017 [32] is a more challenging simulation-to-real task, with two distinct domains: synthetic object images rendered from 3D models and real object images. It contains 152397 training images and 55388 validation images across 12 classes. Following the training and testing protocol in [34, 25], the model is trained on labeled training and unlabeled validation set and tested on the validation set in unsupervised domain adaptation. + +Office-31-PDA Recently, a new protocol for partial domain adaptation is built on Office-31 [20]. As defined in [2, 3], the same three domains as that for the standard unsupervised domain adaptation are used but with different categories for source and target domains: all 31 categories from the three domains are used as source domains, denoted as A31, D31, and W31, respectively, while the 10 common categories shared between Office-31 and Caltech-256 are used as target domains, denoted as A10 (958 images), W10 (295 images) and D10 (157 images), respectively. + +Implementation Details For fair comparison, on each setting we use the same network architecture as the compared methods. Specifically, we use ResNet50 as the backbone in all the experiments. In Office-31-DA and OfficeHome, the hyper-parameter $\alpha$ in Equation (5) and $\beta$ in Equation (13) is set as 0.02, and 1.0. In VisDA-2017 and Office-31-PDA, $\alpha$ and $\beta$ are set as 0.2 and 10.0, respectively. In Office-31-DA and Office-31-PDA, classes are divided into 6 groups. In Office-Home, they are divided into 13 groups. And in VisDA-2017, they are divided into 4 groups. For clearer explanation of hyper-parameter selection, the sensitivity analysis about hyper-parameters is presented in supplementary materials. For stable training of GSDA, those categories with fewer samples are augmented by randomly re-sampling images to make all categories have roughly the same number of images to avoid the data imbalance problem stated in [50]. For target domain, the class labels are unavailable, so only those samples with highly confident pseudo labels are used as training samples. + +# 3.2. Ablation Study + +The ablation study is conducted on unsupervised domain adaptation setting (Office-31-DA) to investigate the necessity of each component in GSDA. Briefly, our GSDA consist of three parts, global alignment, local alignment, and the hierarchical gradient synchronization between them. As shown in Table 1, the method with only global domain alignment $(Glb)$ performs worse than that added with class-wise alignment $(Cls)$ , showing that the local alignment is + +Table 2. Object classification accuracy on Office-31-DA (ResNet50). All methods follow the same settings, so most results are directly from the original works except MCDDA which is tuned using the released codes. + +
MethodA ↓ WD ↓ WW ↓ DA ↓ DD ↓ AW ↓ AAvg
ResNet50 [16]68.496.799.368.962.560.776.1
TCA [29]72.796.799.674.161.760.977.6
GFK [13]72.895.098.274.563.461.077.5
DAN [24]80.597.199.678.663.662.880.4
RTN [28]84.596.899.477.566.264.881.6
JAN [27]85.497.499.884.768.670.084.3
DANN [10]82.096.999.179.768.267.482.2
ADDA [41]86.296.298.477.869.568.982.9
MCDDA [34]82.698.999.884.366.266.383.0
MADA [31]90.097.499.687.870.366.485.2
CDAN [25]94.198.6100.092.971.069.387.7
SymNets [47]90.898.8100.093.974.672.588.4
SAFN [43]90.398.7100.092.173.471.287.6
BSP [4]93.398.2100.093.073.672.688.5
GSDA (Ours)95.799.1100.094.873.574.989.7
+ +important for keeping discriminative structure during adaptation. Then constructed with group-wise alignment (Grp), the model has further improvement because the discriminative structure is captured more elaborately by randomly combining several classes as a group. Furthermore, by considering hierarchical gradient synchronization between global alignment and local alignment, our GSDA (with gradient synchronization denoted as Grad Sync) achieves significant improvement indicating its effectiveness which also illustrates the necessity of consistency between global and local distribution alignment. Clearly, our main contributions, i.e., group-wise alignment and hierarchical alignment synchronization, shows promising benefit for domain adaptation. + +# 3.3. Unsupervised Domain Adaptation + +Unsupervised domain adaptation is the most typical setting for domain adaptation, and there are many related works such as the conventional methods TCA [29] and GFK [13], the deep adaptation works based on MMD criterion like DAN [24], RTN [28] and JAN [27], and the adversarial learning based approaches including DANN [10], ADDA [41], MADA [31], CDAN [25] and SymNets [47]. All these methods are compared with our method on Office-31-DA, Office-Home and VisDA-2017 introduced in Section 3.1. The experiment results are shown in Tables 2, 3 and 4. + +As can be seen, the baseline without adaptation and the conventional non-deep methods perform the worst, while + +Table 3. Object classification accuracy on Office-Home dataset (ResNet50). All methods follow the same settings, so all the results are directly copied from the original works. + +
MethodAr↓ClAr↓PrAr↓RwCl↓ArCl↓PrCl↓RwPr↓ArPr↓ClPr↓RwRw↓ArRw↓ClRw↓PrAvg
ResNet50 [16]34.950.058.037.441.946.238.531.260.453.941.259.946.1
DAN [24]43.657.067.945.856.560.444.043.667.763.151.574.356.3
DANN [10]45.659.370.147.058.560.946.143.768.563.251.876.857.6
JAN [27]45.961.268.950.459.761.045.843.470.363.952.476.858.3
CDAN [25]50.770.676.057.670.070.057.450.977.370.956.781.665.8
SymNets[47]47.772.978.564.271.374.264.248.879.574.552.682.767.6
SAFN[43]54.473.377.965.271.573.263.652.678.272.358.082.168.5
GSDA (Ours)61.376.179.465.473.374.365.053.280.072.260.683.170.3
+ +Table 4. Object classification accuracy on VisDA-2017 task (ResNet50). All methods follow the same settings and encoder architecture except the methods marked with $\dagger$ using ResNet101. The results are directly copied from the original works. The underlined results mean the highest accuracies of the four marked methods with deeper networks or multiple data augmentations (S-En). + +
MethodplanebcyclbuscarhorseknifemcyclpersonplantsktbrdtraintruckAvg
ResNet50 [16]70.651.855.868.977.97.693.334.581.127.988.65.655.3
DAN[24]61.754.877.732.275.080.878.346.966.934.579.629.159.8
DANN[10]75.970.565.317.372.838.658.077.272.540.470.444.758.6
MCDDA † [34]87.060.983.764.088.979.684.776.988.640.383.025.871.9
TPN [30]93.785.169.281.693.561.989.381.493.581.684.549.980.4
S-En* [8]96.387.984.755.795.995.288.677.493.392.887.538.282.8
BSP †[4]92.461.081.057.589.080.690.177.084.277.982.138.475.9
SAFN† [43]93.661.384.170.694.179.091.879.689.955.689.024.476.1
GSDA (Ours)93.167.883.183.494.793.493.479.593.088.883.436.781.5
+ +the deep methods with MMD criterion such as DAN [24] and JAN [27] perform much better benefited from the favorable non-linearity of the deep networks. Furthermore, the adversarial learning based methods including DANN [10], ADDA [41], MADA [31] and ours perform even better than those MMD based deep methods attributing to the more powerful capability of adversarial learning for reducing distribution discrepancy. + +Among the adversarial-based methods, DANN [10] and ADDA [41] are early ones only concentrating on global distribution alignment which outperform the MMD-based methods but with limited improvement. MADA [31], C-DAN [25] and SymNets [47] further consider class-level alignment achieving more promising adaptation. However, they do not consider the intrinsic relation between local and global alignment, so some misalignment may still appear. Go a further step, our proposed method GSDA considers not only global and local (i.e., class-wise and group-wise) alignment, but also the hierarchical gradient synchronization relation between them, leading to better adaptation. + +Moreover, BSP [4] and SAFN [43] are recently proposed methods with different perspectives from feature distribution alignment. BSP penalizes the largest singular values of feature eigenvectors to enhance the discriminality and SAFN improves the transferability by magnifying norm of features. Compared with these two novel methods, our method still achieves the best performance, demonstrating + +the advantage and necessity of considering the relation between the global and local distribution alignment. + +# 4. Conclusion and Future Work + +Aiming for better unsupervised domain adaption, we propose a novel method named GSDA aligning the distribution of two different domains globally and locally as well, with gradient synchronization between them. The hierarchical gradient synchronization module is established to ensure the consistency between global and local distribution alignment for better structure preservation. The extensive experiments verify the superiority of our method. + +The gradient synchronization between global and local domain alignment has achieved promising improvement in this work, and this also implies that the relation between global and local distribution alignment deserves deeper analysis and exploration in future. + +# ACKNOWLEDGEMENT + +This work is partially supported by National Key R&D Program of China (No. 2017YFA0700800), Natural Science Foundation of China (No. 61772496) and UCAS Joint PhD Training Program. + +# References + +[1] S. Bickel, M. Brückner, and T. Scheffer. Discriminative learning under covariate shift. Journal of Machine Learning Research (JMLR), 10(9):2137-2155, 2009. +[2] Zhangjie Cao, Mingsheng Long, Jianmin Wang, and Michael I. Jordan. Partial transfer learning with selective adversarial networks. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2018. +[3] Zhangjie Cao, Lijia Ma, Mingsheng Long, and Jianmin Wang. Partial adversarial domain adaptation. In European Conference on Computer Vision (ECCV), 2018. +[4] Xinyang Chen, Sinan Wang, Mingsheng Long, and Jianmin Wang. Transferability vs. discriminability: Batch spectral penalization for adversarial domain adaptation. In International Conference on Machine Learning (ICML), 2019. +[5] Z. Ding and Y. Fu. Robust transfer metric learning for image classification. IEEE Transactions on Image Processing (TIP), 26(2):660-670, 2016. +[6] Zhengming Ding, Sheng Li, Ming Shao, and Yun Fu. Graph adaptive knowledge transfer for unsupervised domain adaptation. In European Conference on Computer Vision (ECCV), 2018. +[7] M. Dudik, R. E. Schapire, and S. J. Phillips. Correcting sample selection bias in maximum entropy density estimation. In Neural Information Processing Systems (NeurIPS), 2005. +[8] Geoffrey French, Michal Mackiewicz, and Mark Fisher. Self-ensembling for visual domain adaptation. In International Conference on Representation Learning (ICLR), 2018. +[9] Y. Ganin and V. Lempitsky. Unsupervised domain adaptation by backpropagation. In International Conference on Machine learning (ICML), 2015. +[10] Y. Ganin, E. Ustinova, H. Ajakan, P. Germain, and et al. Domain-adversarial training of neural networks. Journal of Machine Learning Research (JMLR), 17(1):2096-2030, 2016. +[11] Behnam Gholami, Ognjen Rudovic, and Vladimir Pavlovic. Punda: Probabilistic unsupervised domain adaptation for knowledge transfer across visual categories. In IEEE International Conference on Computer Vision (ICCV), 2017. +[12] B. Gong, K. Grauman, and F. Sha. Connecting the dots with landmarks: Discriminatively learning domain-invariant features for unsupervised domain adaptation. In International Conference on Machine learning (ICML), 2013. +[13] B. Gong, Y. Shi, F. Sha, and K. Grauman. Geodesic flow kernel for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2012. +[14] R. Gopalan, R. Li, and R. Chellappa. Domain adaptation for object recognition: An unsupervised approach. In IEEE International Conference on Computer Vision (ICCV), 2011. +[15] Yves Grandvalet and Yoshua Bengio. Semi-supervised learning by entropy minimization. In Neural Information Processing Systems (NeurIPS), 2005. +[16] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. + +[17] Cheng An Hou, Yao Hung Hubert Tsai, Yi Ren Yeh, and Yu Chiang Frank Wang. Unsupervised domain adaptation with label and structural consistency. IEEE Transactions on Image Processing (TIP), 25(12):5552-5562, 2016. +[18] Lanqing Hu, Meina Kan, Shiguang Shan, and Xilin Chen. Duplex generative adversarial network for unsupervised domain adaptation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2018. +[19] J. Huang, A. J. Smola, A. Gretton, K. M. Borgwardt, B. Scholkopf, and et al. Correcting sample selection bias by unlabeled data. In Neural Information Processing Systems (NeurIPS), 2007. +[20] M. Fritz K. Saenko, B. Kulis and T. Darrell. Adapting visual category models to new domains. In European Conference on Computer Vision (ECCV), 2010. +[21] Guoliang Kang, Lu Jiang, Yi Yang, and Alexander G. Hauptmann. Contrastive adaptation network for unsupervised domain adaptation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. +[22] M. Liu, T. Breuel, and J. Kautz. Unsupervised image-to-image translation networks. In Neural Information Processing Systems (NeurIPS), 2017. +[23] M. Liu and O. Tuzel. Coupled generative adversarial networks. In Neural Information Processing Systems (NeurIPS), 2016. +[24] M. Long, Y. Cao, J. Wang, and M. I. Jordan. Learning transferable features with deep adaptation networks. In International Conference on Machine learning (ICML), 2015. +[25] Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Conditional adversarial domain adaptation. In Neural Information Processing Systems (NeurIPS), 2018. +[26] Mingsheng Long, Jianmin Wang, Guiguang Ding, Jiaguang Sun, and Philip S. Yu. Transfer feature learning with joint distribution adaptation. In IEEE International Conference on Computer Vision (ICCV), 2014. +[27] Mingsheng Long, Jianmin Wang, and Michael I. Jordan. Deep transfer learning with joint adaptation networks. In International Conference on Machine learning (ICML), 2017. +[28] M. Long, H. Zhu, J. Wang, and M. I. Jordan. Unsupervised domain adaptation with residual transfer networks. In Neural Information Processing Systems (NeurIPS), 2016. +[29] S. J. Pan, I. W. Tsang, J. T. Kwok, and Q. Yang. Domain adaptation via transfer component analysis. IEEE Transactions on Neural Networks (TNN), 22(2):199-210, 2010. +[30] Yingwei Pan, Ting Yao, Yehao Li, Yu Wang, Chong-Wah Ngo, and Tao Mei. Transferrable prototypical networks for unsupervised domain adaptation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. +[31] Z. Pei, Z. Cao, M. Long, and J. Wang. Multi-adversarial domain adaptation. In AAAI Conference on Artificial Intelligence (AAAI), 2018. +[32] Xingchao Peng, Ben Usman, Neela Kaushik, Judy Hoffman, Dequan Wang, and Kate Saenko. Visda: The visual domain adaptation challenge. CoRR, abs/1710.06924, 2017. +[33] K. Saito, Y. Ushiku, and T. Harada. Asymmetric tri-training for unsupervised domain adaptation. In International Conference on Machine learning (ICML), 2017. + +[34] Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2018. +[35] Swami Sankaranarayanan, Yogesh Balaji, Carlos D. Castillo, and Rama Chellappa. Generate to adapt: Aligning domains using generative adversarial networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. +[36] O. Sener, H. O. Song, A. Saxena, and S. Savarese. Learning transferrable representations for unsupervised domain adaptation. In Neural Information Processing Systems (NeurIPS), 2016. +[37] M. Shao, C. Castillo, Z. Gu, and Y. Fu. Low-rank transfer subspace learning. In International Conference on Data Mining (ICDM), 2012. +[38] M. Shao, D. Kit, and Y. Fu. Generalized transfer subspace learning through low-rank constraint. International Journal of Computer Vision (IJCV), 109(1-2):74-93, 2014. +[39] M. Sugiyama, M. Krauledat, and K-B. Mažller. Covariate shift adaptation by importance weighted cross validation. Journal of Machine Learning Research (JMLR), 8(5):985-1005, 2007. +[40] Y. Taigman, A. Polyak, and L. Wolf. Unsupervised cross-domain image generation. 2017. +[41] E. Tzeng, J. Hoffman, K. Saenko, and T. Darrell. Adversarial discriminative domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. +[42] Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. +[43] Ruijia Xu, Guanbin Li, Jihan Yang, and Liang Lin. Larger norm more transferable: An adaptive feature norm approach for unsupervised domain adaptation. In IEEE/CVF International Conference on Computer Vision (ICCV), 2019. +[44] Hongliang Yan, Yukang Ding, Peihua Li, Qilong Wang, Yong Xu, and Wangmeng Zuo. Mind the class weight bias: Weighted maximum mean discrepancy for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. +[45] B. Zadrozny. Learning and evaluating classifiers under sample selection bias. In International Conference on Machine learning (ICML), 2004. +[46] Jing Zhang, Wanqing Li, and Philip Ogunbona. Joint geometrical and statistical alignment for visual domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. +[47] Yabin Zhang, Hui Tang, Kui Jia, and Mingkui Tan. Domain-symmetric networks for adversarial domain adaptation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. +[48] Zhen Zhang, Mianzhi Wang, Yan Huang, and Arye Nehorai. Aligning infinite-dimensional covariance matrices in reproducing kernel hilbert spaces for domain adaptation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2018. + +[49] Jun Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. +[50] Yang Zou, Zhiding Yu, B.V.K. Vijaya Kumar, and Jinsong Wang. Unsupervised domain adaptation for semantic segmentation via class-balanced self-training. In European Conference on Computer Vision (ECCV), 2018. \ No newline at end of file diff --git a/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/images.zip b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c520eb11514aa0a1c242fb6a88404390e4949f8a --- /dev/null +++ b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43b95e320a43936f7d613dcd2841d21154b349b279e5dd691b88b5439b9c7515 +size 535406 diff --git a/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/layout.json b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5300d0e0f1f88e26f9dcedac3ae0aac581cc3476 --- /dev/null +++ b/unsuperviseddomainadaptationwithhierarchicalgradientsynchronization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cdde0246eb47e6d56335d12b667c540240d351f8d81d87e7febc3066b6614d8e +size 436029 diff --git a/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/1b384ecf-aad0-4a59-b357-ea8394d3f845_content_list.json b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/1b384ecf-aad0-4a59-b357-ea8394d3f845_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4b117ccc51f914addccfbe6b65ec8189d6d95f1d --- /dev/null +++ b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/1b384ecf-aad0-4a59-b357-ea8394d3f845_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea664529d3d74d7cd11d72f8b13045e598871894195da555b39ec8c7eac45938 +size 82894 diff --git a/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/1b384ecf-aad0-4a59-b357-ea8394d3f845_model.json b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/1b384ecf-aad0-4a59-b357-ea8394d3f845_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2f0b1eb1cc957729c8e071ec664ee068fbe5d2c8 --- /dev/null +++ b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/1b384ecf-aad0-4a59-b357-ea8394d3f845_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb85342f3c6c49963f6ec0fd462c8623f73c4e08736976011f7e568dc4c78ea4 +size 100118 diff --git a/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/1b384ecf-aad0-4a59-b357-ea8394d3f845_origin.pdf b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/1b384ecf-aad0-4a59-b357-ea8394d3f845_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8504e284f7b6cd60a3b39a3c5c4e2ef9535a6aee --- /dev/null +++ b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/1b384ecf-aad0-4a59-b357-ea8394d3f845_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa78a5436a1c51432f12487cc8c1347114954acc310739f5044a138a3af290ba +size 703074 diff --git a/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/full.md b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/full.md new file mode 100644 index 0000000000000000000000000000000000000000..34058baaaedf5a6eae2de31e8295815d0b2c461b --- /dev/null +++ b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/full.md @@ -0,0 +1,335 @@ +# Unsupervised Instance Segmentation in Microscopy Images via Panoptic Domain Adaptation and Task Re-weighting + +Dongnan Liu1 + +Donghao Zhang + +Heng Huang + +Yang Song² + +Mei Chen + +Fan Zhang3 + +Weidong Cai + +Lauren O'Donnell3 + +$^{1}$ School of Computer Science, University of Sydney, Australia + +$^{2}$ School of Computer Science and Engineering, University of New South Wales, Australia + +$^{3}$ Brigham and Women's Hospital, Harvard Medical School, USA + +$^{4}$ Department of Electrical and Computer Engineering, University of Pittsburgh, USA + $^{5}$ Microsoft Corporation, USA + +{dliu5812, dzha9516}@uni.sydney.edu.au, yang.songl@unsw.edu.au + +{fzhang, odonnell}@bwh.harvard.edu, henghuanghh@gmail.com + +may4mc@gmail.com, tom.cai@sydney.edu.au + +# Abstract + +Unsupervised domain adaptation (UDA) for nuclei instance segmentation is important for digital pathology, as it alleviates the burden of labor-intensive annotation and domain shift across datasets. In this work, we propose a Cycle Consistency Panoptic Domain Adaptive Mask R-CNN (CyC-PDAM) architecture for unsupervised nuclei segmentation in histopathology images, by learning from fluorescence microscopy images. More specifically, we first propose a nuclei inpainting mechanism to remove the auxiliary generated objects in the synthesized images. Secondly, a semantic branch with a domain discriminator is designed to achieve panoptic-level domain adaptation. Thirdly, in order to avoid the influence of the source-biased features, we propose a task re-weighting mechanism to dynamically add trade-off weights for the task-specific loss functions. Experimental results on three datasets indicate that our proposed method outperforms state-of-the-art UDA methods significantly, and demonstrates a similar performance as fully supervised methods. + +# 1. Introduction + +Nuclei instance segmentation in histopathology images is an important step in the digital pathology workflow. Pathologists are able to diagnose and prognose cancers according to mitosis counts, the morphological structure of each nucleus, and spatial distribution of a group of nuclei [7, 25, 5, 1, 34]. Currently, supervised learning- + +![](images/5abce89511310b8e0665406657a15344a61e808cd062ef7ab3ee6734d0fb3f8c.jpg) + +![](images/9d97800e9fdd46172a2ba8d66b8f4ff0f589b19d89b4fe69915d7466ee3185fa.jpg) + +![](images/bb9c2421d71fe7a1b61f5ed52ddda56a9f4460c1089b3a71826be2bdd6b188fe.jpg) + +![](images/b2eb909f6a3cbe234263a662f04ab79e880df84830982bad8a6bfa9c0cc5b7fe.jpg) + +![](images/b2b95ed9150e552f245ec34358148ae42c3e43aed53d8ce3103835e9b5dbfc19.jpg) + +![](images/14401b893180c62068025dce74d8d873efc906eaa4e495d06b1c652fb35865f1.jpg) +(a) + +![](images/011778274d21edec776baebbd7608b79846d2c875261eb78773555b292e9bdd2.jpg) +(b) + +![](images/8749464c891c02b62ca282f07e4c358b3a90114111a9a35a0bcfad501b4156f4.jpg) +(c) +Figure 1. Example images of our proposed framework. (a) fluorescence microscopy images; (b) real histopathology images; (c) our synthesized histopathology images; (d) nuclei segmentation generated by our proposed UDA method; (e) ground truth. + +![](images/96316939f219e19c9057576c4d3053f6f32e023fe43d31fa54bb5a5f5f2c3cc8.jpg) +(d) + +![](images/7a81721aa03d29b6cdb412ea4e5b3282c546b60ff53294b00a6545dcf1407fb6.jpg) +(e) + +based methods for nuclei instance segmentation are prevalent as they are efficient while preserving high accuracy [24, 35, 3, 9, 33, 50, 29, 28]. However, their performance heavily relies on large-scale training data, which requires expertise for annotation. This process is time-consuming and labor-intensive due to the complicated cellular structures, as shown in Fig. 1(b), and large image sizes. For example, annotating a histopathology dataset with 50 images and 12M pixels costs a pathologist 120 to 230 hours [16]. Moreover, in real clinical studies, even one whole slide image in $40 \times$ objective magnification contains 1B pixels [10]. Therefore, investigating methods without depending on histopathology annotations is necessary. It can help pathologists to reduce the workload, and tackle the issue of lacking histopathology annotations. + +The recently proposed unsupervised domain adaptation + +(UDA) methods tackle this issue by conducting supervised learning on the source domain and obtain a good performance model for the target domain without annotations [36, 8, 45]. Currently, UDA reduces distances between the distribution of feature maps of the source and target domains. In addition, some other methods focus on the pixel-to-pixel translation from the source domain images to the target ones, for aligning cross-domain image appearances [20, 52]. For these methods, there still remain some differences in the distributions between the synthesized and real images, due to the imperfect translations [15, 2, 21]. + +To incorporate the benefits of the image translation and the UDA methods, several works have been proposed to learn the domain-invariant features between the target and the synthesized target-like images [15, 21, 2]. Such methods achieve state-of-the-art performance on UDA classification, object detection, and semantic segmentation tasks. However, currently there is a lack of UDA methods specifically designed for instance segmentation, and directly extending the existing UDA methods on object detection [4, 21, 14] to the UDA nuclei instance segmentation task still suffers from challenges. First, existing UDA object detection methods focus on alleviating the domain bias at the image level (image contrast, brightness, etc.) and the instance level (object scale, style, etc.) [21, 4, 14]. They ignore the domain shift at the semantic level, such as the relationship between the foreground and background, and the spatial distribution of the objects. Second, these UDA object detection methods are multi-task learning paradigms, which optimize different loss functions simultaneously. If the feature extractors fail to generate domain-invariant features in some training iterations, then back-propagating the weights according to the task loss functions in these iterations causes the model bias towards the source domain. + +To solve the aforementioned problems in UDA nuclei instance segmentation tasks in histopathology images, we propose a Cycle-Consistent Panoptic Domain Adaptive Mask R-CNN (CyC-PDAM) model. As none of the previous UDA methods are specially designed for instance segmentation, we extend the CyCADA [15] to an instance segmentation version based on Mask R-CNN [11], as our baseline. In our CyC-PDAM, we firstly propose a simple nuclei inpainting mechanism to remove the auxiliary nuclei in the synthesized histopathology images. Second, inspired by the panoptic segmentation architectures [23, 22], we propose a semantic-level adaptation module for domain-invariant features based on the relationship between the foreground and the background. By reconciling the domain-invariant features at the semantic and instance levels, our proposed CyCPDAM achieves panoptic-level domain adaptation. Furthermore, a task re-weighting mechanism is proposed to reset the importance for each task loss. During training, the specific task losses are down-weighted if the features for task + +predictions are not domain-invariant and source-biased, and up-weighted if the features are hard to differentiate. + +To prove the effectiveness of our proposed CyC-PDAM architecture, experiments have been conducted on three public datasets for unsupervised nuclei instance segmentation of histopathology images on two different datasets by unsupervised domain adaptation from a fluorescence microscopy image dataset. Unlike histopathology images, no structures are similar to the nuclei in the background of fluorescence microscopy images, due to the differences between image acquisition techniques, as shown in Fig. 1(a). It is much easier to obtain manual annotation for the fluorescence microscopy images compared with histopathology images, therefore it is chosen as our source domain. + +Our contribution is summarized as follows: (1) We propose a CyC-PDAM model for UDA nuclei instance segmentation in histopathology images. To our best knowledge, this is the first UDA instance segmentation method. (2) A simple nuclei inpainting mechanism is proposed to remove false-positive objects in the synthesized images. (3) Our CyC-PDAM produces domain-invariant features at the panoptic level, by integrating the instance-level adaptation with a newly proposed semantic-level adaptation module. (4) A task re-weighting mechanism is proposed to alleviate the domain bias towards the source domain. (5) Compared with state-of-the-art UDA methods, our proposed CyC-PDAM paradigm outperforms them by a large margin. Moreover, it achieves competitive performance compared with state-of-the-art fully supervised methods for nuclei segmentation. + +# 2. Related Work + +# 2.1. Domain Adaptation for Natural Images + +Domain adaptation aims at transferring the knowledge learned from one labeled domain to another without annotation [36]. Recently, UDA methods have reduced the cross-domain discrepancies based on the content in the feature level and the appearance in the pixel level. For the feature-level adaptation, adversarial learning for domain-invariant features [8, 45], Maximum Mean Discrepancy minimization (MMD) [32], local pattern alignment [48], and cross-domain covariance alignment [42] are widely employed for classification tasks. In addition, domain adaptation is further employed for other tasks such as semantic segmentation [46, 26] and object detection [4, 21, 19, 47]. In semantic segmentation tasks, the segmentation results are forced to be domain-invariant, together with intermediate feature maps [26, 46, 44]. Additionally, ADVENT [46] further minimized the Shannon entropy for the semantic segmentation predictions in source and target domains to alleviating the cross-domain discrepancy. For object detection, a domain adaptive Faster R-CNN [40], consisting of + +![](images/483daaf9b86f34e388965dadc3a1301233574897358736e6187d6a9d5a6b8cfd.jpg) +Figure 2. Overall architecture for our proposed CyC-PDAM architecture. The annotations of the real histopathology patches are not used during training. + +the image- and instance-level adoptions, was usually proposed for domain-invariant features of the whole image and each object [4, 21, 14]. On the other hand, imaged-to-image translation addresses the domain adaptation problems in the pixel level by generating target-like images and training task-specific fully supervised models on them [30, 17, 20, 52, 33, 37]. However, domain bias still exists because of imperfect translation. Moreover, several methods have been proposed to align the feature-level adaptation with the pixel-level one, by learning domain-invariant features between the target images and the synthesized images [15, 21, 2]. + +# 2.2. Domain Adaptation for Medical Images + +Unsupervised domain adaptation for medical image analysis has rarely been explored [39, 51, 2, 18, 16]. [39] and [18] solve the UDA histopathology images classification problems with GAN based architectures. In addition, DAM [6] is proposed to generate domain-invariant intermediate features and model predictions, for UDA semantic segmentation in CT images. With the help of cycle-consistency reconstruction, TD-GAN [51] and SIFA [2] are proposed for semantic segmentation on different medical images, with both pixel- and feature-level adaptations. However, none of them is designed for UDA nuclei instance segmentation. Even though Hou et al. [16] proposed to train a GAN based refiner and a nuclei segmentation model with the synthesized histopathology images for unsupervised nuclei instance segmentation, their paradigm only contains pixel-level adaptation and is still not capable for minimizing the domain gap in the feature level. In this work, we therefore propose a CyC-PDAM paradigm for UDA nuclei instance segmentation, which alleviates the domain bias issue in the pixel and feature levels. + +# 3. Methods + +Our proposed architecture is based on CyCADA and we fuse CyCADA with the instance segmentation framework Mask R-CNN. Furthermore, we improve it with nuclei inpainting mechanism, panoptic-level domain adaptation, and task re-weighting mechanism. Fig. 2 illustrates the overall architecture of our approach. + +# 3.1. CyCADA with Mask R-CNN + +
NameHyperparamatersOutput size
Input256 × 8 × 8
Conv1k = (3, 3), s = 1, p = 1256 × 8 × 8
Conv2k = (3, 3), s = 1, p = 1512 × 8 × 8
Conv3k = (3, 3), s = 1, p = 1512 × 8 × 8
Conv4k = (1, 1), s = 1, p = 02 × 8 × 8
+ +Table 1. The parameters for each block in the image-level discriminator for PDAM. $k$ , $s$ , and $p$ denote the kernel size, stride, and padding of the convolution operation, respectively. + +As there is no UDA architectures targeting instance-level segmentation, we firstly design a domain adaptive Mask R-CNN. The backbone of the Mask R-CNN in this work is constructed with ResNet101 [12] and Feature Pyramid Network (FPN) [27]. Inspired by the previous UDA methods for object detection [4, 21], we add one discriminator after FPN for the image-level adaptation, and the other after the instance branch for instance-level adaptation, as shown in Fig. 3. For the image-level adaptation, the multi-resolution feature maps of the FPN output are firstly downsampled to the size $8 \times 8$ with average pooling, and then summed together for the image-level discriminator. The image-level discriminator consists of 4 convolutional layers (details in Table 1) and a gradient reversal layer (GRL) for adversarial learning. In the instance-level adaptation, the $14 \times 14 \times 256$ feature map in the mask branch is downscaled to the size $2 \times 2 \times 256$ with average pooling and then resized to $1024 \times 1$ , to sum with the $1024 \times 1$ feature from the bounding box branch. The instance-level discriminator consists of 3 fully connected layers and a GRL, whose input is the summation of features mentioned above. + +# 3.2. Nuclei Inpainting Mechanism + +Even though CycleGAN is effective for synthesizing histopathology-like images, due to the large domain gap and nuclei number incompatibility between the source and target domains, the label space for the generated images sometimes changes after transferring from the source domain. For example, there are redundant and undesired nuclei in the synthesized images shown in Fig. 4. If these images are directly used to train the task-specific CNN with the origi + +![](images/04cb72ba450d9ed459f373fda9f794832c20e900ba2540c438c314b2b0d7f572.jpg) +Figure 3. Detailed illustration of Panoptic Domain Adaptive Mask R-CNN (PDAM). $Ci$ and $FC$ represent a convolution layer, and a fully connected layer, respectively. $Ri1$ and $Ri2$ mean the first and second convolutional layers in the $ith$ residual block, respectively. $ReLU$ and normalization layers after each convolutional block are omitted for brevity. + +![](images/71a1273433f3627f5dbff12e7231cc9b1c2938fc87323a86a86c6612fb84a8e3.jpg) + +![](images/7a27474add1428dbf79959a46ea452d931438a317f4d236fd521f706ac9c24f1.jpg) + +![](images/680b8908aaa61311133b688378985e2cc27761c3ea772b6dc8ff88893e6a5e14.jpg) +(a) + +![](images/1685a1de658ebe210399b1ec2f614fff18b184cf9a5634032288765d7b8dc792.jpg) + +![](images/301355b8d204f7f85ef1286720d534e3f67ef61079a91433c014ca4035d2842f.jpg) + +![](images/32149c5c03c50a09a62f2b09512cc55ae46167191724667faa018f6dcc077ce2.jpg) +(b) + +![](images/acfeb43c4115f80ea44550cb5ec2526951b5194577e21bf0b95825886da5d55a.jpg) + +![](images/5cf0099a9ad9773a24c22dd71b7feabf60465b3bd957888001712d1760cd47df.jpg) + +![](images/d89a59f7a687bfccf6ca619a979bb1fc6251ecff6daf7e91aa891b83348a6ca8.jpg) +Figure 4. Visual results for the effectiveness of nuclei inpainting mechanism. (a) original fluorescence microscopy patches; (b) corresponding nuclei annotations; (c) initial synthesized images from CycleGAN; (d) final synthesized images after nuclei inpainting mechanism. + +![](images/289252a609a7fcb76328559c3793363b5a6d4429d5af94f12a6cb6d399c7d347.jpg) + +![](images/542fb0217593246f26673657b653a0b23aa496c6dbc6eba0c96e7978660a1fba.jpg) + +![](images/916a8e0b2fbf577164f6cfbd4a6e40701c5d57baf740c41439ebd730af4c3558.jpg) +(d) + +nal labels, the model is forced to regard redundant nuclei as background, even though they appear as real nuclei. + +Therefore, we propose an auxiliary nuclei inpainting mechanism to remove the nuclei which only appear in the synthesized images without corresponding annotations. Denoting a raw synthesized histopathology image by CycleGAN as $S_{raw}$ and its corresponding mask as $M$ , we first obtain the mask predictions $M_{aux}$ of all the auxiliary generated nuclei, formulated as: + +$$ +M _ {a u x} = \left(o t s u \left(S _ {r a w}\right) \cup M\right) - M \tag {1} +$$ + +where $\text{OSTU}(S_{\text{raw}})$ represents a binary segmentation method for $S_{\text{raw}}$ based on Otsu threshold. In $M_{\text{aux}}$ , only auxiliary nuclei without annotation is labeled. Then, we get the newly synthesized image $S_{\text{inp}}$ after removing these nuclei, which + +can be represented as: + +$$ +S _ {i n p} = i n p \left(S _ {\text {r a w}}, M _ {\text {a u x}}\right) \tag {2} +$$ + +where $inp$ is a fast marching based method for inpainting objects [43], by replacing the pixel values for the auxiliary nuclei labeled in $M_{aux}$ with them for the unlabeled background. Fig. 4 illustrates the visual effectiveness of our proposed nuclei inpainting mechanism. However, some background materials are labeled as false positive predictions in $M_{aux}$ . Directly inpainting them makes the texture and appearance of synthesized images unrealistic, and enlarges the domain gap between the synthesized and real images. However, the image-level adaptation is able to address this issue by alleviating the domain bias on global visual information, such as curve, texture, and illumination. Our nuclei inpainting mechanism is time-efficient, which takes 0.09 second to process one single $256 \times 256$ synthesized histopathology patch, on average. + +# 3.3. Panoptic Level Domain Adaptation + +We define the semantic-level features of an image as the relationship between its foreground and background. In addition to the image- and feature-level domain bias, the domain shift at the semantic level also exists. Due to the differences in the nuclei objects and background between the synthesized and real histopathology images, domain adaptive Mask R-CNN mentioned in Sec. 3.1 suffers from domain bias in the semantic-level features, as the Mask R-CNN only focuses on the local features for each object and lacks a semantic view of the whole image. Inspired by the previous panoptic segmentation architecture, which unified the semantic and instance segmentation to + +process the global and local features of the images, we propose a semantic-level adaptation to induce the model to learn domain-invariant features based on the relationship between the foreground and background. By incorporating the semantic- and instance-level adaptation, our panoptic domain adaptive method reduces the cross-domain discrepancies in a global and local view. + +As shown in Fig. 3, a semantic branch for semantic segmentation prediction is added to the output of the FPN. Our semantic branch has the same implementation as [22]. As the fluorescence microscopy images and histopathology images can both be acquired from tissue samples and they can show complementary and correlated information, the semantic segmentation label spaces of the synthesized and real histopathology images have a strong similarity. In addition, aligning the cross-domain entropy distributions helps to minimize the entropy prediction in the target domain, which makes the model suitable for the target images [46]. Therefore, we use the Shannon entropy [41] of the softmax semantic predictions to induce the domain-invariant features to learn at the semantic level. Denoting the softmax semantic prediction as $P$ and $P \in (0,1)$ , its Shannon entropy is defined as: $-plog(p)$ . + +Fig. 3 and Table 2 indicate the detailed structure of the discriminator for semantic level adaptation. We employ residual connected CNN blocks to avoid gradient vanishing [12, 13]. To make the adversarial learning more stable, instead of bilinear interpolation, we use stride convolutional layers for upsampling. Finally, the domain label is predicted as a $16 \times 16$ patch. Due to the small mini-batch size, the patch-based domain label prediction increases the number of training samples, to avoid overfitting. + +
NameHyperparamatersOutput size
Input2 × 256 × 256
C1k = (7,7), s = 2, p = 364 × 128 × 128
R11 and R12k = (3,3), s = 1, p = 164 × 128 × 128
C2k = (5,5), s = 2, p = 2128 × 64 × 64
R21 and R22k = (3,3), s = 1, p = 1128 × 64 × 64
C3k = (5,5), s = 2, p = 2256 × 32 × 32
R31 and R32k = (3,3), s = 1, p = 1256 × 32 × 32
C4k = (5,5), s = 2, p = 2512 × 16 × 16
R41 and R42k = (3,3), s = 1, p = 1512 × 16 × 16
C5k = (1,1), s = 1, p = 02 × 16 × 16
Output2 × 16 × 16
+ +Table 2. The parameters for each block in the semantic-level discriminator for PDAM. $k$ , $s$ , and $p$ follow the same convention as in Table 1. + +# 3.4. Task Re-weighting Mechanism + +In the previous UDA methods, the task-specific loss functions (segmentation, classification, and detection) are based on the source domain predictions. Even though several adversarial domain discriminators are employed to ensure the predicted feature maps are domain-invariant, the cross-domain discrepancies of these feature maps are still + +large in some training iterations, where the features are far from the decision boundaries of the domain discriminators. If the task-specific losses are updated to optimize the models with these easily-distinguished features, the models will bias towards the source images when testing it with the target data. To this end, we propose a task re-weighting mechanism to add a trade-off weight for each task-specific loss function according to the prediction of the domain discriminator. Denote the probability of the feature map before the final task prediction belonging to the source and target domains as $p_s$ and $p_t$ , respectively, and the task-specific loss function as $L$ , then the re-weighted task-specific loss $L_{rw}$ is: + +$$ +L _ {r w} = \min \left(\frac {p _ {t}}{p _ {s}}, \beta\right) L = \min \left(\frac {1 - p _ {s}}{p _ {s}}, \beta\right) L \tag {3} +$$ + +where $\beta$ is a threshold value to avoid the $\frac{1 - p_s}{p_s}$ becoming large and making the model collapse, when $p_s\rightarrow 0$ . According to Eq. 3, if the feature map deciding the task prediction belongs to the source domain $(p_{s}\to 1)$ , the loss function is then down-weighted, to alleviate the source-bias feature learning of the model. As illustrated in Fig. 3, the loss function for the region proposal network (RPN), semantic branch, and the instance branch are re-weighted by the prediction at the image-, semantic-, and instance-level domain discriminators, respectively. + +# 3.5. Network Overview and Training Details + +In our proposed CyC-PDAM, the CycleGAN has the same implementation as its original work [52]. When training the CycleGAN, the initial learning rate was set to 0.0001 for the first $1/2$ of the total training iterations, and linearly decayed to 0 for the other $1/2$ . + +The PDAM is trained with a batch size of 1 and each batch contains 2 images, one from the source and the other from the target domain. Due to the small batch size, we replace traditional batch normalization layers with group normalization [49] layers, with the default group number 32 as in [49]. + +The overall loss function of PDAM is defined as: + +$$ +\begin{array}{l} L _ {p d a m} = \alpha_ {i m g} L _ {r p n} + \alpha_ {i n s} L _ {d e t} + \alpha_ {s e m} L _ {(s e m - s e g)} \tag {4} \\ + \alpha_ {d a} \left(L _ {(i m g - d a)} + L _ {(s e m - d a)} + L _ {(i n s - d a)}\right) \\ \end{array} +$$ + +where $L_{rpn}$ is the loss function for the RPN, $L_{det}$ is the loss of class, bounding box, and instance mask prediction of Mask R-CNN, $L_{(sem-seg)}$ is the cross entropy loss for semantic segmentation, $L_{(img-da)}$ , $L_{(sem-da)}$ and $L_{(ins-da)}$ are cross entropy losses for domain classification at image, semantic and instance levels. $\alpha_{img}$ , $\alpha_{ins}$ , and $\alpha_{isem}$ are calculated according to Eq. 3 for task re-weighting. In our experiment, we set $\beta$ as 2. $\alpha_{da}$ is updated as: + +$$ +\alpha_ {2} = \frac {2}{1 + e x p (- 1 0 t)} - 1 \tag {5} +$$ + +where $t$ is the training progress and $t \in [0,1]$ . Thus $\alpha_{da}$ is gradually changed from 0 to 1, to avoid the noise from the unstable domain discriminators in the early training stage. + +During training, the PDAM is optimized by SGD, with a weight decay of 0.001 and a momentum of 0.9. The initial learning rate is 0.002, with linear warming up in the first 500 iterations. The learning rate is then decreased to 0.0002 when it reaches $3/4$ of the total training iteration. During inference, only the original Mask R-CNN architecture is used with the adapted weight and all of the hyperparameters for testing are fine-tuned on the validation set. All of our experiments were implemented with Pytorch [38], on two NVIDIA GeForce 1080Ti GPUs. + +# 4. Experiments + +# 4.1. Datasets Description and Evaluation Metrics + +Our proposed architecture was validated on three public datasets, referred to as Kumar [24], TNBC [35], and BBBC039V1 [31], respectively. Among them, Kumar and TNBC are histopathology datasets, while BBBC039V1 is a fluorescence microscopy dataset. Kumar was acquired from The Cancer Genome Atlas (TCGA) at $40 \times$ magnification, containing 30 annotated $1000 \times 1000$ patches from 30 whole slide images of different patients. All these images are from 18 different hospitals and 7 different organs (breast, liver, kidney, prostate, bladder, colon, and stomach). In contrast to the disease variability in Kumar, the TNBC dataset especially focuses on Triple-Negative Breast Cancer (TNBC) [35]. In TNBC, there are 50 annotated $512 \times 512$ patches from 11 different patients from the Curie Institute at $40 \times$ magnification. BBBC039V1 is about U2OS cells under a high-throughput chemical screen [31]. It contains 200 $520 \times 696$ images about bioactive compounds, with the DNA channel staining of a single field of view. + +For evaluation, we employ three commonly used pixel-and object-level metrics. Aggregated Jaccard Index (AJI) is an extended Jaccard Index for object-level evaluation [24], and object-level F1 score is the average harmonic mean between the precision and recall for each object. For pixel-level evaluation, we employ pixel-level F1 score for binarization predictions. + +# 4.2. Experiment Setting + +We conducted our experiments on two nuclei segmentation tasks: adapting from BBBC039V1 to Kumar, and from BBBC039V1 to TNBC. As the source domain in two experiments, 100 training images and 50 validation images from BBBC039V1 are used, following the official data split1. + +The annotations for Kumar and TNBC are not used during training the UDA architecture, only for evaluation. + +The preprocessing for source fluorescence microscopy images has 3 steps. First, all images are normalized into range [0,255]. Second, $10K$ patches in size $256 \times 256$ are randomly cropped from the 100 training images, with data augmentation including rotation, scaling, and flipping to avoid overfitting. Third, the patches with fewer than 3 objects are removed. For better synthesizing target-like histopathology images, we finally inverse the pixel value of foreground nuclei and background for all source fluorescence microscopy patches. For validation, 50 images in the BBBC039V1 validation set are transferred to synthesized histopathology images by CycleGAN and nuclei inpainting mechanism. + +For the Kumar dataset as the target domain, we have the same data split as previous work in [24, 35], with 16 images for training, and 14 for testing. When training the model, totally $10K$ patches in size $256 \times 256$ are randomly cropped from the 16 training histopathology images, with basic data augmentation including flipping and rotation, to avoid overfitting. As for TNBC, we use 8 cases with 40 images for training, and the remaining 3 cases with 10 images for testing. To train the model with TNBC, $10K256 \times 256$ patches are randomly extracted from the training images with basic data augmentation including flipping and rotation. + +# 4.3. Comparison Experiments + +# 4.3.1 Comparison with Unsupervised Methods + +In this section, our proposed CyC-PDAM is compared with several state-of-the-art UDA methods, including CyCADA [15], Chen et al. [4], SIFA [2], and DDMRL [21]. As the original CyCADA focuses on classification and semantic segmentation, we extend it with Mask R-CNN for UDA instance segmentation, as described in Sec. 3.1. Chen et al. [4] are originally for UDA object detection based on Faster R-CNN, by adapting the features at the image and instance levels. For UDA instance segmentation, we replace the original VGG16 based Faster R-CNN with the same Mask R-CNN in our architecture, and the original image- and instance-level adaptation in [4] with ours in Sec. 3.1. SIFA [2] is a UDA semantic segmentation architecture for CT and MR images, with a pixel- and feature-level adaptation. In our experiment, we add the watershed algorithm to separate the touching objects in the semantic segmentation prediction of SIFA, for a fair comparison. DDMRL [21] learns multi-domain-invariant features from various generated domains for UDA object detection and it is extended for instance segmentation, in a similar way as CyCADA [15] and Chen et al. [4]. In addition, we also compared with Hou et al. [16], which is particularly designed for unsupervised nuclei segmentation in histopathology images. They trained a multi-task (segmentation, detection, and refinement) CNN + +
BBBC039 → KumarBBBC039 → TNBC
MethodsAJIPixel-F1Object-F1AJIPixel-F1Object-F1
CyCADA [15]0.4447 ± 0.10690.7220 ± 0.08020.6567 ± 0.08370.4721 ± 0.09060.7048 ± 0.09460.6866 ± 0.0637
Chen et al. [4]0.3756 ± 0.09770.6337 ± 0.08970.5737 ± 0.09830.4407 ± 0.06230.6405 ± 0.06600.6289 ± 0.0609
SIFA [2]0.3924 ± 0.10620.6880 ± 0.08820.6008 ± 0.10060.4662 ± 0.09020.6994 ± 0.09420.6698 ± 0.0771
DDMRL [21]0.4860 ± 0.08460.7109 ± 0.07440.6833 ± 0.07240.4642 ± 0.05030.7000 ± 0.04310.6872 ± 0.0347
Hou et al. [16]0.4980 ± 0.12360.7500 ± 0.08490.6890 ± 0.09900.4775 ± 0.12190.7029 ± 0.12620.6779 ± 0.0821
Proposed0.5610 ± 0.07180.7882 ± 0.05330.7483 ± 0.05250.5672 ± 0.06460.7593 ± 0.05660.7478 ± 0.0417
+ +![](images/cfd19d88810b73a6356cad281f55b572923c38ceeb8df8cc299f010f4dddb0bc.jpg) +Figure 5. Visualization results for the comparison experiments. The first 3 rows are from Kumar dataset, and the last 3 rows are from TNBC. + +architecture with their synthesized histopathology images from randomly generated binary nuclei masks. + +Table 3 shows that our proposed method outperforms all the comparison methods by a large margin, on different histopathology datasets. In addition, the one-tailed paired t-test is employed to prove that all of our improvements are statistically significant, with all the p-values under 0.05. Chen et al. [4] learns the domain-invariant features at the image and instance levels. However, due to the large differences between the fluorescence microscopy and real histopathology images, feature-level adaptation only is not enough to reduce the domain gap. With pixel-level adaptation on appearance, all the other methods achieve better performance. Compared with the baseline method CyCADA [15], our CyC-PDAM has a large improvement of $6 - 12\%$ , due to the effectiveness of our proposed nuclei inpainting mechanism, panoptic-level adaptation, and task re-weighting mechanism. SIFA [2] focuses on domain-invariant features in the image and semantic levels, with a UDA semantic segmentation structure. As there exists a large number of nuclei objects in the histopathology images, the effectiveness of SIFA is still limited without any + +Table 3. In comparison with other unsupervised methods on both two histopathology datasets. + +
AJIPixel-F1Object-F1
w/o NI0.5042 ± 0.10340.7336 ± 0.08390.6958 ± 0.0832
w/o TR0.4969 ± 0.09720.7654 ± 0.06780.6923 ± 0.0778
w/o SEM0.5046 ± 0.10650.7470 ± 0.07540.6965 ± 0.0805
proposed0.5610 ± 0.07180.7882 ± 0.05330.7483 ± 0.0525
+ +Table 4. Ablation study on BBBC039V1 to Kumar experiment. NI, TR, and SEM represent the nuclei inpainting mechanism, task re-weighting mechanism, and semantic branch, respectively. + +instance-level learning or adaptation. Although DDMRL [21] only adapts the features at the image level, its performance is still at the same level as CyCADA, by adapting knowledge across various domains. Among all the comparison methods, Hou et al. [16] achieves the second-best performance. Due to the effectiveness of panoptic-level feature adaptation and task re-weighting mechanism, our method still outperforms it under all three metrics, in both two experiments. Fig. 5 are visualization examples of all the comparison methods. + +# 4.3.2 Ablation Study + +In order to test the effectiveness of each component in our proposed CyC-PDAM, ablation experiments are conducted on the Kumar dataset. Based on our CyC-PDAM, we remove the nuclei inpainting mechanism, task re-weighting mechanism, and semantic branch for panoptic-level adaptation and train the ablated models with the same setting and dataset as Sec. 4.3.1. Table 4 and Fig. 6 show the detailed results of the ablation experiment. As shown in Fig. 6, the method without nuclei inpainting mechanism (w/o NI) tends to ignore some nuclei, which increases the false-negative predictions. Moreover, we notice that there are also false split and merged predictions for w/o NI model. It is because the increasing false negative predictions are harmful to the spatial distribution of all the objects, which further affects the effectiveness of the semantic-level adaptation. Among the predictions of the method without task re-weighting mechanism (w/o TR), there exist some objects with irregular sizes. The task re-weighting mechanism prevents the model from being influenced by the domain-specific features in the source domain, and removing it, therefore, incurs source-biased predictions. Compared with our method, the model without semantic-branch (w/o SEM) is not able to learn domain-invariant features at the semantic level, including the spatial distribution of the nuclei objects + +
AJIPixel-F1
Methodsseenunseenallseenunseenall
CNN3 [24]0.5154 ± 0.08350.4989 ± 0.08060.5083 ± 0.06950.7301 ± 0.05900.8051 ± 0.10060.7623 ± 0.0946
DIST [35]0.5594 ± 0.05980.5604 ± 0.06630.5598 ± 0.07810.7756 ± 0.04890.8005 ± 0.05380.7863 ± 0.0550
Proposed0.5432 ± 0.04770.5848 ± 0.09510.5610 ± 0.09820.7743 ± 0.03580.8068 ± 0.06980.7882 ± 0.0533
Upper bound [22]0.5703 ± 0.04800.5778 ± 0.06710.5735 ± 0.08550.7796 ± 0.04190.8007 ± 0.05110.7886 ± 0.0531
+ +Table 5. Comparison experiments between our UDA method and fully supervised methods, for BBBC039V1 to Kumar experiment. For CNN3 and DIST, the results of object-level F1 are unknown. + +![](images/bebe12c70217ea3a254ca683db3abd8c6f5b0219e044c2023c2e6ac9c30403d5.jpg) +Figure 6. Visualization results for the ablation experiment. NI: nuclei inpainting mechanism; TR: task re-weighting mechanism; SEM: semantic branch. + +and the detailed information in the background. Therefore, there not only remain falsely split and merged predictions, but also false-positive and imperfect segmentation results. As shown in Table 4, the segmentation accuracy under three metrics decreases by $4 - 6\%$ after removing each module. In addition, the one-tailed paired t-test is employed to calculate the p-value between our proposed method and the other ablated methods. After adding each of the three modules, the improvements are statistically significant $(P < 0.05)$ , which further demonstrates the effectiveness of our proposed method. + +# 4.3.3 Comparison with Fully Supervised Methods + +As our data split in Kumar dataset is the same as several state-of-the-art methods for fully supervised nuclei segmentation, we compare their original reported results with ours. Table 5 illustrates the comparison results between our proposed UDA architecture and other fully supervised methods. CNN3 [24] is a contour-based nuclei segmentation architecture, which considers nuclei boundaries as the third class, in addition to the foreground and background classes. DIST [35] is a regression model based on the distance map. For Panoptic FPN [22], we directly train it using the same set of 16 real histopathology patches as CNN3 and DIST and it is employed as the upper bound of our unsupervised method. The testing images for Kumar are divided into two subsets: one contains 8 images from 4 organs known to training set, referred to as seen, and the other contains 6 images from 3 organs unknown to the training set, referred to as unseen. + +As shown in Table 5, the performance of our proposed + +UDA architecture is superior to the fully supervised CNN3 and DIST. It is because our proposed method is able to process each ROI on the local level, while CNN3 and DIST only process the image at a global semantic level. By adapting the semantic-level features of the foreground and the background, the performance of our method is at the same level as the fully supervised Panoptic FPN for the pixel-level F1-score. Even though our AJI is slight lower than the fully supervised Panoptic FPN, we notice that our method works better when tested on the unseen testing set. This is because our proposed CyC-PDAM focuses on learning the domain-invariant features and avoids being influenced by the domain bias of testing images from unseen organs. These results show that, although there remains large differences between the fluorescence microscopy images and histopathology images, our proposed UDA architecture still successfully narrows the domain gap between them, and achieves even better performance compared with fully supervised methods requiring histopathology nuclei annotations. + +# 5. Conclusion + +In this work, we propose a CyC-PDAM architecture for UDA nuclei segmentation in histopathology images. We firstly design a baseline architecture for UDA instance segmentation, including appearance-, image-, and instance-level adaptation. Next, a nuclei inpainting mechanism is designed to remove the auxiliary objects in the synthesized images, to further avoid false-negative predictions. In the feature-level adaptation, a semantic branch is proposed to adapt the features with respect to the foreground and background, and incorporating semantic- and instance-level adaptation enables the model to learn domain-invariant features at the panoptic level. In addition, a task re-weighting mechanism is proposed to reduce the bias. Extensive experiments on three public datasets indicate our proposed method outperforms the state-of-the-art UDA methods by a large margin and reaches the same level as the fully supervised methods. From a larger perspective, the UDA instance segmentation problems are not limited to histopathology image analysis. With the promising performance close to fully supervised methods in this work, we suggest that our proposed method can also contribute to other general image analysis applications. + +# References + +[1] Ajay Basavanhally, Michael Feldman, Natalie Shih, Carolyn Mies, John Tomaszewski, Shridar Ganesan, and Anant Madabhushi. Multi-field-of-view strategy for image-based outcome prediction of multi-parametric estrogen receptor-positive breast cancer histopathology: Comparison to onco-type dx. Journal of pathology informatics, 2, 2011. +[2] Cheng Chen, Qi Dou, Hao Chen, Jing Qin, and Pheng-Ann Heng. Synergistic image and feature adaptation: Towards cross-modality domain adaptation for medical image segmentation. In Association for the Advancement of Artificial Intelligence (AAAI), pages 865–872, 2019. +[3] Hao Chen, Xiaojuan Qi, Lequan Yu, Qi Dou, Jing Qin, and Pheng-Ann Heng. Dcan: Deep contour-aware networks for object instance segmentation from histology images. Medical Image Analysis, 36:135-146, 2017. +[4] Yuhua Chen, Wen Li, Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Domain adaptive faster R-CNN for object detection in the wild. In Computer Vision and Pattern Recognition (CVPR), pages 3339-3348, 2018. +[5] Frederic Clayton. Pathologic correlates of survival in 378 lymph node-negative infiltrating ductal breast carcinomas. mitotic count is the best single predictor. Cancer, 68(6):1309-1317, 1991. +[6] Qi Dou, Cheng Ouyang, Cheng Chen, Hao Chen, and Pheng-Ann Heng. Unsupervised cross-modality domain adaptation of convnets for biomedical image segmentations with adversarial loss. In International Joint Conferences on Artificial Intelligence (IJCAI), pages 691–697, 2018. +[7] Christopher W Elston and Ian O Ellis. Pathological prognostic factors in breast cancer. I. the value of histological grade in breast cancer: experience from a large study with long-term follow-up. Histopathology, 19(5):403-410, 1991. +[8] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In International Conference on Machine Learning (ICML), 2015. +[9] Simon Graham, Quoc Dang Vu, Shan E Ahmed Raza, Ayesha Azam, Yee Wah Tsang, Jin Tae Kwak, and Nasir Rajpoot. Hover-net: Simultaneous segmentation and classification of nuclei in multi-tissue histology images. Medical Image Analysis, 58:101563, 2019. +[10] David A Gutman, Jake Cobb, Dhananjaya Somanna, Yuna Park, Fusheng Wang, Tahsin Kurc, Joel H Saltz, Daniel J Brat, Lee AD Cooper, and Jun Kong. Cancer digital slide archive: an informatics resource to support integrated in silico analysis of TCGA pathology data. Journal of the American Medical Informatics Association, 20(6):1091-1098, 2013. +[11] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask R-CNN. In International Conference on Computer Vision (ICCV), pages 2980-2988, 2017. +[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition (CVPR), pages 770-778, 2016. +[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In Eu-ropean + +Conference on Computer Vision (ECCV), pages 630-645. Springer, 2016. +[14] Zhenwei He and Lei Zhang. Multi-adversarial faster-rcnn for unrestricted object detection. In International Conference on Computer Vision (ICCV), pages 6668-6677, 2019. +[15] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei A Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. International Conference on Machine Learning (ICML), 2018. +[16] Le Hou, Ayush Agarwal, Dimitris Samaras, Tahsin M Kurc, Rajarsi R Gupta, and Joel H Saltz. Robust histopathology image analysis: To label or to synthesize? In Computer Vision and Pattern Recognition (CVPR), pages 8533-8542, 2019. +[17] Xun Huang, Ming-Yu Liu, Serge Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. In European Conference on Computer Vision (ECCV), pages 172-189, 2018. +[18] Yue Huang, Han Zheng, Chi Liu, Xinghao Ding, and Gustavo K Rohde. Epithelium-stroma classification via convolutional neural networks and unsupervised domain adaptation in histopathological images. IEEE Journal of Biomedical and Health Informatics, 21(6):1625-1632, 2017. +[19] Naoto Inoue, Ryosuke Furuta, Toshihiko Yamasaki, and Kiyoharu Aizawa. Cross-domain weakly-supervised object detection through progressive domain adaptation. In Computer Vision and Pattern Recognition (CVPR), pages 5001-5009, 2018. +[20] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Computer Vision and Pattern Recognition (CVPR), pages 5967-5976. IEEE, 2017. +[21] Taekyung Kim, Minki Jeong, Seunghyeon Kim, Seokeon Choi, and Changick Kim. Diversify and match: A domain adaptive representation learning paradigm for object detection. In Computer Vision and Pattern Recognition (CVPR), pages 12456-12465, 2019. +[22] Alexander Kirillov, Ross Girshick, Kaiming He, and Piotr Dólar. Panoptic feature pyramid networks. In Computer Vision and Pattern Recognition (CVPR), pages 6399-6408, 2019. +[23] Alexander Kirillov, Kaiming He, Ross Girshick, Carsten Rother, and Piotr Dólar. Panoptic segmentation. In Computer Vision and Pattern Recognition (CVPR), pages 9404-9413, 2019. +[24] Neeraj Kumar, Ruchika Verma, Sanuj Sharma, Surabhi Bhargava, Abhishek Vahadane, and Amit Sethi. A dataset and a technique for generalized nuclear segmentation for computational pathology. IEEE Transactions on Medical Imaging, 36(7):1550-1560, 2017. +[25] V Le Doussal, M Tubiana-Hulin, S Friedman, K Hacene, F Spyratos, and M Brunet. Prognostic value of histologic grade nuclear components of Scarff-Bloom-Richardson (SBR). an improved score modification based on a multivariate analysis of 1262 invasive ductal breast carcinomas. Cancer, 64(9):1914-1921, 1989. + +[26] Yunsheng Li, Lu Yuan, and Nuno Vasconcelos. Bidirectional learning for domain adaptation of semantic segmentation. In Computer Vision and Pattern Recognition (CVPR), pages 6936-6945, 2019. +[27] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Computer Vision and Pattern Recognition (CVPR), pages 2117-2125, 2017. +[28] Dongnan Liu, Donghao Zhang, Yang Song, Heng Huang, and Weidong Cai. Cell r-cnn v3: A novel panoptic paradigm for instance segmentation in biomedical images. arXiv preprint arXiv:2002.06345, 2020. +[29] Dongnan Liu, Donghao Zhang, Yang Song, Chaoyi Zhang, Fan Zhang, Lauren ODonnell, and Weidong Cai. Nuclei segmentation via a deep panoptic model with semantic feature fusion. In International Joint Conferences on Artificial Intelligence (IJCAI), pages 861-868. AAAI Press, 2019. +[30] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In Advances in Neural Information Processing Systems (NeurIPS), pages 700-708, 2017. +[31] Vebjorn Ljosa, Katherine L Sokolnicki, and Anne E Carpenter. Annotated high-throughput microscopy image sets for validation. Nature Methods, 9(7):637-637, 2012. +[32] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I Jordan. Learning transferable features with deep adaptation networks. International Conference on Machine Learning (ICML), 2015. +[33] Faisal Mahmood, Daniel Borders, Richard Chen, Gregory N McKay, Kevan J Salimian, Alexander Baras, and Nicholas J Durr. Deep adversarial training for multi-organ nuclei segmentation in histopathology images. IEEE Transactions on Medical Imaging, 2018. +[34] Sidra Nawaz and Yinyin Yuan. Computational pathology: Exploring the spatial dimension of tumor ecology. Cancer letters, 380(1):296-303, 2016. +[35] Peter Naylor, Marick Laé, Fabien Reyal, and Thomas Walter. Segmentation of nuclei in histopathology images by deep regression of the distance map. IEEE Transactions on Medical Imaging, 2018. +[36] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on Knowledge and Data Engineering, 22(10):1345-1359, 2009. +[37] Taesung Park, Ming-Yu Liu, Ting-Chun Wang, and Jun-Yan Zhu. Semantic image synthesis with spatially-adaptive normalization. In Computer Vision and Pattern Recognition (CVPR), pages 2337-2346, 2019. +[38] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. NeurIPS 2017 Autodiff Workshop, 2017. +[39] Jian Ren, Ilker Hacihaliloglu, Eric A Singer, David J Foran, and Xin Qi. Adversarial domain adaptation for classification of prostate histopathology whole-slide images. In International Conference On Medical Image Computing Computer Assisted Intervention (MICCAI), pages 201-209. Springer, 2018. + +[40] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In Advances in Neural Information Processing Systems (NeurIPS), pages 91-99, 2015. +[41] Claude Elwood Shannon. A mathematical theory of communication. Bell System Technical Journal, 27(3):379-423, 1948. +[42] Baochen Sun, Jiashi Feng, and Kate Saenko. Return of frustratingly easy domain adaptation. In Association for the Advancement of Artificial Intelligence (AAAI), 2016. +[43] Alexandru Telea. An image inpainting technique based on the fast marching method. Journal of Graphics Tools, 9(1):23-34, 2004. +[44] Yi-Hsuan Tsai, Wei-Chih Hung, Samuel Schulter, Kiyuk Sohn, Ming-Hsuan Yang, and Manmohan Chandraker. Learning to adapt structured output space for semantic segmentation. In Computer Vision and Pattern Recognition (CVPR), pages 7472-7481, 2018. +[45] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In Computer Vision and Pattern Recognition (CVPR), pages 7167-7176, 2017. +[46] Tuan-Hung Vu, Himalaya Jain, Maxime Bucher, Matthieu Cord, and Patrick Pérez. ADVENT: Adversarial entropy minimization for domain adaptation in semantic segmentation. In Computer Vision and Pattern Recognition (CVPR), pages 2517-2526, 2019. +[47] Tao Wang, Xiaopeng Zhang, Li Yuan, and Jiashi Feng. Few-shot adaptive faster r-cnn. In Computer Vision and Pattern Recognition (CVPR), pages 7173-7182, 2019. +[48] Jun Wen, Risheng Liu, Nenggan Zheng, Qian Zheng, Zhefeng Gong, and Junsong Yuan. Exploiting local feature patterns for unsupervised domain adaptation. In Association for the Advancement of Artificial Intelligence (AAAI), volume 33, pages 5401-5408, 2019. +[49] Yuxin Wu and Kaiming He. Group normalization. In European Conference on Computer Vision (ECCV), pages 3-19, 2018. +[50] Donghao Zhang, Yang Song, Dongnan Liu, Haozhe Jia, Siqi Liu, Yong Xia, Heng Huang, and Weidong Cai. Panoptic segmentation with an end-to-end cell r-cnn for pathology image analysis. In International Conference On Medical Image Computing Computer Assisted Intervention (MICCAI), pages 237-244. Springer, 2018. +[51] Yue Zhang, Shun Miao, Tommaso Mansi, and Rui Liao. Task driven generative modeling for unsupervised domain adaptation: Application to x-ray image segmentation. In International Conference On Medical Image Computing Computer Assisted Intervention (MICCAI), pages 599-607. Springer, 2018. +[52] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In International Conference on Computer Vision (ICCV), pages 2223-2232, 2017. \ No newline at end of file diff --git a/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/images.zip b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..73731f4529d9d2064647a4d925ccefc186d1226c --- /dev/null +++ b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5894a4f9d1d1c2486a710a871137588d3f25698cf6540c92e819b6a25664b7d4 +size 545493 diff --git a/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/layout.json b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9ffbfc2c02f4cdb65e38d55fa97e116c18b0c645 --- /dev/null +++ b/unsupervisedinstancesegmentationinmicroscopyimagesviapanopticdomainadaptationandtaskreweighting/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0f1dfc01fb863e6f79a6e42c6aca20c6cb1a90e821e8d7dbb53259ab0886fa1 +size 396496 diff --git a/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/17800782-8603-40d2-95df-c669702bac2b_content_list.json b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/17800782-8603-40d2-95df-c669702bac2b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..66765d6f458be20c551a4f8fafa74d2d51e30daf --- /dev/null +++ b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/17800782-8603-40d2-95df-c669702bac2b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d11c22af5a3b1a1ab87aa5fcd3d878b6b217f9c25f2e03297fdf055c1c495f1 +size 79278 diff --git a/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/17800782-8603-40d2-95df-c669702bac2b_model.json b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/17800782-8603-40d2-95df-c669702bac2b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a9ae66e8ddfb1698584cdf99d0f18f4f3d6e0121 --- /dev/null +++ b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/17800782-8603-40d2-95df-c669702bac2b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df0afca91df97f1f54b48f8e16d2a40e794fa714e7a07c10c13a0f2616c5049e +size 94743 diff --git a/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/17800782-8603-40d2-95df-c669702bac2b_origin.pdf b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/17800782-8603-40d2-95df-c669702bac2b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..78630ff252664d7eccb0102d937974df39e0be5f --- /dev/null +++ b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/17800782-8603-40d2-95df-c669702bac2b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e9fb89df35d43de34a9ecd70dbb7e143abb91555eceabba4bb5d2c222279aab +size 780328 diff --git a/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/full.md b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/full.md new file mode 100644 index 0000000000000000000000000000000000000000..23fafa864e27dbd4469d5e74a77cfc3eae213f49 --- /dev/null +++ b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/full.md @@ -0,0 +1,341 @@ +# Unsupervised Intra-domain Adaptation for Semantic Segmentation through Self-Supervision + +Fei Pan + +Inkyu Shin + +Francois Rameau + +Seokju Lee + +In So Kweon + +KAIST, South Korea + +{feipan, dlsrbgg33, frameau, seokju91, iskweon77}@kaist.ac.kr + +# Abstract + +Convolutional neural network-based approaches have achieved remarkable progress in semantic segmentation. However, these approaches heavily rely on annotated data which are labor intensive. To cope with this limitation, automatically annotated data generated from graphic engines are used to train segmentation models. However, the models trained from synthetic data are difficult to transfer to real images. To tackle this issue, previous works have considered directly adapting models from the source data to the unlabeled target data (to reduce the inter-domain gap). Nonetheless, these techniques do not consider the large distribution gap among the target data itself (intra-domain gap). In this work, we propose a two-step self-supervised domain adaptation approach to minimize the inter-domain and intra-domain gap together. First, we conduct the inter-domain adaptation of the model, from this adaptation, we separate target domain into an easy and hard split using an entropy-based ranking function. Finally, to decrease the intra-domain gap, we propose to employ a self-supervised adaptation technique from the easy to the hard subdomain. Experimental results on numerous benchmark datasets highlight the effectiveness of our method against existing state-of-the-art approaches. The source code is available at https://github.com/feipan664/IntraDA.git. + +# 1. Introduction + +Semantic segmentation aims at assigning each pixel in the image to a semantic class. Recently, convolutional neural network-based segmentation models [13, 33] have achieved remarkable progresses, leading to various applications in computer vision systems, such as autonomous driving [14, 31], robotics [15, 23], and disease diagnosis [35, 32]. Training such a segmentation network requires large amounts of annotated data. However, collecting large scale datasets with pixel-level annotations for semantic seg + +![](images/9d41db220f2f4c381e06db8477a3832d0c10dff42fd1f6a8ca0b64c3fa29d8d3.jpg) +Source +image + +![](images/ebc5631992836498d7ba179642f888e38c759d2909787edbf5836be4f418c579.jpg) +label + +![](images/5f4df979b0caaf2df1452a1e3f9c8e23c4ea15915ea259ff3a4a6999fee11d76.jpg) +Target +hard image + +![](images/8e249f57f66c9ce99f4163482d2ac5e94a897103342b18766770c6378a041b2a.jpg) +noisy map +adapt + +![](images/f7dc8168b6464e1d57383e327c1f12177acd18562c2312d0bf2ea3da43a56130.jpg) +easy image + +![](images/addf46b196491c2f6042143a6c11fd613760d65fa70f813fe97eb170fd092b5d.jpg) +clean map + +![](images/536b44327f463107f489f65ad6dd54313e64c11c9c1afb0a230389e6f1286c12.jpg) +Figure 1: We propose a two-step self-supervised domain adaptation technique for semantic segmentation. Previous works solely adapt the segmentation model from the source domain to the target domain. Our work also consider adapting from the clean map to the noisy map within the target domain. + +mentation is difficult since they are expensive and labor intensive. Recently, photorealistic data rendered from simulators and game engines [19, 20] with precise pixel-level semantic annotations have been utilized to train segmentation networks. However, the models trained from synthetic data are hardly transferable to real data due to the cross-domain difference [11]. To address this issue, unsupervised domain adaptation (UDA) techniques have been proposed to align the distribution shift between the labeled source data and the unlabeled target data. For the particular task of semantic segmentation, adversarial learning-based UDA approaches demonstrate efficiency in aligning features at the image [16, 11] or output [26, 25] level. + +More recently, the entropy of pixel-wise output predictions proposed by [28] is also used for output level alignment. Other approaches [38, 37] involve generating pseudo labels for target data and conducting refinement via an iterative self-training process. While many models consider the single-source-single-target adaptation setting, recent works [18, 34] have proposed to address the issue of multiple source domains; it focuses on the multiple-source-single-target adaptation setting. Above all, previous works have mostly considered adapting models from the source data to the target data (inter-domain gap). + +However, target data collected from the real world have diverse scene distributions; these distributions are caused by various factors such as moving objects, weather conditions, which leads to a large gap in the target (intra-domain gap). For example, the noisy map and clean map in the target domain, shown in Figure 1, are the predictions made by the same model on different images. While previous studies solely focus on reducing the inter-domain gap, the problem of the intra-domain gap has attracted a relatively low attention. In this paper, we present a two-step domain adaptation approach to minimize the inter-domain and intra-domain gap. Our model consists of three parts, which are presented in Figure 2, namely, 1) an inter-domain adaptation module to close inter-domain gap between the labeled source data and the unlabeled target data, 2) an entropy-based ranking system to separate target data into the an easy and hard split, and 3) an intra-domain adaptation module to close intra-domain gap between the easy and hard split (using pseudo labels from the easy subdomain). For semantic segmentation, our proposed approach achieves good performance against state-of-the-art approaches on benchmark datasets. Furthermore, our approach outperforms previous domain adaptation approaches for digit classification. + +The Contributions of Our Work. First, we introduce the inter-domain gap among target data and propose an entropy-based ranking function to separate target domain into an easy and hard subdomain. Second, we propose a two-step self-supervised domain adaptation approach to minimize the inter-domain and intra-domain gap together. + +# 2. Related Works + +Unsupervised Domain Adaptation. The goal of unsupervised domain adaptation is to align the distribution shift between the labeled source and the unlabeled target data. Recently, adversarial-based UDA approaches have shown great capabilities in learning domain invariant features, even for complex tasks like semantic segmentation [28, 4, 26, 25, 21, 11, 17]. Adversarial-based UDA models for semantic segmentation usually involve two networks. One network is used as a generator to predict + +the segmentation maps of input images, which can be from the source or the target. Given features from the generator, the second network functions as a discriminator to predict the domain labels. The generator tries to fool the discriminator, so as to align the distribution shift of the features from the two domains. Besides feature level alignment, other approaches try to align domain shift at the image level or output level. At the image level, CycleGAN [36] was applied in [11] to build generative images for domain alignment. At the output level, [25] proposes an end-to-end model involving structural output alignment for distribution shift. More recently, [28] takes advantage of the entropy of pixel-wise predictions from the segmentation outputs to address the domain gap. While all the previous studies exclusively considered aligning the inter-domain gap, our approach further minimizes the intradomain gap. Thus, our technique can be combined with most existing UDA approaches for extra performance gains. + +Uncertainty via Entropy. Uncertainty measurement has a strong connection with unsupervised domain adaptation. For instance, [28] proposes minimizing the target entropy value of the model outputs directly or using adversarial learning [25, 11] to close the domain gap for semantic segmentation. Also the entropy of the model outputs [29] is used as a confidence measurement for transferring samples across domains [24]. We propose utilizing entropy to rank target images to separate them into two an easy and hard split. + +Curriculum Domain Adaptation. Our work is also related to curriculum domain adaptation [22, 31, 7] which deals with easy samples first. For curriculum domain adaptation on foggy scene understanding, [22] proposes to adapt a semantic segmentation model from non-foggy images to synthetic light foggy images, and then to real heavy foggy images. To generalize this concept, [7] decomposes the domain discrepancy into multiple smaller discrepancies by introducing unlabeled intermediate domains. However, these techniques require additional information to decompose domains. To cope with this limitation, [31] focuses on learning the global and local label distributions of images as the first task to regularize the model predictions in the target domain. In contrast, we propose a simpler and data-driven approach to learn the easy target samples based on an entropy ranking system. + +# 3. Approach + +Let $S$ denote a source domain consisting of a set of images $\subset \mathbb{R}^{H\times W\times 3}$ with their associated ground-truth $C$ -class segmentation maps $\subset (1,C)^{H\times W}$ ; similarly, let $\mathcal{T}$ denote a target domain containing a set of unlabeled images $\subset \mathbb{R}^{H\times W\times 3}$ . In this section, a two-step self-supervised do + +![](images/e6428cfac9778393ff429ac11c2fdc5dc7a403fb203ac89867da972eb0c8295d.jpg) +Figure 2: The proposed self-supervised domain adaptation model contains the inter-domain generator and discriminator $\{G_{inter},D_{inter}\}$ , and the intra-domain generator and discriminator $\{G_{intra},D_{intra}\}$ . The proposed model consists of three parts, namely, (a) an inter-domain adaptation, (b) an entropy-based ranking system, and (c) an intra-domain adaptation. In (a), given the source and the unlabeled target data, $D_{inter}$ is trained to predict the domain label for the samples while $G_{inter}$ is trained to fool $D_{inter}$ . $\{G_{inter},D_{inter}\}$ are optimized by minimizing the segmentation loss $\mathcal{L}_{inter}^{seg}$ and the adversarial loss $\mathcal{L}_{inter}^{adv}$ . In (b), an entropy based function $R(I_t)$ is used separate all target data into easy split and hard split. An hyperparameter $\lambda$ is introduced as a ratio of target images assigned into the easy split. In (c), an intra-domain adaptation is used to close the gap between easy split and hard split. The segmentation predictions of easy split data from $G_{inter}$ serve as pseudo labels. Given easy split data with pseudo labels and hard split data, $D_{intra}$ is used to predict whether the sample is from easy split or hard split, while $G_{intra}$ is trained to confuse $D_{intra}$ . $\{G_{intra}$ and $D_{intra}\}$ are optimized using the intra-domain segmentation loss $\mathcal{L}_{intra}^{seg}$ and the adversarial loss $\mathcal{L}_{intra}^{adv}$ . + +main adaptation for semantic segmentation is introduced. The first step is the inter-domain adaptation, which is based on common UDA approaches [28, 25]. Then, the pseudo labels and predicted entropy maps of target data are generated such that the target data can be clustered into an easy and hard split. Specifically, an entropy-based ranking system is used to cluster the target data into the easy and hard split. The second step is the intra-domain adaptation, which consists in aligning the easy split with pseudo labels to the hard split, as shown in Figure 2. The proposed network consists of the inter-domain generator and discriminator $\{G_{inter}, D_{inter}\}$ , and the intra-domain generator and discriminator $\{G_{intra}, D_{intra}\}$ . + +# 3.1. Inter-domain Adaptation + +A sample $X_{s} \in \mathbb{R}^{H \times W \times 3}$ is from the source domain with its associated map $Y_{s}$ . Each entry $Y_{s}^{(h,w)} = \left[Y_{s}^{(h,w,c)}\right]_{c}$ of $Y_{s}$ provides a label of a pixel $(h,w)$ as a one-hot vector. The network $G_{inter}$ takes $X_{s}$ as an input and generates a "soft-segmentation map" $P_{s} = G_{inter}(X_{s})$ . + +Each $C$ -dimensional vector $\left[P_s^{(h,w,c)}\right]_c$ at a pixel $(h,w)$ serves as a discrete distribution over $C$ classes. Given $X_{s}$ with its ground-truth annotation $Y_{s}$ , $G_{inter}$ is optimized in a supervised way by minimizing the cross-entropy loss: + +$$ +\mathcal {L} _ {i n t e r} ^ {s e g} (X _ {s}, Y _ {s}) = - \sum_ {h, w} \sum_ {c} Y _ {s} ^ {(h, w, c)} \log (P _ {s} ^ {(h, w, c)}). (1) +$$ + +To close the inter-domain gap between the source and target domains, [28] proposes to utilize entropy maps in order to align the distribution shift of the features. The assumption of [28] is that the trained models tend to produce overconfident (low-entropy) predictions for source-like images, and under-confident (high-entropy) predictions for target-like images. Due to its simplicity and effectiveness, [28] is adopted in our work to conduct inter-domain adaptation. The generator $G_{inter}$ takes a target image $X_{t}$ as an input and produces the segmentation map $P_{t} = G_{inter}(X_{t})$ ; the entropy map $I_{t}$ is formulated as: + +$$ +I _ {t} ^ {(h, w)} = \sum_ {c} - P _ {t} ^ {(h, w, c)} \cdot \log \left(P _ {t} ^ {(h, w, c)}\right). \tag {2} +$$ + +To align the inter-domain gap, $D_{inter}$ is trained to predict the domain labels for the entropy maps, while $G_{inter}$ is trained to fool $D_{inter}$ ; the optimization of $G_{inter}$ and $D_{inter}$ is achieved via the following loss function: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {i n t e r}} ^ {\text {a d v}} \left(X _ {s}, X _ {t}\right) = - \sum_ {h, w} \log \left(1 - D _ {\text {i n t e r}} \left(I _ {s} ^ {(h, w)}\right)\right) \tag {3} \\ + \log (D _ {i n t e r} (I _ {t} ^ {(h, w)})), \\ \end{array} +$$ + +where $I_{s}$ is the entropy map of $X_{s}$ . The loss function $\mathcal{L}_{inter}^{adv}$ and $\mathcal{L}_{inter}^{seg}$ are optimized to align the distribution shift between the source and target data. However, there remains a need for an efficient method that can minimize the intradomain gap. For this purpose, we propose to separate the target domain into an easy and hard split and to conduct an intra-domain adaptation. + +# 3.2. Entropy-based Ranking + +Target images collected from the real world have diverse distributions due to various weather conditions, moving objects, and shading. In Figure 2, some target prediction maps are clean ${}^{1}$ and others are very noisy, despite being generated from the same model. Since the intra-domain gap exists among target images, a straightforward solution is to decompose the target domain into small subdomains/splits. However, it remains a challenging task due to the lack of target labels. To build these splits, we take advantage of the entropy maps in order to determine the confidence levels of the target predictions. The generator ${G}_{\text{inter }}$ takes a target image ${X}_{t}$ as input to generate ${P}_{t}$ and the entropy map ${I}_{t}$ . On this basis,we adopt a simple yet effective way for ranking by using: + +$$ +R \left(X _ {t}\right) = \frac {1}{H W} \sum_ {h, w} \sum_ {c} I _ {t} ^ {(h, w, c)}, \tag {4} +$$ + +which is the mean value of entropy map $I_{t}$ . Given a ranking of scores from $R(X_{t})$ , hyperparameter $\lambda$ is introduced as a ratio to separate the target images into an easy and hard split. Let $X_{te}$ and $X_{th}$ denote a target image assigned to the easy and hard split, respectively. In order to conduct domain separation, we define $\lambda = \frac{|X_{te}|}{|X_{t}|}$ , where $|X_{te}|$ is the cardinality of the easy split, and $|X_{t}|$ is the cardinality of the whole target image set. To access the influence of, we conduct an ablation study on how to optimize $\lambda$ in Table 3. Note that we do not introduce a hyperparameter as the threshold value for separation. The reason is that the threshold value is dependent on a specific dataset. However, we choose a hyperparameter as ratio, which shows strong generalization to other datasets. + +# 3.3. Intra-domain Adaptation + +Since no annotation is available for the easy split, directly aligning the gap between the easy and hard split is infeasible. But we propose to utilize the predictions from $G_{inter}$ as pseudo labels. Given an image from the easy split $X_{te}$ , we forward $X_{te}$ to $G_{inter}$ and obtain the prediction map $P_{te} = G_{inter}(X_{te})$ . While $P_{te}$ is a "soft-segmentation map", we convert $P_{te}$ to $\mathcal{P}_{te}$ where each entry is a one-hot vector. With the aid of pseudo labels, $G_{intra}$ is optimized by minimizing the cross-entropy loss: + +$$ +\begin{array}{l} \mathcal {L} _ {i n t r a} ^ {s e g} (X _ {t e}) = \\ - \sum_ {h, w} \sum_ {c} \mathcal {P} _ {t e} ^ {(h, w, c)} \log \left(G _ {\text {i n t r a}} \left(X _ {t e}\right) ^ {(h, w, c)}\right). \tag {5} \\ \end{array} +$$ + +To bridge the intra-domain gap between easy and hard split, we adopt the alignment on the entropy map for both splits. An image $X_{th}$ from hard split is taken as input to the generator $G$ to generate the segmentation map $P_{th} = G(X_{th})$ and the entropy map $I_{th}$ . To close the inter-domain gap, the intra-domain discriminator $D_{intra}$ is trained to predict the split labels of $I_{te}$ and $I_{th}$ : $I_{te}$ is from the easy split, and $I_{th}$ is from the hard split. $G$ is trained to fool $D_{intra}$ . The adversarial learning loss to optimize $G_{intra}$ and $D_{intra}$ is formulated as: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {i n t r a}} ^ {\text {a d v}} \left(X _ {t e}, X _ {t h}\right) = - \sum_ {h, w} \log \left(1 - D _ {\text {i n t r a}} \left(I _ {t e} ^ {(h, w)}\right)\right) \tag {6} \\ + \log (D _ {i n t r a} (I _ {t h} ^ {(h, w)})). \\ \end{array} +$$ + +Finally, our complete loss function $\mathcal{L}$ is formed by all the loss functions: + +$$ +\mathcal {L} = \mathcal {L} _ {\text {i n t e r}} ^ {\text {s e g}} + \mathcal {L} _ {\text {i n t e r}} ^ {\text {a d v}} + \mathcal {L} _ {\text {i n t r a}} ^ {\text {s e g}} + \mathcal {L} _ {\text {i n t r a}} ^ {\text {a d v}}, \tag {7} +$$ + +and our objective is to learn a target model $G$ according to: + +$$ +G ^ {*} = \underset {G _ {\text {i n t r a}}} {\arg \min } \underset {G _ {\text {i n t r a}} ^ {G _ {\text {i n t e r}}}} {\min } \underset {D _ {\text {i n t e r}} ^ {D _ {\text {i n t r a}}}} {\max } \mathcal {L}. \tag {8} +$$ + +Since our proposed model is two-step self-supervised approach, it is difficult to minimize $\mathcal{L}$ in one training stage. Thus, we choose to minimize it in three stages. First, we train the inter-domain adaptation for the model to optimize $G_{inter}$ and $D_{inter}$ . Second, we generate target pseudo labels by utilizing $G_{inter}$ and rank all target images based on $S(X_{t})$ . Finally, we train the intra-domain adaptation to optimize $G_{intra}$ and $D_{intra}$ . + +# 4. Experiments + +In this section, we introduce the experimental details of the inter-domain and the intra-domain adaptation on semantic segmentation. + +Table 1: The semantic segmentation results of Cityscapes validation set with models trained on GTA5 (a), SYNTHIA (b), and Synscapes (c). All the results are generated from the ResNet-101-based models. In the experiments of (a) and (b), AdvEnt[28] is used as the framework for the inter-domain adaptation and intra-domain adaptation. In the experiment of (c), AdaptSegNet [25] is used as the framework of the inter-domain adaptation and intra-domain adaptation. mIoU* in (b) denotes the mean IoU of 13 classes, excluding the classes with * . + +(a) GTA5 $\rightarrow$ Cityscapes + +
MethodroadsidewalkbuildingwallfencepolelightsignvegterrainskypersonridercartruckbustrainmbikebikemIoU
Without adaptation [25]75.816.877.212.521.025.530.120.181.324.670.353.826.449.917.225.96.525.336.036.6
ROAD [5]76.336.169.628.622.428.629.314.882.335.372.954.417.878.927.730.34.024.912.639.4
AdaptSegNet [25]86.536.079.923.423.323.935.214.883.433.375.658.527.673.732.535.43.930.128.142.4
MinEnt [28]84.225.277.017.023.324.233.326.480.732.178.757.530.077.037.944.31.831.436.943.1
AdvEnt [28]89.936.581.629.225.228.532.322.483.934.077.157.427.983.729.439.11.528.423.343.8
Ours90.637.182.630.119.129.532.420.685.740.579.758.731.186.331.548.30.030.235.846.3
+ +(b) SYNTHIA $\rightarrow$ Cityscapes + +
Methodroadsidewalkbuildingwall*fence*pole*lightsignvegskypersonridercarbusmbikebikemIoUmIoU*
Without adaptation [25]55.623.874.69.20.224.46.112.174.879.055.319.139.623.313.725.033.538.6
AdaptSegNet [25]81.739.178.411.10.325.86.89.079.180.854.821.066.834.713.829.939.645.8
MinEnt [28]73.529.277.17.70.227.07.111.476.782.157.221.369.429.212.927.938.144.2
AdvEnt [28]87.044.179.79.60.624.34.87.280.183.656.423.772.732.612.833.740.847.6
Ours84.337.779.55.30.424.99.28.480.084.157.223.078.038.120.336.541.748.9
+ +(c) Synscapes $\rightarrow$ Cityscapes + +
MethodroadsidewalkbuildingwallfencepolelightsignvegterrainskypersonridercartruckbustrainmbikebikemIoU
Without adaptation81.840.676.123.316.836.936.840.183.034.884.959.937.778.420.420.57.827.352.545.3
AdaptSegNet [25]94.260.985.129.125.238.643.940.885.229.788.264.440.685.831.543.028.330.556.752.7
Ours94.060.084.929.526.238.541.643.785.331.788.266.344.785.730.753.029.536.560.254.2
+ +# 4.1. Datasets + +In the experiments of semantic segmentation, we adopt the setting of adaptation from the synthetic to the real domain. To conduct this series of tests, synthetic datasets including GTA5 [19], SYNTHIA [20] and Synscapes [30] are used as source domains, along with the real-world dataset Cityscapes [6] as the target domain. Models are trained given labeled source data and unlabeled target data. Our model is evaluated on Cityscapes validation set. + +- GTA5: The synthetic dataset GTA5 [19] contains 24,966 synthetic images with a resolution of $1914 \times 1052\mathrm{px}$ and corresponding ground-truth annotations. These synthetic images are collected from a video game based on the urban scenery of Los Angeles city. The ground-truth annotations generated automatically contain 33 categories. For training, we consider only 19 categories which are compatible with the Cityscapes dataset [6], similarly to previous work. +- SYNTHIA: SYNTHIA-RAND-CITYSCAPES [20] is used as another synthetic dataset. It contains 9,400 fully annotated RGB images. During the training time, we consider the 16 common categories with the + +Cityscapes dataset. During evaluation, 16- and 13-class subsets are used to evaluate the performance. + +- Synscapes: Synscapes [30] is a photorealistic synthetic dataset consisting of 25,000 fully annotated RGB images with a resolution of $1440 \times 720\mathrm{px}$ . Alike Cityscape, the ground-truth annotations contain 19 categories. +- Cityscapes: As the dataset collected from real world, Cityscapes [6] provides 3975 images with fine segmentation annotations. 2975 images are taken from the training set of Cityscapes to be used for training. The 500 images from the evaluation set of Cityscapes are used to evaluate the performance of our model. + +Evaluation. The semantic segmentation performance is evaluated on every category using the PASCAL VOC intersection-over-union metric, i.e., IoU = TP/(TP + FP + FN) [9], where TP, FP, and FN are the number of true positive, false positive, and false negative pixels, respectively. + +Implementation Details. In the experiments for GTA5 $\rightarrow$ Cityscapes and SYNTHIA $\rightarrow$ Cityscapes, we utilize + +Table 2: The self-training and intra-domain adaptation gain on GTA5 $\rightarrow$ Cityscapes. + +
ModelmIoU
AdvEnt [25]43.8
AdvEnt + intra-domain adaptation45.1
AdvEnt self-training (λ = 1.0)45.5
Ours46.3
Ours + entropy normalization47.0
+ +Table 3: The ablation study on hyperparameter $\lambda$ for separating the target domain into the easy and the hard split. + +
GTA5 → Cityscapes
λ0.00.50.60.670.71.0
mIoU43.845.246.046.345.645.5
+ +the framework of AdvEnt [28] to train $G_{inter}$ and $D_{inter}$ for inter-domain adaptation; the backbone of $G_{inter}$ is a ResNet-101 architecture [10] with pretrained parameters from ImageNet [8]; the input data are labeled source images and unlabeled target images. The model for inter-domain adaptation $G_{inter}$ is trained for 70,000 iterations. After training, $G_{inter}$ is used to generate the segmentation and entropy maps for all 2,975 images from Cityscapes training set. Then, we utilize $R(I_t)$ to get the ranking scores for all target images and to separate them into the easy and hard split based on $\lambda$ . We conduct an ablation study of $\lambda$ for optimization in Table 3. For the intra-domain adaptation, $G_{inter}$ has same architecture as $G_{inter}$ , and $D_{intra}$ same as $D_{inter}$ ; the input data are 2,975 Cityscapes training images with pseudo labels of easy split. $G_{intra}$ is trained with the pretrained parameters from ImageNet and $D_{intra}$ from scratch, similar to AdvEnt. In addition to the previously mentioned experiments, we also conduct the experiment for Synscapes→Cityscapes. For comparison with AdaptSegNet [25], We apply the framework of AdaptSegNet in the experiment for the inter-domain and intra-domain adaptation. + +Similarly to [28] and [25], we utilize the multi-level feature outputs from conv4 and conv5 for inter-domain adaptation and intra-domain adaptation. To train $G_{inter}$ and $G_{intra}$ , we apply an SGD optimizer [2] with a learning rate of $2.5 \times 10^{-4}$ , momentum 0.9, and a weight decay $10^{-4}$ for training $G_{inter}$ and $G_{intra}$ . An Adam optimizer [12] with a learning rate of $10^{-4}$ is used for training $D_{inter}$ and $D_{intra}$ . + +# 4.2. Results + +GTA5. In Table 1 (a), we compare the segmentation performance of our method with other state-of-the-art methods [25, 5, 28] on Cityscapes validation set. For a fair comparison, the baseline model is adopted from DeepLab + +v2[3] with a ResNet-101 backbone. Overall, our proposed method achieves $46.3\%$ in mean IoU. Compared to AdvEnt, the intra-domain adaptation from our method leads to a $2.5\%$ improvement in mean IoU. + +To highlight the relevance of the proposed intra-domain adaptation, we conduct a comparison with segmentation loss $\mathcal{L}_{intra}^{seg}$ and adversarial adaptation loss $\mathcal{L}_{intra}^{adv}$ in Table 2. The baseline AdvEnt [28] achieves $43.8\%$ of mIoU. By using AdvEnt + intra-domain adaptation, which means $\mathcal{L}_{intra}^{seg} = 0$ , we obtain $45.1\%$ , showing the effectiveness of adversarial learning for the intra-domain alignment. By applying AdvEnt + self-training, with $\lambda = 1.0$ (all pseudo labels used for self-training), which means $\mathcal{L}_{intra}^{adv} = 0$ , we achieve $45.5\%$ of mIoU, underlying the importance of employing pseudo labels. Finally, our proposed model achieves $46.3\%$ of mIoU (self-training + intra-domain alignment). + +Admittedly, complex scenes (containing many objects) might be categorized as "hard". To provide a more representative "ranking", we adopt a new normalization by dividing the mean entropy with the number of predicted rare classes in the target image. For Cityscapes dataset, we define these rare classes as "wall, fence, pole, traffic light, traffic sign, terrain, rider, truck, bus, train, motor". The entropy normalization helps to move images with many objects to the easy split. By using the normalization, our proposed model achieves $47.0\%$ of mIoU, as shown in Table 2. Our proposed method also has limitation for some classes. + +In Figure 3, we provide some visualizations of segmentation maps from our technique. The segmentation maps generated from our model trained with inter-domain alignment and intra-domain alignment are more accurate than the baseline model AdvEnt, which has been only trained with inter-domain alignment. A representative set of images belonging to the "hard" split are visible in Figure 4. After intra-domain alignment, we produce the segmentation maps shown in the (d) column. Compared with (c) column, our model can be transferred to more difficult target images. + +Analysis of Hyperparameter $\lambda$ . We conduct a study on finding a proper value for the hyperparameter $\lambda$ in our experiment of GTA5→Cityscapes. In Table 3, different values of $\delta$ are used for setting up the decision boundary for domain separation. When $\lambda = 0.67$ , i.e., the ratio of $|X_{te}|$ to $|X_{t}|$ is approximately 2/3, the model achieves 46.3 of mIoU as the best performance on Cityscapes validation set. + +SYNTHIA. We use SYNTHIA as the source domain and present evaluation results of the proposed method and state-of-the-art methods [25, 28] on Cityscapes validation set in the Table 1. For a fair comparison, we also adopt the same DeepLab-v2 with the ResNet-101 architecture. Our method is evaluated on both 16-class and 13-class + +![](images/cae2b561ddcfa05336d48bc98d2581341eb81a10271e3b1d43a869f200ce0318.jpg) + +![](images/158fa0b5695838f7dbfefd8a89c7f35019d195f5b077587287619f856ca7be94.jpg) + +![](images/e9494583fd3df4aa835382f891fdd9de5fa43c26e17458ca4d5ccdefdcacb04d.jpg) + +![](images/fc2c3c3945dd7aa00ab145cb9f1f62ef548b9bd3a291f4a978e9531fc9b756ce.jpg) +(a) Target Images + +![](images/e29df82b2be53c2ff3d22b5684be16f17d6a85539bf4fb5ad7f07591183b9bc0.jpg) + +![](images/1b46034805dcf340f9295708a1f58a1e81bbe51d6cc4836d5eb1aa83ad663e41.jpg) + +![](images/b7109b7530ddbf04509c97472e29f4f1e066f94ba4b87195df9a85f2cff058d6.jpg) + +![](images/82c8d871f60dfeca2712868b0d35162039907749704d0f16de73e9a52e33779a.jpg) +(b) Inter-domain Adaptation + +![](images/594725dd2aa4824d9a3cc4a2817a2faddfb1b480b3484d4cddc92e0e53034d2d.jpg) + +![](images/c3ea691c4e563d9c735be605d648f47247f1a81a75b5c4ca04892d9e9cb4b931.jpg) + +![](images/aa3fcd8e96d67f38f48d1d71b960a242e9169ad46f75c91c3c3ccc6ac75fb8a9.jpg) + +![](images/fa219dfb58a67b7db40c0ea0576aca6a0392530c44be934dcd5e6aa664dc7915.jpg) +(c) Ours +Figure 3: The example results of evaluation for $\mathrm{GTA5}\rightarrow \mathrm{Cityscapes}$ . (a) and (d) are the images from Cityscapes validation set and the corresponding ground-truth annotation. (b) are the predicted segmentation maps of the inter-domain adaptation [28]. (c) are the predicted maps from our technique. + +![](images/a05ef103513d4215e89b12bdaeedb27738280e2c294976fd624f59be11f797f3.jpg) + +![](images/bfc4f4abc9a6ec7c13e3d56c00ef503776225d9be0d20b2a8bf9cda0de15774e.jpg) + +![](images/6aef7c5408ce424975996cfa4f981c2fe4b832669fb14028f1ed18445b8ab003.jpg) + +![](images/1506cb490543b03b28c01f6d99bb99d2c5c0142fa66f40f54d57d6ccd1469bcc.jpg) +(d) Ground Truth + +basielines. According to the results in Table 1 (b), our proposed method has achieved $41.7\%$ and $48.9\%$ of mean IoU on 16-class and 13-class baseline, respectively. As shown in the Table 1, our model is significantly more accurate on the car and motor bike classes than existing techniques. The reason is that we apply the intra-domain adaptation to further narrow the domain gap. + +Synscapes. The only work that we currently have found using Syncapes dataset is [25]. Thus we use AdaptSegNet [25] as our baseline model. In order to present a fair comparison, We only consider using vanilla-GAN in our experiments. With inter-domain and intra-domain adaptation, our model achieves $54.2\%$ of mIoU, which higher than AdaptSegNet shown in Table 1 (c). + +# 4.3. Discussion + +Theoretical Analysis. Comparing (a), (b) in Table 1, GTA5 to Cityscapes is more effective than SYNTHIA to Cityscapes. We believe the reason is that GTA5 has more similar images of street scenes with Cityscapes than other synthetic datasets. We also provide a theoretical analysis. Let $\mathcal{H}$ denote the hypothesis class, $S$ and $T$ be the source and the target domain. The theory from [1] proposes to bound the expected error on the target + +domain $\epsilon_T(h)$ : $\forall h\in \mathcal{H},\epsilon_T(h)\leq \epsilon_S(h) + \frac{1}{2} d_{\mathcal{H}}(S,T) + \Lambda$ where $\epsilon_S(h)$ is the expected error on the source domain, $d_{\mathcal{H}}(S,T) = 2\sup |\mathrm{Pr}_S(h) - \mathrm{Pr}_T(h)|$ is the distance for domain divergence, and $\Lambda$ is considered as a constant in normal cases. Therefore, $\epsilon_T(h)$ is upper bounded by $\epsilon_S(h)$ and $d_{\mathcal{H}}(S,T)$ in our case. Our proposed model is to minimize $d_{\mathcal{H}}(S,T)$ by using the inter-domain and the intra-domain alignment together. If $d_{\mathcal{H}}(S,T)$ has high value, the higher upper bound in the first stage of the inter-domain adaptation affects our entropy ranking system, and the intra-domain adaptation processes. Therefore, our model is less efficient in big domain gap. With respect to the limitation, our model performance is affected by $d_{\mathcal{H}}(S,T)$ and $\epsilon_S(h)$ . Firstly, the larger divergence of the source and target domain leads to higher value in $d_{\mathcal{H}}(S,T)$ . The upper bound of error is higher so our model would be less effective. Secondly, $\epsilon_S(h)$ would be very high when the model uses small neural networks. In such case, our model would also be less effective. + +Digit Classification. Our model are also capable to be applied in digit classification task. We consider the adaptation shift of MNIST $\rightarrow$ USPS, USPS $\rightarrow$ MNIST, and SVHN $\rightarrow$ MNIST. Our model is trained using the training sets: MNIST with 60000 images, USPS with 7291 images, + +![](images/e4361e05939696c562416aff4ca8aa6eb067afbe09ebe115538d4f5e9677b5c9.jpg) + +![](images/9836ae912480427250416eaf3531b9d975caecde4dc86a15ab09163206a23bd6.jpg) + +![](images/4ab3ad3149c22af79eab3982e2ddf45dc6580cb354204685bbb27ac4fa267e54.jpg) + +![](images/d5bbb23271efd06e5c6f2c9e9abeccbdbbc6a4583cd2dae6f1cfb95f4036b962.jpg) + +![](images/ec423a70cf0dcab2813ebe2d025a5cd344aa4d8399dfc448ccabe397c267973e.jpg) + +![](images/c89e2ae53d4d13902af4fc5c5b3b852061278d719de5852ba24854d5370d44ce.jpg) + +![](images/7d850bb8a81b66ecf9ba0817fd13688915041da7136efa0dca4667d666cf0498.jpg) + +![](images/46d4d7bf43829457be3bdf6838de69997645be26fd99cdbf427b8d0df5e0b048.jpg) + +![](images/e0e7c25e6d1b16d309b482309854ef49d5fcc229d77200322bb6644747fd7bf2.jpg) + +![](images/25e78e9dc07edb2204431c8a1a9901b71208e5f469d74be09d64150a4f5e65ec.jpg) + +![](images/b6d0f244704dc74c89518a42438861bfd08ba380b933543c33fb04192e27b85d.jpg) + +![](images/c257cf1b52253c0d8bf86a0dec4cc4a4d5a17bf1569f247411e1c32856a6c502.jpg) + +![](images/90becb4eb51ec4ff0fde27ea6ad026372d1fc449c58ca250d185d88cbc0d799a.jpg) +(a) Hard Images + +![](images/dd29a4c55e80632b827270987554fb675082b94005923b79c0997aedf767919e.jpg) +(b) Entropy Maps + +![](images/51776f081458c2b60c0e87297b4f6b3066c6d973bb1d91edbd1ce80170760490.jpg) +Figure 4: The examples of entropy maps from hard split for GTA5 $\rightarrow$ Cityscapes. (a) are the hard images from Cityscapes training set. (b) and (c) are the predicted entropy and segmentation maps from model trained solely by the inter-domain adaptation [28]. (d) are the improved predicted segmentation results of the hard images from our model. + +![](images/115436cb3f4f6bbb14b1e28d87db8a5d24f10303d48bd1b3b4f6fc56decc5097.jpg) +(c) Inter-domain Adaptation +(d) Ours + +Table 4: The experimental results of adaptation across digit datasets. + +
ModelMNIST → USPSUSPS → MNISTSVHN → MNIST
Source only82.2±0.869.6±3.867.1±0.6
ADDA [27]89.4±0.290.1±0.876.0±1.8
CyCADA [11]95.6±0.296.5±0.190.4±0.4
Ours95.8±0.197.8±0.195.1±0.3
+ +standard SVHN with 73257 images. The proposed model is evaluated on the standard test sets: MNIST with 10000 images and USPS with 2007 images. In digit classification task, $G_{inter}$ and $G_{intra}$ serve as classifiers with same architecture, which is based on a variant of the LeNet architecture. In inter-domain adaptation, We utilize the framework of CyCADA [11] to train $G_{inter}$ and $D_{inter}$ . In the ranking stage, we utilize $G_{inter}$ to generate the predictions of all target data and compute their ranking score using $R(X_t)$ . With respect to $\lambda$ , we adopted $\lambda = 0.8$ in all experiments. Our network for intra-domain adaptation is also based on CyCADA [11]. In Table 4, our proposed model achieve $95.8 \pm 0.1\%$ of accuracy on MNIST $\rightarrow$ USPS, $97.8 \pm 0.1\%$ of accuracy on USPS $\rightarrow$ MNIST, and $95.1 \pm 0.3\%$ on SVHN $\rightarrow$ MNIST. Our model outperforms the baseline model CyCADA [11]. + +# 5. Conclusion + +In this paper, we present a self-supervised domain adaptation to minimize the inter-domain and intra-domain gap simultaneously. We first train the model using the inter-domain adaptation from existing approaches. Secondly, we produce target image entropy maps and use an entropy-based ranking functions to split the target domain. Lastly, we conduct the intra-domain adaptation to further narrow the domain gap. We conduct extensive experiments on synthetic to real images in traffic scenarios. Our model can be combined with existing domain adaptation approaches. Experimental results show that our model outperforms existing adaptation algorithms. + +# Acknowledgments + +This research was partially supported by the Shared Sensing for Cooperative Cars Project funded by Bosch (China) Investment Ltd. This work was also partially supported by the Korea Research Fellowship Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Science, ICT and Future Planning (2015H1D3A1066564). + +# References + +[1] Shai Ben-David, John Blitzer, Koby Crammer, and Fernando Pereira. Analysis of representations for domain adaptation. In NeurIPS, pages 137-144, 2007. 7 +[2] Léon Bottou. Large-scale machine learning with stochastic gradient descent. In Proceedings of COMPSTAT'2010, pages 177-186. Springer, 2010. 6 +[3] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. PAMI, 40(4):834-848, 2017. 6 +[4] Minghao Chen, Hongyang Xue, and Deng Cai. Domain adaptation for semantic segmentation with maximum squares loss. In ICCV, pages 2090-2099, 2019. 2 +[5] Yuhua Chen, Wen Li, and Luc Van Gool. Road: Reality oriented adaptation for semantic segmentation of urban scenes. In CVPR, pages 7892-7901, 2018. 5, 6 +[6] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. 5 +[7] Shuyang Dai, Kihyuk Sohn, Yi-Hsuan Tsai, Lawrence Carin, and Manmohan Chandraker. Adaptation across extreme variations using unlabeled domain bridges. arXiv preprint arXiv:1906.02238, 2019. 2 +[8] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255. IEEE, 2009. 6 +[9] Mark Everingham, SM Ali Eslami, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The Pascal visual object classes challenge: A retrospective. IJCV, 111(1):98-136, 2015. 5 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 6 +[11] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei Efros, and Trevor Darrell. CyCADA: Cycle-consistent adversarial domain adaptation. In ICML, pages 1989-1998, 2018. 1, 2, 8 +[12] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[13] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, pages 3431-3440, 2015. 1 +[14] Pauline Luc, Natalia Neverova, Camille Couprie, Jakob Verbeek, and Yann LeCun. Predicting deeper into the future of semantic segmentation. In ICCV, pages 648-657, 2017. 1 +[15] Andres Milioto, Philipp Lottes, and Cyril Stachniss. Real-time semantic segmentation of crop and weed for precision agriculture robots leveraging background knowledge in cnns. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pages 2229-2235. IEEE, 2018. 1 + +[16] Zak Murez, Soheil Kolouri, David Kriegman, Ravi Ramamoorthi, and Kyungnam Kim. Image to image translation for domain adaptation. In CVPR, pages 4500-4509, 2018. 1 +[17] Kwanyong Park, Sanghyun Woo, Dahun Kim, Donghyeon Cho, and In So Kweon. Preserving semantic and temporal consistency for unpaired video-to-video translation. In Proceedings of the 27th ACM International Conference on Multimedia, pages 1248-1257, 2019. 2 +[18] Xingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang, Kate Saenko, and Bo Wang. Moment matching for multi-source domain adaptation. In ICCV, pages 1406-1415, 2019. 2 +[19] Stephan R. Richter, Vibhav Vineet, Stefan Roth, and Vladlen Koltun. Playing for data: Ground truth from computer games. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, ECCV, volume 9906 of LNCS, pages 102-118. Springer International Publishing, 2016. 1, 5 +[20] German Ros, Laura Sellart, Joanna Materzynska, David Vazquez, and Antonio M Lopez. The synthia dataset: A large collection of synthetic images for semantic segmentation of urban scenes. In CVPR, pages 3234-3243, 2016. 1, 5 +[21] Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In CVPR, pages 3723-3732, 2018. 2 +[22] Christos Sakaridis, Dengxin Dai, Simon Hecker, and Luc Van Gool. Model adaptation with synthetic and real data for semantic dense foggy scene understanding. In ECCV, pages 687-704, 2018. 2 +[23] Alexey A Shvets, Alexander Rakhlin, Alexandr A Kalinin, and Vladimir I Iglovikov. Automatic instrument segmentation in robot-assisted surgery using deep learning. In 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), pages 624-628. IEEE, 2018. 1 +[24] Jong-Chyi Su, Yi-Hsuan Tsai, Kihyuk Sohn, Buyu Liu, Subhransu Maji, and Manmohan Chandraker. Active adversarial domain adaptation. In WACV, pages 739-748, 2020. 2 +[25] Yi-Hsuan Tsai, Wei-Chih Hung, Samuel Schulter, Kiyuk Sohn, Ming-Hsuan Yang, and Manmohan Chandraker. Learning to adapt structured output space for semantic segmentation. In CVPR, pages 7472-7481, 2018. 1, 2, 3, 5, 6, 7 +[26] Yi-Hsuan Tsai, Kihyuk Sohn, Samuel Schulter, and Manmohan Chandraker. Domain adaptation for structured output via discriminative patch representations. In ICCV, pages 1456-1465, 2019. 1, 2 +[27] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In CVPR, pages 7167-7176, 2017. 8 +[28] Tuan-Hung Vu, Himalaya Jain, Maxime Bucher, Matthieu Cord, and Patrick Pérez. Advent: Adversarial entropy minimization for domain adaptation in semantic segmentation. In CVPR, pages 2517-2526, 2019. 2, 3, 5, 6, 7, 8 +[29] Keze Wang, Dongyu Zhang, Ya Li, Ruimao Zhang, and Liang Lin. Cost-effective active learning for deep image classification. IEEE Transactions on Circuits and Systems for Video Technology, 27(12):2591-2600, 2016. 2 + +[30] Magnus Wrenninge and Jonas Unger. Synscapes: A photorealistic synthetic dataset for street scene parsing. arXiv preprint arXiv:1810.08705, 2018. 5 +[31] Yang Zhang, Philip David, and Boqing Gong. Curriculum domain adaptation for semantic segmentation of urban scenes. In ICCV, volume 2, page 6, Oct 2017. 1, 2 +[32] Amy Zhao, Guha Balakrishnan, Fredo Durand, John V Guttag, and Adrian V Dalca. Data augmentation using learned transformations for one-shot medical image segmentation. In CVPR, pages 8543-8553, 2019. 1 +[33] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In CVPR, 2017. 1 +[34] Han Zhao, Shanghang Zhang, Guanhang Wu, José MF Moura, Joao P Costeira, and Geoffrey J Gordon. Adversarial multiple source domain adaptation. In NIPS, pages 8559-8570, 2018. 2 +[35] Yi Zhou, Xiaodong He, Lei Huang, Li Liu, Fan Zhu, Shanshan Cui, and Ling Shao. Collaborative learning of semi-supervised segmentation and classification for medical images. In CVPR, pages 2079-2088, 2019. 1 +[36] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. 2 +[37] Yang Zou, Zhiding Yu, BVK Vijaya Kumar, and Jinsong Wang. Unsupervised domain adaptation for semantic segmentation via class-balanced self-training. In ECCV, pages 289-305, 2018. 2 +[38] Yang Zou, Zhiding Yu, Xiaofeng Liu, B.V.K. Vijaya Kumar, and Jinsong Wang. Confidence regularized self-training. In ICCV, October 2019. 2 \ No newline at end of file diff --git a/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/images.zip b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..736b7ccfb38d4528bb67db6e814ac1f8b8fafb12 --- /dev/null +++ b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60a02de533f0847db40f5f5bb2f0a5233cd233e7fb81acebf543b955236f0dbe +size 669240 diff --git a/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/layout.json b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a76c11e85ad1b64d727c7106536fb29d988ba396 --- /dev/null +++ b/unsupervisedintradomainadaptationforsemanticsegmentationthroughselfsupervision/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7f7ba0fbc09f0a09e2141322472a251f35fcf41a0ca281e131aeaae0fc285ef +size 501258 diff --git a/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/5f6cf2b2-f543-43d8-baaf-c46e98d1fa42_content_list.json b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/5f6cf2b2-f543-43d8-baaf-c46e98d1fa42_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f75de11eb2c0a1657fe411509933f67507ea6a90 --- /dev/null +++ b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/5f6cf2b2-f543-43d8-baaf-c46e98d1fa42_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:796992b6f9a3e03249c838091d437f708a6db39164814332dc0cb07f10d17519 +size 82278 diff --git a/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/5f6cf2b2-f543-43d8-baaf-c46e98d1fa42_model.json b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/5f6cf2b2-f543-43d8-baaf-c46e98d1fa42_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ba06a52ee1fdaed5148e40cf6d72be64035ecb29 --- /dev/null +++ b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/5f6cf2b2-f543-43d8-baaf-c46e98d1fa42_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91a54cfe2abdc71629d6caa0d89bc49b85a19b47766cb9df141cd3e4c2f05b27 +size 102484 diff --git a/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/5f6cf2b2-f543-43d8-baaf-c46e98d1fa42_origin.pdf b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/5f6cf2b2-f543-43d8-baaf-c46e98d1fa42_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a3529ec9d5055d63e2e2030c1da68e33c276c1c1 --- /dev/null +++ b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/5f6cf2b2-f543-43d8-baaf-c46e98d1fa42_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f7fb21395c7f147ef0d54a99e506a73e4d381855f8238cace989522a515be2c +size 1735257 diff --git a/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/full.md b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/full.md new file mode 100644 index 0000000000000000000000000000000000000000..aebff17296639bd31c93ee4ca958f87bd5dc0cf7 --- /dev/null +++ b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/full.md @@ -0,0 +1,420 @@ +# Unsupervised Learning for Intrinsic Image Decomposition from a Single Image + +Yunfei Liu + +Yu Li² + +Shaodi You + +Feng Lu $^{1,4,*}$ + +1 State Key Laboratory of VR Technology and Systems, School of CSE, Beihang University + +$^{2}$ Applied Research Center (ARC), Tencent PCG $^{3}$ University of Amsterdam, Amsterdam, Netherland + +$^{4}$ Peng Cheng Laboratory, Shenzhen, China + +{lyunfei, lufeng}@buaa.edu.cn + +ianyli@tencent.com + +s.you@uva.nl + +# Abstract + +Intrinsic image decomposition, which is an essential task in computer vision, aims to infer the reflectance and shading of the scene. It is challenging since it needs to separate one image into two components. To tackle this, conventional methods introduce various priors to constrain the solution, yet with limited performance. Meanwhile, the problem is typically solved by supervised learning methods, which is actually not an ideal solution since obtaining ground truth reflectance and shading for massive general natural scenes is challenging and even impossible. In this paper, we propose a novel unsupervised intrinsic image decomposition framework, which relies on neither labelled training data nor hand-crafted priors. Instead, it directly learns the latent feature of reflectance and shading from unsupervised and uncorrelated data. To enable this, we explore the independence between reflectance and shading, the domain invariant content constraint and the physical constraint. Extensive experiments on both synthetic and real image datasets demonstrate consistently superior performance of the proposed method. + +# 1. Introduction + +The appearance of a natural image depends on various factors, such as illumination, shape and material. Intrinsic image decomposition aims to decompose such a natural image into an illumination-invariant component and an illumination-variant component. Therefore, it can benefit a variety of high-level computer vision tasks such as texture editing [3], face appearance editing [5] and many others. In this paper, we follow the common practice [8, 18, 28] that assumes the ideal Lambertian surface. Then, a natural image $I$ can be decomposed as the pixel-wise product of the + +![](images/295c24ab9eb9306d0681dfee95adc21589df6c4d2b4a8d0ead991824e144e063.jpg) +Figure 1. Our method learns intrinsic image decomposition in an unsupervised fashion where the ground truth reflectance and shading is not available in the training data. We learn the distribution priors from unlabeled and uncorrelated collections of natural image, reflectance and shading. Then we perform intrinsic image decomposition through content preserving image translation with independence constraint and physical consistency constraint. + +illumination invariance, the reflectance $R(I)$ ; and the illumination variance, the shading $S(I)$ , i.e., + +$$ +I = R (I) \odot S (I). \tag {1} +$$ + +Eq. (1) is ill-posed because there are twice the unknowns than the knowns. Conventional methods [3, 18] therefore explore physical priors as extra constraints, while recent researches tend to use deep neutral networks to directly learn such priors [8, 28, 33, 38]. + +Unlike high-level vision tasks, intrinsic image decomposition is obviously physics-based, and therefore designing a supervised learning method will heavily rely on high quality physical realistic ground truth. However, existing datasets are either created from a small set of manually painted objects [9], synthetic objects or scenes [4, 6, 19] or manual annotations [15, 31]. These datasets are either too small or far from natural images and therefore limit the performance of supervised learning. + +A few semi-supervised and unsupervised learning methods have been exploited very recently. Janner et al. [14] proposed self-supervised intrinsic image decomposition which relies on few labelled training data and then transfers to other unlabelled data. However, many other supervised information such as shape of the object need be involved. Li et al. [20] and Ma et al. [26] work on unlabelled image sequences where the scene requires to be fixed within the sequence and only the lighting and shading allow to change. Such settings are still very limited. + +In this paper, we aim to explore single image unsupervised intrinsic image decomposition. The key idea is that the natural image, the reflectance and the shading all share the same content, which reflects the nature of the target object in the scene. Therefore, we consider estimating reflectance and shading from a natural image as transferring image style but remaining the image content. Based on such an idea, we can actually use unsupervised learning method to learn the style of natural image, reflectance and shading by collecting three unlabelled and un-correlated samples for each set. Then we apply auto-encoder and generative-adversarial network to transfer the natural image to the desired style while preserve the underlying content. Unlike nai've unsupervised style transfer methods which are from one domain to another, our method transfers from one domain to another two domains with explicit physical meanings. We therefore explicitly adopt three physical constraints into our proposed method which are 1) the physical consistent constraint as in Eq. (1), 2) domain invariant content constraint that natural image and its decomposition layers share the same object, layout, and geometry, 3) the physical independent constraint that reflectance is illumination-invariant and shading is illumination-variant. + +Rigorous experiments show that our method can produce superior performance against state-of-the-art unsupervised methods on four benchmarks, namely ShapeNet, MPI Sintel benchmark, MIT intrinsic dataset and IIW. Our method also demonstrates comparable performance with state-of-the-art fully supervised methods [8, 33], and even outperforms some of them appeared in the recent years [28, 38]. + +The contributions of this work are threefold: + +- To the best of our knowledge, we propose the first physics based single image unsupervised learning for intrinsic image decomposition. Specifically, we adopt three physical constraints: the physical consistency constraint, the domain invariant content constraint and the reflectance-shading independence. +- We propose and implement a completely unsupervised learning network architecture for single image intrinsic decomposition. +- The proposed method outperforms existing unsupervised methods and shows comparable results against + +fully supervised methods on different intrinsic image benchmarks. + +# 2. Related Works + +Optimization based methods. Intrinsic image decomposition is a typical image layer separation problem [16, 18, 22, 23] which has been studied for nearly fifty years. To handle the ill-posed problem, additional priors with an optimization framework have been applied. For instance, Land et al. [16] propose a seminal Retinex algorithm which assumes large image gradients corresponding to changes in reflectance, while smaller gradients are with shading. Subsequently, many priors for intrinsic image decomposition have been explored. Inspired by the large image gradients and piece-wise constant property, reflectance sparsity [30, 32] and low-rank reflectance [1] are taken as regularization term in object functions. There are also many constraints for shading such as the distribution difference in gradient domain [3, 18]. Recently, Chen et al. [7] use near-infrared image and propose near infrared prior to regularize the intrinsic image decomposition. Although these handcrafted priors are reasonable in small image set, they are not likely to cover complex scenes [15, 31]. Furthermore, the above mentioned methods assume Lambertian material and thus cannot be adopted to more complex situations with general non-Lambertian reflectance [24, 25]. + +Supervised learning methods. Many supervised learning based methods have been proposed in recent years, [8, 19, 28, 33, 36, 38]. These methods try to estimate the reflectance and shading on labelled training data with different network architectures. However, the training data from publicly available datasets have obvious shortcomings: Sintel [4], ShapeNet [6] and CGIntrinsics [19] are highly synthetic datasets, and networks trained on them cannot generalize well to real-world scenes. The MIT intrinsic dataset [9] consists of real images, but the number of these images are too limited since it contains just 20 objects with ground truth. As a result, these supervised methods often cannot generalize well on one dataset if they are trained on another dataset. Recently, human-labelled dataset IIW [31] and SAW [15] only contain sparse annotations. Not only that, it is difficult to collect such annotations at scale. + +Semi-supervised and unsupervised learning methods. Involving other supervised information such as shape, illumination source of the object, Janner et al. [14] propose self-supervised intrinsic image decomposition, which relied on few labeled training data and then transferred to other unlabeled data. InverseRenderNet [37] uses a series of related images as input and adds multi-view stereo as supervised signal to intrinsic decomposition. Leveraging videos or image sequences, together with physical constraints, learning without intrinsic image has recently become an emerging topic of research. The most of existing unsupervised in + +trinsic image decomposition methods [20, 26] are mainly focus on training on images with fixed scene and varied illumination, then the trained model can be tested with single input. However, the scene-level real images for training are still limited to various scenes in most cases. Motivated by this, we propose an alternative unsupervised method, which doesn't rely on fixed structure image sequences to train. + +Image-to-image translation. Image-to-image translation aims to learn the mapping from two image domains. Pix2pix [13] employs conditional GAN to learn the mapping, CycleGAN [39], UNIT [21] applies the cycle consistency to regularize the training. More recently, MUNIT [12] and DRIT [17] assume partially shared latent space assumption and make multi-modal image-to-image translation. However, there is still a great gap between unsupervised image-to-image translation between and intrinsic image decomposition because 1) image-to-image are fully statistics driven whereas intrinsic image decomposition is physi-c-based, 2) the translated image can be various of modalities while the intrinsic images of an input image are explicit. Thus, the image-to-image translation method is not directly adaptable to intrinsic image decomposition. + +# 3. Unsupervised Single Input Intrinsic Image Decomposition + +# 3.1. Problem formulation and assumptions + +Single input intrinsic image decomposition. To begin with, we formulate the task with precise denotations. As illustrated in Fig. 1 and Eq. (1), the goal of single image intrinsic decomposition is to decompose a natural image, denoted as $I$ , into two layers, illumination-invariance, namely the reflectance $R(I)$ ; and illumination-variance, namely the shading $S(I)$ . + +Eq. (1) has more 'unknowns' than 'knows' and therefore is not directly solvable. Providing sufficient amount of data-samples with ground truths, i.e., the triplet samples $\{(I_i,R(I_i)^{GT},S(I_i)^{GT})\}$ , supervised learning based methods have also been explored[8, 19, 28, 33]. In previous sections, we have discussed the difficulty in obtaining the ground truth. We now focus on unsupervised learning. + +Unsupervised Intrinsic Image Decomposition. In this section, we define the Unsupervised Single Image Intrinsic Image Decomposition (USI $^3$ D) problem. Assuming we collect unlabelled and unrelated samples, we learn the appearance style of each collection. Say, we can learn the style of reflectance, the marginal distribution $p(R_j)$ , by providing a set of unlabelled reflectance images: $\{R_j \in \mathcal{R}\}$ ; we learn the shading style, the marginal distribution $p(S_k)$ , by providing a set of unlabelled shading images: $\{S_k \in \mathcal{S}\}$ ; and we learn the natural image style, marginal distribution $p(I_i)$ , by providing a set of unlabelled natural images: $\{I_i \in \mathcal{I}\}$ . + +![](images/4992ef167d8805b21aec04e8941eaf16527ede7f62c5a42df6f50f43aef3cbd0.jpg) +Figure 2. Content preserving translation among domains. $\mathcal{I}$ is the domain of natural image. $S$ is the domain of shading and $\mathcal{R}$ is the domain of reflectance. For our unsupervised learning method, we learn a set of encoders which encode the appearance from each domain to domain-invariance latent space $\mathcal{C}$ . We also learn the encoders to encode the appearance to domain-dependent prior space for reflectance $(\mathcal{Z}_{\mathcal{R}})$ and shading $(\mathcal{Z}_S)$ correspondingly. Later the image style can be transferred from encoders (solid arrows) to generators (dash arrows). + +Then, we aim to infer $R(I_i)$ , $S(I_i)$ of $I_i$ from the marginal distributions. + +To make the task tractable, we make the following three assumptions. + +# Assumption-1. Domain invariant content. + +Physically, the natural appearance, the reflectance and the shading are all the appearance of a given object. As illustrated in Fig. 2, we assume such object property can be latent coded and shared amount domains. Following a style transfer terminology, we call such shared property as content, denoted as $c \in \mathcal{C}$ . Also, we assume the content can be encoded from all three domains. + +# Assumption-2. Reflectance-shading independence. + +Physically, reflectance is the invariance against lighting and orientation while shading is the variance. And therefore, to decompose these two components, we assume their conditional priors are independent and can be learned separately. As illustrated in Fig. 2, we denote the latent prior for reflectance as $z_{R} \in \mathcal{Z}_{\mathcal{R}}$ which can be encoded from both the reflectance domain and the natural image domains. Similarly, we define the latent prior for shading, $z_{S} \in \mathcal{Z}_{S}$ . + +# Assumption-3. The latent code encoders are reversible. + +This assumption is widely used in image-to-image translation [12, 17]. In detail, it assumes an image can be encoded into the latent code, which can be decoded to image at the same time. This allows us to transfer style and contents among domains. Particularly, this allows us to transfer natural image to reflectance and shading. + +# 3.2. Implementation + +The detailed implementation of $\mathrm{USI^3D}$ network is illustrated in Fig. 3. + +The Content-sharing architecture. As with Assumption1, we design our content-sharing architecture. We use en + +![](images/332a5352d2cfd1be713daebab1c171084ca06a5466007b07a9c6d602e284fe67.jpg) +Figure 3. The proposed architecture of $\mathrm{USI}^3\mathrm{D}$ . Our method decompose intrinsic images with unsupervised learning manner, which translate images from natural image domain $\mathcal{I}$ to reflectance domain $\mathcal{R}$ and shading domain $\mathcal{S}$ . + +coder $E_{\mathcal{I}}^{c}$ to extract the content code $c$ of the input image $I_{i}$ , then $c$ is used to generate the decomposition layers $R(I_{i})$ and $S(I_{i})$ through generators $G_{\mathcal{R}}$ and $G_{\mathcal{S}}$ , respectively. Next, we extract the content code $c_{R(I_i)}$ of $R(I_{i})$ and the content code $c_{S(I_i)}$ of $S(I_{i})$ by using $E_{\mathcal{R}}^{c}$ , $E_{\mathcal{S}}^{c}$ , respectively. Finally, we apply content consistent loss to make content encoders $E_{\mathcal{I}}^{c}$ , $E_{\mathcal{R}}^{c}$ and $E_{\mathcal{S}}^{c}$ work correctly. In detail, we use the content consistency $\mathcal{L}^{cnt}$ to constrain the content code among input image $I_{i}$ and its predictions $R(I_{i})$ and $S(I_{i})$ . + +$$ +\mathcal {L} ^ {c n t} = \left| c _ {R \left(I _ {i}\right)} - c \right| _ {1} + \left| c _ {S \left(I _ {i}\right)} - c \right| _ {1}, \tag {2} +$$ + +where $|\cdot |_1$ is $L1$ distance. + +Mapping module (M module). Following the Assumption-2, the prior codes of reflectance and shading are domain-variant and independent to each other. Because we need to infer the prior code $z_{R(I_i)}$ and $z_{S(I_i)}$ from $I_i$ , we design the Mapping module (M module), as shown in Fig. 3. Specifically, we first extract the natural image prior code $z_{I_i}$ , then we designed a decomposition mapping $f_{dcp}$ to infer the prior code $z_{R(I_i)}$ and $z_{S(I_i)}$ . To constrain the $z_{R(I_i)}$ in the reflectance prior domain $\mathcal{Z}_{\mathcal{R}}$ , we use Kllback-Leibler Divergence (KLD) and other real prior $z_{R_j}$ which is sampled from $\mathcal{Z}_{\mathcal{R}}$ . $Z_{S(I_i)}$ is generated and constrained in the similar way. The definition KLD loss is + +$$ +\mathcal {L} ^ {K L} = \mathbb {E} [ \log p (\hat {z}) - \log q (z) ], \tag {3} +$$ + +where the prior code $\hat{z}$ is extracted from $M$ module and its real prior code $z$ is extracted from its real image. Here are two prior domains $\mathcal{Z}_{\mathcal{R}}$ and $\mathcal{Z}_S$ , so the total KLD loss is $\mathcal{L}_t^{KL} = \mathbb{E}[\log p(z_{R(I_i)}) - \log q(z_{R_j})] + \mathbb{E}[\log p(z_{S(I_i)}) - \log q(z_{S_k})]$ . + +Auto-encoders. Per Assumption-3, we implement three auto-encoders. Left of Fig. 4 shows the detail of implementing the auto-encoder for natural image stream. The + +![](images/15a71e97c2fb5cfda254ac261a791aea32629a382877a005c502bfee223b5a73.jpg) +Figure 4. Left: Auto-encoder for natural image stream, the reflectance and shading streams are designed similarly. Right: Architecture of the generator. + +auto-encoder for reflectance and shading are implemented in a similar way where the detail are provided in the supplementary material. We follow the recent image-to-image translation methods [12, 17] and use bidirectional reconstruction constraints which enables reconstruction in both image $\rightarrow$ latent code $\rightarrow$ image and latent code $\rightarrow$ image $\rightarrow$ latent code directions. In detail: + +Image reconstruction loss. Given an image sampled from the data distribution, we can reconstruct it after encoding and decoding. + +$$ +\mathcal {L} ^ {i m g} = \sum_ {x \in \{I _ {i} \} o r \{R _ {j} \} o r \{S _ {k} \}} | G (E ^ {c} (x), E ^ {p} (x)) - x | _ {1}. \tag {4} +$$ + +Prior code reconstruction loss. Given a prior code sampled from the latent distribution at decomposition time, we should be able to reconstruct it after decoding and encoding. Different from Eq.(3), which is suitable to constrain the distributions of two samples, the constraint of the prior codes of the image and the reconstructed image should be + +![](images/851f714a67ae0da64525100020a1329413a960a2c068e7f609321f8477eac89f.jpg) +Input + +![](images/1bd0d3e72919f1811b883ae1dde49ab24208b5b2df02b4fd60e6f5a39e8aa3fc.jpg) + +![](images/ff544cf821be77d8d6e506654af636ebc511f4806d617397c6111e5e6b2c3a0e.jpg) +WH18 + +![](images/b931076298df9d39f3c468021d11f9789f025bec69b5a98712f3ae17165b4804.jpg) + +![](images/a17e2c3713730590b452a92b5dc6be23051585e16090c3831523d707236705fa.jpg) +w/o mapping + +![](images/5be60995f1d1c5d05be36ccc806d33380affe4acb608428c54df2d59c6d83246.jpg) + +![](images/ee0074c50a46fce36336f296ab0d6abb8986ae171f906fcefef1b0231df7e750.jpg) +w/o $\mathcal{L}^{cnt}$ +Figure 5. Visual comparison with state-of-the-art WH18 [26] and ablation study on ShapeNet dataset. + +![](images/69e869bfd3c60f97908cbbaee4c77e9cb132be26067940774fdab5f7e2e8b4aa.jpg) + +![](images/5e659fc32b73f2543a97bacae70c01a2506b6a85f0e49e2278065815699fa5f8.jpg) +w/o $\mathcal{L}^{phy}$ + +![](images/5378605f5d643de24db9db00dba14a28ba941936ffbc996dcc0c02ac7705ee52.jpg) + +![](images/76ff648398f3de6d37c7bfa2c122a40702066f224d9b5a5f616eb03275bc6245.jpg) +Final + +![](images/d0bfd1faaca4181860c70bc74f5935dfbcb6ad41d228b7c042952212076090cc.jpg) + +![](images/2e771f73d51eeba1f941ac37631c2281add401f2fc3dd0ca1c49b8f6b8c34bd4.jpg) +GT + +identical. Here we use $L_{1}$ for $\mathcal{L}^{pri}$ . + +$$ +\begin{array}{l} \mathcal {L} ^ {p r i} = \left| E _ {\mathcal {I}} ^ {p} \left(G _ {\mathcal {I}} \left(c _ {I _ {i}}, z _ {I _ {i}}\right)\right) - z _ {I _ {i}} \right| _ {1} \\ + \left| E _ {\mathcal {R}} ^ {p} \left(G _ {\mathcal {R}} \left(c _ {R _ {j}}, z _ {R _ {j}}\right)\right) - z _ {R _ {j}} \right| _ {1} \tag {5} \\ + \left| E _ {\mathcal {S}} ^ {p} \left(G _ {\mathcal {S}} \left(c _ {S _ {k}}, z _ {S _ {k}}\right)\right) - z _ {S _ {k}} \right| _ {1}. \\ \end{array} +$$ + +To make the decomposed intrinsic image be indistinguishable from real image in the target domain, we use GANs to match the distribution of generated images to the target data distribution. The adversarial losses are defined as follow: + +$$ +\mathcal {L} _ {\mathcal {R}} ^ {a d v} = \log \left(1 - D _ {\mathcal {R}} \left(R \left(I _ {i}\right)\right) + \log D _ {\mathcal {R}} \left(R _ {j}\right), \right. \tag {6} +$$ + +$$ +\mathcal {L} _ {\mathcal {S}} ^ {a d v} = \log \left(1 - D _ {\mathcal {S}} \left(S \left(I _ {i}\right)\right)\right) + \log D _ {\mathcal {S}} \left(S _ {k}\right). \tag {7} +$$ + +The total adversarial loss is $\mathcal{L}_t^{adv} = \mathcal{L}_{\mathcal{R}}^{adv} + \mathcal{L}_S^{adv}$ . + +We notice that Eq. (1) means that image $I_{i}$ is equal to the pixel-product of its analogous $R(I_{i})$ and $S(I_{i})$ , thus this physical loss can be employed to regularize our method. + +$$ +\mathcal {L} ^ {p h y} = \left| I _ {i} - R \left(I _ {i}\right) \odot S \left(I _ {i}\right) \right| _ {1}. \tag {8} +$$ + +Total loss. By using the GAN scheme, we jointly train the encoders $E$ , decoders $G$ , mapping function $f$ and discriminators $D$ to optimize the weighted sum of the different loss terms. + +$$ +\begin{array}{l} \min _ {E, G, f} \max _ {D} (E, G, f, D) = \mathcal {L} _ {t} ^ {\text {a d v}} + \lambda_ {1} \mathcal {L} ^ {\text {c n t}} + \lambda_ {2} \mathcal {L} ^ {K L} \tag {9} \\ + \lambda_ {3} \mathcal {L} ^ {i m g} + \lambda_ {4} \mathcal {L} ^ {p r i} + \lambda_ {5} \mathcal {L} ^ {p h y}, \\ \end{array} +$$ + +where $\lambda_1, \lambda_2, \lambda_3, \lambda_4,$ and $\lambda_5$ are weights that are control the importance of different loss terms. + +# 4. Experiments + +# 4.1. Implementation details + +Encoder and generators. The distribution prior encoder $E^{p}$ is constructed by several strided convolutional layers to downsample the input image, then followed by a global average pooling layer and a dense layer. Our content encoder + +$E^c$ includes several strided convolutional layers and several residual blocks [10] to downsample the input. All convolutional layers are followed by Instance Normalization [34]. The detailed architecture of encoders are provided in the supplementary materials. + +We implement the distribution prior mapping function $f_{dcp}$ via multi-layer perceptron (MLP). More specifically, the $f_{dcp}$ takes $z_{I_i}$ as input, and output the concatenation of $z_{R(I_i)}$ and $z_{S(I_i)}$ . + +The generator reconstructs the image from its content feature and distribution prior. As illustrated in the right of Fig. 4, it processes the content feature by several unsampling and convolutional layers. Inspired by recent unsupervised image-to-image translation works that use affine transformation parameters in normalization layers to represent image styles [11, 12], hence we use image style to represent intrinsic image distribution priors. To this end, we equip the Adaptive Instance Normalization (AdaIN) [11] after each of convolutional layers in residual blocks. The parameters of AdaIN are dynamically generated by a MLP from the distribution prior. + +$$ +\operatorname {A d a I N} (m, \gamma , \beta) = \gamma \left(\frac {m - \mu (m)}{\sigma (m)}\right) + \beta , \tag {10} +$$ + +where $m$ is the activation of the previous convolutional layer, $\mu$ and $\sigma$ are channel wise mean and standard deviation. $\gamma$ and $\beta$ are parameters generated by the MLP. + +Discriminator. We use multi-scale discriminators [35] to guide the generators to generate high quality images in different scales including correct global structure and realistic details. We employ the LSGAN [27] as the objective. + +Weights for loss terms. In the total objective function Eq. (9), We follow [12] and set $\lambda_1, \lambda_2, \lambda_3, \lambda_4$ as 10.0, 0.1, 10.0 and 0.1, respectively. Based on the start value and convergence of $\mathcal{L}^{phy}$ , we set $\lambda_5$ as 5.0 empirically. + +# 4.2. Experimental setup + +We have compared three types of intrinsic decomposition algorithms in the experiments. 1) Unsupervised algo + +rithms. Retinex [16], Barron et al. [2], LM14 [18], and $\mathrm{L}_1$ flattening that tackle image intrinsic decomposition though optimization without deep learning. LS18 [20], WH18 [26] are trained on image sequences in which each sequence include fixed reflectance and variant shadings. 2) Image-to-image translation method. MUNIT [12] is one of the state-of-the-art image-to-image translation methods. Because the framework of MUNIT can only translate images between two domains, so we train this method twice for input $\leftrightarrow$ reflectance and input $\leftrightarrow$ shading for generating the reflectance and shading of the input image. 3) Supervised methods. We have also provided results of state-of-the-art supervised methods like Zhou et al. [38], MSCR [28] and FY18 [8] as references. + +# 4.3. Qualitative and quantitative results + +We evaluate the proposed $\mathrm{USI}^3\mathrm{D}$ on four public intrinsic image benchmarks which are commonly used in image intrinsic decomposition. + +Table 1. Numerical comparison and ablation study on ShapeNet intrinsic dataset. + +
MethodMSELMSE Total
ReflectanceShadingAvg.
LM14 [18]0.03380.02960.03170.0623
FY18 [8]0.03020.03150.03090.0717
WH18 [26]0.02840.02620.02730.0544
Ours w/o mapping0.02110.01300.01710.0509
Ours w/o Lcnt0.02390.01670.02030.0529
Ours w/o Lphy0.01960.01510.01740.0531
Ours final0.01850.01080.01470.0465
+ +ShapeNet intrinsic dataset. We first make a comparison among exist methods and then perform an ablation study on this dataset. We use 8979 input images, 8978 reflectance images and 8978 shadings to train $\mathrm{USI}^3\mathrm{D}$ , each set is shuffled before training. We use the other 2245 images for evaluation. + +We make a comparison with one of the optimization-based methods LM14 [18], one of the state-of-the-art supervised methods FY18 [8] and one of the state-of-the-art unsupervised method WH18 [26]. We follow settings in [8, 28] and employ mean square error (MSE), Local MSE (LMSE) [28]. The numerical results are listed in Table 4.3. The visual results are shown in Fig. 5. + +We employ three ablation studies to evaluate the $\mathrm{USI}^3\mathrm{D}$ . 1) The effectiveness of mapping $f_{dcp}$ . $f_{dcp}$ is aiming to map the prior code of input image into reflectance prior code and shading prior code. In this ablation study, we remove it and replace the decomposed prior code with a random vector. 2) The effectiveness of loss term $\mathcal{L}^{cnt}$ . $\mathcal{L}^{cnt}$ is aiming to con + +strain the predicted reflectance and shading share the same content code with the input. We set this loss term's weight to 0 in this ablation study. 3) The effectiveness of loss term $\mathcal{L}^{phy}$ . $\mathcal{L}^{phy}$ is used to enforce the predicted reflectance, shading and the input have relationship as described in Eq. (1). We set this loss term's weight to 0 in this ablation study. As shown in Fig. 5, The third column shows that without mapping, reflectance and shading aren't decomposed properly in some regions. The fourth column shows that without $\mathcal{L}^{cnt}$ , some details are lost in shading. The fifth column shows without $\mathcal{L}^{phy}$ , although shading looks fine while some area are incorrect. + +To further explore how different volume of training data affect the final performance of our method, we reduce the volume of reflectance and shadings in training set and train our algorithm under the same condition. The results are illustrated in Fig. 6. As shown in Fig. 6, our method can still out-perform existing methods by using as few as $20\%$ of training sample. + +MPI-Sintel benchmark. MPI-Sintel benchmark [4] is a synthesized dataset, which includes 890 images from 18 scenes with 50 frames each (except for one that contains 40 images). We follow FY18[8] and make data argumentation, after that, 8900 patches of images are generated. Then, we adopt two-fold cross validation to obtain all 890 test results. In the training set, we randomly select half of the input image as input samples, the reflectance and shading with remain file names as our reflectance samples and shading samples, respectively. + +As listed in Table 2, we employ MSE, LMSE and dissimilarity structural similarity index measure (DSSIM) as evaluation metrics. We show the best of performance among unsupervised methods and even comparable with supervised method MSCR in many evaluation matrices such as LMSE and DSSIM. In qualitative comparison, we show one of the qualitative results in Fig. 7. The proposed $\mathrm{USI}^3\mathrm{D}$ can produce much more correct reflectance and shading than unsupervised method LS18 [20]. Furthermore, our results still competitive than supervised method MSCR [28] since the results of MSCR with many blurry regions. The supervised method FY18 [8] shows the best visual results because they are trained across many other datasets and involves additional other guidance like boundary, domain filter, etc. + +MIT intrinsic dataset. To test performance on real images, we use the 220 images in the MIT intrinsic dataset [32] as in [28]. This data contains only 20 different objects, each of which has 11 images. To compare with previous methods, we finetune our model using 10 objects via the split from [8], and evaluate the results using the remaining objects. + +As shown in Table 4.3, our method gets the best performance among unsupervised methods and provides comparable results among supervised methods. We show two visual comparison samples in Fig. 8. Compared to the un + +![](images/2756fb95631098848581de7817f19f1a8b413d064f15549c6316082ce4f8d789.jpg) +Figure 6. Performance of our unsupervised method on ShapeNet when using fewer training samples. + +![](images/bbe5772a5a6b57d64f392bfadffead4e6da8a05e51084ec49ab05be0818fbef7.jpg) + +![](images/0c56bf8557c9d816a6747aa6b8e0bd0cb83621c191a9050cc64c557a6dbe95be.jpg) + +Table 2. Numerical comparison on MPI Sintel dataset. Sup. denotes that MSCR [28] and FY18 [8] are fully-supervised methods, which are trained with ground truth data, and thus their results can only serve as reference. + +
MethodMSELMSEDSSIM
ReflectanceShadingAvg.ReflectanceShadingAvg.ReflectanceShadingAvg.
Sup. (Ref.)MSCR [28]0.01000.00920.00960.00830.00850.00840.20140.15050.1760
FY18 [8]0.00690.00590.00640.00440.00420.00430.11940.08220.1008
Unsup.Retinex [9]0.06060.07270.06670.03660.04190.03930.22700.24000.2335
Barron et al. [2]0.04200.04360.04280.02980.02640.02810.21000.20600.2080
LS18 [20]0.02150.02510.02330.00950.01180.01070.20700.18270.1949
MUNIT [12]0.02910.02320.02620.02070.01820.01950.20730.18930.1983
Ours0.01590.01480.01540.00870.00810.00840.17970.14740.1635
+ +Table 3. Numerical comparison on MIT intrinsic dataset. Results of supervised methods are also provided for reference. + +
MethodMSEAvg.LMSE Total
ReflectanceShading
Sup. (Ref.)Zhou et al. [38]0.02520.02290.02400.0319
Shi et al. [33]0.02160.01350.01750.0271
MSCR [28]0.02070.01240.01650.0239
FY18 [8]0.01340.00890.01110.0203
Unsup.LM14 [18]0.02860.02270.02550.0366
WH18 [26]0.02320.01660.01970.0379
MUNIT [12]0.01970.01700.01840.0302
Ours0.01570.01350.01460.0231
+ +![](images/4310a0e7fa3e1c89e4b6d11a26a3592f3dccf93772709d0174bff4cca3a7649e.jpg) +Input +Figure 8. Visual results on MIT intrinsic image benchmark. The column 2 - 3 are supervised methods' results for reference. + +![](images/43e747c5b7007b5bed332954a2d880918aad24a08225a67c4183e274366ea9a6.jpg) +MSCR + +![](images/b0d46e24bf680a670f5a51b27fad064e4fd57d556cbb20b5f9aeb1f0ae0ec2dc.jpg) +18 LM + +![](images/eb5c0a4981e32e2905b1e45d12f422c97c080859e5d88f2341ef0d13d04e493e.jpg) +MC18 + +![](images/28ae56ffe7c73869b8dcd9f0e6c68989ba2e0025c84e912196aa3c57feb7f426.jpg) +GT + +![](images/06e0b18e6fce6e3883638ef7de04ac8f89304635ab627850a90b3fc6976eff5d.jpg) +Input + +![](images/f66052eb84fbb61d14dcc2db422bde68965bb098d7ac88b661ca497af1821b24.jpg) +Albedo + +![](images/56cfaee284bbfd49a39b48dfa437f7abe66c1c5cbac3f84af12c34b974e43e1e.jpg) +Shading + +![](images/98367f1fa4ba82ab0a2ef94b90b73540e36a4e45cb0425797d01fd2f27042c73.jpg) +Figure 10. Samples from mixed dataset. The input images is collected from IIW, while the reflectance and shading are collected from CGIntrinsic dataset. + +![](images/d7788b1e07e4a045cd02254ca8eea95e4c13f3d80cff1f0d870fe45d412886e8.jpg) + +![](images/4d3c5b9d8d2a8985ed4e12ebc435baf08743223812a37e45933e12351a42a3c8.jpg) + +supervised methods, we show the best visual performance both in reflectance and shading. + +IIW benchmark. The Intrinsic Images in the Wild (IIW) benchmark [31] contains 5,230 real images of mostly indoor scenes, combined with a total of 872,161 human judgments regarding the relative reflectance between pairs of points sparsely selected throughout the images. We split the input images of IIW into a training set (4184) and test set in the same way as [8, 19]. Because the IIW dataset contains no reflectance and shading images, we employ unpaired reflectance and shading from the rendered dataset CGIntrinsics [19]. To make a fair training, we choose the first 4000 consecutive reflectance sorted by the image ID and the last + +![](images/d2d03072b8b2721cd6dd9bea74aec26ba7a86c0f9dbb03c18a62f915c6a6831c.jpg) +Bandge 2 frame 47 +MSCR + +![](images/65daca024e2e3d84d428becc9a94994b3224f61dda4a39d4a64ab365b8ba2c1a.jpg) +FY18 + +![](images/2c7dc98a1e0c45cdae8f10184827dce9f5e9e9a94347a23f7015e8e6f2eb1150.jpg) +LS18 + +![](images/0af8a6ccb7a7be5ade5f954408f0e2bcfa7504a98c74f69ff679736db8d5c30f.jpg) +Ours + +![](images/46c7d6bf8ccc914c53b60dc3a90657ff5ff12dfe97cb9f255025716b10672377.jpg) +GT + +![](images/4795d8af251c10ea6ded033c4f192ab9f83660c52a2bae059ff8deae0ab71977.jpg) +Input +Input +Figure 9. Quantative comparison on the HW test sets. F18 [δ] is supervised method. L318 [20] and MUN1 [12] are unsupervised. + +![](images/f81174e4469ffef20b30074003c86fb12916ff513ba45b3e65a19e2affa5f599.jpg) +Figure 7. Visual results on MPI Sintel benchmark. Compared with state-of-the-art unsupervised method LS18 [20]. Supervised methods MSCR [28] and FY18 [8] are provided for reference. +FY18 (R) + +![](images/1fa5c22271e8bb11274d70e349d46f3fa8a69dc8457bcb43dcc62c56f680c6c1.jpg) +FY18 (S) + +![](images/6afa05112b3fe0f9398d5d02bf40c5429a8ee548e1d7ee3f39de28079d729920.jpg) +LS18 (R) + +![](images/0c1b3ea1ac72baa740f22155fdc1c359756992c1a157e2628ce1159cb7f7f70b.jpg) +LS18 (S) + +![](images/b4bb64d8ea140561d15e35eb3636b64c859e2efeb358bc839ade8fc4a550da18.jpg) +MUNIT (R) + +![](images/e09f5da3118c8fd7dbcfa1d33db5dcd5c06df4d44c306db9ef463dab9e370578.jpg) +MUNIT (S) + +![](images/b6506da918a633a698ba61cca8e5f083822a8e77f5a42d4d1043845fddba5ace.jpg) +Ours (R) + +![](images/365b15127c63ae42ba9bb2c083fa90f802581c535127820b4ac8d4a6da6f76e7.jpg) +Ours (S) + +4000 shading images for training. Samples of the training set are illustrated in Fig. 10. + +Table 4. Numerical comparison on IIW benchmark dataset using weighted human disagreement rate (WHDR) [29]. Lower is better + +
MethodWHDR%(mean)
Baseline (const reflectance)36.54
Baseline (const shading)51.37
Sup. (Ref.)Narihira et al. [29]18.10
Zhou et al. [38]15.70
CGIntrinsic [19]14.80
FY18 [8]14.45
Unsup.Retinex (color) [9]26.89
Retinex (gray) [9]26.84
WH18 [26]28.04
MUNIT [12]25.23
L1 flattening [3]20.94
Bell et al. [31]20.64
LS18 [20]20.30
Ours18.69
+ +For domain adjustment, we follow CGIntrinsics and apply reflectance smoothness $\mathcal{L}_R^{smooth}$ term to encourage reflectance predictions to be piece-wise constant. + +$$ +\mathcal {L} _ {R} ^ {\text {s m o o t h}} = \sum_ {i = 1} ^ {N} \sum_ {j \in \mathcal {N} (i)} v _ {i, j} | \log x _ {R} ^ {i} - \log x _ {R} ^ {j} | _ {1}, \tag {11} +$$ + +where $\mathcal{N}(i)$ denotes the 8-connected neighbourhood of + +the pixel at position $i$ . The reflectance weight $v_{i,j} = \exp \left(-\frac{1}{2} (\mathbf{f}_i - \mathbf{f}_j)^T\Sigma^{-1}(\mathbf{f}_i - \mathbf{f}_j)\right)$ , and the feature vector $\mathbf{f}_i$ is defined as $[\mathbf{p}_i,\mathbf{x}_i,r_i^1,r_i^2]$ , where $\mathbf{p}_i$ and $\mathbf{x}_i$ are the spatial position and image intensity respectively, and $r_i^1$ and $r_i^2$ are the first two elements of chromaticity. $\Sigma$ is a covariance matrix which defines the distance between two feature vectors. We set this loss term with weight of 1.0 in this experiment. + +We use the same test split with compared method. Because there is no pixel-wise ground truth, we use the weighted human disagreement rate (WHDR) which is introduced in the dataset [31]. The numerical results are listed in Table 4.3, lower is better. The qualitative results are illustrated in Fig. 9. Our proposed method generates better results than the existing methods. + +# 5. Conclusion + +In this paper, we propose an unsupervised single image intrinsic decomposition (USI $^3$ D) method. We introduce three assumptions about distributions of different image domains, i.e., domain invariant content, reflectance-shading independence and the latent code encoders are reversible. We implemented our pipeline based on these assumptions. Experimental results on four intrinsic image benchmarks show that our method outperforms existing state-of-the-art unsupervised methods and even some state-of-the-art supervised methods. + +# References + +[1] Bousseau Adrien, Paris Sylvain, and Durand Frédo. User-assisted intrinsic images. TOG, 2009. 2 +[2] Jonathan T Barron and Jitendra Malik. Shape, illumination, and reflectance from shading. TPAMI, 2015. 6, 7 +[3] Sai Bi, Xiaoguang Han, and Yizhou Yu. An 11 image transform for edge-preserving smoothing and scene-level intrinsic decomposition. TOG, 2015. 1, 2, 8 +[4] Daniel J Butler, Jonas Wulff, Garrett B Stanley, and Michael J Black. A naturalistic open source movie for optical flow evaluation. In ECCV, 2012. 1, 2, 6 +[5] Chong Cao, Feng Lu, Chen Li, Stephen Lin, and Xukun Shen. Makeup removal via bidirectional tunable de-makeup network. IEEE TMM, 2019. 1 +[6] Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, and Hao Su. Shapenet: An information-rich 3d model repository. In arXiv preprint arXiv:1512.03012, 2015. 1, 2 +[7] Ziang Cheng, Yinqiang Zheng, Shaodi You, and Imari Sato. Non-local intrinsic decomposition with near-infrared priors. In ICCV, October 2019. 2 +[8] Qingnan Fan, Jiaolong Yang, Gang Hua, Baoquan Chen, and David Wipf. Revisiting deep intrinsic image decompositions. In CVPR, 2018. 1, 2, 3, 6, 7, 8 +[9] Roger Grosse, Micah K Johnson, Edward H Adelson, and William T Freeman. Ground truth dataset and baseline evaluations for intrinsic image algorithms. In ICCV, 2011. 1, 2, 7, 8 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 5 +[11] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In ICCV, 2017. 5 +[12] Xun Huang, Ming-Yu Liu, Serge Belongie, and Kautz Jan. Multimodal unsupervised image-to-image translation. In ECCV, 2018. 3, 4, 5, 6, 7, 8 +[13] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. 3 +[14] Michael Janner, Jiajun Wu, Tejas Kulkarni, D., Ilker Yildirim, and Joshua Tenenbaum, B. Self-supervised intrinsic image decomposition. In NIPS, 2017. 2 +[15] Balazs Kovacs, Sean Bell, Noah Snavely, and Kavita Bala. Shading annotations in the wild. In CVPR, 2017. 1, 2 +[16] Edwin H Land and John J McCann. Lightness and retinex theory. Josa, 2008. 2, 6 +[17] Hsin-Ying Lee, Hung-Yu Tseng, Jia-Bin Huang, Maneesh S-ingh, and Ming-Hsuan Yang. Diverse image-to-image translation via disentangled representations. In ECCV, 2018. 3, 4 +[18] Yu Li and Michael S. Brown. Single image layer separation using relative smoothness. In CVPR, 2014. 1, 2, 6, 7 +[19] Zhengqi Li and Noah Snavely. Cginintrinsics: Better intrinsic image decomposition through physically-based rendering. In ECCV, 2018. 1, 2, 3, 7, 8 + +[20] Zhengqi Li and Noah Snavely. Learning intrinsic image decomposition from watching the world. In CVPR, 2018. 2, 3, 6, 7, 8 +[21] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In NIPS, 2017. 3 +[22] Yunfei Liu, Yu Li, Shaodi You, and Feng Lu. Semantic guided single image reflection removal. In arXiv preprint arXiv:1907.11912, 2019. 2 +[23] Yunfei Liu and Feng Lu. Separate in latent space: Unsupervised single image layer separation. In AAAI, 2020. 2 +[24] Feng Lu, Xiaowu Chen, Imari Sato, and Yoichi Sato. Symps: Brdf symmetry guided photometric stereo for shape and light source estimation. IEEE T-PAMI, 2017. 2 +[25] Feng Lu, Yasuyuki Matsushita, Imari Sato, Takahiro Okabe, and Yoichi Sato. From intensity profile to surface normal: photometric stereo for unknown light sources and isotropic reflectances. IEEE T-PAMI, 2015. 2 +[26] Wei-Chiu Ma, Hang Chu, Bolei Zhou, Raquel Urtasun, and Antonio Torralba. Single image intrinsic decomposition without a single intrinsic image. In ECCV, 2018. 2, 3, 5, 6, 7, 8 +[27] Xudong Mao, Qing Li, Haoran Xie, Raymond Y.K. Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In ICCV, Oct 2017. 5 +[28] Takuya Narihira, Michael Maire, and Stella X Yu. Direct intrinsics: Learning albedo-shading decomposition by convolutional regression. In ICCV, 2015. 1, 2, 3, 6, 7, 8 +[29] Takuya Narihira, Michael Maire, and Stella X Yu. Learning lightness from human judgement on relative reflectance. In CVPR, 2015. 8 +[30] Carsten Rother, Martin Kiefel, Lumin Zhang, Bernhard Schölkopf, and Peter V Gehler. Recovering intrinsic images with a global sparsity prior on reflectance. In NIPS, 2011. 2 +[31] Bell Sean, Bala Kavita, and Snavely Noah. Intrinsic images in the wild. In SIGGRAPH, 2014. 1, 2, 7, 8 +[32] Li Shen and Chuohao Yeo. Intrinsic images decomposition using a local and global sparse representation of reflectance. In CVPR, 2011. 2, 6 +[33] Jian Shi, Yue Dong, Hao Su, and Stella X Yu. Learning non-lambertian object intrinsics across shapenet categories. In CVPR, 2017. 1, 2, 3, 7 +[34] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing ingredient for fast stylization. In arXiv preprint arXiv:1607.08022, 2016. 5 +[35] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. Highresolution image synthesis and semantic manipulation with conditional gans. In CVPR, 2018. 5 +[36] Zhongji Wang and Feng Lu. Single image intrinsic decomposition with discriminative feature encoding. In ICCVW, 2019. 2 +[37] Ye Yu and William AP Smith. Inverserendernet: Learning single image inverse rendering. In CVPR, 2019. 2 +[38] Tinghui Zhou, Philipp Krahenbuhl, and Alexei A. Efros. Learning data driven reflectance priors for intrinsic image decomposition. In ICCV, 2015. 1, 2, 6, 7, 8 + +[39] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. 3 \ No newline at end of file diff --git a/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/images.zip b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5ed0c36a005fa1af265b1762e18afd2e7f931349 --- /dev/null +++ b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f15d6a024bb8cd8aa9ababdc75888dea25311d04c2f8378d3d4884e38abd5096 +size 755412 diff --git a/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/layout.json b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5c5ad014917de5319078f6114047c260f3f158e9 --- /dev/null +++ b/unsupervisedlearningforintrinsicimagedecompositionfromasingleimage/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2aa8f47a2101e2bc19acf63a1999a3e6c0c84b3fbccb729974511ba3d5c10034 +size 508893 diff --git a/unsupervisedlearningfromvideowithdeepneuralembeddings/6ff0b498-d49d-49f7-952d-d06fc4d4d375_content_list.json b/unsupervisedlearningfromvideowithdeepneuralembeddings/6ff0b498-d49d-49f7-952d-d06fc4d4d375_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9e61837ce60367366ea2ec001946d1900b844829 --- /dev/null +++ b/unsupervisedlearningfromvideowithdeepneuralembeddings/6ff0b498-d49d-49f7-952d-d06fc4d4d375_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9894332a957ebdd79b6b12ccf6a204f1a2342abdf7b8d4d9bc815e84ded54f14 +size 67271 diff --git a/unsupervisedlearningfromvideowithdeepneuralembeddings/6ff0b498-d49d-49f7-952d-d06fc4d4d375_model.json b/unsupervisedlearningfromvideowithdeepneuralembeddings/6ff0b498-d49d-49f7-952d-d06fc4d4d375_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2d419740ba9b7161253ed7eb6c78c7e730e398a5 --- /dev/null +++ b/unsupervisedlearningfromvideowithdeepneuralembeddings/6ff0b498-d49d-49f7-952d-d06fc4d4d375_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7508e1a44b6184ab0ef13fd30bec8bc4060630fdde2cd45b99e444a6a4b87de3 +size 81106 diff --git a/unsupervisedlearningfromvideowithdeepneuralembeddings/6ff0b498-d49d-49f7-952d-d06fc4d4d375_origin.pdf b/unsupervisedlearningfromvideowithdeepneuralembeddings/6ff0b498-d49d-49f7-952d-d06fc4d4d375_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0392da839f8ce78aeadb79badd6902f3fb3139ec --- /dev/null +++ b/unsupervisedlearningfromvideowithdeepneuralembeddings/6ff0b498-d49d-49f7-952d-d06fc4d4d375_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6e24ffa404b94977a62a0800135990e57b5382fdf666edac009974e2f62498d +size 957552 diff --git a/unsupervisedlearningfromvideowithdeepneuralembeddings/full.md b/unsupervisedlearningfromvideowithdeepneuralembeddings/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6bc0e75288643ba2e37d4b1ea92405ac3bcc050a --- /dev/null +++ b/unsupervisedlearningfromvideowithdeepneuralembeddings/full.md @@ -0,0 +1,205 @@ +# Unsupervised Learning from Video with Deep Neural Embeddings + +Chengxu Zhuang $^{1}$ Tianwei She $^{1}$ Alex Andonian $^{2}$ Max Sobol Mark $^{1}$ Daniel Yamins $^{1}$ $^{1}$ Stanford University $^{2}$ MIT + +{chengxuz, shetw, joelmax, yamins}@stanford.edu andonian@mit.edu + +# Abstract + +Because of the rich dynamical structure of videos and their ubiquity in everyday life, it is a natural idea that video data could serve as a powerful unsupervised learning signal for visual representations. However, instantiating this idea, especially at large scale, has remained a significant artificial intelligence challenge. Here we present the Video Instance Embedding (VIE) framework, which trains deep nonlinear embeddings on video sequence inputs. By learning embedding dimensions that identify and group similar videos together, while pushing inherently different videos apart in the embedding space, VIE captures the strong statistical structure inherent in videos, without the need for external annotation labels. We find that, when trained on a large-scale video dataset, VIE yields powerful representations both for action recognition and single-frame object categorization, showing substantially improving on the state of the art wherever direct comparisons are possible. We show that a two-pathway model with both static and dynamic processing pathways is optimal, provide analyses indicating how the model works, and perform ablation studies showing the importance of key architecture and loss function choices. Our results suggest that deep neural embeddings are a promising approach to unsupervised video learning for a wide variety of task domains. + +# 1. Introduction + +A video's temporal sequence often contains information about dynamics and events in the world that is richer than that in its unordered set of frames. For example, as objects and agents move and interact with each other, they give rise to characteristic patterns of visual change that strongly correlate with their visual and physical identities, including object category, geometric shape, texture, mass, deformability, motion tendencies, and many other properties. It is thus an attractive hypothesis that ubiquitously available natural videos could serve as a powerful signal for unsupervised + +learning of visual representations for both static and dynamic visual tasks. + +However, it has been challenging to embody this hypothesis in a concrete neural network that can consume unlabelled video data to learn useful feature representations, especially in the context of at-scale real-world applications. Perhaps the biggest source of difficulty in making progress on unsupervised video learning, though, is that unsupervised learning has presented a formidable challenge even for the case of single static images. Even for the case of single static images, the gap in representational power between the features learned by unsupervised and supervised neural networks has been very substantial, to the point where the former were unsuitable for use in any at-scale visual task. However, recent advances in learning with deep visual embeddings have begun to produce unsupervised representations that rival the visual task transfer power of representations learned by their supervised counterparts [37, 36, 40, 3]. These methods leverage simple but apparently strong heuristics about data separation and clustering to iteratively bootstrap feature representations that increasingly better capture subtle natural image statistics. As a result, it is now possible to obtain unsupervised deep convolutional neural networks that outperform "early modern" deep networks (such as AlexNet in [13]) on challenging recognition tasks such as ImageNet, even when the latter are trained in a supervised fashion. Moreover, works in supervised video classification, action recognition and video captioning have proposed novel combinations of two- and three-dimensional convolutional structures that are increasingly well-suited to video feature extraction [5]. + +In this work, we show how the idea of deep unsupervised embeddings can be used to learn features from videos, introducing the Video Instance Embedding (VIE) framework. In VIE, videos are projected into a compact latent space via a deep neural network, whose parameters are then tuned to optimally distribute embedded video instances so that similar videos aggregate while dissimilar videos separate. We find that VIE + +learns powerful representations for transfer learning to action recognition in the large-scale Kinetics dataset, as well as for single-frame object classification in the ImageNet dataset. Moreover, where direct comparison to previous methods is possible, we find that VIE substantially improves on the state-of-the-art. We evaluate several possibilities for the unsupervised VIE loss function, finding that those that have been shown to be most effective in the single-frame unsupervised learning [40] are also most effective in the video context. We also explore several neural network embedding and frame sampling architectures, finding that different temporal sampling statistics are better priors for different transfer tasks, and that a two-pathway static-dynamic architecture is optimal. Finally, we present analyses of the learned representations giving some intuition as to how the models work, and a series of ablation studies illustrating the importance of key architectural choices. Codes can be found at https://github.com/neuroailab/VIE. + +# 2. Related Work + +Unsupervised Learning of Deep Visual Embeddings. In this work, we employ a framework derived from ideas first introduced in the recent literature on unsupervised learning of embeddings for images [37]. In the Instance Recognition (IR) task, a deep nonlinear image embedding is trained to maximize the distances between different images while minimizing distances between augmentations (e.g. crops) of a given image, thus maximizing the network's ability to recognize individual image instances. In the Local Aggregation (LA) task [40], the embedding loss also allows selected groups of images to aggregate, dynamically determining the groupings based on a local clustering measure. Conceptually, the LA approach resembles a blending of IR and the also-recent DeepCluster method [3], and is more powerful than either IR or DeepCluster alone, achieving state-of-the-art results on unsupervised learning with images. Another task Contrastive Multiview Coding (CMC) [28] achieves similar performance to LA within this embedding framework while aggregating different views of a given image. CMC have also been directly applied to videos, where single frame is clustered with its future frame and its corresponding optical flow image. The VIE framework allows the use of any of these embedding objectives, and we test several of them here. Other recently proposed methods such as [12] and [2] have achieved comparable results to LA and CMC through optimizing the mutual information of different views of the images, though they use much deeper and more complex architectures. + +Supervised Training of Video Networks. Neural networks have been used for a variety of supervised + +video tasks, including captioning [19] and 3D shape extraction [23, 1], but the architectures deployed in those works are quite different from those used here. The structures we employ are more directly inspired by work on supervised action recognition. A core architectural choice explored in this literature is how and where to use 2D single-frame vs 3D multi-frame convolution. A purely 2D approach is the Temporal Relational Network (TRN) [39], which processes aggregates of 2D convolutional features using MLP readouts. Methods such as I3D [4] have shown that combinations of both 2D and 3D can be useful, deploying 2D processing on RGB videos and 3D convolution on an optical flow component. A current high-performing architecture for action recognition is the SlowFast network [5], which computes mixed 2D-3D convolutional features from sequences of images at multiple time scales, including a slow branch for low frequency events and a fast branch for higher-frequency events. The dynamic branch of our two-pathway architecture is chosen to mimic the most successful SlowFast network. However, we find it useful to include in our architecture a static pathway that is not equivalent to either of the SlowFast branches. + +Unsupervised Learning on Videos. The literature on unsupervised video learning is too extensive to review comprehensively here, so we focus our discussion on several of the most relevant approaches. Temporal autoencoders such as PredNet [22], PredRNN [35], and $\mathrm{PredRNN + + }$ [34] are intriguing but have not yet evidenced substantial transfer learning performance at scale. Transfer learning results have been generated from a variety of approaches including the Geometry-Guided CNN [6], motion masks [26], VideoGAN [31], a pairwise-frame siamese triplet network [33], the Shuffle and Learn approach [24], and the Order Prediction Network (OPN) [21]. More recent works, including the Video Rotations Prediction task (3DRotNet) [16], the Video Motion and Appearance task (MoAp) [32], the Space-Time Puzzle task (ST-puzzle) [18], and the Dense Predictive Coding (DPC) task [9], have reported improved performance, with the help of pretraining on large-scale datasets and using spatiotemporal network architectures. All these works only operate on relationships defined within a single video, differentiating them from VIE, which exploits the relationships both within and between different videos through a loss function defined on the distribution of video embeddings. + +# 3. Methods + +VIE Embedding framework. The general problem of unsupervised learning from videos can be formulated as learning a parameterized function $\phi_{\pmb{\theta}}(\cdot)$ from input videos $\mathbf{V} = \{\mathbf{v}_i|i = 1,2,\dots,N\}$ , where each $\mathbf{v}_i$ con + +![](images/8824a3767a45f3a9f3d9820520537817cb3463ec41370244975c45cdf6976558.jpg) +Figure 1: Schematic of the Video Instance Embedding (VIE) Framework. a. Frames from individual videos $(\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3)$ are b. sampled into sequences of varying lengths and temporal densities, and input into c. deep neural network pathways that are either static (single image) or dynamic (multi-image). d. Outputs of frame samples from either pathway are vectors in the $D$ -dimensional unit sphere $S^D \subset \mathbf{R}^{D+1}$ . The running mean value of embedding vectors are calculated over online samples for each video, e. stored in a memory bank, and f. at each time step compared via unsupervised loss functions in the video embedding space. The loss functions require the computation of distribution properties of embedding vectors. For example, the Local Aggregation (LA) loss function involves the identification of Close Neighbors $\mathbf{C}_i$ (light brown points) and Background Neighbors $\mathbf{B}_i$ (dark brown points), which are used to determine how to move target point (green) relative to other points (red/blue). + +sists of a sequence of frames $\{f_{i,1}, f_{i,2}, \ldots, f_{i,m_i}\}$ . Our overall approach seeks to embed the videos $\{\mathbf{v}_i\}$ as feature vectors $\mathbf{E} = \{\mathbf{e}_i\}$ in the $D$ -dimension unit sphere $S^D = \{x \in \mathbf{R}^{D+1} \text{ with } ||x||_2^2 = 1\}$ . This embedding is realized by a neural network $\phi_\theta: \mathbf{v}_i \mapsto S^D$ with weight parameters $\pmb{\theta}$ , that receives a sequence of frames $\mathbf{f} = \{f_1, f_2, \ldots, f_L\}$ and outputs $e = \phi_\theta(\mathbf{f}) \in S^D$ . Although the number of frames in one video can be arbitrary and potentially large, $L$ must usually be fixed for most deep neural networks. Therefore, the input $\mathbf{f}$ on any single inference pass is restricted to a subset of frames in $\mathbf{v}$ chosen according to a frame sampling strategy $\rho$ — that is, a random variable function such that $\mathbf{v}' \subset \mathbf{v}$ for all samples $\mathbf{v}'$ drawn from $\rho(\mathbf{v})$ . Given $\rho$ , we then define the associated Video Instance Embedding (VIE) $\mathbf{e}$ for video $\mathbf{v}$ as the normed (vector-valued) expectation of $e$ under $\rho$ , i.e. + +$$ +\mathbf {e} = \frac {\mathrm {E} _ {\rho} [ \phi_ {\boldsymbol {\theta}} (\mathbf {f}) ]}{| | \mathrm {E} _ {\rho} [ \phi_ {\boldsymbol {\theta}} (\mathbf {f}) ] | | _ {2}} \in S ^ {D}. \tag {1} +$$ + +In addition to choosing $\phi_{\theta}$ and $\rho$ , we must choose a loss function $\mathcal{L}:\mathbf{E}\mapsto \mathbf{R}$ such optimizing $\mathcal{L}$ with respect to $\pmb{\theta}$ will cause statistically related videos to be grouped together and unrelated videos to be separated. Note that in theory this function depends on all of embedded vectors, although in practice it is only ever evaluated on a stochastically-chosen batch at any one time, with dataset-wide effects captured via a memory bank. + +In the following subsections, we describe natural options for these main components (architecture $\phi_{\pmb{\theta}}$ , sampling strategy $\rho$ , and loss function $\mathcal{L}$ ). As shown in Section 4, such choices can not only influence the quality of learned representations, but also change the focus of the representations along the spectrum between static and dynamic information extraction. + +Architecture $\phi$ and sampling strategy $\rho$ . Recent exploration in supervised action recognition has provided a variety of choices for $\phi_{\theta}$ . Although very complex network options are possible [4], since this work is an initial exploration of the interplay between video processing architecture and unsupervised loss functions, we have chosen to concentrate on five simple but distinct model families. They are differentiated mainly by how their frame sampling assumptions represent different types of temporal information about the inputs: + +1. Single-frame 2D-CNNs. Although deep 2D convolutional neural networks (CNNs) taking one frame as input ignore temporal information in the videos, they can still leverage context information and have achieved nontrivial performance on action recognition datasets [4]. They are also useful baselines for measuring the effect of including temporal information. +2. 3D-CNNs with dense equal sampling. 3D-CNNs, with spatiotemporal filters, can be applied to dense evenly-sampled frames to capture fine-grained temporal information. This architecture has proven useful in the + +R3D networks of [29] and the 3DResNets of [10]. + +3. Shared 2D-CNNs with sparse unequal sampling. The Temporal Relation Network bins videos into half-second clips, chooses $L$ consecutive bins, and randomly samples one frame from each bin. A shared 2D-CNN is then applied to each frame and its outputs are concatenated in order and fed into an MLP that creates the embedding. Unlike the dense sampling approach, this method can capture long-range temporal information through sparse sampling, but as the intervals between frames are uneven, the temporal signal can be noisy. +4. 2D-3D-CNNs with sparse equal sampling. Addressing the issue of noisy temporal information in the third family, the Slow branch of the SlowFast [5] architecture samples frames equally but sparsely from the input video. These frames are then passed through 2D-CNNs with spatial pooling, applying 3D convolutions downstream once spatial redundancy is reduced. +5. Multi-pathway architectures. Combination architectures allow the exploitation of the multiple temporal scales present in natural videos, including the SlowFast approach [5] (combining 2 and 4), and true two-pathway networks with both static and dynamic pathways (combining 1, 2, and 4). + +In our experiments (§4), we implement these models with CNN backbones that, while accommodating small unavoidable differences due to the input structure, are otherwise as similar as possible, so that the qualities of learned representations can be fairly compared. + +Loss function $\mathcal{L}$ . Recent work in unsupervised learning with single images has found useful generic metrics for measuring the quality of deep visual embeddings [37, 40], including the Instance Recognition (IR) and Local Aggregation (LA) loss functions. These methods seek to group similar inputs together in the embedding space, while separating dissimilar inputs. They are based on a simple probabilistic perspective for interpreting compact embedding spaces [37, 40]. Specifically, the probability that an arbitrary feature $e$ is recognized as a sample of $\mathbf{v}_i$ is defined to be: + +$$ +P (i | e, \mathbf {E}) = \frac {\exp \left(\mathbf {e} _ {i} ^ {T} e / \tau\right)}{\sum_ {j = 1} ^ {N} \exp \left(\mathbf {e} _ {j} ^ {T} e / \tau\right)} \tag {2} +$$ + +where temperature $\tau \in (0,1]$ is a fixed scale hyperparameter. Both $\{\mathbf{e}_i\}$ and $e$ are projected onto the unit sphere $S^D$ . With this definition in mind, we can define the IR and LA loss functions, adapted to the video context via eq. 1. + +IR algorithm. The VIE-version of the IR loss is: + +$$ +\mathcal {L} ^ {\mathrm {I R}} \left(\mathbf {v} _ {i}, \mathbf {E}\right) = - \log P (i | e, \mathbf {E}) + \lambda \| \boldsymbol {\theta} \| _ {2} ^ {2} \tag {3} +$$ + +where $\lambda$ is a regularization hyperparameter, and where for computational efficiency the denominator + +in $P(i|e, \mathbf{E})$ is estimated through randomly choosing a subset of $Q$ out of all $N$ terms (see [37] for further details). Intuitively, optimizing this loss will group embeddings of frame groups sampled from the same video, which then implicitly gathers other similar videos. + +LA algorithm. Local Aggregation augments IR by allowing for a more flexible dynamic detection of which datapoints should be grouped together. Define the probability that a feature $e$ is recognized as being in a set of videos $\mathbf{A}$ as $P(\mathbf{A}|e,\mathbf{E}) = \sum_{i\in \mathbf{A}}P(i|e,\mathbf{E})$ . For a video $\mathbf{v}_i$ and its embedding $\mathbf{e}_i$ , the LA algorithm identifies two sets of neighbors, the close neighbors $\mathbf{C}_i$ and background neighbors $\mathbf{B}_i$ . $\mathbf{C}_i$ is computed via dynamic online $k$ -means clustering, and identifies datapoints expected to be "especially similar" to $\mathbf{v}_i$ ; $\mathbf{B}_i$ is computed via $k$ -nearest neighbors method, and sets the scale of distance in terms of which closeness judgements are measured. Given these two neighbor sets, the local aggregation loss function measures the negative log-likelihood of a point being recognized as a close neighbor given that is already a background neighbor: + +$$ +\mathcal {L} ^ {\mathrm {L A}} (x _ {i}, \mathbf {E}) = - \log \frac {P (\mathbf {C} _ {i} \cap \mathbf {B} _ {i} | \mathbf {v} _ {i} , \mathbf {E})}{P (\mathbf {B} _ {i} | \mathbf {v} _ {i} , \mathbf {E})} + \lambda \| \boldsymbol {\theta} \| _ {2} ^ {2}. \quad (4) +$$ + +Intuitively, the LA loss function encourages the emergence of soft clusters of datapoints at multiple scales. See [40] for more details on the LA procedure. + +Memory Bank. Both the IR and LA loss functions implicitly require access to all the embedded vectors $\mathbf{E}$ to calculate their denominators. However, recomputing $\mathbf{E}$ is intractable for big dataset. This issue is addressed, as in [37, 36, 40], by approximating $\mathbf{E}$ with a memory bank $\bar{\mathbf{E}}$ keeping a running average of the embeddings. + +# 4. Experiments and Results + +Experimental settings. To train our models, we use the Kinetics-400 dataset [17], which contains approximately 240K training and 20K validation videos, each around 10 seconds in length and labeled in one of 400 action categories. After downloading, we standardize videos to a framerate of 25fps and reshape all frames so that the shortest edge is 320px. After sampling according to the frame sampling strategy for each model architecture, we then apply the spatial random cropping and resizing method used in [5]. Following [40] we also apply color noise and random horizontal flip, using the same spatial window and color noise parameters for all the frames within one video. At test time, we sample five equally-spaced sequences of frames, resize them so that their shortest side is 256px, and take center $224 \times 224$ crop. Softmax logits for the five samples are then averaged to generate the final output prediction. + +We use ResNet-18v2 [11] as the convolutional backbone for all our model families, to achieve a balance between model performance and computation efficiency. Implementations for the different model families are denoted VIE-Single ("Family 1"), VIE-3DResNet $^{1}$ ("Family 2"), VIE-TRN ("Family 3"), VIE-Slow ("Family 4"), and VIE-SlowFast ("Family 5"). Two-pathway models are created by concatenating single- and multi-frame network outputs, yielding VIE-TwoPathway-S (combining VIE-Single and VIE-Slow) and VIE-TwoPathway-SF (combining VIE-Single and VIE-Slowfast). We follow [40] for general network training hyperparameters including initial learning rate, optimizer setting, learning rate decay schedule, batch size, and weight decay coefficient. Further details of model architecture and training can be found in the supplementary material. + +Transfer to action recognition on Kinetics. After training all models on the unlabelled videos from Kinetics, we evaluate the learned representations by assessing transfer learning performance to the Kinetics action recognition task. To compare our method to previous work on this task, we reimplement three strong unsupervised learning algorithms: OPN [21], 3DRotNet [16], and RotNet [7]. As OPN and RotNet require single-frame models, we use ResNet18 as their visual backbones. For 3DRotNet, we use 3DResNet18 with the same input resolution as VIE-3DResNet. Reimplementation details are in the supplementary material. Transfer learning is assessed through the standard transfer procedure of fixing the learned weights and then training linear-softmax readouts from different layers of the fixed model. We implemented this procedure following the choices in [40], but using the Kinetics-specific data augmentation procedure described above. Since some of the models generate outputs with a temporal dimension, directly adding a fully-connected readout layer would lead to more trainable readout parameters as compared to single frame models. To ensure fair comparisons, we thus average the features of such models along the temporal dimension before readout. + +Results are shown in Table 1. All VIE variants show significantly better performance than OPN, RotNet, and 3DRotNet. Multi-frame models substantially outperform single-frame versions, an improvement that cannot be explained by the mere presence of additional frames (see the supplementary material Table S1). The two-pathway models achieve the highest performance, with a maximum accuracy of approximately $48.5\%$ . The rank order of unsupervised performances across VIE variants are aligned with that of supervised counterparts, indicating that the unsupervised training + +procedure takes advantage of increased architectural power when available. The LA-based VIE-Single model performs better than the IR-based model, consistent with the gap on static object recognition [40]. Finally, though previous work on unsupervised video learning has started to leverage large-scale datasets such as Kinetics [9, 16, 18], the transfer learning performance of the trained models to Kinetics action recognition has never been reported. We therefore hope these results are useful both for understanding the effect of architecture on representation quality and providing a strong unsupervised benchmark for future works. + +Transfer to action recognition on UCF101 and HMDB51. To compare VIE to previous methods, we evaluate results on the more commonly-used UCF101 [27] and HMDB51 [20] action recognition benchmarks. We initialize networks by pretrained weights on Kinetics and then finetune them on these datasets, following the procedures used for the most recent work [16, 32, 18]. We notice that details of the data augmentation pipelines used during finetuning can influence final results. Most importantly, we find having color-noise augmentation can improve the finetuning performance. However, the augmentation techniques have not been carefully controlled in previous works. For example, ST-puzzle [18], 3DRotNet [16], and MoAp [32] only use the usual random crop and horizontal flip augmentations, while DPC [9] also uses color-noise. To ensure that our comparisons to these algorithms are fair, we therefore test our models with both augmentation pipelines. Details can be found in the supplement. + +Table 2 and 3 show that VIE substantially outperforms other methods. Making these comparisons requires some care, because results reported in previous works are often confounded by the variation of multiple factors at once, making it hard to determine if improvements are really due to a better algorithm, rather than a larger training dataset, a more powerful network architecture, or a difference in input data types. First, holding network architecture and training dataset fixed, VIE-3DResNet surpasses the previous state-of-the-art (ST-Puzzle) by $6.5\%$ on UCF101 and $11.1\%$ on HMDB51, approaching the supervised upper-bound. With the better augmentation pipeline, the improvement on UCF101 is $9.7\%$ . 3DRotNets are trained on Kinetics-600, which contains more than twice as much training data and $50\%$ more categories than that used for ST-Puzzle and VIE models, and are trained with larger inputs (64-frame RGB vs VIE's 16-frame inputs). Nonetheless, VIE still shows improvement of more than $6.2\%$ when compared with comparable input type. 3DRotNet also reports results for a larger fused model trained with both 64-frame RGB and frame + +
DatasetsKineticsImageNet
MetricSuper.Conv3Conv4Conv5Conv3Conv4Conv5
Random-Single-9.408.436.847.987.786.23
OPN-Single* [21]-16.8420.8220.8613.0117.6318.29
RotNet-Single* [7]-26.2530.2723.3325.7727.5916.13
3DRotNet-3DResNet* [16]-28.3029.3319.3323.3422.0512.45
VIE-Single (IR)57.5923.5038.7243.8522.8540.4940.43
VIE-Single57.5923.8438.2544.4125.0240.4942.33
VIE-TRN59.4325.7239.3844.9127.2440.2837.44
VIE-3DResNet53.2233.0141.3443.4030.1835.3732.62
VIE-Slow60.8424.8040.4846.3620.1037.0237.45
VIE-Slowfast62.3628.6842.0747.3722.6136.8436.60
VIE-TwoPathway-S-26.3841.8047.1323.9840.5244.02
VIE-TwoPathway-SF-29.8943.5048.5323.2340.7343.69
Supervised-Single22.3237.8238.26
Supervised-TRN22.8241.1339.15
Supervised-3DResNet-28.0934.4030.56
Supervised-Slow21.8640.7732.87
Supervised-SlowFast20.2537.4130.75
+ +difference inputs. VIE-Slowfast nonetheless substantially outperforms this model, using fewer trainable parameters (21M vs 32M) and much less training data (Kinetics-400 vs Kinetics-600). When compared to the very recent DPC algorithm [9] in Table 3, VIE shows improvement of more than $7.3\%$ , even though DPC uses more frames (40 v.s. 16) as inputs and adds an additional recurrent cell between the action readout layer and its 3DResNet. Again, VIE makes good use of more complex architectures, as can be seen in the SlowFast vs ResNet18 comparison. Moreover, TwoPathway-SF achieves even better performance than SlowFast. + +Transfer to static object categorization. To determine the extent to which the VIE procedure learns general visual representations, we also evaluate the learned representations for transfer to image categorization in ImageNet. For models requiring multi-frame inputs, we generate a "static video" by tiling still images across multiple frames. Results are shown in Table 1. As they for the action recognition transfer, the two-pathway models are highest performing for this task as well. Interestingly, however, unlike for the case of action recognition, the multi-frame dynamic models are substantially worse than the single frame models on the ImageNet transfer task, and show a performance drop at the highest convolutional layers. In fact, the transfer performance of the single-frame unsupervised model trained on Kinetics is actually better than that of any model supervised on Kinetics. Taken together, these re + +Table 1: Top-1 transfer learning accuracy $(\%)$ on the Kinetics and ImageNet validation sets. "Random" means a randomly initialized ResNet-18 without any training. "Supervised-*" means trained on Kinetics for action recognition. Our supervised performance is not directly comparable to [5] due to different visual backbones used. *: These numbers are generated by us. + +
NetworksAlgorithmsUCFHMDB
AlexNet†CMC [28]59.126.7
OPN [21]56.322.1
C3DMoAp [32]61.233.4
ST-puzzle [18]60.628.3
3DResNetScratch47.421.5
ST-puzzle65.833.7
3DRotNet [16]62.933.7
3DRotNet(64f) [16]66.037.1
VIE (ours)72.344.8
Supervised84.458.7
SlowFastScratch55.821.4
VIE (ours)77.046.5
Supervised88.468.4
ResNet18Scratch46.717.3
VIE (ours)71.238.4
Supervised81.049.9
VIE-TwoPathway-SF78.250.5
+ +Table 2: Top-1 finetuning results on UCF101 and HMDB51 datasets using models pretrained on Kinetics without color-noise augmentation. We also provide performance of training from scratch ("Scratch") and from supervisedly trained models on Kinetics ("Supervised"). For 3DRotNet, we compare to its model trained with RGB inputs, where 64f means 64 frames. $\dagger$ : AlexNet results are all pretrained on UCF101. + +sults strongly motivate the two-pathway architecture, as + +
NetworksAlgorithmsUCFHMDB
3DResNetScratch60.027.0
DPC [9]68.234.5
VIE (ours)75.544.6
Supervised84.860.2
SlowFastScratch70.037.0
VIE (ours)78.950.1
Supervised89.770.4
ResNet18Scratch57.323.9
VIE (ours)73.141.2
Supervised83.552.9
VIE-TwoPathway-SF80.452.5
+ +Table 3: Top-1 finetuning results on UCF101 and HMDB51 datasets using models pretrained on Kinetics with color-noise augmentation. + +features that contribute to high performance on action recognition — e.g. processing of dynamical patterns — are not optimal for static-image performance. However, the relatively high performance of the static and two-pathway models shows that VIE can achieve useful generalization, even when train and test datasets are as widely divergent as Kinetics and ImageNet. + +# 5. Analysis + +Benefit from long-range temporal structure. A key idea in VIE is to embed entire videos into the latent space, which is intended to leverage contextual information contained in the video. This may even have utility for videos with multiple scenes containing widely-diverging content (common for Kinetics), as the high-dimensional embedding might learn to situate such videos in the latent space so as to retain this structure. As a preliminary test of the validity of this approach, we generated new training datasets by dividing each video into equal-length bins and then use these temporally-clipped datasets to train VIE. Table 4 show that the full-video model outperforms both 2- and 5-bin models, especially on ImageNet transfer learning performance, supporting the choice of embedding entire videos and also indicating that even better performance may be obtained using longer, more contextually complex videos. + +Benefit from more data. Although VIE achieves state-of-the-art unsupervised transfer performance on action recognition, and creates representations more useful for static object categorization than supervision on action recognition, its learned representation is (unsurprisingly) worse on ImageNet categorization than its counterpart directly trained on the (much larger) ImageNet training set [40]. To test whether VIE would benefit from more videos, we retrain VIE-Single with subsampled Kinetics (see Table 4). Performance on + +ImageNet increases consistently and substantially without obvious saturation, indicating VIE's representation generalizability would benefit substantially if trained on a video dataset of the scale of ImageNet. + +Video retrieval. We conduct a video retrieval experiment using distance in the embedding space. Representative examples are shown in Figure 2. Oftentimes, qualitatively similar videos were retrieved, although some failure cases were also observed. Moreover, VIE-Slowfast appears to extract context-free dynamic information, while VIE-Single is more biased by per-frame context, further validating the idea that multi-frame models develop representations focusing on the dynamic features, while single-frame models better extract static information. For example, in the "cleaning shoes" query, the two nearest VIE-Slowfast neighbors share a common dynamic (hand motions) with the query video, while hand and shoe position and the backgrounds all vary. Meanwhile, VIE-Single only captures object semantics (the presence of the hand), lacking information about the movement that hand will make. Retrieval failures likewise exemplify this result: in the bandaging and baking cookies examples, VIE-Slowfast captures high-level motion patterns inaccessible to the static pathway. + +# 6. Conclusion + +We have described the VIE method, an approach that combines multi-streamed video processing architectures with unsupervised deep embedding learning, and shown initial evidence that deep embeddings are promising for large-scale unsupervised video learning. In this work, our goal is not so much to illustrate the dominance of one particular novel loss function and architecture, but rather to provide a clear demonstration of the fact that a previously very challenging goal — unsupervised learning on at-scale video tasks — has become substantially more effective than it had previously been, due to a combination of very recent architectural and loss-function ideas. Together with recent results in static image categorization [40, 37, 28, 3], our results suggest that the deep embedding approach is an increasingly viable framework for general unsupervised learning across many visual tasks. + +We've also found that performance across different types of visual tasks depends in an understandable fashion on how frame sampling is accomplished by the architecture, and that a two-pathway model with both static and dynamic pathways is relatively better than either alone. This result is, interestingly, consistent with observations from neuroscience, where it has been shown that both ventral stream [38] and dorsal stream [8] brain pathways contribute to visual performance, with the former being more sensitive to static objects and the + +
DatasetKineticsImageNet
LayerConv3Conv4Conv5Conv3Conv4Conv5
VIE-Single23.8438.2544.4125.0240.4942.33
70%-VIE-Single26.1838.8743.5923.0539.6339.85
30%-VIE-Single25.5437.4940.7223.3338.4936.23
2bin-VIE-Single24.5439.1644.2425.5541.4339.36
5bin-VIE-Single25.1738.7343.3323.9040.4637.83
+ +Table 4: Top-1 accuracy (in %) of transfer learning to Kinetics and ImageNet from VIE-Single models trained using different amount of videos or with videos cut into different number of bins. + +![](images/fc53e7a0c4e4c05112ab1c6a99a6a5d78563ff4d3ee4b8b67e042dcc207a5c32.jpg) +Figure 2: Video retrieval results for VIE-Single and VIE-Slowfast models from Kinetics validation set. GT=ground truth label, Pred=model prediction. For each query video, three nearest training neighbors are shown. Red font indicates an error. + +latter more sensitive to dynamic stimuli. + +However, there are a number of critical limitations in the current method that will need to be overcome in future work. Our choice of Local Aggregation for evaluation in this work should not taken as a statement that it is the only way to achieve useful unsupervised deep neural embeddings. In particular, exploring the use of other very recent unsupervised learning losses, such as CMC [28] and DIM [14], will also be of great interest. We expect many of these methods would be compatible with the general VIE framework, and would likely be usefully complementary to LA. + +Another natural direction for improvement of the architecture is to investigate the use of recurrent neural network motifs [15, 25] and attentional mechanisms [30]. It is likely that improved architectures of these or some other type could better take advantage of the rich medium-range temporal structure (e.g. $\sim$ 1s-1m in length) of natural video sequences. + +Further, our current results are likely impacted by limitations in the Kinetics dataset, especially for harnessing the importance of dynamic processing, since even in the supervised case, single-frame performance is comparatively high. Seeking out and evaluating VIE on additional datasets will be critical — perhaps most importantly, for applications involving large and previously uncurated video data where the potential impact of unsupervised learning is especially high. It will also be critical to test VIE in video task domains other than classification, including object tracking, dynamic 3D shape reconstruction and many others. + +Acknowledgments. This work was supported by the McDonnell Foundation (Grant No. 220020469), the Simons Foundation (543061), the Sloan Foundation (FG2018-10963), the National Science Foundation (1703161 and 1844724), and the National Institutes of Health (R01 MH069456), and hardware donation from the NVIDIA Corporation. + +# References + +[1] Amir Akbarzadeh, J-M Frahm, Philippos Mordohai, Brian Clipp, Chris Engels, David Gallup, Paul Merrell, M Phelps, S Sinha, B Talton, et al. Towards urban 3d reconstruction from video. In Third International Symposium on 3D Data Processing, Visualization, and Transmission (3DPVT'06), pages 1-8. IEEE, 2006. +[2] Philip Bachman, R Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. arXiv preprint arXiv:1906.00910, 2019. +[3] Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In Proceedings of the European Conference on Computer Vision (ECCV), pages 132-149, 2018. +[4] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6299-6308, 2017. +[5] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition. arXiv preprint arXiv:1812.03982, 2018. +[6] Chuang Gan, Boqing Gong, Kun Liu, Hao Su, and Leonidas J Guibas. Geometry guided convolutional neural networks for self-supervised video representation learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5589-5597, 2018. +[7] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. arXiv preprint arXiv:1803.07728, 2018. +[8] Melvyn A Goodale and A David Milner. Separate visual pathways for perception and action. Trends in neurosciences, 15(1):20-25, 1992. +[9] Tengda Han, Weidi Xie, and Andrew Zisserman. Video representation learning by dense predictive coding. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 0–0, 2019. +[10] Kensho Hara, Hirokatsu Kataoka, and Yutaka Satoh. Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet? Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 6546-6555, 2018. +[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pages 630-645. Springer, 2016. +[12] Olivier J Henaff, Ali Razavi, Carl Doersch, SM Eslami, and Aaron van den Oord. Data-efficient image recognition with contrastive predictive coding. arXiv preprint arXiv:1905.09272, 2019. +[13] Geoffrey Hinton, Li Deng, Dong Yu, George Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Brian Kingsbury, et al. Deep neural networks for acoustic modeling + +in speech recognition. IEEE Signal processing magazine, 29, 2012. +[14] R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. arXiv preprint arXiv:1808.06670, 2018. +[15] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. *Neural computation*, 9(8):1735-1780, 1997. +[16] Longlong Jing, Xiaodong Yang, Jingen Liu, and Yingli Tian. Self-Supervised Spatiotemporal Feature Learning via Video Rotation Prediction. 2018. +[17] Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, et al. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017. +[18] Dahun Kim, Donghyeon Cho, and In So Kweon. Self-Supervised Video Representation Learning with Space-Time Cubic Puzzles. 2018. +[19] Ranjay Krishna, Kenji Hata, Frederic Ren, Li Fei-Fei, and Juan Carlos Niebles. Dense-c captioning events in videos. In Proceedings of the IEEE International Conference on Computer Vision, pages 706-715, 2017. +[20] H. Kuehne, H. Jhuang, E. Garrote, T. Poggio, and T. Serre. HMDB: a large video database for human motion recognition. In Proceedings of the International Conference on Computer Vision (ICCV), 2011. +[21] Hsin-Ying Lee, Jia-Bin Huang, Maneesh Singh, and Ming-Hsuan Yang. Unsupervised representation learning by sorting sequences. In Proceedings of the IEEE International Conference on Computer Vision, pages 667-676, 2017. +[22] William Lotter, Gabriel Kreiman, and David Cox. Deep predictive coding networks for video prediction and unsupervised learning. arXiv preprint arXiv:1605.08104, 2016. +[23] Takashi Matsuyama, Xiaojun Wu, Takeshi Takai, and Shohei Nobuhara. Real-time 3d shape reconstruction, dynamic 3d mesh deformation, and high fidelity visualization for 3d video. Computer Vision and Image Understanding, 96(3):393-434, 2004. +[24] Ishan Misra, C Lawrence Zitnick, and Martial Hebert. Shuffle and learn: unsupervised learning using temporal order verification. In European Conference on Computer Vision, pages 527-544. Springer, 2016. +[25] Aran Nayebi, Daniel Bear, Jonas Kubilius, Kohitij Kar, Surya Ganguli, David Sussillo, James J DiCarlo, and Daniel L Yamins. Task-driven convolutional recurrent models of the visual system. In Advances in Neural Information Processing Systems, pages 5290-5301, 2018. +[26] Deepak Pathak, Ross Girshick, Piotr Dólar, Trevor Darrell, and Bharath Hariharan. Learning features by watching objects move. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2701-2710, 2017. + +[27] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. UCF101: A dataset of 101 human actions classes from videos in the wild. CoRR, abs/1212.0402, 2012. +[28] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019. +[29] Du Tran, Heng Wang, Lorenzo Torresani, Jamie Ray, Yann LeCun, and Manohar Paluri. A closer look at spatiotemporal convolutions for action recognition. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 6450-6459, 2018. +[30] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008, 2017. +[31] Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Generating videos with scene dynamics. In Advances In Neural Information Processing Systems, pages 613-621, 2016. +[32] Jiangliu Wang, Jianbo Jiao, Linchao Bao, Shengfeng He, Yunhui Liu, and Wei Liu. Self-supervised Spatiotemporal Representation Learning for Videos by Predicting Motion and Appearance Statistics. 2019. +[33] Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In Proceedings of the IEEE International Conference on Computer Vision, pages 2794-2802, 2015. +[34] Yunbo Wang, Zhifeng Gao, Mingsheng Long, Jianmin Wang, and Philip S Yu. Predrnn++: Towards a resolution of the deep-in-time dilemma in spatiotemporal predictive learning. arXiv preprint arXiv:1804.06300, 2018. +[35] Yunbo Wang, Mingsheng Long, Jianmin Wang, Zhifeng Gao, and S Yu Philip. Predrnn: Recurrent neural networks for predictive learning using spatiotemporal lstms. In Advances in Neural Information Processing Systems, pages 879-888, 2017. +[36] Zhirong Wu, Alexei A Efros, and Stella X Yu. Improving generalization via scalable neighborhood component analysis. In Proceedings of the European Conference on Computer Vision (ECCV), pages 685-701, 2018. +[37] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3733-3742, 2018. +[38] Daniel LK Yamins, Ha Hong, Charles F Cadieu, Ethan A Solomon, Darren Seibert, and James J DiCarlo. Performance-optimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 111(23):8619-8624, 2014. +[39] Bolei Zhou, Alex Andonian, Aude Oliva, and Antonio Torralba. Temporal relational reasoning in videos. In Proceedings of the European Conference on Computer Vision (ECCV), pages 803-818, 2018. + +[40] Chengxu Zhuang, Alex Lin Zhai, and Daniel Yamins. Local aggregation for unsupervised learning of visual embeddings. arXiv preprint arXiv:1903.12355, 2019. \ No newline at end of file diff --git a/unsupervisedlearningfromvideowithdeepneuralembeddings/images.zip b/unsupervisedlearningfromvideowithdeepneuralembeddings/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..133d0cc9c57e8a688ecdfd6bf23942826b601074 --- /dev/null +++ b/unsupervisedlearningfromvideowithdeepneuralembeddings/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2eb90d0944a2a542c18be48dc43eec947a98d00ca8a0ffcd2b2950d7a3c0a8a +size 582418 diff --git a/unsupervisedlearningfromvideowithdeepneuralembeddings/layout.json b/unsupervisedlearningfromvideowithdeepneuralembeddings/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6f2ed4dbe333ff6fc6c5d296664996ccc952144a --- /dev/null +++ b/unsupervisedlearningfromvideowithdeepneuralembeddings/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cf2547d6e2ec0784cc56489f756f2c98630dcfa39ae2c596c6545ca976f00cf +size 299718 diff --git a/unsupervisedlearningofintrinsicstructuralrepresentationpoints/f9db4396-8e57-45d8-9093-a06c96ed8594_content_list.json b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/f9db4396-8e57-45d8-9093-a06c96ed8594_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0c2bcbb8b696085cb9396c58ed0e7363a007da00 --- /dev/null +++ b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/f9db4396-8e57-45d8-9093-a06c96ed8594_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0a2c07ed7959872b92ed20c0e401174502a3152c1f000c0b4460f1e1f7f2005 +size 73643 diff --git a/unsupervisedlearningofintrinsicstructuralrepresentationpoints/f9db4396-8e57-45d8-9093-a06c96ed8594_model.json b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/f9db4396-8e57-45d8-9093-a06c96ed8594_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9542632f112afc079a8f4fac2ade175dddb684c7 --- /dev/null +++ b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/f9db4396-8e57-45d8-9093-a06c96ed8594_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e68d68ab972e803a9d843f27fe80d85342f7f05243cb1a689792b1a282c9526d +size 90988 diff --git a/unsupervisedlearningofintrinsicstructuralrepresentationpoints/f9db4396-8e57-45d8-9093-a06c96ed8594_origin.pdf b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/f9db4396-8e57-45d8-9093-a06c96ed8594_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b03fa12be6f18aa0e3225630c817a0fcf3d349fe --- /dev/null +++ b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/f9db4396-8e57-45d8-9093-a06c96ed8594_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c52b6530c6eb2144bb93887255f3b4db9802d016b5b360ad3fc465b949e191fb +size 3961547 diff --git a/unsupervisedlearningofintrinsicstructuralrepresentationpoints/full.md b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/full.md new file mode 100644 index 0000000000000000000000000000000000000000..956d16cd3b8138c791e12e30dcc4fac9482fb987 --- /dev/null +++ b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/full.md @@ -0,0 +1,336 @@ +# Unsupervised Learning of Intrinsic Structural Representation Points + +Nenglun Chen $^{1}$ , Lingjie Liu $^{2}$ , Zhiming Cui $^{1}$ , Runnan Chen $^{1}$ , Duygu Ceylan $^{3}$ , Changhe Tu $^{4}$ , Wenping Wang $^{1}$ + +1The University of Hong Kong 2Max Planck Institute for Informatics 3Adobe Research 4Shandong University + +# Abstract + +Learning structures of 3D shapes is a fundamental problem in the field of computer graphics and geometry processing. We present a simple yet interpretable unsupervised method for learning a new structural representation in the form of 3D structure points. The 3D structure points produced by our method encode the shape structure intrinsically and exhibit semantic consistency across all the shape instances with similar structures. This is a challenging goal that has not fully been achieved by other methods. Specifically, our method takes a 3D point cloud as input and encodes it as a set of local features. The local features are then passed through a novel point integration module to produce a set of 3D structure points. The chamfer distance is used as reconstruction loss to ensure the structure points lie close to the input point cloud. Extensive experiments have shown that our method outperforms the state-of-the-art on the semantic shape correspondence task and achieves comparable performance with the state-of-the-art on the segmentation label transfer task. Moreover, the PCA based shape embedding built upon consistent structure points demonstrates good performance in preserving the shape structures. Code is available at https://github.com/NolenChen/3DStructurePoints + +# 1. Introduction + +Analyzing 3D shape structures is a fundamental problem in the field of computer graphics and geometry processing. One common way is to co-analyze a large collection of shapes, such as shape co-segmentation [4, 48], shape correspondence estimation [14], shape abstraction [37, 22, 33] and 3D keypoint discovery [35]. An important requirement for such co-analysis is to leverage the semantic consistency among different shapes to discover semantically consistent features or structures that can facilitate different + +tasks. Quite a few structural representations have been proposed for 3D shapes, such as medial axis, curve skeleton and keypoints, which are designed for different tasks. Early works mainly use hand-crafted features and formulate it as optimization problems. While, they usually rely on parameter tuning, and are designed for specific tasks or datasets. Recently, deep learning techniques have been emerged to address these problems[13, 26]. In this work, we propose a method to learn a new structural representation for establishing semantic correspondence for 3D point clouds. + +![](images/893e6386c446c08c6e35f68a4a6d6b3456a4c1a18d85e1d76eee19bcede74275.jpg) + +![](images/532a64585d09fee44d6ea37d632cc98244b65b9abfc2008c5ea8c85ab593e6c4.jpg) + +![](images/51c072ed13da4328440aa4fa0bc7a970d0e678a073fcd4f77d680fcd6b0c0f7d.jpg) +Figure 1: (a) Semantic correspondence. (b) Segmentation label transfer. (c) Visualization of one principal component of PCA embedding space. + +![](images/3b660d44e50a7be436fae99e5ca2a30dc1975a0e5407ed9eb217e250dc557ef0.jpg) + +![](images/e277a06c2b6b8cee16cbb626021b0d12edbb9bf562dabf9fa88de2c619b0ca55.jpg) + +![](images/68a8eb906e9a70ad6b8aa87ce6e801914bad878b65aeee4598c4b9368ff928b2.jpg) + +![](images/b7fc8c0fbd149f92cbabef61c1700610167c19c8b3cc982ff543a1967ad903d7.jpg) + +![](images/24da1ef9fb8422b15250dca499cafa5f1622c07e0c2b4bf0280d998caacbd99e.jpg) + +There has recently been active research on deep learning techniques for processing 3D point clouds. PointNet [28] is a pioneer work in this direction. After that, a number of network structures have been proposed and have achieved great success in various tasks. Most existing works mainly focus on generating accurate reconstruction of the target shapes, but the generated point clouds lack of structure information. Recently, several works [36, 47, 41, 8, 31] have been proposed to generate structured point clouds, but with no guarantee for point-wise correspondence. + +To address this issue, we propose a novel unsupervised method to learn semantically consistent structure points for + +3D shapes in the same category. Given a 3D shape represented as a point cloud, the structure points generated by our network are a set of ordered points on the surface of the shape that provide a good abstraction and approximation of the input shape. Our architecture is simple but directly interpretable. Extensive experiments show that our method is robust to different point samplings and can be generalized to real scanned point clouds unseen in the training stage. Our method achieves state-of-the-art performance on the semantic shape correspondence task and the segmentation label transfer task. Moreover, based on the high consistency of the structure points, we build a PCA based shape embedding that can preserve shape structures well. Figure 1 illustrates the related applications. + +Our key contributions are summarized as follows: + +- A simple yet interpretable unsupervised architecture for extracting semantically meaningful structure points for 3D shapes represented as point clouds. It is robust to different sampling of point clouds and is applicable to real scanned data. +- Our method outperforms the state-of-the-art on the semantic shape correspondence task and achieves comparable performance with state-of-the-art methods on the segmentation label transfer task. +- A PCA based shape embedding built upon consistent structure points is able to preserve the shape structures well and has the potential to be used in several important tasks, such as shape reconstruction and shape completion. + +# 2. Related Work + +# 2.1. Shape Structure Analysis + +Recently, quite a few works have been proposed for learning keypoints as structural shape representations. Several unsupervised methods have been proposed to learn keypoints in 2D image domain. [16, 24, 46] disentangle the structure and appearance of 2D images for keypoints discovery. For keypoint detection on 3D shapes, KeyPointNet [35] utilizes multi-view consistency to discover a sparse set of geometrically and semantically consistent keypoints across different shapes in the same category. + +Unlike previous works, we conduct unsupervised learning of either sparse or dense consistent structure points as structural representation directly on 3D point clouds. Our method can be easily generalized to real scanned data. + +# 2.2. Deep Learning on Point Clouds + +Recent advances in deep neural networks have shown its great success in processing point clouds. PointNet [28], a pioneering work, utilizes point-wise MLP layers together + +with symmetric and permutation-invariant functions to aggregate information from all the points. To aggregate both local and global information, PointNet++ [29] introduces a hierarchical structure that applies PointNet recursively on the partitioned point cloud. So-Net [21] uses Self-Organizing Map to model the spatial distribution of a point cloud to extract hierarchical features. Inspired by 2D convolution, [32, 39, 38] reformulate the convolution operation and adapt it to point clouds. Our approach is built upon PointNet++ and it can also be built on other point cloud processing networks. + +Due to the irregular structures of point clouds, designing a decoder for generating point clouds is more difficult than that for 2D images. Previous works such as [1, 10, 44] mainly use MLP to generate point clouds from the encoded embedding. The point clouds generated by these methods lack structure information. FoldingNet [42] and its variants [7, 8, 12, 41] propose to generate the point clouds by deforming primitive structures. [23] proposes a structural point cloud generator based on predicting structures at multiple viewpoints. [31, 36] use tree structure to design decoder network for generating structured point clouds. [47] introduced capsule network for processing point clouds, in which shape structure information is encoded in the latent capsules. Our network, as a new kind of structured point cloud auto-encoder, produces structure points that exhibit point-wise consistency. Moreover, our PCA based structure points embedding also has the potential to be used in some important tasks like shape reconstruction and completion. + +# 2.3. 3D Shape Correspondence + +Computing correspondences for 3D shapes is a fundamental task in geometric processings. Earlier methods [15, 18, 19, 30, 40] mainly rely on hand-crafted descriptors or optimization among a collection of shapes to compute the correspondence. The functional map and its variants [14, 27] provide a framework for representing maps between spaces of real-valued functions defined on shapes. + +Recently, deep learning techniques have been widely used in learning correspondence for 3D shapes. A series of methods [3, 5, 11, 13] have been proposed to learn local descriptors for registering point clouds. ShapeUnicode [26] proposes a way to learn unified embedding for 3D shapes in different representations, and demonstrates its ability in establishing correspondence among 3D shapes. However, these methods require labeled pairwise correspondences in the training stage. Deep functional map [34] aims at building functional bases with deep learning, while indicator functions are still needed in the training stage. [7, 45] use self supervised learning to learn local descriptors about point clouds, and demonstrate good performance in registration of 3D scans. + +Unlike previous methods, our approach learns consistent + +![](images/78f0029dcc1d53d234b16065925eef57e0c006b694be2ce94cc78c0cfa59240f.jpg) +Figure 2: Pipeline of our network: Given a point cloud, PointNet++ is first used to extract the local contextual features $F$ and their corresponding points $Q$ . Then, the features $F$ and the sample points $Q$ are further passed through the point integration module to produce the structure points $S$ . + +structure points across all shapes in a category in an unsupervised way. Based on the high consistency of the structure points, we can achieve good performance in transferring segmentation labels, and build the embedding space for point clouds directly with PCA. + +# 3. Method + +In this section, we introduce our end-to-end framework for learning intrinsic structure points from point clouds without explicit supervision. As illustrated in Figure 2, given a point cloud, $X = \{x_{1}, x_{2}, \dots, x_{n}\}$ with $x_{i} \in \mathbb{R}^{3}$ , our model predicts an ordered list of structure points, $S = \{s_{1}, s_{2}, \dots, s_{m}\}$ with $s_{i} \in \mathbb{R}^{3}$ . The network is trained for a collection of 3D shapes in the same category in an unsupervised manner. In the following, we first describe our network architecture which is composed of a PointNet++ encoder and a point integration module. Then we introduce a reconstruction loss for training. Finally, we show that the produced structure points exhibit semantic consistency across all the shapes in the same category, which is an essential property for shape co-analysis. + +# 3.1. Network Architecture + +Our network architecture is summarized in Figure 2. It can be seen as an encoder-decoder based architecture consisting of two modules, PointNet++ encoder and Point integration module. In the following, we provide more details. + +PointNet++ Encoder Given a point cloud, $X = \{x_{1}, x_{2}, \ldots, x_{n}\}$ with $x_{i} \in \mathbb{R}^{3}$ , the first step is to extract sample points $Q = \{q_{1}, q_{2}, \ldots, q_{l}\} (q_{i} \in \mathbb{R}^{3})$ with the local contextual features $F = \{f_{1}, f_{2}, \ldots, f_{l}\} (f_{i} \in \mathbb{R}^{c})$ , where $l$ indicates the number of sample points and $c$ is the dimension of the feature representation. + +We build our architecture upon the PointNet++ [29] encoder, which extracts point cloud features by adaptively + +combining features from multiple scales. The PointNet++ encoder is composed of multiple set abstraction levels. Each level consists of three key layers: sampling layer, multi-scale grouping layer and PointNet layer for processing and abstracting the input points in a hierarchical way. We refer the reader to the original paper for more details. + +![](images/d8aa8f3dec6c699fe2a33204409740bf443ad68464eea871d15eca4abb693182.jpg) +Figure 3: The probability maps of two structure points (in red and green boxes) are shown in second and third columns. Darker color indicates higher probability. + +Point Integration Module The input to this module is the sample points $Q$ with their local contextual features $F$ of size $l \times (3 + c)$ obtained by the encoder. The outputs are $m$ structure points $S$ . Dually, given the local contextual features $F$ , we first apply a shared multi-layer perceptron (MLP) block followed by softmax as activation function to produce the probability maps $P = \{p_1, p_2, \dots, p_m\}$ . The element $p_i^j$ in the probability map $p_i$ indicates the probability of the point $q_j$ being the structure point $s_i$ . Therefore, the structure points $S$ can be computed as follows: + +$$ +s _ {i} = \sum_ {j = 1} ^ {l} q _ {j} p _ {i} ^ {j} \quad \text {w i t h} \quad \sum_ {j = 1} ^ {l} p _ {i} ^ {j} = 1 \quad \text {f o r e a c h} \quad i \tag {1} +$$ + +Equation 1 is a convex combination of the points $Q$ , ensuring that the predicted structure points $S$ are located within the convex hull of the points $Q$ . + +In Figure 3, we visualize the learned probability map for different structure points. The first column shows the in + +put point clouds (in grey) and their corresponding 16 structure points (in color). The probability map of two structure points marked with red and green boxes are illustrated in the second and third columns. Note that, the learned probability maps have concentration effect, though we do not explicitly enforce them to be concentrated in local regions. + +# 3.2. Reconstruction Loss + +To train the network in an unsupervised manner, we define our reconstruction loss based on the Chamfer distance (CD) [10] to constrain the predicted structure points to be close to the input point cloud. Specifically, the reconstruction loss is the Chamfer distance between the predicted structure points $S$ and the input points $X$ : + +$$ +L _ {r e c} (S, X) = \sum_ {s _ {i} \in S} \min _ {x _ {j} \in X} \| s _ {i} - x _ {j} \| _ {2} ^ {2} + \sum_ {x _ {j} \in X} \min _ {s _ {i} \in S} \| s _ {i} - x _ {j} \| _ {2} ^ {2} \tag {2} +$$ + +# 3.3. Cross-Object Consistency + +We do not explicitly enforce the structure points to be consistent for different instances, but the network is able to generate semantically consistent probability maps $P$ for the objects in the same category, leading to the consistency of the produced structure points as shown in Figure 4. In the following, we give a detailed explanation about the consistency of structure points. + +To simplify discussion, we first consider two identical shapes $A$ and $B$ defined by the same point cloud $X$ , except that these points are processed in possibly different orders for $A$ and $B$ . After passing through $\mathrm{PointNet}++$ feature extractor and the shared MLP, a set of sample points of shape $A$ are extracted with the corresponding $m$ -dimensional probability vectors. Let us denote these sample points of $A$ by the ordered sequence of points $(a_{1},a_{2},\dots,a_{\ell})$ , with the corresponding probability vectors $\zeta_{i} = (p_{1}^{i},p_{2}^{i},\dots,p_{m}^{i})$ , $i = 1,2,\dots,\ell$ . Since $B$ is identical to $A$ , we may suppose that the sample points $(b_{1},b_{2},\dots,b_{\ell})$ obtained in the same way for $B$ are a permutation of the sample points $(a_{1},a_{2},\dots,a_{\ell})$ for $A$ . So we may denote $b_{i} = a_{\pi(i)}$ , where $\pi(.)$ is a permutation function of $\{1,2,\dots,\ell\}$ . Then the probability vectors of the sample points $b_{i}$ of shape $B$ are $\zeta_{\pi(i)} = (p_{1}^{\pi(i)},p_{2}^{\pi(i)},\dots,p_{m}^{\pi(i)})$ , $i = 1,2,\dots,\ell$ . And the $j$ -th structure point for shape $A$ is given by: + +$$ +s _ {j} ^ {A} = \sum_ {i = 1} ^ {l} p _ {j} ^ {i} a _ {i} \tag {3} +$$ + +Then for the $j$ -th structure point $s_j^B$ for shape $B$ , we have: + +$$ +s _ {j} ^ {B} = \sum_ {i = 1} ^ {\ell} p _ {j} ^ {\pi (i)} b _ {i} = \sum_ {i = 1} ^ {\ell} p _ {j} ^ {\pi (i)} a _ {\pi (i)} = \sum_ {i = 1} ^ {\ell} p _ {j} ^ {i} a _ {i} = s _ {j} ^ {A} \quad (4) +$$ + +That is, the $j$ -th structure point for shape $A$ is the same as the $j$ -th structure point for shape $B$ . When two shapes $A$ and $B$ are similar, because the neural networks in the pipeline are continuous mappings, the structure points $\{s_j^A\}_{j=1}^m$ of $A$ will be individually close to their corresponding structure points $\{s_j^B\}_{j=1}^m$ of $B$ . + +# 4. Experiments + +# 4.1. Datasets + +We conduct most of our experiments on the ShapeNet [43] dataset. In the 3D semantic correspondence task, we use the same datasets in [13], where ShapeNet [43] and the BHCP benchmark [18] are used for training and testing respectively. For segmentation label transfer task, ShapeNet part dataset [43] is used. Farthest point sampling [9] is applied to sample point clouds from 3D shapes. + +# 4.2. Implementation Details + +The PointNet++ encoder we used is composed of two set abstraction levels with 512 and 128 grouping centers respectively. Multi-scale grouping (MSG) is used to combine the multi-scale features. The MSG layers in two levels contain scales (0.1, 0.2, 0.4) and (0.2, 0.4, 0.8) respectively. The output of the PointNet++ encoder contains $l = 128$ sample points, with each sample point having 640 dimensional local contextual features. The configuration of the MLP block in the point integration module depends on the number of structure points. Specifically, for $m = 512$ structure points, the MLP block contains 3 layers with the neuron numbers (640, 512, 512). The dropout ratio is set to 0.2 to avoid over-fitting of the MLP block. Adam[20] is used as the optimizer. We train our network on a single NVIDIA GTX 1080Ti GPU with less than 1 hour per category. + +# 4.3. Consistency Across Objects + +The structure points produced for different shapes are visualized in Figure 4, where the input point clouds (grey) and the sparse structure points (colored) are shown in the 1st and 3rd rows, and the corresponding dense structure points are illustrated in the 2rd and 4th rows. Corresponding structure points are visualized in the same color. It can be seen that our approach can generate sparse and dense structure points in a consistent manner for the shapes with similar structures. Note that such correspondence may not exist in the regions with significant structure differences. An example is the chairs with and without armrest in Fig. 4. + +# 4.4.3D Semantic Correspondence + +To evaluate the cross-object consistency of the structure points, we test our approach on the task of computing 3D shape semantic correspondence and compare it with the state-of-the-art methods that have been specifically tuned + +![](images/4bfd31b31af3e57c70e12b6fb80f8aaaf1de0805efc04c3d728a5f92c2bd52f9.jpg) +Figure 4: Consistency across different shapes. The produced 16 structure points (colored) for different input point clouds (grey) are shown in 1st and 3rd rows, and the produced 1024 structure points are in 2nd and 4th rows. Corresponding structure points are in the same color. + +for this task including LMVCNN [13], ShapeUnicode [26] and EdgeNet [3], as well as some point cloud encoder-decoder architectures: AtlasNet2 [8], FoldingNet [42], TopNet [36] and 3DPointCapsule [47]. We also use the critical points in PointNet [28] and the FCN based decoder described in [1] as baseline comparisons. Since LMVCNN is rotation-invariant, for fair comparison with it, we train our method with rotation augmentation and test on the point clouds with arbitrary rotations. + +Specifically, to make the network applicable to a rotated point cloud, we perform a PCA (Principle Components Analysis) [17] based augmentation for training. We first compute three main axes for each shape in the training dataset. In each training iteration the main axes of each shape are randomly swapped and the shapes are aligned according to the swapped axes. The consistency of the structure points for original and augmented shape are enforced with Mean Square Error (MSE) loss. During testing, we also compute the three main axes for each shape, and align it accordingly. Compared to data augmentation with random rotations, the PCA based scheme can reduce the rotation space, and makes the network converge more efficiently. + +We use the datasets used in [13], where ShapeNet [43] and the BHCP benchmark [18] are used for training and testing respectively. Note that we use airplanes to train the network for helicopters in the same way it did in [13] since helicopters are not included in the training data. + +Our network is trained on a collection of aligned shapes represented by 2048 points with 512 structure points as output. During testing, given a point $x_{q}$ on a 3D shape, we first find its closest structure point $s_{q}$ , and then use the corresponding structure point $s_{q}'$ on the target shape as the corresponding point of $x_{q}$ . The correspondence accuracy is measured by the fraction of the correspondences that are correctly predicted with the error below given Euclidean thresholds. + +![](images/d3f29b8f3df9121d7ab0daa209067a15aae7ea7c7fd1d1706ac51bae5c29136c.jpg) +Figure 5: Correspondence accuracy for each category in the BHCP benchmark. + +In Figure 5, the solid lines show the results tested on the aligned data and the dotted lines denote the results tested on the unaligned data. We can clearly see that our method significantly outperforms other state-of-the-art methods. Moreover, we demonstrate the good generalization to unseen categories (e.g. train with airplanes and test with helicopters). However, in this case, the performance of our method on the rotated data is not as good as the aligned one. That is because the PCA of helicopters is quite different from that of airplanes, therefore more difficult for the network to adapt to the unseen category of helicopters. + +# 4.5. Example based Label Transfer + +We further evaluate the quality of the structure points by transferring segmentation labels from few examples, and compare our average IOU with a state-of-the-art shape segmentation method BAE-NET [4] on shapenet part[43] dataset. BAE-NET has different settings(e.g. unsupervised, one-shot and few-shot), we compare our method with it's + +few-shot setting. Specifically, our network is trained on the training set without any label. During testing, to label a point $x_{q}$ on a shape, we find its closest structure point $s_{q}$ as well as a list of corresponding structure points $E = \{s_{q}^{1}, s_{q}^{2}, \dots, s_{q}^{k}\}$ on $k$ example shapes, and the label of structure point $s_{q}' \in E$ which has the most similar features with $s_{q}$ is transferred to $x_{q}$ . + +![](images/670a3cb55b960410adb455cf67ea1d80d23ce72c9ad82022fadcefe9478d9525.jpg) +Figure 6: Label transfer results based on 3 examples. For each category, the average IOUs by 8 randomly selected example sets (green dots) are illustrated. The mean and median are shown in red and blue. + +As discussed in [4], the accuracy of the segmentation results will be affected by the selection of the example shapes in the few-shot setting. Empirically, the exemplars should contain all the segmentation labels and represent the variations of the dataset. In Figure 6, we show all the results of our segmentation label transfer by using 8 randomly selected exemplar sets, each set contains 3 exemplars. For the categories with regular shapes (e.g. Laptop), the results are consistent. While, the accuracy may vary a lot for the categories with large shape variations (e.g. 'Earphone'). In Table 1, the best performing results are reported for both methods, and Figure 7 demonstrates some qualitative results. We can see that, our label transfer results are on par with BAE-Net in most categories with structured shapes. For some categories such as 'Bag', 'Cap', and 'Earphone', due to their large variations, 3 exemplars are not enough for our method. For the 'Car' category, since it contains flat surface that BAE-Net cannot separate, we do not report its result. Moreover, in BAE-NET, the segmentation labels are either pre-defined by the user (few-shot setting) or implicitly defined by the network (unsupervised setting); once the training is done, the labels cannot change. In contrast, our work achieves the few-shot label transfer by transferring segmentation labels directly from exemplars, thus has the potential of transferring arbitrary labels (e.g., labels with + +different hierarchies) after training. (More results are in the supplementary material) + +![](images/6576944834f1b68e80047b8b1003b694ce2548cfc1ddc84e6351b4a5a295d910.jpg) +Figure 7: Qualitative results for label transfer, the example shapes are in the blue box. + +# 4.6. PCA based Shape Embedding + +Given high quality shape correspondences, we can build a shape embedding space based on PCA. Specifically, given a collection of point clouds, we produce $m$ structure points $S = \{s_1^1,s_1^2,s_1^3,\dots,s_m^1,s_m^2,s_m^3\}$ for each point cloud with the proposed network. Where $\{s_i^1,s_i^2,s_i^3\} \in \mathbb{R}^3$ denotes the location of $i$ th structure point. Then a shape morphable model [2] can be constructed based on the learnt structure points. Thus, a new shape $X$ can be represented as a linear combination of the principal components: + +$$ +X = \bar {S} + \sum_ {i = 1} ^ {k} \alpha_ {i} c _ {i} \tag {5} +$$ + +Where $\bar{S}$ is the mean shape of the structure points, $k$ is the number of principal components, $c_{i}$ and $\alpha_{i}$ denote the $i$ th principal component and the corresponding coefficient respectively. Figure 8(a) shows the PCA embedding space by adding the first two PCA principal components to the mean shape with ratio from $-3\sigma$ to $3\sigma$ , where $\sigma^2$ denotes the eigen value of the corresponding principal component. Figure 8(b) shows some reconstruction results with only 50 principal components. We can see that the structures of the shapes can be well preserved with our PCA based embedding. (More results are in supplementary material) + +# 5. Ablations and Visualizations + +# 5.1. Feature Embedding Visualization + +To better understand the mechanism of the proposed method, we extract and visualize the latent features learned by the network. The local contextual features $F$ produced by PointNet++ are first weighted by the probability map $P$ to get per-point features $H = \{h_1, h_2, \dots, h_m\}$ with $h_i \in \mathbb{R}^c$ for each structure point: + +
AirplaneBagCapCarChairEarphoneGuitarKnifeLampLaptopMotorbikeMugPistolRocketSkateboardTable
BAE-Net74.783.985.5-86.076.287.883.670.194.864.694.878.752.174.273.3
Ours74.978.679.360.684.569.087.980.672.494.460.092.779.450.370.473.9
+ +![](images/84d7044a38315e9c63cfcfa817d27f41d2d101357de903e79798c1e244f78fe1.jpg) +Figure 8: PCA based shape embedding. (a) Visualization of the PCA embedding space by adding the PCA principle components to the mean shape with ratio from $-3\sigma$ to $3\sigma$ . The first two components are used in the 1st and 2rd row respectively (b) Input point clouds (first row) and the corresponding reconstructions (second row) with 50 principal components. + +![](images/a57f00a1e2562e0d678837d95ff486bb34cb0be5e3f8533dd624a240b96b0240.jpg) + +![](images/9d900a579feea30ff8b5a9a65c169c46b1efe76dd61a436ab70fc20cd0281edc.jpg) + +$$ +h _ {i} = \sum_ {j = 1} ^ {l} f _ {j} p _ {i} ^ {j} \quad \text {w i t h} \quad \sum_ {j = 1} ^ {l} p _ {i} ^ {j} = 1 \quad \text {f o r e a c h} \quad i \tag {6} +$$ + +The per-point features $H$ for all the shapes in the ShapeNet testing dataset with the same category are then embedded in a 2-dimensional embedding space using t-SNE [25] for visualization. + +![](images/6eb60a8ea0c44f1ba862e7572e03f10fdf06e1450e1623833b75c8e1d45080ab.jpg) +Figure 9: The T-SNE embedding of the learned features. The first row shows examples of structure points overlaid with the input point clouds, and the second row shows the corresponding t-SNE embeddings. + +Figure 9 illustrates the t-SNE results of the embedding space computed on four categories when 16 structure points are predicted. The 2D points in the plot are colored with 16 unique colors each corresponding to a specific structure point. Note that, the learned features are well clustered, which means the structure points with the same semantic location tend to have similar features, though we do not explicitly enforce the consistency of the latent features. One may note that symmetry structure points on the same shape + +do not have similar features, this is because the PointNet++ encoder we used is not symmetric invariant. One may consider adding symmetry constraints into the loss or using a symmetry invariant feature encoder to make the structure points symmetric invariant. + +# 5.2. Robustness to Sampling Densities + +To evaluate the robustness of our approach to input point clouds with different densities, we train our network on 2048 points sampled on each shape, and test the network on input point clouds with different densities. + +We use the point-wise average Euclidean distance to measure the stability of the produced structure points with different input densities in comparison with the structure points produced from 2048 input points. To generate non-uniformly sampled points, we first randomly sample a relatively small number of seed points from the initial point cloud, and remove points near the seeds with certain probability. This creates a set of non-uniformly distributed points with missing points (or "holes") around the seed points. + +Table 1: Comparison of our label transfer results against BAE-NET with 3 labeled exemplars on the ShapeNet part dataset[43] measured with average IOU(%) + +
Sample NumAverage Distance(%)
25651210244096
Chair0.73460.13080.02000.0027
Airplane0.12090.01690.00220.0001
Car0.54700.13480.00990.0017
Motorbike0.30700.06100.01950.0111
+ +Table 2: Stability of the network for producing 1024 structure points with input points of different uniform densities. + +Table 2 shows the stability of the structure points with different numbers of uniformly sampled points as inputs. For non-uniformly sampled inputs, the average stability of + +these categories is $0.3499\%$ . We also demonstrate some qualitative results in Figure 10 and 11. As shown by qualitative and quantitative results, our approach is not sensitive to the point sampling density. That is because the PointNet++ [29] we used to encode local features is not sensitive to the sampling of point clouds and our point integration module also maintains such property. + +![](images/4b73bd59acd03cecac67d63303ea12e9e5f4e93e2b808047970b36b7183d34c5.jpg) +256 points + +![](images/4d05c0eb0d8bdbcc6f9c15b12b5526d0e23a17c4e8cc5bde6b5192f453260b3d.jpg) +1024 points + +![](images/66f67e7e65f7eb8f1661feac6b169a428fbb047c9e4e189be747d95113b0a597.jpg) +2048 points + +![](images/12c23fe359e833682c5585aab5670385ecc1ccbe92e093d65bd854cbeb6a5d14.jpg) +4096 points + +![](images/28b2381232c7302b1bd1dcdf2dd08b404aeba56a2a9d6355ac58a13742768788.jpg) +Figure 10: Robustness to different samplings. The 1st row shows 16 structure points and different numbers of input point clouds. The 2nd row shows 1024 structure points. Corresponding structure points have the same color. + +![](images/89d0b57d99f83d972db0cda66e01f2e07018dc63bd475d50eda674a25007ca57.jpg) +Figure 11: Robustness to non-uniform sampling. The 1st row shows 16 structure points and non-uniform input point clouds. The 2nd row shows 1024 structure points. Corresponding structure points have the same color. + +![](images/d8b32596f9f670d6f4edcbf6964518d1a819cfee31acf89a33f507dad6d1a149.jpg) + +# 5.3. Testing with Real Scanned Data + +We show the good generalization of our method by testing on real scanned data. Specifically, we train our network on the ShapeNet dataset with rotation augmentation, and test the trained network on real scanned point clouds [6]. As illustrated in Figure 12, even though the real scanned point clouds are noisy and not seen during training, our network can still produce semantically consistent structure points. + +# 5.4. Testing with Different Feature Encoder + +The proposed point integration module can also be integrated with other point cloud learning architectures to learn consistent structure points. Specifically, We replace the PointNet++ feature encoder with PointConv [39], a state-of-the-art point cloud learning architecture, and evaluate the performance of semantic shape correspondence. As shown in Figure 13, both architectures can produce similar results on semantic shape correspondence accuracy. + +![](images/e3b8d5f2cd6850639033c18fd17ea1ba48ba43bfa25e22a1fbdd10168354f319.jpg) +ShapeNet Data + +![](images/62e71d595ccf9d07aa692ae0fd7e224b02aa8bf6cd5bf0f657f75b8b3f033f87.jpg) +Real Scanned Data + +![](images/0ec906e10db53b27e4f43d29ea93d55186074dd88eb7a47111b54a28bbb9ac58.jpg) +Figure 12: Structure points on real scanned data. We show the produced 16 (1st row) and 1024 (2nd row) structure points for scanned point clouds of chairs. Corresponding structure points are in the same color. + +![](images/ebdcee66cf6fd2afb9086a0a5c19c8351a8cbf5d481c91b7a7a3533b88f30e2b.jpg) + +![](images/1ba4efc4b96046e23d8c75e2ac6f516b93e28c2058601a817b512584f738ae59.jpg) +Figure 13: Testing with different point cloud encoder. + +![](images/4e97a20a9585f340fc7ef6a086d8eb9fd9d89439109fcec992b5f81c7d873bf7.jpg) + +# 6. Conclusion + +In this paper, we present a simple yet interpretable unsupervised method for learning a new structural representation in the form of 3D structure points. The produced structure points encode shape structures and exhibit semantic consistency across all the shape instances with similar shape structures. We evaluate the proposed method with extensive experiments and show state-of-the-art performance on both semantic correspondence and segmentation label transfer tasks. We also show the good generalization of our network by testing on real scanned data. Moreover, our PCA based structure points embedding also has the potential to be used in some important tasks like shape reconstruction and completion, which we would like to explore more in the future. + +Acknowledgement We thank the reviewers for the suggestions, Changjian Li, Guodong Wei, Yumeng Liu for the valuable discussions. + +# References + +[1] Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas Guibas. Learning representations and generative models for 3d point clouds. arXiv preprint arXiv:1707.02392, 2017. 2, 5 +[2] Volker Blanz, Thomas Vetter, et al. A morphable model for the synthesis of 3d faces. In Siggraph, volume 99, pages 187-194, 1999. 6 +[3] Mingjia Chen, Qianfang Zou, Changbo Wang, and Ligang Liu. Edgenet: Deep metric learning for 3d shapes. CAGD, 72:19-33, 2019. 2, 5 +[4] Zhiqin Chen, Kangxue Yin, Matthew Fisher, Siddhartha Chaudhuri, and Hao Zhang. Bae-net: Branched autoencoder for shape co-segmentation. arXiv preprint arXiv:1903.11228, 2019. 1, 5, 6 +[5] Christopher Choy, Jaesik Park, and Vladlen Koltun. Fully convolutional geometric features. In ICCV, 2019. 2 +[6] Angela Dai, Angel X. Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proc. Computer Vision and Pattern Recognition (CVPR), IEEE, 2017. 8 +[7] Haowen Deng, Tolga Birdal, and Slobodan Ilic. Ppf-foldnet: Unsupervised learning of rotation invariant 3d local descriptors. In ECCV, pages 602-618, 2018. 2 +[8] Theo Deprelle, Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. Learning elementary structures for 3d shape generation and matching. arXiv preprint arXiv:1908.04725, 2019. 1, 2, 5 +[9] Yuval Eldar, Michael Lindenbaum, Moshe Porat, and Yehoshua Y Zeevi. The farthest point strategy for progressive image sampling. TIP, 6(9):1305-1315, 1997. 4 +[10] Haoqiang Fan, Hao Su, and Leonidas J Guibas. A point set generation network for 3d object reconstruction from a single image. In CVPR, pages 605-613, 2017. 2, 4 +[11] Zan Gojcic, Caifa Zhou, Jan D Wegner, and Andreas Wieser. The perfect match: 3d point cloud matching with smoothed densities. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5545-5554, 2019. 2 +[12] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. Atlasnet: A papier-m\`ach\`e approach to learning 3d surface generation. arXiv preprint arXiv:1802.05384, 2018. 2 +[13] Haibin Huang, Evangelos Kalogerakis, Siddhartha Chaudhuri, Duygu Ceylan, Vladimir G Kim, and Ersin Yumer. Learning local shape descriptors from part correspondences with multiview convolutional networks. TOG, 37(1):6, 2018. 1, 2, 4, 5 +[14] Qixing Huang, Fan Wang, and Leonidas Guibas. Functional map networks for analyzing and exploring large shape collections. TOG, 33(4):36, 2014. 1, 2 +[15] Qi-Xing Huang, Hao Su, and Leonidas Guibas. Fine-grained semi-supervised labeling of large shape collections. TOG, 32(6):190, 2013. 2 + +[16] Tomas Jakab, Ankush Gupta, Hakan Bilen, and Andrea Vedaldi. Conditional image generation for learning the structure of visual objects. methods, 43:44, 2018. 2 +[17] Ian Jolliffe. Principal component analysis. Springer, 2011. 5 +[18] Vladimir G Kim, Wilmot Li, Niloy J Mitra, Siddhartha Chaudhuri, Stephen DiVerdi, and Thomas Funkhouser. Learning part-based templates from large collections of 3d shapes. TOG, 32(4):70, 2013. 2, 4, 5 +[19] Vladimir G Kim, Wilmot Li, Niloy J Mitra, Stephen DiVerdi, and Thomas A Funkhouser. Exploring collections of 3d models using fuzzy correspondences. TOG, 31(4):54-1, 2012. 2 +[20] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 4 +[21] Jiaxin Li, Ben M Chen, and Gim Hee Lee. So-net: Self-organizing network for point cloud analysis. In CVPR, pages 9397–9406, 2018. 2 +[22] Lingxiao Li, Minhyuk Sung, Anastasia Dubrovina, Li Yi, and Leonidas J Guibas. Supervised fitting of geometric primitives to 3d point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2652-2660, 2019. 1 +[23] Chen-Hsuan Lin, Chen Kong, and Simon Lucey. Learning efficient point cloud generation for dense 3d object reconstruction. In AAAI, 2018. 2 +[24] Dominik Lorenz, Leonard Bereska, Timo Milbich, and Björn Ommer. Unsupervised part-based disentangling of object shape and appearance. arXiv preprint arXiv:1903.06946, 2019. 2 +[25] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579-2605, 2008. 7 +[26] Sanjeev Muralikrishnan, Vladimir G Kim, Matthew Fisher, and Siddhartha Chaudhuri. Shape unicode: A unified shape representation. In CVPR, pages 3790-3799, 2019. 1, 2, 5 +[27] Maks Ovsjanikov, Mirela Ben-Chen, Justin Solomon, Adrian Butscher, and Leonidas Guibas. Functional maps: a flexible representation of maps between shapes. TOG, 31(4):30, 2012. 2 +[28] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, pages 652-660, 2017. 1, 2, 5 +[29] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Neurips, pages 5099-5108, 2017. 2, 3, 8 +[30] Emanuele Rodolà, Samuel Rota Bulo, Thomas Windheuser, Matthias Vestner, and Daniel Cremers. Dense non-rigid shape correspondence using random forests. In CVPR, pages 4177-4184, 2014. 2 +[31] Dong Wook Shu, Sung Woo Park, and Junseok Kwon. 3d point cloud generative adversarial network based on tree structured graph convolutions. arXiv preprint arXiv:1905.06292, 2019. 1, 2 + +[32] Martin Simonovsky and Nikos Komodakis. Dynamic edge-conditioned filters in convolutional neural networks on graphs. In CVPR, pages 3693-3702, 2017. 2 +[33] Chunyu Sun, Qianfang Zou, Xin Tong, and Yang Liu. Learning adaptive hierarchical cuboid abstractions of 3d shape collections. ACM Transactions on Graphics (SIGGRAPH Asia), 38(6), 2019. 1 +[34] Minhyuk Sung, Hao Su, Ronald Yu, and Leonidas J Guibas. Deep functional dictionaries: Learning consistent semantic structures on 3d models from functions. In Advances in Neural Information Processing Systems, pages 485-495, 2018. 2 +[35] Supasorn Suwajanakorn, Noah Snavely, Jonathan J Tompson, and Mohammad Norouzi. Discovery of latent 3d keypoints via end-to-end geometric reasoning. In Neurips, pages 2059-2070, 2018. 1, 2 +[36] Lyne P Tchapmi, Vineet Kosaraju, Hamid Rezatofighi, Ian Reid, and Silvio Savarese. Topnet: Structural point cloud decoder. In CVPR, pages 383-392, 2019. 1, 2, 5 +[37] Shubham Tulsiani, Hao Su, Leonidas J Guibas, Alexei A Efros, and Jitendra Malik. Learning shape abstractions by assembling volumetric primitives. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2635-2643, 2017. 1 +[38] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E Sarma, Michael M Bronstein, and Justin M Solomon. Dynamic graph cnn for learning on point clouds. arXiv preprint arXiv:1801.07829, 2018. 2 +[39] Wenxuan Wu, Zhongang Qi, and Li Fuxin. Pointconv: Deep convolutional networks on 3d point clouds. In CVPR, pages 9621-9630, 2019. 2, 8 +[40] Kai Xu, Vladimir G Kim, Qixing Huang, Niloy Mitra, and Evangelos Kalogerakis. Data-driven shape analysis and processing. In SIGGRAPH ASIA, page 4. ACM, 2016. 2 +[41] Guandao Yang, Xun Huang, Zekun Hao, Ming-Yu Liu, Serge Belongie, and Bharath Hariharan. Pointflow: 3d point cloud generation with continuous normalizing flows. In Proceedings of the IEEE International Conference on Computer Vision, pages 4541-4550, 2019. 1, 2 +[42] Yaoqing Yang, Chen Feng, Yiru Shen, and Dong Tian. Foldingnet: Point cloud auto-encoder via deep grid deformation. In CVPR, pages 206–215, 2018. 2, 5 +[43] Li Yi, Vladimir G Kim, Duygu Ceylan, I Shen, Mengyan Yan, Hao Su, Cewu Lu, Qixing Huang, Alla Sheffer, Leonidas Guibas, et al. A scalable active framework for region annotation in 3d shape collections. TOG, 35(6):210, 2016. 4, 5, 7 +[44] Lequan Yu, Xianzhi Li, Chi-Wing Fu, Daniel Cohen-Or, and Pheng-Ann Heng. Pu-net: Point cloud upsampling network. In CVPR, pages 2790–2799, 2018. 2 +[45] Andy Zeng, Shuran Song, Matthias Nießner, Matthew Fisher, Jianxiong Xiao, and Thomas Funkhouser. 3dmatch: Learning local geometric descriptors from rgb-d reconstructions. In CVPR, pages 1802-1811, 2017. 2 +[46] Yuting Zhang, Yijie Guo, Yixin Jin, Yijun Luo, Zhiyuan He, and Honglak Lee. Unsupervised discovery of object landmarks as structural representations. In CVPR, pages 2694-2703, 2018. 2 + +[47] Yongheng Zhao, Tolga Birdal, Haowen Deng, and Federico Tombari. 3d point capsule networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1009-1018, 2019. 1, 2, 5 +[48] Chenyang Zhu, Kai Xu, Siddhartha Chaudhuri, Li Yi, Leonidas Guibas, and Hao Zhang. Cosegnet: Deep cosegmentation of 3d shapes with group consistency loss. arXiv preprint arXiv:1903.10297, 2019. 1 \ No newline at end of file diff --git a/unsupervisedlearningofintrinsicstructuralrepresentationpoints/images.zip b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a6c5a915e9e5d42600202a91aa05ef16b3d9e58c --- /dev/null +++ b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e1d19aa80be3773fb3917d9fda18ad788e9b9a8b566a64c29b713f50be218be +size 628151 diff --git a/unsupervisedlearningofintrinsicstructuralrepresentationpoints/layout.json b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..83f3e0da7ff6090b18d57d84e78cc2009b7453d2 --- /dev/null +++ b/unsupervisedlearningofintrinsicstructuralrepresentationpoints/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f1009cc263e9ce5c2532f1b0208376faf3b2ad91244a969fd7d77cd1ae182eb +size 422420 diff --git a/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/f43b8e76-c287-49f6-8956-0eae11d279ae_content_list.json b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/f43b8e76-c287-49f6-8956-0eae11d279ae_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..85d1e1c783c37c98558946aac4509db97cf9722b --- /dev/null +++ b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/f43b8e76-c287-49f6-8956-0eae11d279ae_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d72e14c003f49b637c4210499b10d6558045d1270f04d24aaba61e601b3f105 +size 104351 diff --git a/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/f43b8e76-c287-49f6-8956-0eae11d279ae_model.json b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/f43b8e76-c287-49f6-8956-0eae11d279ae_model.json new file mode 100644 index 0000000000000000000000000000000000000000..360eccf049ee7eb2f684e4e9282d807afc9500a7 --- /dev/null +++ b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/f43b8e76-c287-49f6-8956-0eae11d279ae_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01ef59e891612815f65560ef840b7ece930ba5913c3b7a5a5538bf86da2b7b57 +size 125740 diff --git a/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/f43b8e76-c287-49f6-8956-0eae11d279ae_origin.pdf b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/f43b8e76-c287-49f6-8956-0eae11d279ae_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5c4f4942736a02690aa2bb5d9e2e0dbf71d528c9 --- /dev/null +++ b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/f43b8e76-c287-49f6-8956-0eae11d279ae_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:592dbcb0b828664d0b0c485962a1dc0d2819c9f4912a02462048529dcffcab94 +size 1139751 diff --git a/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/full.md b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0497600e0db0da68fd955d058e852f26c4668cb0 --- /dev/null +++ b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/full.md @@ -0,0 +1,486 @@ +# Unsupervised Learning of Probably Symmetric Deformable 3D Objects from Images in the Wild + +Shangzhe Wu + +Christian Rupprecht + +Andrea Vedaldi + +Visual Geometry Group, University of Oxford + +{szwu, chrisr, vedaldi}@robots.ox.ac.uk + +![](images/c013281291a4e2281ad1e30290996edfa96aa8f441666d8c52a8365996cdd335.jpg) +Training Phase +Figure 1: Unsupervised learning of 3D deformable objects from in-the-wild images. Left: Training uses only single views of the object category with no additional supervision at all (i.e. no ground-truth 3D information, multiple views, or any prior model of the object). Right: Once trained, our model reconstructs the 3D pose, shape, albedo and illumination of a deformable object instance from a single image with excellent fidelity. Code and demo at https://github.com/elliottwu/unsup3d. + +![](images/d8d92bb91a7c11e8ebc0c1602e6345ac5a50738629ae9fbdc50432ed39613f3d.jpg) +Testing Phase + +# Abstract + +We propose a method to learn 3D deformable object categories from raw single-view images, without external supervision. The method is based on an autoencoder that factors each input image into depth, albedo, viewpoint and illumination. In order to disentangle these components without supervision, we use the fact that many object categories have, at least in principle, a symmetric structure. We show that reasoning about illumination allows us to exploit the underlying object symmetry even if the appearance is not symmetric due to shading. Furthermore, we model objects that are probably, but not certainly, symmetric by predicting a symmetry probability map, learned end-to-end with the other components of the model. Our experiments show that this method can recover very accurately the 3D shape of human faces, cat faces and cars from single-view images, without any supervision or a prior shape model. On benchmarks, we demonstrate superior accuracy compared to another method that uses supervision at the level of 2D image correspondences. + +# 1. Introduction + +Understanding the 3D structure of images is key in many computer vision applications. Furthermore, while many deep + +networks appear to understand images as 2D textures [15], 3D modelling can explain away much of the variability of natural images and potentially improve image understanding in general. Motivated by these facts, we consider the problem of learning 3D models for deformable object categories. + +We study this problem under two challenging conditions. The first condition is that no 2D or 3D ground truth information (such as keypoints, segmentation, depth maps, or prior knowledge of a 3D model) is available. Learning without external supervisions removes the bottleneck of collecting image annotations, which is often a major obstacle to deploying deep learning for new applications. The second condition is that the algorithm must use an unconstrained collection of single-view images — in particular, it should not require multiple views of the same instance. Learning from single-view images is useful because in many applications, and especially for deformable objects, we solely have a source of still images to work with. Consequently, our learning algorithm ingests a number of single-view images of a deformable object category and produces as output a deep network that can estimate the 3D shape of any instance given a single image of it (Fig. 1). + +We formulate this as an autoencoder that internally decomposes the image into albedo, depth, illumination and viewpoint, without direct supervision for any of these factors. + +However, without further assumptions, decomposing images into these four factors is ill-posed. In search of minimal assumptions to achieve this, we note that many object categories are symmetric (e.g. almost all animals and many handcrafted objects). Assuming an object is perfectly symmetric, one can obtain a virtual second view of it by simply mirroring the image. In fact, if correspondences between the pair of mirrored images were available, 3D reconstruction could be achieved by stereo reconstruction [38, 11, 56, 50, 13]. Motivated by this, we seek to leverage symmetry as a geometric cue to constrain the decomposition. + +However, specific object instances are in practice never fully symmetric, neither in shape nor appearance. Shape is non-symmetric due to variations in pose or other details (e.g. hair style or expressions on a human face), and albedo can also be non-symmetric (e.g. asymmetric texture of cat faces). Even when both shape and albedo are symmetric, the appearance may still not be, due to asymmetric illumination. + +We address this issue in two ways. First, we explicitly model illumination to exploit the underlying symmetry and show that, by doing so, the model can exploit illumination as an additional cue for recovering the shape. Second, we augment the model to reason about potential lack of symmetry in the objects. To do this, the model predicts, along with the other factors, a dense map containing the probability that a given pixel has a symmetric counterpart in the image. + +We combine these elements in an end-to-end learning formulation, where all components, including the confidence maps, are learned from raw RGB data only. We also show that symmetry can be enforced by flipping internal representations, which is particularly useful for reasoning about symmetries probabilistically. + +We demonstrate our method on several datasets, including human faces, cat faces and cars. We provide a thorough ablation study using a synthetic face dataset to obtain the necessary 3D ground truth. On real images, we achieve higher fidelity reconstruction results compared to other methods [45, 52] that do not rely on 2D or 3D ground truth information, nor prior knowledge of a 3D model of the instance or class. In addition, we also outperform a recent state-of-the-art method [37] that uses keypoint supervision for 3D reconstruction on real faces, while our method uses no external supervision at all. Finally, we demonstrate that our trained face model generalizes to non-natural images such as face paintings and cartoon drawings without fine-tuning. + +# 2. Related Work + +In order to assess our contribution in relation to the vast literature on image-based 3D reconstruction, it is important to consider three aspects of each approach: which information is used, which assumptions are made, and what the output is. Below and in Table 1 we compare our contribution to prior works based on these factors. + +
PaperSupervisionGoalsData
[43]3D scans3DMMFace
[62]3DV, IPrior on 3DV, predict from IShapeNet, Ikea
[1]3DPPrior on 3DPShapeNet
[44]3DMPrior on 3DMFace
[16]3DMM, 2DKP, IRefine 3DMM fit to IFace
[14]3DMM, 2DKP, IFit 3DMM to I+2DKPFace
[17]3DMMFit 3DMM to 3D scansFace
[26]3DMM, 2DKPPred. 3DMM from IHumans
[47]3DMM, 2DS+KPPred. N, A, L from IFace
[60]3DMM, IPred. 3DM, VP, T, E from IFace
[46]3DMM, 2DKP, IFit 3DMM to IFace
[12]2DSPrior on 3DV, pred. from IModel/ScanNet
[28]I, 2DS, VPPrior on 3DVScanNet, PAS3D
[27]I, 2DS+KPPred. 3DM, T, VP from IBirds
[7]I, 2DSPred. 3DM, T, L, VP from IShapeNet, Birds
[22]I, 2DSPred. 3DV, VP from IShapeNet, others
[52]IPrior on 3DM, T, IFace
[45]IPred. 3DM, VP, T† from IFace
[21]IPred. V, L, VP from IShapeNet
OursIPred. D, L, A, VP from IFace, others
+ +Table 1: Comparison with selected prior work: supervision, goals, and data. I: image, 3DMM: 3D morphable model, 2DKP: 2D keypoints, 2DS: 2D silhouette, 3DP: 3D points, VP: viewpoint, E: expression, 3DM: 3D mesh, 3DV: 3D volume, D: depth, N: normals, A: albedo, T: texture, L: light. $\dagger$ can also recover A and L in post-processing. + +Our method uses single-view images of an object category as training data, assumes that the objects belong to a specific class (e.g. human faces) which is weakly symmetric, and outputs a monocular predictor capable of decomposing any image of the category into shape, albedo, illumination, viewpoint and symmetry probability. + +Structure from Motion. Traditional methods such as Structure from Motion (SfM) [10] can reconstruct the 3D structure of individual rigid scenes given as input multiple views of each scene and 2D keypoint matches between the views. This can be extended in two ways. First, monocular reconstruction methods can perform dense 3D reconstruction from a single image without 2D keypoints [68, 58, 19]. However, they require multiple views [19] or videos of rigid scenes for training [68]. Second, Non-Rigid SfM (NRSfM) approaches [4, 41] can learn to reconstruct deformable objects by allowing 3D points to deform in a limited manner between views, but require supervision in terms of annotated 2D keypoints for both training and testing. Hence, neither family of SfM approaches can learn to reconstruct deformable objects from raw pixels of a single view. + +Shape from X. Many other monocular cues have been used as alternatives or supplements to SfM for recovering shape from images, such as shading [24, 65], silhouettes [31], texture [61], symmetry [38, 11] etc. In particular, our work is + +inspired from shape from symmetry and shape from shading. Shape from symmetry [38, 11, 56, 50] reconstructs symmetric objects from a single image by using the mirrored image as a virtual second view, provided that symmetric correspondences are available. [50] also shows that it is possible to detect symmetries and correspondences using descriptors. Shape from shading [24, 65] assumes a shading model such as Lambertian reflectance, and reconstructs the surface by exploiting the non-uniform illumination. + +Category-specific reconstruction. Learning-based methods have recently been leveraged to reconstruct objects from a single view, either in the form of a raw image or 2D keypoints (see also Table 1). While this task is ill-posed, it has been shown to be solvable by learning a suitable object prior from the training data [43, 62, 1, 44]. A variety of supervisory signals have been proposed to learn such priors. Besides using 3D ground truth directly, authors have considered using videos [2, 68, 40, 59] and stereo pairs [19, 36]. Other approaches have used single views with 2D keypoint annotations [27, 37, 51, 6] or object masks [27, 7]. For objects such as human bodies and human faces, some methods [26, 17, 60, 14] have learn to reconstruct from raw images, but starting from the knowledge of a predefined shape model such as SMPL [34] or Basel [43]. These prior models are constructed using specialized hardware and/or other forms of supervision, which are often difficult to obtain for deformable objects in the wild, such as animals, and also limited in details of the shape. + +Only recently have authors attempted to learn the geometry of object categories from raw, monocular views only. Thewlis et al. [54, 55] uses equivariance to learn dense landmarks, which recovers the 2D geometry of the objects. DAE [48] learns to predict a deformation field through heavily constraining an autoencoder with a small bottleneck embedding and lift that to 3D in [45] — in post processing, they further decompose the reconstruction in albedo and shading, obtaining an output similar to ours. + +Adversarial learning has been proposed as a way of hallucinating new views of an object. Some of these methods start from 3D representations [62, 1, 69, 44]. Kato et al. [28] trains a discriminator on raw images but uses viewpoint as addition supervision. HoloGAN [39] only uses raw images but does not obtain an explicit 3D reconstruction. Szabo et al. [52] uses adversarial training to reconstruct 3D meshes of the object, but does not assess their results quantitatively. Henzler et al. [22] also learns from raw images, but only experiments with images that contain the object on a white background, which is akin to supervision with 2D silhouettes. In Section 4.3, we compare to [45, 52] and demonstrate superior reconstruction results with much higher fidelity. + +Since our model generates images from an internal 3D representation, one essential component is a differentiable renderer. However, with a traditional rendering pipeline, + +![](images/3a7fbf473a1494214bec749156e4c0dcea23fcff6cb2adc862db6eac9851a5c5.jpg) +Figure 2: Photo-geometric autoencoding. Our network $\Phi$ decomposes an input image $\mathbf{I}$ into depth, albedo, viewpoint and lighting, together with a pair of confidence maps. It is trained to reconstruct the input without external supervision. + +gradients across occlusions and boundaries are not defined. Several soft relaxations have thus been proposed [35, 29, 32]. Here, we use an implementation1 of [29]. + +# 3. Method + +Given an unconstrained collection of images of an object category, such as human faces, our goal is to learn a model $\Phi$ that receives as input an image of an object instance and produces as output a decomposition of it into 3D shape, albedo, illumination and viewpoint, as illustrated in Fig. 2. + +As we have only raw images to learn from, the learning objective is reconstructive: namely, the model is trained so that the combination of the four factors gives back the input image. This results in an autoencoding pipeline where the factors have, due to the way they are recomposed, an explicit photo-geometric meaning. + +In order to learn such a decomposition without supervision for any of the components, we use the fact that many object categories are bilaterally symmetric. However, the appearance of object instances is never perfectly symmetric. Asymmetries arise from shape deformation, asymmetric albedo and asymmetric illumination. We take two measures to account for these asymmetries. First, we explicitly model asymmetric illumination. Second, our model also estimates, for each pixel in the input image, a confidence score that explains the probability of the pixel having a symmetric counterpart in the image (see conf $\sigma, \sigma'$ in Fig. 2). + +The following sections describe how this is done, looking first at the photo-geometric autoencoder (Section 3.1), then at how symmetries are modelled (Section 3.2), followed by details of the image formation (Section 3.3) and the supplementary perceptual loss (Section 3.4). + +# 3.1. Photo-geometric autoencoding + +An image $\mathbf{I}$ is a function $\Omega \to \mathbb{R}^3$ defined on a grid $\Omega = \{0, \dots, W - 1\} \times \{0, \dots, H - 1\}$ , or, equivalently, a tensor in $\mathbb{R}^{3 \times W \times H}$ . We assume that the image is roughly centered on an instance of the object of interest. The goal is to learn a function $\Phi$ , implemented as a neural network, that maps the image $\mathbf{I}$ to four factors $(d, a, w, l)$ comprising a depth map $d: \Omega \to \mathbb{R}_+$ , an albedo image $a: \Omega \to \mathbb{R}^3$ , a global light direction $l \in \mathbb{S}^2$ , and a viewpoint $w \in \mathbb{R}^6$ so that the image can be reconstructed from them. + +The image $\mathbf{I}$ is reconstructed from the four factors in two steps, lighting $\Lambda$ and reprojection $\Pi$ , as follows: + +$$ +\hat {\mathbf {I}} = \Pi (\Lambda (a, d, l), d, w). \tag {1} +$$ + +The lighting function $\Lambda$ generates a version of the object based on the depth map $d$ , the light direction $l$ and the albedo $a$ as seen from a canonical viewpoint $w = 0$ . The viewpoint $w$ represents the transformation between the canonical view and the viewpoint of the actual input image $\mathbf{I}$ . Then, the reprojection function $\Pi$ simulates the effect of a viewpoint change and generates the image $\hat{\mathbf{I}}$ given the canonical depth $d$ and the shaded canonical image $\Lambda(a,d,l)$ . Learning uses a reconstruction loss which encourages $\mathbf{I} \approx \hat{\mathbf{I}}$ (Section 3.2). + +Discussion. The effect of lighting could be incorporated in the albedo $a$ by interpreting the latter as a texture rather than as the object's albedo. However, there are two good reasons to avoid this. First, the albedo $a$ is often symmetric even if the illumination causes the corresponding appearance to look asymmetric. Separating them allows us to more effectively incorporate the symmetry constraint described below. Second, shading provides an additional cue on the underlying 3D shape [23, 3]. In particular, unlike the recent work of [48] where a shading map is predicted independently from shape, our model computes the shading based on the predicted depth, mutually constraining each other. + +# 3.2. Probably symmetric objects + +Leveraging symmetry for 3D reconstruction requires identifying symmetric object points in an image. Here we do so implicitly, assuming that depth and albedo, which are reconstructed in a canonical frame, are symmetric about a fixed vertical plane. An important beneficial side effect of this choice is that it helps the model discover a 'canonical view' for the object, which is important for reconstruction [41]. + +To do this, we consider the operator that flips a map $a \in \mathbb{R}^{C \times W \times H}$ along the horizontal axis: $[\mathrm{flip}a]_{c,u,v} = a_{c,W-1-u,v}$ . We then require $d \approx \mathrm{flip}d'$ and $a \approx \mathrm{flip}a'$ . While these constraints could be enforced by adding corresponding loss terms to the learning objective, they would be difficult to balance. Instead, we achieve the same effect + +indirectly, by obtaining a second reconstruction $\hat{\mathbf{I}}^{\prime}$ from the flipped depth and albedo: + +$$ +\hat {\mathbf {I}} ^ {\prime} = \Pi (\Lambda (a ^ {\prime}, d ^ {\prime}, l), d ^ {\prime}, w), a ^ {\prime} = \operatorname {f l i p} a, d ^ {\prime} = \operatorname {f l i p} d. \tag {2} +$$ + +Then, we consider two reconstruction losses encouraging $\mathbf{I} \approx \hat{\mathbf{I}}$ and $\mathbf{I} \approx \hat{\mathbf{I}}'$ . Since the two losses are commensurate, they are easy to balance and train jointly. Most importantly, this approach allows us to easily reason about symmetry probabilistically, as explained next. + +The source image $\mathbf{I}$ and the reconstruction $\hat{\mathbf{I}}$ are compared via the loss: + +$$ +\mathcal {L} (\hat {\mathbf {I}}, \mathbf {I}, \sigma) = - \frac {1}{| \Omega |} \sum_ {u v \in \Omega} \ln \frac {1}{\sqrt {2} \sigma_ {u v}} \exp {- \frac {\sqrt {2} \ell_ {1 , u v}}{\sigma_ {u v}}}, (3) +$$ + +where $\ell_{1,uv} = |\hat{\mathbf{I}}_{uv} - \mathbf{I}_{uv}|$ is the $L_{1}$ distance between the intensity of pixels at location $uv$ , and $\sigma \in \mathbb{R}_+^{W\times H}$ is a confidence map, also estimated by the network $\Phi$ from the image $\mathbf{I}$ , which expresses the aleatoric uncertainty of the model. The loss can be interpreted as the negative log-likelihood of a factorized Laplacian distribution on the reconstruction residuals. Optimizing likelihood causes the model to self-calibrate, learning a meaningful confidence map [30]. + +Modelling uncertainty is generally useful, but in our case is particularly important when we consider the "symmetric" reconstruction $\hat{\mathbf{I}}'$ , for which we use the same loss $\mathcal{L}(\hat{\mathbf{I}}', \mathbf{I}, \sigma')$ . Crucially, we use the network to estimate, also from the same input image $\mathbf{I}$ , a second confidence map $\sigma'$ . This confidence map allows the model to learn which portions of the input image might not be symmetric. For instance, in some cases hair on a human face is not symmetric as shown in Fig. 2, and $\sigma'$ can assign a higher reconstruction uncertainty to the hair region where the symmetry assumption is not satisfied. Note that this depends on the specific instance under consideration, and is learned by the model itself. + +Overall, the learning objective is given by the combination of the two reconstruction errors: + +$$ +\mathcal {E} (\Phi ; \mathbf {I}) = \mathcal {L} (\hat {\mathbf {I}}, \mathbf {I}, \sigma) + \lambda_ {\mathrm {f}} \mathcal {L} (\hat {\mathbf {I}} ^ {\prime}, \mathbf {I}, \sigma^ {\prime}), \tag {4} +$$ + +where $\lambda_{\mathrm{f}} = 0.5$ is a weighing factor, $(d,a,w,l,\sigma ,\sigma^{\prime}) = \Phi (\mathbf{I})$ is the output of the neural network, and $\hat{\mathbf{I}}$ and $\hat{\mathbf{I}}^{\prime}$ are obtained according to Eqs. (1) and (2). + +# 3.3. Image formation model + +We now describe the functions $\Pi$ and $\Lambda$ in Eq. (1) in more detail. The image is formed by a camera looking at a 3D object. If we denote with $P = (P_x, P_y, P_z) \in \mathbb{R}^3$ a 3D point expressed in the reference frame of the camera, this is mapped to pixel $p = (u, v, 1)$ by the following projection: + +$$ +p \propto K P, \quad K = \left[ \begin{array}{l l l} f & 0 & c _ {u} \\ 0 & f & c _ {v} \\ 0 & 0 & 1 \end{array} \right], \quad \left\{ \begin{array}{l} c _ {u} = \frac {W - 1}{2}, \\ c _ {v} = \frac {H - 1}{2}, \\ f = \frac {W - 1}{2 \tan \frac {\theta_ {\mathrm {F O V}}}{2}}. \end{array} \right. \tag {5} +$$ + +This model assumes a perspective camera with field of view (FOV) $\theta_{\mathrm{FOV}}$ . We assume a nominal distance of the object from the camera at about $1\mathrm{m}$ . Given that the images are cropped around a particular object, we assume a relatively narrow FOV of $\theta_{\mathrm{FOV}} \approx 10^{\circ}$ . + +The depth map $d: \Omega \to \mathbb{R}_+$ associates a depth value $d_{uv}$ to each pixel $(u, v) \in \Omega$ in the canonical view. By inverting the camera model (5), we find that this corresponds to the 3D point $P = d_{uv} \cdot K^{-1}p$ . + +The viewpoint $w \in \mathbb{R}^6$ represents an Euclidean transformation $(R, T) \in SE(3)$ , where $w_{1:3}$ and $w_{4:6}$ are rotation angles and translations along $x, y$ and $z$ axes respectively. + +The map $(R, T)$ transforms 3D points from the canonical view to the actual view. Thus a pixel $(u, v)$ in the canonical view is mapped to the pixel $(u', v')$ in the actual view by the warping function $\eta_{d,w} : (u, v) \mapsto (u', v')$ given by: + +$$ +p ^ {\prime} \propto K \left(d _ {u v} \cdot R K ^ {- 1} p + T\right), \tag {6} +$$ + +where $p^\prime = (u^\prime ,v^\prime ,1)$ + +Finally, the reprojection function $\Pi$ takes as input the depth $d$ and the viewpoint change $w$ and applies the resulting warp to the canonical image $\mathbf{J}$ to obtain the actual image $\hat{\mathbf{I}} = \Pi (\mathbf{J},d,w)$ as $\hat{\mathbf{I}}_{u^{\prime}v^{\prime}} = \mathbf{J}_{uv}$ , where $(u,v) = \eta_{d,w}^{-1}(u^{\prime},v^{\prime})$ .3 + +The canonical image $\mathbf{J} = \Lambda(a, d, l)$ is in turn generated as a combination of albedo, normal map and light direction. To do so, given the depth map $d$ , we derive the normal map $n: \Omega \to \mathbb{S}^2$ by associating to each pixel $(u, v)$ a vector normal to the underlying 3D surface. In order to find this vector, we compute the vectors $t_{uv}^u$ and $t_{uv}^v$ tangent to the surface along the $u$ and $v$ directions. For example, the first one is: $t_{uv}^u = d_{u+1,v} \cdot K^{-1}(p + e_x) - d_{u-1,v} \cdot K^{-1}(p - e_x)$ where $p$ is defined above and $e_x = (1,0,0)$ . Then the normal is obtained by taking the vector product $n_{uv} \propto t_{uv}^u \times t_{uv}^v$ . + +The normal $n_{uv}$ is multiplied by the light direction $l$ to obtain a value for the directional illumination and the latter is added to the ambient light. Finally, the result is multiplied by the albedo to obtain the illuminated texture, as follows: $\mathbf{J}_{uv} = (k_s + k_d\max \{0,\langle l,n_{uv}\rangle \})\cdot a_{uv}$ . Here $k_{s}$ and $k_{d}$ are the scalar coefficients weighting the ambient and diffuse terms, and are predicted by the model with range between 0 and 1 via rescaling a tanh output. The light direction $l = (l_x,l_y,1)^T /(l_x^2 +l_y^2 +1)^{0.5}$ is modeled as a spherical sector by predicting $l_{x}$ and $l_{y}$ with tanh. + +# 3.4. Perceptual loss + +The $L_{1}$ loss function Eq. (3) is sensitive to small geometric imperfections and tends to result in blurry reconstructions. We add a perceptual loss term to mitigate this problem. The $k$ -th layer of an off-the-shelf image encoder $e$ (VGG16 in our case [49]) predicts a representation $e^{(k)}(\mathbf{I}) \in \mathbb{R}^{C_k \times W_k \times H_k}$ + +where $\Omega_{k} = \{0,\dots ,W_{k} - 1\} \times \{0,\dots ,H_{k} - 1\}$ is the corresponding spatial domain. Note that this feature encoder does not have to be trained with supervised tasks. Self-supervised encoders can be equally effective as shown in Table 3. + +Similar to Eq. (3), assuming a Gaussian distribution, the perceptual loss is given by: + +$$ +\mathcal {L} _ {\mathrm {p}} ^ {(k)} (\hat {\mathbf {I}}, \mathbf {I}, \sigma^ {(k)}) = - \frac {1}{| \Omega_ {k} |} \sum_ {u v \in \Omega_ {k}} \ln \frac {1}{\sqrt {2 \pi \left(\sigma_ {u v} ^ {(k)}\right) ^ {2}}} \exp - \frac {\left(\ell_ {u v} ^ {(k)}\right) ^ {2}}{2 \left(\sigma_ {u v} ^ {(k)}\right) ^ {2}}, \tag {7} +$$ + +where $\ell_{uv}^{(k)} = |e_{uv}^{(k)}(\hat{\mathbf{I}}) - e_{uv}^{(k)}(\mathbf{I})|$ for each pixel index $uv$ in the $k$ -th layer. We also compute the loss for $\hat{\mathbf{I}}'$ using $\sigma^{(k)'}$ . $\sigma^{(k)}$ and $\sigma^{(k)'}$ are additional confidence maps predicted by our model. In practice, we found it is good enough for our purpose to use the features from only one layer relu3_3 of VGG16. We therefore shorten the notation of perceptual loss to $\mathcal{L}_{\mathrm{p}}$ . With this, the loss function $\mathcal{L}$ in Eq. (4) is replaced by $\mathcal{L} + \lambda_{\mathrm{p}}\mathcal{L}_{\mathrm{p}}$ with $\lambda_{\mathrm{p}} = 1$ . + +# 4. Experiments + +# 4.1. Setup + +Datasets. We test our method on three human face datasets: CelebA [33], 3DFAW [20, 25, 67, 64] and BFM [43]. CelebA is a large scale human face dataset, consisting of over 200k images of real human faces in the wild annotated with bounding boxes. 3DFAW contains 23k images with 66 3D keypoint annotations, which we use to evaluate our 3D predictions in Section 4.3. We roughly crop the images around the head region and use the official train/val/test splits. BFM (Basel Face Model) is a synthetic face model, which we use to assess the quality of the 3D reconstructions (since the in-the-wild datasets lack ground-truth). We follow the protocol of [47] to generate a dataset, sampling shapes, poses, textures, and illumination randomly. We use images from SUN Database [63] as background and save ground truth depth maps for evaluation. + +We also test our method on cat faces and synthetic cars. We use two cat datasets [66, 42]. The first one has 10k cat images with nine keypoint annotations, and the second one is a collection of dog and cat images, containing 1.2k cat images with bounding box annotations. We combine the two datasets and crop the images around the cat heads. For cars, we render 35k images of synthetic cars from ShapeNet [5] with random viewpoints and illumination. We randomly split the images by 8:1:1 into train, validation and test sets. + +Metrics. Since the scale of 3D reconstruction from projective cameras is inherently ambiguous [10], we discount it in the evaluation. Specifically, given the depth map $d$ predicted by our model in the canonical view, we warp it to a depth map $\bar{d}$ in the actual view using the predicted viewpoint and compare the latter to the ground-truth depth map $d^{*}$ using the scale-invariant depth error (SIDE) [9] + +
NoBaselineSIDE (×10-2) ↓MAD (deg.) ↓
(1)Supervised0.410 ±0.10310.78 ±1.01
(2)Const. null depth2.723 ±0.37143.34 ±2.25
(3)Average g.t. depth1.990 ±0.55623.26 ±2.85
(4)Ours (unsupervised)0.793 ±0.14016.51 ±1.56
+ +$E_{\mathrm{SIDE}}(\bar{d},d^{*}) = \left(\frac{1}{WH}\sum_{uv}\Delta_{uv}^{2} - \left(\frac{1}{WH}\sum_{uv}\Delta_{uv}\right)^{2}\right)^{\frac{1}{2}}$ where $\Delta_{uv} = \log d_{uv} - \log d_{uv}^{*}$ . We compare only valid depth pixel and erode the foreground mask by one pixel to discount rendering artefacts at object boundaries. Additionally, we report the mean angle deviation (MAD) between normals computed from ground truth depth and from the predicted depth, measuring how well the surface is captured. + +Implementation details. The function $(d, a, w, l, \sigma) = \Phi(\mathbf{I})$ that predits depth, albedo, viewpoint, lighting, and confidence maps from the image $\mathbf{I}$ is implemented using individual neural networks. The depth and albedo are generated by encoder-decoder networks, while viewpoint and lighting are regressed using simple encoder networks. The encoder-decoders do not use skip connections because input and output images are not spatially aligned (since the output is in the canonical viewpoint). All four confidence maps are predicted using the same network, at different decoding layers for the photometric and perceptual losses since these are computed at different resolutions. The final activation function is tanh for depth, albedo, viewpoint and lighting and softplus for the confidence maps. The depth prediction is centered on the mean before tanh, as the global distance is estimated as part of the viewpoint. We do not use any special initialization for all predictions, except that two border pixels of the depth maps on both the left and the right are clamped at a maximal depth to avoid boundary issues. + +We train using Adam over batches of 64 input images, resized to $64 \times 64$ pixels. The size of the output depth and albedo is also $64 \times 64$ . We train for approximately 50k iterations. For visualization, depth maps are upsampled to 256. We include more details in the supplementary material. + +# 4.2. Results + +Comparison with baselines. Table 2 uses the BFM dataset to compare the depth reconstruction quality obtained by our method, a fully-supervised baseline and two baselines. The supervised baseline is a version of our model trained to regress the ground-truth depth maps using an $L_{1}$ loss. The trivial baseline predicts a constant uniform depth map, which provides a performance lower-bound. The third baseline is a constant depth map obtained by averaging all ground-truth depth maps in the test set. Our method largely outperforms + +Table 2: Comparison with baselines. SIDE and MAD errors of our reconstructions on the BFM dataset compared against a fully-supervised and trivial baselines. + +
NoMethodSIDE (×10-2) ↓MAD (deg.) ↓
(1)Ours full0.793 ±0.14016.51 ±1.56
(2)w/o albedo flip2.916 ±0.30039.04 ±1.80
(3)w/o depth flip1.139 ±0.24427.06 ±2.33
(4)w/o light2.406 ±0.67641.64 ±8.48
(5)w/o perc. loss0.931 ±0.26917.90 ±2.31
(6)w/ self-sup. perc. loss0.815 ±0.14515.88 ±1.57
(7)w/o confidence0.829 ±0.21316.39 ±2.12
+ +Table 3: Ablation study. Refer to Section 4.2 for details. + +
SIDE (×10-2) ↓MAD (deg.) ↓
No perturb, no conf.0.829 ±0.21316.39 ±2.12
No perturb, conf.0.793 ±0.14016.51 ±1.56
Perturb, no conf.2.141 ±0.84226.61 ±5.39
Perturb, conf.0.878 ±0.16917.14 ±1.90
+ +Table 4: Asymmetric perturbation. We add asymmetric perturbations to BFM and show that confidence maps allow the model to reject such noise, while the vanilla model without confidence maps breaks. + +
Depth Corr. ↑
Ground truth66
AIGN [57] (supervised, from [37])50.81
DepthNetGAN [37] (supervised, from [37])58.68
MOFA [53] (model-based, from [37])15.97
DepthNet [37] (from [37])26.32
DepthNet [37] (from GitHub)35.77
Ours48.98
Ours (w/ CelebA pre-training)54.65
+ +Table 5: 3DFAW keypoint depth evaluation. Depth correlation between ground truth and prediction evaluated at 66 facial keypoint locations. + +the two constant baselines and approaches the results of supervised training. Improving over the third baseline (which has access to GT information) confirms that the model learns an instance specific 3D representation. + +Ablation. To understand the influence of the individual parts of the model, we remove them one at a time and evaluate the performance of the ablated model in Table 3. Visual results are reported in the supplementary material. + +In the table, row (1) shows the performance of the full model (the same as in Table 2). Row (2) does not flip the albedo. Thus, the albedo is not encouraged to be symmetric in the canonical space, which fails to canonicalize the viewpoint of the object and to use cues from symmetry to recover shape. The performance is as low as the trivial baseline in Table 2. Row (3) does not flip the depth, with a similar effect to row (2). Row (4) predicts a shading map instead of computing it from depth and light direction. This also harms performance significantly because shading cannot be + +![](images/0e7f9c7375115b3632669e198a3c193305249cfe2bb0a06a806c56e7bed2d6e8.jpg) +perturbed dataset + +![](images/8a402058988f51f1db3e892af3037a71775801b57cb3d7b8bf5a30ab1e9c92ed.jpg) +input + +![](images/4cd6e9a309b617a6b8e01fadcc7fbf35f53ac8fa188fa19313e8b880375b8179.jpg) + +![](images/e5401f79960bb368d8537ebdf3376db071c03a112d97c9316a0ace986017c8c1.jpg) +recon w/conf + +![](images/f77c779c67f18e2f1760f30b4b60681ca454afaacb39d38148be571bff0877b4.jpg) +Figure 3: Asymmetric perturbation. Top: examples of the perturbed dataset. Bottom: reconstructions with and without confidence maps. Confidence allows the model to correctly reconstruct the 3D shape with the asymmetric texture. + +![](images/dad0139b3e540aa8c781e82078b9878398365d98bf65aa1d29545357a31d7b64.jpg) +conf $\sigma$ conf $\sigma^{\prime}$ + +![](images/2afd14ca7b5e64b32a2d3d47284a312052f314b3bd809745fa916029ac75b400.jpg) +recon w/o conf + +![](images/0d028b6e81941ddfa44071d1352e443eed142e937b0651d9e4724702a8aed5fa.jpg) + +![](images/f07c312534710f864c108f47c34bc1db3e1a088a9e3974e32b3b8c9ad7dc101a.jpg) + +used as a cue to recover shape. Row (5) switches off the perceptual loss, which leads to degraded image quality and hence degraded reconstruction results. Row (6) replaces the ImageNet pretrained image encoder used in the perceptual loss with one trained through a self-supervised task [18], which shows no difference in performance. Finally, row (7) switches off the confidence maps, using a fixed and uniform value for the confidence — this reduces losses (3) and (7) to the basic $L_{1}$ and $L_{2}$ losses, respectively. The accuracy does not drop significantly, as faces in BFM are highly symmetric (e.g. do not have hair), but its variance increases. To better understand the effect of the confidence maps, we specifically evaluate on partially asymmetric faces using perturbations. + +Asymmetric perturbation. In order to demonstrate that our uncertainty modelling allows the model to handle asymmetry, we add asymmetric perturbations to BFM. Specifically, we generate random rectangular color patches with $20\%$ to $50\%$ of the image size and blend them onto the images with $\alpha$ -values ranging from 0.5 to 1, as shown in Fig. 3. We then train our model with and without confidence on these perturbed images, and report the results in Table 4. Without the confidence maps, the model always predicts a symmetric albedo and geometry reconstruction often fails. With our confidence estimates, the model is able to reconstruct the asymmetric faces correctly, with very little loss in accuracy compared to the unperturbed case. + +Qualitative results. In Fig. 4 we show reconstruction results of human faces from CelebA and 3DFAW, cat faces from [66, 42] and synthetic cars from ShapeNet. The 3D shapes are recovered with high fidelity. The reconstructed 3D face, for instance, contain fine details of the nose, eyes and mouth even in the presence of extreme facial expression. + +To further test generalization, we applied our model trained on the CelebA dataset to a number of paintings and cartoon drawings of faces collected from [8] and the Internet. As shown in Fig. 5, our method still works well even though it has never seen such images during training. + +![](images/dfe780a0005414bd50a5e71853ac26be269cc9e2d033cc5bf38c8147d327a9e3.jpg) + +![](images/a67b28b81f92d8b91da116c3fabbb937e5415a8e04eabfcc95e991debd61e86d.jpg) + +![](images/794f817a496a42576bda41eda602ed96a0ce21ed9ac695121d753937b93c4d19.jpg) + +![](images/6e761563a0c6221c1d6eca64d5fef451c89d7fc20b0d77a390835db53bb87a3d.jpg) + +![](images/de893143f45353e86c9e73d98571d1ab9a3d8433b12cb26cdc61a1c962f5cbb9.jpg) + +![](images/15ec7385538ea1491eeb8cc88bfa8b32ebadcadc1c750c22a3feea557a5d83ee.jpg) + +![](images/d524bf228b4ae6573bf50e59d212b513a6355acc1eca5685c568d963ef4b0e7d.jpg) + +![](images/8a410581edce7b6e1f026889ec1b0577f620b64ab1ac93f7358795e23f4cb59b.jpg) + +![](images/c032da9a4a07e33076ebb37504315707cdaf57f73e441d32234969d216aec4ad.jpg) + +![](images/e9d75d97fa61b33f6f6cf5ae11a561398969493822f396949309a7e145644cea.jpg) + +![](images/c891329e7478c1b965022a1db8b5347a3ff869853054bde4ddf53e094a246497.jpg) + +![](images/49e0855863d02fd8af519e8e255e644f0541fb5f8d53dd6d121635d9d62ed35f.jpg) + +![](images/96c9a9140353b2065ca4230cf19d9c976755ec7de6faf18b29104a3626d6298a.jpg) + +![](images/2e33a88cec8e3eb024064040bb84757a79136390baa8d581f63f73bd2499e1ca.jpg) + +![](images/3893d674362894d4d952a6cf955a7fc943c58eb6922632dbb06f12f2a30e1839.jpg) + +![](images/ac2cde9eaa5a32586813698af074e1418d4f504ccd74fba904e33e93a5e452e8.jpg) + +![](images/59fd2801aa1c5f46f573ac97b9d585bee3f835e6356409368714342817af668a.jpg) + +![](images/67ecd88ed04431ab57d9189ff504ea0f16e165e523c647f2f44292b17c279a5a.jpg) + +![](images/3a87d9a42b9a2f70ac4e4fdc2fe4eb31885b19087b2e11f48cb3747afbd5ba5c.jpg) + +![](images/249156bd2d240fa363d0ddbca83bc109e03626374b5c7b3bb8428e14bb63637a.jpg) + +![](images/55a768c6ab2bb28785e94db9c1fabfe840c4da89c8c7d2a95bfde62cbd2a0681.jpg) + +![](images/65babe8695d35eddce09963700610d711f6b9f9a76b43a582638a8d656eff35c.jpg) +input + +![](images/88b343365f950ac3d35e26c64ae07b9a988ea702f72736c3a610c93aa097ef77.jpg) +Figure 4: Reconstruction of faces, cats and cars. + +![](images/7c04e1bd3ac604c2475ef062bac0548bf1594bcd2f9755630b5e86f9a3039241.jpg) + +![](images/576d85f74399883b98492ca4c4239cf79fd1fbc5334ac9bdfabf10edcea1a298.jpg) +reconstruction + +![](images/191be5fa64f924d3e7be7e2b8aa21c3027df0ff52e82c3a4d7fe57b2eac4b50d.jpg) + +![](images/ec233867ce69878af154b4da34b4c9a0468cc931230441f59d8c5ba90e501c79.jpg) + +![](images/4cc8045e81ce6663fedfbef0456150ddfe743a7bc079b816ea5a4fde5692c785.jpg) + +![](images/e39f86d2dcaa8ba1df7968e7f140925f692eeebbd2efe9519dd3be74682a8765.jpg) +input + +![](images/554093c2e303123fda06039ddf8738fa9c2ab7092e5f4d10e0cd86773c283647.jpg) +Figure 5: Reconstruction of faces in paintings. + +![](images/1b213fc3ec2ec72f2588d2ee8a76ac99fb55c896382a275e9c3415b32965cb25.jpg) + +![](images/3a78f151ab9851a6964c97a0987410acd5f6e3caf33bb27e0e22c12f2ca417a7.jpg) + +![](images/1c7cc64e0b5e6bd8272c8c01bf0b124ad12e3a16b2b3f2778fc2f3a09598b54a.jpg) + +![](images/cc72ca124a2ff73d37789ad73b583c1b95181c71da81dc8242f31bc68f9ceaaf.jpg) + +![](images/1f8a5e1c17eb664bd37e019bfad7589b91d6e270c5d943d8257932ca408a8210.jpg) + +![](images/5acf108f78f02ce1a44a03e8fc5f80242544f4a4b62a098d624b7de76cb357dd.jpg) +(a) symmetry plane + +![](images/03f00f2f369a3041221d3cab24d804553ab59a81e17b9d497eff5429727d278f.jpg) +Figure 6: Symmetry plane and asymmetry detection. (a): our model can reconstruct the "intrinsic" symmetry plane of an in-the-wild object even though the appearance is highly asymmetric. (b): asymmetries (highlighted in red) are detected and visualized using confidence map $\sigma'$ . + +![](images/822152b1afe7bcc36e09dae8d4865d0d605153ff934f0e9e1c88f3b6bb6371f8.jpg) + +![](images/4879369d338cb1514fe4f764e9b4a446710d1ec4c7b42059b0f4e8a7c7a1a9f6.jpg) + +![](images/e07a4becdc6d09572ab692898a9cd5124866bc07509b6af54ef0012e6b1515b8.jpg) +(b) asymmetry visualization + +![](images/81025c0848f9f3503351180171682f951cb9885e690639a8ce8e0187329e35d1.jpg) + +![](images/adf6e92d189e6f08e203c78da63338ff12b8cc1bdc79c6767368dcf3456d79e3.jpg) + +![](images/ed332db6eb22153017f696fbfa523ddb9eba9106db0c1735e2fbf1fcf7701edf.jpg) + +Symmetry and asymmetry detection. Since our model predicts a canonical view of the objects that is symmetric about the vertical center-line of the image, we can easily visualize the symmetry plane, which is otherwise non-trivial to detect from in-the-wild images. In Fig. 6, we warp the centerline of the canonical image to the predicted input viewpoint. Our method can detect symmetry planes accurately despite the presence of asymmetric texture and lighting effects. We also overlay the predicted confidence map $\sigma'$ onto the image, confirming that the model assigns low confidence to asymmetric regions in a sample-specific way. + +# 4.3. Comparison with the state of the art + +As shown in Table 1, most reconstruction methods in the literature require either image annotations, prior 3D models + +![](images/c61887d8369347d2cfc51fede9225f734ec4b8caf91a15ea4cd29c28012a8f2d.jpg) +input + +![](images/13893e8d3d7dbb06dff9660f811aeb0dfd50f9ad3c93549899c17007d846723a.jpg) +LAE [45] + +![](images/4928a624c6a2f6232f8c9b69cf88af4eb071f2a7051d1ae6be3a033074ae47c6.jpg) + +![](images/a7b35823b0bf67567ffa47d79ce632ab8fe41614589b5a422ac032fa4fb3fc5b.jpg) +input + +![](images/17a137b7c1780293734468d1e2c329933a1eb707f5e6d1b0ab62be71af42bff0.jpg) +Szabo et al. [52] + +![](images/2b6b415cc17a22a23ae18bfe8c90651e8bcce462938269697f33de1dc590716f.jpg) +Figure 7: Qualitative comparison to SOTA. Our method recovers much higher quality shapes compared to [45, 52]. + +![](images/3f72eb94f504bf9994037f1ae64dc0dc532d41f9d88331472bec4f069c129d04.jpg) +ours + +![](images/e71cb3022f5b69e6853029db320e27dbaf45c40bbe46d5040199fcb48e2c3e55.jpg) + +![](images/a5b65bb8b2b215ada4731e6315ed7f189bda5c9e4dca5d8724b6883f90798342.jpg) + +![](images/3454e5fb06a5772da74e70c74dc9c2aaca437ac90edcea859712b1949bdcb2b2.jpg) +ours + +![](images/a1a98d6c0c84e8294e90f680bfefc357d0716677667733d713e5408990df1c95.jpg) + +or both. When these assumptions are dropped, the task becomes considerably harder, and there is little prior work that is directly comparable. Of these, [21] only uses synthetic, texture-less objects from ShapeNet, [52] reconstructs in-the-wild faces but does not report any quantitative results, and [45] reports quantitative results only on keypoint regression, but not on the 3D reconstruction quality. We were not able to obtain code or trained models from [45, 52] for a direct quantitative comparison and thus compare qualitatively. + +Qualitative comparison. In order to establish a side-by-side comparison, we cropped the examples reported in the papers [45, 52] and compare our results with theirs (Fig. 7). Our method produces much higher quality reconstructions than both methods, with fine details of the facial expression, whereas [45] recovers 3D shapes poorly and [52] generates unnatural shapes. Note that [52] uses an unconditional GAN that generates high resolution 3D faces from random noise, and cannot recover 3D shapes from images. The input images for [52] in Fig. 7 were generated by their GAN. + +3D keypoint depth evaluation. Next, we compare to the DepthNet model of [37]. This method predicts depth for selected facial keypoints, but uses 2D keypoint annotations as input — a much easier setup than the one we consider here. Still, we compare the quality of the reconstruction of these sparse point obtained by DepthNet and our method. We also compare to the baselines MOFA [53] and AIGN [57] reported in [37]. For a fair comparison, we use their public code which computes the depth correlation score (between 0 and 66) on the frontal faces. We use the 2D keypoint locations to sample our predicted depth and then evaluate the same metric. The set of test images from 3DFAW and the preprocessing are identical to [37]. Since 3DFAW is a small dataset with limited variation, we also report results with CelebA pre-training. + +In Table 5 we report the results from their paper and the slightly improved results we obtained from their publicly- + +![](images/aa849c8862674859dd9e47b8620043af7b470d8d29832eef90fec99589ed92f6.jpg) +a: extreme lighting + +![](images/8686d8a502ee8fb876434c3de0f6fc77cb74cda0d6eb1e87afe307ae1caa58e0.jpg) +Figure 8: Failure cases. See Section 4.4 for details. + +![](images/505354992d3773625c933589e5e0ae9e19dc5b1501d2afa1803d952d49e90ad7.jpg) + +![](images/b63e5f2a33ed955573aa9d293305bb49ff1a042e04031108824b49013b6caaeb.jpg) +b: noisy texture + +![](images/3c759c32dcfd18eeee29dda83054924e78980a067f99a5afd6aa8297dea8406d.jpg) +c: extreme pose + +![](images/d0148dfb18912353599c73c7f052cf291567be56f5952b212bb86e5ed40b856f.jpg) + +![](images/8a2270317da65a0e8eb1b15ca18746216b93688eaf6e4e4a6abb0981ce4619d4.jpg) + +available implementation. The paper also evaluates a supervised model using a GAN discriminator trained with ground-truth depth information. While our method does not use any supervision, it still outperforms DepthNet and reaches close-to-supervised performance. + +# 4.4. Limitations + +While our method is robust in many challenging scenarios (e.g., extreme facial expression, abstract drawing), we do observe failure cases as shown in Fig. 8. During training, we assume a simple Lambertian shading model, ignoring shadows and specularity, which leads to inaccurate reconstructions under extreme lighting conditions (Fig. 8a) or highly non-Lambertian surfaces. Disentangling noisy dark textures and shading (Fig. 8b) is often difficult. The reconstruction quality is lower for extreme poses (Fig. 8c), partly due to poor supervisory signal from the reconstruction loss of side images. This may be improved by imposing constraints from accurate reconstructions of frontal poses. + +# 5. Conclusions + +We have presented a method that can learn a 3D model of a deformable object category from an unconstrained collection of single-view images of the object category. The model is able to obtain high-fidelity monocular 3D reconstructions of individual object instances. This is trained based on a reconstruction loss without any supervision, resembling an autoencoder. We have shown that symmetry and illumination are strong cues for shape and help the model to converge to a meaningful reconstruction. Our model outperforms a current state-of-the-art 3D reconstruction method that uses 2D keypoint supervision. As for future work, the model currently represents 3D shape from a canonical viewpoint using a depth map, which is sufficient for objects such as faces that have a roughly convex shape and a natural canonical viewpoint. For more complex objects, it may be possible to extend the model to use either multiple canonical views or a different 3D representation, such as a mesh or a voxel map. + +Acknowledgements We would like to thank Soumyadip Sengupta for sharing with us the code to generate synthetic face datasets, and Mihir Sahasrabudhe for sending us the reconstruction results of Lifting AutoEncoders. We are also indebted to the members of Visual Geometry Group for insightful discussions. This work is jointly supported by Facebook Research and ERC Horizon 2020 research and innovation programme IDIU 638009. + +# References + +[1] Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas Guibas. Learning representations and generative models for 3D point clouds. In Proc. ICML, 2018. 2, 3 +[2] Pulkit Agrawal, Joao Carreira, and Jitendra Malik. Learning to see by moving. In Proc. ICCV, 2015. 3 +[3] Peter N. Belhumeur, David J. Kriegman, and Alan L. Yuille. The bas-relief ambiguity. *IJCV*, 1999. 4 +[4] Christoph Bregler, Aaron Hertzmann, and Henning Biermann. Recovering non-rigid 3D shape from image streams. In Proc. CVPR, 2000. 2 +[5] Angel X. Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, Jianxiong Xiao, Li Yi, and Fisher Yu. Shapenet: An information-rich 3d model repository. arXiv preprint arXiv:1512.03012, 2015. 5 +[6] Ching-Hang Chen, Ambrish Tyagi, Amit Agrawal, Dylan Drover, Rohith MV, Stefan Stojanov, and James M. Rehg. Unsupervised 3d pose estimation with geometric self-supervision. In Proc. CVPR, 2019. 3 +[7] Wenzheng Chen, Huan Ling, Jun Gao, Edward Smith, Jaako Lehtinen, Alec Jacobson, and Sanja Fidler. Learning to predict 3d objects with an interpolation-based differentiable renderer. In NeurIPS, 2019. 2, 3 +[8] Elliot J. Crowley, Omkar M. Parkhi, and Andrew Zisserman. Face painting: querying art with photos. In Proc. BMVC, 2015. 7 +[9] David Eigen, Christian Puhrsch, and Rob Fergus. Depth map prediction from a single image using a multi-scale deep network. In NeurlPS, 2014. 5 +[10] Olivier Faugeras and Quang-Tuan Luong. The Geometry of Multiple Images. MIT Press, 2001. 2, 5 +[11] Alexandre R. J. François, Gérard G. Medioni, and Roman Waupotitsch. Mirror symmetry $\Rightarrow$ 2-view stereo geometry. Image and Vision Computing, 2003. 2, 3 +[12] Matheus Gadelha, Subhransu Maji, and Rui Wang. 3D shape induction from 2D views of multiple objects. In 3DV, 2017. +[13] Yuan Gao and Alan L. Yuille. Exploiting symmetry and/or Manhattan properties for 3d object structure estimation from single and multiple images. In Proc. CVPR, 2017. 2 +[14] Baris Gecer, Stylianos Ploumpis, Irene Kotsia, and Stefanos Zafeiriou. GANFIT: Generative adversarial network fitting for high fidelity 3D face reconstruction. In Proc. CVPR, 2019. 2, 3 +[15] Robert Geirhos, Patricia Rubisch, Claudio Michaelis, Matthias Bethge, Felix A. Wichmann, and Wieland Brendel. Imagenet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustness. In Proc. ICML, 2019. 1 +[16] Zhenglin Geng, Chen Cao, and Sergey Tulyakov. 3D guided fine-grained face manipulation. In Proc. CVPR, 2019. 2 +[17] Thomas Gereg, Andreas Morel-Forster, Clemens Blumer, Bernhard Egger, Marcel Lüthi, Sandro Schonborn, and Thomas Vetter. Morphable face models - an open framework. In Proc. Int. Conf. Autom. Face and Gesture Recog., 2018. 2, 3 + +[18] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. In Proc. ICLR, 2018. 7 +[19] Clément Godard, Oisin Mac Aodha, and Gabriel J. Brostow. Unsupervised monocular depth estimation with left-right consistency. In Proc. CVPR, 2017. 2, 3 +[20] Ralph Gross, Iain Matthews, Jeffrey Cohn, Takeo Kanade, and Simon Baker. Multi-pie. Image and Vision Computing, 2010. 5 +[21] Paul Henderson and Vittorio Ferrari. Learning single-image 3D reconstruction by generative modelling of shape, pose and shading. IJCV, 2019. 2, 8 +[22] Philipp Henzler, Niloy Mitra, and Tobias Ritschel. Escaping plato's cave using adversarial training: 3d shape from unstructured 2d image collections. In Proc. ICCV, 2019. 2, 3 +[23] Berthold Horn. Obtaining shape from shading information. In The Psychology of Computer Vision, 1975. 4 +[24] Berthold K. P. Horn and Michael J. Brooks. Shape from Shading. MIT Press, Cambridge Massachusetts, 1989. 2, 3 +[25] László A. Jeni, Jeffrey F. Cohn, and Takeo Kanade. Dense 3d face alignment from 2d videos in real-time. In Proc. Int. Conf. Autom. Face and Gesture Recog., 2015. 5 +[26] Angjoo Kanazawa, Michael J. Black, David W. Jacobs, and Jitendra Malik. End-to-end recovery of human shape and pose. In Proc. CVPR, 2018. 2, 3 +[27] Angjoo Kanazawa, Shubham Tulsiani, Alexei A. Efros, and Jitendra Malik. Learning category-specific mesh reconstruction from image collections. In Proc. ECCV, 2018. 2, 3 +[28] Hiroharu Kato and Tatsuya Harada. Learning view priors for single-view 3d reconstruction. In Proc. CVPR, 2019. 2, 3 +[29] Hiroharu Kato, Yoshitaka Ushiku, and Tatsuya Harada. Neural 3d mesh renderer. In Proc. CVPR, 2018. 3 +[30] Alex Kendall and Yarin Gal. What uncertainties do we need in bayesian deep learning for computer vision? In NeurIPS, 2017. 4 +[31] Jan J Koenderink. What does the occluding contour tell us about solid shape? Perception, 1984. 2 +[32] Shichen Liu, Tianye Li, Weikai Chen, and Hao Li. Soft rasterizer: A differentiable renderer for image-based 3d reasoning. In Proc. ICCV, 2019. 3 +[33] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In Proc. ICCV, 2015. 5 +[34] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J Black. SMPL: A skinned multiperson linear model. ACM TOG, 34(6):248, 2015. 3 +[35] Matthew M. Loper and Michael J. Black. OpenDR: An approximate differentiable renderer. In Proc. ECCV, 2014. 3 +[36] Yue Luo, Jimmy Ren, Mude Lin, Jiahao Pang, Wenxiu Sun, Hongsheng Li, and Liang Lin. Single view stereo matching. In Proc. CVPR, 2018. 3 +[37] Joel Ruben Antony Moniz, Christopher Beckham, Simon Rajotte, Sina Honari, and Christopher Pal. Unsupervised depth estimation, 3d face rotation and replacement. In NeurIPS, 2018. 2, 3, 6, 8 +[38] Dipti P. Mukherjee, Andrew Zisserman, and J. Michael Brady. Shape from symmetry – detecting and exploiting symmetry + +in affine images. Philosophical Transactions of the Royal Society of London, 351:77-106, 1995. 2, 3 +[39] Thu Nguyen-Phuoc, Chuan Li, Lucas Theis, Christian Richardt, and Yong-Liang Yang. Hologan: Unsupervised learning of 3d representations from natural images. In Proc. ICCV, 2019. 3 +[40] David Novotny, Diane Larlus, and Andrea Vedaldi. Learning 3d object categories by looking around them. In Proc. ICCV, 2017. 3 +[41] David Novotny, Nikhila Ravi, Benjamin Graham, Natalia Neverova, and Andrea Vedaldi. C3DPO: Canonical 3d pose networks for non-rigid structure from motion. In Proc. ICCV, 2019. 2, 4 +[42] Omkar M. Parkhi, Andrea Vedaldi, Andrew Zisserman, and C. V. Jawahar. Cats and dogs. In Proc. CVPR, 2012. 5, 7 +[43] Pascal Paysan, Reinhard Knothe, Brian Amberg, Sami Romdhani, and Thomas Vetter. A 3D face model for pose and illumination invariant face recognition. In Advanced video and signal based surveillance, 2009. 2, 3, 5 +[44] Anurag Ranjan, Timo Bolkart, Soubhik Sanyal, and Michael J. Black. Generating 3D faces using convolutional mesh autoencoders. In Proc. ECCV, 2018. 2, 3 +[45] Mihir Sahasrabudhe, Zhixin Shu, Edward Bartrum, Riza Alp Guler, Dimitris Samaras, and Iasonas Kokkinos. Lifting autoencoders: Unsupervised learning of a fully-disentangled 3d morphable model using deep non-rigid structure from motion. In Proc. ICCV Workshops, 2019. 2, 3, 8 +[46] Soubhik Sanyal, Timo Bolkart, Haiwen Feng, and Michael J. Black. Learning to regress 3D face shape and expression from an image without 3D supervision. In Proc. CVPR, 2019. 2 +[47] Soumyadip Sengupta, Angjoo Kanazawa, Carlos D. Castillo, and David Jacobs. SfSNet: Learning shape, reflectance and illuminance of faces in the wild. In Proc. CVPR, 2018. 2, 5 +[48] Zhixin Shu, Mihir Sahasrabudhe, Alp Guler, Dimitris Samaras, Nikos Paragios, and Iasonas Kokkinos. Deforming autoencoders: Unsupervised disentangling of shape and appearance. In Proc. ECCV, 2018. 3, 4 +[49] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In Proc. ICLR, 2015. 5 +[50] Sudipta N. Sinha, Krishnan Ramnath, and Richard Szeliski. Detecting and reconstructing 3d mirror symmetric objects. In Proc. ECCV, 2012. 2, 3 +[51] Supasorn Suwajanakorn, Noah Snavely, Jonathan Tompson, and Mohammad Norouzi. Discovery of latent 3d keypoints via end-to-end geometric reasoning. In NeurIPS, 2018. 3 +[52] Attila Szabó, Givi Meishvili, and Paolo Favaro. Unsupervised generative 3d shape learning from natural images. arXiv preprint arXiv:1910.00287, 2019. 2, 3, 8 +[53] Ayush Tewari, Michael Zollhöfer, Hyeongwoo Kim, Pablo Garrido, Florian Bernard, Patrick Pérez, and Christian Theobalt. MoFA: Model-based deep convolutional face autoencoder for unsupervised monocular reconstruction. In Proc. ICCV, 2017. 6, 8 +[54] James Thewlis, Hakan Bilen, and Andrea Vedaldi. Unsupervised learning of object frames by dense equivariant image labelling. In NeurIPS, 2017. 3 + +[55] James Thewlis, Hakan Bilen, and Andrea Vedaldi. Modelling and unsupervised learning of symmetric deformable object categories. In NeurIPS, 2018. 3 +[56] Sebastian Thrun and Ben Wegbreit. Shape from symmetry. In Proc. ICCV, 2005. 2, 3 +[57] Hsiao-Yu Fish Tung, Adam W. Harley, William Seto, and Katerina Fragkiadaki. Adversarial inverse graphics networks: Learning 2d-to-3d lifting and image-to-image translation from unpaired supervision. In Proc. ICCV, 2017. 6, 8 +[58] Benjamin Ummenhofer, Huizhong Zhou, Jonas Uhrig, Nikolaus Mayer, Eddy Ilg, Alexey Dosovitskiy, and Thomas Brox. Demon: Depth and motion network for learning monocular stereo. In Proc. CVPR, 2017. 2 +[59] Chaoyang Wang, Jose Miguel Buenapasada, Rui Zhu, and Simon Lucey. Learning depth from monocular videos using direct methods. In Proc. CVPR, 2018. 3 +[60] Mengjiao Wang, Zhixin Shu, Shiyang Cheng, Yannis Panagakis, Dimitris Samaras, and Stefanos Zafeiriou. An adversarial neuro-tensorial approach for learning disentangled representations. IJCV, 2019. 2, 3 +[61] Andrew P. Witkin. Recovering surface shape and orientation from texture. Artificial Intelligence, 1981. 2 +[62] Jiajun Wu, Chengkai Zhang, Tianfan Xue, William T. Freeman, and Joshua B. Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In NeurIPS, 2016. 2, 3 +[63] Jianxiong Xiao, James Hays, Krista A. Ehinger, Aude Oliva, and Antonio Torralba. Sun database: Large-scale scene recognition from abbey to zoo. In Proc. CVPR, 2010. 5 +[64] Lijun Yin, Xiaochen Chen, Yi Sun, Tony Worm, and Michael Reale. A high-resolution 3d dynamic facial expression database. In Proc. Int. Conf. Autom. Face and Gesture Recog., 2008. 5 +[65] Ruo Zhang, Ping-Sing Tsai, James Edwin Cryer, and Mubarak Shah. Shape-from-shading: a survey. IEEE PAMI, 1999. 2, 3 +[66] Weiwei Zhang, Jian Sun, and Xiaou Tang. Cat head detection - how to effectively exploit shape and texture features. In Proc. ECCV, 2008. 5, 7 +[67] Xing Zhang, Lijun Yin, Jeffrey F. Cohn, Shaun Canavan, Michael Reale, Andy Horowitz, Peng Liu, and Jeffrey M. Girard. Bp4d-spontaneous: a high-resolution spontaneous 3d dynamic facial expression database. Image and Vision Computing, 32(10):692-706, 2014. 5 +[68] Tinghui Zhou, Matthew Brown, Noah Snavely, and David G. Lowe. Unsupervised learning of depth and ego-motion from video. In Proc. CVPR, 2017. 2, 3 +[69] Jun-Yan Zhu, Zhoutong Zhang, Chengkai Zhang, Jiajun Wu, Antonio Torralba, Joshua B. Tenenbaum, and William T. Freeman. Visual object networks: Image generation with disentangled 3D representations. In NeurIPS, 2018. 3 \ No newline at end of file diff --git a/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/images.zip b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..31cbe5f4508e802822f2faab916abb95896489bb --- /dev/null +++ b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4af139166ab5cc6e5051e08f88a4e0464410bd5bc138098167fbf361bebbecc +size 513194 diff --git a/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/layout.json b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..fa80f1eafb3305e1a60d3c3efa0f959e78e4b4bc --- /dev/null +++ b/unsupervisedlearningofprobablysymmetricdeformable3dobjectsfromimagesinthewild/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c1ae87a4331cebc763054401551e487b61b644a341a753aeb1500782db10034 +size 605955 diff --git a/unsupervisedmagnificationofposturedeviationsacrosssubjects/849aa506-a0d4-4502-b764-afec00ea5bae_content_list.json b/unsupervisedmagnificationofposturedeviationsacrosssubjects/849aa506-a0d4-4502-b764-afec00ea5bae_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..16025b7bf1f8f8fbcb5803c3bd8471b7c3b17456 --- /dev/null +++ b/unsupervisedmagnificationofposturedeviationsacrosssubjects/849aa506-a0d4-4502-b764-afec00ea5bae_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04ee601cc52a0b508b43bd8896f4f910bfd5badf253196dc2623f5524e59bd0c +size 81084 diff --git a/unsupervisedmagnificationofposturedeviationsacrosssubjects/849aa506-a0d4-4502-b764-afec00ea5bae_model.json b/unsupervisedmagnificationofposturedeviationsacrosssubjects/849aa506-a0d4-4502-b764-afec00ea5bae_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a274e49e4b81ac890823e982c570c80bd7c92273 --- /dev/null +++ b/unsupervisedmagnificationofposturedeviationsacrosssubjects/849aa506-a0d4-4502-b764-afec00ea5bae_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b660d0256fc2a52a9ac299eb66b0066f24709b48cfa9e71d644491cdec40ea73 +size 101083 diff --git a/unsupervisedmagnificationofposturedeviationsacrosssubjects/849aa506-a0d4-4502-b764-afec00ea5bae_origin.pdf b/unsupervisedmagnificationofposturedeviationsacrosssubjects/849aa506-a0d4-4502-b764-afec00ea5bae_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..856ecd978386bec595e0178535ee9ae8cec91812 --- /dev/null +++ b/unsupervisedmagnificationofposturedeviationsacrosssubjects/849aa506-a0d4-4502-b764-afec00ea5bae_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc7e12f4d27c79ef29397cd8bac2e2eefadf397465f0511d84f815fce37d681a +size 1047858 diff --git a/unsupervisedmagnificationofposturedeviationsacrosssubjects/full.md b/unsupervisedmagnificationofposturedeviationsacrosssubjects/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8cbf2719bfbcef21f04a3a27149b4f9fd562d545 --- /dev/null +++ b/unsupervisedmagnificationofposturedeviationsacrosssubjects/full.md @@ -0,0 +1,345 @@ +# Unsupervised Magnification of Posture Deviations Across Subjects + +Michael Dorkenwald* Uta Buchler* Björn Ommer +HCI / IWR, Heidelberg University, Germany + +# Abstract + +Analyzing human posture and precisely comparing it across different subjects is essential for accurate understanding of behavior and numerous vision applications such as medical diagnostics or sports. Motion magnification techniques help to see even small deviations in posture that are invisible to the naked eye. However, they fail when comparing subtle posture differences across individuals with diverse appearance. Keypoint-based posture estimation and classification techniques can handle large variations in appearance, but are invariant to subtle deviations in posture. We present an approach to unsupervised magnification of posture differences across individuals despite large deviations in appearance. We do not require keypoint annotation and visualize deviations on a sub-bodypart level. To transfer appearance across subjects onto a magnified posture, we propose a novel loss for disentangling appearance and posture in an autoencoder. Posture magnification yields exaggerated images that are different from the training set. Therefore, we incorporate magnification already into the training of the disentangled autoencoder and learn on real data and synthesized magnifications without supervision. Experiments confirm that our approach improves upon the state-of-the-art in magnification and on the application of discovering posture deviations due to impairment. + +# 1. Introduction + +Automatic analysis of human posture, movement, and behavior is a key problem of computer vision with numerous applications such as autonomous driving [37, 57, 39, 20, 42], surveillance [11, 30, 47, 56], and health-care [7, 32, 54, 2]. A main challenge is to compare related behavior across different subjects despite vast differences in appearance. Typical approaches towards behavior understanding include action classification [8, 38, 18, 9, 3], posture estimation [1, 29, 44, 6, 5, 45] and tracking [25, 10, 1]. However, as a consequence of being invariant to appearance variability, these methods neglect subtle differences in + +![](images/6e404cff3ca400b96f52a30a1a0065a370b744a6a9ed5c1c1aeaca381c38330d.jpg) +Figure 1. Magnification of Posture Deviations Across Subjects. We visually emphasize subtle posture deviations between a query $x^q$ and reference frame $x^r$ by magnifying their differences in the posture encoding. $x^q$ walks with its legs apart, highlighted by the red line in comparison to the green line of $x^r$ . We first disentangle posture from appearance (the blue boxes show visualization of $E_{\pi}$ , $E_{\alpha}$ ). Then, we extrapolate in the posture encoding the distance of $x^r$ and $x^q$ in the direction of $x^q$ . The magnified images (bottom right) are generated by combining the appearance encoding of $x^q$ and the magnified posture encoding using different magnification intensities $\lambda$ . The generated images allow a user to easier see differences. + +posture. At the opposite end are motion magnification techniques [35, 55, 16, 52, 53, 50, 58, 43] that compare frames of the same video to visually amplify their subtle differences. Even recent learning-based approaches [43] are designed to magnify the intra-video differences of the same subject. Being trained for invariance to synthetic appearance changes, they can handle intra-video appearance variability, but fail at the differences across subjects and videos. + +What we are lacking is the best of both worlds: a microscope that can selectively amplify subtle posture differences across subjects while suppressing their vast deviations in appearance. Evidently, human vision is easily overwhelmed by the inter-subject appearance differences and, consequently, fails at discovering subtle posture differences across different individuals. Numerous applications ranging from sports (comparing and identifying suboptimal movement) to medicine (discovering impairment of motor behavior) would therefore benefit from such a detailed analysis. + +We propose an unsupervised approach to magnification of subtle posture differences across diverse subjects that requires no keypoint annotation. Being markerless, our approach can truly discover deviations and localize them on a sub-bodied part level—without having to identify the relevant body parts a priori. To transfer appearance across individuals onto the synthesized image of magnified posture differences, we explicitly disentangle posture and appearance in an autoencoder. In contrast to [43], we additionally propose a novel loss that better enforces disentanglement despite large appearance deviations. Magnification typically aims at generating new, exaggerated postures that are not in the training set and therefore difficult to synthesize. Consequently, we need to integrate the magnification process already into the training of the autoencoder. In contrast to [43] whose training works on synthetic data, our approach can directly train on inferred magnifications of real data without requiring supervision. + +Experiments demonstrate that our method leads to more detailed and realistically looking magnifications. It also quantitatively improves state-of-the-art performance in terms of quality and on the downstream task of discovering posture deviation due to impairment. + +The main contributions of our work are as follows: (1) We introduce the novel application scenario of magnifying posture deviations across subjects; (2) we present an unsupervised approach that separates posture from the remaining image components and enables us to directly train the magnification on real data; (3) we introduce three new datasets and evaluate our model on several applications. + +# 2. Related Work + +Magnification. Magnification is a valuable tool to enhance differences on images or a set of images, in order to automatically detect and visualize small deformations. Tali et al. [12] and Tlusty et al. [49] visualize non-local variations between repeating structures in a single image or for multiple views. Wadhwa et al. [51] exaggerates the geometric deviation between an object of interest and an ideal geometry. Video motion magnification techniques [35, 55, 16, 52, 53, 50, 58, 43] amplify the subtle motion of objects in the same video. The first attempt of motion magnification [35] computes optical flow between video frames and then amplifies every pixel separately given the optical flow information. Following works [55, 52, 16, 53, 58, 43] do not alter pixels directly, but they decompose the video into an alternative representation, e.g., by using the frequency domain. The desired motion is then selected and used to generate the image. Oh et al. [43] proposed the first deep learning based approach to video motion magnification using an encoder-decoder architecture. The magnification is performed by a specialized non-linear module, trained using a synthetic dataset. We also amplify differ + +ences using video frames as input, however, we amplify the deviation in posture across individuals and videos. Moreover, our approach is trained directly on the target dataset in an unsupervised manner. + +Disentanglement. Disentangling factors of variation in an image has been proposed for more than two decades [21, 15, 19]. Recent works show successful results using deep generative neural networks [23, 24, 48, 33, 27, 17, 40, 14, 36, 28, 34, 46]. Hu et al. [27] proposed an unsupervised approach which separates the encoding vector into multiple chunks and forces each part to have meaningful information using an invariance objective. There is, however, no control over the characteristics of the image extracted by each chunk which is essential for magnifying posture deviations. Denton et al. [13] trained a pose and content encoder by exploiting temporal information of videos. The pose encoder is trained by fooling a content discriminator using an adversarial loss. Given two frames from the same video, the content encoder minimizes the distance between them. Our appearance encoder also exploits videos to be invariant to pose, however we do not need a content and pose loss. Moreover, we propose a novel disentanglement loss which enforces that both encodings contribute equally to the generation. + +# 3. Approach + +First, we define the problem of magnifying posture deviations. Then, we present our unsupervised approach for separating posture and appearance to assure that the magnification only alters the posture and not the appearance. Finally, we describe our method that enables us to directly train the magnification on real data. + +# 3.1. Problem Definition + +Given a frame $x^q$ of a query video showing a subject performing a particular action, the objective is to amplify the differences of $x^q$ to a reference frame $x^r$ and to generate the magnified image + +$$ +x ^ {m} = m \left(x ^ {q} \mid x ^ {r}, \lambda\right) \tag {1} +$$ + +with $m$ a magnification function, $\lambda$ the amplification intensity and $x^r$ a frame from a different video and subject. This problem requires a more detailed representation than a pixel space can offer. In fact, we require a model which explicitly learns an encoding space conditioned on the input image and is able to decode the encoding back to the image space. Hence, an autoencoder (AE) is the architecture of choice. An AE consists of an encoder $E$ and a decoder $D$ . $E$ extracts a lower dimensional representation of the input image $x^q$ , and $D$ translates the representation back to the input space by generating the reconstructed image $\hat{x}^q$ . We additionally require a model that explicitly separates posture + +![](images/3da69d48aa83e60561a21b3ab077f902266a88a9a206d34b4a2244a078f3539f.jpg) + +![](images/b9487db0e1edadf4042d294789c6d131641155e063c28d0c753be22331e3b1e0.jpg) + +![](images/24aa412be405d5a67dd1085d33e4bdf8f84809bddac214ec635d1bb28081dfc9.jpg) + +![](images/1514614c5d7aefeb5b9467d03fb1a75dd5023469043d757318094b7a24e3c28d.jpg) +A + +![](images/556a440f22ccac6619a4c8dcd28083fd8505d2d84865d36cff8adabc9b608988.jpg) +B +Figure 2. Disentanglement for Magnification. A: The input image $x^q$ is reconstructed by using the color transformed image $\tau(x^q)$ as input to the posture encoder and a random frame $x^{q'}$ (same video as $x^q$ ) as input to the appearance encoder. The reconstruction loss minimizes the distance between $x^q$ and the reconstruction $\hat{x}^q$ . B and C: To enforce meaningful information in both encoders, we force the network to generate deficient images when only one of the two encodings is used. We exchange one of the two encodings with Gaussian noise, producing "fake" images and require a distance $t_\bullet$ between the original and the fake image. + +![](images/816e31b57c988f4f3cecc1af2b7d37cd0bed4196c21475e3953ddfbfea2bc238.jpg) +C + +from the remaining image components (appearance) since we only want to magnify the differences in posture. Hence, we use an autoencoder with two encoders, $E_{\pi}$ for extracting posture and $E_{\alpha}$ for appearance (see Fig. 2 A). The query image $x^{q}$ is then reconstructed as follows: + +$$ +\hat {x} ^ {q} = D \left(E _ {\pi} \left(x ^ {q}\right), E _ {\alpha} \left(x ^ {q}\right)\right). \tag {2} +$$ + +We apply the same separation for $x^r$ . + +Given the AE with two encoders, we can now magnify $x^{q}$ with respect to $x^{r}$ by only magnifying in the posture encoding. $x^{m}$ is then generated from the appearance encoding $E_{\alpha}(x^{q})$ and the magnified posture encoding $m_{\pi}$ by the decoder $D$ . Eq. 1 updates as follows: + +$$ +x ^ {m} = D \left(m _ {\pi} \left(E _ {\pi} \left(x ^ {q}\right) \mid E _ {\pi} \left(x ^ {r}\right), \lambda\right), E _ {\alpha} \left(x ^ {q}\right)\right) \tag {3} +$$ + +In the next section, we introduce our unsupervised approach to disentangle posture and appearance. + +# 3.2. Disentanglement for Magnification + +Magnifying posture deviations involves the comparison of subjects with different appearances. To transfer the posture from $x^{r}$ to $x^{q}$ it is crucial to obtain a posture encoding $E_{\pi}$ that does not contain any subject-specific information. Furthermore, we require a pure appearance representation $E_{\alpha}$ of $x^{q}$ for generating the magnified frame. + +The posture and appearance encoders are considered to be disentangled if the posture encoding is invariant to appearance changes and vice-versa. The state-of-the-art in motion magnification [43] induces this invariance by introducing a regularization loss that enforces the posture representation of a color perturbed frame to be the same as the original frame. We also apply a color transformation $\tau$ to the input image $x^q$ , but we additionally alter the posture + +by choosing a random frame $x^{q'}$ from the same video as $x^q$ ( $x^{q'}$ contains the same appearance as $x^q$ , but a different posture). We input $\tau(x^q)$ into the posture encoder, $x^{q'}$ into the appearance encoder and generate the reconstruction with the decoder (see Fig. 2 A). A perfect reconstruction is only possible if the AE extracts the posture information from $\tau(x^q)$ and the appearance information from $x^{q'}$ . We train our model by minimizing the reconstruction loss + +$$ +\mathcal {L} _ {\text {r e c}} = d \left(\hat {x} ^ {q}, x ^ {q}\right) \tag {4} +$$ + +with $\hat{x}^q = D(E_{\pi}(\tau(x^q)), E_{\alpha}(x^{q'})))$ the reconstruction and $d(\bullet, \bullet)$ the perceptual distance [31]. Oh et al. [43] also employ the reconstruction loss but require an additional regularization objective to enforce invariance. + +Despite the color transformation, the input $\tau(x^q)$ to the posture encoder contains appearance information such as the background scene or the type of clothes worn by the subject. This would allow the decoder to find a lazy solution by mainly leveraging $E_{\pi}$ to reconstruct $x^q$ as good as possible without considering the appearance encoding $E_{\alpha}(x^q)$ . In contrast to motion magnification of single objects, the magnification of posture deviations transfers postures across subjects with different appearances. Hence, it requires a stronger separation of posture and appearance. + +For that reason, we introduce a novel loss discouraging our model to correctly reproduce the image if one of the two encodings is ignored. In practice, we generate 'fake' images by exchanging the encoding of either appearance or posture with random Gaussian noise. Then we teach the network that an image reconstructed without one of the two encodings (fake image) is lacking an important component, and should therefore not be able to fully represent the original input image. We define the reconstruction with fake posture + +$$ +\hat {x} _ {\alpha} ^ {q ^ {\prime}} = D \left(\mathcal {N} (0, \sigma), E _ {\alpha} \left(x ^ {q ^ {\prime}}\right)\right) \tag {5} +$$ + +and with fake appearance as + +$$ +\hat {x} _ {\pi} ^ {q} = D \left(E _ {\pi} \left(\tau \left(x ^ {q}\right)\right), \mathcal {N} (0, \sigma)\right). \tag {6} +$$ + +The generation with fake images is visually illustrated in Fig. 2 B and C. We enforce a distance between the input and fake image to be close to a target value $t_{\alpha}, t_{\pi} > 0$ . These values represent the lower bound on how close $\hat{x}_{\alpha}^{q'}$ and $\hat{x}_{\pi}^{q}$ are allowed to approach the original input $x^q$ during training. We update our model using the loss + +$$ +\mathcal {L} _ {\mathrm {d i s}} = \left\| d \left(x ^ {q}, \hat {x} _ {\pi} ^ {q}\right) - t _ {\pi} \right\| _ {1} + \left\| d \left(x ^ {q}, \hat {x} _ {\alpha} ^ {q \prime}\right) - t _ {\alpha} \right\| _ {1} \tag {7} +$$ + +with $d(\bullet, \bullet)$ being the perceptual distance. Note, that for the distance to $\hat{x}_{\alpha}^{q'}$ we compare with $x^q$ since $x^q$ and $x^{q'}$ contain the same appearance and therefore $\hat{x}_{\alpha}^{q'}$ should be equal to $\hat{x}_{\alpha}^{q}$ after optimizing the network. + +At this point, both terms of $\mathcal{L}_{\mathrm{dis}}$ are optimized independently from each other and one might be easier to minimize than the other. However, to successfully generate $\hat{x}^q$ we require both the posture and appearance encoding to be equally advanced. Therefore, we balance the encoders by relating the target values $t_{\alpha}$ and $t_{\pi}$ with the reconstruction quality of the opposite terms, + +$$ +t _ {\pi} = d \left(x ^ {q}, \hat {x} _ {\alpha} ^ {q ^ {\prime}}\right) + \gamma_ {\pi}, \tag {8} +$$ + +$$ +t _ {\alpha} = d \left(x ^ {q}, \hat {x} _ {\pi} ^ {q}\right) + \gamma_ {\alpha}. \tag {9} +$$ + +with $\gamma_{\pi}$ and $\gamma_{\alpha}$ being fixed margins. If, for example, the reconstruction quality of $\hat{x}_{\alpha}^{q'}$ increases (and therefore the distance to $x^q$ decreases), $t_{\pi}$ decreases as well according to Eq. 9 and forces therefore $d(x^q, \hat{x}_{\pi}^q)$ in Eq. 7 to be smaller than $\hat{x}_{\alpha}^{q'}$ by a margin of $\gamma_{\pi}$ . + +In the next section, we introduce our approach that enables us to directly train the magnification of posture deviations on the data. + +# 3.3. Learning to Magnify + +The magnification in the posture space usually leads to novel poses. However, it is difficult for a generative model to produce valid postures never seen during training. In particular, we require a model that is $(i)$ able to precisely transfer the magnified posture $m_{\pi}$ into the image domain and $(ii)$ sensitive to small encoding differences. Thus, the magnification needs to be included directly into the training process. Since ground-truth magnifications are not available, we cannot simply employ the reconstruction loss. Oh et al. [43] tackled this problem by creating a synthetic dataset to simulate the magnification of motion. We propose an alternative approach that allows us to directly train magnification on real data without requiring ground-truth images. + +![](images/b40836ffce004e432d62ef0fb94e48cd0cdec0e9a36a4c77be398249c7bab97e.jpg) + +![](images/5e9081e56cfedd35f6dad6f3222b908280bcc637732ee3fc9d67ae3278c5dbae.jpg) +Figure 3. Learning to Magnify. Our magnification loss forces the decoder to precisely transfer the magnification $m_{\pi}$ into the image space by re-encoding the magnified image $x^{m}$ and minimizing the distance between the original magnified posture (yellow filled point) and its re-encoded posture (orange filled point). The same is applied for the appearance encodings (orange empty point and dark red empty point). Finally, an adversarial discriminator $C$ enforces the generation of realistically looking magnified images. + +This way, our model produces more fine-grained and realistically looking results as demonstrated in the experimental section. + +As defined in Eq. 3, we generate a magnified frame $x^{m}$ by combining the magnified posture encoding $m_{\pi}$ with the appearance encoding $E_{\alpha}(x^{q})$ . For computing $m_{\pi}$ we first calculate the difference between $x^{q}$ and $x^{r}$ in the posture encoding. Then, we amplify the posture deviation in the direction of $E_{\pi}(x^{q})$ . This procedure can be practically realized by extrapolating the posture differences, + +$$ +m _ {\pi} \left(E _ {\pi} \left(x ^ {q}\right) \mid E _ {\pi} \left(x ^ {r}\right), \lambda\right) = E _ {\pi} \left(x ^ {r}\right) + \lambda \left(E _ {\pi} \left(x ^ {q}\right) - E _ {\pi} \left(x ^ {r}\right)\right) \tag {10} +$$ + +with $\lambda > 1$ being the magnification factor. Fig. 1 and 3 visually depict this procedure. + +During training, we require a reference frame $x^{r}$ containing a slightly different posture as $x^{q}$ since we aim to amplify subtle posture differences. This can be chosen automatically by using the $k$ -th Nearest Neighbor (NN) of $x^{q}$ (excluding frames from the same video) with $k$ randomly chosen from the range [10, 20]. We can now generate a magnified frame $x^{m}$ for each $x^{q}$ with respect to the sampled reference frame $x^{r}$ . The magnification of posture deviations requires a decoder able to precisely transfer the magnified posture encoding $m_{\pi}$ to the pixel space without distorting or losing any information about the new posture. In particular, our model should reach a fixpoint with respect to $m_{\pi}$ , i.e. $m_{\pi}$ should be equal to the re-encoded decoded $m_{\pi}$ , + +$$ +m _ {\pi} \stackrel {!} {=} E _ {\pi} \left(D \left(m _ {\pi}, \bullet\right)\right). \tag {11} +$$ + +To meet this requirement, we introduce a fixpoint loss that minimizes the distance between the re-encoded magnified frame $E_{\pi}(x^{m}) = E_{\pi}\big(D(m_{\pi},E_{\alpha}(x^{q}))\big)$ and the original magnification $m_{\pi}$ (see Fig. 3). We also minimize the distance between the respective appearance encodings $E_{\alpha}(x^{m})$ and $E_{\alpha}(x^{q})$ to ensure a consistent appearance decoding. Our model is then updated with the following fixpoint loss + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {f i x}} = \left\| E _ {\pi} \left(x ^ {m}\right) - m _ {\pi} \left(E _ {\pi} \left(x ^ {q}\right) \mid E _ {\pi} \left(x ^ {r}\right), \lambda\right) \right\| _ {2} ^ {2} \tag {12} \\ + \left\| E _ {\alpha} \left(x ^ {m}\right) - E _ {\alpha} \left(x ^ {q}\right) \right\| _ {2} ^ {2}. \\ \end{array} +$$ + +We only update the decoder with $\mathcal{L}_{\mathrm{fix}}$ since its purpose is to improve the generation of magnified images. + +To encourage the decoder to produce realistically looking images, we introduce an adversarial loss. A discriminator $C$ is trained to distinguish between real images $x^{q}$ and magnified images $x^{m}$ by maximizing the adversarial loss $\mathcal{L}_{\mathrm{A}}(C,D)$ proposed by [22], + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {A}} (C, D) = \mathbb {E} _ {x \sim p _ {\text {d a t a}} (x)} [ \log C (x) ] \tag {13} \\ + \mathbb {E} _ {\hat {x} \sim p _ {\operatorname {m a g}} (x)} [ \log (1 - C (\hat {x}) ] \\ \end{array} +$$ + +with $p_{\mathrm{data}}$ the data distribution and $p_{\mathrm{mag}}$ the distribution of magnified images. The decoder is then trained by additionally minimizing $\mathcal{L}_A$ . The adversarial loss allows us to visualize the differences in posture with higher magnification factors without generating artifacts or unrealistic images. + +We summarize the losses described in this section as + +$$ +\mathcal {L} _ {\mathrm {m a g}} = \mathcal {L} _ {\mathrm {A}} + \beta \mathcal {L} _ {\text {f i x}} \tag {14} +$$ + +with $\beta = 2$ + +Our model is then updated with the following final loss: + +$$ +\mathcal {L} = \mathcal {L} _ {\text {r e c}} + \mathcal {L} _ {\text {d i s}} + \gamma \mathcal {L} _ {\text {m a g}} \tag {15} +$$ + +with $\gamma = 0.5$ and $\mathcal{L}_{\mathrm{mag}}$ is only being used to update the decoder. + +# 4. Experiments + +We evaluate our approach on three datasets and compare our results with previous work on motion magnification. First, we introduce the datasets, perform qualitative and quantitative evaluations and demonstrate the applicability of our model on a medical scenario. Finally, we show that every component of our model is important for generating meaningful magnifications through ablation studies. The implementation details are provided in the supplementary material. + +# 4.1. Datasets + +Magnifying posture deviations is a challenging and new task that has never been tackled before. We propose three + +datasets showing three different actions for the specific task of magnifying posture deviations across subjects. It is particularly important that the datasets contain subjects with different appearances to analyze the abilities of transferring posture from one subject to another. Our datasets cover the following actions: (1) walking on a treadmill, (2) swinging a golf club and (3) moving the pupil of a person's eye. + +Human Gait Dataset to Study Disfunctional Behavior (HG2DB). In collaboration with clinicians from University Hospital Zurich, we introduce a medical dataset for comparing postures between human subjects walking on a treadmill. The recorded patients are affected by different diseases debilitating their walking motor skills. The dataset contains also videos of healthy subjects which are used as a reference and have been recorded in the same setup. The videos display the legs of the subjects. The dataset contains 59 impaired and 10 healthy subjects with multiple recordings per subject, resulting in 229 videos with around 700 frames each, leading to a total number of 172,288 frames. + +Golf Swing. We collected videos from Youtube showing golfers from different tournaments. The videos are recorded in slow-motion making them suitable for our scenario since many subtle differences in posture are represented. Our dataset has an overlap with the videos collected by Guha et al. [4] with the main difference that we use purely videos with a high frame rate. Overall, we employ 48 videos with a total number of 7000 frames. Golf Swing is more challenging than HG2DB since the videos were recorded from different tournaments (i.e., different backgrounds, lightning etc.) and they contain the full body of the person (i.e., more degrees of freedom regarding posture changes). + +Close-Up Human Eye Dataset (CUEye). Even though eyes seem to be static if no direct movement is triggered by the person, the pupil still moves in a very subtle manner, often referred to as 'wobbling'. Magnifying posture deviations is an excellent tool to increase the visibility of this motion. We collected 10 videos showing close-up recordings of the eye from 10 different subjects (one video each) with three different eye-colors (brown, blue, green). The subjects first move their eyes to allow the generative model to differentiate between pose and appearance. This is followed by a few seconds of starring used for evaluating if our approach is able to magnify the 'wobbling' effect. + +# 4.2. Qualitative Comparison + +Fig. 4, 5 and 6 show magnified images generated by our model for all three datasets. We additionally provide videos in the supplementary material and on our project page1 to further demonstrate the benefit of our magnifications. + +Fig. 4 demonstrates our results on magnifying posture deviations on HG2DB (5th row; yellow border) given a reference and query frame (first row). We show the output + +![](images/d2d515749bd0ff4474df89a8d5318bffda66afdd7d3e016b3d23d1dcc8cc8f49.jpg) +Figure 4. Qualitative Comparison on HG2DB. We show the magnification of posture deviations between a reference and query frame (first row) using the approach by Oh et al. [43] (2nd row), our model without $\mathcal{L}_{\mathrm{dis}}$ and without $\mathcal{L}_{\mathrm{mag}}$ (3rd row), our model without $\mathcal{L}_{\mathrm{mag}}$ (4th row) and our final model (5th row). We manually superimposed red markers to facilitate the perception of the small differences and changes in the magnified images. The markers represent the posture of the query subject and are the same throughout a specific example. Left: The query subject keeps its legs more parallel than the reference subject. Our model exaggerates this behavior until the legs of the query subject are completely parallel. Middle: The query subject does not raise its left foot properly. Our magnifications visualize the differences until the left foot completely touches the treadmill. Right: The query subject performs bigger steps and our model further increases the distance. + +with three different magnification intensities $\lambda$ . Our model is able to detect the posture differences and represent the magnifications on realistically looking images. + +In Fig. 5 we show our results (3rd row) on Golf Swing. Even though the dataset is very challenging due to the possible posture changes in arms and legs, our model is able to magnify the differences between the reference and query frame. In particular, the example in the middle shows that our model can even magnify arms and legs at the same time. + +Fig. 6 displays the magnification of the subtle movements of a pupil while the eye is in idle state. Instead of comparing the posture deviations across different subjects, we first compute the pupil's movement in time of a query subject (top left) and transfer this motion to several target subjects with different appearances (right). Our model successfully detects the very subtle motion of the query subject and is able to transfer this motion to other subjects. + +Comparison with Previous Work. To the best of our knowledge, this is the first approach to address the magnification of posture deviations across individuals. Previous work dealt with the task of magnifying subtle motion within the same video [35, 55, 16, 52, 53, 50, 58, 43], but not across subjects with different appearances. Considering all motion magnification approaches, [43] has the highest potential to address the more complex scenario due to their usage of a generative model with a shape and texture repre + +sentation. Therefore, we qualitatively compare our results in Fig. 4 and Fig. 5 (and quantitatively in Tab. 1) with [43] on the task of magnifying posture differences. We use the official implementation of [43] from their repository. Both figures show that Oh et al. [43] is not specialized on magnifying posture deviations across subjects. Their model also modifies the background and appearance of the subject and therefore generates very blurry and unrealistic images. In contrast, our approach is able to precisely magnify the posture differences without altering the appearance. + +# 4.3. Quantitative Analysis + +Classification of Impairment. Our model generates novel magnified postures not present in the given dataset. Hence, we cannot directly evaluate our magnified images due to missing ground-truth magnifications. As an alternative, we introduce a quantitative evaluation based on the health condition of patients in HG2DB. + +We train two linear (binary) classifiers, both on healthy vs unhealthy samples. One classifier is trained with the original images (Original) and the second one with the magnified generations (Ours). The goal is to evaluate if the magnification improves the classification of impairment and thus whether our model can support doctors during the analysis of the condition of a patient. + +The classification should be subject independent and + +![](images/c45f463fabec3a14fe6868538a3cdac8258c68669bad93853b769e31fa6e6ab0.jpg) +Figure 5. Qualitative Comparison on Golf Swing. We show the magnifications produced by our model and compare with previous work [43] (best viewed by zooming in on the digital version). The red markers represent the posture of the query subject and are the same throughout a specific example. Left: The legs of the query subject are further apart and the arm is kept lower. Our model further increases the distance of the legs and lowers the arms on the generated images. Middle: The right knee of the query is twisted inside and the arms are kept higher. Our approach magnifies both by further twisting the knee and raising the arms. Right: The reference subject is holding its arms more centered than the query subject. Our model magnifies the deviation by slowly moving the arms of the query subject to the left. + +![](images/2fd3a6ffed62b5049c93d8d0c298292f2feb3837f226e483bb2c3fce402234e3.jpg) +Figure 6. Magnification Results on CUEye. Detection of subtle posture differences in the pupil given a query movement (top left) and a target appearance (right). Bottom left shows a close up of the pupil with a blue grid as guide. The zoom shows a tiny motion from left to right. Given one of the target appearances shown on the right, our model can transfer the left-right movement from the query to the target appearance. + +![](images/e62f03d42e4bee46b9da83cb43398c1200d46ba7f71f63a99e3d6c040954c970.jpg) + +![](images/12ca85ab23bc5707857a552991521ba56874fd3a6f0a7951c3b20037a348d84e.jpg) +Figure 7. Magnifying Posture Deviations as Medical Tool. Deviations between healthy (first row) and impaired (second) is amplified in the generated images (third) for a better analysis of the disease status. The patient only shows difficulties during the right step. Increasing $\lambda$ emphasizes the deviation. We manually superimposed markers to facilitate the perception of the differences. + +only based on posture information. For this specific experiment, we employ keypoints to represent postures since these correspond best to how humans perceive postures. In particular, we use DeepLabCut [41] for detecting the following 8 keypoints: left/right hip, left/right knee, left/right toe and left/right heel. The detector is trained with manually annotated frames of HG2DB. The keypoints are normalized using 'left hip' as origin to assure that they are comparable across different videos. + +We sample 10 diverse linearly-spaced postures from a complete walking cycle sequence and perform the quantitative analysis independently per posture. We provide a visual example of the postures in the supplementary material. For every posture and subject we collect 10 Nearest Neighbors resulting in $10 \times$ number of subjects samples + +per posture for training and testing (in total 6900 frames). Different postures require different magnification intensities to render visible posture discrepancies between healthy and impaired subjects. Therefore, we generate the magnified images with in total 25 different magnification factors $(\lambda)$ , where $\lambda \in [1.2, 6]$ with a step size of 0.2, and train one classifier per $\lambda$ and posture. + +The optimal $\lambda$ per posture has been found using cross-validation and Tab. 1 reports the accuracy on the test set. We do not expect the accuracy to be $\sim 100\%$ since not all impaired patients have issues with each posture, i.e., for specific posture-subject pairs no differences to healthy subjects should be detected. This behavior can be also observed in Fig. 7. The patient (2nd row) only shows difficulties during the right step. Our model detects the deviation to an healthy + +
Classifier trained withPosturesAVG ± STD
12345678910
Original58.961.363.253.355.951.758.350.350.761.256.5 ± 4.5
Oh et al. [43]60.261.564.153.556.152.059.452.851.261.457.2 ± 4.4
Ours70.466.772.068.371.867.669.665.359.565.767.7 ± 3.5
+ +Table 1. Classification of Impairment. We report the test accuracies $(\%)$ per posture achieved by binary classifiers (healthy vs impaired) trained and tested on the key-points of (i) the original data, (ii) the magnified images generated by previous work on motion magnification and (iii) our magnified images. A visual example of postures 1 to 10 can be found in the supplementary material. + +![](images/1706d72262bee4e069a07ae16772211cef00d91511d6f7a91ae5545ff8363c79.jpg) +Figure 8. Quality of Visualizations - FID. We display the absolute FID increase relative to $\lambda = 1$ for different intensity values $\lambda$ using the generation of Oh et al. [43] (dark blue), our model without $\mathcal{L}_{\mathrm{dis}}$ and without $\mathcal{L}_{\mathrm{mag}}$ (light blue), our model without $\mathcal{L}_{\mathrm{mag}}$ (purple) and our final model (orange). In contrast to our final model, the generation quality of Oh et al. and our incomplete models decreases significantly (FID increase) with increasing $\lambda$ . + +subject (1st row) and only magnifies the inaccurate posture during the right step. + +We also compare our quantitative results with previous work on motion magnification. We performed the same experiment explained above using the magnified generations of Oh et al. [43] and report the accuracies in Tab. 1. + +Most of the classifiers trained on the original data stay close to random performance and are not able to distinguish healthy from impaired. Compared to the approach of [43], our magnified images can increase the accuracy significantly. We show especially for posture 4,5 and 8 a large boost and improve the classification accuracy on average by more than $10\%$ . This experiment demonstrates that our model is a valuable tool for discovering impairment of motor behavior. + +Quality of Visualizations - FID. The Fréchet Inception Distance (FID) was originally proposed by Heusel et al. [26] and aims to evaluate the quality of generated images. It measures the distance between multivariate Gaussians for real and generated images. We have empirically found that the change in the distribution through magnification is negligible. Therefore, the FID allows us to evaluate the generation quality of our magnified images using different magnification intensities without requiring ground-truth magnifications. In Fig. 8 we show the absolute FID increase relative to $\lambda = 1$ . This experiment shows that with increasing + +$\lambda$ our final model achieves the best results and only forfeits a small decrease in quality even with higher $\lambda$ . Please note that this experiment evaluates the generation quality, not if the magnifications correspond to the actual amplification of the posture deviations. + +# 4.4. Ablation Studies + +In Fig. 4 and 8 we evaluate the importance of our proposed losses. We compare the magnified images produced by our full model with the generations of our model without $\mathcal{L}_{\mathrm{mag}}$ and/or without $\mathcal{L}_{\mathrm{dis}}$ . Fig. 4 shows that our model without $\mathcal{L}_{\mathrm{dis}}$ and $\mathcal{L}_{\mathrm{mag}}$ generates, similar to [43], blurry and unrealistically looking images. Our model trained with the disentanglement loss $\mathcal{L}_{\mathrm{dis}}$ improves the generations especially for smaller $\lambda$ , but fails in producing valuable magnifications for larger $\lambda$ . Instead, our final model is able to precisely display the magnification of posture deviations on the generated images even for large $\lambda$ . Similar conclusions can be drawn from Fig. 8. The quality of the magnified images decreases for our incomplete models for $\lambda > 3$ , but stays almost constant for our final model. This shows that every component of our model is important. + +# 5. Conclusion + +In this paper, we have introduced the problem of magnifying posture deviations across subjects and presented an approach to tackle the challenging task. Our unsupervised disentanglement allows us to only magnify posture differences while keeping the appearance unaltered. Moreover, our method enables us to integrate the magnification into the training and learn on real data without supervision. We have shown on three datasets that our approach produces valuable magnifications and improves greatly upon the performance of the state-of-the-art in motion magnification. Finally, ablation studies have demonstrated the importance of every component of our model. + +# Acknowledgement + +This work has been supported in part by DFG grant 421703927, the German federal ministry BMWi within the project 'KI Absicherung' and a hardware donation from NVIDIA Corporation. The authors are grateful to Linard Filli for providing the recordings used in HG2DB. + +# References + +[1] Mykhaylo Andriluka, Umar Iqbal, Eldar Insafutdinov, Leonid Pishchulin, Anton Milan, Juergen Gall, and Bernt Schiele. Posetrack: A benchmark for human pose estimation and tracking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5167-5176, 2018. +[2] Borislav Antic, Uta Buchler, Anna-Sophia Wahl, Martin E Schwab, and Björn Ommer. Spatiotemporal parsing of motor kinematics for assessing stroke recovery. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 467-475. Springer, 2015. +[3] Borislav Antic, Timo Milbich, and Bjorn Ommer. Less is more: Video trimming for action recognition. In The IEEE International Conference on Computer Vision (ICCV) Workshops, June 2013. +[4] Guha Balakrishnan, Amy Zhao, Adrian V. Dalca, Frédo Durand, and John V. Guttag. Synthesizing images of humans in unseen poses. CoRR, abs/1804.07739, 2018. +[5] Miguel A. Bautista, Artsiom Sanakoyeu, and Bjorn Ommer. Deep unsupervised similarity learning using partially ordered sets. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. +[6] Miguel A Bautista, Artsiom Sanakoyeu, Ekaterina Tikhoncheva, and Bjorn Ommer. Cliquecnn: Deep unsupervised exemplar learning. In Advances in Neural Information Processing Systems, pages 3846-3854, 2016. +[7] Biagio Brattoli, Uta Buchler, Anna-Sophia Wahl, Martin E Schwab, and Björn Ommer. Lstm self-supervision for detailed behavior analysis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6466-6475, 2017. +[8] Uta Buchler, Biagio Brattoli, and Björn Ommer. Improving spatiotemporal self-supervision by deep reinforcement learning. In Proceedings of the European Conference on Computer Vision (ECCV), pages 770-786, 2018. +[9] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6299-6308, 2017. +[10] Wongun Choi. Near-online multi-target tracking with aggregated local flow descriptor. In Proceedings of the IEEE international conference on computer vision, pages 3029-3037, 2015. +[11] Ankur Datta, Mubarak Shah, and N Da Vitoria Lobo. Person-on-person violence detection in video data. In Object recognition supported by user interaction for service robots, volume 1, pages 433-438. IEEE, 2002. +[12] Tali Dekel, Tomer Michaeli, Michal Irani, and William T. Freeman. Revealing and modifying non-local variations in a single image. ACM Transactions on Graphics (Proc. SIGGRAPH Asia), 2015. +[13] Emily Denton and Vighnesh Birodkar. Unsupervised learning of disentangled representations from video. CoRR, abs/1705.10915, 2017. +[14] Emily L Denton and Vighnesh Birodkar. Unsupervised learning of disentangled representations from video. In Ad- + +vances in Neural Information Processing Systems, pages 4414-4423, 2017. +[15] Ahmed Elgammal and Chan-Su Lee. Separating style and content on a nonlinear manifold. In Proceedings of the 2004 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2004. CVPR 2004., volume 1, pages I-I. IEEE, 2004. +[16] Mohamed Elgharib, Mohamed Hefeeda, Fredo Durand, and William T Freeman. Video magnification in presence of large motions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4119-4127, 2015. +[17] Patrick Esser, Ekaterina Sutter, and Björn Ommer. A variational u-net for conditional appearance and shape generation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8857-8866, 2018. +[18] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition. In Proceedings of the IEEE International Conference on Computer Vision, pages 6202-6211, 2019. +[19] Lloyd A. Fletcher and Rangachar Kasturi. A robust algorithm for text string separation from mixed text/graphics images. IEEE transactions on pattern analysis and machine intelligence, 10(6):910-918, 1988. +[20] Patrick Gebert, Alina Roitberg, Monica Haurilet, and Rainer Stiefelhagen. End-to-end prediction of driver intention using 3d convolutional neural networks. In 2019 IEEE Intelligent Vehicles Symposium (IV), pages 969-974. IEEE, 2019. +[21] Zoubin Ghahramani. Factorial learning and the em algorithm. In Advances in neural information processing systems, pages 617-624, 1995. +[22] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 2672-2680. Curran Associates, Inc., 2014. +[23] Naama Hadad, Lior Wolf, and Moni Shahar. A two-step disentanglement method. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 772-780, 2018. +[24] Ananya Harsh Jha, Saket Anand, Maneesh Singh, and VSR Veeravasarapu. Disentangling factors of variation with cycle-consistent variational auto-encoders. In Proceedings of the European Conference on Computer Vision (ECCV), pages 805–820, 2018. +[25] Roberto Henschel, Yunzhe Zou, and Bodo Rosenhahn. Multiple people tracking using body and joint detections. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0-0, 2019. +[26] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems, pages 6626-6637, 2017. +[27] Qiyang Hu, Attila Szabó, Tiziano Portenier, Paolo Favaro, and Matthias Zwicker. Disentangling factors of variation + +by mixing them. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3399-3407, 2018. +[28] Xun Huang, Ming-Yu Liu, Serge Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 172-189, 2018. +[29] Eldar Insafutdinov, Leonid Pishchulin, Bjoern Andres, Mykhaylo Andriluka, and Bernt Schiele. Deepercut: A deeper, stronger, and faster multi-person pose estimation model. In European Conference on Computer Vision, pages 34-50. Springer, 2016. +[30] Shuiwang Ji, Wei Xu, Ming Yang, and Kai Yu. 3d convolutional neural networks for human action recognition. IEEE transactions on pattern analysis and machine intelligence, 35(1):221-231, 2012. +[31] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European conference on computer vision, pages 694-711. Springer, 2016. +[32] Mayank Kabral, Alice A. Robie1, Marta Rivera-Albal, Steven Branson, and Kristin Branson. Jaaba: interactive machine learning for automatic annotation of animal behavior. Nature methods, 10, 2012. +[33] Guillaume Lample, Neil Zeghidour, Nicolas Usunier, Antoine Bordes, Ludovic Denoyer, et al. Fader networks: Manipulating images by sliding attributes. In Advances in Neural Information Processing Systems, pages 5967-5976, 2017. +[34] Hsin-Ying Lee, Hung-Yu Tseng, Jia-Bin Huang, Maneesh Singh, and Ming-Hsuan Yang. Diverse image-to-image translation via disentangled representations. In Proceedings of the European conference on computer vision (ECCV), pages 35-51, 2018. +[35] Ce Liu, Antonio Torralba, William T Freeman, Frédo Durand, and Edward H Adelson. Motion magnification. In ACM transactions on graphics (TOG), volume 24, pages 519-526. ACM, 2005. +[36] Dominik Lorenz, Leonard Bereska, Timo Milbich, and Bjorn Ommer. Unsupervised part-based disentangling of object shape and appearance. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[37] Manuel Martin, Alina Roitberg, Monica Haurilet, Matthias Horne, Simon Reiß, Michael Voit, and Rainer Stiefelhagen. Drive&act: A multi-modal dataset for fine-grained driver behavior recognition in autonomous vehicles. In Proceedings of the IEEE International Conference on Computer Vision, pages 2801-2810, 2019. +[38] Brais Martinez, Davide Modolo, Yuanjun Xiong, and Joseph Tighe. Action recognition with spatial-temporal discriminative filter banks. In Proceedings of the IEEE International Conference on Computer Vision, pages 5482-5491, 2019. +[39] Sarfaraz Masood, Abhinav Rai, Aakash Aggarwal, Mohammad Najmud Doja, and Musheer Ahmad. Detecting distraction of drivers using convolutional neural network. Pattern Recognition Letters, 2018. + +[40] Michael F Mathieu, Junbo Jake Zhao, Junbo Zhao, Aditya Ramesh, Pablo Sprechmann, and Yann LeCun. Disentangling factors of variation in deep representation using adversarial training. In Advances in Neural Information Processing Systems, pages 5040-5048, 2016. +[41] Alexander Mathis, Pranav Mamidanna, Kevin M. Cury, Taiga Abe, Venkatesh N. Murthy, Mackenzie W. Mathis, and Matthias Bethge. Deeplabcut: markerless pose estimation of user-defined body parts with deep learning. Nature Neuroscience, 2018. +[42] Sadegh Mohammadi, Alessandro Perina, Hamed Kiani, and Vittorio Murino. Angry crowds: Detecting violent events in videos. In European Conference on Computer Vision, pages 3-18. Springer, 2016. +[43] Tae-Hyun Oh, Ronnachai Jaroensri, Changil Kim, Mohamed Elgharib, Fr'edo Durand, William T Freeman, and Wojciech Matusik. Learning-based video motion magnification. In Proceedings of the European Conference on Computer Vision (ECCV), pages 633-648, 2018. +[44] Umer Rafi, Bastian Leibe, Juergen Gall, and Ilya Kostrikov. An efficient convolutional network for human pose estimation. In BMVC, volume 1, page 2, 2016. +[45] Artsiom Sanakoyeu, Miguel A Bautista, and Björn Ommer. Deep unsupervised learning of visual similarities. Pattern Recognition, 78:331-343, 2018. +[46] Artsiom Sanakoyeu, Dmytro Kotovenko, Sabine Lang, and Bjorn Ommer. A style-aware content loss for real-time hd style transfer. In The European Conference on Computer Vision (ECCV), September 2018. +[47] Waqas Sultani, Chen Chen, and Mubarak Shah. Real-world anomaly detection in surveillance videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6479-6488, 2018. +[48] Attila Szabó, Qiyang Hu, Tiziano Portenier, Matthias Zwicker, and Paolo Favaro. Challenges in disentangling independent factors of variation. arXiv preprint arXiv:1711.02245, 2017. +[49] Tal Tlusty, Tomer Michaeli, Tali Dekel, and Lihi Zelnik-Manor. Modifying non-local variations across multiple views. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[50] Sergey Tulyakov, Xavier Alameda-Pineda, Elisa Ricci, Lijun Yin, Jeffrey F Cohn, and Nicu Sebe. Self-adaptive matrix completion for heart rate estimation from face videos under realistic conditions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2396-2404, 2016. +[51] Neal Wadhwa, Tali Dekel, Donglai Wei, Frédo Durand, and William T. Freeman. Deviation magnification: Revealing departure from ideal geometries. ACM Trans. Graph. (Proceedings SIGGRAPH Asia 2015), 34(6), 2015. +[52] Neal Wadhwa, Michael Rubinstein, Frédo Durand, and William T Freeman. Phase-based video motion processing. ACM Transactions on Graphics (TOG), 32(4):80, 2013. +[53] Neal Wadhwa, Michael Rubinstein, Frédo Durand, and William T Freeman. Riesz pyramids for fast phase-based video magnification. In 2014 IEEE International Conference + +on Computational Photography (ICCP), pages 1-10. IEEE, 2014. +[54] Anna-Sophia Wahl, U Buchler, A Brandli, Biagio Brattoli, Simon Musall, Hansjörrg Kasper, Benjamin V Ineichen, Fritjof Helmchen, Björn Ommer, and Martin E Schwab. Optogenetically stimulating intact rat corticospinal tract poststroke restores motor control through regionalized functional circuit formation. Nature communications, 8(1):1-16, 2017. +[55] Hao-Yu Wu, Michael Rubinstein, Eugene Shih, John Guttag, Frédo Durand, and William T. Freeman. Eulerian video magnification for revealing subtle changes in the world. ACM Transactions on Graphics (Proc. SIGGRAPH 2012), 31(4), 2012. +[56] Dan Xu, Elisa Ricci, Yan Yan, Jingkuan Song, and Nicu Sebe. Learning deep representations of appearance and motion for anomalous event detection. arXiv preprint arXiv:1510.01553, 2015. +[57] Chao Yan, Frans Coenen, and Bailing Zhang. Driving posture recognition by joint application of motion history image and pyramid histogram of oriented gradients. International journal of vehicular technology, 2014, 2014. +[58] Yichao Zhang, Silvia L Pintea, and Jan C Van Gemert. Video acceleration magnification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 529-537, 2017. \ No newline at end of file diff --git a/unsupervisedmagnificationofposturedeviationsacrosssubjects/images.zip b/unsupervisedmagnificationofposturedeviationsacrosssubjects/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2e61b1bb2602dbc4ad37b9274035d282b2ee323a --- /dev/null +++ b/unsupervisedmagnificationofposturedeviationsacrosssubjects/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b89ea6067890f5e757d63263ab1f76f5073e2e27f8d3e51776f39cb0406dd456 +size 589395 diff --git a/unsupervisedmagnificationofposturedeviationsacrosssubjects/layout.json b/unsupervisedmagnificationofposturedeviationsacrosssubjects/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a6d7acd14da42793b41ccabdc494698535760d65 --- /dev/null +++ b/unsupervisedmagnificationofposturedeviationsacrosssubjects/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65532bb2c5adceeb5204c34c0cd8a8417a1fa886a02cf3737e978d4b7d6fc154 +size 462852 diff --git a/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/65ab3b04-750e-400c-9c1b-5c9215519045_content_list.json b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/65ab3b04-750e-400c-9c1b-5c9215519045_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4ba6b207335a3bd5f660b12a787a6492182c64ef --- /dev/null +++ b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/65ab3b04-750e-400c-9c1b-5c9215519045_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c185ba668ac102d3dcce27aa2cd5ab5fa31007a7f1d220457175541ce5d6d386 +size 71627 diff --git a/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/65ab3b04-750e-400c-9c1b-5c9215519045_model.json b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/65ab3b04-750e-400c-9c1b-5c9215519045_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b6f37b26543983e2c95749c52ef23aa5743f95eb --- /dev/null +++ b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/65ab3b04-750e-400c-9c1b-5c9215519045_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f564f7c7ab84baa990868a5a708dea6d15ce6bb27732e66fc3157d3f16334ec +size 89163 diff --git a/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/65ab3b04-750e-400c-9c1b-5c9215519045_origin.pdf b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/65ab3b04-750e-400c-9c1b-5c9215519045_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2ea20746819a53e741785b7375c8b23d0f813dfc --- /dev/null +++ b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/65ab3b04-750e-400c-9c1b-5c9215519045_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:accaa5a5d31c8f029c1b36c3bce05bc5c2cbb180fcee794376c7cf8684b4fa4d +size 427652 diff --git a/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/full.md b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b37d3c678be29682a207cca567cb79dfd5fa8447 --- /dev/null +++ b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/full.md @@ -0,0 +1,287 @@ +# Unsupervised Model Personalization while Preserving Privacy and Scalability: An Open Problem + +Matthias De Lange1 +Ales Leonardis2 + +Xu Jia $^{2}$ +Gregory Slabaugh $^{2}$ + +Sarah Parisot2,3 Tinne Tuytelaars1 + +$^{1}$ KU Leuven + +$^{2}$ Huawei, Noah's Ark Lab + +3Mila + +{firstname.lastname}@kuleuven.be + +{firstname.lastname}@huawei.com + +# Abstract + +This work investigates the task of unsupervised model personalization, adapted to continually evolving, unlabeled local user images. We consider the practical scenario where a high capacity server interacts with a myriad of resource-limited edge devices, imposing strong requirements on scalability and local data privacy. We aim to address this challenge within the continual learning paradigm and provide a novel Dual User-Adaptation framework (DUA) to explore the problem. This framework flexibly disentangles user-adaptation into model personalization on the server and local data regularization on the user device, with desirable properties regarding scalability and privacy constraints. First, on the server, we introduce incremental learning of task-specific expert models, subsequently aggregated using a concealed unsupervised user prior. Aggregation avoids retraining, whereas the user prior conceals sensitive raw user data, and grants unsupervised adaptation. Second, local user-adaptation incorporates a domain adaptation point of view, adapting regularizing batch normalization parameters to the user data. We explore various empirical user configurations with different priors in categories and a tenfold of transforms for MIT Indoor Scene recognition, and classify numbers in a combined MNIST and SVHN setup. Extensive experiments yield promising results for data-driven local adaptation and elicit user priors for server adaptation to depend on the model rather than user data. Hence, although user-adaptation remains a challenging open problem, the DUA framework formalizes a principled foundation for personalizing both on server and user device, while maintaining privacy and scalability. + +# 1. Introduction + +Data availability and increased hardware efficiency have made neural networks thrive in a wide range of tasks, competing human-level performance in a variety of tasks [13]. + +However, high performing deep neural network models lead to considerable data requirements, with high capacity models trained on large amounts of labeled data. Additionally, performance could be significantly increased by personalizing models to user-specific data. Nonetheless, user data cannot be shared directly due to rigorous privacy constraints. This motivates the need to separate supervised model training on the server from local adaptation to a user's unlabeled personal data. Furthermore, the personalized user model performing tasks locally has the additional benefit of alleviated connectivity requirements. + +In this work, we explore this challenge in a class incremental learning setting, relying on the assumption that a user's personal data evolves over time. We define a pragmatic distributed setup comprising a central server connected with a large number of user devices. We assume the server to be a high-end machine endowed with extensive storage capacity and computational resources. By contrast, the compact user device has limited resources for both storage and computation. In practice, the number of users may be very high, hence imposing the need for scalable user-adaptation. A naive approach consists of training a new server model from scratch for each user, resulting in a linearly increasing demand for computational resources. Another infeasible route is to locally finetune user-models, as user devices are confined by limited computational capabilities. This paper explores a more realistic solution, training a single ensemble of models on the server, subsequently aggregated leveraging user-specific priors. Besides scalability, two additional hurdles must be tackled: the server is precluded access to local user data by pressing privacy requirements, and user data is typically unlabeled, raising the need for unsupervised adaptation. + +In order to tackle these rigorous constraints, we introduce a new Dual User-Adaptation framework (DUA) for model personalization using a task incremental setup. In this setting, tasks are defined as clearly delineated batches of independent and identically distributed (i.i.d.) data, en + +abling network optimization for a task through multiple iterations over its data. The server trains on the sequence of tasks and provides the user either a general or personalized model. This model can be prone to further local adaptation on the user device. Hence, DUA disentangles user-adaptation in two phases: 1) the server exploits a model adaptation strategy, with model weight importance as a proxy for user data, and 2) the user device directly adapts to local data using domain adaptation tools. + +In more detail, server adaptation relies on two main components for task incremental learning that are well suited to fulfill our constraints for unsupervised and scalable user adaptation. First, Incremental Moment Matching (IMM) [15] yields a sequence of task-specific models, restraining new task models to reside close to the previously learned model. Averaging these models presumes a convex-like search space of the loss function, aiming for a single merged model optimal for all tasks. Although weighted averaging provides scalability in the number of tasks, IMM presumes fully supervised model weighting. Therefore, to overcome this need for supervised user data, we incorporate Memory Aware Synapses (MAS) [1] deriving parameter importance from unlabeled data, to attain scalable and fully unsupervised Remote Adaptive Continual Learning (RACL). + +Secondly, DUA establishes further local user adaptation of the model obtained from the server. Our domain adaptive approach considers the fact that user and server data distributions resemble two different domains, where we want to transfer domain knowledge from server to user domain. A particularly suitable domain adaptation approach is Adaptive Batch Normalization (AdaBN) [16], which simply collects Batch Normalization (BN) statistics from the target user data. Domain knowledge of the user is assumed to reside in these BN statistics, which can be retrieved at low computational cost and without any supervision. Consequently, this unsupervised setup can enhance any method to become (more) user-adaptive. + +The scope of this paper includes user adaptation within the continual learning paradigm, with threefold contributions in this unexplored setup: + +- We establish an inherently scalable and privacy-preserving Dual User-Adaptation framework (DUA), flexibly disentangling user adaptation from the server and local user device. +- We introduce a novel benchmark, specifically designed for the evaluation of locally adaptive models in an incremental learning setting. +- We provide empirical evidence supporting the validity of IMM mode-merging with unsupervised MAS importance weights, and find importance weights to depend on the model rather than data. + +Adapting to user data with RACL culminates in several advantages for both server and user. The server establishes a single sequence of $N$ task-specific models using IMM. As a consequence, independence is imposed on the typically excessive amount of users $L$ . Further, the continual learning setup enables the server to accumulate its knowledge with new arriving batches of data. Hence, this evades rebuilding the server knowledge base from scratch, which would impose time-consuming retraining and storage of all seen data. Moreover, storing one model per task instead of its training dataset results in enhanced storage requirements, especially when task data greatly exceeds model size. Additionally, users only share model parameter importance instead of their raw data, confining shared information to model-specific gradients. On top of that, users are not required to label local data as importance is measured in an unsupervised manner. However, when a subset of labeled user data is available, performance can be increased further by local user adaptation, as we will show later. + +# 2. Related Work + +The DUA framework introduces a new paradigm for user adaptation on the server, resembling federated learning [23], although completely overturning the purpose. Federated learning updates a common server model with an aggregated gradient from a distributed database, wherein each user constitutes a node providing local gradients. Similarly, DUA solely uses user-specific gradients to acquire better models, but attains decentralized user-personalized models, instead of a general trend-following model. Our framework invigorates profound overall user privacy, ensuring no sensible raw user data has to be shared, and additionally tackles the challenging issue of scalability for millions of personalized neural networks. + +Further, sequentially learning multiple tasks by finetuning a neural network results in significant loss of previously acquired knowledge. Literature on continual learning largely addresses coping with this catastrophic forgetting [5, 25]. Nonetheless, recent works mainly focus on supervised data, leaving the richness of available unsupervised user data unused. Following [5], these methods can be subdivided into three main categories. First, parameter-isolation methods preserve task knowledge by obtaining task-specific masks [22, 21, 31], or dynamically extending the architecture [30]. Replay methods preserve a subset of representative samples of the previous tasks, replayed during training of new tasks. These exemplars can be raw images [20, 2, 29], or virtual samples retrieved from task-specific generative models [32]. Rao et al. [28] extend virtual replay to a completely unsupervised setting based on variational autoencoders. However, this would require exhaustive training on the low capacity edge-device of the user, with only a limited set of available user data, hence infeas + +sible for user personalization. Finally, regularization-based methods impose a prior in the loss function when training the new task. Learning without forgetting (LwF) [17] minimizes a KL divergence prior to remain close to the new sample's output on the previous task model, hence distilling previous task knowledge [8]. Further work [27] extends this idea with task-specific autoencoders, additionally penalizing new task features to drift away from features deemed important for previous tasks. Elastic Weight Consolidation (EWC) [11] introduces a prior on previous-task parameters in a sequential Bayesian framework, Laplace approximated by a Gaussian with diagonally assumed Fisher information matrix (FIM) as precision. As the FIM is estimated in the task optimum, Zenke et al. [35] propose an online approach to estimate precision during training instead. Furthermore, the FIM relies on the loss gradient $\nabla \mathcal{L}$ , whereas MAS [1] sidesteps this supervised loss dependency by relying on the output gradient $\nabla F$ instead. IMM [15] differs from previously discussed methods in first preserving trained task models, which are subsequently merged using FIM importance weights or by averaging. + +For server user-adaptation in our DUA framework, multiple task-specific models are compressed into a single model. This is in the same vein to several other works. Chou et al. [4] merge two task-specific networks, subsequently finetuned with both task data. Although reduced training time is targeted, it remains unfit for scalable personalization, requiring raw user data and data of all tasks. Cheung et al. [3] superpose different models into a single one from which task-specific parameters can be retrieved. However, adapting models to users linearly increases training time. Another compression route distills knowledge [8] from teacher networks into smaller nets. Nevertheless, the focus of this work is model compression to achieve a smaller model for deployment, without addressing scalability to employ user personalization. + +Finally, deep domain adaptation introduces several unsupervised back-propagation based techniques [6, 19], with state-of-the-art introducing an adversarial loss during training [34, 9]. The unsupervised setting befits these methods for adaptation to unlabeled user data. However, user data is required during training, and therefore unscalable as each personalized model would require training from scratch. + +# 3. Methodology + +# 3.1. Dual User-Adaptation Framework + +A flexible framework should enable user-personalization both on the server and locally on the user edge-device. For this purpose, the novel Dual User-Adaptation framework (DUA) respectively divides user-personalization in two adaptation functions $\psi$ and $\phi$ . The key to optimal preservation of user privacy is that no raw user data is trans + +mitted. To achieve this in practice, interactions between user and server are typically encrypted. However, when encryption fails, our framework provides additional concealment of explicit user-data with $\psi$ . Further, adaptation on the server with $\psi$ should be scalable, as training personalized models from scratch would require tremendous resource time for the vast amount of interacting users. Ideally, both adaptation functions $\psi$ and $\phi$ favor unsupervised local adaptation to limit required user interactions. The DUA framework is surveyed in Figure 1, with its two user-adaptation phases elaborately discussed in the following. + +Server user-adaptation. Server $S$ has a set of task-specific expert models $\mathcal{M} = \{M_1, \dots, M_N\}$ , trained sequentially on a sequence of $N$ tasks from its typically labeled data $d_S$ . The Markov assumption holds for $\mathcal{M}$ , with each model depending only on current task data and previous task model, as parameters $\theta_{t+1}$ of model $M_{t+1}$ are initialized with $\theta_t$ . $\mathcal{M}$ is continuously extendable with new task models $M_{N+1}$ . + +$L$ users interact with $S$ , for which a user $l$ provides for each $M_{t}$ an obscured implicit prior $\psi (d_l,M_t)$ to the server, based on the local raw user-specific data $d_{l}$ . To prevent transmission of raw user data, the $\psi$ function uses a task-specific model $M_{t}$ and corresponding local data $d_{l}$ to extract concealed user-specific information. This ensures additional privacy safety, as the conveyed user prior is expressed by an implicit proxy, rather than the user data itself. Ideally, $\psi$ does this without local supervision of the user, as we discuss in Section 3.2. + +Once the server convokes all information in set $\Psi_{l} = \{\psi (d_{l},M_{t})|\forall M_{t}\in \mathcal{M}\}$ for user $l$ , aggregating function $\chi$ delivers the ultimate user-personalized model on the server $\hat{M}_l = \chi (\Psi_l,\mathcal{M})$ . + +Local user-adaptation. User $l$ receives $\hat{M}_l$ from the server on the edge device, which can be prone to further local adaptation function $\phi$ to accomplish the final model $M_l^* = \phi(d_l, \hat{M}_l)$ . As no data needs to be transmitted, the user can fully exploit its raw local data $d_l$ . However, local adaptation is limited in resources, inhibiting exhaustive training procedures for the model. Flexibility in this framework facilitates $\phi$ to further process an already personalized $\hat{M}_l$ as in the first DUA phase, or any general model without serverside personalization. This endows DUA to extend any method delivering a single model, with adaptation to the local user data $d_l$ as in Section 3.3. + +# 3.2. Unsupervised Server User-adaptation + +To enable the server to perform user-adaptation in the DUA framework, we first have to define how to constitute task experts in $\mathcal{M}$ , the user-adaptation function $\psi$ , and the aggregating function $\chi$ to establish the final personalized model $\hat{M}_l$ . This section explores opportunities in the challenging setup of task incremental continual learning, with + +![](images/63d8ef3235bfb3458f305f6f3570313902b39add3113a987b01dc32c98c18da2.jpg) +Figure 1: The Dual User-Adaptation framework (DUA): (1) server user-adaptation involves adaptation to local user data $d_{l}$ with $\psi$ for each model in $\mathcal{M}$ . Aggregating function $\chi$ incorporates all models $\mathcal{M}$ and resulting user priors $\Psi_{l}$ into single model $\hat{M}_{l}$ . (2) Local user-adaptation consists of adaptation function $\phi$ mapping $\hat{M}_{l}$ to the final personalized model $M_{l}^{*}$ . + +only data of the new task $T_{n}$ available, and inhibiting data access for previously learned tasks. This is particularly suited for the server, which can learn a new task, discard the new task data $D_{n}$ , and keep only the model $M_{n}$ to enable incremental learning for further tasks. Thus, server data $d_{S}$ at any point comprises only new task data distribution $D_{n}$ from which $(x_{i},y_{i};t_{n})$ is sampled, respectively constituting the image $x_{i}$ , label $y_{i}$ , and task index $t_{n}$ . + +The task experts in $\mathcal{M}$ and the aggregating function $\chi$ are defined following Lee et al. [15] with Incremental Moment Matching (IMM). Parameter uncertainty is introduced using the Bayesian framework, wherein incremental training of tasks results in a new task posterior after training. Task posteriors are presumed Gaussian, with the task sequence posterior aggregating these components in a mixture of Gaussians. Mode-IMM [15] Laplace approximates the mixture with a single Gaussian, and for this assumption to hold, a smooth and convex loss search space is required between the posterior means of the mixture components. Therefore, we adopt the weight and L2 transfer techniques proposed in [15], respectively initializing the network with previous task weights, and urging the new task optimum to remain close to the previous task optimum by L2-regularization. The aggregating function $\chi$ constitutes the mode of the final Laplace approximation of the Gaussian mixture with $N$ components, and is formalized by its mean + +$$ +\hat {\theta} _ {l} = \frac {1}{\hat {\Omega} _ {l}} \sum_ {t} ^ {N} \alpha_ {t} \Omega_ {t} \theta_ {t}, \tag {1} +$$ + +and precision + +$$ +\hat {\Omega} _ {l} = \sum_ {t} ^ {N} \alpha_ {t} \Omega_ {t}. \tag {2} +$$ + +for user $l$ , with precision $\Omega_t$ of task $T_t$ . Mixing ratio $\alpha_t$ weighs importance of task $T_t$ , subject to $\sum_{t}^{N}\alpha_{t} = 1$ . The + +balanced tasks in our experiments are deemed equally important. + +Further, the user adaptation function $\psi$ should produce an unsupervised implicit user prior from both the raw user data $d_{l}$ and a given model. Precision indicates the degree of parameter certainty, and therefore resembles a parameter importance measure. As this resembles an implicit prior, we define $\psi (d_l,M_t) = \Omega_t$ . Nonetheless, to estimate task precision $\Omega_t$ , mode-IMM employs the Fisher information matrix (FIM) similar to [11]. The FIM is constituted by second-order derivatives of the loss function, thus requiring labeled data. In contrast, to enable unsupervised importance measures, we exert MAS importance weights [1] based on the expected gradient of the L2-norm of the output function with respect to parameter $\theta_t^k$ , + +$$ +\Omega_ {t} ^ {k} = \mathbb {E} _ {x \sim D _ {t}} \left[ \frac {\nabla \| F (x ; \theta) \| _ {2} ^ {2}}{\delta \theta_ {t} ^ {k}} \right], \tag {3} +$$ + +with $D_{t} \in d_{l}$ the unlabeled user data distribution for which importance is measured. Aggregating mode-IMM and MAS importance weights constitutes Remote Adaptive Continual Learning (RACL) for server-side user-adaptation in the DUA framework. + +# 3.3. Unsupervised Local Domain Adaptation + +The second component enabling dual user-adaptation in the DUA framework is local adaptation function $\phi(d_l, \hat{M}_l)$ , constrained by limited resources on the edge device. For lightweight adaptation with $\phi$ , we could adapt to the user data statistics with Batch Normalization (BN) [10]. During training, each input feature $x_k$ of the BN layer is normalized to $\hat{x}_k$ using current batch statistics. Subsequently, scaling $\gamma_k$ and shift $\beta_k$ parameters are learned, producing the + +normalized output $y_{k}$ , with + +$$ +\hat {x} _ {k} = \frac {x _ {k} - \mathbb {E} [ x _ {k} ]}{\sqrt {\operatorname {V a r} [ x _ {k} ]}} \tag {4} +$$ + +$$ +y _ {k} = \gamma_ {k} \hat {x} _ {k} + \beta_ {k}. \tag {5} +$$ + +Whereas BN obtains global batch statistics of the training data for inference, Adaptive BN (AdaBN) [16] introduces an unsupervised scheme gathering batch statistics of the target domain data instead. The main idea is for domain knowledge to reside in the batch statistics, rather than the parameters to optimize. In our setup, the target domain is task-specific user data $d_{l}$ , enabling unsupervised user adaptation with AdaBN. + +Relaxing the constraint for unsupervised adaptation, we can assume a labeled subset in the user data. Although this would facilitate finetuning on the user device, the computation and storage limitations both restrain us from computing gradients for all network parameters. Alternatively, we extend AdaBN to this supervised setting (AdaBN-S), additionally training BN layer parameters $\gamma$ and $\beta$ for a few epochs, while freezing all remaining network parameters. This approach significantly reduces the number of trainable parameters compared to finetuning, scaling down computational effort by faster convergence and diminishing storage requirements for the gradients. + +# 4. User Personalization Benchmarks + +In order to evaluate the DUA framework, we need datasets mimicking user-specific data. Our experiments comprise three different data setups1. In all setups, the server data is split into training and validation sets with a ratio of 80/20, and user-data is split into equally sized evaluation and user-validation sets. User adaptation techniques such as importance weight estimation or user-specific fine-tuning solely access the user-validation subset, evading overfitting to the evaluation set or tuning on test data. + +Two setups are based on the MIT Indoor Scene recognition dataset (MITIS) [26], divided into tasks according to the five scene supercategories. Omitting supercategory 'work' as its extra data is too limited, the final task sequence is defined as {home, leisure, public, store}. All images have a minimal resolution of 200 pixels on the smallest axis, are randomly cropped and horizontally flipped during training, and then resized to $224 \times 224$ . MITIS training data is available to the server, following the continual learning paradigm in only providing access to current task data. Evaluation and extra MITIS data are divided over users in the following two schemes: + +1. Category Prior (CatPrior). Five users each prefer a random subset of 3 categories per task, acquiring for + +Figure 2: TransPrior user transformations following [7] with severeness three, including: spatters, elastic transformation, saturation, defocus blur, Gaussian noise, brightness, Gaussian blur, JPEG compression, contrast and impulse noise. + +![](images/26e483ea529087ac9250d33d993d74b1e915758ef656fdddd1ab573dd4afd6ec.jpg) + +each preference 250 extra MITIS images. The 20 evaluation images per category are equally divided over users. All user data is mutually exclusive. + +2. Transform Prior (TransPrior). Ten users each exhibit a different type of transform following [7] with perturbation severeness 3 (in range 1 to 5), permuting 1000 randomly sampled images from extra MITIS data, and all MITIS evaluation data. All user data prior to transformation is identical. See Figure 2 for examples of the ten types of transformed MITIS images. + +For all users, Monte Carlo Cross-validation over 5 iterations is performed over the extra MITIS user data, with priors remaining fixed. + +The third setup (Numbers) comprises handwritten digits from MNIST [14] and Street View House Numbers (SVHN) [24] data, divided into five tasks of two subsequent numbers as in $\{0,1\}$ to $\{8,9\}$ . MNIST comprises $28 \times 28$ images, with $32 \times 32$ SVHN images center-cropped to match this resolution. Server data is constituted by both MNIST and SVHN training data, and two users are each characterized by the evaluation data of MNIST and SVHN respectively. Results are averaged over three trained models, initialized with different seeds. + +# 5. Experiments + +# 5.1. Evaluation Setup + +Models. Experiments with both MITIS setups use AlexNet [12] and VGG11 [33] models, except for the BatchNorm experiments which are only applied to VGG11. Due to the small input size and simplicity of the Numbers benchmark, a small three-layer MLP with two hidden layers of 100 units suffices for this setup. For AlexNet and VGG11, we start from models pretrained on ImageNet, while the MLP model is trained from scratch. + +Table 1: Qualitatively comparing features: user-adaptive (Adapt.), unsupervised (Unsup.), scalable (Scal.) and privacy-preserving (Priv.). DUA subdivides adaptation on the server $(\psi)$ and local user device $(\phi)$ , with MAS importance weights discarding supervision. Scalability for user-adaptive methods implies training independent of the number of users $L$ . Shared user-data can be raw $d_{l}$ , gradients of the output function $F(x;\theta)$ or loss $\mathcal{L}(x,y;\theta)$ . All methods can be extended with unsupervised (AdaBN) and supervised (AdaBN-S) local user adaptation $\phi$ . + +
MethodAdapt.Unsup.Scal.Priv.
MAS-RACL✓(ψ)✓N∇F
FIM-RACL✓(ψ)N∇L
Task Experts✓N·Ldl
MAS-IMM✓N
FIM-IMMN
MAS✓N
EWCN
LWFN
JointN
+ AdaBN✓(φ)✓
+ AdaBN-S✓(φ)
+ +Evaluation. For all experiments, we report average accuracy and forgetting on the final model after training all tasks. Depending on the method, this final post-merging model is either user-specific or the general server model. Results are averaged over all users. + +Methods can be subdivided into user-specific and user-agnostic approaches. Table 1 summarizes all method features in our user-adaptive setting. + +User-Specific methods adapt to the local user-validation set of the user, resulting in a personalized model. + +1. MAS-RACL is our server user-adaptation method discussed in Section 3.2, merging task-specific IMM models on the server with unsupervised MAS importance weights obtained from the user-validation set. +2. FIM-RACL is a variant of MAS-RACL using the FIM as importance measure to merge the task-specific IMM models. The FIM is constituted by gradients of the loss, hence requiring labeled user data. This baseline serves as a performance reference for the MAS importance weights in MAS-RACL. +3. AdaBN adapts to the user BN statistics in an unsupervised fashion, only demanding one forward pass for all user-validation data (details in Section 3.3). +4. AdaBN-S collects batch statistics while training BN + +parameters for a few epochs, hence requiring supervision in the user-validation data (details in Section 3.3). + +5. Task Experts are obtained by finetuning each task-specific IMM server model on the raw user validation data for several epochs with low learning rate. This results in an ensemble of task-specific expert networks for each user. This is not scalable and should be regarded as an upper bound for user-specific models. + +User-Agnostic methods only access server training and validation data, and therefore are not adapted to the user. + +1. FIM-IMM trains a model per task, subsequently merged using a per-parameter importance measure estimated on the server validation data. Identical to mode-IMM in [15]. +2. MAS-IMM is a variant of FIM-IMM using MAS importance weights. +3. Joint training optimizes all tasks at once, accessing all task data simultaneously. This violates the continual learning setup, and is considered as a weak upper bound for performance. +4. EWC [11] preserves previous task knowledge using FIM-based importance weights. +5. MAS [1] instead uses the gradient of L2 norm of the output function to measure importance. +6. LwF [18] uses knowledge distillation with new task data outputs obtained from the previous task network. + +No gridsearches are performed for forgetting-related hyperparameters as the previous task data is assumed unavailable in the continual learning paradigm. Therefore, the recommended setting of the original works is used. Other hyperparameters are determined from best performance on the Joint baseline, yielding 30 and 10 epochs with a learning rate of $1e^{-3}$ , and batch size 30 and 20 for MITIS and Numbers respectively. After five epochs of unimproved validation accuracy, the learning rate anneals with a factor of 0.1, stopping early after five more subsequent inferior epochs. + +Table 2: Reporting average accuracy (forgetting) for IMM mode-merging with both unsupervised (MAS) and supervised (FIM) importance weights. + +
Data SetupModelMAS-IMMFIM-IMM
CatPriorAlexNet67.39 (0.73)67.42 (0.23)
VGG1176.77 (0.30)76.29 (0.43)
TransPriorAlexNet46.51 (-0.14)46.68 (-0.35)
VGG1153.49 (-0.17)53.14 (0.07)
NumbersMLP84.36 (-0.40)87.68 (0.07)
+ +Table 3: Left: Average accuracy (forgetting) for the three data setups and models, comparing user-specific (RACL) and user-agnostic (IMM) importance weights, both unsupervised (MAS-) and supervised (FIM-). RACL outperforming the corresponding IMM variant is indicated in bold. Right: Qualitatively comparing features user-adaptive (Adapt.), unsupervised (Unsup.), scalable (Scal.) and privacy-preserving (Priv.). + +
MethodAlexnetVGG11MLPAdapt.Unsup.Scal.Priv.
CatPriorTransPriorCatPriorTransPriorNumbers
MAS-RACL66.97 (0.88)47.04 (-0.27)77.32 (0.77)53.59 (-0.14)84.01 (-0.22)✓✓✓✓
MAS-IMM67.39 (0.73)46.51 (-0.14)76.77 (0.30)53.49 (-0.17)84.36 (-0.40)X✓✓✓
FIM-RACL67.20 (0.73)47.32 (-0.51)76.53 (0.68)53.73 (-0.13)87.83 (0.30)✓X✓✓
FIM-IMM67.42 (0.23)46.68 (-0.35)76.29 (0.43)53.14 (0.07)87.68 (0.07)XX✓✓
+ +# 5.2. Unsupervised Moment Matching + +The first experiment studies similarity in IMM mode-merging performance of the original supervised FIM, and the proposed unsupervised MAS importance weights. The results in Table 2 show similar performance for MAS-IMM and FIM-IMM. However, we observe a more salient discrepancy for the Numbers setup, where FIM attains $3.32\%$ higher average accuracy, despite $0.47\%$ increased forgetting. Analyzing importance weights, the first Numbers task $\{0,1\}$ results are an order of magnitude higher compared to subsequent tasks in the sequence. By contrast, FIM importance weights obtain the same order of magnitude over all tasks. As a consequence, MAS importance outweighs stability in first task knowledge, but deteriorating adaptation to new tasks. Further, the Numbers MLP model with few parameters is trained from scratch, with the first task learning only a limited set of discriminating features. The output function magnitude depends only on the features learned for this binary task, and especially the limited MLP network size implies greater output function sensitivity to changes in the intermediate features, which may be substantial when learning the second task. In contrast, the AlexNet and VGG networks initialize the network with an output function depending on vast Imagenet pretraining. In conclusion, the MAS importance measure provides competitive outcomes, especially for the setups with pretrained networks. + +# 5.3. Locally Adapting to the User + +As the MAS importance weights empirically prove a valid alternative precision measure for mode-merging in IMM, we can now adapt to local user data $d_{l}$ in an unsupervised fashion. Table 3 reports average accuracy over all users for both user-specific and user-agnostic importance weights. The majority of locally estimated importance weights of RACL results in small improvements. The benefit of locally adapting to the user seems minimal. + +To better understand why this is the case, we further scrutinize data dependency of importance weights measuring Pearson correlation $\rho$ . In Figure 3 we consider user + +validation data of two CatPrior tasks 'home' $(D_{1})$ and 'leisure' $(D_{2})$ . Both tasks have corresponding optimized server models $M_{1}$ and $M_{2}$ , for which our original task incremental setup calculates the importance weights. In contrast, for this analysis we compare importance weight correlation for both datasets on the same model, resulting in correlation coefficients 0.82 and 0.73 for $M_{1}$ and $M_{2}$ respectively (see Figure 3 (a) and (b)). This high correlation implies limited dependence of the importance weights on the data. Next, we compare correlation for the same dataset, yet calculated on the two different models. Correlations for $D_{1}$ and $D_{2}$ yield 0.55 and 0.58, which is significantly lower, hence indicating higher dependence on the model (see Table 3 (c) and (d)). In conclusion, importance weights represent parameter importance within the specific model rather than the data they are estimated from. As a result, there is little to be gained by estimating them on user-specific data. + +# 5.4. Adapting to the User Domain + +Borrowing ideas from domain adaptation, we can extend any method to become user-specific (see Table 1). For this experiment, we employ the VGG11 model from previous experiments interspersed with BN layers after each block of convolutional and ReLU activation layers (VGG11-BN). Table 4 shows results for the CatPrior and TransPrior setups. Note that Task Experts inherently adapts BN parameters of the VGG model, as it finetunes to the user data $d_{l}$ . In general, the unsupervised AdaBN mainly exhibits limited gain for RACL, and seems ineffective for the remaining continual learning methods. In contrast, the supervised variant AdaBN-S consistently outperforms user-agnostic BN, with an average gain of $2.64\%$ and $3.44\%$ accuracy in CatPrior and TransPrior setups respectively. The discrepancy between AdaBN and AdaBN-S performance discloses unsupervised adaptation to remain a challenging open problem. Remarkably, Joint training with VGG11-BN performs worse than VGG11 results without BN in Table 3. This seems related to overfitting with an observed $10\%$ increase in discrepancy between training and validation accuracy. + +![](images/7235ad7903805d939b84e57d60758bd5ff7fc7587ff67c4748921382d24d5d12.jpg) +Figure 3: Visualizing user importance weight correlation $\rho$ in the CatPrior setup, for the first two tasks. Blue and orange represent weight and bias importance weights respectively. (a) and (b) each compare importance weights of different task data on the same task-specific model, whereas (c) and (d) each use the same data on the two task-specific models. +$\rho = 0.82$ + +![](images/84fe505de27f98b9607959cd8781d3f24a4e1265ba67e6f31c01ddaa54eda62c.jpg) +(a) $M_1 - D_1\mathrm{vs}D_2$ +(b) $M_2 - D_1\mathrm{vs}D_2$ +$\rho = 0.73$ + +![](images/cf9c739d527c1d685acbf8ee42950d4cf88c605feb3ca7f6c0a229d57424169e.jpg) +(c) $M_{1}$ vs $M_2 - D_1$ +$\rho = 0.55$ + +![](images/4a80bb8ea12c27e76acdd8a42f14bfaa8504e8937f23105d2ed861eb048c2167.jpg) +(d) $M_{1}$ vs $M_2 - D_2$ +$\rho = 0.58$ + +Table 4: Results in the CatPrior and TransPrior setups with model VGG11-BN, comparing batch normalization on the server data (BN) with unsupervised (AdaBN) and supervised (AdaBN-S) user-adaptive variants. + +
MethodCatPriorTransPrior
BNAdaBNAdaBN-SBNAdaBNAdaBN-S
MAS-RACL58.05 (2.74)58.30 (2.34)60.68 (2.67)30.14 (2.69)30.19 (2.50)32.82 (3.25)
FIM-RACL59.58 (2.14)59.71 (1.61)62.43 (1.84)32.15 (1.53)32.04 (1.33)34.80 (2.13)
Task Experts80.78 (5.61)n/an/a68.22 (11.35)n/an/a
MAS-IMM55.55 (2.69)55.89 (2.69)58.87 (2.81)29.36 (2.63)29.15 (2.45)31.73 (3.22)
FIM-IMM61.50 (-0.03)61.35 (-0.46)63.99 (-0.16)32.08 (1.32)31.86 (1.21)34.48 (2.05)
MAS65.58 (3.96)64.15 (4.04)67.10 (4.66)37.32 (2.64)35.64 (2.88)40.51 (2.69)
EWC66.20 (2.88)64.03 (3.43)67.54 (3.90)37.16 (2.85)35.44 (3.12)40.05 (3.18)
LWF70.76 (0.73)70.37 (0.43)72.73 (1.03)40.22 (0.43)39.51 (0.12)43.07 (0.52)
Joint75.75 (n/a)72.13 (n/a)76.39 (n/a)46.53 (n/a)41.18 (n/a)48.50 (n/a)
+ +By normalizing over batch statistics, BN layers alleviate the internal covariance shift in the network. For a network prone to overfitting due to few data, this internal covariance shift might instead introduce regularizing noise in the batch, interfering optimization to overfit the training data. In this respect, even though the server presents a plausibly overfitted model, adaptation to the user domain remains efficacious with AdaBN-S. Furthermore, the effects of BN on continual learning methods still urge further elicitation, as it is mainly disregarded in current state-of-the-art [5, 25]. + +In conclusion, unsupervised adaptation with AdaBN exhibits cumbersome adaptation to the user domain, although gaining significant improvement with a subset of labeled data in AdaBN-S. + +# 6. Conclusion + +In this work, we proposed a practical Dual User-Adaptation framework (DUA) to tackle incremental domain adaptation to real-life scenarios with numerous users. This novel user-adaptation paradigm disentangles personalization to both the server and local user device, and combines + +desirable user privacy and scalability properties, which remain highly unexplored in literature. We devised benchmarks to scrutinize both types of user-adaptation. + +First, adapting models on the server following RACL incurs these scalability, privacy, and additional supervision properties, yet in practice yielded only marginal improvement over a user-agnostic model, due to gradient-based importance weights being largely data independent. + +Second, local user-adaptation with a data regularization approach based on adaptive Batch Normalization (AdaBN), and especially its supervised variant (AdaBN-S), seem more promising, leading to systematic improvements when taking advantage of labeled user-specific data. + +User privacy and experience are of major concern, for which our DUA framework forges a principled foundation for dual user-adaptation, aspiring to promote further research in this direction. + +# Acknowledgements + +The authors would like to thank Huawei for funding this research as part of the HIRP Open project. + +# References + +[1] Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars. Memory aware synapses: Learning what (not) to forget. In Proceedings of the European Conference on Computer Vision (ECCV), pages 139-154, 2018. 2, 3, 4, 6 +[2] Arslan Chaudhry, Marc'Aurelio Ranzato, Marcus Rohrbach, and Mohamed Elhoseiny. Efficient lifelong learning with AGEM. In ICLR, 2019. 2 +[3] Brian Cheung, Alex Terekhov, Yubei Chen, Pulkit Agrawal, and Bruno Olshausen. Superposition of many models into one. arXiv preprint arXiv:1902.05522, 2019. 3 +[4] Yi-Min Chou, Yi-Ming Chan, Jia-Hong Lee, Chih-Yi Chiu, and Chu-Song Chen. Unifying and merging well-trained deep neural networks for inference stage. arXiv preprint arXiv:1805.04980, 2018. 3 +[5] Matthias De Lange, Rahaf Aljundi, Marc Masana, Sarah Parisot, Xu Jia, Ales Leonardis, Gregory Slabaugh, and Tinne Tuytelaars. Continual learning: A comparative study on how to defy forgetting in classification tasks. arXiv preprint arXiv:1909.08383, 2019. 2, 8 +[6] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. arXiv preprint arXiv:1409.7495, 2014. 3 +[7] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. arXiv preprint arXiv:1903.12261, 2019. 5 +[8] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. 3 +[9] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei A Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. arXiv preprint arXiv:1711.03213, 2017. 3 +[10] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. 4 +[11] James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 114(13):3521-3526, 2017. 3, 4, 6 +[12] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097-1105, 2012. 5 +[13] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436-444, 2015. 1 +[14] Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010. 5 +[15] Sang-Woo Lee, Jin-Hwa Kim, Jaehyun Jun, Jung-Woo Ha, and Byoung-Tak Zhang. Overcoming catastrophic forgetting by incremental moment matching. In Advances in neural information processing systems, pages 4652-4662, 2017. 2, 3, 4, 6 + +[16] Yanghao Li, Naiyan Wang, Jianping Shi, Jiaying Liu, and Xiaodi Hou. Revisiting batch normalization for practical domain adaptation. arXiv preprint arXiv:1603.04779, 2016. 2, 5 +[17] Zhizhong Li and Derek Hoiem. Learning without forgetting. In ECCV, pages 614-629. Springer, 2016. 3 +[18] Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE transactions on pattern analysis and machine intelligence, 40(12):2935-2947, 2017. 6 +[19] Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I Jordan. Unsupervised domain adaptation with residual transfer networks. In Advances in Neural Information Processing Systems, pages 136-144, 2016. 3 +[20] David Lopez-Paz et al. Gradient episodic memory for continual learning. In NeurIPS, pages 6470-6479, 2017. 2 +[21] Arun Mallya, Dillon Davis, and Svetlana Lazebnik. Piggyback: Adapting a single network to multiple tasks by learning to mask weights. In ECCV, pages 67-82, 2018. 2 +[22] Arun Mallya and Svetlana Lazebnik. Packnet: Adding multiple tasks to a single network by iterative pruning. In CVPR, pages 7765-7773, 2018. 2 +[23] H Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, et al. Communication-efficient learning of deep networks from decentralized data. arXiv preprint arXiv:1602.05629, 2016. 2 +[24] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011. 5 +[25] German I Parisi, Ronald Kemker, Jose L Part, Christopher Kanan, and Stefan Wermter. Continual lifelong learning with neural networks: A review. Neural Networks, 2019. 2, 8 +[26] Ariadna Quattoni and Antonio Torralba. Recognizing indoor scenes. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 413-420. IEEE, 2009. 5 +[27] Amal Rannen, Rahaf Aljundi, Matthew B Blaschko, and Tinne Tuytelaars. Encoder based lifelong learning. In ICCV, pages 1320-1328, 2017. 3 +[28] Dushyant Rao, Francesco Visin, Andrei Rusu, Razvan Pascanu, Yee Whye Teh, and Raia Hadsell. Continual unsupervised representation learning. In Advances in Neural Information Processing Systems, pages 7645-7655, 2019. 2 +[29] Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H Lampert. icarl: Incremental classifier and representation learning. In CVPR, pages 2001–2010, 2017. 2 +[30] Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016. 2 +[31] Joan Serra, Dídac Surís, Marius Miron, and Alexandros Karatzoglou. Overcoming catastrophic forgetting with hard attention to the task. arXiv preprint arXiv:1801.01423, 2018. 2 +[32] Hanul Shin, Jung Kwon Lee, Jaehong Kim, and Jiwon Kim. Continual learning with deep generative replay. In NeurIPS, pages 2990-2999, 2017. 2 + +[33] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 5 +[34] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7167-7176, 2017. 3 +[35] Friedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 3987-3995. JMLR.org, 2017. 3 \ No newline at end of file diff --git a/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/images.zip b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1abcf4e8cb71a1f1726b6b648fdc17dccd7f0414 --- /dev/null +++ b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fda73dbb7c359244e0bc8c065fb96ff1f81b3e9adeec4846a9f8e51f5436911 +size 371688 diff --git a/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/layout.json b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8d0686052e5416c164418f5f226efc2713b3048f --- /dev/null +++ b/unsupervisedmodelpersonalizationwhilepreservingprivacyandscalabilityanopenproblem/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90c91eaab9aa2e4b7fbeef866949a906fed65587757eba96b83af70123b1fd40 +size 390224 diff --git a/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/af513053-0d3a-4a79-a924-f6132f8e5f3b_content_list.json b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/af513053-0d3a-4a79-a924-f6132f8e5f3b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..59262494f6709dc0ca7f369b249e475e14d05ef7 --- /dev/null +++ b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/af513053-0d3a-4a79-a924-f6132f8e5f3b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30d3ec99918e9d7677446815ebdcb2522f3cca59c74987118e7bd4b78bc8eec4 +size 78410 diff --git a/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/af513053-0d3a-4a79-a924-f6132f8e5f3b_model.json b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/af513053-0d3a-4a79-a924-f6132f8e5f3b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7ef6c1c7e91cfe9e69f72dbfccad1920b705db2c --- /dev/null +++ b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/af513053-0d3a-4a79-a924-f6132f8e5f3b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d72dd92b85a9168f61ec8d078fdc3e30f95772844f3931613dcaae39837e530 +size 97303 diff --git a/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/af513053-0d3a-4a79-a924-f6132f8e5f3b_origin.pdf b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/af513053-0d3a-4a79-a924-f6132f8e5f3b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..47cb0a5b44b068ee0270ff3d04b1000bbfbe5f08 --- /dev/null +++ b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/af513053-0d3a-4a79-a924-f6132f8e5f3b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:931c8877c5d82d40267c91a37255c0ce49bade7a49189095a83b225fbbf79369 +size 822860 diff --git a/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/full.md b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..06f71cf3be28c499d098ecafcacde44da91bf1bd --- /dev/null +++ b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/full.md @@ -0,0 +1,338 @@ +# Unsupervised Multi-Modal Image Registration via Geometry Preserving Image-to-Image Translation + +Moab Arar Yiftach Ginger Dov Danon Amit H. Bermano Daniel Cohen-Or Tel Aviv University + +# Abstract + +Many applications, such as autonomous driving, heavily rely on multi-modal data where spatial alignment between the modalities is required. Most multi-modal registration methods struggle computing the spatial correspondence between the images using prevalent cross-modality similarity measures. In this work, we bypass the difficulties of developing cross-modality similarity measures, by training an image-to-image translation network on the two input modalities. This learned translation allows training the registration network using simple and reliable mono-modality metrics. We perform multi-modal registration using two networks - a spatial transformation network and a translation network. We show that by encouraging our translation network to be geometry preserving, we manage to train an accurate spatial transformation network. Compared to state-of-the-art multi-modal methods our presented method is unsupervised, requiring no pairs of aligned modalities for training, and can be adapted to any pair of modalities. We evaluate our method quantitatively and qualitatively on commercial datasets, showing that it performs well on several modalities and achieves accurate alignment. + +# 1. Introduction + +Scene acquisition using different sensors is common practice in various disciplines, from classical ones such as medical imaging and remote sensing, to emerging tasks such as autonomous driving. Multi-modal sensors allow gathering a wide range of physical properties, which in turn yields richer scene representations. For example, in radiation planning, multi-modal data (e.g. Computed Tomography (CT) and Magnetic Resonance Imaging (MRI) scans) is used for more accurate tumor contouring which reduces the risk of damaging healthy tissues in radiotherapy treatment [25, 29]. More often than not, multi-modal sensors naturally have different extrinsic parameters between modalities, such as lens parameters and relative position. In these cases, non-rigid image registration is essential for proper execution of the aforementioned downstream tasks. + +![](images/d9ef32a5af6be1566e32d16659ecfe54b03d516f0377c86d7a70ec618d962fbc.jpg) +Figure 1: Method overview. Conventional methods (faded dashed at the bottom) use cross-modality metrics (e.g., Normalized Cross Correlation) to optimize a spatial transformation function. Our method learns a cross-modality translation, mapping between the two modalities. This enables the use of a reliable accurate mono-modality metric instead. + +Classic multi-modal image registration techniques attempt to warp a source image to match a target one via a non-linear optimization process, seeking to maximize a predefined similarity measure [40]. Besides a computational disadvantage, which is critical for applications such as autonomous driving, effectively designing similarity measures for such optimization has proven to be quite challenging. This is true for both intensity-based measures, commonly used in the medical imaging [10], and feature-based ones, typically adapted for more detailed modalities (e.g. Near Infra-Red (NIR) and RGB) [32]. + +These difficulties gave rise to the recent development of deep regression models. These types of models typically have lengthy training time, either supervised or unsupervised, yet they offer expeditious inference that usually generalizes well. Since it is extremely hard to collect ground-truth data for the registration parameters, supervised multimodal registration methods commonly use synthesized data in order to train a registration network [30, 37]. This makes their robustness highly dependent on the similarity between the artificial and real-life data distribution and appearance. Unsupervised registration techniques, on the other hand, often incorporate a spatial transform network (STN) [14] and train an end-to-end network [7, 19, 16, 36, 8]. + +Typically, such approaches optimize an STN by comparing the deformed image and the target one using simple similarity metrics such as pixel-wise Mean Squared Error (MSE) [31, 33, 6]. Of course, such approaches can only be used in mono-modality settings and become irrelevant for multi-modality settings. To overcome this limitation, unsupervised multi-modal registration networks use statistics-based similarity metrics, particularly, (Normalized) Mutual Information ((N)MI) [22], Normalized Cross Correlation (NCC) [5], or Structural Similarity Index Metric (SSIM) [21, 22] (see Figure 1, faded dashed path). However, these metrics are either computationally intractable (e.g., MI) [3] and hence cannot be used in gradient-based methods, or are domain-dependent (e.g., NCC), failing to generalize for all modalities. + +In this paper, we present an unsupervised method for multi-modal registration. In our work, we exploit the celebrated success of Multi-Modal Image Translation [13, 38, 39, 12], and simultaneously learn multi-modal translation and spatial registration. The key idea is to alleviate the shortcomings of a hand-crafted similarity measure by training an image-to-image translation network $T$ on two given modalities. This in turn will let us use mono-modality metrics for evaluating our registration network $R$ (see Figure 1, vivid path on the top). + +The main challenge for this approach is to train the registration network $R$ and the translation network $T$ simultaneously, while encouraging $T$ to be geometry preserving. This ensures that the two networks are task-specific — $T$ performs only a photo-metric mapping, while $R$ learns the geometric transformation required for the registration task. In our work, we use the concepts of generative adversarial networks (GAN [9, 24]) to train $T$ and $R$ . We show that the adversarial training is not only necessary for the translation task (as shown in previous works [13]), but is also necessary to produce smooth and accurate spatial transformation. We evaluate our method on real commercial data, and demonstrate its strength with a series of studies. + +The main contributions of our work are: + +- An unsupervised method for multi-modal image registration. +- A geometry preserving translation network that allows the application of mono-modality metrics in multimodal registration. +- A training scheme that encourages a generator to be geometry preserving. + +# 2. Related Works + +To deal with the photo-metric difference between modalities, unsupervised multi-modal approaches are forced to find the correlation between the different domains and use it + +to guide their learning process. In [21] a vanilla CycleGAN architecture is used to regularize a deformation mapping. This is achieved by training a discriminator network to distinguish between deformed and real images. To align a pair of images the entire network needs to be trained in a single pass. Training this network on a large dataset will encourage the deformation mapping to become an identity mapping. This is because the discriminator is given only the real and deformed images. Furthermore the authors use multiple cross-modality similarity metrics including SSIM, NCC and NMI which are limited by the compatibility of the specific modalities used. In contrast, our method learns from a large dataset and bypasses the need for cross-modality similarity metrics. + +Wang et al. [36] attempt to bypass the need for domain translation by learning an Encoder-Decoder module to create modality-independent features. The features are fed to an STN to learn affine and non-rigid transformations. The authors train their network using a simple similarity measure (MSE) which maintains local similarity, but does not enforce global fidelity. + +At the other extreme, [8] rely entirely on an adversarial loss function. They train a regular U-Net based STN by giving the resultant registered images to a discriminator network and using its feedback as the STN's loss function. By relying solely on the discriminator network for guiding the training, they lose the ability to enforce local coherence between the registered and target images. + +Closest to our work, [27] combines an adversarial loss with similarity measurements in an effort to register the images properly while concentrating on maintaining local geometric properties. They encode the inputs into two separate embedding, one for shape and one for content information, and train a registration network on these disentangled embedding. This method relies on learned disentanglement, which introduces inconsistencies on the local level. Our method directly enforces the similarity in the image space, which leads to a reliable local signal. + +# 3. Overview + +Our core idea is to learn the translation between the two modalities, rather than using a cross-modality metric. This novel approach is illustrated in Figure 1. The spatially transformed image is translated by a learnable network. The translated image can then be compared to the original source image using a simple uni-modality metric, bypassing the need to use a cross-modality metric. The advantage of using a learnable translation network is that it generalizes and adapts to any pairs of given modalities. + +Our registration network consists of two components: (i) a spatial transformation network $R = (R_{\Phi}, R_{S})$ and (ii) an image-to-image translation network $T$ . The two components are trained simultaneously using two training flows + +![](images/bf92bd2926ae4fa1e555b730d5a2a869516cd5d0d00caed9e3d8379cadcabeff.jpg) +(a) Deformation Field Generation + +![](images/76a7d9d9771628f805f9aa05bc0b744c28728b19ddca31c1ad7267e48b7099bd.jpg) +(b) Register First + +![](images/69c329701609bc8a258d5421caf67264bb4c044f3020ff7e00d25e6fdd903ad9.jpg) +(c) Translate First +Figure 2: Training Flow Overview. We train two components: (i) a spatial transformation network (STN) $R = (R_{\Phi}, R_{S})$ and (ii) an image-to-image translation network $T$ . The two networks $R$ and $T$ are jointly trained via two different training flows. The two training flows are simultaneously carried-out in each training step. In the first flow, (b) Register First, the input image $I_{a}$ is deformed using $\phi$ , a deformation field generated by $R_{\Phi}$ , and is then fed to $T$ to map the image onto domain B. The second flow, (c) Translate First, is similar with the exception that $\phi$ is used to transform the translated source image. In both cases, the same deformation field $\phi$ is used. + +as depicted in Figure 2. The spatial transformation network takes the two input images and yields a deformation field $\phi$ . The field is the then applied either before $T$ (Figure 2b) or after it (Figure 2c). Specifically, the field is generated using a network $R_{\Phi}$ and is used by a re-sampling layer $R_{S}$ to get the transformed image, namely $R_{S}(T(a),\phi)$ and $T(R_{S}(a,\phi))$ . We will elaborate on these two training schemes in Section 4.2. The key is, as we shall show, that such two-flow training encourages $T$ to be geometry preserving, which implies that all the geometry transformation is encoded in $R_{\Phi}$ . + +Once trained, only the spatial transformation network $R$ is used in test time. The network takes two images $I_{a}$ and $I_{b}$ representing the same scene, captured from slightly different viewpoint, in two different modalities, $A$ and $B$ , respectively, and aligns $I_{a}$ with $I_{b}$ . + +# 4. Method + +Our goal is to learn a non-rigid spatial transformation which aligns two images from different domains. Let $\mathcal{A} \subset \mathbb{R}^{H_A \times W_A \times C_A}$ and $\mathcal{B} \subset \mathbb{R}^{H_B \times W_B \times C_B}$ be two paired image domains, where $H_D, W_D, C_D$ are the height, width, and number of channels for domain $\mathcal{D}$ , respectively. Pairing means that for each image $I_a \in \mathcal{A}$ there exists a unique image $I_b \in \mathcal{B}$ representing the same scene, as acquired by the different respective sensors. Note that the pairing assumption is a common and reasonable one, since more often than + +not registration-base applications involve taking an image of the same scene from both modality sensors (e.g satellite images). Throughout this section, we let $I_{a} \in \mathcal{A}$ and $I_{b} \in \mathcal{B}$ be a pair of two images such that $I_{a}$ needs to be aligned with $I_{b}$ . + +To achieve this alignment, we train three learnable components: (i) a registration network $R$ , (ii) a translation network $T$ and (iii) a discriminator $D$ . The three networks are trained using an adversarial model [9, 24], where $R$ and $T$ are jointly trained to outwit $D$ . Below, we describe the design and objectives of each network. + +# 4.1. Registration Network + +Our registration network $(R = (R_{\Phi}, R_S))$ is a spatial transformation network (STN) composed of a fully convolutional network $R_{\Phi}$ and a re-sampler layer $R_S$ . The transformation we apply is a non-linear dense deformation - allowing non-uniform mapping between the images and hence gives accurate results. Next we give an in-depth description about each component. + +$\mathbf{R}_{\Phi}$ - Deformation Field Generator: The network takes two input images, $I_{a}$ and $I_{b}$ , and produces a deformation field $\phi = R(I_{a}, I_{b})$ describing how to non-rigidly align $I_{a}$ to $I_{b}$ . The field is an $H_{A} \times W_{A}$ matrix of 2-dimensional vectors, indicating the deformation direction for each pixel $(i, j)$ in the input image $I_{a}$ . +$\mathbf{R}_{\mathrm{S}}$ - Re-sampling Layer: This layer receives the deformation field $\phi$ , produced by $R_{\Phi}$ , and applies it on a + +source image $I_{s}$ . Here, the source image is not necessarily $I_{a}$ and it could be from either domains - $\mathcal{A}$ or $\mathcal{B}$ . Specifically, the value of the transformed image $R_{S}(I_{s},\phi)$ at pixel $\mathbf{v} = (i,j)$ is given by Equation 1: + +$$ +R _ {S} \left(I _ {s}, \phi\right) [ v ] = I _ {s} \left[ \mathbf {v} + \phi (\mathbf {v}) \right], \tag {1} +$$ + +where $\phi (\mathbf{v}) = (\Delta y,\Delta x)$ is the deformation generated by $R_{\Phi}$ at pixel $\mathbf{v} = (i,j)$ , in the $x$ and $y$ -directions, respectively. + +To avoid overly distorting the deformed image $R_{S}(I_{s},\phi)$ we restrict $R_{\Phi}$ from producing non-smooth deformations. We adapt a common regularization term that is used to produce smooth deformations. In particular, the regularization loss will encourage neighboring pixels to have similar deformations. Formally, we seek to have small values of the first order gradients of $\phi$ , hence the loss at pixel $\mathbf{v} = (i,j)$ is then given by: + +$$ +\mathcal {L} _ {\text {s m o o t h}} (\phi , \mathbf {v}) = \sum_ {\mathbf {u} \in N (\mathbf {v})} B (\mathbf {u}, \mathbf {v}) \| \phi (\mathbf {u}) - \phi (\mathbf {v}) \|, \tag {2} +$$ + +where $N(\mathbf{v})$ is a set of neighbors of the pixel $\mathbf{v}$ , and $B(\mathbf{u},\mathbf{v})$ is a bilateral filter [34] used to reduce oversmoothing. Let $O_{s} = R_{S}(I_{s},\phi)$ to be the deformed image produced by $R_{S}$ on input $I_{s}$ , then the bilateral filter is given by: + +$$ +B (\mathbf {u}, \mathbf {v}) = e ^ {- \alpha \cdot \| O _ {s} [ \mathbf {u} ] - O _ {s} [ \mathbf {v} ] \|}. \tag {3} +$$ + +There are two important notes about the bilateral filter $B$ in Equation 3. First, the bilateral filtering is with respect to the transformed image $O_{s}$ (at each forward pass), and secondly, the term $B(I_s,\mathbf{u},\mathbf{v})$ is a treated as constant (at each backward pass). The latter is important to avoid $R_{\Phi}$ alternating pixel values so that $B(u,v)\approx 0$ (e.g., it could change pixels so that $\| O_s[\mathbf{u}] - O_s[\mathbf{v}]\|$ is relatively large), while the former allows better exploration of the solution space. + +In our experiments we look at the $3 \times 3$ neighborhood of $\mathbf{v}$ , and set $\alpha = 1$ . The overall smoothness loss of the network $R$ , denoted by $\mathcal{L}_{smooth}(R)$ , is the mean value over all pixels $\mathbf{v} \in \{1, \dots, H_A\} \times \{1, \dots, W_A\}$ . + +# 4.2. Geometric Preserving Translation Network + +A key challenge of our work is to train the image-to-image translation network $T$ to be geometric preserving. If $T$ is geometric preserving, it implies that it only performs photo-metric mapping, and as a consequence the registration task is performed solely by the registration network $R$ . However, during our experiments, we observed that $T$ tends to generate fake images that are spatially aligned with the ground truth image, regardless of $R$ 's accuracy. + +To avoid this, we could restrict $T$ from performing any spatial alignment by reducing its capacity (number of layers). While we did observe that reducing $T$ 's capacity does + +improve our registration network's performance, it still limits the registration network from doing all the registration task (See supplementary materials). + +To implicitly encourage $T$ to be geometric preserving we require that $T$ and $R$ are commutative, i.e., $T \circ R = R \circ T$ . In the following we formally define both $T \circ R$ and $R \circ T$ : + +Translation First - $(\mathbf{R} \circ \mathbf{T})(\mathbf{I}_{\mathbf{a}}, \mathbf{I}_{\mathbf{b}})$ : This mapping first applies an image-to-image translation on $I_{a}$ and then a spatial transformation on the translated image. Specifically, the final image is obtained by first applying $T$ on $I_{a}$ , which generates a fake sample $O_{T} = T(I_{a})$ . Then we apply our spatial transformation network $R$ on $O_{T}$ and get the final output: + +$$ +O _ {R T} = R _ {S} \left(O _ {T}, \phi\right) = R \left(T \left(I _ {a}\right), R _ {\Phi} \left(I _ {a}, I _ {b}\right)\right). +$$ + +Register First - $(\mathbf{T} \circ \mathbf{R})(\mathbf{I}_{\mathbf{a}}, \mathbf{I}_{\mathbf{b}})$ in this composition, we first apply spatial transformation on $I_{a}$ and obtain a deformed image $O_{R} = R(I_{a}, \phi)$ . Then, we translate $O_{R}$ to domain $\mathcal{B}$ using our translation network $T$ : + +$$ +O _ {T R} = T \left(R _ {S} \left(I _ {a}, \phi\right)\right) = T \left(R _ {S} \left(I _ {a}, R _ {\Phi} \left(I _ {a}, I _ {b}\right)\right)\right). +$$ + +Note that in both compositions (i.e., $T \circ R$ and $R \circ T$ ), the deformation field, used by the re-sampler $R_{S}$ , is given by $R_{\Phi}(I_a, I_b)$ . The only difference is in the source image from which we re-sample the deformed image. + +To understand why this training scheme gives the desired property, note that the translation network $T$ is fed geometrically different input images. Namely, these are the input image $I_{a}$ (in the translation first variant) and the spatially transformed version of that image $R_{S}(I_{a},R_{\Phi}(I_{a},I_{b}))$ (in the registration first scheme). Thus, $T$ is encouraged to be geometry preserving, since we expect similar behavior for different inputs. Additionally, note that $T$ has limited capacity to perform explicit geometric transformation (as it isn't designated for this task). The registration network $R$ , on the other hand, is designed to be exactly the opposite - it naturally supports geometric deformations, and struggles with stylistic and appearance-based alterations. + +Throughout this section, we refer to $O_{RT}$ and $O_{TR}$ as the outputs of $R \circ T$ and $T \circ R$ , respectively. + +# 4.3. Training Losses + +To train $R$ and $T$ to generate fake samples that are similar to those in domain $\mathcal{B}$ , we use an L1-reconstruction loss: + +$$ +\mathcal {L} _ {r e c o n} (T, R) = \left\| O _ {R T} - I _ {b} \right\| _ {1} + \left\| O _ {T R} - I _ {b} \right\| _ {1} \quad (4) +$$ + +where minimizing the above implies that $T \circ R \approx R \circ T$ . + +We use conditional GAN (cGAN)[24] as our adversarial loss for training $D$ , $T$ and $R$ . The objective of the adversarial network $D$ is to discriminate between real and fake + +samples, while $T$ and $R$ are jointly trained to fool the discriminator. The cGAN loss for $T \circ R$ and $R \circ T$ is formulated below: + +$$ +\begin{array}{l} \mathcal {L} _ {c G A N} (T, R, D) = \mathbb {E} [ \log (D (I _ {b}, I _ {a})) ] \\ + \mathbb {E} [ \log (1 - D (O _ {R T}, I _ {a})) ] \tag {5} \\ + \mathbb {E} \left[ \log \left(1 - D \left(O _ {T R}, I _ {a}\right)\right) \right], \\ \end{array} +$$ + +The total objective is given by: + +$$ +\begin{array}{l} \mathcal {L} (T, R) = \underset {D} {\arg \max } \mathcal {L} _ {c G A N} (T, D, R) \tag {6} \\ + \lambda_ {R} \cdot \mathcal {L} _ {\text {r e c o n}} (T, R) + \lambda_ {S} \cdot \mathcal {L} _ {\text {s m o o t h}} (R), \\ \end{array} +$$ + +where we are opt to find $T^{*}$ and $R^{*}$ such that $T^{*}, R^{*} = \operatorname*{arg min}_{R, T} \mathcal{L}(T, R)$ . Furthermore, in our experiments, we set + +$\lambda_{R} = 100$ and $\lambda_{S} = 200$ + +# 4.4. Implementation Details + +Our code is implemented using PyTorch 1.1.0 [26] and is based on the framework and implementation of Pix2Pix [13], CycleGAN [38] and BiCycleGAN [39]. The network $T$ is an encoder-decoder network with residual connections [1, 15] and the registration network is U-NET based [28] with residual connections in the encoder and output paths. In all residual connections, we use Instance Normalization Layer [35]. All networks were initialized by the Kaiming [11] initialization method. + +The experiments were conducted on single GeForce RTX 2080 Ti. We use Adam Optimizer [17] on a minibatch of size 12 with parameters $lr = 1 \times e^{-4}$ , $\beta_{1} = 0.5$ and $\beta_{2} = 0.999$ . We train our model for 200 epochs, and activate linear learning rate decay after 100 epochs. + +# 5. Experimental Results + +In the following section we evaluate our approach and explore the interactions between $R, T$ and the different loss terms we use. + +All our experiments were conducted on a commercial dataset, which contains a collection of images of banana plants with different growing conditions and phenotype. The dataset contains 6100 image frames, where each frame consists of an RGB image, IR Image and Depth Image. The colored images are a 24bit Color Bitmap captured from a high-resolution sensor. The IR images are a 16bit gray-scale image, captured from a long-wave infrared (LWIR) sensor. Finally, the depth images were captured by Intel Real-Sense depth camera. The three sensors were calibrated, and an initial registration was applied based on affine transformation estimation via depth and controlled lab measurements. The misalignment in the dataset is due to depth variation within different objects in the scene, which the initial registration + +![](images/2e4f27d0dbfa18356ecc7184ac1cdc3a93ee31b0f7b745612551f895c75ba7e4.jpg) +Figure 3: Annotation sample. We pick points from both the source image $I_{a}$ (left) and the target image $I_{b}$ (right). The blue points are on salient objects and the red points are general points from the scene. We added several arrows to illustrate some matching points. The geometry of each point is with respect to its corresponding image. + +
STNSSIM on edgesNCC on edgesNCCOurs
RAffineX / X19.44 / 19.4520.56 / 13.2613.53 / 8.5
RTPSX / X32.47 / 26.8228.68 / 26.4710.01 / 7.02
R28.41 / 26.1227.41 / 16.7829.91 / 15.86.93 / 6.27
+ +Table 1: Registration accuracy of several similarity measures. We report the average registration accuracy of different registration networks (i.e. $R_{\text{Affine}}$ , $R_{\text{TPS}}$ and ours $R$ ). In each table entry, we report two accuracies, one that is measured based on full scene annotation (left) and the other based on salient objects only annotation (right). $X$ denotes cases where the network degenerates. + +fails to handle. We split the dataset into training and test samples, where the test images were sampled with probability $p = 0.1$ . + +# 5.1. Evaluation + +Registration Accuracy Metric. We manually annotated 100 random pairs of test images. We tagged 10-15 pairs of point landmarks on the source and target images which are notable and expected to match in the registration process (See Figure 3). Given a pair of test images, $I_{a}$ and $I_{b}$ , with a set of tagged pairs. The accuracy of the registration network $R$ is simply the average Euclidean distance between the target points and their matching deformed source points. + +Furthermore, we used two types of annotations. The first type of annotation is located over salient objects in the scene (the blue points in Figure 3). This is important because in most cases, down-stream tasks are affected mainly by the alignment of the main object in the scene in both modalities. The second annotation is performed by picking landmark points from all objects across the scene. + +Quantitative Evaluation. As the crux of our work is the alleviation of the need for cross-modality similarity measures, we trained our network with commonly used loss terms. In Table 1 we show the registration accuracy of our registration network when trained with differ + +![](images/8038fc749ca4ced7ee4c3f548e8a51e7add1cb10c37c193d9241f5f9bb5256bc.jpg) +Figure 4: Registration accuracy of different methods. Unregistered indicates the misalignment in our dataset. We show the accuracy obtained with Elastix [18, 23] and a feature-based registration based on SIFT [20] and CycleGAN [38] or our translation network (i.e. $T$ ). + +ent metrics. Specifically, we used the Normalized Cross-Correlation (NCC) metric as it is frequently used in unsupervised multi-modal registration methods. Additionally, we trained our network by maximizing similarity metrics (e.g. Structural Similarity Index Metric (SSIM) and NCC) on edges detected by Canny edge-detector [4] from both the deformed and target image. As can be seen from Table 1, training the registration network $R$ using prescribed cross-modality similarity measures do not perform well. Further, using NCC produces noisy results, while using SSIM gives smooth but less accurate registration accuracy (see supplemental materials). + +Also, since our learned metric is generic and can be incorporated with any spatial transformation, we trained different spatial transformations with our metric as well. Specifically, we trained an affine-based STN $(R_{\mathrm{Affine}})$ and a thin-plate-spline based STN $(R_{\mathrm{TPS}})$ . The registration accuracy of these networks is reported in Table 1. As can be seen from the table, training these networks with our metric yields substantial improvement over other loss terms. + +We also compared our method with three techniques. The first method we considered is SimpleElastix [18, 23], an iterative registration technique based on Mutual Information. The other two methods are feature-based techniques in which the SIFT [20] descriptor is adapted. However, since SIFT [20] is not designed for multi-modal data, then it cannot be directly used on the source and target images. + +Instead, we train CycleGAN [38] network to translate between the two modalities at hand, without any supervision to match the ground truth. CycleGAN, like other unsupervised image-to-image translation networks, is not trained to generate images matching ground truth samples, + +thus, geometric transformation is not explicitly required from the translation network. Once trained, we use one of the generators in the CycleGAN, the one that maps domain $\mathcal{A}$ to domain $\mathcal{B}$ , to translate the input image $I_{a}$ onto modality $\mathcal{B}$ . Assuming this generator is both geometry preserving and translates well between the modalities, it is expected that it also match well between feature of the fake sample and the target image. Thus, we extracted SIFT descriptors from the generated images by the CycleGAN translation network, and extracted SIFT features from the target image $I_{b}$ . We then matched these features and estimated the needed spatial registration. The registration accuracy using this method is significantly better than directly using SIFT [20] features on the input image $I_{a}$ . Similarly, we used our geometry preserving translation network $T$ along with SIFT descriptor. + +In Figure 4 we show the accuracy of the aforementioned methods. As can be seen, our method gives the best registration accuracy. Moreover, using our translation network $T$ with the SIFT descriptor achieves substantial improvement over CycleGAN [38] + SIFT [20] and Elastix [23, 18]. Thus indicates that our translator $T$ is both geometry preserving and performs accurate photo-metric mapping. + +Qualitative Evaluation. Figure 5 shows that our registration network successfully aligns images from different pairs of modalities and handles different alignment cases. For example, the banana leaves in the first raw in Figure 5a are well-aligned in the two modalities. Our registration network maintains this alignment and only deforms the background for full alignment between the images. This can be seen from the deformation field visualization [2], where little deformation is applied to the banana plant, while most of the deformation is applied to the background. Furthermore, in the second row in Figure 5a, most of the image is translated in a certain direction due to the camera shift, but depth-dependent variation can still be seen. To help measuring the alignment success, we overlay (with semitransparency) the plant in image B on top of both image A before and after the registration. This means that the silhouette has the same spatial location in all images (the original image B, image A before and after the registration). Lastly, we achieve similar success in the registration between RGB and IR images (see Figure 5b). + +It is worth mentioning that in some cases, the deformation field points to regions outside the source image. In those cases, we simply sample zero values. This happens because the target image content (i.e., $I_{b}$ ) in these regions is not available in the source image (i.e., $I_{a}$ ) (see supplemental materials for more results). + +# 5.2. Ablation Study + +Next, we present a series of ablation studies that analyze the effectiveness of different aspects in our work. First, + +![](images/96a83539ea92fe0f2043b1c9d8550a50734262da37be14dccd599a64e7e524b4.jpg) +Input A + +![](images/7b80e822cc7650a6e16d0faf895e1ba7f33587fa8661ee0247dd7a6e6212bbd7.jpg) +Input B + +![](images/e4536bc1181765d278f32c4277a8a8db24490a2b46e53c2abb9bac36c43bf18f.jpg) +Registered + +![](images/9cfb9c08383fb77c84958c503760d9664c137beb14df36d7bf6c86c65147aa16.jpg) +Deform. Field + +![](images/a7a9b8ff794b03e5b5ebfabbb981b2524ebfd644c1d4df8b605847501f0fc58a.jpg) +Before + +![](images/9ee5f7d5300b40c142571be902a83e3e3d1e084398fe97b1351d30c0aacfa902.jpg) +After + +![](images/00d4191e7cb2541c382188ac1a629ca7f54a313cce1d550fdd4b4a1d53dfb970.jpg) +Input A + +![](images/cefee31f9f397483ed740c21e4808b2b5c11376079eae7858308ddbd3cce6509.jpg) +Input B +(b) Image registration between RGB and IR modalities. + +![](images/383fd35ce59af77beeba8eb7e982769a3bbe5070ae00b0373fa72e71aec89503.jpg) +(a) Image registration between RGB and Depth modalities. +Registered + +![](images/77fc8dae0fdd34b1f086cd52cce770fb4bcf90016da4cee69e5f399483fd96d4.jpg) +Deform. Field + +![](images/353910364fa8264f914cab8c57bdeaafb560211a75b43df6c1ae17f06ea24546.jpg) +Before +Figure 5: Qualitative Evaluation. We show sample results on the registration between two pairs of domains; (a) RGB to Depth registration and (b) RGB to IR registration. In the first two columns we show the corresponding images $I_{a}$ and $I_{b}$ . The third column is the registered image, i.e the image $I_{a}$ after deformation. The deformation field (4th column) is visualized using the standard optical-flow visualization [2]. Finally, we segment the salient object in $I_{b}$ and overlay it (with opacity $25\%$ ) in the same spatial location onto the image before and after registration (last two columns). + +![](images/a5ca571f7f562fa9ebb5de2c915b80d270c8d415de4c428f99c0cd126d491d1a.jpg) +After + +we show that training both compositions (i.e our presented two training flows) of $T$ and $R$ indeed encourages a geometric preserving translator $T$ . Additionally, we analyze the impact of the different loss terms on the registration network's accuracy. We further show the effectiveness of the bilateral filtering, and that it indeed improves the registration accuracy. All experiments, unless otherwise stated, were conducted without the bilateral filtering. Geometric-Preserving Translation Network. To evaluate the impact of training of $T$ and $R$ simultaneously with the two training flows proposed in Figure 2, we compare the registration accuracy of our method with that of training models with either $T \circ R$ or $R \circ T$ . As can be seen from Figure 6, training both combinations yields a substantial improvement in the registration accuracy (shown in blue), compared to each training flow (i.e., $T \circ R$ and $R \circ T$ ) separately. Moreover, while the reconstruction loss of $T \circ R$ (shown in read) is lowest among the three options, it does not necessarily indicate a better registration. This is because in this setting the + +translation network $T$ implicitly performs both the alignment and translation tasks. Conversely, when training with $R \circ T$ only (shown in green), the network $R$ is unstable and at some point it starts to alternate pixel values, essentially taking on the role of a translation network. Since $R$ is only geometry-aware by design it fails to generate good samples. This is indicated by how fast the discriminator detects that the generated samples are fake (i.e., the adversarial loss decays fast). Visual results are provided in the supplementary materials. + +Loss ablation. It has been shown in previous works [39, 13, 38] that training an image-to-image translation network with both a reconstruction and an adversarial loss yields better results. In particular, the reconstruction loss stabilizes the training process and improves the vividness of the output images, while the adversarial loss encourages the generation of samples matching the real-data distribution. + +The main objective of our work is the production of a registration network. Therefore, we seek to understand the + +![](images/ada6a8b7de33e64e149d796bedbc43615d8eeb290e5765ab6ab27b21b1caa1a9.jpg) +Figure 6: Composition Ablation Study. We show the values of the (a) Registration Accuracy, (b) Reconstruction loss, (c) Adversarial Loss and (d) cGAN Loss. The x-axis in all figures is the epoch number. The loss values are shown for $T \circ R$ (red), $R \circ T$ (green) and ours (blue). As can be seen, the registration accuracy is best using our method. In $T \circ R$ , the reconstruction loss is the lowest, however, the registration is inaccurate because a significant portion of the registration task is implicitly performed by the translator $T$ . Further, the composition $R \circ T$ is unstable because at some point, the registration network $R$ starts alternating pixels values, which is detected by the discriminator (see the dip in (c)). + +![](images/060531b60a0c550e474c414b93f9c29ac482b2e9f0b9b3d0df2db660669f7da3.jpg) + +![](images/58d18470d00f2edcbdfd25970d31d788b1d423cb8d3ef0a843cd44cfcc620b60.jpg) + +![](images/cd47f97d030c7ab6118e2dfdf2d140c392f45559b5fefce1254be4998d882c8c.jpg) + +
GAN loss +L1 lossRTBoth
R-X28.15
T29.02-22.03
BothXX11.01
+ +impact of both losses (reconstruction and adversarial) on the registration network. To understand the impact of each loss, we train our model with different settings: each time we fix either $R$ or $T$ 's weights with respect to one of the loss functions. The registration accuracy is presented in Table 2. Please refer to the supplementary material for qualitative results. As can be seen in these figures, training $R$ only with respect to the reconstruction loss leads to overly sharp, but unrealistic images where the deformation field creates noisy artifacts. On the other hand, training $R$ only with respect to the adversarial loss creates realistic images, but with inexact alignment. This is especially evident in Table 2 where training $R$ with respect to the reconstruction loss achieves a significant improvement in the alignment, and the best accuracy is obtained when the loss terms are both used to update all the networks weights. + +Bilateral Filtering Effectiveness Using bilateral filtering to weigh the smoothness loss allows us, in effect, to encourage piece-wise smoothness on the deformation map. As can be seen in Table 3, this enhances the precision of the registration. These results suggest that using segmenta + +Table 2: Loss ablation results. Columns denote modules trained with a GAN loss term. Rows denote modules trained with an L1 loss term. We do not report results where only one module is not trained with any loss terms. $X$ denotes cases where the training diverges. For example, the result in the second row and first column represents the registration accuracy achieved when module $R$ 's weights are updated with respect to the cGAN loss and module $T$ with respect to the reconstruction loss term. + +
MethodTest Acc.Train Acc.
No Registration35.4534.96
W/O Bilateral11.019.89
With Bilateral6.936.12
+ +Table 3: Smoothness Regularization. Effect of bilateral filtering on registration accuracy. We show the registration accuracy on annotated test samples, and annotated train samples. + +tion maps for controlling the smoothness loss term could be beneficial. + +# 6. Summary and Conclusions + +We presented an unsupervised multi-modal image registration technique based on image-to-image translation network. Specifically, we developed a geometry preserving image-to-image translation network which allows comparing the deformed and target image using simple monomodality metrics. The geometric preserving translation network was made possible by a novel training scheme, which alternates and combines two different flows to train the spatial transformation. + +We believe that geometric preserving generators can be useful for applications other than image registration. In the future, we would like to continue to explore the idea of alternate training several layers or operators, in different flows, to encourage them being commutative as means to achieve certain non-trivial properties. + +# Acknowledgments + +This research was supported by a generic RD program of the Israeli innovation authority, and the Phenomics consortium. + +# References + +[1] Deep residual learning for image recognition. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770-778, 2015. 5 +[2] Simon Baker, Daniel Scharstein, J. P. Lewis, Stefan Roth, Michael J. Black, and Richard Szeliski. A database and evaluation methodology for optical flow. Int. J. Comput. Vision, 92(1):1-31, Mar. 2011. 6, 7 +[3] Mohamed Ishmael Belghazi, Aristide Baratin, Sai Rajeshwar, Sherjil Ozair, Yoshua Bengio, Aaron Courville, and Devon Hjelm. Mutual information neural estimation. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 531-540, Stockholmssan, Stockholm Sweden, 10-15 Jul 2018. PMLR. 2 +[4] J Canny. A computational approach to edge detection. IEEE Trans. Pattern Anal. Mach. Intell., 8(6):679-698, June 1986. 6 +[5] Xiaohuan Cao, Jianhuan Yang, Li Wang, Zhong Xue, Qian Wang, and Dinggang Shen. Deep learning based intermodality image registration supervised by intra-modality similarity. Machine learning in medical imaging. MLMI, 11046:55-63, 2018. 2 +[6] Adrian V. Dalca, Guha Balakrishnan, John V. Guttag, and Mert R. Sabuncu. Unsupervised learning for fast probabilistic diffeomorphic registration. In MICCAI, 2018. 2 +[7] Bob D. de Vos, Floris F. Berendsen, Max A. Viergever, Marius Staring, and Ivana Isgum. End-to-end unsupervised deformable image registration with a convolutional neural network. In M. Jorge Cardoso, Tal Arbel, Gustavo Carneiro, Tanveer F. Syeda-Mahmood, João Manuel R. S. Tavares, Mehdi Moradi, Andrew P. Bradley, Hayit Greenspan, João Paulo Papa, Anant Madabhushi, Jacinto C. Nascimento, Jaime S. Cardoso, Vasileios Belagiannis, and Zhi Lu, editors, Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support - Third International Workshop, DLMIA 2017, and 7th International Workshop, ML-CDS 2017, Held in Conjunction with MICCAI 2017, Quebec City, QC, Canada, September 14, 2017, Proceedings, volume 10553 of Lecture Notes in Computer Science, pages 204-212. Springer, 2017. 1 +[8] Jingfan Fan, Xiaohuan Cao, Qian Wang, Pew-Thian Yap, and Dinggang Shen. Adversarial learning for mono- or multimodal registration. Medical Image Analysis, 58:101545, 2019. 1, 2 +[9] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 2672-2680. Curran Associates, Inc., 2014. 2, 3 +[10] Grant Haskins, Uwe Kruger, and Pingkun Yan. Deep learning in medical image registration: A survey, 2019. 1 +[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level perfor + +mance on imagenet classification. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), ICCV '15, pages 1026-1034, Washington, DC, USA, 2015. IEEE Computer Society. 5 +[12] Xun Huang, Ming-Yu Liu, Serge Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. In ECCV, 2018. 2 +[13] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. CVPR, 2017. 2, 5, 7 +[14] Max Jaderberg, Karen Simonyan, Andrew Zisserman, and Koray Kavukcuoglu. Spatial transformer networks. In Corinna Cortes, Neil D. Lawrence, Daniel D. Lee, Masashi Sugiyama, and Roman Garnett, editors, Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 2017-2025, 2015. 1 +[15] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European Conference on Computer Vision, 2016. 5 +[16] Boah Kim, Jieun Kim, June-Goo Lee, Dong Hwan Kim, Seong Ho Park, and Jong Chul Ye. Unsupervised deformable image registration using cycle-consistent CNN. In Dinggang Shen, Tianming Liu, Terry M. Peters, Lawrence H. Staib, Caroline Essert, Sean Zhou, Pew-Thian Yap, and Ali Khan, editors, Medical Image Computing and Computer Assisted Intervention - MICCAI 2019 - 22nd International Conference, Shenzhen, China, October 13-17, 2019, Proceedings, Part VI, volume 11769 of Lecture Notes in Computer Science, pages 166-174. Springer, 2019. 1 +[17] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 12 2014. 5 +[18] Stefan Klein, Marius Staring, Keelin Murphy, Max A. Viergever, and Josien P. W. Pluim. elastix: A toolbox for intensity-based medical image registration. IEEE Trans. Med. Imaging, 29(1):196-205, 2010. 6 +[19] Matthew C. H. Lee, Ozan Oktay, Andreas Schuh, Michiel Schaap, and Ben Glocker. Image-and-spatial transformer networks for structure-guided image registration. In Dinggang Shen, Tianming Liu, Terry M. Peters, Lawrence H. Staib, Caroline Essert, Sean Zhou, Pew-Thian Yap, and Ali Khan, editors, Medical Image Computing and Computer Assisted Intervention - MICCAI 2019 - 22nd International Conference, Shenzhen, China, October 13-17, 2019, Proceedings, Part II, volume 11765 of Lecture Notes in Computer Science, pages 337-345. Springer, 2019. 1 +[20] David G. Lowe. Distinctive image features from scale-invariant keypoints. Int. J. Comput. Vision, 60(2):91-110, Nov. 2004. 6 +[21] Dwarikanath Mahapatra, Bhavna J. Antony, Suman Sedai, and Rahul Garnavi. Deformable medical image registration using generative adversarial networks. In 15th IEEE International Symposium on Biomedical Imaging, ISBI 2018, Washington, DC, USA, April 4-7, 2018, pages 1449-1453. IEEE, 2018. 2 + +[22] Dwarikanath Mahapatra, Zongyuan Ge, Suman Sedai, and Rajib Chakravorty. Joint registration and segmentation of xray images using generative adversarial networks. In Yinghuan Shi, Heung-Il Suk, and Mingxia Liu, editors, Machine Learning in Medical Imaging, volume 11046 of Lecture Notes in Computer Science, pages 73–80. Springer, 1 2018. 2 +[23] Kasper Marstal, Floris F. Berendsen, Marius Staring, and Stefan Klein. Simple elastix: A user-friendly, multi-lingual library for medical image registration. In 2016 IEEE Conference on Computer Vision and Pattern Recognition Workshops, CVPR Workshops 2016, Las Vegas, NV, USA, June 26 - July 1, 2016, pages 574-582. IEEE Computer Society, 2016. 6 +[24] Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. CoRR, abs/1411.1784, 2014. 2, 3, 4 +[25] Seungjong Oh and Siyong Kim. Deformable image registration in radiation therapy. Radiation oncology journal, 35(2):101, 2017. 1 +[26] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. In NIPS Autodiff Workshop, 2017. 5 +[27] Chen Qin, Bibo Shi, Rui Liao, Tommaso Mansi, Daniel Rueckert, and Ali Kamen. Unsupervised deformable registration for multi-modal images via disentangled representations. In Albert C. S. Chung, James C. Gee, Paul A. Yushkevich, and Siqi Bao, editors, Information Processing in Medical Imaging - 26th International Conference, IPMI 2019, Hong Kong, China, June 2-7, 2019, Proceedings, volume 11492 of Lecture Notes in Computer Science, pages 249-261. Springer, 2019. 2 +[28] O. Ronneberger, P.Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention (MICCAI), volume 9351 of LNCS, pages 234-241. Springer, 2015. (available on arXiv:1505.04597 [cs.CV]). 5 +[29] Maria A Schmidt and Geoffrey S Payne. Radiotherapy planning using mri. Physics in Medicine & Biology, 60(22):R323, 2015. 1 +[30] N. Schneider, F. Piewak, C. Stiller, and U. Franke. Regnet: Multimodal sensor registration using deep neural networks. In 2017 IEEE Intelligent Vehicles Symposium (IV), pages 1803-1810, June 2017. 1 +[31] A. Sheikhjafari, Michelle Noga, Kumaradevan Punithakumar, and Nilanjan Ray. Unsupervised deformable image registration with fully connected generative neural network. 2018. 2 +[32] Xiaoyong Shen, Li Xu, Qi Zhang, and Jiaya Jia. Multi-modal and multi-spectral registration for natural images. In Computer Vision - ECCV 2014 - 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part IV, pages 309-324, 2014. 1 +[33] Chang Shu, Xi Chen, Qiwei Xie, and Hua Han. An unsupervised network for fast microscopic image registration. In John E. Tomaszewski and Metin N. Gurcan, editors, Medical + +Imaging 2018: Digital Pathology, volume 10581, pages 363 - 370. International Society for Optics and Photonics, SPIE, 2018. 2 +[34] C. Tomasi and R. Manduchi. Bilateral filtering for gray and color images. In Proceedings of the Sixth International Conference on Computer Vision, ICCV '98, pages 839-, Washington, DC, USA, 1998. IEEE Computer Society. 4 +[35] Dmitry Ulyanov, Andrea Vedaldi, and Victor S. Lempitsky. Instance normalization: The missing ingredient for fast stylization. ArXiv, abs/1607.08022, 2016. 5 +[36] Chengjia Wang, Giorgos Papanastasiou, Agisilaos Chartsias, Grzegorz Jacenkow, Sotirios A. Tsaftaris, and Heye Zhang. FIRE: unsupervised bi-directional inter-modality registration using deep networks. CoRR, abs/1907.05062, 2019. 1, 2 +[37] Armand Zampieri, Guillaume Charpiat, Nicolas Girard, and Yuliya Tarabalka. Multimodal image alignment through a multiscale chain of neural networks with application to remote sensing. In ECCV, 2018. 1 +[38] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networkss. In Computer Vision (ICCV), 2017 IEEE International Conference on, 2017. 2, 5, 6, 7 +[39] Jun-Yan Zhu, Richard Zhang, Deepak Pathak, Trevor Darell, Alexei A Efros, Oliver Wang, and Eli Shechtman. Toward multimodal image-to-image translation. In Advances in Neural Information Processing Systems, 2017. 2, 5, 7 +[40] Barbara Zitov and Jan Flusser. Image registration methods: a survey. Image and Vision Computing, 21(11):977 - 1000, 2003. 1 \ No newline at end of file diff --git a/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/images.zip b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5c069803210cd8e83a27f6687cd3e5232b1f4f13 --- /dev/null +++ b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73581e60dada720f727719b9148848755dc367b0ab5e683521ef5e27bf3027eb +size 464316 diff --git a/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/layout.json b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ac5387056a05b145dd82f060046195ff153d7d50 --- /dev/null +++ b/unsupervisedmultimodalimageregistrationviageometrypreservingimagetoimagetranslation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fe0b743ed01d6b3ee529322b7d9c532db8428bcc0f25075ad2249ccd32fb95c +size 518199 diff --git a/unsupervisedpersonreidentificationviamultilabelclassification/efb94067-b378-47ea-9bb8-9edc777d80c6_content_list.json b/unsupervisedpersonreidentificationviamultilabelclassification/efb94067-b378-47ea-9bb8-9edc777d80c6_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..45ae24e36a0ca87360ec090c3310a5366facf5be --- /dev/null +++ b/unsupervisedpersonreidentificationviamultilabelclassification/efb94067-b378-47ea-9bb8-9edc777d80c6_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd0a0577b235f1f2d4a7c2ee2198af6511a757497c40e8434275e23d5e43bb88 +size 82969 diff --git a/unsupervisedpersonreidentificationviamultilabelclassification/efb94067-b378-47ea-9bb8-9edc777d80c6_model.json b/unsupervisedpersonreidentificationviamultilabelclassification/efb94067-b378-47ea-9bb8-9edc777d80c6_model.json new file mode 100644 index 0000000000000000000000000000000000000000..93454980898b836894daa003cba65095da9d2303 --- /dev/null +++ b/unsupervisedpersonreidentificationviamultilabelclassification/efb94067-b378-47ea-9bb8-9edc777d80c6_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44fbe38a88d45c61e09c757e7f7041f1d26ed19b480860c3776edc875037eef9 +size 99990 diff --git a/unsupervisedpersonreidentificationviamultilabelclassification/efb94067-b378-47ea-9bb8-9edc777d80c6_origin.pdf b/unsupervisedpersonreidentificationviamultilabelclassification/efb94067-b378-47ea-9bb8-9edc777d80c6_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ce10c8bc5ca9320b278b8a3b5f5b39db56531ed8 --- /dev/null +++ b/unsupervisedpersonreidentificationviamultilabelclassification/efb94067-b378-47ea-9bb8-9edc777d80c6_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c9fc2577590eb0d216c16d731e4f1492c255f17550b90a5ec915f3da55f7448 +size 665793 diff --git a/unsupervisedpersonreidentificationviamultilabelclassification/full.md b/unsupervisedpersonreidentificationviamultilabelclassification/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7f3085c8be7d8a31d66b5cc05baa5f8c5d26b027 --- /dev/null +++ b/unsupervisedpersonreidentificationviamultilabelclassification/full.md @@ -0,0 +1,364 @@ +# Unsupervised Person Re-identification via Multi-label Classification + +Dongkai Wang Shiliang Zhang Peking University + +{dongkai.wang, slzhang.jdl}@pku.edu.cn + +# Abstract + +The challenge of unsupervised person re-identification (ReID) lies in learning discriminative features without true labels. This paper formulates unsupervised person ReID as a multi-label classification task to progressively seek true labels. Our method starts by assigning each person image with a single-class label, then evolves to multi-label classification by leveraging the updated ReID model for label prediction. The label prediction comprises similarity computation and cycle consistency to ensure the quality of predicted labels. To boost the ReID model training efficiency in multi-label classification, we further propose the memory-based multi-label classification loss (MMCL). MMCL works with memory-based non-parametric classifier and integrates multi-label classification and single-label classification in a unified framework. Our label prediction and MMCL work iteratively and substantially boost the ReID performance. Experiments on several large-scale person ReID datasets demonstrate the superiority of our method in unsupervised person ReID. Our method also allows to use labeled person images in other domains. Under this transfer learning setting, our method also achieves state-of-the-art performance. + +# 1. Introduction + +Recent years have witnessed the great success of person re-identification (ReID), which learns discriminative features from labeled person images with deep Convolutional Neural Network (CNN) [43, 14, 9, 27, 16, 26, 28, 29]. Because it is expensive to annotate person images across multiple cameras, recent research efforts start to focus on unsupervised person ReID. Unsupervised person ReID aims to learn discriminative features from unlabeled person images. Compared with supervised learning, unsupervised learning relieves the requirement for expensive data annotation, hence shows better potential to push person ReID towards real applications. + +The challenge of unsupervised person ReID lies in learning discriminative features without true labels. To conquer + +![](images/a37138ffdc8d10e2bda8da0e0feccd6f96b2f6bba786301aaeeb05529d2dc491.jpg) +Figure 1. Illustrations of multi-label classification for unsupervised person ReID. We target to assign each unlabeled person image with a multi-class label reflecting the person identity. This is achieved by iteratively running MPLP for prediction and MMCL for multi-label classification loss computation. This procedure guides CNN to produce discriminative features for ReID. + +this challenge, most of recent works [37, 46, 22, 19, 30] define unsupervised person ReID as a transfer learning task, which leverages labeled data on other domains for model initialization or label transfer. Among them, some works assign each image with a single-class label [46]. Some others leverage spatio-temporal cues or additional attribute annotations [22, 19, 30]. Detailed review of existing methods will be presented in Sec. 2. Thanks to the above efforts, the performance of unsupervised person ReID has been significantly boosted. However, there is still a considerable gap between supervised and unsupervised person ReID. Meanwhile, the setting of transfer learning leads to limited flexibility. For example, as discussed in many works [21, 35, 31], the performance of transfer learning is closely related to the domain gap, e.g., large domain gap degrades the performance. It is non-trivial to estimate the domain gap and select suitable source datasets for transfer learning in unsupervised person ReID. + +This paper targets to boost unsupervised person ReID without leveraging any labeled data. As illustrated in Fig. 1, we treat each unlabeled person image as a class and train the ReID model to assign each image with a multi-class label. In other words, the ReID model is trained to classify each + +image to multiple classes belonging to the same identity. Because each person usually has multiple images, multi-label classification effectively identifies images of the same identity and differentiates images from different identities. This in-turn facilitates the ReID model to optimize inter and intra class distances. Compared with previous methods [20, 34], which classify each image into a single class, the multi-label classification has potential to exhibit better efficiency and accuracy. + +Our method iteratively predicts multi-class labels and updates the network with multi-label classification loss. As shown in Fig. 1, to ensure the quality of predicted labels, we propose the Memory-based Positive Label Prediction (MPLP), which considers both visual similarity and cycle consistency for label prediction. Namely, two images are assigned with the same label if they a) share large similarity and b) share similar neighbors. To further ensure the accuracy of label prediction, MPLP utilizes image features stored in the memory bank, which is updated with augmented features after each training iteration to improve feature robustness. + +Predicted labels allow for CNN training with a multi-label classification loss. Since each image is treated as a class, the huge number of classes makes it hard to train classifiers like Fully Connected (FC) layers. As shown in Fig. 1, we adopt the feature of each image stored in the memory bank as a classifier. Specifically, a Memory-based Multi-label Classification Loss (MMCL) is introduced. MMCL accelerates the loss computation and addresses the vanishing gradient issue in traditional multi-label classification loss [39, 5] by abandoning the sigmoid function and enforcing the classification score to 1 or -1. MMCL also involves hard negative class mining to deal with the imbalance between positive and negative classes. + +We test our approach on several large-scale person ReID datasets including Market-1501 [42], DukeMTMC-reID [25] and MSMT17 [31] without leveraging other labeled data. Comparison with recent works shows our method achieves competitive performance. For instance, we achieve rank-1 accuracy of $80.3\%$ on Market-1501, significantly outperforming the recent BUC [20] and DBC [4] by $14.1\%$ and $11.1\%$ , respectively. Our performance is also better than the HHL [45] and ECN [46], which use extra DukeMTMC-reID [25] for transfer learning. Our method is also compatible with transfer learning. Leveraging DukeMTMC-reID for training, we further achieve rank-1 accuracy of $84.4\%$ on Market-1501. + +In summary, our method iteratively runs MPLP and MMCL to seek true labels for multi-label classification and CNN training. As shown in our experiments, this strategy, although does not leverage any labeled data, achieves promising performance. The maintained memory bank reinforces both label prediction and classification. Our + +work also shows that, unsupervised training has potential to achieve better flexibility and accuracy than existing transfer learning strategies. + +# 2. Related Work + +This section briefly reviews related works on unsupervised person ReID, unsupervised feature learning, and multi-label classification. + +Unsupervised person ReID works can be summarized into three categories. The first category utilizes hand-craft features [18, 42]. However, it is difficult to design robust and discriminative features by hand. The second category [6, 7] adopts clustering to estimate pseudo labels to train the CNN. However, these methods require good pretrained model. Apart from this, Lin et al. [20] treat each image as a cluster, through training and merging clusters, this method achieves good performance. + +The third category [19, 30, 38, 31, 3, 45, 46, 1, 32, 17, 24, 40] utilizes transfer learning to improve unsupervised person ReID. Some works [19, 30] use transfer learning and minimize the attribute-level discrepancy by utilizing extra attribute annotations. MAR [38] uses the source dataset as a reference to learn soft labels, which hence supervise the ReID model training. Generative Adversarial Network (GAN) is also utilized for transfer learning. PTGAN [31] and SPGAN [3] first generate transferred images from source datasets, then uses transferred image for training. HHL [45] generates images under different cameras and trains network using triplet loss. ECN [46] utilizes transfer learning and minimizes the target invariance. Transfer learning requires a labeled source dataset for training. Our method differs with them that, it does not require any labeled data. It also achieves better performance than many transfer learning methods. + +Unsupervised feature learning aims to relieve the requirement on labeled data for feature learning. It can be applied in different tasks. Some works adopt unsupervised feature learning for neural network initialization. For example, RotNet [13] predicts the rotation of image to learn a good representation. Li et al. [15] use motion and view as supervision to learn an initialization for action recognition. Some other works utilize unsupervised feature learning to acquire features for image classification and retrieval. [11] utilizes manifold learning to seek positive and negative samples to compute the triplet loss. Wu et al. [34] regard each image as single class, and propose a non-parametric softmax classifier to train CNN. Our work shares certain similarity with [34], in that we also use non-parametric classifiers. However, we consider multi-label classification, which is important in identifying images of the same identity as well as differentiating different identities. + +Multi-label classification is designed for classification tasks with multi-class labels [39, 5, 30, 19]. Durand et + +al. [5] deal with multi-label learning based on partial labels and utilize GNN to predict missing labels. Wang et al. [30, 19] use multi-label classification to learn attribute feature. This paper utilizes multi-label classification to predict multi-class labels and focuses on learning identity feature for person ReID. To the best of our knowledge, this is an early work utilizing multi-label classification for unsupervised person ReID. + +# 3. Methodology + +# 3.1. Formulation + +Given an unlabeled person image dataset $\mathcal{X} = \{x_1, x_2, \dots, x_n\}$ , our goal is to train a person ReID model on $\mathcal{X}$ . For any query person image $q$ , the person ReID model is expected to produce a feature vector to retrieve image $g$ containing the same person from a gallery set $G$ . In other words, the ReID model should guarantee $q$ share more similar features with $g$ than with other images in $G$ . We could conceptually denote the goal of person ReID as, + +$$ +g ^ {*} = \arg \min _ {g \in G} \operatorname {d i s t} \left(f _ {g}, f _ {q}\right), \tag {1} +$$ + +where $f \in \mathbb{R}^d$ is a $d$ -dimensional L2-normalized feature vector extracted by the person ReID model. $\mathrm{dist}(\cdot)$ is the distance metric, e.g., the L2 distance. + +To make training on $\mathcal{X}$ possible, we start by treating each image as an individual class and assign $x_{i}$ with a label $y_{i}$ . This pseudo label turns $\mathcal{X}$ into a labeled dataset, and allows for the ReID model training. $y_{i}$ is initialized to a two-valued vector, where only the value at index $i$ is set to 1 and the others are set to $-1$ , i.e., + +$$ +y _ {i} [ j ] = \left\{ \begin{array}{c c} 1 & j = i \\ - 1 & j \neq i \end{array} \right. \tag {2} +$$ + +Since each person may have multiple images in $\mathcal{X}$ , the initial label vector is not valid in representing person identity cues. Label prediction is required to assign multi-class labels to each image, which can be used for ReID model training with a multi-label classification loss. Labels of $x_{i}$ can be predicted by referring its feature $f_{i}$ to features of other images, and find consistent feature groups. On the other hand, due to the huge number of image classes in $\mathcal{X}$ , it is hard to train a multi-label classifier. One efficient solution is to use the $f_{i}$ as the classifier for the $i$ -th class. This computes the classification score for any image $x_{j}$ as, + +$$ +c _ {j} [ i ] = f _ {i} ^ {\top} \times f _ {j}, \tag {3} +$$ + +where $c_{j}$ denotes the multi-label classification score for $x_{j}$ . + +It is easy to infer that, both label prediction and multilabel classification require features of images in $\mathcal{X}$ . We hence introduce a $n\times d$ sized memory bank $\mathcal{M}$ to store + +those features, where $\mathcal{M}[i] = f_i$ . With $\mathcal{M}$ , we propose the Memory-based Positive Label Prediction (MPLP) for label prediction and Memory-based Multi-label Classification Loss (MMCL) for ReID model training, respectively. + +As shown in Fig. 1, MPLP takes a single-class label as input and outputs the multi-label prediction $\bar{y}_i$ based on memory bank $\mathcal{M}$ , i.e., + +$$ +\bar {y} _ {i} = \operatorname {M P L P} \left(y _ {i}, \mathcal {M}\right), \tag {4} +$$ + +where $\mathrm{MPLP}(\cdot)$ denotes the MPLP module and $\bar{y}$ is the multi-class label. + +MMCL computes the multi-label classification loss by taking the image feature $f$ , label $\bar{y}$ , and the memory bank $\mathcal{M}$ as inputs. The computed loss $\mathcal{L}_{MMCL}$ can be represented as, + +$$ +\mathcal {L} _ {M M C L} = \sum_ {i = 1} ^ {n} \mathcal {D} \left(\mathcal {M} ^ {\top} \times f _ {i}, \bar {y} _ {i}\right), \tag {5} +$$ + +where $\mathcal{M}^{\top} \times f_{i}$ computes the classification score, and $\mathcal{D}(\cdot)$ computes the loss by comparing classification scores and predicted labels. + +$\mathcal{M}$ is updated after each training iteration as, + +$$ +\mathcal {M} [ i ] ^ {t} = \alpha \cdot f _ {i} + (1 - \alpha) \cdot \mathcal {M} [ i ] ^ {t - 1}, \tag {6} +$$ + +where the superscript $t$ denotes the $t$ -th training epoch, $\alpha$ is the updating rate. $\mathcal{M}[i]^t$ is then L2-normalized by $\mathcal{M}[i]^t \leftarrow ||\mathcal{M}[i]^t||_2$ . It is easy to infer that, both MPLP and MMCL require robust features in $\mathcal{M}$ to seek reliable labels and classification scores, respectively. We use many data argumentation techniques to reinforce $\mathcal{M}$ . In other words, each $\mathcal{M}[i]$ combines features of different augmented samples form $x_i$ , hence it presents better robustness. More details are given in Sec. 4.2. + +MPLP considers both similarity and cycle consistency to predict $\bar{y}_i$ , making it more accurate than the classification score. This makes the loss computed with Eq. (5) valid in boosting the ReID model, which in-turn produces positive feedbacks to $\mathcal{M}[i]$ and label prediction. This loop makes it possible to train discriminative ReID models on unlabeled dataset. Implementations to MPLP and MMCL can be found in the following parts. + +# 3.2. Memory-based Positive Label Prediction + +As shown in Eq. (4), given an initial two-valued label $y_{i}$ of image $x_{i}$ , MPLP aims to find other classes that $x_{i}$ may belong to. For $x_{i}$ , MPLP first computes a rank list $R_{i}$ according to the similarity between $x_{i}$ and other features, i.e., + +$$ +R _ {i} = \underset {j} {\operatorname {a r g s o r t}} (s _ {i, j}), j \in [ 1, n ], \tag {7} +$$ + +$$ +s _ {i, j} = \mathcal {M} [ i ] ^ {\top} \times \mathcal {M} [ j ], \tag {8} +$$ + +![](images/461dbf8b7f0ecb8ff0f7a0d74a467cf10d1739dbab82a701fdc4a51d7b715031.jpg) +Figure 2. Illustration of the label prediction by MPLP. (a) reports the precision and recall of MPLP in finding true positive labels, where MPLP consistently outperforms KNN at different training stages. (b) shows positive labels and negative labels selected by MPLP, where MPLP effectively rejects hard negative labels. + +![](images/c2529eaf19fc91f9dd5174d63961a61b89947d49eec9d02df601dc755b04681c.jpg) + +where $s_{i,j}$ denotes the similarity score of $x_{i}$ and $x_{j}$ . + +$R_{i}$ finds candidates for reliable labels for $x_{i}$ , e.g., labels at the top of rank list. However, variances of illumination, viewpoint, backgrounds, etc., would degrade the robustness of the rank list. E.g., noisy labels may appear at the top of rank list. To ensure the quality of predicted labels, MPLP refers to the similarity score and cycle consistency for label prediction. + +Label filtering by similarity score: We first select positive label candidates for $x_{i}$ based on its rank list. Inspired by [39], that uses a threshold to select relevant labels for query, we select candidate labels with a predefined similarity threshold. Given a similarity score threshold $t$ , $k_{i}$ label candidates can be generated by removing labels with similarity smaller than $t$ , i.e., + +$$ +P _ {i} = R _ {i} \left[ 1: k _ {i} \right], \tag {9} +$$ + +where $R_{i}[k_{i}]$ is the last label with similarity score higher than $t$ , $P_{i}$ is the collection of label candidates for $x_{i}$ . $t$ largely decides the quantity of label candidates. It will be tested in Sec. 4.3. Eq. (9) adaptively finds different numbers of candidates labels for different images, which is better than selecting fixed number of labels, i.e., the KNN in Fig. 2. We proceed to introduce cycle consistency to find positive labels from $P_{i}$ . + +Label filtering by cycle consistency: Inspired by k-reciprocal nearest neighbor[12, 44], we assume that, if two images belong to the same class, their neighbor image sets should also be similar. In other words, two images should be mutual neighbor for each other if they can be assigned with similar labels. With this intuition, we propose a cycle consistency scheme to filter hard negative labels in $P_{i}$ . + +MPLP traverses labels in $P_{i}$ from head to tail. For a + +label $j$ in $P_{i}$ , MPLP computes its top- $k_{i}$ nearest labels with Eq. (7). If label $i$ is also one of the top- $k_{i}$ nearest labels of $j$ , $j$ is considered as a positive label for $x_{i}$ . Otherwise, it is treated as a hard negative label. The traverse is stopped when the first hard negative label is found. This leads to a positive label set $P_{i}^{*}$ as well as a hard negative label for image $x_{i}$ . We denote the positive label set as, + +$$ +P _ {i} ^ {*} = P _ {i} [ 1: l ], \tag {10} +$$ + +where $l$ satisfies $i\in R_{P_i[l]}[1:k_i]$ & $i\notin R_{P_i[l + 1]}[1:k_i]$ . As $P_{i}^{*}$ contains $l$ labels, $x_{i}$ would be assigned with a multiclass label $\bar{y}_i$ with $l$ positive classes, + +$$ +\bar {y} _ {i} [ j ] = \left\{ \begin{array}{c c} 1 & j \in P _ {i} ^ {*} \\ - 1 & j \notin P _ {i} ^ {*} \end{array} \right. \tag {11} +$$ + +As Fig. 2 shows that, MPLP predicts accurate positive labels. Experimental evaluations will be presented in Sec. 4.4. + +# 3.3. Memory-based Multi-label Classification Loss + +Traditional multi-label classification loss: The predicted multi-class labels are used for training the ReID model with a multi-label classification loss. In traditional multi-label classification methods, sigmoid and logistic regression loss is a common option [39, 5, 30, 19]. For a task with $n$ classes, it adopts $n$ independent binary classifiers for classification. The loss of classifying image $x_{i}$ to class $j$ can be computed as, + +$$ +\ell (j | x _ {i}) = \log \left(1 + \exp \left(- \bar {y} _ {i} [ j ] \times \mathcal {M} [ j ] ^ {\top} \times f _ {i}\right)\right), \tag {12} +$$ + +where $\mathcal{M}[j]^{\top} \times f_{i}$ computes the classification score of image $x_{i}$ for the class $j$ . $\bar{y}_{i}[j]$ is the label of image $x_{i}$ for class $j$ . With the loss at a single class, we can obtain the Multi-Label Classification (MCL) loss, i.e., $\mathcal{L}_{MCL}$ , + +$$ +\mathcal {L} _ {M C L} = \sum_ {i = 1} ^ {n} \sum_ {j = 1} ^ {n} \ell (j | x _ {i}), \tag {13} +$$ + +where $n$ is the number of images in the dataset $\mathcal{X}$ , which equals to the class number in our setting. + +Because the $\mathcal{M}[j]^{\top}$ and $f_{i}$ are L2 normalized, the classification score is restricted between $[-1, 1]$ . This limits the range of sigmoid function in Eq. (12), making the loss nonzero even for correct classifications. This issue can be addressed by introducing a scalar $\tau$ on the classification score. This updates Eq. (12) as, + +$$ +\ell_ {\tau} (j | x _ {i}) = \log \left(1 + \exp \left(- \bar {y} _ {i} [ j ] \times \mathcal {M} [ j ] ^ {\top} \times f _ {i} / \tau\right)\right). \tag {14} +$$ + +We denote the corresponding MCL loss as $\mathcal{L}_{MCL - \tau}$ . The gradient of $\mathcal{L}_{MCL - \tau}$ can be computed as, + +$$ +\frac {\partial \mathcal {L} _ {M C L - \tau}}{\partial f _ {i}} = - \frac {\exp \left(- \bar {y} _ {i} [ j ] \mathcal {M} [ j ] ^ {\top} f _ {i} / \tau\right)}{1 + \exp \left(- \bar {y} _ {i} [ j ] \mathcal {M} [ j ] ^ {\top} f _ {i} / \tau\right)} \frac {\bar {y} _ {i} [ j ] \mathcal {M} [ j ]}{\tau}. \tag {15} +$$ + +![](images/c78112cedf2dd52050dea47477607a54893a0e7c3bd7a8309153c83958ba8d1b.jpg) +Figure 3. Gradient Analysis for MCL- $\tau$ and MMCL. It is clear that, MMCL does not suffer from the vanishing gradient issue. + +With Eq. (15), we illustrate the gradient of $\mathcal{L}_{MCL - \tau}$ with different values of $\tau$ when $\bar{y}_i[j] = 1$ in Fig. 3. It is clear that, the updated MCL loss still suffers from substantial vanishing gradient issue as the classification score larger than 0.25 or smaller than -0.25. + +Another issue with MCL loss is that, our task involves a large number of classes, making the positive and negative classes unbalanced. Treating those negative classes equally in Eq. (14) may cause a model collapse. We hence proceed to propose MMCL to address those issues. + +Memory-based Multi-label Classification Loss: MMCL is proposed to address two issues in traditional MCL. For the first issue, since the score is bounded by $[-1, 1]$ , we can abandon the sigmoid function and directly compute the loss by regressing the classification score to 1 and -1. This simplifies the loss computation and improves the training efficiency. The loss of classifying image $x_{i}$ to class $j$ can be updated as, + +$$ +\ell^ {*} (j | x _ {i}) = \left| \left| \mathcal {M} [ j ] ^ {\top} \times f _ {i} - \bar {y} _ {i} [ j ] \right| \right| ^ {2}, \tag {16} +$$ + +where $f_{i}$ is the feature of image $x_{i}$ . + +The second problem is the imbalance between positive and negative classes. MMCL introduces hard negative class mining to solve it. This is inspired by the sample mining in deep metric learning [33], where hard negative samples are more informative for training. Similarly in our multi-label classification, the training should focus more on hard negative classes than easy negative classes. + +For $x_{i}$ , its negative classes can be denoted as $R_{i} \backslash P_{i}^{*}$ . We rank them by their classification scores and select the top $r\%$ classes as the hard negative classes. The collection of hard negative classes for $x_{i}$ can be denoted as $N_{i}$ , $|N_{i}| = (n - |P_{i}^{*}|) \cdot r\%$ . + +The MMCL is computed on positive classes and sampled + +hard negative classes as follows, + +$$ +\begin{array}{l} \mathcal {L} _ {M M C L} = \sum_ {i = 1} ^ {n} \frac {\delta}{\left| P _ {i} ^ {*} \right|} \sum_ {p \in \mathcal {P} _ {i} ^ {*}} \ell^ {*} (p | x _ {i}) + \tag {17} \\ \frac {1}{| N _ {i} |} \sum_ {s \in N _ {i}} \ell^ {*} (s | x _ {i}) \\ \end{array} +$$ + +where $\delta$ is a coefficient measuring the importance of positive class loss and negative class loss, which will be tested in experiments. + +We also illustrate the gradients of $\mathcal{L}_{MMCL}$ similarly when $\bar{y}_i[j] = 1$ , in Fig. 3, where the gradient of $\mathcal{L}_{MMCL}$ can be computed as, + +$$ +\partial \mathcal {L} _ {M M C L} / \partial f _ {i} = 2 \delta (\mathcal {M} [ j ] ^ {\top} \times f _ {i} - \bar {y} _ {i} [ j ]) \mathcal {M} [ j ]. \tag {18} +$$ + +Discussions: Comparison between MCL and MMCL in Fig. 3 clearly shows that, the vanishing gradient issue is effectively addressed by MMCL. Because of vanishing gradient, $\mathcal{L}_{MCL - \tau}$ won't enforce the classifier to classify positive labels with large scores. This is harmful for decreasing the intra-class variance. Therefore, MMCL is more effective than MCL in optimizing the ReID model. Fig. 3 also shows that, $\delta$ controls the magnitude of the gradient of MMCL. As discussed in [41], mean square loss is inferior to log-based loss (e.g. cross entropy) when classification score is near the decision boundary. $\delta$ effectively solves this issue by scaling the gradient magnitude of MMCL. + +By adopting the hard negative class mining strategy, MMCL not only works for multi-label classification, it also could be applied in single-label classification, where the unbalanced class issue still exists. Compared with cross entropy loss and MCL, MMCL abandons activation functions like softmax and sigmoid, leading to more efficient computation. As discussed in many works [23, 8], a huge number of classes degrades the speed of softmax computation. Existing solutions include hierarchical softmax [23] and noise-contrastive estimation [8]. As MMCL does not involve softmax computation, it does not suffer from such issues. + +# 3.4. Transfer Learning with Labeled Dataset + +Our method is also compatible with transfer learning setting. Given a dataset containing labeled person images, we can adopt the commonly used cross entropy loss and triplet loss on labeled data to train the model. The training loss can be denoted as $\mathcal{L}_{\text{labeled}}$ . The overall training loss for transfer learning can be represented as the sum of MMCL and loss on labeled dataset, i.e., + +$$ +\mathcal {L} _ {\text {t r a n s f e r}} = \mathcal {L} _ {\text {l a b e l e d}} + \mathcal {L} _ {\text {M M C L}}. \tag {19} +$$ + +The performance of our methods on transfer learning will be tested in the next section. + +![](images/358f5cfff262103a9c5ec6f95fdc0bedc35decf8d35e4c1b3a04a7272c2710c4.jpg) +Figure 4. Evaluation of similarity score $t$ in MPLP. + +# 4. Experiments + +# 4.1. Dataset and Evaluation Metrics + +Market-1501 [42] contains 32,668 labeled person images of 1,501 identities collected from 6 non-overlapping camera views. DukeMTMC-reID [25] has 8 cameras and 36,411 labeled images of 1,404 identities. MSMT17 [31] is a newly released person ReID dataset. It is composed of 126,411 person images from 4,101 identities collected by 15 cameras. The dataset suffers from substantial variations of scene and lighting, and is more challenging than the other two datasets. All three datasets are collected under similar scenario, i.e., campus, which makes the transfer learning possible. We follow the standard settings [42, 25, 31] on them to conduct experiments. Performance is evaluated by the Cumulative Matching Characteristic (CMC) and mean Average Precision (mAP). + +# 4.2. Implementation Details + +All experiments are implemented on PyTorch. We use ResNet-50 [9] as backbone to extract the feature and initialize it with parameters pre-trained on ImageNet [2]. After pooling-5 layer, we remove subsequent layers and add a batch normalization layer [10], which produces a 2048-dim feature. During testing, we also extract the pooling-5 feature to calculate the distance. For multi-label classification, we allocate a memory bank to store L2 normalized image features. The memory bank is initialized to all zeros, and we start using MPLP for label prediction when the memory is fully updated 5 times (after 5 epochs). As mentioned in section 3.2, we leverage CamStyle [47] as a data augmentation strategy for unlabeled images. Strategies like random crop, random rotation, color jitter, and random erasing are also introduced to improve the feature robustness. + +The input image is resized to $256^{*}128$ . We use SGD to optimize the model, the learning rate for ResNet-50 base layers are 0.01, and others are 0.1. The memory updating rate $\alpha$ starts from 0 and grows linearly to 0.5. We train the model for 60 epochs, and the learning rate is divided by 10 after every 40 epochs. The batch size for model training is 128. We fix the similarity threshold $t$ in MPLP as 0.6. In MMCL, the weight $\delta$ is fixed to 5 and we select the $1\%$ top-ranked negative classes to compute the loss through the parameter analysis in Sec. 4.3. + +
δMarket-1501DukeMTMC-reID
Rank-1mAPRank-1mAP
159.319.452.622.8
271.331.158.831.0
376.640.062.635.6
479.944.964.939.1
580.345.565.240.2
678.145.065.039.8
773.241.364.139.4
+ +Table 1. Evaluation of parameter $\delta$ in Eq. (17). + +For transfer learning with labeled dataset, we apply the same batch size on the labeled dataset. A fully connected layer is added after batch normalization layer for classification. We optimize the $\mathcal{L}_{\text {transfer }}$ in section 3.4 following the same baseline training strategy as described in [7]. + +# 4.3. Parameter Analysis + +This section aims to investigate some important hyperparameters in our method, including the similarity score threshold $t$ in MPLP, coefficient $\delta$ , and hard negative mining ratio $r\%$ in MMCL. Each experiment varies the value of one hyper-parameter while keeping others fixed. All experiments are conducted with unsupervised ReID setting on both Market-1501 and DukeMTMC-reID. + +Similarity threshold $t$ : Fig.4 investigates the effect of similarity threshold $t$ in MPLP. We vary $t$ from 0.3 to 0.7 and test the model performance. A low similarity score $t$ will harm the model performance. For example, when $t$ is in range [0.3, 0.5], a substantial performance drop can be observed compared with larger $t$ . This is because that, low similarity threshold introduces many negative labels. More accurate labels can be selected as $t$ becomes larger. However, too large $t$ decreases the number of selected labels. The best $t$ is 0.6 for both Market-1501 and DukeMTMCreID. We hence set $t = 0.6$ . + +Coefficient $\delta$ : Table 1 reports the analysis on coefficient $\delta$ of MMCL. As discussed in Sec. 3.3, $\delta$ plays a role to scale the gradient of MMCL. $\delta = 1$ means that we do not scale the gradient. In this case, the MMCL cannot produce large gradients to pull positive samples together, leading to bad performance. For example, the rank-1 accuracy is dropped to $59.3\%$ on Market-1501 and $52.6\%$ on DukeMTMC-reID. As $\delta$ becomes larger, MMCL effectively improves the similarity of positive samples, leading to better performance. However, too large $\delta$ may make the training unstable. According to Table 1, we set $\delta = 5$ . + +Hard negative mining ratio $r\%$ : Fig. 5 shows effects of hard negative mining ratio $r\%$ in network training. $r = 100$ means using all negative classes for loss computation. It is clear that, $r = 100$ is harmful for the performance. This implies that, not all of the negative classes are helpful for unsupervised ReID training. As $r$ becomes smaller, hard negative mining would be activated and it boosts the performance. Too small $r$ selects too few negative classes, hence + +![](images/fabdeacfebc78d1fe7aa8db3db67a1ec3ee3cc651ce45ac57749e335de833a8c.jpg) +Figure 5. Evaluation of hard negative mining ratio $r$ in MMCL. + +![](images/7937c9dda5e30183389634569d63bb52c5cc36f93b5dcd0f63e54e42969d2270.jpg) + +
MethodMarket-1501DukeMTMC-reID
Rank-1mAPRank-1mAP
Supervised87.168.375.957.9
ImageNet Pre-trained7.82.15.11.4
MMCL + Single Label49.017.842.016.6
MMCL + MPLP†66.635.358.036.3
MMCL + MPLP80.345.565.240.2
+ +is also harmful for the performance. According to Fig. 5, $r = 1$ is used in our experiments. + +# 4.4. Ablation Study + +This part evaluates the effectiveness of MPLP and MMCL by making comparison with supervised learning, MMCL+single-class label, and MMCL+MPLP. Experimental results are reported in Table 2, where the performance of ImageNet pre-trained model is also reported as the baseline. As shown in the table, the supervised learning achieves high accuracy, e.g., $87.1\%$ in rank-1 accuracy and $68.3\%$ in mAP on Market-1501. ImageNet pretrained model performs badly on both Market-1501 and DukeMTMC-reID. MMCL with single-class pseudo labels boosts the baseline performance, indicating the validity of leveraging unlabeled dataset in training. Table 2 also shows that, combining MMCL with MPLP significantly boosts the performance, e.g., from baseline $7.8\%$ to $80.3\%$ in rank-1 accuracy on Market-1501. Table 2 also shows that, CamStyle [47] boosts the performance, indicating the importance of data augmentation as discussed in Sec. 3.1. + +Effectiveness of MPLP: To verify that MPLP is a reasonably good solution for label prediction, we compare MPLP against several other label prediction methods, e.g., the KNN search and selection by Similarity Score (SS). Table 3 (a) summarizes the results. From Table 3 (a), we can observe that KNN $(\mathrm{K} = 8$ , which achieves the best performance) achieves $73.3\%$ rank-1 accuracy and $35.4\%$ mAP on Market-1501. Selecting positive labels by Similarity Score (SS) gains improvements over KNN. This indicates that, adaptively select positive labels with similarity threshold is more reasonable than fixing the positive label number for different images. Table 3 (a) also shows that, MPLP achieves the best performance. This indicates that combin + +Table 2. Test of validity of MMCL and MPLP. † denotes not using CamStyle [47] for data augmentation. + +
MethodMarket-1501DukeMTMC-reID
Rank-1mAPRank-1mAP
MMCL + KNN73.335.459.533.5
MMCL + SS77.643.062.738.5
MMCL + MPLP80.345.565.240.2
(a)
CE + Single Label31.49.931.511.8
MMCL + Single Label49.017.842.016.6
CE + Ground Truth85.565.570.450.3
MMCL + Ground Truth86.567.274.556.9
CE + MPLP65.034.260.235.1
MMCL + MPLP80.345.565.240.2
(b)
+ +Table 3. Ablation study on different label prediction algorithms and loss functions. + +ing cycle consistency and similarity score effectively ensure the quality of predicted labels. Visualization of predicted labels by MPLP can be found in Fig. 2. + +Effectiveness of MMCL: To test the validity of MMCL, this part proceeds to compare it against Cross Entropy (CE) loss with different training settings. Experimental results are summarized in Table 3 (b). We first test MPLP and CE using single-class labels for model learning. MMCL gets $49.0\%$ rank-1 accuracy and $17.8\%$ mAP on Market-1501, substantially better than CE. We further test MMCL and CE using ground truth labels for learning. Note that, we modify CE according to [46] to make it applicable in multi-class learning. With ground truth labels, MMCL still performs better than CE, especially on DukeMTMC-reID. We finally test MMCL and CE with labels predicted by MPLP. MMCL still outperforms CE by large margins. Note that, MMCL uses non-parameters classifiers for training. It still achieves comparable performance with the supervised learning in Table 2. Table 3 (b) thus demonstrates the effectiveness of MMCL and the training paradigm of our method. + +# 4.5. Comparison with the State of the Art + +We compare our method against state-of-the-art unsupervised learning and transfer learning approaches on Market1501 [42], DukeMTMC-reID [25] and MSMT17 [31]. Table 4 and Table 5 summarize the comparison. + +Table 4 reports comparisons on Market-1501 and DukeMTMC-reID. We compare two types of methods, including unsupervised learning methods: LOMO [18], BOW [42], BUC [20] and DBC [4], and transfer learning based approaches: PUL [6], PTGAN [31], SPGAN [3], CAMEL [37], MMFA [19], TJ-AIDL [30], HHL [45], ECN [46], MAR [38], PAUL [36], SSG [7], CR-GAN [1], CASCL [32], PDA-Net [17], UCDA [24] and PAST [40]. + +We first compare with unsupervised learning methods. LOMO and BOW utilize hand-crafted features, which show lower performance. BUC and DBC treat each image as a single cluster then merges clusters, thus share certain similarity to our work. However, our method outperforms them by large margins. The reasons could be because: 1) BUC + +
MethodReferenceMarket-1501DukeMTMC-reID
SourceRank-1Rank-5Rank-10mAPSourceRank-1Rank-5Rank-10mAP
LOMO[18]CVPR15None27.241.649.18.0None12.321.326.64.8
BOW[42]ICCV15None35.852.460.314.8None17.128.834.98.3
BUC[20]AAAI19None66.279.684.538.3None47.462.668.427.5
DBC[4]BMVC19None69.283.087.841.3None51.564.670.130.0
OursThis paperNone80.389.492.345.5None65.275.980.040.2
PUL[6]TOMM18Duke45.560.766.720.5Market30.043.448.516.4
PTGAN[31]CVPR18Duke38.6-66.1-Market27.4-50.7-
SPGAN[3]CVPR18Duke51.570.176.822.8Market41.156.663.022.3
CAMEL[37]ICCV17Multi54.5--26.3-----
MMFA[19]BMVC19Duke56.775.081.827.4Market45.359.866.324.7
TJ-AIDL[30]CVPR18Duke58.274.881.126.5Market44.359.665.023.0
HHL[45]ECCV18Duke62.278.884.031.4Market46.961.066.727.2
ECN[46]CVPR19Duke75.187.691.643.0Market63.375.880.440.4
MAR[38]CVPR19MSMT67.781.9-40.0MSMT67.179.8-48.0
PAUL[36]CVPR19MSMT68.582.487.440.1MSMT72.082.786.053.2
SSG[7]ICCV19Duke80.090.092.458.3Market73.080.683.253.4
CR-GAN[1]ICCV19Duke77.789.792.754.0Market68.980.284.748.6
CASCL[32]ICCV19MSMT65.480.686.235.5MSMT59.373.277.537.8
PDA-Net[17]ICCV19Duke75.286.390.247.6Market63.277.082.545.1
UCDA[24]ICCV19Duke64.3--34.5Market55.4--36.7
PAST[40]ICCV19Duke78.38--54.62Market72.35--54.26
Ours (transfer)This paperDuke84.492.895.060.4Market72.482.985.051.4
+ +Table 4. Unsupervised person re-ID performance comparison with state-of-the-art methods on Market-1501 and DukeMTMC-reID. + +
MethodSourceMSMT17
Rank-1Rank-5Rank-10mAP
OursNone35.444.849.811.2
PTGAN [31]Market10.2-24.42.9
ECN [46]Market25.336.342.18.5
SSG [7]Market31.6-49.613.2
Ours (transfer)Market40.851.856.715.1
PTGAN [31]Duke11.8-27.43.3
ECN [46]Duke30.241.546.810.2
SSG [7]Duke32.2-51.213.3
Ours (transfer)Duke43.654.358.916.2
+ +Table 5. Comparison with state-of-the-art methods on MSMT17. + +tries to keep different clusters with similar size, hence could suffer from the issue of imbalanced number of positive labels. MPLP could alleviate this issue by adaptively selecting positive labels for different images. 2) As discussed in ablation studies, MMCL performs better than the cross entropy loss when using memory bank as classifier. Therefore, MPLP and MMCL effectively boost our performance. + +Under the transfer learning setting, our method achieves the best performance on Market-1501 in Table 4. For example, our rank-1 accuracy of on Market-1501 achieves $84.4\%$ , when using DukeMTMC-reID as the source dataset. Similarly, we get $72.4\%$ rank-1 accuracy on DukeMTMC-reID using Market-1501 as the source dataset. Although SSG and PAST achieve slightly better performance, our method is more flexible and can be used without labeled dataset. It is also interesting to observe that, with unsupervised learning setting, our method still outperforms several recent transfer learning methods, e.g., our rank-1 accuracy of $80.3\%$ on Market-1501 vs. $78.38\%$ and $64.3\%$ of PAST [40] and UCDA [24]. + +We also conduct experiments on MSMT17, a larger and more challenging dataset. A limited number of works report performance on MSMT17, i.e., PTGAN [31], ECN [46], and SSG [7]. As table 5 shows, our approach outperforms existing methods by large margins under both unsupervised and transfer learning settings. For example, our method achieves $35.4\%$ and $43.6\% / 40.8\%$ rank-1 accuracy respectively. This outperforms SSG by $11.4\%$ in rank-1 accuracy. The above experiments on three datasets demonstrate the promising performance of our MPLP and MMCL. + +# 5. Conclusion + +This paper proposes a multi-label classification method to address unsupervised person ReID. Different from previous works, our method works without requiring any labeled data or a good pre-trained model. This is achieved by iteratively predicting multi-class labels and updating the network with a multi-label classification loss. MPLP is proposed for multi-class label prediction by considering both visual similarity and cycle consistency. MMCL is introduced to compute the multi-label classification loss and address the vanishing gradient issue. Experiments on several large-scale datasets demonstrate the effectiveness of the proposed methods in unsupervised person ReID. + +Acknowledgement This work is supported in part by The National Key Research and Development Program of China under Grant No. 2018YFE0118400, in part by Beijing Natural Science Foundation under Grant No. JQ18012, in part by Natural Science Foundation of China under Grant No. 61936011, 61425025, 61620106009, 61572050, 91538111. + +# References + +[1] Yanbei Chen, Xiatian Zhu, and Shaogang Gong. Instance-guided context rendering for cross-domain person re-identification. In ICCV, 2019. +[2] J. Deng, W. Dong, R. Socher, L. Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. +[3] Weijian Deng, Liang Zheng, Qixiang Ye, Guoliang Kang, Yi Yang, and Jianbin Jiao. Image-image domain adaptation with preserved self-similarity and domain-dissimilarity for person re-identification. In CVPR, 2018. +[4] Guodong Ding, Salman Khan, Qingze Yin, and Zhenmin Tang. Dispersion based clustering for unsupervised person re-identification. In BMVC, 2019. +[5] Thibaut Durand, Nazanin Mehrasa, and Greg Mori. Learning a deep convnet for multi-label classification with partial labels. In CVPR, 2019. +[6] Hehe Fan, Liang Zheng, Chenggang Yan, and Yi Yang. Unsupervised person re-identification: Clustering and fine-tuning. ACM Transactions on Multimedia Computing, Communications, and Applications (TOMM), 14(4):83, 2018. +[7] Yang Fu, Yunchao Wei, Guanshuo Wang, Yuqian Zhou, Honghui Shi, and Thomas S. Huang. Self-similarity grouping: A simple unsupervised cross domain adaptation approach for person re-identification. In ICCV, 2019. +[8] Michael Gutmann and Aapo Hyvarinen. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. In AISTATS, 2010. +[9] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. +[10] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. +[11] Ahmet Iscen, Giorgos Tolias, Yannis Avrithis, and Ondrej Chum. Mining on manifolds: Metric learning without labels. In CVPR, 2018. +[12] Herve Jegou, Hedi Harzallah, and Cordelia Schmid. A contextual dissimilarity measure for accurate and efficient image search. In CVPR, 2007. +[13] Nikos Komodakis and Spyros Gidaris. Unsupervised representation learning by predicting image rotations. In ICLR, 2018. +[14] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NeurIPS, 2012. +[15] Junnan Li, Yongkang Wong, Qi Zhao, and Mohan Kankanhalli. Unsupervised learning of view-invariant action representations. In NeurIPS, 2018. +[16] Jianing Li, Shiliang Zhang, Qi Tian, Meng Wang, and Wen Gao. Pose-guided representation learning for person re-identification. IEEE Trans. Pattern Anal. Mach. Intell., 2019. +[17] Yu-Jhe Li, Ci-Siang Lin, Yan-Bo Lin, and Yu-Chiang Frank Wang. Cross-dataset person re-identification via unsupervised pose disentanglement and adaptation. In ICCV, 2019. + +[18] Shengcai Liao, Yang Hu, Xiangyu Zhu, and Stan Z Li. Person re-identification by local maximal occurrence representation and metric learning. In CVPR, 2015. +[19] Shan Lin, Haoliang Li, Chang-Tsun Li, and Alex Chichung Kot. Multi-task mid-level feature alignment network for unsupervised cross-dataset person re-identification. In BMVC, 2018. +[20] Yutian Lin, Xuanyi Dong, Liang Zheng, Yan Yan, and Yi Yang. A bottom-up clustering approach to unsupervised person re-identification. In AAAI, 2019. +[21] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I Jordan. Learning transferable features with deep adaptation networks. arXiv preprint arXiv:1502.02791, 2015. +[22] Jianming Lv, Weihang Chen, Qing Li, and Can Yang. Unsupervised cross-dataset person re-identification by transfer learning of spatial-temporal patterns. In CVPR, 2018. +[23] Frederic Morin and Yoshua Bengio. Hierarchical probabilistic neural network language model. In Aistats, 2005. +[24] Lei Qi, Lei Wang, Jing Huo, Luping Zhou, Yinghuan Shi, and Yang Gao. A novel unsupervised camera-aware domain adaptation framework for person re-identification. In ICCV, 2019. +[25] Ergys Ristani, Francesco Solera, Roger Zou, Rita Cucchiara, and Carlo Tomasi. Performance measures and a data set for multi-target, multi-camera tracking. In ECCV, 2016. +[26] Chi Su, Jianing Li, Shiliang Zhang, Junliang Xing, Wen Gao, and Qi Tian. Pose-driven deep convolutional model for person re-identification. In ICCV, 2017. +[27] Chi Su, Fan Yang, Shiliang Zhang, Qi Tian, Larry S Davis, and Wen Gao. Multi-task learning with low rank attribute embedding for person re-identification. In ICCV, 2015. +[28] Chi Su, Shiliang Zhang, Junliang Xing, Wen Gao, and Qi Tian. Deep attributes driven multi-camera person re-identification. In ECCV, 2016. +[29] Chi Su, Shiliang Zhang, Fan Yang, Guangxiao Zhang, Qi Tian, Wen Gao, and Larry S Davis. Attributes driven tracklet-to-tracklet person re-identification using latent prototypes space mapping. Pattern Recognition, 66:4–15, 2017. +[30] Jingya Wang, Xiatian Zhu, Shaogang Gong, and Wei Li. Transferable joint attribute-identity deep learning for unsupervised person re-identification. In CVPR, 2018. +[31] Longhui Wei, Shiliang Zhang, Wen Gao, and Qi Tian. Person transfer gan to bridge domain gap for person re-identification. In CVPR, 2018. +[32] Ancong Wu, Wei-Shi Zheng, and Jian-Huang Lai. Unsupervised person re-identification by camera-aware similarity consistency learning. In ICCV, 2019. +[33] Chao-Yuan Wu, R Manmatha, Alexander J Smola, and Philipp Krahenbuhl. Sampling matters in deep embedding learning. In CVPR, 2017. +[34] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, 2018. +[35] Hongliang Yan, Yukang Ding, Peihua Li, Qilong Wang, Yong Xu, and Wangmeng Zuo. Mind the class weight bias: Weighted maximum mean discrepancy for unsupervised domain adaptation. In CVPR, 2017. + +[36] Qize Yang, Hong-Xing Yu, Ancong Wu, and Wei-Shi Zheng. Patch-based discriminative feature learning for unsupervised person re-identification. In CVPR, 2019. +[37] Hong-Xing Yu, Ancong Wu, and Wei-Shi Zheng. Cross-view asymmetric metric learning for unsupervised person re-identification. In CVPR, 2017. +[38] Hong-Xing Yu, Wei-Shi Zheng, Ancong Wu, Xiaowei Guo, Shaogang Gong, and Jian-Huang Lai. Unsupervised person re-identification by soft multilabel learning. In CVPR, 2019. +[39] Min-Ling Zhang and Zhi-Hua Zhou. A review on multi-label learning algorithms. IEEE transactions on knowledge and data engineering, 26(8):1819-1837, 2013. +[40] Xinyu Zhang, Jiewei Cao, Chunhua Shen, and Mingyu You. Self-training with progressive augmentation for unsupervised cross-domain person re-identification. In ICCV, 2019. +[41] Zhilu Zhang and Mert Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. In NeurIPS. 2018. +[42] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In ICCV, 2015. +[43] Liang Zheng, Yi Yang, and Alexander G Hauptmann. Person re-identification: Past, present and future. arXiv preprint arXiv:1610.02984, 2016. +[44] Zhun Zhong, Liang Zheng, Donglin Cao, and Shaozi Li. Reranking person re-identification with k-reciprocal encoding. In CVPR, 2017. +[45] Zhun Zhong, Liang Zheng, Shaozi Li, and Yi Yang. Generalizing a person retrieval model hetero-and homogeneously. In ECCV, 2018. +[46] Zhun Zhong, Liang Zheng, Zhiming Luo, Shaozi Li, and Yi Yang. Invariance matters: Exemplar memory for domain adaptive person re-identification. In CVPR, 2019. +[47] Zhun Zhong, Liang Zheng, Zhedong Zheng, Shaozi Li, and Yi Yang. Camera style adaptation for person re-identification. In CVPR, 2018. \ No newline at end of file diff --git a/unsupervisedpersonreidentificationviamultilabelclassification/images.zip b/unsupervisedpersonreidentificationviamultilabelclassification/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..21d4668baeaf5b3ede9c5b31f6b9b7eaabb9969d --- /dev/null +++ b/unsupervisedpersonreidentificationviamultilabelclassification/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:292707973e0da2fc9c8991069b7a37f901e6afaa076b3717e2a1192180800ecb +size 543567 diff --git a/unsupervisedpersonreidentificationviamultilabelclassification/layout.json b/unsupervisedpersonreidentificationviamultilabelclassification/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..43942664187e85d2c541c75c0acbd2cd184f0280 --- /dev/null +++ b/unsupervisedpersonreidentificationviamultilabelclassification/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dee093a9519b96a121e17c928209774acd5f5a03f9201343ed7bf69edfcc1d2 +size 478791 diff --git a/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/72ec0f07-ca5a-4cf1-9d23-7bb361e3818a_content_list.json b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/72ec0f07-ca5a-4cf1-9d23-7bb361e3818a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6061a955c4fc66a086dbea86d34740ebbe0d3e4b --- /dev/null +++ b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/72ec0f07-ca5a-4cf1-9d23-7bb361e3818a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6eb766bf18822703a17f16774447849acdc80aee058673c761d3e3dca34b674a +size 77712 diff --git a/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/72ec0f07-ca5a-4cf1-9d23-7bb361e3818a_model.json b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/72ec0f07-ca5a-4cf1-9d23-7bb361e3818a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fd085bb7155e7c924fb93bb2b03cf16f5bfd0300 --- /dev/null +++ b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/72ec0f07-ca5a-4cf1-9d23-7bb361e3818a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4d1d8b52b3313b0cf536003ba2b7ef71e538853ff73a58b1c08b665c721855a +size 95700 diff --git a/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/72ec0f07-ca5a-4cf1-9d23-7bb361e3818a_origin.pdf b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/72ec0f07-ca5a-4cf1-9d23-7bb361e3818a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e25edb5fb402ddc2ba4c2a442f4812754ba9f150 --- /dev/null +++ b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/72ec0f07-ca5a-4cf1-9d23-7bb361e3818a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6dba3265d94aa63d794ad790f5201be64b8903dcdc72e3098f1949ec753b61a8 +size 402539 diff --git a/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/full.md b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0ff74c40ec82a18eb0f74bcf5454a8bd5b794a03 --- /dev/null +++ b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/full.md @@ -0,0 +1,318 @@ +# Unsupervised Person Re-identification via Softened Similarity Learning + +Yutian Lin $^{1*}$ , Lingxi Xie $^{2}$ , Yu Wu $^{3,4}$ , Chenggang Yan $^{1}$ , Qi Tian $^{2\dagger}$ + +$^{1}$ Hangzhou Dianzi University, $^{2}$ Huawei Inc., $^{3}$ Baidu Research, $^{4}$ ReLER, University of Technology Sydney + +yutianlin477@gmail.com, 198808xc@gmail.com, yu.wu-3@student.uts.edu.au, + +cgyan@hdu.edu.cn, tian.qil@huawei.com + +# Abstract + +Person re-identification (re-ID) is an important topic in computer vision. This paper studies the unsupervised setting of re-ID, which does not require any labeled information and thus is freely deployed to new scenarios. There are very few studies under this setting, and one of the best approach till now used iterative clustering and classification, so that unlabeled images are clustered into pseudo classes for a classifier to get trained, and the updated features are used for clustering and so on. This approach suffers two problems, namely, the difficulty of determining the number of clusters, and the hard quantization loss in clustering. In this paper, we follow the iterative training mechanism but discard clustering, since it incurs loss from hard quantization, yet its only product, image-level similarity, can be easily replaced by pairwise computation and a softened classification task. With these improvements, our approach becomes more elegant and is more robust to hyperparameter changes. Experiments on two image-based and video-based datasets demonstrate state-of-the-art performance under the unsupervised re-ID setting. + +# 1. Introduction + +Given a query image, person re-identification (re-ID) aims to match the person across multiple non-overlapped cameras. In the last few years, person re-ID has drawn increasing research attention [12, 45, 46, 25, 24, 23], due to its wide range of applications such as finding people of interest (e.g., lost kids or criminals) and person tracking. However, most of the proposed methods are of supervised manner, which requires intensive manual labeling and is not applicable to real-world applications. To relieve the scalability problem, in this paper, we focus on the unsupervised re-ID task. + +![](images/8763b084c91fa2ffeb54f66596a67bd5ff19fcbe8c620c6b8921e2ef0f736e89.jpg) +Figure 1. (a) Unlabeled images are represented as gray circles in the feature space. The image A and B are of the same person, with an initialized distance of 0.5. The image C is from another person. (b) The clustering based unsupervised re-ID method roughly divides images into classes for network training. Although images A and B are of the same identity, they are assigned with different pseudo labels and learn to be separated. (c) Our method push circles in similar colors (similar images) closer with a soft constraint. + +![](images/7171a0f9fc942283081aa7ce1a6958db3512668fd05fcfedeb769ec9cfb21052.jpg) +(a) Unlabeled feature space + +![](images/f8ef359035500f9cf3e19a30f68e1081e68368fce9fa665fe990330845e75684.jpg) + +![](images/4cd6bf9d161fdcee715053b06979d7e3a787d7e68f12021fe53dbbd421688ea3.jpg) +(b) Clustering based method + +![](images/5fbb8fdc0c500484dea4c5d0828e8b407288b43643d1b3c4a7a8d338353cce5e.jpg) + +![](images/d33f25b49a0aea0a9f2ea04318a6f29403fc848aac25aad40f43c96fd6058813.jpg) +(c) Our method + +![](images/7bbbb81276a3ae9795c6150b8d150439b10dd80f1d2783af01daa9eb46827acd.jpg) + +![](images/f04452a3363a93449470744d72227731fefb23559a8b1cb981411fba8c2b02e8.jpg) + +![](images/b7e8f9785488061ba403ee3a8213178f6bbe50e7845182f0ca2ffcc74273b9bc.jpg) + +Different from the unsupervised domain adaptation (UDA) methods [28, 37, 41] that leverage the prior knowledge learned from other re-ID datasets, in this paper, we aim to solve the problem without any re-ID annotation. A branch of methods [4, 14, 15] were verified effective, which adopted an iterative clustering and deep learning mechanism, where the network was trained based on the pseudo labels generated by unsupervised clustering. However, the clustering based methods roughly divided images into clusters for training, which made the model highly depends on the clustering result. As shown in Figure 1 (b), images of the same person could be divided into different clusters, which are further trained to be separated with the wrong assigned pseudo label. Since mistakes of unsupervised clustering are inevitable, learning with a hard quantization loss can be prone to fit the noisy labels produced by clustering. + +In this paper, we propose a new framework of unsupervised learning in which clustering is no longer required, and thus the error of the hard quantization loss is relieved. As illustrated in Figure 1 (c), instead of using explicit labels + +generated by clustering, we mine the relationship between unlabeled images as a gentle constraint to make similar images have closer representations. Specifically, our framework adopts a classification network with softened labels, where the softened labels reflect the image similarity. Unlike the original one-hot labels that force images belonging to an exact class, we treat the labels as a distribution, that an image is encouraged to be associated with several related classes. For each training data, the network is trained not only to predict the ground-truth class, but motivated to predict the similar classes. The learned embedding is then close to similar ones and has a long distance from irrelevant images. On the one hand, without learning with the hard labels, the hard quantization error is eliminated. On the other hand, the supervision of the softened label is relatively weak, which also provides more room for the algorithm. In order to fully exploit the potential of the model, we introduce some auxiliary information to help find similar images. Specifically, when measuring the similarity between images, camera ID and partial details of each pedestrian image are studied. To relieve the issue of camera variance, we propose the cross-camera encouragement term (CCE) that promotes the softened similarity learning from images under different camera views. In this way, the model will learn from more diverse data. Note that the camera ID is automatically obtained at the moment of capturing and is no need for human labeling. Moreover, we extract part features and consider the partial details along with the global appearance as an additional clue. + +We evaluate the proposed method on two image-based and two video-based re-ID datasets. The experimental results reveal that our method is robust and stable during iterations via softened similarity learning. Our method outperforms state-of-the-art unsupervised methods on all the four datasets. With the high accuracy and the advantage that does not require any annotations, our approach is easy to be deployed in real-world applications. + +Our contributions can be summarized in two-fold. First, we propose an unsupervised re-ID framework via softened similarity learning. A classification network is adopted with re-assigned soft label distribution to learn from similar images with smooth constraint. By pushing each person images to get closer to similar images and pushing all other person images away from each other, our framework learns a robust and discriminative model with high potential. Second, to make use of the high potential model, we introduce auxiliary information to guide similarity estimation. A cross-camera encouragement (CCE) term is proposed to encourage the similarity exploration between images of different camera views. The fine-grained details are also considered when measuring similarity. These strategies are also proven effective when plugging in other unsupervised re-ID methods. + +# 2. Related Works + +# 2.1. Supervised Person Re-identification + +Most re-ID methods are in a supervised manner, in which sufficient labeled images are given. Recently, with the developing of deep learning approaches [36, 35, 34], methods with convolutional neural networks have dominated the re-ID community [12, 26, 45, 46, 25, 16]. Specifically, methods proposed to learn discriminative features from parts of pedestrian images achieve impressive performance [24, 8, 23]. For example, in [24], the feature maps are cut into uniform pieces for classification, and the part-informed features are assembled as the descriptor. A refined part pooling is further proposed to reinforce the within-part consistency in each part. + +In our paper, we focus on unsupervised re-ID without annotated labels. We take advantage of the strategy of learning from the part. To exploit the fine-grained information, we directly divide the global feature into horizontal pieces to measure the similarity between each pair of the corresponding parts. + +# 2.2. Unsupervised Domain Adaptation + +To relieve the scalability problem of supervised re-ID, some unsupervised domain adaptation methods (UDA) [21, 4, 28, 3, 29, 1, 18] were proposed to learn a re-ID model from a labeled source domain and an unlabeled target domain. Wang et al. [28] proposed to learn an attributesemantic and identity discriminative representation from the source dataset, which is transferable to the target domain. In [37], a PatchNet pre-trained on the source dataset is used to generate pedestrian patches. A network is then designed to pull similar patches together and push the dissimilar patches. In [41], a soft multilabel is learned for each unlabeled person by comparing the unlabeled person with a set of known reference persons from the source domain. Zhong et al. [49] proposed a framework that consists of a classification module and an exemplar memory module, which calculates the cross-entropy loss for labeled source data and saves the up-to-date features for target data and computes the invariance learning loss for unlabeled target data, respectively. + +Unsupervised domain adaptation methods usually obtain impressive performance. However, these methods take advantage of the external source domain, which is annotated with cross-camera identity labels. In contrast, we focus on the fully unsupervised re-ID task without any external dataset or identity annotation. + +# 2.3. Unsupervised Person Re-identification + +The traditional unsupervised methods usually fall into three categories, designing hand-craft features [6, 5, 13, 17, 20], exploiting localized salience statistics [43, 42, 27] + +![](images/61c57321b812015f69aeb1db6ecd1ef699146b0aca9063c8b9885f3ad358d93f.jpg) +Figure 2. Overview of our method. First, a baseline network with hard label distribution is adopted for initialization, which is shown following the red arrows. Subsequently, with the initialized network, three procedures are conducted iteratively: 1. Feature embeddings of training images are extracted; 2. Similarity among images is estimated to re-assign the target label; 3. The network is re-trained with the softened labels. These procedures are shown following the blue arrows. Notably, the procedures with red arrows are conducted once, while the procedures with blue arrows are conducted iteratively. + +or dictionary learning based methods [10, 9]. The performances of these methods are usually low, because it is challenging to design features for images captured by different cameras, under different illumination and view condition. In [40], camera information is used to learn view-specific projection for each camera view by jointly learning the asymmetric metric and seeking optimal cluster separations. However, this method is not suitable for dataset captured by multiple cameras, because the view-specific projection is learned from a pair of cameras. + +Recently, Lin et al. [14] proposed a bottom-up clustering framework that iteratively trains a network based on the pseudo label generated by unsupervised clustering. However, due to the clustering error, images could be assigned wrong pseudo labels, and the network will then affected by the hard quantization error. Moreover, the clustering is applied based on the clustering result in previous iterations, which accumulates the clustering error during iterations. On the contrary, we propose a framework that mines the similarity as a soft constraint. By regarding each training image as a different class and training with the softened label distribution, we avoid quantization loss and provide more room for the algorithm. + +# 3. Proposed Method + +In this paper, we focus on the unsupervised re-ID problem. Given a training set of pedestrian images, we aim to learn a feature embedding function for the person images by exploring the image relationship instead of using human annotations. Then, in the evaluation stage, for both query data and gallery data, we use the learned feature embedding function to embed each image into the feature space. The query result is a ranking list of all testing images according to the Euclidean distance between the feature embedding of + +the query and testing data. + +Under the unsupervised setting, the image labels are unknown, so that we regard each image as a different class to initialize a network and gradually mine similarity among unlabeled images as gentle supervision. As illustrated in Figure 2, our framework combines three sub-components (shown in three colored rectangles): (1) A baseline classification network is adopted to classify each image into different classes. The baseline is used as initialization to generate feature representations; (2) The similarity between unlabeled images is explored based on the feature embedding and the auxiliary information to select reliable images for each training data; (3) The target label distribution is softened according to the reliable images, and the network is fine-tuned with the softened labels to pull the selected reliable images together and repel the other images. + +# 3.1. Baseline: Initialization with Hard Labels + +Under an unsupervised person re-ID setting, suppose we have a training set $\mathcal{X} = \{x_1,x_2,\dots,x_N\}$ , where each $x_{i}$ is an unlabeled person image. Our goal is to learn a feature embedding function $\phi (\theta ;x_i)$ from $\mathcal{X}$ without any manual annotation, where parameters of $\phi$ are collectively denoted as $\theta$ . Since we do not have ground truth identity label for each image $x_{i}$ , initially we assign each training data $x_{i}$ by its index, i.e., $\{y_{i} = i\mid 1\leq i\leq N\}$ . $y_{i}$ is the initial pseudo label for data $x_{i}$ . In this way, each training image is assumed to fall into an individual class by itself. + +Following [33, 32, 14], we adopt the classification model with a non-parametric classifier, where a lookup table is used to store the features of all training images. The stored feature of each image is then used as the weight vector of each class. We formulate the classification objective using the softmax criterion. For each image $x$ , we normalize its + +feature $||\pmb{v}|| = 1$ via $\pmb{v} = \frac{\phi(\pmb{\theta};x)}{||\phi(\pmb{\theta};x)||}$ . Then the probability of an image belongs to the $i$ -th class is defined as: + +$$ +p \left(y _ {i} \mid x, \boldsymbol {V}\right) = \frac {\exp \left(\boldsymbol {V} _ {i} ^ {\top} \boldsymbol {v} / \tau\right)}{\sum_ {j = 1} ^ {N} e x p \left(\boldsymbol {V} _ {j} ^ {\top} \boldsymbol {v} / \tau\right)}, \tag {1} +$$ + +where $\mathbf{V} \in \mathbb{R}^{N \times n_{\phi}}$ is the lookup table that stores the feature of each class, $V_{j}$ is the $j$ -th column of $\mathbf{V}$ which indicates the feature of $j$ -th class. $N$ is the number of classes, which is the same as the number of training images. $\tau$ is a temperature parameter [7] that controls the softness of probability distribution over classes. We set $\tau = 0.1$ following [33]. + +The loss function is formulated as: + +$$ +\mathcal {L} = - \sum_ {j = 1} ^ {N} \log (p \left(y _ {j} \mid x _ {i}, \boldsymbol {V}\right) t \left(y _ {j}\right), \tag {2} +$$ + +where $t(y_{j})$ is the conditional empirical distribution over class labels. We set the probability of the distribution to 1 for the ground truth class, and 0 for all other classes. + +The objective Eq. 2 maximizes the cosine distance between each image feature $\pmb{v}_i$ and each features in the lookup table $V_{j\neq y_i}$ , while minimizes the cosine distance between each image feature $\pmb{v}_i$ and the corresponding centroid feature $V_{j = y_i}$ . + +# 3.2. Model Learning with Softened Similarity + +The initialized baseline network learns to recognize each unlabeled image and obtains an initial discriminative ability. By Eq. 1, each training sample is learned to push other training images away. However, there are images of the same identity, which are supposed to be close in the feature space. Forcing the images of the same person to have obviously different representations will have a negative effect on the network. Inspired by ECN [49, 50], we propose to learn a similar representation for images that estimated to be the same identity. + +To find the images of the same identity, we select images with the smallest dissimilarity for each training sample. For two images $x_{a}$ and $x_{b}$ , we define the dissimilarity between the two images as the distance between two images, i.e., $D(x_{a},x_{b}) = d(x_{a},x_{b})$ , where the distance is calculated as the Euclidean distance between the two image features, i.e., $d(x_{a},x_{b}) = \| \phi (\pmb {\theta};x_{a}) - \phi (\pmb {\theta};x_{b})\|$ . Then for each training image $x_{i}$ , $k$ images with the smallest dissimilarity are selected as reliable images. We define a reliable image set $\mathcal{X}_i^{\mathrm{reliable}} = \{x_i^1,x_i^2,\dots x_i^k\}$ with label $\mathcal{Y}_i^{\mathrm{reliable}} = \{y_i^1,y_i^2,\dots y_i^k\}$ . Each element $x_{i}^{j}$ is estimated to be the same identity as $x_{i}$ , and each class $y_{i}^{j}$ is regarded as reliable class. + +Instead of taking reliable images as the same class for training, we propose a softened classification network that + +learns the similarity among identities in a more smooth way. During training, we want the network could not only predict each image into the ground truth class, but make it acceptable to predict the training image into reliable classes. Therefore, we re-assign a nonzero value to the reliable classes in the target label. The target label distribution for data $x_{i}$ is then written as: + +$$ +t \left(y _ {j}\right) = \left\{ \begin{array}{l l} \lambda , & y _ {j} = y _ {i} \\ (1 - \lambda) / k, & y _ {j} \in \mathcal {Y} _ {i} ^ {\text {r e l i a b l e}} \\ 0, & \text {o t h e r w i s e} \end{array} , \right. \tag {3} +$$ + +where $\lambda$ is a hyper-parameter that balances the effect of the ground truth class and the reliable classes. When $\lambda$ is 1, Eq. 3 reduces to the function with only 0,1 options in the baseline network, that the model learns to recognize each image but fails to learn the similarity and consistency among images of the same person. On the other hand, when $\lambda$ is too small, the model may fail to predict the ground truth label. + +Comparing with the baseline network, the images are labeled with soft label distribution (which denotes probabilities) rather than hard 0,1 labels. The labels are no longer the ground truth classes, but probabilities over $k$ possible reliable classes. By taking reliable classes into account, the confidence of the ground-truth class is reduced, and the confidence of the reliable classes is increased, which guides the network to learn the similarity among images of the identity smoothly. With Eq. 2 and Eq. 3, we define the softened cross-entropy loss as: + +$$ +\begin{array}{l} \mathcal {L} = - \lambda \log (p (y _ {i} | x _ {i}, V) \\ - \frac {1 - \lambda}{k} \sum_ {j = 1} ^ {k} \log \left(p \left(y _ {i} ^ {j} \mid x _ {i}, \mathbf {V}\right), \right. \tag {4} \\ \end{array} +$$ + +The proposed objective not only minimizes the cosine distance between each image feature and the ground truth feature in the lookup table, but minimizes the distance between the features of each image and its reliable images. Meanwhile, the cosine distance between each image feature and the features from other classes is maximized. + +With the softened classification network, we gradually learn a feature that is close to reliable images. The learning of the reliable classes is soft and gentle that tries to avoid the negative impact when we involve wrong images in the reliable set. On the other hand, the relatively weak supervision signal makes the model freer and has a higher potential. In this way, we could leverage auxiliary information to help learn a better model. In experiments, we validate that with auxiliary information, the softly learned model performs better than the model learned with hard labels, and will discuss later in Section 4.4. + +![](images/9dd89a5fa126aad7a02d691cfffea0bfa1493fd8243158390ea2b6b03ab0caec.jpg) +Figure 3. Illustration of the cross-camera encouragement term. When calculating the dissimilarity with and without CCE, the chosen reliable images are different. CCE promotes to find the cross-camera ground truth, instead of the hard negative sample. The negative images are shown in red. + +# 3.3. Similarity Estimation with Auxiliary Information + +As illustrated in Section 3.2, for each training sample, $k$ images with the smallest dissimilarity are selected to be reliable. To introduce additional priors for constraints, we also think of other resources to help estimate the similarity. + +Part similarity exploration. To assist the similarity measurement between the global feature, we propose to consider the similarity between part features (details) as well. Following [24], we extract the CNN feature map and divide it into $p$ horizontal stripes. Each partition feature is then average pooled to be a part-level feature embedding. We take the average distance of the corresponding parts as the part distance between two images. The part distance between two images $x_{a}$ and $x_{b}$ is then formulated as: + +$$ +d _ {\text {p a r t}} \left(x _ {a}, x _ {b}\right) = \frac {\sum_ {i = 1} ^ {p} \left\| \phi^ {i} (\boldsymbol {\theta} , x _ {a}) - \phi^ {i} (\boldsymbol {\theta} , x _ {b}) \right\|}{p}, \tag {5} +$$ + +where $\phi^i$ is the $i$ -th part feature embedding function. + +The cross-camera encouragement term (CCE) that added to the dissimilarity to promote images captured by different cameras be viewed as reliable images. The intuition of adding CCE is two-fold. First, comparing to inner-camera pairs, the image pairs of different camera ID would teach the network to learn cross-camera information. As a result, the model predicts similar features for a person under different camera views, which benefits the re-ID task. Second, there are many different pedestrians wearing similar clothes that appear under the same camera. CCE helps to find the cross-camera ground truth, instead of these hard negative samples. As shown in Figure 3, without CCE, although the query and the image captured by camera 3 belong to the same person, their dissimilarity is large (8) due to the camera gap. Even a negative example (the one in red) has a smaller distance to the query since they come from the same camera. + +Specifically, we denote the camera ID of the training samples as $\mathcal{C} = \{c_1,c_2,\dots ,c_N\}$ . The CCE between two + +images $x_{a}$ and $x_{b}$ is formulated as: + +$$ +\operatorname {C C E} \left(x _ {a}, x _ {b}\right) = \left\{ \begin{array}{l l} \lambda_ {c}, & c _ {a} = c _ {b} \\ 0, & c _ {a} \neq c _ {b} \end{array} , \right. \tag {6} +$$ + +where $\lambda_{c}$ is the parameter that controls the strength of cross-camera promotion. With the CCE term, the dissimilarity between images with the same camera ID is increased. Thus CCE helps to incorporate more cross camera images in the reliable set, and reduce some inner-camera negative images. + +Overall dissimilarity. Considering the part similarity exploration and the cross-camera encouragement, the overall dissimilarity $D(x_{a},x_{b})$ between the image $x_{a}$ and $x_{b}$ is then formulated as: + +$$ +\begin{array}{l} D \left(x _ {a}, x _ {b}\right) = \left(1 - \lambda_ {p}\right) d \left(x _ {a}, x _ {b}\right) + \lambda_ {p} d _ {\text {p a r t}} \left(x _ {a}, x _ {b}\right) \tag {7} \\ + \operatorname {C C E} \left(x _ {a}, x _ {b}\right), \\ \end{array} +$$ + +where $\lambda_{p}$ balances the contribution of the global and part similarity. As shown in the green component of Figure 2, the dissimilarity between two images consists of the global distance, the part distance, and the cross-camera encouragement term. By computing the global and the part distance, the similarity of the global appearance and local details are measured, which guarantees the accuracy of reliable image selection. By adding the CCE term, images from different cameras tend to be selected as reliable ones, which enables the network to learn from diverse images. Both of them benefit the discriminative ability of the trained model. + +# 4. Experiments + +# 4.1. Datasets and Implementation Details + +The Market1501 dataset [45] is a large-scale dataset captured by 6 cameras for person re-ID. It contains 751 identities for training and 750 identities for testing. The training set, gallery set and query set contain 12936 images, 19732 images and 3368 query images, respectively. + +The DukeMTMC-reID dataset [47] is a subset of the DukeMTMC dataset [22]. It contains 1812 identities captured by 8 cameras. Using the evaluation protocol specified in [47], we obtain 2228 query images, 16522 training images and 17661 gallery images. + +The MARS dataset [44] is a large-scale video-based dataset for person re-ID. The dataset contains 17503 video tracklets of 1261 identities, where 625 identities are used for training and 636 identities are used for testing. + +The DukeMTMC-VideoReID dataset [31] is a video-based re-ID dataset derived from the DukeMTMC dataset [22]. It contains 2196 tracklets of 702 identities for training, 2636 tracklets of other 702 identities for testing. + +Implementation details. We adopt ResNet-50 as the CNN backbone and initialize it by the ImageNet [11] pretrained model with the last classification layer removed. + +
MethodsSettingMarket-1501DukeMTMC-reID
rank-1rank-5rank-10mAPrank-1rank-5rank-10mAP
OIM [33]Unsupervised38.058.066.314.024.538.846.011.3
EUG [31]OneEx49.866.472.722.545.259.263.424.5
ATNet [18]UDA55.773.274.925.645.159.564.224.9
ProLearn [30]OneEx55.872.378.426.248.863.468.428.5
SPGAN [3]UDA58.176.082.726.746.962.668.526.4
TJ-AIDL [28]UDA58.2--26.544.3--23.0
BUC [14]Unsupervised61.071.676.430.640.252.757.421.9
HHL [48]UDA62.278.884.031.446.961.066.727.2
BaselineUnsupervised34.454.162.313.216.529.937.37.9
Ours (w/o part and CCE)Unsupervised58.770.476.329.831.648.353.417.4
Ours (w/o part)Unsupervised68.480.884.135.149.261.365.826.4
OursUnsupervised71.783.887.437.852.563.568.928.6
+ +Table 1. Comparison with the state-of-the-art methods on the two image-based re-ID datasets, i.e., the Market-1501 dataset and the DukeMTMC-reID dataset. In the column "Setting", "UDA" denotes the unsupervised domain adaptation methods. "OneEx" denotes the methods use the one-example annotation, in which each person in the dataset is annotated with one labeled example. + +
MethodsSettingMARSDukeMTMC-VideoReLUID
rank-1rank-5rank-10mAPrank-1rank-5rank-10mAP
OIM [33]Unsupervised33.748.154.813.551.170.576.243.8
DGM+IDE [39]OneEx36.854.0-16.842.357.969.333.6
Stepwise [19]OneEx41.255.5-19.656.270.379.246.7
RACE [38]OneEx43.257.162.124.5----
DAL [2]Unsupervised49.365.972.223.0----
BUC [14]Unsupervised57.972.375.934.776.288.391.068.3
EUG [31]OneEx62.674.9-42.472.784.1-63.2
OursUnsupervised62.877.280.143.676.488.791.069.3
+ +Table 2. Comparison with the state-of-the-art methods on two video-based re-ID datasets, MARS and DukeMTMC-VideoReID. In the column "Setting", "OneEx" denotes the methods use the one-example annotation, in which each person in the dataset is annotated with one labeled example. "UDA" denotes the unsupervised domain adaptation methods. + +The number of training epochs for the baseline network is set to be 25 for image-based datasets and 30 for video-based, the batch size is set to be 16, the dropout rate is set to be 0.5. The $\lambda$ is set to 0.6. The $\lambda_{p}$ and $\lambda_{c}$ are set to be 0.5 and 0.02 respectively. The number of parts $p$ is set to be 8. We use stochastic gradient descent with a momentum of 0.9 to optimize the network. The learning rate is initialized to 0.1 and changed to 0.01 after 15 epochs. For video-based datasets, we take the average feature of all frames within a tracklet to be the tracklet feature. We implement our method on both PaddlePaddle and PyTorch. On Market-1501 and DukeMTMC-reID, it takes about 4 hours to finish the training procedure with a GTX 1080TI GPU. On Mars and DukeMTMC-VideoReID, it takes about 12 hours. + +# 4.2. Comparison with the State-of-the-Arts + +Image-based Person Re-identification. The comparisons with the state-of-the-art algorithms on Market-1501 and DukeMTMC-reID are shown in Table 1. On Market-1501, under the same setting, we obtain the best performance among the compared methods with rank-1 = 71.7%, + +$\mathrm{mAP} = 37.8\%$ . Compared to the state-of-the-art unsupervised method BUC [14], we achieve 10.7 points and 7.2 points improvement on rank-1 accuracy and mAP, respectively. On DukeMTMC-reID, compared to BUC, our method achieves 12.3 and 6.7 points of improvement on rank-1 accuracy and mAP, respectively. The impressive performance indicates that the softened similarity learning successfully finds images of the same identity and encourages reliable images gathered in the feature space. The proposed CCE helps to learn a discriminative model cross-camera, while the part similarity estimation helps to maintain an accurate reliable image selection. + +Video-based Person Re-identification. The comparisons with the state-of-the-art algorithms on the two video-based datasets are shown in Table 2. On MARS, we obtain rank-1 = 62.8%, mAP = 43.6%. Compared to BUC [14], We achieve 4.9 and 8.9 points of improvement in rank-1 accuracy and mAP, respectively. On DukeMTMC-VideoReID, we achieve rank-1 of 76.4% and mAP of 69.3%, which beats BUC by 0.2 and 1.0 points, respectively. The performance gap between ours and BUC is relatively small on + +![](images/affa9a2f3d0226021fa769a087ddc8cd5a037988acd1a1404ce9aa5d9afa03b9.jpg) +(a) The number of iterations + +![](images/f0cd1dfac8181c3045f6a15a1809132af3b21f8c47fba4d13ecd6b67cef929a4.jpg) +(b) The parameter $\lambda$ + +![](images/8d9672e4a54d81bb456f078fb151810af0abc08002a21c7a7e200a793deabf77.jpg) +(c) The parameter k + +![](images/8a8a74e1e229e2bbd40036ae141c35f6669d55fae0b6770306a578bb9072663d.jpg) +(d) The parameter $\lambda_{\mathrm{c}}$ + +![](images/3ceb7f2413f8b9fb2f7b7d44595cf31a8a3ed63b530a8caa498af069baade669.jpg) +(e) The parameter $\lambda_{\mathrm{p}}$ + +![](images/0229615df5243079abdcedd6eaa2cd3d5b9781adc8bf10de7359f769c065117d.jpg) +(f) The number of parts +Figure 4. Parameter and method analysis on Market-1501. (a) The performance along with iterations. (b) The impact of $\lambda$ for softened classification. (c) The impact of the number of reliable images $k$ . (e) The impact of $\lambda_{c}$ for CCE. (e) The impact of $\lambda_{p}$ for part distance. (f) The impact of the number of parts. + +DukeMTMC-VideoReID. We suspect that, the rank-1 accuracy of BUC is $76.2\%$ , which is quite high under the unsupervised setting, and it is more difficult to make progress upon a high performance. Note that without any annotation, we still beat the EUG method in the one-example setting, where each person is annotated a tracklet as labeled data. + +# 4.3. Diagnostic Studies + +Robustness test. Figure 4 (a) illustrates the re-ID performance over iterations. Throughout iterations, the rank-1 accuracy constantly increases from $34.4\%$ to $71.7\%$ , which indicates that the model grows robust steadily. After the $16^{\text{th}}$ iteration, the re-ID performance stops to increase and shows a slight decrease. Note that, from the $10^{\text{th}}$ iteration to the $25^{\text{th}}$ iteration, our method always maintains a high re-ID performance, i.e. with a rank-1 accuracy higher than $69\%$ , which demonstrates the robustness of the proposed method. + +The impact of the hyper-parameter $\lambda$ . In Eq. 3, the hyper-parameter $\lambda$ controls the degree of softening, which balances the impact of the ground truth class and the selected reliable classes. When $\lambda$ is 0, each training image is learned to be predicted to the reliable classes. When $\lambda$ is 1, each training image will be predicted to its own ground + +truth class. We vary $\lambda$ from 0.1 to 0.9 in Figure 4 (b), and observe that, when $\lambda$ increases from 0.1 to 0.6, the re-ID performance continues increasing. When $\lambda$ continually gets larger, we observe a obvious drop on re-ID performance. + +The impact of the number of reliable images $k$ . Figure 4 (c) shows how the re-ID performance varies with different numbers of reliable images, $k$ . We observe that as $k$ increases from 0 to 4, the re-ID performance continues rising, and the performance begins to drop when $k$ gets larger. The reason is that when $k$ is too small, the learned similarity of one identity is not adequate, which makes the model difficult to match images of the same identity. When $k$ is too large, error cases will be involved in the reliable set, which harms the network training when forcing images of different persons to get closer. + +The impact of the cross-camera encouragement term. As shown in Table 1, on Market-1501, the results of Ours (w/o part) beat Ours (w/o part and CCE) by 9.7 and 5.3 points on rank-1 and mAP respectively. On DukeMTMCreID, the improvements on rank-1 and mAP are 17.6 and 9.0, respectively. The impressive improvements demonstrate the effectiveness of the CCE module. Without CCE, images of one identity from different cameras are hard to be + +
DatasetAuxiliaryOursBUC
rank-1mAPrank-1mAP
Market-1501None58.729.861.030.6
CCE68.435.165.931.8
CCE+part71.737.869.536.2
DukeMTMCNone31.617.440.221.9
CCE49.226.448.324.4
CCE+part52.528.651.525.1
+ +Table 3. Comparison with BUC [14] on Market-1501 and DukeMTMC-reID. The column "Auxiliary" lists the auxiliary information utilized by the method. + +selected as reliable images because of the camera variance. CCE encourages cross-camera image selection, which enables the model learning from diverse images and getting robust to camera views. Besides, we evaluate CCE based on BUC [14], and the result is shown in Table 3. We observe that on Market-1501, the improvements of using CCE are 4.9 points for rank-1 and 1.2 points for mAP. This further indicates that CCE is effective and can be easily adopted to other unsupervised methods to achieve better performance. + +The parameter $\lambda_{c}$ of CCE balances the effect of appearance and camera diversity. We evaluate different values of $\lambda_{c}$ in Figure 4 (d). As $\lambda_{c}$ increases from 0 to 0.02, the rank-1 accuracy on Market-1501 increases from $65.4\%$ to $71.7\%$ . If we set $\lambda_{c}$ to be greater than 0.02, the too large encouragement term would lead to a negative effect on the performance. + +The impact of part similarity. As shown in Table 1, on Market-1501, the results of Ours beat "Ours (w/o part)" by 3.3 and 2.7 points on rank-1 accuracy and mAP, respectively. On DukeMTMC-reID, the improvements on rank-1 and mAP are 3.3 and 2.2, respectively. We also evaluate the part similarity based on BUC [14], and the result is shown in Table 3. We observe that on Market-1501, the improvements of using the part similarity are 3.6 points for rank-1 and 4.4 points for mAP. This demonstrates that investigating the appearance between pedestrian parts is beneficial for similarity estimation. This idea is also effective on other unsupervised methods and can be easily adopted. + +The parameter $\lambda_{p}$ balances the effect of the global distance and part distance. We evaluate different values for the parameter $\lambda_{p}$ in Figure 4 (e). When $\lambda_{p} = 0$ , we only adopt the global distance. As $\lambda_{p}$ increases, retrieval accuracy improves at first. When $\lambda_{p} = 0.5$ , we obtain the best performance. After that, the performance begins to drop. + +In Figure 4 (f), we vary the number of parts $p$ from 1 to 10. When $p = 1$ , the part distance is the same as the global distance. When $p = 8$ , we obtain the best accuracy. + +# 4.4. Delving into the Softened Similarity Learning and the Hard Label Learning + +We conduct experiments to examine the effectiveness of our method of softened similarity learning and BUC that + +learn from hard labels. The models learning with and without the auxiliary information are compared. The experimental results are summarized in Table 1 and Table 3. + +We first observe that both approaches without the auxiliary information yield improvement over the baseline. As shown in Table 1, the rank-1 of the baseline and Ours (w/o part and CCE) are $34.4\%$ and $58.7\%$ , respectively. The large performance gap demonstrates the effectiveness of softened similarity learning. Second, as shown in Table 3, without any auxiliary information, BUC achieves better performance than ours on both datasets. We think the reason is that our network is trained with softened labels, which avoids pushing images of the same identity away, but it is also has a relatively small strength to force images of different identities separate. Nevertheless, from Table 3, we find that when we adopt CCE or part similarity into the two approaches, our method exceeds BUC on both datasets. This indicates that given a better similarity estimation, the softened similarity learning has a higher potential to learn better embeddings. We suspect that when learning with hard one-hot labels, the model is forced to fit the noise labels, which limits its accuracy. In contrast, our method hardly affected by the inaccurate similarity estimation and thus has more room to learn and improve. + +# 5. Conclusions + +In this paper, we investigate the problem of unsupervised re-ID. Following the pipeline of iterative person recognition and feature update, we propose not to assign each sample with a hard label so as to avoid quantization loss as well as provide more room for the learning algorithm. To introduce additional priors for constraints, we introduce several auxiliary information, including a camera-based term which is easy to obtain yet useful for distance amendment. Experiments on both image-based and video-based re-ID tasks validate the effectiveness of our approach. + +This work puts forward a point that classification may not be the optimal supervision, in particular, for unsupervised re-ID. This reminds us of the difference between classification-based and metric-learning-based methods in supervised re-ID. The potential connections between them remain uncovered, which we will investigate in the future research. + +Acknowledgments. This work is supported by National Nature Science Foundation of China (61931008, 61671196, 61701149, 61801157, 61971268, 61901145, 61901150, 61972123), National Natural Science Major Foundation of Research Instrumentation of PR China under Grants 61427808, Zhejiang Province Nature Science Foundation of China (LR17F030006, Q19F010030), 111 Project, No. D17019. + +# References + +[1] Slawomir Bak, Peter Carr, and Jean-Francois Lalonde. Domain adaptation through synthesis for unsupervised person re-identification. In ECCV, 2018. +[2] Yanbei Chen, Xiatian Zhu, and Shaogang Gong. Deep association learning for unsupervised video person re-identification. In BMVC, 2018. +[3] Weijian Deng, Liang Zheng, Qixiang Ye, Guoliang Kang, Yi Yang, and Jianbin Jiao. Image-image domain adaptation with preserved self-similarity and domain-dissimilarity for person reidentification. In CVPR, 2018. +[4] Hehe Fan, Liang Zheng, Chenggang Yan, and Yi Yang. Unsupervised person re-identification: Clustering and finetuning. TOMM, 2018. +[5] Michela Farenzena, Loris Bazzani, Alessandro Perina, Vittorio Murino, and Marco Cristani. Person re-identification by symmetry-driven accumulation of local features. In CVPR, 2010. +[6] Douglas Gray and Hai Tao. Viewpoint invariant pedestrian recognition with an ensemble of localized features. In ECCV, 2008. +[7] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. In NIPS Workshops, 2014. +[8] Mahdi M Kalayeh, Emrah Basaran, Muhittin Gokmen, Mustafa E Kamasak, and Mubarak Shah. Human semantic parsing for person re-identification. In CVPR, 2018. +[9] Elyor Kodirov, Tao Xiang, Zhenyong Fu, and Shaogang Gong. Person re-identification by unsupervised 11 graph learning. In ECCV, 2016. +[10] Elyor Kodirov, Tao Xiang, and Shaogang Gong. Dictionary learning with iterative laplacian regularisation for unsupervised person re-identification. In BMVC, 2015. +[11] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. +[12] Wei Li, Rui Zhao, Tong Xiao, and Xiaogang Wang. Deepreid: Deep filter pairing neural network for person re-identification. In CVPR, 2014. +[13] Shengcai Liao, Yang Hu, Xiangyu Zhu, and Stan Z Li. Person re-identification by local maximal occurrence representation and metric learning. In CVPR, 2015. +[14] Yutian Lin, Xuanyi Dong, Liang Zheng, Yan Yan, and Yi Yang. A bottom-up clustering approach to unsupervised person re-identification. In AAAI, 2019. +[15] Yutian Lin, Yu Wu, Chenggang Yan, Mingliang Xu, and Yi Yang. Unsupervised person re-identification via cross-camera similarity exploration. IEEE TIP, 2020. +[16] Yutian Lin, Liang Zheng, Zhedong Zheng, Yu Wu, Zhi-lan Hu, Chenggang Yan, and Yi Yang. Improving person re-identification by attribute and identity learning. Pattern Recognition, 2019. +[17] Giuseppe Lisanti, Iacopo Masi, Andrew D Bagdanov, and Alberto Del Bimbo. Person re-identification by iterative reweighted sparse ranking. IEEE TPAMI, 2014. +[18] Jiawei Liu, Zheng-Jun Zha, Di Chen, Richang Hong, and Meng Wang. Adaptive transfer network for cross-domain person re-identification. In CVPR, 2019. + +[19] Zimo Liu, Dong Wang, and Huchuan Lu. Stepwise metric promotion for unsupervised video person re-identification. In ICCV, 2017. +[20] Tetsu Matsukawa, Takahiro Okabe, Einoshin Suzuki, and Yoichi Sato. Hierarchical gaussian descriptor for person re-identification. In CVPR, 2016. +[21] Peixi Peng, Tao Xiang, Yaowei Wang, Massimiliano Pontil, Shaogang Gong, Tiejun Huang, and Yonghong Tian. Unsupervised cross-dataset transfer learning for person re-identification. In CVPR, 2016. +[22] Ergys Ristani, Francesco Solera, Roger Zou, Rita Cucchiara, and Carlo Tomasi. Performance measures and a data set for multi-target, multi-camera tracking. In ECCV, 2016. +[23] Yifan Sun, Qin Xu, Yali Li, Chi Zhang, Yikang Li, Shengjin Wang, and Jian Sun. Perceive where to focus: Learning visibility-aware part-level features for partial person re-identification. In CVPR, 2019. +[24] Yifan Sun, Liang Zheng, Yi Yang, Qi Tian, and Shengjin Wang. Beyond part models: Person retrieval with refined part pooling (and a strong convolutional baseline). In ECCV, 2018. +[25] Chiat-Pin Tay, Sharmili Roy, and Kim-Hui Yap. Aanet: Attribute attention network for person re-identifications. In CVPR, 2019. +[26] Rahul Rama Varior, Mrinal Haloi, and Gang Wang. Gated siamese convolutional neural network architecture for human re-identification. In ECCV, 2016. +[27] Hanxiao Wang, Shaogang Gong, and Tao Xiang. Unsupervised learning of generative topic saliency for person re-identification. In BMVC, 2014. +[28] Jingya Wang, Xiatian Zhu, Shaogang Gong, and Wei Li. Transferable joint attribute-identity deep learning for unsupervised person re-identification. In CVPR, 2018. +[29] Longhui Wei, Shiliang Zhang, Wen Gao, and Qi Tian. Person transfer gan to bridge domain gap for person re-identification. In CVPR, 2018. +[30] Yu Wu, Yutian Lin, Xuanyi Dong, Yan Yan, Wei Bian, and Yi Yang. Progressive learning for person re-identification with one example. IEEE TIP, 2019. +[31] Yu Wu, Yutian Lin, Xuanyi Dong, Yan Yan, Wanli Ouyang, and Yi Yang. Exploit the unknown gradually: One-shot video-based person re-identification by stepwise learning. In CVPR, 2018. +[32] Zhirong Wu, Yuanjun Xiong, X Yu Stella, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, 2018. +[33] Tong Xiao, Shuang Li, Bochao Wang, Liang Lin, and Xiaogang Wang. Joint detection and identification feature learning for person search. In CVPR, 2017. +[34] Chenggang Yan, Biao Gong, Yuxuan Wei, and Yue Gao. Deep multi-view enhancement hashing for image retrieval. IEEE TPAMI, 2020. +[35] Chenggang Yan, Biyao Shao, Hao Zhao, Ruixin Ning, Yongdong Zhang, and Feng Xu. 3d room layout estimation from a single rgb image. IEEE TMM, 2020. +[36] Chenggang Yan, Yunbin Tu, Xingzheng Wang, Yongbing Zhang, Xinhong Hao, Yongdong Zhang, and Qionghai Dai. + +Stat: spatial-temporal attention mechanism for video captioning. IEEE TMM, 2019. +[37] Qize Yang, Hong-Xing Yu, Ancong Wu, and Wei-Shi Zheng. Patch-based discriminative feature learning for unsupervised person re-identification. In CVPR, 2019. +[38] Mang Ye, Xiangyuan Lan, and Pong C. Yuen. Robust anchor embedding for unsupervised video person re-identification in the wild. In ECCV, 2018. +[39] Mang Ye, Andy J Ma, Liang Zheng, Jiawei Li, and Pong C Yuen. Dynamic label graph matching for unsupervised video re-identification. ICCV, 2017. +[40] Hong-Xing Yu, Ancong Wu, and Wei-Shi Zheng. Cross-view asymmetric metric learning for unsupervised person re-identification. In ICCV, 2017. +[41] Hong-Xing Yu, Wei-Shi Zheng, Ancong Wu, Xiaowei Guo, Shaogang Gong, and Jian-Huang Lai. Unsupervised person re-identification by soft multilabel learning. In CVPR, 2019. +[42] Rui Zhao, Wanli Ouyang, and Xiaogang Wang. Person re-identification by salience matching. In ICCV, 2013. +[43] Rui Zhao, Wanli Ouyang, and Xiaogang Wang. Unsupervised salience learning for person re-identification. In CVPR, 2013. +[44] Liang Zheng, Zhi Bie, Yifan Sun, Jingdong Wang, Chi Su, Shengjin Wang, and Qi Tian. Mars: A video benchmark for large-scale person re-identification. In ECCV, 2016. +[45] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In ICCV, 2015. +[46] Zhedong Zheng, Xiaodong Yang, Zhiding Yu, Liang Zheng, Yi Yang, and Jan Kautz. Joint discriminative and generative learning for person re-identification. In CVPR, 2019. +[47] Zhedong Zheng, Liang Zheng, and Yi Yang. Unlabeled samples generated by gan improve the person re-identification baseline in vitro. In ICCV, 2017. +[48] Zhun Zhong, Liang Zheng, Shaozi Li, and Yi Yang. Generalizing a person retrieval model hetero-and homogeneously. In ECCV, 2018. +[49] Zhun Zhong, Liang Zheng, Zhiming Luo, Shaozi Li, and Yi Yang. Invariance matters: Exemplar memory for domain adaptive person re-identification. In CVPR, 2019. +[50] Zhun Zhong, Liang Zheng, Zhiming Luo, Shaozi Li, and Yi Yang. Learning to adapt invariance in memory for person re-identification. IEEE TPAMI, 2020. \ No newline at end of file diff --git a/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/images.zip b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ac0df5ef8024efe683078cd345248e9f3c62cf89 --- /dev/null +++ b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f947c1c052b646af4d057bba05c01126b2389b6d853f34d10fb621157ce8347 +size 506847 diff --git a/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/layout.json b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..960197b7b39426d37a73f1ff972940e4bfb332be --- /dev/null +++ b/unsupervisedpersonreidentificationviasoftenedsimilaritylearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99e9fb4f8bdc62135596b48ffd02f865c11b36ee9308d30b88c975c610dd15d6 +size 406380 diff --git a/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/a805bb41-5f7f-4178-b85c-7956ce02a91e_content_list.json b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/a805bb41-5f7f-4178-b85c-7956ce02a91e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cbf8322ffdf065a2baeabf27ca5eae905ed9c25e --- /dev/null +++ b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/a805bb41-5f7f-4178-b85c-7956ce02a91e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7891fe90d11902bdbc587a0b6c413891ebfe8c45c7da0010363a2ddacc120981 +size 76446 diff --git a/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/a805bb41-5f7f-4178-b85c-7956ce02a91e_model.json b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/a805bb41-5f7f-4178-b85c-7956ce02a91e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..cc672794984738c0d7bfe706d754f9a6d126cf73 --- /dev/null +++ b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/a805bb41-5f7f-4178-b85c-7956ce02a91e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:336b4146c4cb1d81c0ceb78db431c4c94132d27707e61defd9e88efa8fa66062 +size 92917 diff --git a/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/a805bb41-5f7f-4178-b85c-7956ce02a91e_origin.pdf b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/a805bb41-5f7f-4178-b85c-7956ce02a91e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4d4294ab36135e761161ade88195379aed45d548 --- /dev/null +++ b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/a805bb41-5f7f-4178-b85c-7956ce02a91e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f52affee26e38bcf577177bc18f3a282d82919b1da968db45296254307fc549c +size 973502 diff --git a/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/full.md b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..fc2416b511531238aa036dc9c7e07f7c5883596b --- /dev/null +++ b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/full.md @@ -0,0 +1,336 @@ +# Unsupervised Reinforcement Learning of Transferable Meta-Skills for Embodied Navigation + +Juncheng Li $^{1}$ Xin Wang $^{2}$ Siliang Tang $^{1*}$ Haizhou Shi $^{1}$ Fei Wu $^{1}$ + +Yueting Zhuang1 William Yang Wang2 + +1Zhejiang University 2University of California, Santa Barbara + +{junchengli, siliang, shihaizhou, wufei, yzhuang}@zju.edu.cn , {xwang, william}@cs.ucsb.edu + +# Abstract + +Visual navigation is a task of training an embodied agent by intelligently navigating to a target object (e.g., television) using only visual observations. A key challenge for current deep reinforcement learning models lies in the requirements for a large amount of training data. It is exceedingly expensive to construct sufficient 3D synthetic environments annotated with the target object information. In this paper, we focus on visual navigation in the low-resource setting, where we have only a few training environments annotated with object information. We propose a novel unsupervised reinforcement learning approach to learn transferable meta-skills (e.g., bypass obstacles, go straight) from unannotated environments without any supervisory signals. The agent can then fast adapt to visual navigation through learning a high-level master policy to combine these meta-skills, when the visual navigation-specified reward is provided. Experimental results show that our method significantly outperforms the baseline by $53.34\%$ relatively on SPL, and further qualitative analysis demonstrates that our method learns transferable motor primitives for visual navigation. + +# 1. Introduction + +Visual navigation is a task of training an embodied agent that can intelligently navigate to an instance of an object according to the natural-language name of the object. In addition to being a fundamental scientific goal in computer vision and artificial intelligence, navigation in a 3D environment is a crucial skill for the embodied agent. This task may benefit many practical applications where an embodied agent improves the quality of life and augments human + +capability, such as in-home robots, personal assistants, and hazard removal robots. + +Recently, various deep reinforcement learning (DRL) approaches [44, 26, 42, 41, 33, 46, 47, 13, 23, 48, 21] have been proposed to improve the navigation models. However, they are usually data inefficient and require a large amount of training data. In order to train these deep models, we need to construct a sufficient number of 3D synthetic environments and annotate the object information, which is exceedingly expensive, time-consuming, and even infeasible in real-world applications. Furthermore, it is hard for the trained embodied agent to transfer to different environments. + +It is worth noticing that when humans encounter a new task, they can quickly learn to solve it by transferring the meta-skills learned in a wide variety of tasks throughout their lives. This stands in stark contrast with the current deep reinforcement learning-based navigation methods, where the policy networks are learned from scratch. Instead, humans have an inherent ability to transfer knowledge across tasks and cross-utilize their knowledge, which offloads the burden of a large number of training samples. + +Inspired by this fact, we seek the help of both meta-learning [28, 9] that learn quickly using a small amount of data and transfer learning [39, 43] that accelerate learning a new task through transferring knowledge from a related task that is already learned. In our work, we frame low-resource visual navigation as a meta-learning problem. At the metatraining phase, the environments are not annotated with object information, and we assume access to a set of tasks that we refer to as the meta-training tasks. From these tasks, the embodied agent (we call it as meta-learner) then learns a set of transferable sub-policies, each of which corresponds to a specific meta-skill (also called as motor primitives, e.g., bypass obstacles, go straight) by performing a sequence of primitive actions. At the meta-testing phase, a few an + +![](images/b905b3523d6e4de8761a9581b0601b33c416f0763ada9c7139ccca2e0ce87e12.jpg) +Figure 1: Overview of our ULTRA framework. The blue part on the left is our adversarial training process, where the task generator automatically proposes a curriculum of increasingly challenging tasks, and the meta-learner learns to complete them. From these tasks, the meta-learner learns a set of transferable sub-policies. Then, on the right part, the meta-learner can fast adapt to visual navigation by just learning a new master policy, given the task-specific external reward. The $\theta_{k}$ is corresponding to the parameters of the $k$ -th sub-policy. + +notated environments with hand-specified rewards for visual navigation are provided. As illustrated in Figure 1, after learning transferable sub-policies from meta-training scenes, the agent is solely required to learn a new master policy to combine the sub-policies such that it can fast adapt to visual navigation. During meta-training, the master policy is task-specific, and the sub-policies are shared for all tasks across scenes. The master policy determines the execution order of the sub-policies and is optimized to fast adapt to each meta-training task. The sub-policies are optimized for performance across tasks using gradient-based meta-learning algorithms [28, 9]. The hierarchical architecture [11, 37, 3, 10] that separates the entire policy into the task-specific part and task-agnostic part can also avoid meta-overfitting: typical gradient-based meta-learning algorithms can easily result in overfitting since the entire network is updated on just a few samples. + +However, typical meta-learning methods [28, 9] require a sufficient number of hand-designed tasks for meta-training, which is not practical for an embodied agent. In this paper, we then propose a novel unsupervised reinforcement learning approach that automatically generate a curriculum + +of tasks without manual task definition. In our Unsupervised reinforcement Learning of TRAnsferable meta-skills (ULTRA) framework, the agent can efficiently learn transferable meta-skills and thus fast adapt to the new task by leveraging the meta-skills when entering a new environment. The main body of the framework is what we call the curriculum-based adversarial training process, where one agent (task generator) generates a curriculum of tasks with increasing difficulty. The other agent (meta-learner) learns the meta-skills by accomplishing the generated tasks. After this unsupervised adversarial training process, the meta-learner can fast adapt to the new visual navigation task by just learning a new master policy to combine the learned meta-skills. + +Our experimental results show that our method significantly outperforms the baselines by a large margin, and further ablation study demonstrates the effectiveness of each component. Additionally, qualitative analysis demonstrates the consistent behavior of the sub-policies. In summary, our contributions are mainly four-fold: + +- We propose a novel ULTRA framework to learn metaskills via unsupervised reinforcement learning. + +- The hierarchical policy of meta-learner separates the entire policy into the task-specific part and task-agnostic part, which reduces the probability of meta-overfitting and promises a faster convergence. +- Instead of manually designing tasks, we propose a novel curriculum-based adversarial training strategy, where the task generator automatically proposes increasingly difficult tasks to the meta-learner. Further, we define a diversity measure to encourage the task generator to generate more diverse tasks. +- We perform our experiments in low-resource setting, and experimental results show that our method significantly outperforms the baseline by $53.34\%$ relatively on SPL and requires only one-third number of iterations to converge, compared with the baseline. + +# 2. Related Work + +Visual Navigation. Traditional navigation methods [4, 6, 16, 18, 22, 38] typically employ geometric reasoning on a given occupancy map of the environment. They perform path planning [5, 15, 20] to decide which actions the robot performs. Recently, many deep reinforcement learning (DRL) approaches [44, 26, 33, 46, 47, 13, 23, 48] have been proposed. While these methods achieve great improvement, it is difficult to apply them to real-world situations since these DRL methods require a large number of training episodes and annotated environment information, which is time-consuming and exceedingly expensive. In our work, we focus on developing an unsupervised reinforcement learning method in the low-resource setting. + +Meta-Learning. Meta-learning, also known as learning to learn, optimizes for the ability to learn new tasks quickly and efficiently, using experience from learning multiple tasks. There are three common types of methods: 1) metric-based methods [34, 36, 40] that learn an efficient distance metric; 2) memory-based methods [24, 27, 29, 32] that learn to store experience using external or internal memory; and 3) gradient-based methods [28, 9, 14, 31, 11] model parameters explicitly for fast learning. Our method relies on a gradient-based meta-learning algorithm called Reptile [28]. The Reptile algorithm is aimed to learn a good parameter initialization during the meta-training process, where a large number of related tasks are provided. Thus, in the meta-testing process, the model can achieve good performance on new tasks after only a few gradient updates. An important difference is that our method does not require a large number of hand-designed tasks at the meta-training stage. + +Intrinsic Motivation-Based Exploration. Intrinsic motivation or curiosity called by psychologists have been widely used to train an agent to explore the environment and create environment priors without external supervision. There + +are mainly two categories of intrinsic reward: 1) incentivize the agent to explore "novel" states [8, 12, 35]; and 2) incentivize the agent to perform actions that reduce its predictive uncertainty of the environment [30]. + +Sukhbaatar et al. [35] introduce an adversarial training approach to unsupervised exploration, where one model proposes tasks and the other learns to complete it. In their work, the model for completing the tasks shares the whole parameters during training, and use the parameters as initialization for the downstream task. However, our work differs as we treat the adversarial training process as a sequence of independent meta-training tasks, and each task holds independent task-specific parameters. Also, there is no communication between two agents, whereas, in our work, the generator sends the target observation to the meta-learner, which contains the task information. + +Gupta et al. [12] propose an unsupervised meta-learning method based on a recently proposed unsupervised exploration technique [8]. They use the heuristic method to define intrinsic reward (i.e. random discriminator, entropy-based method), which automates the task generation process during meta-training. Our work instead introduces an adversarial training strategy, which is more interpretable and efficient. + +# 3. Method + +In this section, we first define the meta-learning setting for visual navigation. We then describe our ULTRA framework. Finally, we discuss how to transfer the meta-skills to visual navigation. + +# 3.1. Problem Setup + +Our goal is to learn meta-skills in an unsupervised manner and then transfer the acquired meta-skills to new tasks (i.e. visual navigation). As illustrated in Figure 1, our approach has two stages: 1) In the meta-training stage, the agent learns transferable meta-skills via unsupervised reinforcement learning without human-specified reward functions. We use the curriculum-based adversarial training strategy to automatically generate a curriculum of metatraining tasks. 2) In the meta-testing stage, the agent is required to fast transfer to visual navigation task by utilizing the learned meta-skills. Training in this stage is fully supervised, but only a few training data is available. + +Note that, the automatically generated meta-training tasks are different from visual navigation in the meta-testing stage. During meta-training, the learning target is to recover the x, y and viewing angle of the agent according to egocentric RGB observations and an image given by the task generator (called image-driven navigation). Different targets correspond to different tasks. While during meta-testing, the input to the agent is not an image, but a language command (e.g., microwave). The agent is required to under + +![](images/e965f94dd39c5a162dfb21683af1e5c091290745e961c8e1f76369797678fbea.jpg) +Figure 2: Graphical illustration of the task generator. The generator starts from the same location (denoted by the blue robot icon) and generates tasks for the meta-training. The level of difficulty (represented by the darkness of the path) increases along the training process. + +![](images/13fa28b15c73f15f9d6bae1c4fb9e74a90f07c193acae9143840472d7f6261f0.jpg) + +![](images/0fd088c44cff321b63c0d578981a47a981e14471084e951396796b0a32c3372c.jpg) + +stand various language commands and navigate to the objects specified by the commands in unseen scenes (called semantic visual navigation). + +# 3.2. Overview + +As described in Figure 1, our ULTRA framework mainly consists of three components: curriculum-based adversarial training strategy, shared hierarchical policy, and meta-reinforcement learning. During the curriculum-based adversarial training process, the task generator automatically proposes a curriculum of tasks, and the meta-learner learns to complete these tasks. Specifically, the architecture of the meta-learner is the shared hierarchical policy, which contains a master policy and a set of sub-policies. At each master-timestep, the master policy first selects a sub-policy to be activated, and then the chosen sub-policy performs primitive actions. The master policy is learned from scratch for each task and encodes the task-specific information. The sub-policies are shared and encapsulate meta-skills that can be transferred across all tasks. For each task generated by the task generator, the meta-learner first reinitialize the master policy and learns to combine the sub-policies to complete the task. After adapting the master policy to the new task, the meta-reinforcement learning algorithm is applied to optimize the sub-policies to excellent performance across tasks. + +# 3.3. Curriculum-Based Adversarial Training + +In this setting, we have two agents: a task generator and a meta-learner. During each iteration, the task generator starts at the initial state $s_0$ , performs a sequence of actions, and finally stops at state $s_T$ . Then, it sends its egocentric observation at the final state $s_T$ to the meta-learner. Given the observation $o_T$ at final state $s_T$ , the goal of the meta-learner is to reach $s_T$ from $s_0$ , which we call as a task. We initialize the meta-learner at state $s_0$ , let it learn on this task for multiple episodes, and compute the success rate $r$ . After + +that, the task generator proposes a new task, and the metalearner repeats the above process. + +Our goal is to automatically generate a curriculum of diverse tasks, where we first start with an easy task and then gradually increase the task difficulty. The reward function of the task generator consists of three components: a final reward based on the success rate, an intermediate reward that penalizes the task generator for taking too many steps, and a diversity measure that measures the diversity of the tasks. + +Success Rate: We use the success rate of the meta-learner after multiple episodes to measure the difficulty of the task and give the generator a final reward. The final reward is defined as: + +$$ +R _ {f} = k * (1 - r) \tag {1} +$$ + +where $k$ is a scaling factor, and $r$ is the success rate. + +Step Efficiency: At each timestep, the task generator will receive a negative constant intermediate reward. We penalize the task generator for taking too many steps, which encourages it to generate the easiest task that the meta-learner can not complete. In the first few iterations, the task generator can propose tasks by performing a small number of steps. Then as the capabilities of the meta-learner increase, more steps will be taken to generate more difficult tasks (qualitative examples in Figure 2). + +Task Diversity: In order to explore wider state spaces for our meta-learner to build a better visual and physical understanding of the environment, we add an additional item in the task generator's reward function to encourage it to generate more diverse tasks. Formally, let $\pi$ denote the current policy, and $\pi^{\prime}$ denote a previous policy. The diversity measure $D$ can be written as: + +$$ +D = \sum_ {s _ {t} \in \tau} \sum_ {\pi^ {\prime} \in \Pi} D _ {K L} \left(\pi^ {\prime} (\cdot | s _ {t}) | | \pi (\cdot | | s _ {t})\right) \tag {2} +$$ + +where $\tau$ is the trajectory from the current episode, $\Pi$ is the set of prior polices. We save the previous policy cor + +responding to the last four episodes in the set II. We use KL-divergence to measure the difference between the current policy and the previous policies. The task diversity is aimed to incentivize the task generator to generate more diverse tasks that cover a larger state space of the environment. + +Formally, the task generator's total reward $R_{G}$ can be written as: + +$$ +R _ {G} = k * (1 - r) - \lambda * n + \eta * \sum_ {s _ {t} \in \tau} \sum_ {\pi^ {\prime} \in \Pi} D _ {K L} \left(\pi^ {\prime} (\cdot | s _ {t}) | | \pi (\cdot | | s _ {t})\right) \tag {3} +$$ + +where $\lambda$ and $\eta$ are weight hyper-parameters, and $n$ is the number of actions that the task generator executes. + +For meta-learner, we use the shared hierarchical policy. We train it using actor-critic methods[25] with rewards function that incentivizes it to reach the target. + +# 3.4. Shared Hierarchical Policy + +The shared hierarchical policy decomposes long-term planning into two different time-scales. At master-timestep, the master policy chooses a specific sub-policy from a set of sub-policies and then gives control to the sub-policy. As in [11], the sub-policy executes fixed N timesteps primitive actions (e.g. MoveAhead, RotateLeft) before returning control back to the master policy. + +Formally, let $\phi$ denote the parameters of the master policy, and $\theta = \{\theta_1,\theta_2,\dots,\theta_K\}$ denote the parameters of the K sub-policies. $\phi$ is the task-specific parameters, that is learned from scratch for each task. $\theta$ is shared between all tasks and switched between by task-specific master policies. For each task generated by the task generator during the adversarial training process, $\phi$ is randomly initialized at first and then optimized to maximize the total reward over multiple episodes, given fixed shared parameters $\theta$ . + +After fine-tuning the task-specific parameters $\phi$ to the task (called warm-up period), we take a joint update period, where both $\theta$ and $\phi$ are updated. The task-specific $\phi$ is optimized towards the current task, but the shared $\theta$ is optimized to excellent performance across tasks using gradient-based meta-learning algorithms. The details are discussed in the Sec 3.5. + +# 3.5. Meta-Reinforcement Learning on the Proposed Tasks + +Inspired by meta-learning algorithms [28, 9, 14, 31, 11] that leverage experience across many tasks to learn new tasks quickly and efficiently, our method automatically learns meta-skills from a curriculum of meta-training tasks. Background on Gradient-Based Meta-Learning: Our method is inspired by prior work on a first-order gradient-based meta-learning algorithm called Reptile [28]. The Reptile algorithm is aimed to learn the initialization of a neural network model, which can fast adapt to a new task. + +Algorithm 1 Unsupervised Reinforcement Learning +1: randomly initialize $\theta, \phi, \mu$ +2: $\Pi \leftarrow []$ +3: while not converged do +4: $s_0 \gets e_i$ , start_state +5: collect rollout $\tau_i^G(s_0, s_1, \dots, s_T)$ using $\pi_\mu^G$ +6: $s^* \gets s_T$ +7: $o^* \gets o_T$ +8: set task $\tau_i = SetTask(s_0, s^*, o^*)$ +9: for $w = 0, 1, \dots, W$ (warmup period) do +10: collect rollout $\tau_i^w$ using $\pi_{\phi_i, \theta}^M$ +11: $\phi_i \gets \phi_i + \alpha \nabla_\phi J(\tau_i^w, \pi_{\phi_i, \theta}^M)$ +12: end for +13: $\tilde{\theta} = \theta$ +14: for $j = 0, 1, \dots, J$ (joint update period) do +15: collect rollout $\tau_i^j$ using $\pi_{\phi_i, \tilde{\theta}}^M$ +16: $\phi_i \gets \phi_i + \alpha \nabla_\phi J(\tau_i^j, \pi_{\phi_i, \tilde{\theta}}^M)$ +17: $\tilde{\theta} \gets \tilde{\theta} + \alpha \nabla_\theta J(\tau_i^j, \pi_{\phi_i, \tilde{\theta}}^M)$ +18: end for +19: $\theta \gets \theta + \beta (\tilde{\theta} - \theta)$ +20: Evaluate $R_G$ as Eq 3 and update $\pi_\mu^G$ +21: if len(II) == 4 then +22: II.pop(0) +23: end if +24: II.append(\mu) +25: end while + +The Reptile algorithm repeatedly samples a task, training on it, and moving the initialization towards the trained weights on that task. + +Formally, let $\theta$ denote the parameters of the network, $\tau$ denote a sampled task, corresponding to loss $L_{\tau}$ , and $\tilde{\theta}$ denote the updated parameters after $K$ steps of gradient descent on $L_{\tau}$ . The update rule of the Reptile algorithm is as follows: + +$$ +\theta \leftarrow \theta + \beta (\tilde {\theta} - \theta) \tag {4} +$$ + +where the $(\theta - \tilde{\theta})$ can be treated as a gradient that includes important terms from second-and-higher derivatives of $L_{\tau}$ . Hence, the Reptile converges to a solution that is very different from the joint training. + +For Visual Navigation, our goal is for the agent to learn transferable meta-skills from the unsupervised adversarial training process. Therefore, we apply the Reptile algorithm to update the hierarchical police of the meta-learner. Different from the original Reptile algorithm that computes second-and-higher derivatives to update the whole parameters, we just apply it to update the parameters of the subpolicies and fix them during the test. Also, we treat $(\theta - \tilde{\theta})$ as a gradient and use SGD to update it. + +Algorithms 1 details our ULTRA that consists of four phases. Firstly, the task generator proposes a task. Sec- + +ondly, the meta-learner joins in a warm-up period to fine-tune the master policy. Thirdly, the meta-learner takes a joint update period where both the master policy and sub-policies are updated. Finally, the task generator is updated based on the success rate of the meta-learner and repeats the above procedure. + +Formally, let $\pi_{\mu}^{G}$ denote the policy of the task generator parameterized by $\mu$ , and $\pi_{\phi_i,\theta}^M$ denote the policy of the meta-learner parameterized by task-specific parameters $\phi_i$ and shared parameters $\theta = \{\theta_1,\theta_2,\dots,\theta_K\}$ . Firstly, we run the task generator and collect a trajectory $\tau_{i}^{G}(s_{0},s_{1},\dots,s_{T})$ . We then set the task $\tau_{i}$ for the meta-learner by the initial state $s_0$ , final state $s_T$ , and the observation $o_{T}$ at the final state. Secondly, we initialize the meta-learner using the shared sub-policies and the random-initialized master policy. We then run a warmup period to fine-tune the master policy. More specifically, we run the meta-learner for $W$ episodes, and use the collected $W$ trajectories to update the master policy $\phi_{i}$ as follows: + +$$ +\phi_ {i} \leftarrow \phi_ {i} + \alpha \nabla_ {\phi} J \left(\tau_ {i} ^ {w}, \pi_ {\phi_ {i}, \theta} ^ {M}\right) \tag {5} +$$ + +where $J(\tau_i^w, \pi_{\phi_i, \theta}^M)$ is the objective function of any gradient-based reinforcement learning that uses the $w$ -th trajectory of task $\tau_i$ produced by policy $\pi_{\phi_i, \theta}^M$ to update the master policy $\phi_i$ . In our work, we use Asynchronous Advantage Actor-Critic(A3C) [25, 45]. + +During the warmup period, the parameters of the shared sub-policies $\theta$ are fixed. After fine-tuning the master policy, we enter the joint update period, where we run the hierarchical policy for $J$ episodes, and update both $\phi_{i}$ and $\theta$ as follows: + +$$ +\phi_ {i} \leftarrow \phi_ {i} + \alpha \nabla_ {\phi} J \left(\tau_ {i} ^ {j}, \pi_ {\phi_ {i}, \tilde {\theta}} ^ {M}\right) \tag {6} +$$ + +$$ +\tilde {\theta} \longleftarrow \tilde {\theta} + \alpha \nabla_ {\theta} J \left(\tau_ {i} ^ {j}, \pi_ {\phi_ {i}, \tilde {\theta}} ^ {M}\right) \tag {7} +$$ + +More specifically, we save the value of $\theta$ before the joint update period. After $J$ times iterations, we get the updated parameters $\tilde{\theta}$ , and then we compute the gradient $(\theta - \tilde{\theta})$ and update the shared sub-policies $\theta$ using Reptile Algorithm. Finally, we compute the final reward of the task generator based on the success rate $r$ , step efficiency, and the diversity. + +# 3.6. Transferring to Semantic Visual Navigation + +In the meta-testing stage, we fix the learned sub-policies from meta-training process, and employ the Asynchronous Advantage Actor-Critic(A3C) [25, 45] to train a new master policy on a few new scenes. The inputs of the master policy are the egocentric observation of current state and the word embedding of the target object (e.g., microwave). In this stage, human-specified reward functions for visual navigation are available. If the agent reaches the target object within a certain number of steps, the agent receives a positive final reward. Also, it receives a negative intermediate + +
AllL≥5
SuccessSPLSuccessSPL
Random8.213.740.240.09
A3C (learn from scratch)19.207.489.434.13
DIAYN17.236.308.723.79
Curiosity21.078.5110.314.37
Ours - ULTRA27.7411.4720.578.04
+ +Table 1: Quantitative results. We compare our approach with the baselines on testing data. Additionally, we report the results on trajectories where the optimal path length is at least $5(L\geq 5)$ . Our ULTRA significantly outperforms the baselines, especially on $L\geq 5$ , indicating the superiority of our method on long-term planning. + +reward at each step. Finally, we evaluate the performance on unseen scenes. + +# 4. Experiments + +In our experiments, we aim to (1) evaluate whether the agent can quickly transfer to visual navigation by leveraging the transferable meta-skills, given only a few training data, (2) determine whether the ULTRA is efficient than other unsupervised RL-based methods [8, 12, 30], (3) determine whether the hierarchical policy promises a better transfer, and (4) gain insight into how our unsupervised ULTRA works. + +# 4.1. Experimental Setup + +We evaluate our approach in AI2-THOR [17] simulated environment, which is a photo-realistic customizable environment for indoor scenes and contains 120 scenes covering four different room categories: kitchens, living rooms, bedrooms, and bathrooms. We choose 60 scenes for metatraining, and 60 scenes for meta-testing. For the 60 meta-testing scenes, we further divide them into three splits (i.e. 20 scenes for supervised training, 20 scenes for validation, and 20 scenes for testing). During meta-training, object information and hand-specified rewards for visual navigation are not accessible, and the agent performs unsupervised reinforcement learning to learn transferable meta-skills. During meta-testing, all models are fine-tuned or learned from scratch on the training set, and are finally evaluated on the testing set. We choose the same set of navigational target object classes as [44], and the training reward is specific since the human-annotated labels are available. The action set $A$ consists of six unique actions (e.g. MoveAhead, RotateLeft, RotateRight, LookDown, LookUp, Done). + +Task and Evaluation Metric: We use the averaged rewards on evaluation tasks during the training process to evaluate the learning speed, success rate to evaluate the navigation performance, and the success weighted by Path Length + +![](images/0e99be199fd3a6f110d63b193ab1a43cc9493d42d4c15211c6cce22f342d105c.jpg) +Figure 3: Learning curves. We report the rewards averaged across 10 evaluation tasks during meta-testing. + +$(\mathrm{SPL})^{1}$ [1] to evaluate the navigation efficiency. As [44], we report the performance both on all trajectories and trajectories, where the optimal path length is at least 5 ( $L \geq 5$ ). + +Baselines: We compare our method with the following baselines: (1) Random policy: The agent randomly executes an action at each timestep; (2) A3C (learn from scratch): The architecture is the same as ours. However, there is no ULTRA process, and the whole hierarchical policy is directly learned from scratch in the meta-testing stage with visual navigation-specified rewards. + +We also compare to the state-of-the-art unsupervised RL-based methods: (3) Curiosity: [30] The agent learns skills motivated by a curiosity reward, which serves as an intrinsic reward and is the error in an agent's ability to predict the consequence of its own actions in a visual feature space learned by a self-supervised inverse dynamics model. (4) DIAYN: [8, 12] Diversity-driven methods hypothesize there is a latent variable (control different skills) behind the agent state distribution and maximize the mutual information between the latent variable and the agent state distribution. They then combine the unsupervised skill acquisition (via DIAYN) with MAML[9]. They train a discriminator to predict the latent variable from the observed state. As our ULTRA, DIAYN and Curiosity first conduct unsupervised reinforcement learning on scenes for meta-training and then are fine-tuned on training scenes for meta-testing with visual navigation-specified rewards. + +# 4.2. Results + +We summarize the results of our ULTRA and the baselines in Table 1. Also, we report the rewards averaged across 10 evaluation tasks during meta-testing in Figure 3. We observe that our approach can fast adapt to visual navi + +
AllL≥5
SuccessSPLSuccessSPL
A3C (learn from scratch)19.207.489.434.13
A3C + random generator19.737.129.314.47
A3C + hand-crafted generator20.578.0410.264.28
ULTRA27.7411.4720.578.04
- hierarchical policy24.2710.5414.135.61
- meta-RL update23.5711.0314.025.49
- adversarial training20.238.3510.044.33
+ +Table 2: Ablation results. We compare variations of our method with the A3C baseline augmented with random generator and hand-crafted generator. + +gation, significantly outperforming all baselines not only in learning speed but also in performance. The number of iterations required for convergence of our ULTRA is about one-third of the baselines. Furthermore, our approach achieves the best success rate and SPL, especially when the trajectory length $L \geq 5$ , indicating the superiority of our method on long-term planning. DIAYN breaks down for visual navigation, because the same state can be reached via different skills from different initial state, which causes the discriminator performs at chance. Also, compared with A3C (learn from scratch), the curiosity method makes limited improvement. We argue that the reason for this phenomenon is due to the complexity and diversity of the visual navigation environment, whose state space is always larger than the previous tasks. + +# 4.3. Ablation Study + +Effect of Individual Components: We conduct an ablation study to illustrate the effect of each component in Table 2. We start with the final ULTRA model and remove the hierarchical policy, meta-RL algorithm, and the adversarial training, respectively. Furthermore, we augment the baseline with pre-training on meta-training scenes with a random generator and hand-crafted generator [19]. The augmented A3C baselines are first pre-trained on scenes for meta-training with a random generator or hand-crafted generator and then fine-tuned on training scenes for metatesting. The random generator samples random location as the target, while the hand-crafted generator first samples the initial state closer to the target, and gradually increases the distance between the initial state and the target state. The augmented baselines regard different targets as different episodes under a unified task and employ A3C to learn a policy. The augmented baselines correspond to typical pre-training methods that pre-train on a source task (image-driven navigation) and transfer to the target task (semantic visual navigation) by fine-tuning the parameters. + +Augmenting the baseline with pre-training on image-driven navigation proposed by the random generator or hand-crafted generator, we notice that there is no significant improvement and the performance is worse than Curiosity. + +![](images/cd7606cfea4f14b21cc1bb5880306a93ba70c1344a294a200565e9edcd0c6f26.jpg) + +![](images/00294935314638ddb481c41ce5b03aef257264c704b368e81cf696ddefd4506b.jpg) + +![](images/82a760094748392cd69c6b259db6fc0cd5ad8047418eb12b3d5669c2377eb171.jpg) + +![](images/55891eaa6ccf8698275f918b58b5fbb4101d5c0da4c21fe1b8529dc425f909dd.jpg) + +![](images/c3129aefde3ad9329a93ebe36b2240dc169c7e6e1e34270dbeb0fd8cc3c9de5b.jpg) + +![](images/f899ec9a00d6a71b9092e106a337fcf321f43716e3b413ca52a7e71394203058.jpg) +Figure 5: Ablation study of the number of the sub-policies. + +![](images/d8b202ef4443e80c8d6596924e246fd8f3e58bd8482c1ea252fe6a0389de28c3.jpg) +Figure 4: Visualization of the Sub-Policies. + +![](images/a587128e0c2129ea34c6a673c80f81bea7dc947899860646f3f151a430eec45c.jpg) + +![](images/3ab3d756cc6247e55fbfe53bd985e8f908e9d18b34dde6fd2cdf01d1a1401f92.jpg) + +The result reveals that image-driven navigation can not directly benefit semantic visual navigation. + +The variation of ours without hierarchical policy uses a typical LSTM-A3C policy that updates the entire network during adversarial meta-training. We notice that the success rate drops 3.47 points, and the SPL drops 0.93 points, indicating that updating the entire policy on a few training samples of each meta-training tasks results in poor transferability. We then verify the strength of the meta-RL algorithm. As the pre-training baselines, we regard different targets as different episodes of the same task and update the parameters iteratively. Evidently, the meta-RL update improves upon the baseline by considering different targets as different meta-training tasks and updating the subpolicies by Reptile. Furthermore, the results of the last row (sample random location as meta-training tasks during unsupervised reinforcement learning) validate the superiority of curriculum-based adversarial training. + +Ablation of the Number of Sub-Policies: To explore the impact of different numbers of the sub-policies, we modify the number of sub-policies. As illustrated in Figure 5, the success rate and SPL keeps increasing when the number of sub-policies is increased from 4 to 7. When we continue to increase the number of sub-policies, not only does the success rate not improve significantly, but SPL decreases because too many sub-policies result in confusion. In order to guarantee the performance and reduce the computational complexity, we set the number of the sub-policies to 7. + +# 4.4. Qualitative Analysis + +Visualization of the task generator: Figure 2 shows three qualitative examples. In each scenario, the tasks are gener- + +![](images/3d79b77c1ce7dd67752459ec1579309d8e1ee3c506972a6b84ca2dbff5542ec1.jpg) + +![](images/53d8375c6651fa4b6d03c6678f326531cd05f691a08cb94a1582c152386f550f.jpg) + +ated starting from the same location. We can see that the difficulty of the tasks, corresponding to the length of the generated trajectories, increases as the serial number of the tasks goes up. Also, we can see that the generated trajectories in each scenario are in different directions, indicating that our task generator proposes diverse meta-training tasks. Behavior of the Sub-Policy: We execute sub-policies separately in different scenes to visualize the learned metaskills. In Figure 4, trajectories shown in each row represent the same sub-policies initialized in different scenes, and trajectories shown in each column represent different sub-policies in the same location. As illustrated in Figure 4, the same sub-policy shows consistent behavior in different scenes. Sub-policy1 always bypasses obstacles and goes straight, sub-policy2 always turns right, and sub-policy3 always turns left. The consistency of the sub-policies demonstrates that our ULTRA has learned meaningful meta-skills. + +# 5. Conclusions + +In this paper, we introduce a novel ULTRA framework that enables the agent to learn transferable meta-skills in an unsupervised manner. Experiments show that our method can fast transfer to semantic visual navigation and outperform the baselines by a large margin. Additionally, we find that the sub-policies show consistent motor primitives. The ULTRA framework provides a new perspective that fuses the meta-learning and transfer-learning in a more interpretable way and in the future we plan to transfer the meta-skills to other tasks (i.e. Vision-and-Language Navigation [2], Embodied Question Answering [7] etc.). + +# Acknowledgment + +This work has been supported in part by National Key Research and Development Program of China (SQ2018AAA010010), NSFC (No.61751209, U1611461), Hikvision-Zhejiang University Joint Research Center, Zhejiang University-Tongdun Technology Joint Laboratory of Artificial Intelligence, Zhejiang University iFLYTEK Joint Research Center, Chinese Knowledge Center of Engineering Science and Technology (CKCEST), Engineering Research Center of Digital Library, Ministry of Education. The authors from UCSB are not supported by any of the projects above. + +# References + +[1] Peter Anderson, Angel Chang, Devendra Singh Chaplot, Alexey Dosovitskiy, Saurabh Gupta, Vladlen Koltun, Jana Kosecka, Jitendra Malik, Roozbeh Mottaghi, Manolis Savva, et al. On evaluation of embodied navigation agents. arXiv preprint arXiv:1807.06757, 2018. +[2] Peter Anderson, Qi Wu, Damien Teney, Jake Bruce, Mark Johnson, Niko Sünderhauf, Ian Reid, Stephen Gould, and Anton van den Hengel. Vision-and-language navigation: Interpreting visually-grounded navigation instructions in real environments. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3674-3683, 2018. +[3] Pierre-Luc Bacon, Jean Harb, and Doina Precup. The option-critic architecture. In Thirty-First AAAI Conference on Artificial Intelligence, 2017. +[4] Michael Blösch, Stephan Weiss, Davide Scaramuzza, and Roland Siegwart. Vision based mav navigation in unknown and unstructured environments. In 2010 IEEE International Conference on Robotics and Automation, pages 21-28. IEEE, 2010. +[5] John Canny. The complexity of robot motion planning. MIT press, 1988. +[6] Mark Cummins and Paul Newman. Probabilistic appearance based navigation and loop closing. In Proceedings 2007 IEEE International Conference on Robotics and Automation, pages 2042-2048. IEEE, 2007. +[7] Abhishek Das, Samyak Datta, Georgia Gkioxari, Stefan Lee, Devi Parikh, and Dhruv Batra. Embodied question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 2054-2063, 2018. +[8] Benjamin Eysenbach, Abhishek Gupta, Julian Ibarz, and Sergey Levine. Diversity is all you need: Learning skills without a reward function. arXiv preprint arXiv:1802.06070, 2018. +[9] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 1126-1135. JMLR.org, 2017. +[10] Carlos Florensa, Yan Duan, and Pieter Abbeel. Stochastic neural networks for hierarchical reinforcement learning. arXiv preprint arXiv:1704.03012, 2017. +[11] Kevin Frans, Jonathan Ho, Xi Chen, Pieter Abbeel, and John Schulman. Meta learning shared hierarchies. arXiv preprint arXiv:1710.09767, 2017. +[12] Abhishek Gupta, Benjamin Eysenbach, Chelsea Finn, and Sergey Levine. Unsupervised meta-learning for reinforcement learning. arXiv preprint arXiv:1806.04640, 2018. +[13] Saurabh Gupta, James Davidson, Sergey Levine, Rahul Sukthankar, and Jitendra Malik. Cognitive mapping and planning for visual navigation: Supplementary material, 2017. +[14] Sepp Hochreiter, A Steven Younger, and Peter R Conwell. Learning to learn using gradient descent. In International Conference on Artificial Neural Networks, pages 87-94. Springer, 2001. + +[15] Lydia E Kavraki, Petr Svestka, J-C Latombe, and Mark H Overmars. Probabilistic roadmaps for path planning in high-dimensional configuration spaces. IEEE transactions on Robotics and Automation, 12(4):566-580, 1996. +[16] Kiyosumi Kidono, Jun Miura, and Yoshiaki Shirai. Autonomous visual navigation of a mobile robot using a human-guided experience. Robotics and Autonomous Systems, 40(2-3):121-130, 2002. +[17] Eric Kolve, Roozbeh Mottaghi, Winson Han, Eli VanderBilt, Luca Weihs, Alvaro Herrasti, Daniel Gordon, Yuke Zhu, Abhinav Gupta, and Ali Farhadi. AI2-THOR: An Interactive 3D Environment for Visual AI. arXiv, 2017. +[18] Kurt Konolige, Motilal Agrawal, Robert C Bolles, Cregg Cowan, Martin Fischler, and Brian Gerkey. Outdoor mapping and navigation using stereo vision. In Experimental Robotics, pages 179-190. Springer, 2008. +[19] Jonás Kulhánek, Erik Derner, Tim de Bruin, and Robert Babuška. Vision-based navigation using deep reinforcement learning. In 2019 European Conference on Mobile Robots (ECMR), pages 1-8. IEEE, 2019. +[20] Steven M LaValle. Planning algorithms. Cambridge university press, 2006. +[21] Juncheng Li, Siliang Tang, Fei Wu, and Yueting Zhuang. Walking with mind: Mental imagery enhanced embodied qua. In Proceedings of the 27th ACM International Conference on Multimedia, pages 1211-1219. ACM, 2019. +[22] Larry Matthies and STEVENA Shafer. Error modeling in stereo navigation. IEEE Journal on Robotics and Automation, 3(3):239-248, 1987. +[23] Piotr Mirowski, Razvan Pascanu, Fabio Viola, Hubert Soyer, Andrew J Ballard, Andrea Banino, Misha Denil, Ross Goroshin, Laurent Sifre, Koray Kavukcuoglu, et al. Learning to navigate in complex environments. arXiv preprint arXiv:1611.03673, 2016. +[24] Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. A simple neural attentive meta-learner. arXiv preprint arXiv:1707.03141, 2017. +[25] Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International conference on machine learning, pages 1928-1937, 2016. +[26] Arsalan Mousavian, Alexander Toshev, Marek Fiser, Jana Kosecka, Ayzaan Wahid, and James Davidson. Visual representations for semantic target driven navigation. arXiv preprint arXiv:1805.06066, 2018. +[27] Tsendsumen Munkhdalai and Hong Yu. Meta networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 2554-2563. JMLR.org, 2017. +[28] Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999, 2018. +[29] Boris Oreshkin, Pau Rodríguez López, and Alexandre Lacoste. Tadam: Task dependent adaptive metric for improved few-shot learning. In Advances in Neural Information Processing Systems, pages 721-731, 2018. + +[30] Deepak Pathak, Pulkit Agrawal, Alexei A Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 16-17, 2017. +[31] Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. 2016. +[32] Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Meta-learning with memory-augmented neural networks. In International conference on machine learning, pages 1842-1850, 2016. +[33] Manolis Savva, Angel X Chang, Alexey Dosovitskiy, Thomas Funkhouser, and Vladlen Koltun. Minos: Multimodal indoor simulator for navigation in complex environments. arXiv preprint arXiv:1712.03931, 2017. +[34] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, pages 4077-4087, 2017. +[35] Sainbayar Sukhbaatar, Zeming Lin, Ilya Kostrikov, Gabriel Synnaeve, Arthur Szlam, and Rob Fergus. Intrinsic motivation and automatic curricula via asymmetric self-play. arXiv preprint arXiv:1703.05407, 2017. +[36] Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1199-1208, 2018. +[37] Richard S Sutton, Doina Precup, and Satinder Singh. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 112(1-2):181-211, 1999. +[38] Sebastian Thrun. Learning metric-topological maps for indoor mobile robot navigation. Artificial Intelligence, 99(1):21-71, 1998. +[39] Lisa Torrey and Jude Shavlik. Transfer learning. In Handbook of research on machine learning applications and trends: algorithms, methods, and techniques, pages 242-264. IGI Global, 2010. +[40] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in neural information processing systems, pages 3630-3638, 2016. +[41] Xin Wang, Qiuyuan Huang, Asli Celikyilmaz, Jianfeng Gao, Dinghan Shen, Yuan-Fang Wang, William Yang Wang, and Lei Zhang. Reinforced cross-modal matching and self-supervised imitation learning for vision-language navigation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6629-6638, 2019. +[42] Xin Wang, Wenhan Xiong, Hongmin Wang, and William Yang Wang. Look before you leap: Bridging model-free and model-based reinforcement learning for planned-ahead vision-and-language navigation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 37-53, 2018. +[43] Karl Weiss, Taghi M Khoshgoftaar, and DingDing Wang. A survey of transfer learning. Journal of Big data, 3(1):9, 2016. +[44] Mitchell Wortsman, Kiana Ehsani, Mohammad Rastegari, Ali Farhadi, and Roozbeh Mottaghi. Learning to learn how to + +learn: Self-adaptive visual navigation using meta-learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6750-6759, 2019. +[45] Yuhuai Wu, Elman Mansimov, Roger B Grosse, Shun Liao, and Jimmy Ba. Scalable trust-region method for deep reinforcement learning using kronecker-factored approximation. In Advances in neural information processing systems, pages 5279-5288, 2017. +[46] Yi Wu, Yuxin Wu, Georgia Gkioxari, and Yuandong Tian. Building generalizable agents with a realistic and rich 3d environment. arXiv preprint arXiv:1801.02209, 2018. +[47] Haonan Yu, Xiaochen Lian, Haichao Zhang, and Wei Xu. Guided feature transformation (gft): A neural language grounding module for embodied agents. arXiv preprint arXiv:1805.08329, 2018. +[48] Yuke Zhu, Roozbeh Mottaghi, Eric Kolve, Joseph J Lim, Abhinav Gupta, Li Fei-Fei, and Ali Farhadi. Target-driven visual navigation in indoor scenes using deep reinforcement learning. In 2017 IEEE international conference on robotics and automation (ICRA), pages 3357–3364. IEEE, 2017. \ No newline at end of file diff --git a/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/images.zip b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..def371fe5eee876edf018e1036f075f49dd65bfc --- /dev/null +++ b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98301953c2890330946f7ee55cbce940d0bfe44a49c66563354620abe4207f8c +size 404024 diff --git a/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/layout.json b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..16eb2df6d7ad8b13394a1988ac56cd301af18f30 --- /dev/null +++ b/unsupervisedreinforcementlearningoftransferablemetaskillsforembodiednavigation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f81ecc4134a391cdd715a5e3d55ba01517fad4fe183e7ccfd7c4aee73ac152e0 +size 395130 diff --git a/unsupervisedrepresentationlearningforgazeestimation/e1711eae-dac4-45a9-919a-302acfe95e55_content_list.json b/unsupervisedrepresentationlearningforgazeestimation/e1711eae-dac4-45a9-919a-302acfe95e55_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..485531fe715ed1b023b3e3da9552ecfdb773b73c --- /dev/null +++ b/unsupervisedrepresentationlearningforgazeestimation/e1711eae-dac4-45a9-919a-302acfe95e55_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5f51e5f4e0ecec1496df8ca748a11305d8b51b3a9fd9af20ac35faff7aad870 +size 90117 diff --git a/unsupervisedrepresentationlearningforgazeestimation/e1711eae-dac4-45a9-919a-302acfe95e55_model.json b/unsupervisedrepresentationlearningforgazeestimation/e1711eae-dac4-45a9-919a-302acfe95e55_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e3869b80ffffe8053ae37f6c307a19352b51061b --- /dev/null +++ b/unsupervisedrepresentationlearningforgazeestimation/e1711eae-dac4-45a9-919a-302acfe95e55_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:903a7b11ae2d5c0498274a991cbd95de923b736f8f1a44b83e2b873ee7aa8df0 +size 113066 diff --git a/unsupervisedrepresentationlearningforgazeestimation/e1711eae-dac4-45a9-919a-302acfe95e55_origin.pdf b/unsupervisedrepresentationlearningforgazeestimation/e1711eae-dac4-45a9-919a-302acfe95e55_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d66aa4c2ba391f2751562ea185c086eed5537249 --- /dev/null +++ b/unsupervisedrepresentationlearningforgazeestimation/e1711eae-dac4-45a9-919a-302acfe95e55_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cafab046b2e568ed4a1f00fb042851b898d1fef360e89ed50d441f6e8b94b8b +size 1131449 diff --git a/unsupervisedrepresentationlearningforgazeestimation/full.md b/unsupervisedrepresentationlearningforgazeestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..59ecc0d7eabd5b56833150b89477449f0ab3edb7 --- /dev/null +++ b/unsupervisedrepresentationlearningforgazeestimation/full.md @@ -0,0 +1,391 @@ +# Unsupervised Representation Learning for Gaze Estimation + +Yu Yu, Jean-Marc Odobez + +Idiap Research Institute, CH-1920, Martigny, Switzerland + +EPFL, CH-1015, Lausanne, Switzerland + +{yyu, odobez} @idiap.ch + +# Abstract + +Although automatic gaze estimation is very important to a large variety of application areas, it is difficult to train accurate and robust gaze models, in great part due to the difficulty in collecting large and diverse data (annotating 3D gaze is expensive and existing datasets use different setups). To address this issue, our main contribution in this paper is to propose an effective approach to learn a low dimensional gaze representation without gaze annotations, which to the best of our best knowledge, is the first work to do so. The main idea is to rely on a gaze redirection network and use the gaze representation difference of the input and target images (of the redirection network) as the redirection variable. A redirection loss in image domain allows the joint training of both the redirection network and the gaze representation network. In addition, we propose a warping field regularization which not only provides an explicit physical meaning to the gaze representations but also avoids redirection distortions. Promising results on few-shot gaze estimation (competitive results can be achieved with as few as $\leq 100$ calibration samples), cross-dataset gaze estimation, gaze network pretraining, and another task (head pose estimation) demonstrate the validity of our framework. + +# 1. Introduction + +Gaze is a non-verbal cue with many functions. It can indicate attention, intentions, serve as communication cue in interactions, or even reveal higher level social constructs of people in relation with their personality. As such, it finds applications in many areas. For instance, it can be used in multi-party interaction analysis [2], Human-Robot-Interaction (HRI) for both floor control analysis and for robot behaviour synthesis to enable smooth interactions [1, 41]; in the virtual reality industry [3, 28], visual rendering can be improved by inferring the user gaze direction; in psychology, gaze behavior can contribute to mental health analysis and care [21, 49]. + +As with other computer vision tasks, the developments in deep neural networks have largely contributed to the progresses made on gaze estimation [4,5,37,59,60,63]. For all these approaches, it is common sense that their performance depends on a large extent on the available amount of + +![](images/8cf1d91ff3b7dd9884fdc42590be34cdc6d465f25d5bb42244b47f9df77e0162.jpg) + +![](images/fbea09626bd251acf62f03991a48c373962246ff8fac03828382efc454ffd772.jpg) + +![](images/5093f6f2ec07282d712806292ba25ab4d54fb6cacf27dfd566120366e6097818.jpg) +Figure 1. Proposed framework. Top: the networks $\mathcal{G}_{\phi}$ extracts gaze representations from two input eye images $I_{i}$ and $I_{o}$ . Their difference $\Delta r$ is used as input to a gaze redirection network $\mathcal{R}_{\theta}$ along with the input image $I_{i}$ to generate a redirected eye $I_{red}$ which should be close to $I_{o}$ . Both the $\mathcal{G}_{\phi}$ and $\mathcal{R}_{\theta}$ networks are trained jointly in an unsupervised fashion from unlabeled image pairs $(I_{i}, I_{o})$ . Middle. Thanks to our warping field regularization, the distribution of $(r_{p}$ vs pitch) and $(r_{y}$ vs yaw) exhibit high (almost linear) correlation. Bottom. The network $\mathcal{G}_{\phi}$ can further be used to train a gaze regressor. + +data. Unfortunately, collecting and annotating 3D gaze data is complex and expensive, which introduces challenges and problems for gaze estimation, as summarized below: + +- Data amount. The size of benchmark datasets [9, 11, 44, 45, 60, 61] including the number of people, is limited, making it difficult to train robust person-independent models. Synthetic data [53, 55] offers an alternative, but the domain gap is hard to eliminate. +- Data annotation. 3D gaze annotation can be noisy, due to (i) measurement errors: most datasets compute the 3D line of sight by visually estimating the 3D positions of eyes and gaze targets; (ii) participant distractions or blinks [7,43], leading to wrong annotations. +- Dataset bias. Existing datasets rely on different cameras and setups, with important variations in visual + +appearances (resolutions, lighting conditions). More importantly, they may only provide eye images obtained using different preprocessing techniques and gaze coordinate systems, making it almost impossible to merge datasets for training. It is thus hard to apply trained model to out-of-domain samples. + +To address these challenges and lower the requirements for annotated gaze dataset, we propose an unsupervised approach which leverages large amounts of unannotated eye images for learning gaze representations, and only a few calibration samples to train a final gaze estimator. We show in experiments that with as low as 100 calibration samples we can already achieve competitive performances. + +The main idea is illustrated in Fig. 1. The basis is a redirection network $\mathcal{R}_{\theta}$ which takes as input an eye image $I_{i}$ as well as a gaze redirection variable $\Delta r$ . It generates an output image $I_{red}$ of the same eye but with the redirected gaze. In prior works [14, 20, 27, 59], $\Delta r$ is explicitly set as a gaze offset, which means that gaze annotated images are required at training time (to set the gaze difference between $I_{i}$ and the target output image $I_{o}$ ). In contrast, our method aims at using a network $\mathcal{G}_{\phi}$ to extract gaze representations from $I_{i}$ and $I_{o}$ and the simple representation difference provides the sufficient information required to do gaze retargeting. By imposing appropriate loss functions between the redirected output $I_{red}$ and the target $I_{o}$ , the framework can jointly train both the $\mathcal{R}_{\theta}$ and $\mathcal{G}_{\phi}$ networks from unlabelled images, implicitly enforcing the unsupervised learning of gaze representations. The middle part of Fig. 1 shows that this is achieved, as the 2-dimensional output of $\mathcal{G}_{\phi}$ is highly correlated (close to linear correlation) with groundtruth gaze angles. It is then possible to train a robust gaze estimator leveraging this representation. While investigating the above ideas, this paper makes the following contributions: + +- Unsupervised gaze representation learning. We propose an approach to learn low dimensional gaze representations without gaze annotations, relying on a gaze redirection network and loss functions in image domain. To our best knowledge, this is the first work of unsupervised gaze representation learning. +- Warping field regularization. Similar to previous works, we rely on an inverse warping field $\mathbf{w}$ to perform gaze redirection. This paper proposed a warping field regularization which not only prevents possible overfitting or distortions, but also gives a physical meaning to the components of the learned unsupervised gaze representations. +- Head pose extensions. We also show that our unsupervised method is not limited to gaze estimation, but can also be used to process face images and learn a head pose related representation. + +Experiments on three public datasets demonstrate the val + +idativity of our approach, in particular when training with very few gaze calibrated datapoints and applying to cross-domain experiment (which shows that our method could successfully leverage large amount of Internet data to handle a much larger variety of eye shape, appearance, head poses, and illumination, ending in a more robust network for gaze representation extraction). + +In the rest of the paper, we first summarize related works in Section 2. The method is detailed in Section 3. Section 4 explains our experiment protocol and reports our results. The conclusion is drawn in Section 5. + +# 2. Related Work + +Gaze estimation can be categorized into 3 classes, 2D Gaze Estimation, Gaze Following and 3D Gaze Estimation. + +2D Gaze Estimation aims at predicting the 2D fixation point of gaze, e.g. on the screens of mobile devices [22,29]. They usually rely on large datasets since annotating 2D gaze data is efficient. But it is hard to generalize a 2D gaze model to multiple devices or scenarios. + +Gaze Following attempts to infer the object people are looking at. Recasens et al. proposed to use a saliency and a gaze pathways to predict the objects people look at in an image [39] or in a video [40]. Gaze following models tend to predict the head pose rather than the gaze, although recent works [6] attempted to jointly model gaze following and 3D gaze estimation, but without much improvement. + +3D Gaze Estimation which retrieves the 3D line of sight of eyes is the main focus of this paper. Traditional approaches mainly include geometric based methods (GBM) and appearance based methods (ABM). GBM methods first extract features [12, 16, 17, 23, 47, 48, 50, 54, 56] from training images then estimate parameters of a geometric eye model which could be used to predict gaze. They usually require high resolution eye images and near frontal head poses, which limits its application scope. In contrast, ABM methods [13, 18, 22, 34-36, 45, 46] learn a direct mapping from eye appearance to the corresponding gaze. + +ABM methods have attracted more attention in recent years with the development of deep learning. Zhang et al. [60] proposed a shallow network combining head pose along with extracted eye features, and later showed that a deeper network can further improve performance [62]. Moving beyond single eye gaze estimation, Cheng et al. [5] proposed to use two eyes while others relied on the full face, like in Zhang et al. [61] where a network process a full face but without using the head pose explicitly. Zhu et al. [63], however, proposed a geometric transformation layer to model the gaze and head pose jointly. Finally, as a recent trend, researchers start to work on building person-specific models from few reference samples to eliminate the person specific bias [4, 31-33, 37, 57, 59]. + +In general however, the performance of all the above + +![](images/fb2e2a927ebc86c610d8df2c2ad164604234bf5f712fe3a2c91e3055223f2007.jpg) +Figure 2. Unsupervised Learning of Gaze Representation. + +models depends on the amount and diversity of training data. But as annotating 3D gaze is complex and expensive, it is difficult to collect data. Although synthetic data and domain adaptation [42, 51, 53, 55, 58] have been proposed, the domain gap between the synthetic data and real data is difficult to eliminate. + +Representation Learning is also a topic related to our paper. Wiles et al. [26] proposed FAb-Net which learns a face embedding by retargetting the source face to a target face. The learned embedding encodes facial attributes like head pose and facial expression. Li et al. [30] later extended this work by disentangling the facial expression and the head motion through a TwinCycle Autoencoder. The training of the two approaches are conducted in a self-supervised way. Different from the above approaches which learn high dimensional embeddings with unclear physical meaning, our framework learns a low dimensional representations (2-Dim) with very clear meaning. Finally, following the face retargetting framework, an interesting gaze representation learning approach is proposed by Park et al. [37] where a face representation extracted from a bottleneck layer is disentangled as three components: appearance, gaze and head pose. The method however used a supervised approach for training, relying on head pose and gaze labels. + +# 3. Method + +# 3.1. Method Overview + +The main idea behind our approach was introduced in Fig. 1: the aim is to jointly learn a representation network $\mathcal{G}_{\phi}$ and a redirection network $\mathcal{R}_{\theta}$ so that the difference $\Delta r = r_{i} - r_{o} = \mathcal{G}_{\phi}(\boldsymbol{I}_{i}) - \mathcal{G}_{\phi}(\boldsymbol{I}_{o})$ between the extracted gaze representations indicates the gaze change to be used by the redirection network to generate a redirection image $\boldsymbol{I}_{red}$ which is as close as possible to $\boldsymbol{I}_{o}$ . + +Our more detailed framework is shown in Fig. 2. Given a + +training image pair $(I_i, I_o)$ the network does the following. An alignment network $\mathcal{A}_{\psi}$ aligns the input $I_i$ to $I_o$ using a global parametric motion model (translation and scale) according to: $I_i^t = \mathcal{A}_{\psi}(I_i, I_o)$ . Then the redirection network takes this image as input, and produces a retargeted image as $I_{red} = \mathcal{R}_{\theta}(I_i^t, \Delta r)$ , where as above $\Delta r$ denotes the intended gaze change to be applied. In the following, we further motivate and detail our three networks. Then, we introduce the loss used for training the system, with a particular attention paid to the regularization of the warping field involved in the gaze redirection. Note that as a requirement for gaze redirection [59], the image pair $(I_i, I_o)$ should be from the same person and share a similar head pose. + +# 3.2. Gaze Representation Learning + +The top right of Fig. 2 shows the architecture of the gaze representation learning module. It first extracts the gaze representations from the input images with $\mathcal{G}_{\phi}$ , a network based on ResNet blocks, and then computes the representation difference. In our approach, there are several elements which favor the learning of a gaze related representation rather than other information. + +Gaze Representation $r$ . We set $r$ to be of dimension 2, which is motivated by two aspects. First, as the gaze direction is defined by the pitch and yaw angles, a 2D representation is enough. Secondly, a compact representation avoids the risk of capturing appearance information which should be extracted by the encoding part of the redirection network $\mathcal{R}_{\theta}$ from the input image. Otherwise, with a higher dimension, both $\mathcal{R}_{\theta}$ and $\mathcal{G}_{\phi}$ may encode eye appearance features, making the training of $\mathcal{R}_{\theta}$ and $\mathcal{G}_{\phi}$ less constrained. + +Data Augmentation. To further enforce $\mathcal{G}_{\phi}$ to capture gaze-only information, we assume that the gaze representation should remain the same under small geometric perturbations. Thus, during training, we also apply random scaling and translation to the images before applying $\mathcal{G}_{\phi}$ . This data augmentation is a key step to achieve robust and accurate unsupervised gaze learning. Should this step be removed, $\mathcal{G}_{\phi}$ might learn to detect the pupil center position, which would be sufficient for the network $\mathcal{R}_{\theta}$ to generate a precise redirection output, but not be what we want. Thus, data augmentation enforces $\mathcal{G}_{\phi}$ to learn a scale and translation invariant representation, i.e. a gaze representation. + +# 3.3. Global Alignment Network $\mathcal{A}_{\psi}$ + +As pointed in [59], training a gaze redirection network requires well aligned eye image pairs since global geometric transformation information can not be retrieved from the input image or the gaze difference. Hence, previous works used synthetic data [59] (domain adaptation required), landmark detection [60] or 3D head model [10] for eye alignment, which is not precise enough. Inspired by [24], we propose to learn to align an input image $I_{i}$ with a target output $I_{o}$ , as shown in the top left of Fig. 2. Concretely, an + +alignment sub-network $f_{\mathcal{A}_{\psi}}$ takes $I_{i}$ and $I_{o}$ as input and predicts the motion parameters (translation and relative scale) between $I_{i}$ and $I_{o}$ . In the first few layers of $f_{\mathcal{A}_{\psi}}$ , the two images are processed by separate network branches with shared weights. Then the extracted image features are concatenated and further processed to predict the geometric parameters. A grid generator $\mathcal{W}$ [24] then converts these parameters into the inverse warping field transforming $I_{i}$ into $I_{i}^{t}$ (supposed to be aligned with $I_{o}$ ). The whole forward process can be formulated as: + +$$ +\boldsymbol {I} _ {i} ^ {t} = \mathcal {A} _ {\psi} (\boldsymbol {I} _ {i}, \boldsymbol {I} _ {o}) = \boldsymbol {I} _ {i} \circ \mathcal {W} \left(f _ {\boldsymbol {A} _ {\psi}} (\boldsymbol {I} _ {i}, \boldsymbol {I} _ {o})\right) \tag {1} +$$ + +where $\circ$ denotes the grid sampling operator. Fig. 2 illustrate one alignment example, where $I_{i}$ has been translated vertically to align with $I_{o}$ . + +# 3.4. Gaze Redirection Network $\mathcal{R}_{\theta}$ + +The network $\mathcal{R}_{\theta}$ is shown in the bottom part of Fig. 2. The main part is an encoder-decoder network $f_{\mathcal{R}_{\theta}}$ trained to predict a warping field $\boldsymbol{w} = (\boldsymbol{w}_h, \boldsymbol{w}_v)$ which warps the (aligned) input $\boldsymbol{I}_i^t$ using a grid sampling operation [24] and synthesize a gaze redirection output $\boldsymbol{I}_{red}$ . In its bottleneck part, the network also receives feature maps generated from the retargeting gaze information $\Delta r$ between $\boldsymbol{I}_i$ and $\boldsymbol{I}_o$ . As discussed in Sec. 3.2, the encoder of $f_{\mathcal{R}_{\theta}}$ ought to encode the eye structure (appearance) related information of $\boldsymbol{I}_i^t$ , while $\mathcal{G}_{\phi}$ (through $\Delta r$ ) should encode only the gaze change. The whole forward process can be summarized as: + +$$ +\boldsymbol {I} _ {r e d} = \mathcal {R} _ {\theta} \left(\boldsymbol {I} _ {i} ^ {t}, \Delta r\right) = \boldsymbol {I} _ {i} ^ {t} \circ f _ {\mathcal {R} _ {\theta}} \left(\boldsymbol {I} _ {i} ^ {t}, \mathcal {G} _ {\phi} (\boldsymbol {I} _ {i}) - \mathcal {G} _ {\phi} (\boldsymbol {I} _ {o})\right) \tag {2} +$$ + +# 3.5. Training Loss, Warping Field Regularization + +The loss used to train the whole system is defined as a linear combination of several losses: + +$$ +\mathcal {L} = \mathcal {L} _ {i m g} + \lambda_ {w} \mathcal {L} _ {w} \text {w i t h} \mathcal {L} _ {i m g} = \lambda_ {p} \mathcal {L} _ {p} + \lambda_ {f} \mathcal {L} _ {f} + \lambda_ {s} \mathcal {L} _ {s} \tag {3} +$$ + +where $\mathcal{L}_{img}$ is an image loss defined at the pixel $(\mathcal{L}_p)$ , feature $(\mathcal{L}_f)$ , and style $(\mathcal{L}_s)$ levels, whereas $\mathcal{L}_w$ is a regularization term on the warping field. In the following, we first introduce $\mathcal{L}_{img}$ , and then emphasize the warping loss $\mathcal{L}_w$ which plays an important role in our approach. + +# 3.5.1 Image Loss $\mathcal{L}_{img}$ + +The main goal of the image loss is to measure the semantic difference between the generated image $I_{red}$ and the target image $I_o$ . It comprises three terms that we now describe. + +Pixel Loss. It measures the discrepancy between $I_{red}$ and $I_o$ using a pixel level L1 loss ( $s_I$ denotes the image size). + +$$ +\mathcal {L} _ {p} = \frac {1}{s _ {I}} | | \boldsymbol {I} _ {r e d} - \boldsymbol {I} _ {o} | | _ {1} \tag {4} +$$ + +Perceptual Loss. $\mathcal{L}_p$ is local and sensitive to illumination differences, and does not capture more structure and semantic information disparities. The latter and the robustness to illumination changes can be achieved using a perceptual + +![](images/c5d089e44d66b7fafa904d4087e32f816c1c5faff408109740d63ddc67357d8d.jpg) +Figure 3. Representation drop out for warping field regularization. + +loss comprising both feature and style reconstruction losses [25] which can be computed as follows. The $I_{red}$ and $I_o$ images are passed through a VGG16 network pretrained with ImageNet, from which we consider the features $f_j$ in the $j = 3,8$ , and $13^{th}$ layers. Accordingly, we can define the feature reconstruction loss $\mathcal{L}_f$ as: + +$$ +\mathcal {L} _ {f} = \sum_ {j} \frac {1}{c _ {j} \cdot s _ {f _ {j}}} \left| \left| f _ {j} \left(\boldsymbol {I} _ {\text {r e d}}\right) - f _ {j} \left(\boldsymbol {I} _ {o}\right) \right| \right| _ {2} \tag {5} +$$ + +in which $s$ represents the spatial size of the feature maps and $c$ the number of feature channels. To compute the style loss $\mathcal{L}_s$ , the 3D feature maps $\pmb{f}_j$ are first reshaped into 2D matrices $\pmb{m}_j$ of size $c_j \times s_{f_j}$ from which we can compute the gram matrices $\pmb{g}_j$ (size $c_j \times c_j$ ), and then $\mathcal{L}_s$ : + +$$ +\boldsymbol {g} _ {j} = \frac {1}{s _ {f _ {j}}} \boldsymbol {m} _ {j} \cdot \boldsymbol {m} _ {j} ^ {T}, \text {a n d} \mathcal {L} _ {s} = \sum_ {j} \frac {1}{c _ {j} ^ {2}} | | \boldsymbol {g} _ {j} (\boldsymbol {I} _ {\text {r e d}}) - \boldsymbol {g} _ {j} (\boldsymbol {I} _ {o}) | | _ {2}. \tag {6} +$$ + +# 3.5.2 Warping Field Regularization + +Motivation. With the image loss $\mathcal{L}_{img}$ alone, we are able to train the whole framework in an end-to-end fashion and achieve the unsupervised learning of gaze representation. However, the physical meaning of the gaze representation is not clear. In this section, we introduce a warping field regularization which not only gives physical meaning to the gaze representation but also regularizes the training of the whole framework (as shown in the experiments). + +The main idea is to associate each gaze representation component with a specific warping field. Indeed, as shown in [58], the gaze yaw mainly involves an horizontal motion of the iris, and the pitch a vertical motion of the eyelid and iris. In other words, when there is only a yaw change (no pitch change), the vertical motion flow of eye region should be close to 0. Similarly, with only a pitch change, the horizontal flow should be close to 0. Note that no motion flow corresponds to an identity warping field. + +Gaze Representation Dropout. To exploit the above assumption, we proposed the dropout mechanism illustrated in Fig. 3, in which we drop in turn each dimension of the gaze change $\Delta r$ (setting it to 0), and enforce one of the warping field components to be an identity mapping $w_{id}$ while keeping the other one unchanged. + +![](images/4cf8b3de83252d53cec6e02ff290855c548c3169a1868e300a41428ce1f1c9ae.jpg) +Figure 4. Distribution of the $(pitch, r_p)$ and $(yaw, r_y)$ data points (with $(yaw, pitch)$ being the ground truth gaze in head coordinate system $(HCS)$ ), for different training folds of a dataset (a) Eyediap. (b) Columbia Gaze (discrete and sparse gaze label). (c) UTMultiview. + +More concretely, given a training image pair $(I_i, I_o)$ , we first apply the forward pass and compute the representation difference as well as the warping field, according to: + +$$ +\left[ \Delta r _ {p}, \Delta r _ {y} \right] = \mathcal {G} \left(\boldsymbol {I} _ {i}\right) - \mathcal {G} \left(\boldsymbol {I} _ {o}\right), \left(\boldsymbol {w} _ {h}, \boldsymbol {w} _ {v}\right) = f _ {\mathcal {R}} \left(\boldsymbol {I} _ {i} ^ {t}, \left[ \Delta r _ {p}, \Delta r _ {y} \right]\right) \tag {7} +$$ + +Then, we apply the dropout for each dimension, which results in the fields: + +$$ +\left(\boldsymbol {w} _ {h} ^ {\Delta r _ {y} = 0}, \boldsymbol {w} _ {v} ^ {\Delta r _ {y} = 0}\right) = f _ {\mathcal {R} _ {\theta^ {*}}} \left(\boldsymbol {I} _ {i} ^ {t}, [ \Delta r _ {p}, 0 ]\right) \tag {8} +$$ + +$$ +\left(\boldsymbol {w} _ {h} ^ {\Delta r _ {p} = 0}, \boldsymbol {w} _ {v} ^ {\Delta r _ {p} = 0}\right) = f _ {\mathcal {R} _ {\theta^ {*}}} \left(\boldsymbol {I} _ {i} ^ {t}, [ 0, \Delta r _ {y} ]\right) +$$ + +on which we apply the regularization loss: + +$$ +\mathcal {L} _ {w} = \frac {1}{s _ {I}} \left(\left| \left| \boldsymbol {w} _ {h} ^ {\Delta r _ {y} = 0} - \boldsymbol {w} _ {i d} \right| \right| _ {1} + \left| \left| \boldsymbol {w} _ {v} ^ {\Delta r _ {y} = 0} - \boldsymbol {w} _ {v} \right| \right| _ {1} + \right. \tag {9} +$$ + +$$ +\left| \left| \boldsymbol {w} _ {v} ^ {\Delta r _ {p} = 0} - \boldsymbol {w} _ {i d} \right| \right| _ {1} + \left| \left| \boldsymbol {w} _ {h} ^ {\Delta r _ {p} = 0} - \boldsymbol {w} _ {h} \right| \right| _ {1}) +$$ + +Note that for the dropout of each dimension, we not only enforce one field to be identity mapping, but also keep the other field unchanged since the other dimension of $\Delta r$ is unchanged. In addition, note that for this regularization term, only the parameters $\theta^{*}$ of the decoder part of the redirection network are optimized, as shown in Fig. 3. This regularization is used along with the image loss when training the network (see Eq. 3). In essence, through this dropping and regularization mechanism, the network will be trained to associate the generation of one warping direction with one representation component, giving a physical meaning to the gaze representation. This is demonstrated in Fig. 4. In addition, as shown in Section 4.2, this regularization term also prevents potential overfitting or distortion of the warping field, leading to improved gaze redirection images and better gaze representations when used for gaze training. + +# 3.6. Few-Shot Gaze Estimation + +Linear Adaptation. To estimate the gaze $(g_{p}, g_{y})$ (in head coordinate system, $HCS$ ) from the unsupervised gaze representation $(r_{p}, r_{y})$ (also in $HCS$ ), we can first simply estimate two linear models (for pitch and yaw respectively): + +$$ +g _ {p} = k _ {p} r _ {p} + b _ {p}, g _ {y} = k _ {y} r _ {y} + b _ {y} \tag {10} +$$ + +using the very few calibration samples to rescale our representation, where $k_{p}, b_{p}, k_{y}$ and $b_{y}$ are model parameters. + +Network Re-initialization and Finetuning. The second step is to fine-tune the network using the calibration samples. However, before doing this we re-initialized the + +weight and bias $(\pmb{k}^{\phi} = [\pmb{k}_p^{\phi},\pmb{k}_y^{\phi}],\pmb{b}^{\phi} = [\pmb{b}_p^{\phi},\pmb{b}_y^{\phi}])$ of the last layer of gaze network $\mathcal{G}_{\phi}$ , using the above linear models, according to: + +$$ +k _ {p} \left(\boldsymbol {k} _ {p} ^ {\phi} \cdot \boldsymbol {x} + \boldsymbol {b} _ {p} ^ {\phi}\right) + b _ {p} \rightarrow \left(k _ {p} \boldsymbol {k} _ {p} ^ {\phi}\right) \cdot \boldsymbol {x} + \left(k _ {p} \boldsymbol {b} _ {p} ^ {\phi} + b _ {p}\right) \tag {11} +$$ + +$$ +k _ {y} \left(\boldsymbol {k} _ {y} ^ {\phi} \cdot \boldsymbol {x} + \boldsymbol {b} _ {y} ^ {\phi}\right) + b _ {y} \rightarrow \left(k _ {y} \boldsymbol {k} _ {y} ^ {\phi}\right) \cdot \boldsymbol {x} + \left(k _ {y} \boldsymbol {b} _ {y} ^ {\phi} + b _ {y}\right) +$$ + +where $\pmb{x}$ is feature forward to the last layer and $[k_p\pmb{k}_p^\phi, k_y\pmb{k}_y^\phi]$ and $[k_p\pmb{b}_p^\phi + b_p, k_y\pmb{b}_y^\phi + b_y]$ are the new weight and bias. + +Gaze in World Coordinate System (WCS). To obtain a final gaze estimation in the WCS, the estimation in HCS is transformed using the head pose information. + +# 3.7. Implementation Detail + +Hyperparameters and Optimization. The framework is optimized by Adam with an initial learning rate of $10^{-4}$ and a small batch size of 16. 10 epochs are used to train the network and the learning rate is reduced by half every 3 epochs. The default values of loss weights $\lambda_{p}, \lambda_{f}, \lambda_{s}$ and $\lambda_{w}$ are 1.0, 0.02, 0.1, 0.25 respectively. But for Eyediap samples which are blurry, we set $\lambda_{p}$ to 0.2. + +Activation Function. To bound the value of gaze representation when training begins, we used tanh in the last layer of gaze network $\mathcal{G}_{\phi}$ . After 2 epochs, we removed the activation function, making the last layer a linear projection. + +# 4. Experiment + +# 4.1. Experiment Protocol + +Dataset. We used three public datasets for experiment: Eyediap [11], Columbia Gaze [44] and UTMultiview [45]. Eyediap was collected with a RGBD sensor. It consists of sessions with different illumination conditions, gaze targets and head motion settings. We selected the session of HD video, condition B, floating target and static head pose for experiment, which results in 5 videos (5 subjects). Eye images were extracted and rectified to a frontal head pose [13]. Different from Eyediap, the gaze targets in Columbia Gaze and UTMultiview are discrete: only 7 horizontal and 3 vertical gaze directions in Columbia Gaze, 160 directions in UTMultiview where the gaze labels are further smoothed by a reconstruction-and-synthesis strategy. Both Columbia Gaze and UTMultiview use camera arrays to take multiview (head pose) samples. We use all available data for these two datasets (56 subjects and 50 subjects respectively). + +Cross-Validation. For the 3 datasets, we perform $n =$ + +5, 5, 3-fold cross validation respectively (no subject overlap). In each fold, training data is used for unsupervised learning (without using gaze annotations) and then for few-shot gaze estimation by randomly selecting 10 to 100 samples with annotations. Test data is only used for evaluation. Please note that this few-shot setting is different from few-shot personalization setting as in [19, 37, 59], and all reported results in this paper are cross-subject. + +Training Pair. For Columbia Gaze and UTMultiview, the image pairs $(I_i, I_o)$ are randomly selected. However, for Eyediap which covers a larger gaze range, $(I_i, I_o)$ are selected temporally by limiting their time gap within $10\sim 20$ frames. As already mentioned, $I_i$ and $I_o$ should be of the same person with a similar head pose. We used at most 200K pairs for training. + +Network Models. Network details are given in the supplementary material. For the redirection network, it is based on ResNet blocks. Regarding the gaze network $\mathcal{G}_{\phi}$ , our default architecture ResNet is based on 4 ResNet blocks. For comparative experiments, we tested with VGG16 pretrained with ImageNet (adopted in [62]) and with the MnistNet shallow architecture used in [60]. + +# Tested Few-Shot Gaze Estimation Methods. + +- U-LinFT: our approach, consisting of unsupervised representation learning (U), linear adaptation (Lin) and network finetuning (FT), including re-initialization. +- U-Lin: the same as above, but without network finetuning. A similar linear adaptation strategy was used in [32] (but this was for gaze personalization). +- $U$ -SVR: unsupervised representation learning followed by SVR adaptation. The SVR input features are the concatenation of the gaze representation and the output from the second last layer of $\mathcal{G}_{\phi}$ . A similar approach was used for gaze personalization in [29]. +- DTrain: a randomly initialized (or ImageNet pretrained for VGG16) baseline network directly trained with calibration samples. + +Note that since to our best knowledge this is the first work to investigate unsupervised gaze representation learning and cross subject few-shot gaze estimation, it is difficult to find a state-of-the-art approach for comparison. + +Performance Measure. We use the angle (in degree) between the estimated gaze and the ground truth gaze vectors as error measure. All reported results are the average of 10 runs (including random selection of calibration samples). + +# 4.2. Qualitative results + +# Visualization of the Unsupervised Gaze Representation. + +Fig. 4 shows the $n$ distributions of unsupervised gaze representation w.r.t. ground truth. Each distribution corresponds to a gaze model obtained on the left-out folds of the datasets (see Cross-Validation above). As can be seen, these distributions are almost linear, validating the relevance of our ap + +![](images/8ce16193982eb543209eaa4c6ba386ad2d49fa547cf1ae71dea63928d2698f7b.jpg) +Figure 5. Gaze redirection on (a) Eyediap. (b) Columbia Gaze. (c) UTMultiview. (d) Eyediap without the warping regularization loss. Each image triple represents: Left: input image, Middle: redirection output, Right: ground truth. + +![](images/1bd00a56ea3fec853bbca1a87edec12723c71e83b014499a3208c76373b6c7c8.jpg) + +![](images/f5d7153e295b6460c3b315a3d830bb6b80b2158cdb9d34f785cf1eccccf041a0.jpg) + +![](images/0466e392f91a926d35b202096b7e244d82ae7e533e065f2f4315f5ffeed6b141.jpg) + +proach and warping regularization loss. An interesting point is that the gaze representation is inversely proportional to the ground truth sometimes, which might be due to the random factor during network initialization and training. + +Gaze redirection. Fig. 5 illustrates the quality of our unsupervised gaze redirection results, where we remind that the gaze shift to be applied to the input image is provided by the representation difference obtained from the left and right images. As can be seen, our framework achieves accurate gaze redirection as well as eye alignment. Fig. 5(d) also demonstrates visually the overall benefit of our warping field regularization scheme. + +# 4.3.Quantitative results + +Few-Shot Gaze Estimation. The quantitative performances of few-shot gaze estimation approaches are reported in Fig. 6, where the results trained with all data and annotations (DTrain (ResNet, full data)) are plot as a lower bound. We can first notice that our approach (U-LinFT) achieves an acceptable accuracy ( $7^{\circ} \sim 8^{\circ}$ error on all datasets) with only 100 calibration samples. In addition, all few-shot results based on our unsupervised learning (U-LinFT, U-Lin, U-SVR) are significantly better than the DTrain methods, including the VGG architecture pretrained on ImageNet. Furthermore, the performance of our approach with 10 calibration samples is still much better than the performance of DTrain methods with 100 samples. + +U-LinFT performs very well on Eyediap and UTMultiview (only about $1^{\circ}$ worse using 100 samples). In contrast, on Columbia Gaze, the performance gap is $1.9^{\circ}$ . One possible reason regarding Eyediap is that its samples have been rectified to a frontal head pose and exhibit less variability, making our unsupervised gaze learning assumptions more valid. It is also reflected in Fig. 4 where the linear distributions from Eyediap are less dispersive. This implies that our approach could apply well to head mounted systems [15] where eyes have a fixed pose. + +Amongst the unsupervised approaches, $U$ -LinFT performs the best. $U$ -Lin is in par using few calibration samples, but the performance gap increases with the number of samples since linear adaptation has fewer parameters. The $U$ -SVR method is the worst when using few calibration + +![](images/c8aac28940692fe2dc5743137d960b031c0a45490d59c7142695ff2c5a62c763.jpg) +Figure 6. Few-shot gaze estimation results. (a) Eyediap. (b) Columbia Gaze. (c) UTMultiview. + +![](images/1a50e0eea84fb2fd60dae91a999c13b2ba3e6938edcc6d88e3a6f1b81a1998ce.jpg) + +![](images/a575c95c875bae51e2db22d1606283e911fec88a0923f48364d8d6ad14ec5ba1.jpg) + +![](images/dd882cf53b2b8e5bc2fb4d812c95577ae9446c5171661fd807ccb9e7d6f70e12.jpg) +Figure 7. Cross dataset evaluation (unsupervised training on UTMultiview, test on Columbia Gaze) (a) Unsupervised gaze representation. (b) Few-shot gaze estimation. + +![](images/b7cfc24d453a5b5d6da56fd8e24157e23017bdd49e7924df6ea079b36d98d28d.jpg) + +![](images/cb0fb4ee3df321caf18c53b67a83607c0e864fd725d10296ab221b6ee8b0b212.jpg) +Figure 8. Ablation study (Eyediap). + +![](images/a889a8eff79dc2b8b0cca5ea06b0b7c6db8caf7f3664586e9bbc50c7dd241bc7.jpg) +Figure 9. Few-shot gaze estimation with MnistNet. + +samples because it has to train an SVR model from scratch, but it catches up as the number of samples increases. + +Cross-Dataset Evaluation. We trained our unsupervised model on UTMultiview then tested it on Columbia Gaze (Columbia Gaze samples were converted to grayscale for consistency with UTMultiview). Fig. 7(a) visualizes the extracted representations vs ground truth distribution of the Columbia Gaze samples. They still follow a linear-like distribution. We then randomly select calibration samples from Columbia Gaze for few-shot gaze training. Results are reported in Fig. 7(b). Though we observe a small performance drop compared to results in Fig. 6(b), our unsupervised approaches are still much better than the DTrain method. More interestingly, we also trained a gaze estimator on UTMultiview in a supervised fashion (DTrain (ResNet, full data)) and adapted it on Columbia Gaze. This adaptation approach named S-SVR relies on an SVR model which uses features extracted from the last and the second last layer of the supervised model trained on UTMultiview. It was used in [29] (the original model only used features from the second last layer) for cross dataset experiment. Surprisingly, Fig. 7(b) shows that our unsupervised U-SVR (based on the same architecture but trained in an unsupervised fashion) is better than S-SVR, demonstrating that we achieved accurate unsupervised representation learning with good generalization capacity. These results show that our method can benefit from cross-domain data sources, and has the capacity to leverage large amount of Internet data to train robust models coping with diverse eye shapes, appearance, head poses, and illuminations. + +Ablation Study. We study the impact of data augmentation + +tion and warping regularization by removing them. Note that as the physical meaning of the unsupervised representation is unclear when removing the warping regularization, we used a bilinear model to project the representation to gaze. Results are shown in Fig. 8. The performances without data augmentation or warping regularization are well below our proposed approach, but they remain better than DTrain. The gaze error increases by $\sim 3^{\circ}$ after removing data augmentation, showing that this is key to learn scale and translation invariant gaze representations. But removing the warping regularization leads to even more performance degradation. To explore the cause, some gaze redirection outputs without warping regularization are shown in Fig. 4(d). In the first three rows, skin pixels are re-projected to the sclera region because of wrong warping. In the last three rows, the outputs are totally distorted. This further demonstrates that the warping field regularization not only gives a physical meaning to the unsupervised gaze representations, but also prevents from possible distortions. + +Shallow Architecture. As shallow networks can be of practical use in mobile devices, we tested our approach on the MnistNet gaze network $\mathcal{G}_{\phi}$ while keeping the same $\mathcal{A}_{\psi}$ and $\mathcal{R}_{\theta}$ architectures. The performance is shown in Fig. 9. Compared with ResNet, the result of MnistNet is indeed worse. Nevertheless, we can notice that our approach U-LinFT works much better than the baseline DTrain, and that its performance is closer to the lower bound. + +Unsupervised Learning for Pretraining. In this experiment, we use all the training data and their annotations to fine tune a model pretrained in an unsupervised fashion. Until now, tested architectures for $\mathcal{G}_{\phi}$ (ResNet based + +Table 1. Gaze estimation with all the training data and annotations using ResNet+HP architecture. ${}^{ \dagger }$ p<0.01 + +
Error Dataset +ModelEyediapColumbia GazeUTMultiview
U-Train6.793.425.52
DTrain7.09†3.63†5.72†
Yu et al. [58]8.5-5.7
Yu et al. [59] (cross subject)-3.54-
Zhang et al. [60]--5.9
Park et al. [38]-3.59-
Liu et al. [33] (cross subject)--5.95
Funes-Mora et al. [13]11.6--
Xiong et al. [57]--5.50±1.03
Wang et al. [52]--5.4
head pitchhead yawhead roll
unsupervised representationground truthground truth
+ +Figure 10. Unsupervised head pose representation. + +or MnistNet) were taking eye images as input and predicting gaze in HCS (final gaze obtained by transforming the estimate in HCS to WCS with the help of head pose). Such architectures are suitable for few-shot gaze estimation since the unsupervised gaze representation is also in HCS. However, when training with more data and annotations, a better strategy is to predict the gaze in WCS directly, by concatenating the convolution features with the head pose before the fully connected layers, as proposed in [62]. We denote this architecture as ResNet+HP. Due to this architecture difference in fully connected layers, we only use the convolutional layers of our pretrained ResNet to initialize ResNet+HP, and randomly initialized the fully connected layers which process the concatenated feature. Note that since in the Eyediap dataset eye samples are rectified to frontal head pose, we kept our ResNet architecture for Eyediap gaze prediction. Tab. 1 reports the results. As can be seen, using our unsupervised training leads to a performance gain of $0.2^{\circ} \sim 0.3^{\circ}$ compared to training from scratch. This is a small improvement, but given that results are based on 10 rounds of experiments, it is nevertheless stable and significant. Besides, we also compare our approach with SOTA results in Tab. 1. As can be seen, our approach is better or competitive. Please note that our Eyediap result can not be compared with SOTA directly since we used Eyediap session of HD video, condition B, floating target and static head pose while the listed SOTA used VGA video, condition A, floating target and static head pose. We can not find SOTA results with exactly the same session. + +Application on Head Pose Estimation. We extended our approach to another task, head pose estimation. We used cropped faces from BIWI [8] for experiment and selected training pairs randomly within a temporal window. As head pose can be described by three rotation angles, pitch, yaw and roll, we used a 3 dimensional vector to represent it (instead of 2 dim for gaze). The second change we made con + +cerns the warping field regularization, where in order to relate the pitch with the vertical motion, we enforced the horizontal field to be the identity when dropping out the representation of yaw and roll; and similarly, when dropping out the pitch and roll, we defined a loss on the vertical field. The unsupervised head pose representation that was learned is illustrated in Fig. 10. The distribution of the pitch and yaw representations w.r.t the ground truth still exhibit a high correlation, but not so much for the roll representation. There might be two main reasons. First, none of our regularization terms involves the roll alone; second, the distribution of rolls in the data is uneven and concentrated, with $80\%$ of them being within $-25^{\circ} \sim 5^{\circ}$ . Although some future works could be done to improve the unsupervised learning of head pose representation, we demonstrated the potential of our framework for other tasks. + +# 5. Conclusion and Discussion + +We have proposed an unsupervised gaze learning framework which, to the best of our knowledge, is the first work on this topic. The two main contributing elements are the use of gaze redirection as auxiliary task for unsupervised learning, and the exploitation of a warping field regularization scheme which not only provides a physical meaning to the learned gaze representation dimensions, but also prevents overfitting or gaze redirection distortions. We demonstrate promising results on few-shot gaze estimation, network pretraining, and cross-dataset experiments in which the gaze representation (and network) learned in an unsupervised fashion proved to be better than a network trained supervisedly with gaze data. In this view, we believe that our method could successfully leverage internet data to train an unsupervised network robust to a large variety of eye shapes, appearance, head poses, and illumination. + +Our work can be expanded along two interesting directions. First, our work can be used for few shot person-specific gaze estimation. We believe large performance improvement can be achieved since there is less bias or noise among person specific samples. It is especially beneficial for few shot gaze estimation (less bias in few data). Second, given the unsupervised performance on head pose estimation, our work can also be used for full face gaze estimation. The framework can be implemented by using two network branches, as done in [63]. + +Notwithstanding the above advantages, a limitation of our method is that it requires image pairs with the same or at least close head poses for training, setting some constraints on our approach. We leave the evaluation of this requirement as a future work. + +Acknowledgement. This work was funded by the European Unions Horizon 2020 research and innovation programme -grant agreement no. 688147 (MuMMER, mummer-project.eu). + +# References + +[1] Sean Andrist, Xiang Zhi Tan, Michael Gleicher, and Bilge Mutlu. Conversational gaze aversion for humanlike robots. In Proceedings of the 2014 ACM/IEEE International Conference on Human-robot Interaction, HRI '14, pages 25-32, New York, NY, USA, 2014. ACM. 1 +[2] S. Ba and J-M. Odobez. Multi-party focus of attention recognition in meetings from head pose and multimodal contextual cues. In IEEE Int. Conf. on Acoustics, Speech, and Signal Processing (ICASSP), Las-Vegas, march 2008. 1 +[3] Meixu Chen, Yize Jin, Todd Goodall, Xiangxu Yu, and Alan C. Bovik. Study of 3d virtual reality picture quality, 2019. 1 +[4] Zhaokang Chen and Bertram E. Shi. Appearance-based gaze estimation via gaze decomposition and single gaze point calibration, 2019. 1, 2 +[5] Yihua Cheng, Feng Lu, and Xuong Zhang. Appearance-based gaze estimation via evaluation-guided asymmetric regression. In The European Conference on Computer Vision (ECCV), September 2018. 1, 2 +[6] Eunji Chong, Nataniel Ruiz, Yongxin Wang, Yun Zhang, Agata Rozga, and James M. Rehg. Connecting gaze, scene, and attention: Generalized attention estimation via joint modeling of gaze and scene saliency. In The European Conference on Computer Vision (ECCV), September 2018. 2 +[7] Kevin Cortacero, Tobias Fischer, and Yiannis Demiris. Rtbene: A dataset and baselines for real-time blink estimation in natural environments. In Proceedings of the IEEE International Conference on Computer Vision Workshops, 2019. 1 +[8] Gabriele Fanelli, Matthias Dantone, Juergen Gall, Andrea Fossati, and Luc Van Gool. Random forests for real time 3d face analysis. Int. J. Comput. Vision, 101(3):437-458, February 2013. 8 +[9] Tobias Fischer, Hyung Jin Chang, and Yiannis Demiris. RTGENE: Real-Time Eye Gaze Estimation in Natural Environments. European Conference on Computer Vision (ECCV), 2018. 1 +[10] K. Funes and J.-M. Odobez. Gaze estimation from multimodal Kinect data. In CVPR Workshop on Face and Gesture and Kinect demonstration competition (Best Student Paper Award), Providence, june 2012. 3 +[11] Kenneth Alberto Funes Mora, Florent Monay, and Jean-Marc Odobez. Eyediap: A database for the development and evaluation of gaze estimation algorithms from rgb and rgb-d cameras. In Proceedings of the Symposium on Eye Tracking Research and Applications (ETRA), pages 255-258, 2014. 1, 5 +[12] Kenneth Alberto Funes Mora and Jean-Marc Odobez. Geometric Generative Gaze Estimation (G3E) for Remote RGB-D Cameras. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1773-1780, jun 2014. 2 +[13] Kenneth A. Funes-Mora and Jean-Marc Odobez. Gaze estimation in the 3d space using rgb-d sensors, towards headpose and user invariance. International Journal of Computer Vision (IJCV), 118(2):194-216, 2016. 2, 5, 8 + +[14] Yaroslav Ganin, Daniil Kononenko, Diana Sungatullina, and Victor Lempitsky. DeepWarp: Photorealistic image synthesis for gaze manipulation. European Conference on Computer Vision (ECCV), pages 311-326, 2016. 2 +[15] Stephan J. Garbin, Yiru Shen, Immo Schuetz, Robert Cavin, Gregory Hughes, and Sachin S. Talathi. Openeds: Open eye dataset. CoRR, abs/1905.03702, 2019. 6 +[16] Chao Gou, Yue Wu, Kang Wang, Fei-Yue Wang, and Qiang Ji. Learning-by-synthesis for accurate eye detection. ICPR, 2016. 2 +[17] Chao Gou, Yue Wu, Kang Wang, Kunfeng Wang, Fei Yue Wang, and Qiang Ji. A joint cascaded framework for simultaneous eye detection and eye state estimation. Pattern Recognition, 67:23-31, 2017. 2 +[18] Dan Witzner Hansen and Qiang Ji. In the eye of the beholder: A survey of models for eyes and gaze. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 32(3):478-500, 2010. 2 +[19] Junfeng He, Khoi Pham, Nachiappan Valliappan, Pingmei Xu, Chase Roberts, Dmitry Lagun, and Vidhya Navalpakkam. On-device few-shot personalization for real-time gaze estimation. In The IEEE International Conference on Computer Vision (ICCV) Workshops, Oct 2019. 6 +[20] Zhe He, Adrian Spurr, Xuong Zhang, and Otmar Hilliges. Photo-realistic monocular gaze redirection using generative adversarial networks. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 2 +[21] Michael Xuelin Huang, Jiajia Li, Grace Ngai, and Hong Va Leong. Stressclick: Sensing stress from gaze-click patterns. In Proceedings of the ACM on Multimedia Conference (ACMMM), pages 1395-1404, 2016. 1 +[22] Qiong Huang, Ashok Veeraraghavan, and Ashutosh Sabharwal. Tabletgaze: unconstrained appearance-based gaze estimation in mobile tablets. Machine Vision and Applications (MVAP), 2017. 2 +[23] Takahiro Ishikawa. Passive driver gaze tracking with active appearance models. 2004. 2 +[24] Max Jaderberg, Karen Simonyan, Andrew Zisserman, and koray kavukcuoglu. Spatial transformer networks. In Advances in Neural Information Processing Systems (NeurIPS), pages 2017-2025. 2015. 3, 4 +[25] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European Conference on Computer Vision, 2016. 4 +[26] A. Sophia Koepke, Olivia Wiles, and Andrew Zisserman. Self-supervised learning of a facial attribute embedding from video. In *British Machine Vision Conference* 2018, BMVC 2018, Northumbria University, Newcastle, UK, September 3-6, 2018, page 302, 2018. 3 +[27] Daniil Kononenko, Yaroslav Ganin, Diana Sungatullina, and Victor S. Lempitsky. Photorealistic Monocular Gaze Direction Using Machine Learning. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), pages 1-15, 2017. 2 +[28] Robert Konrad, Anastasios Angelopoulos, and Gordon Wetzstein. Gaze-contingent ocular parallax rendering for virtual reality, 2019. 1 + +[29] Kyle Krafka, Aditya Khosla, Petr Kellnhofer, and Harini Kannan. Eye Tracking for Everyone. IEEE Conference on Computer Vision and Pattern Recognition, pages 2176-2184, 2016. 2, 6, 7 +[30] Yong Li, Jiabei Zeng, Shiguang Shan, and Xilin Chen. Self-supervised representation learning from videos for facial action unit detection. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 3 +[31] Erik Lindén, Jonas Sjöstrand, and Alexandre Proutiere. Learning to personalize in appearance-based gaze tracking, 2018. 2 +[32] Gang Liu, Yu Yu, Kenneth Alberto Funes-Mora, and Jean-Marc Odobez. A Differential Approach for Gaze Estimation with Calibration. British Machine Vision Conference (BMVC), 2018. 2, 6 +[33] Gang Liu, Yu Yu, Kenneth Alberto Funes Mora, and Jean-Marc Odobez. A differential approach for gaze estimation. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 2020. 2, 8 +[34] Feng Lu, Yusuke Sugano, Takahiro Okabe, and Yoichi Sato. Inferring human gaze from appearance via adaptive linear regression. Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 153-160, 2011. 2 +[35] Francis Martinez, Andrea Carbone, and Edwige Pissaloux. Gaze estimation using local features and non-linear regression. pages 1961-1964, 2012. 2 +[36] Basilio Noris, Jean-Baptiste Keller, and Aude Billard. A wearable gaze tracking system for children in unconstrained environments. Computer Vision and Image Understanding, 115(4):476-486, 2011. 2 +[37] Seonwook Park, Shalini De Mello, Pavlo Molchanov, Umar Iqbal, Otmar Hilliges, and Jan Kautz. Few-shot adaptive gaze estimation, 2019. 1, 2, 3, 6 +[38] Seonwook Park, Adrian Spurr, and Otmar Hilliges. Deep Pictorial Gaze Estimation. In European Conference on Computer Vision (ECCV), pages 741-757. 2018. 8 +[39] Adria Recasens, Aditya Khosla, Carl Vondrick, and Antonio Torralba. Where are they looking? Advances in Neural Information Processing Systems, pages 199-207, 2015. 2 +[40] A. Recasens, C. Vondrick, A. Khosla, and A. Torralba. Following gaze in video, Oct 2017. 2 +[41] S. Sheikhi and J.M. Odobez. Combining dynamic head pose and gaze mapping with the robot conversational state for attention recognition in human-robot interactions. Pattern Recognition Letters, 66:81–90, Nov. 2015. 1 +[42] Ashish Shrivastava, Tomas Pfister, Oncel Tuzel, Josh Susskind, Wenda Wang, and Russ Webb. Learning from simulated and unsupervised images through adversarial training. CoRR, abs/1612.07828, 2016. 3 +[43] Rémy Siegfried, Yu Yu, and Jean-Marc Odobez. Towards the use of social interaction conventions as prior for gaze model adaptation. In Proceedings of the 19th ACM International Conference on Multimodal Interaction, ICMI '17, pages 154-162, New York, NY, USA, 2017. ACM. 1 +[44] Brian A Smith, Qi Yin, Steven K Feiner, and Shree K Nayar. Gaze locking: passive eye contact detection for human-object interaction. In Proceedings of the 26th annual + +ACM symposium on User interface software and technology (UIST), pages 271-280, 2013. 1, 5 +[45] Yusuke Sugano, Yasuyuki Matsushita, and Yoichi Sato. Learning-by-synthesis for appearance-based 3d gaze estimation. In Computer Vision and Pattern Recognition (CVPR), 2014 IEEE Conference on, pages 1821-1828. IEEE, 2014. 1, 2, 5 +[46] Kar-Han Tan, David J Kriegman, and Narendra Ahuja. Appearance-based eye gaze estimation. pages 191-195, 2002. 2 +[47] Fabian Timm and Erhardt Barth. Accurate eye centre localisation by means of gradients. In Proceedings of the Int. Conference on Computer Theory and Applications (VISAPP), volume 1, pages 125-130, Algarve, Portugal, 2011. INSTICC. 2 +[48] Ronda Venkateswarlu et al. Eye gaze estimation from a single image of one eye. pages 136-143, 2003. 2 +[49] Mélodie Vidal, Jayson Turner, Andreas Bulling, and Hans Gellersen. Wearable eye tracking for mental health monitoring. Computer Communications, 35(11):1306-1311, 2012. 1 +[50] Arantxa Villanueva, Victoria Ponz, Laura Sesma-Sanchez, Mikel Ariz, Sonia Porta, and Rafael Cabeza. Hybrid method based on topography for robust detection of iris center and eye corners. ACM Trans. Multimedia Comput. Commun. Appl., 9(4), 2013. 2 +[51] Kang Wang. A Hierarchical Generative Model for Eye Image Synthesis and Eye Gaze Estimation. 2018. 3 +[52] Kang Wang, Rui Zhao, Hui Su, and Qiang Ji. Generalizing eye tracking with bayesian adversarial learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 8 +[53] E Wood, T Baltruaiitis, X Zhang, Y Sugano, P Robinson, and A Bulling. Rendering of Eyes for Eye-Shape Registration and Gaze Estimation. IEEE International Conference on Computer Vision (ICCV), pages 3756–3764, 2015. 1, 3 +[54] Erroll Wood, Tadas Baltrusaitis, Louis Philippe Morency, Peter Robinson, and Andreas Bulling. A 3D morphable eye region model for gaze estimation. European Conference on Computer Vision (ECCV), pages 297-313, 2016. 2 +[55] Erroll Wood, Tadas Baltrusaitis, Louis-Philippe Morency, Peter Robinson, and Andreas Bulling. Learning an appearance-based gaze estimator from one million synthesised images. In Proceedings of the Ninth Biennial ACM Symposium on Eye Tracking Research & Applications (ETRA), pages 131-138, 2016. 1, 3 +[56] Erroll Wood and A Bulling. Eyetab: Model-based gaze estimation on unmodified tablet computers. ACM Symposium on Eye Tracking Research & Applications (ETRA), pages 3-6, 2014. 2 +[57] Yunyang Xiong, Hyunwoo J. Kim, and Vikas Singh. Mixed effects neural networks (menets) with applications to gaze estimation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2, 8 +[58] Yu Yu, Gang Liu, and Jean-Marc Odobez. Deep multitask gaze estimation with a constrained landmark-gaze model. European Conference on Computer Vision Workshop (ECCVW), 2018. 3, 4, 8 + +[59] Yu Yu, Gang Liu, and Jean-Marc Odobez. Improving few-shot user-specific gaze adaptation via gaze redirection synthesis. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2019. 1, 2, 3, 6, 8 +[60] Xucong Zhang, Yusuke Sugano, Mario Fritz, and Andreas Bulling. Appearance-based gaze estimation in the wild. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4511-4520, jun 2015. 1, 2, 3, 6, 8 +[61] Xucong Zhang, Yusuke Sugano, Mario Fritz, and Andreas Bulling. It's Written All Over Your Face: Full-Face Appearance-Based Gaze Estimation. IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 2016. 1, 2 +[62] Xucong Zhang, Yusuke Sugano, Mario Fritz, and Andreas Bulling. MPIIGaze: Real-World Dataset and Deep Appearance-Based Gaze Estimation. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), pages 1–14, 2017. 2, 6, 8 +[63] Wangjiang Zhu and Haoping Deng. Monocular free-head 3d gaze tracking with deep learning and geometry constraints. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. 1, 2, 8 \ No newline at end of file diff --git a/unsupervisedrepresentationlearningforgazeestimation/images.zip b/unsupervisedrepresentationlearningforgazeestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ffd2b63f6f7c3d1466e2b4658aa4a5943dcfafd4 --- /dev/null +++ b/unsupervisedrepresentationlearningforgazeestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b80f5230618d9cc25ded20c8bc663f4dbfa9a279dd2880f4563e536d201d7fa6 +size 397424 diff --git a/unsupervisedrepresentationlearningforgazeestimation/layout.json b/unsupervisedrepresentationlearningforgazeestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..01b71dc951099bca6236e5d80f4d2a9eaab33514 --- /dev/null +++ b/unsupervisedrepresentationlearningforgazeestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bc0fd1173d05503dc6dedd28a0bdf5e400faaa9cf35d23ceb3f1bc791a75cdb +size 512765 diff --git a/upgradingopticalflowto3dsceneflowthroughopticalexpansion/a2e66829-5825-4a3f-8171-c051a0a5ea0b_content_list.json b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/a2e66829-5825-4a3f-8171-c051a0a5ea0b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fc739ccb53d686f5a9e1a46e2235a9b816291711 --- /dev/null +++ b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/a2e66829-5825-4a3f-8171-c051a0a5ea0b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a688d5e82f4783e5730d5e518c380724e2dd2a379666ab0577da2c126fdf9de +size 82860 diff --git a/upgradingopticalflowto3dsceneflowthroughopticalexpansion/a2e66829-5825-4a3f-8171-c051a0a5ea0b_model.json b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/a2e66829-5825-4a3f-8171-c051a0a5ea0b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..07ba5cfe44faaceb5c4ecb2c8e45d700a7b15009 --- /dev/null +++ b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/a2e66829-5825-4a3f-8171-c051a0a5ea0b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c458f2b60907fa8a5c131ee0604d492306ac8b045fbe5b06091947c9cbf38f09 +size 104339 diff --git a/upgradingopticalflowto3dsceneflowthroughopticalexpansion/a2e66829-5825-4a3f-8171-c051a0a5ea0b_origin.pdf b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/a2e66829-5825-4a3f-8171-c051a0a5ea0b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f37ea8f2c46ac7bc6b13dd171368aa75f3f32927 --- /dev/null +++ b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/a2e66829-5825-4a3f-8171-c051a0a5ea0b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d861709f5f45840cb59e59c011733234b4d0e19db77510db6e85263eb063de80 +size 1942282 diff --git a/upgradingopticalflowto3dsceneflowthroughopticalexpansion/full.md b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1762bcc188568cbec685586b43bc585121060a40 --- /dev/null +++ b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/full.md @@ -0,0 +1,369 @@ +# Upgrading Optical Flow to 3D Scene Flow through Optical Expansion + +Gengshan Yang $^{1}$ , Deva Ramanan $^{1,2}$ $^{1}$ Carnegie Mellon University, $^{2}$ Argo AI + +{gengshay, deva}@cs.cmu.edu + +# Abstract + +We describe an approach for upgrading 2D optical flow to 3D scene flow. Our key insight is that dense optical expansion – which can be reliably inferred from monocular frame pairs – reveals changes in depth of scene elements, e.g., things moving closer will get bigger. When integrated with camera intrinsics, optical expansion can be converted into a normalized 3D scene flow vectors that provide meaningful directions of 3D movement, but not their magnitude (due to an underlying scale ambiguity). Normalized scene flow can be further “upgraded” to the true 3D scene flow knowing depth in one frame. We show that dense optical expansion between two views can be learned from annotated optical flow maps or unlabeled video sequences, and applied to a variety of dynamic 3D perception tasks including optical scene flow, LiDAR scene flow, time-to-collision estimation and depth estimation, often demonstrating significant improvement over the prior art. + +# 1. Introduction + +Estimating 3D motion is crucial for autonomous robots to move safely in a dynamic world. For example, collision avoidance and motion planning in a dynamic requirement hinge on such inferences [8, 33, 34, 40]. Many robotic platforms make use of stereo cameras or time-of-flight sensors for which metric distances are accessible. Here, 3D motion can be determined by searching for correspondence over frames, or registration between 3D point clouds. Such active sensing and fixed-baseline stereo methods struggle to capture far-away objects due to limited baselines and sparse sensor readings. In this work, we analyze the problem of dynamic 3D perception with monocular cameras, which do not suffer from baselines or sparse readings. + +Challenges However, estimating 3D motion from monocular cameras is fundamentally ill-posed without making assumptions about the scene rigidity: given a particular 2D flow vector, there is an infinite pair of 3D points + +![](images/f0a03645c9a99117c142da22e3cbfa801cb353a5c24da9472331d9d5b535df38.jpg) +Figure 1. Optical flow vs optical expansion. From left to right: overlaid two consecutive frames, color-coded optical flow fields and optical expansion map, where white indicates larger expansion or motion towards the camera. Notice it is difficult to directly read the 3D motion of the hawk from optical flow. However, it is easy to tell the hawk is approaching the caemra from optical expansion. + +along two degrees of freedom (obtained by back-projecting two rays for the source and target pixel - see Fig. 3) that project to the same 2D flow. Intuitively, a close-by object that moves slowly will generate the same 2D flow as a far-away object that moves fast. + +Prior work Nevertheless, there have been numerous attempts at monocular dynamic scene reconstruction using multi-body SfM and non-rigid SfM [26, 64]. A recent approach [6] attempts to solve the monocular scene flow problem in its generality. Because such tasks are under-constrained, these methods need to rely on strong prior assumptions, either in the form of prior 3D geometry (typically learned from data-driven scenes) or prior 3D motion (typically rigid-body priors) that are difficult to apply to "in-the-wild" footage. Instead, we derive a simple but direct geometric relationship between 3D motion and 2D correspondence that allows us to extract up-to-scale 3D motion. + +Why optical expansion? Human perception informs us that changes in the perceived size of an object are an important cue to determine its motion in depth [50, 52]. Indeed, optical expansion is also a well-known cue for biological navigation, time-to-contact prediction, and looming estimation [15]. Inspired by these observations, we propose to augment 2D optical flow measurements with 2D optical expansion measurements: for each pixel in a reference frame, we estimate both a 2D offset and a relative scale change $(u,v,s)$ , as shown in Fig.2. We show that such measurements can be robustly extracted from an image pair, and importantly, resolve half of the fundamental ambiguity in 3D motion estimation. Because optical expansion is a local + +![](images/b930db9af1dcc2efd0cb43cb06e905fe56639c638a42faaaad968faa79ec1579.jpg) +(a) + +![](images/49c2218aa694258e19e02eb4c76ebfa3b8786667666df7af2da77992fd943edb.jpg) +(b) +Figure 2. Optical expansion vs optical flow. (a): reference image, where we are interested in the position and scale change of the pixel marked as blue; (b): optical flow providing the position change $(u, v)$ ; (c): optical expansion providing the scale change $s$ . Intuitively, optical expansion can be measured as the square root of the ratio between the two areas covered by the rectangles. + +![](images/69e94773109b8ba2b0f58e8c784650040f6a51fefcaccf2587ea902431e6f938.jpg) +(c) + +pixelwise measurement, we demonstrate that it can be easily incorporated into existing approaches for self-learning of optical flow, increasing the accuracy. + +3D motion from expansion Specifically, under a scaled orthographic camera projection model, optical expansion is directly equivalent to the motion-in-depth of the nonrotating scene element that projects to the corresponding source and target pixel. This eliminates one degree-of-freedom. When combined with camera intrinsics and optical flow, optical expansion reveals the true direction of the 3D motion, but not its magnitude. Fig. 3 demonstrates that we now know if an object is moving closer toward or away from the camera, but there is still an overall scale ambiguity, which can also be resolved by specifying the depth of one of the point pairs along its back-projected ray. + +Method To estimate per-pixel optical expansion, we propose an architecture based on local affine transformations. The relative scale ground-truth is obtained from the existing optical flow and 3D scene flow training datasets. We also present a self-supervised approach to learn optical expansion from photometric information of the input images. + +Contributions We summarize our contribution as follows. (1) We theoretically derive the effectiveness of optical expansion to reduce the ambiguities inherent to monocular scene flow. (2) We propose a neural architecture for normalized scene flow estimation that encodes strong geometry knowledge and leads to better interpretability and generalization. (3) We demonstrate the effectiveness of optical expansion across a variety of benchmark tasks, establishing new SOTA results for optical scene flow, LiDAR scene flow, time-to-collision estimation - while being significantly faster than prior methods, and improving results for self-supervised optical flow. (4) We apply dense optical expansion to two-frame depth estimation and show improvements over triangulation-based methods in numerically-unstable regions near the epipole. + +# 2. Related Work + +Visual correspondence Visual correspondence dates back to the early work in human visual perception and 3D reconstruction, where it was found point correspondence + +![](images/3960c37794cc4608a6c71352ef9c08d376d7f303040def7eff32aac5df18259e.jpg) +Figure 3. (a): Projection from scene flow $\mathbf{t}$ to optical flow $\mathbf{u}$ . (b): Projection from scene flow $\mathbf{t}$ to normalized scene flow $\hat{\mathbf{t}} = \mathbf{t} / Z$ . Normalized scene flow is a 3-dimensional vector that extends standard optical flow to capture changes in depth. Notice when projecting a 4DoF scene flow vector to the image plane (given the reference 2D point), 2DoF can be recovered by optical flow and 2DoF are missing: 1) the depth $Z$ , which is not recoverable; 2) and the motion-in-depth, which can be recovered from optical expansion. + +![](images/e6203507d38ee2ebd488ed4ab02e2843fac7a305471d5d32602e007b62d14f24.jpg) + +needs to be solved to perceive depth and 3D structures can be recovered from their projected points [35, 54]. Affine correspondence defines a $2 \times 2$ affine transform between the neighborhood of point correspondences, to encodes higher-order information about the scene geometry [2, 3, 46]. Similar to affine correspondence, we extract local information of point correspondences to encode rich geometric information about motion-in-depth, but not rotation or shear. + +Scale estimation The concept of scale changes of visual features is well studied in the context of feature descriptor and matching [4, 31, 42] as well as dense optical flow [44, 57, 59]. In these approaches, scale is often treated as a discrete auxiliary variable for producing better descriptors and feature matches, but not estimated as a continuous quantity at a fine scale. Some other approaches either directly estimate the intrinsic scales by Laplacian filtering [41] or compute the scale changes from the divergence of optic flow fields [9, 58], but give sub-accurate results. Instead, our method produces continuous dense optical expansion reliably in a data-driven fashion. Moreover, the relationship between relative scale and depth changes has been explored for 3D reconstruction [12, 43, 49, 62] as well as collision avoidance in robotics [20, 33, 40]. However, prior methods often focus on object-level scale changes and sparse interest points. Our work extends the concept of relative scale and depth changes to the dense, low-level correspondence tasks of 3D scene flow estimation. + +Monocular dynamic reconstruction Prior work on monocular 3D motion estimation casts the task as a subproblem of monocular scene reconstruction, attempting to jointly recover both motion and depth [26, 45, 48, 55]. Because of the ill-posed nature of this problem, they either rely on strong motion priors such as multi-rigid body [45, 55] and as rigid as possible [26], or strong shape priors such as low rank and union-of-subspaces [17, 64]. Those handcrafted priors hallucinate good reconstructions when their + +![](images/164e4873bc2de24d33c16071ed3d6286267bf21204946a3b2a22b29138fd45be.jpg) +Figure 4. We visualize a moving object under scaled orthographic projection across two timesteps (a) and (b). Given a definition of optical expansion $s = l' / l$ and motion-in-depth $\tau = Z' / Z$ , Eq. 1 derives that $s = 1 / \tau$ . + +assumptions are met, but in other cases not applicable. On the other hand, when scene elements are piece-wise rigid, we can reconstruct up-to-scale local motions with planar homographies. However, homography estimation is sensitive to noise in 2D correspondences, requiring the use of strong priors to regularize the problem [26]. In this work, we propose a simpler representation of local motion, e.g. optical expansion, which can be reliably estimated from real-world imagery because fewer degrees of freedom are needed to be inferred. + +# 3. Approach + +In this section, we first establish the relationship between optical expansion and motion-in-depth under scaled orthographic projection model. Then we derive a direct relationship between motion-in-depth, normalized 3D motion, and scene flow. Finally we propose a neural architecture of learning optical expansion and normalized 3D flow. + +# 3.1. Optical expansion + +Here we explicitly derive the relationship between optical expansion, which describes the change of the perceived size of objects, and motion-in-depth. We begin with a simple pinhole camera model that projects a 3D point $P = (X,Y,Z)$ into an image position $(x,y)$ : + +$$ +\mathbf {p} = (x, y) = \frac {f}{Z} (X, Y), +$$ + +where $f$ is the focal length. Under a scaled orthographic camera model, the projection of all points on an object can be computed with an orthographic projection onto a frontoparallel plane followed by a perspective projection of the plane [19]. Such an approximation is reasonable if the variation in depth of an object is small compared to its distance from the camera. With the physical length of an object being $L$ and its orientation $\sigma$ defined as the angle between the surface normal and the camera $z$ -axis, the projected length of the object is then given by + +$$ +l = \frac {f \bar {L}}{Z} = \frac {f L \cos \sigma}{Z}, +$$ + +where $\bar{L} = L\cos \sigma$ accounts for the foreshortening. Assume the scene is locally rigid and one of the rigid pieces changes its depth across two frames from $Z$ to $Z^{\prime}$ , while keeping its physical size $L$ and orientation $\sigma$ unchanged. Define the optical expansion $s$ to be the ratio of its projected lengths $l^{\prime} / l$ , and define the motion-in-depth $\tau$ to be the ratio of depths $Z^{\prime} / Z$ . We can now derive that $s = 1 / \tau$ assuming 1) a scaled orthographic camera model and 2) the scene elements are not rotating relative to the camera (Fig. 4): + +$$ +l = \frac {f \bar {L}}{Z}, l ^ {\prime} = \frac {f \bar {L}}{Z ^ {\prime}} \quad \Rightarrow \quad s = \frac {l ^ {\prime}}{l} = \frac {Z}{Z ^ {\prime}} = \frac {1}{\tau} \tag {1} +$$ + +# 3.2. Normalized scene flow + +In the last section, we showed that motion-in-depth $\tau$ can be computed from optical expansion $s$ for a scaled orthographic camera model. In this section, we show that motion-in-depth $\tau$ can be combined with camera intrinsics $K$ to compute a normalized 3D scene flow vector. + +Given camera intrinsics $\mathbf{K}$ , for a 3D point changing its position from $\mathbf{P}$ to $\mathbf{P}'$ , we have + +$$ +\mathbf {P} = \lambda \mathbf {K} ^ {- 1} \tilde {\mathbf {p}}, \quad \mathbf {P} ^ {\prime} = \lambda^ {\prime} \mathbf {K} ^ {- 1} \tilde {\mathbf {p}} ^ {\prime}, +$$ + +where $\tilde{\mathbf{p}}$ and $\tilde{\mathbf{p}}^{\prime}$ are homogeneous 2D coordinates with the last coordinate being 1, and $\lambda, \lambda^{\prime}$ are scale factors. Because the last row of the intrinsic matrix $\mathbf{K}$ is $(0,0,1)$ , scale factors are directly equal to the depth of each point: $\lambda = Z$ and $\lambda^{\prime} = Z^{\prime}$ . + +Following prior work [38], we model scene flow as 3D motion vectors relative to the camera, which factorizes out the camera motion. The scene flow $\mathbf{t}$ is then computed as: + +$$ +\begin{array}{l} \mathbf {t} = \mathbf {P} ^ {\prime} - \mathbf {P} \\ = \mathbf {K} ^ {- 1} \left(Z ^ {\prime} \tilde {\mathbf {p}} ^ {\prime} - Z \tilde {\mathbf {p}}\right) \\ = Z K ^ {- 1} \left[ \tau (\tilde {\mathbf {u}} + \tilde {\mathbf {p}}) - \tilde {\mathbf {p}} \right] \quad \text {w h e r e} \quad \tilde {\mathbf {u}} = \tilde {\mathbf {p}} ^ {\prime} - \tilde {\mathbf {p}} \\ = Z \mathbf {K} ^ {- 1} \left[ (\tau - 1) \tilde {\mathbf {p}} + \tau \tilde {\mathbf {u}} \right] \\ = Z \hat {\mathbf {t}} \quad \text {w h e r e} \quad \hat {\mathbf {t}} = \mathbf {K} ^ {- 1} \left[ (\tau - 1) \tilde {\mathbf {p}} + \tau \tilde {\mathbf {u}} \right] \tag {2} \\ \end{array} +$$ + +We denote $\hat{\mathbf{t}}$ as the "normalized scene flow", which is a vector pointing in the direction of the true 3D scene flow. It can be "upgraded" from 2D flow $\tilde{\mathbf{u}}$ knowing motion-in-depth $\tau$ and camera intrinsics $\mathbf{K}$ . When augmented with the true depth of the point in either frame $Z$ or $Z^{\prime}$ (following an analogous derivation to the above), normalized scene flow can be further "upgraded" to the true 3D scene flow. + +# 3.3. Learning normalized scene flow + +In this section we introduce a network architecture for optical expansion and normalized scene flow estimation, and describe ways of learning optical expansion, either in a supervised fashion, or with self-supervised learning. + +![](images/ce5b16927ba9b1d1026f98ac120a6fcb5dc2f67192262336badb844ed022c964.jpg) +Figure 5. Network architecture for estimating normalized scene flow. 1) Given two consecutive images, we first predict dense optical flow fields using an existing flow network. 2) Then we estimate the initial optical expansion with a local affine transform layer, which is refined by a U-Net architecture taking affine fitting error and image appearance features as guidance [24]. 3) To correct for errors from the scaled-orthographic projection and rotation assumptions, we predict the difference between optical expansion and motion-in-depth with another U-Net. Finally, a dense normalized scene flow field is computed using Eq. 2 by combining $(u,\nu,\tau)$ with camera intrinsics $\mathbf{K}$ . + +Network We separate the task of estimating normalized scene flow into three sequential steps: (1) optical flow estimation, where the $(u,\nu)$ component is predicted from an image pair, (2) optical expansion estimation, where the optical expansion component $s$ is estimated conditioned on the optical flow, and (3) motion-in-depth estimation $\tau$ , where the optical expansion is refined to produce correct outputs for a full perspective camera model. Finally, normalized scene flow can be computed given camera intrinsics. We design an end-to-end-trainable architecture for the above steps, as shown in Fig. 5. An ablation study in Sec. 5 discusses different design choices that affect the performance. + +Local affine layer To extract dense optical expansion over two frames, we propose a local affine layer that directly computes the expansion of local $3 \times 3$ patches over two frames, as described in the three following steps: + +1) Fit local affine motion models. Given a dense optical flow field $\mathbf{u}$ over a reference frame and a target frame, we fit a local affine transformation $\mathbf{A} \in \mathbb{R}^{2 \times 2}$ [2] for each pixel $\mathbf{x}_c = (x_c, y_c)$ over its $3 \times 3$ neighborhood $\mathcal{N}(\mathbf{x}_c)$ in the reference image by solving the following linear system: + +$$ +\left(\mathbf {x} ^ {\prime} - \mathbf {x} _ {c} ^ {\prime}\right) = \mathbf {A} \left(\mathbf {x} - \mathbf {x} _ {c}\right), \quad \mathbf {x} \in \mathcal {N} \left(\mathbf {x} _ {c}\right), \tag {3} +$$ + +where $\mathbf{x}' = \mathbf{x} + \mathbf{u}(\mathbf{x})$ is the correspondence of $\mathbf{x}$ . + +2) Extract expansion. We compute optical expansion of a pixel as the ratio of the areas between the deformed vs original $3 \times 3$ grid: $s = \sqrt{|det(\mathbf{A})|}$ . +3) Compute fitting errors. We compute the residual $L_{2}$ error of the least-squares fit from Eq. 3 (indicating the confidence of the affine fit) and pass this in as an additional channel to the optical refinement network. + +Crucially, we implement the above steps as dense, pixelwise, and differential computations as Pytorch layers that efficiently run on a GPU with negligible compute overhead. + +Learning expansion (supervised) To train the optical expansion network that predicts $s$ , one challenge is to con + +struct the optical expansion ground-truth. The common solution of searching over a multi-scale image pyramid is infeasible because it gives sparse and inaccurate results. Instead, we extract expansion from the local patches of optic flow fields [9, 58]. Specifically, for each pixel with optical flow ground-truth, we fit an affine transform over its $7 \times 7$ neighborhood and extract the scale component, similar to the local affine layer. Pixels with a high fitting error are discarded. In practice, we found optical expansion ground-truth can be reliably computed for training, given the high-quality optical flow datasets available [1, 7, 11, 25, 38, 36]. + +Learning expansion (self-supervised) Since real world ground-truth data of optical flow are costly to obtain, here we describe a self-supervised alternative of learning the expansion network. Previous work on self-supervised optical flow [27, 37, 47] obtain supervision from photometric consistency, where losses are computed by comparing the difference between the intensity values of either the reference and target pixel, or a $K \times K$ patch around the reference pixel and their correspondences. In both cases, the motion of pixels is not explicitly constrained. Our key distinction is to use the predicted optical expansion to expand or contract the reference patches when constructing the loss. The benefits are two-fold: for one, it extracts the supervision signal to train the optical expansion model; for another it puts explicit constraints to the local motion patterns of optical flow, and thus guides the learning. + +Learning motion-in-depth To train the motion-in-depth network that predicts $\tau$ , we use existing 3D scene flow datasets, from which the ground-truth motion-in-depth can be computed as the ratio between the depth of corresponding points over two frames, + +$$ +\boldsymbol {\tau} ^ {*} (\mathbf {x}) = \frac {Z ^ {*} (\mathbf {x} + \mathbf {u} ^ {*} (\mathbf {x}))}{Z ^ {*} (\mathbf {x})}, +$$ + +where $Z^{*}$ and $Z^{\prime *}$ are the ground-truth depth in the reference + +![](images/b4bf128d0e69ba4e167c6241ae6e392db778e1033962761c9d6922977a607f43.jpg) +Figure 6. Results for image "000105" in the KITTI val set. Top: Motion-in-depth between two frames where bright indicates points moving towards the camera; bottom: error maps of motion-in-depth. Our method predicts more accurate motion-in-depth than the baselines. + +![](images/461b08a41205094e90f9c3bf63a09662d900a27126583402e8f73ec22dc5d2fc.jpg) + +![](images/496134ded19c26a621e124317231299eaac485807839f24e623c474cba30e727.jpg) + +![](images/2eb60f0011cc6cd58a76d92592dbf3130ff12e4d50a94cb92d8b824acc561e7c.jpg) + +![](images/1a24862b066b97db8a2c68ef2341e631ac4b601f7144c93381440bdc3a343968.jpg) + +and target frame respectively, and $\mathbf{u}^*$ is the ground-truth optical flow. + +Losses We empirically find that supervised learning of optical expansion yields better performance than self-supervised learning (245 vs 336 in $\log -L_{1}$ error, as in Tab. 5 and Tab. 6), and therefore supervised learning is used throughout experiments in Sec. 4.1-4.3. Here, multi-task $L_{1}$ losses are used to train the optical expansion $(s)$ and motion-in-depth $(\tau)$ networks jointly: + +$$ +L = \sum_ {\mathbf {x}} | \sigma_ {s} (\mathbf {x}) - \log s ^ {*} (\mathbf {x}) | + | \sigma_ {\tau} (\mathbf {x}) - \log \tau^ {*} (\mathbf {x}) |, +$$ + +where $\sigma_{s}$ and $\sigma_{\tau}$ are the predicted log-scale expansion and motion-in-depth, and $s^{*}$ and $\tau^{*}$ are ground-truth labels. The loss is summed over pixels with valid labels. We experimented with stagewise training, but found joint end-to-end training simpler while performant. + +# 4. Experiments + +We first evaluate our method on 3D scene perception tasks including optical scene flow, LiDAR scene flow and time-to-collision estimation. We then show results of self-supervised training of optical expansion models. Finally, we conclude with qualitative results that apply optical expansion for rigid depth estimation during forward or backward translational camera movements that are difficult for traditional structure-from-motion. + +Setup We freeze the pre-trained optical flow network [61] and train our normalized scene flow model on Driving, Monkaa, and KITTI-15 [36, 38]. For KITTI, we split the original 200 images with ground-truth into train and validation sets. Specifically, for optical scene flow, we select every 5 images for validation, and add the rest 160 images for training; while for LiDAR scene flow, we follow the split of MeteorNet [29] and use the first 100 out of 142 images with LiDAR point clouds for training, and the rest for validation. We follow a two-stage training protocol [21], and empirically choose a larger learning rate of 0.01. Pretraining on Driving and Monkaa takes 60k iterations, and fine-tuning on KITTI takes 30k iterations. + +# 4.1. Optical scene flow + +We first compare to baselines on KITTI-15 validation set, where the standard metrics of scene flow and error of log motion-in-depth (MiD) are used [38]. + +Table 1. Scene flow estimation on KITTI-15 validation set. D1, D2, Fl, and SF measure the percentage error of disparity, optical flow and overall scene flow prediction respectively. MiD measures the L1 error of log motion-in-depth $\log (D_2 / D_1)$ scaled by 10,000X. Monocular methods are listed at the top, while stereobased methods are listed below. Methods with $\dagger$ use validation data to train. Our method outperforms the monocular baselines by a large margin, and beats the stereo baselines in terms of MiD. + +
MethodD1F1D2SFMiD
Delta [22]14.516.0078.8783.262237
Warp+copy [51]14.516.0027.7331.16623
Ours14.516.0016.7119.6575
FlowNet3 [22]6.9532.4120.8937.09537
†FlowNet3-ft [22]1.517.364.709.60217
PRSM [56]4.058.327.5210.36124
OSF [39]3.988.957.6910.16115
+ +Our solution Since our expansion network only provides motion-in-depth over two frames, to generate the full scene flow vector, we use an off-the-shelf monocular depth estimation network MonoDepth2 [16] to predict $d_{1}$ , which is the disparity of frame one. To predict $d_{2}$ , the disparity of frame one pixels that have moved to frame two, we simply divide $d_{1}$ by the predicted motion-in-depth. + +Validation performance To compute $d_{2}$ , Schuster et al. [51] warp the second-frame disparity maps to the first frame using forward flow, without dealing with occlusions; we consider a stronger baseline that further copies the disparity of out-of-frame pixels from the first frame, denoted by "Warp+copy". Following FlowNet3 [22], we also train a refinement network to hallucinate the disparities of the regions occluded in the second frame. As for monocular scene flow, shown in the first group of Tab. 1, our method outperforms baselines by a large margin. + +We further consider baselines using stereo cameras to estimate the metric depth at both frames: PRSM [56] and OSF [39] are stereo-based methods that break down the image into rigid pieces and jointly optimize their depth and 3D motion. To evaluate MiD, we simply divide their predicted $d_{2}$ by $d_{1}$ . As a result, our method achieves the lowest error in terms of MiD, reducing the error by $10\mathrm{X}$ for monocular baselines, and outperforming the stereo baseline by a large margin (115 v.s. 75). A visual example is shown in Fig. 6. This demonstrates the effectiveness of modeling + +Table 2. Scene flow estimation on KITTI-15 benchmark foreground pixels. All metrics are errors in perceptage shown for the foreground pixels. The best among the same group are bolded, and the best among all are underlined. Monocular methods are listed at the top, while stereo-based methods are listed below. + +
MethodD1D2F1SFtime (s)
Mono-SF [6]26.9432.7019.6439.5741
Ours-mono27.9031.598.6636.670.2
PRSM [56]10.5215.1113.4020.79300
DRISF [32]4.499.7310.4015.940.75
Ours-stereo3.468.548.6613.442
+ +* The expansion and motion-in-depth networks take 15ms for KITTI-sized images on a Titan Xp GPU, giving a total run time of 200ms together with flow. Also notice that both PRSM and Mono-SF run on a single-core CPU, and could possibly be parallelized for a better speed. + +relative scale change via optical expansion. + +Test performance (fg objects) We then evaluate our method on scene flow prediction for foreground objects on KITTI-15 benchmark, as shown in Tab. 2. We first compare against Mono-SF, the only monocular scene flow method on the benchmark. It formulates monocular scene flow estimation as an optimization problem, and use probabilistic predictions of a monocular depth network as one energy term. Notice although our disparity error D1 is similar to Mono-SF, we obtain better D2 and SF metrics, which indicates that our prediction of normalized scene flow is more accurate. + +Our method of estimating motion-in-depth and $d_{2}$ is also applicable to stereo scene flow, where we directly take GANet [63], the SOTA method on D1 metric, to predict the disparity of the first frame $d_{1}$ . To obtain $d_{2}$ , we divide the $d_{1}$ with estimated motion-in-depth as before. As a result, we obtained the SOTA accuracy on foreground depth change D2 and scene flow SF, which further demonstrates the effectiveness of our method for upgrading optical flow to 3D scene flow. In comparison, we effectively reason about relative depth change at a low cost (15ms), instead of explicitly computing the disparity at frame two. This gives us improved accuracy, spatial consistency and reduced latency. + +# 4.2. LiDAR scene flow + +Given two consecutive LiDAR scans of the scene, the LiDAR scene flow task is defined as estimating the 3D motions of the point clouds. Prior work either register two point clouds by optimization [10], or train a network to directly predict the 3D motion [18, 28, 29]. + +Our solution Practically, LiDAR scans are usually paired with monocular cameras. Therefore, we use such monocular images to predict optical flow and expansion and convert them to normalized scene flow by Eq. 2. To obtain 3D scene flow for the point clouds, we project them onto the image plane and use LiDAR depth to "upgrade" the normal- + +Table 3. Evaluation LiDAR scene flow on KITTI-15. + +
MethodinputEPE (m)
ICP-globalpoints × 20.727
HPLFlowNet [18]points × 20.590
FlowNet3D-ft [28]points × 20.287
MeteorNet-ft [29]points × 20.251
FlowNet3 [22]points + stereo × 20.878
†FlowNet3-ft [22]points + stereo × 20.551
OSF [39]points + stereo × 20.137
PRSM [56]points + stereo × 20.116
Ourspoints + mono × 20.119
w/o ftpoints + mono × 20.184
+ +ized scene flow to full 3D scene flow. + +Evaluation protocol We compare with prior work on 42 KITTI validation images, using the evaluation protocol from MeteorNet [29]: raw LiDAR points are projected onto the image plane and the ground-truth 3D flow is constructed from disparity and flow annotations. Methods are scored by 3D end-point-error (EPE, L2 distance between vectors). + +Baselines Among all the point-based methods, FlowNet3D and MeteorNet are finetuned on the same set of KITTI images as ours, and the numbers are taken from their paper. HPLFlowNet is trained on FlythingThings [36] and we modify their code to run on raw point clouds. ICP-global finds a single rigid transformation that best describes the motion of all the scene points, and does not deal with non-rigid elements. We further consider stereo scene flow methods [22, 39, 56], where the projected LiDAR depth and $\frac{d_2}{d_1}$ are used to determine the depth-wise flow displacements. + +Results As in Tab. 3, our method trained on synthetic dataset already performs better than all the point-based methods as well as FlowNet3. After fine-tuning on KITTI, it out-performs all the stereo-based methods, except for PRSM, which takes $100\mathrm{X}$ more inference time. Compared to point-based methods where exact 3D correspondence may not exist in the sparse scan, our method estimates normalized scene flow on a much denser pixel grid, which leads to higher precision. A visual example is shown in Fig. 7. + +# 4.3. Time-to-collision estimation + +Modelling time-to-collision (TTC) is important for robots to avoid collisions and plan the trajectory [8, 13, 33, 34, 40]. Indeed, knowing the motion-in-depth directly tells us the time a point takes to collide with the image plane by + +$$ +T _ {c} \quad = \quad \frac {Z}{Z - Z ^ {\prime}} T \quad = \quad \frac {T}{1 - \tau}, +$$ + +assuming a constant velocity, where $T$ is the sampling interval of the camera and $\tau$ is motion-in-depth [20]. We + +![](images/025ace5efecfade05ea2dfcab0dc5785e7082ded526d528768d2e02a55b12f14.jpg) +Figure 7. LiDAR scene flow result on KITTI-15 val set frame "000124". Red (2nd frame) and blue (translated first frame) points are supposed to overlap for perfect 3D flow estimation. Our method predicts more accurate 3D flow than global-ICP and FlowNet3 on the front vehicles. OSF and PRSM produce motion fields with a similar quality as ours, but use stereo images and are much slower. + +![](images/4284dd7b4fb1638d2c2d1e8260ede9a0a30bd0572d6a8c626eaba32cfea44226.jpg) + +![](images/4d8a8a06e179d8a2a97bd05ffb2baee13dc7bfd48049079734adfda79ee727d2.jpg) + +Table 4. Percentage errors of time-to-contact estimation on KITTI. + +
MethodErr-1sErr-2sErr-5sInput
FlowNet3 [22]22.8721.4915.97stereo
†FlowNet3-ft [22]11.9713.8612.43stereo
OSF [39]6.947.788.74stereo
PRSM [56]5.915.726.10stereo
Ours4.214.074.51mono
+ +convert the motion-in-depth estimations to time-to-collision and compare our method with the baselines in Tab. 4. + +We treat TTC prediction as a binary classification task where we predict whether the TTC is less than $\{1\mathrm{s},2\mathrm{s},5\mathrm{s}\}$ for each pixel [33]. The sampling interval is set as 0.1s and only the points with positive TTC ground-truth are evaluated. We compute the accuracy over 40 KITTI validation images as used in optical scene flow evaluation. + +We find that OSF and PRSM perform reasonably well on TTC estimation, which is consistent with their high accuracy on motion-in-depth estimation. Our monocular method outperforms all the baselines for all time intervals, indicating it makes better predictions on possible future collisions. + +# 4.4. Self-learning of optical expansion + +We explore the task of self-supervised learning of optical flow and expansion. Our network is trained on 6800 images from KITTI depth estimation dataset [53] for 20k iterations, where the sequences that appear in KITTI-15 scene flow training set are excluded. Then we evaluate 40 validation KITTI-15 images as used in optical scene flow. + +As for baselines, "Brightness" compares the difference between the intensity values of the reference and target pixel, and "Census" compares between intensity values of a $K \times K$ patch around the reference pixel and their correspondences. Both methods do not provide supervision signals for optical expansion. Our scale-aware loss provides supervision for optical expansion, and combined with census loss, gives the best performance, as shown in Tab.5. + +Table 5. Results of self-supervised flow estimation on KITTI-15. + +
MethodF1 EPEExp. log-L1
Brightness [47]9.472N.A.
Census [37]7.000N.A.
Ours-Scale7.380336
Ours-Census+Scale6.564348
+ +# 4.5. Rigid depth estimation + +Structure-from-motion jointly estimates camera poses and 3D point locations of a rigid scene given point correspondences [19]. However, for two frames undergoing a forward or backward translational camera motion, the triangulation error for pixels near the focus of expansion (FoE), or epipole, is usually high due to the limited baseline and small triangulation angle [5, 14]. Here we describe a method of computing depth from optical expansion, which is not sensitive to small baseline. + +Here we consider the case where camera motion is a given translation $\mathbf{t}_c = (t_{cx}, t_{cy}, t_{cz})$ , and compare the depth estimation solutions using triangulation and motion-in-depth. For triangulation, assuming an identity camera intrinsics, we have depth + +$$ +Z = \frac {x - \operatorname {F o E} _ {x}}{u} t _ {c z} = \frac {y - \operatorname {F o E} _ {y}}{v} t _ {c z}, +$$ + +where $\mathrm{FoE} = (t_{cx}, t_{cy})$ and $(u, v)$ is the displacement of reference point $(x, y)$ [30]. Notice when only lateral movement exists, the above is equivalent to $Z = t_{cx} / u$ . Motion-in-depth $\tau$ also tells us the depth via time-to-contact, + +$$ +Z = \frac {1}{1 - \tau} t _ {c z}. +$$ + +Assuming the errors according to triangulation and time-to-contact are $\epsilon_{||\mathbf{u}||}$ and $\epsilon_{\tau}$ respectively, we have + +$$ +\epsilon_ {Z _ {1}} \sim \frac {1}{| | u | | ^ {2}}, \quad \epsilon_ {Z _ {2}} \sim \frac {1}{(1 - \tau) ^ {2}}, +$$ + +![](images/ff37cdb839c09a3429868035e9ff81b217648faa51dcd082407c3ab27323aeb7.jpg) +Figure 8. Rigid depth estimation with optical flow vs motion-in-depth. (a): overlaid input frames, where the pixel motion is relative small for the marked region near the focus of expansion. (b): distance to the focus of expansion from image coordinates, given by $||\mathbf{p} - \mathrm{FoE}||$ . (c): flow correspondences visualized by the Middlebury color wheel. (d): depth estimation by triangulation of flow correspondences, where the estimation for the marked region near the focus of expansion is corrupted due to small displacements. (e): motion-in-depth estimation. (f): depth reconstruction by time-to-contact, where the depth estimation near the focus of expansion is more robust than the triangulation method. + +which indicates large error occurs when flow is smaller for the triangulation solution, and large error occurs when optical expansion is close to 1 for the time-to-contact solution. Interestingly, it is always the case that for points near FoE where displacements are small, the optical expansion is either greater than one (moving forward) or smaller than one (moving backward) [40], giving robust signals for reconstructing points near the FoE as shown in Fig. 8. + +# 5. Ablation + +Setup To demonstrate the advantage of our method over alternatives for estimating optical expansion, we perform an extensive set of diagnostics. For all experiments, we train the network for 20k iterations on Driving and Monkaa with a batch size of 8, and test on the 40 KITTI validation images used in optical scene flow experiments. We also test on the sintel training set, which compared to KITTI, has more dynamic objects and a much smaller range of optical expansion, since depth does not change much over frames. + +Comparison to expansion-based options We first remove the residual prediction structure and directly learn to regress the optical expansion from the initial prediction and find the performance drops slightly. Then we investigate the effectiveness of input features. Replacing initial expansion to flow predictions as inputs increases the error by $50.2\%$ on KITTI and 39.8 on Sintel, which shows the initial scale extracted from local affine transform is crucial for estimating the optical expansion. We then replace initial expansion with the reference and warped target image features (by flow) as inputs, and find the error rises by $76.5\%$ on KITTI and $109.6\%$ on Sintel, which indicates it is difficult to learn optical expansion directly from image features. To demon- + +Table 6. Ablation study on optical expansion estimation. + +
MethodKITTI log-L1Sintel log-L1
Ours24578
w/o residual25583
affine→flow383116
affine→warp450174
Raw affine transform363131
Matching over scales541145
+ +strate the improvement from the optical expansion network, we evaluate the raw scale component extracted from the local affine transforms, which increases the error by $42.4\%$ on KITTI and $57.8\%$ on Sintel. + +Matching over scales We consider a scale matching network baseline that searches for scale over a pyramid of images [44, 57, 59]. At the quarter feature resolution, we discretize the $s \in [0.5, 2]$ into $S = 9$ intervals in log space, and construct a pyramid by scaling the reference image features. Then a 3D cost volume of size $(H/4, W/4, S)$ is constructed by taking the dot product between reference feature and target feature pyramid warped by the optical flow prediction. The cost volume is further processed by 3D convolutions and soft-argmin regression following prior work on stereo matching [23, 60]. However, this approach faces a hard time predicting the optical expansion correctly. We posit the signals in raw images feature is not strong enough for the matching network to directly reason about expansions. + +# 6. Discussion + +We explore problems of 3D perception using monocular cameras and propose to estimate optical expansion, which provides rich information about relative depth change. We design a neural architecture for optical expansion and normalized scene flow, associated with a set of supervised or self-supervised learning strategies. As a result, significant improvements over prior art on multiple 3D perception tasks are achieved, including LiDAR scene flow, optical scene flow, and time-to-collision estimation. For future work, we think dense optical expansion is a valuable low-level cue for motion segmentation and robot collision avoidance. Moreover, the geometric relationship between optical expansion and normalized scene flow is currently established assuming a scaled orthographic camera model and non-rotating scene elements. Extending it to a perspective camera model with rotating scene elements would be interesting. Finally, background rigidity is a powerful prior for depth and motion estimation, and incorporating it with our local estimates would further improve the performance. + +Acknowledgements: This work was supported by the CMU Argo AI Center for Autonomous Vehicle Research. Thanks to Chaoyang Wang and Peiyun Hu for insightful discussions, and friends at CMU for valuable suggestions. + +# References + +[1] Simon Baker, Daniel Scharstein, JP Lewis, Stefan Roth, Michael J Black, and Richard Szeliski. A database and evaluation methodology for optical flow. IJCV, 2011. 4 +[2] Daniel Barath. Recovering affine features from orientation-and scale-invariant ones. In ACCV, 2018. 2, 4 +[3] Daniel Barath and Zuzana Kukelova. Homography from two orientation-and scale-covariant features. In ICCV, 2019. 2 +[4] Herbert Bay, Tinne Tuytelaars, and Luc Van Gool. Surf: Speeded up robust features. In ECCV, 2006. 2 +[5] Christian Beder and Richard Steffen. Determining an initial image pair for fixing the scale of a 3d reconstruction from an image sequence. In Joint Pattern Recognition Symposium, pages 657-666. Springer, 2006. 7 +[6] Fabian Brickwedde, Steffen Abraham, and Rudolf Mester. Mono-SF: Multi-view geometry meets single-view depth for monocular scene flow estimation of dynamic traffic scenes. In CVPR, 2019. 1, 6 +[7] Daniel J Butler, Jonas Wulff, Garrett B Stanley, and Michael J Black. A naturalistic open source movie for optical flow evaluation. In ECCV, 2012. 4 +[8] Jeffrey Byrne and Camillo J Taylor. Expansion segmentation for visual collision detection and estimation. In ICRA, 2009. 1, 6 +[9] Ted Camus, David Coombs, Martin Herman, and Tsai-Hong Hong. Real-time single-workstation obstacle avoidance using only wide-field flow divergence. In Proceedings of 13th International Conference on Pattern Recognition, volume 3, pages 323-330. IEEE, 1996. 2, 4 +[10] Ayush Dewan, Tim Caselitz, Gian Diego Tipaldi, and Wolfram Burgard. Rigid scene flow for 3d lidar scans. In IROS, 2016. 6 +[11] A. Dosovitskiy, P. Fischer, E. Ilg, P. Häusser, C. Hazirbaş, V. Golkov, P. v.d. Smagt, D. Cremers, and T. Brox. Flownet: Learning optical flow with convolutional networks. In ICCV, 2015. 4 +[12] Andreas Ess, Bastian Leibe, and Luc Van Gool. Depth and appearance for mobile scene analysis. In ICCV, 2007. 2 +[13] Pete Florence, John Carter, and Russ Tedrake. Integrated perception and control at high speed: Evaluating collision avoidance maneuvers without maps. In Workshop on the Algorithmic Foundations of Robotics (WAFR), 2016. 6 +[14] Wolfgang Förstner. Uncertainty and projective geometry. In Handbook of Geometric Computing, pages 493-534. Springer, 2005. 7 +[15] James J Gibson. The ecological approach to visual perception: classic edition. Psychology Press, 2014. 1 +[16] Clément Godard, Oisin Mac Aodha, Michael Firman, and Gabriel J. Brostow. Digging into self-supervised monocular depth prediction. In ICCV, 2019. 5 +[17] Paulo FU Gotardo and Aleix M Martinez. Non-rigid structure from motion with complementary rank-3 spaces. In CVPR, 2011. 2 +[18] Xiuye Gu, Yijie Wang, Chongruo Wu, Yong Jae Lee, and Panqu Wang. HPLFlowNet: Hierarchical permutohedral lattice flownet for scene flow estimation on large-scale point clouds. In CVPR, 2019. 6 + +[19] Richard Hartley and Andrew Zisserman. Multiple view geometry in computer vision. Cambridge university press, 2003. 3, 7 +[20] Berthold KP Horn, Yajun Fang, and Ichiro Masaki. Time to contact relative to a planar surface. In IEEE Intelligent Vehicles Symposium. IEEE, 2007. 2, 6 +[21] Eddy Ilg, Nikolaus Mayer, Tonmoy Saikia, Margret Keuper, Alexey Dosovitskiy, and Thomas Brox. Flownet 2.0: Evolution of optical flow estimation with deep networks. In CVPR, 2017. 5 +[22] Eddy Ilg, Tonmoy Saikia, Margret Keuper, and Thomas Brox. Occlusions, motion and depth boundaries with a generic network for disparity, optical flow or scene flow estimation. In ECCV, 2018. 5, 6, 7 +[23] Alex Kendall, Hayk Martirosyan, Saumitro Dasgupta, Peter Henry, Ryan Kennedy, Abraham Bachrach, and Adam Bry. End-to-end learning of geometry and context for deep stereo regression. In ICCV, 2017. 8 +[24] Sameh Khamis, Sean Fanello, Christoph Rhemann, Adarsh Kowdle, Julien Valentin, and Shahram Izadi. Stereonet: Guided hierarchical refinement for real-time edge-aware depth prediction. In ECCV, 2018. 4 +[25] Daniel Kondermann, Rahul Nair, Katrin Honauer, Karsten Krispin, Jonas Andrulis, Alexander Brock, Burkhard Gussefeld, Mohsen Rahimimoghaddam, Sabine Hofmann, Claus Brenner, et al. The hci benchmark suite: Stereo and flow ground truth with uncertainties for urban autonomous driving. In CVPRW, 2016. 4 +[26] Suryansh Kumar, Yuchao Dai, and Hongdong Li. Monocular dense 3d reconstruction of a complex dynamic scene from two perspective frames. In ICCV, 2017. 1, 2, 3 +[27] Pengpeng Liu, Michael Lyu, Irwin King, and Jia Xu. Selfflow: Self-supervised learning of optical flow. In CVPR, 2019. 4 +[28] Xingyu Liu, Charles R Qi, and Leonidas J Guibas. Flownet3D: Learning scene flow in 3d point clouds. In CVPR, 2019. 6 +[29] Xingyu Liu, Mengyuan Yan, and Jeannette Bohg. MeteorNet: Deep learning on dynamic 3d point cloud sequences. In ICCV, 2019. 5, 6 +[30] Hugh Christopher Longuet-Higgins and Kvetoslav Prazdny. The interpretation of a moving retinal image. Proceedings of the Royal Society of London. Series B. Biological Sciences, 208(1173):385-397, 1980. 7 +[31] DG Lowe. Object recognition from local scale-invariant features. In ICCV, 1999. 2 +[32] Wei-Chiu Ma, Shenlong Wang, Rui Hu, Yuwen Xiong, and Raquel Urtasun. Deep rigid instance scene flow. In CVPR, 2019. 6 +[33] Aashi Manglik, Xinshuo Weng, Eshed Ohn-Bar, and Kris M Kitani. Future near-collision prediction from monocular video: Feasibility, dataset, and challenges. IROS, 2019. 1, 2, 6, 7 +[34] Thiago Marinho, Massinissa Amrouche, Venanzio Cichella, Dušan Stipanović, and Naira Hovakimyan. Guaranteed collision avoidance based on line-of-sight angle and time-to-collision. In 2018 Annual American Control Conference (ACC), 2018. 1, 6 + +[35] David Marr and Tomaso Poggio. A computational theory of human stereo vision. Proceedings of the Royal Society of London. Series B. Biological Sciences, 1979. 2 +[36] N. Mayer, E. Ilg, P. Häusser, P. Fischer, D. Cremers, A. Dosovitskiy, and T. Brox. A large dataset to train convolutional networks for disparity, optical flow, and scene flow estimation. In CVPR, 2016. 4, 5, 6 +[37] Simon Meister, Junhwa Hur, and Stefan Roth. Unflow: Unsupervised learning of optical flow with a bidirectional census loss. In AAAI, 2018. 4, 7 +[38] Moritz Menze and Andreas Geiger. Object scene flow for autonomous vehicles. In CVPR, 2015. 3, 4, 5 +[39] Moritz Menze, Christian Heipke, and Andreas Geiger. Object scene flow. ISPRS Journal of Photogrammetry and Remote Sensing (JPRS), 2018. 5, 6, 7 +[40] Tomoyuki Mori and Sebastian Scherer. First results in detecting and avoiding frontal obstacles from a monocular camera for micro unmanned aerial vehicles. In ICRA, 2013. 1, 2, 6, 8 +[41] Amaury Negre, Christophe Braillon, James L Crowley, and Christian Laugier. Real-time time-to-collision from variation of intrinsic scale. In Experimental Robotics, pages 75-84. Springer, 2008. 2 +[42] James Philbin, Ondrej Chum, Michael Isard, Josef Sivic, and Andrew Zisserman. Object retrieval with large vocabularies and fast spatial matching. In CVPR, 2007. 2 +[43] True Price, Johannes L Schonberger, Zhen Wei, Marc Pollefeys, and Jan-Michael Frahm. Augmenting crowd-sourced 3d reconstructions using semantic detections. In CVPR, 2018. 2 +[44] Weichao Qiu, Xinggang Wang, Xiang Bai, Alan Yuille, and Zhuowen Tu. Scale-space sift flow. In WACV, 2014. 2, 8 +[45] Rene Ranftl, Vibhav Vineet, Qifeng Chen, and Vladlen Koltun. Dense monocular depth estimation in complex dynamic scenes. In CVPR, 2016. 2 +[46] Carolina Raposo and Joao P Barreto. Theory and practice of structure-from-motion using affine correspondences. In CVPR, 2016. 2 +[47] Zhe Ren, Junchi Yan, Bingbing Ni, Bin Liu, Xiaokang Yang, and Hongyuan Zha. Unsupervised deep learning for optical flow estimation. In AAAI, 2017. 4, 7 +[48] Chris Russell, Rui Yu, and Lourdes Agapito. Video pop-up: Monocular 3d reconstruction of dynamic scenes. In ECCV. Springer, 2014. 2 +[49] Tomokazu Sato, Tomas Pajdla, and Naokazu Yokoya. Epipolar geometry estimation for wide-baseline omnidirectional street view images. In ICCVW, 2011. 2 +[50] Paul R Schrater, David C Knill, and Eero P Simoncelli. Perceiving visual expansion without optic flow. Nature, 410(6830):816, 2001. 1 +[51] René Schuster, Christian Bailer, Oliver Wasenmüller, and Didier Stricker. Combining stereo disparity and optical flow for basic scene flow. In Commercial Vehicle Technology 2018, pages 90–101. Springer, 2018. 5 +[52] Michael T Swanston and Walter C Gogel. Perceived size and motion in depth from optical expansion. Perception & psychophysics, 39(5):309-326, 1986. 1 + +[53] Jonas Uhrig, Nick Schneider, Lukas Schneider, Uwe Franke, Thomas Brox, and Andreas Geiger. Sparsity invariant cnns. In 3DV, 2017. 7 +[54] Shimon Ullman. The interpretation of structure from motion. Proceedings of the Royal Society of London. Series B. Biological Sciences, 1979. 2 +[55] René Vidal, Yi Ma, Stefano Soatto, and Shankar Sastry. Two-view multibody structure from motion. IJCV, 2006. 2 +[56] Christoph Vogel, Konrad Schindler, and Stefan Roth. 3D scene flow estimation with a piecewise rigid scene model. IJCV, 2015. 5, 6, 7 +[57] Shenlong Wang, Linjie Luo, Ning Zhang, and Jia Li. Autoscaler: scale-attention networks for visual correspondence. BMVC, 2016. 2, 8 +[58] William H Warren, Michael W Morris, and Michael Kalish. Perception of translational heading from optical flow. Journal of Experimental Psychology: Human Perception and Performance, 14(4):646, 1988. 2, 4 +[59] Li Xu, Zhenlong Dai, and Jiaya Jia. Scale invariant optical flow. In ECCV, 2012. 2, 8 +[60] Gengshan Yang, Joshua Manela, Michael Happold, and Deva Ramanan. Hierarchical deep stereo matching on high-resolution images. In CVPR, 2019. 8 +[61] Gengshan Yang and Deva Ramanan. Volumetric correspondence networks for optical flow. In NeurIPS. 2019. 5 +[62] Bernhard Zeisl, Torsten Sattler, and Marc Pollefeys. Camera pose voting for large-scale image-based localization. In ICCV, 2015. 2 +[63] Feihu Zhang, Victor Prisacariu, Ruigang Yang, and Philip HS Torr. GA-Net: Guided aggregation net for end-to-end stereo matching. In CVPR, 2019. 6 +[64] Yingying Zhu, Dong Huang, Fernando De La Torre, and Simon Lucey. Complex non-rigid motion 3d reconstruction by union of subspaces. In CVPR, 2014. 1, 2 \ No newline at end of file diff --git a/upgradingopticalflowto3dsceneflowthroughopticalexpansion/images.zip b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a1864c5033eecc1af0a421c3bdd5c6ff5433248c --- /dev/null +++ b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7ef0acdf9a5b5d8bdbbda75248a75bcc20a42b5f18b4cbb8658a13b2928a5c5 +size 552430 diff --git a/upgradingopticalflowto3dsceneflowthroughopticalexpansion/layout.json b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1cdb11bd1b7d7fd6a594f50db591d5847b6aa3f7 --- /dev/null +++ b/upgradingopticalflowto3dsceneflowthroughopticalexpansion/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35b35e0b89d35cb94781b545514cf896c5d85f435e5e201113eb4fe6d934ce0f +size 454144 diff --git a/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/377cdf36-32a8-43af-b161-cea890505d43_content_list.json b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/377cdf36-32a8-43af-b161-cea890505d43_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..403c8afeab2a41886d74d127c5b3f50e0162f07f --- /dev/null +++ b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/377cdf36-32a8-43af-b161-cea890505d43_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de6a95a8637c017cb6cbe628a098d563f6f2127c4c66bc479fd33b51a1f1b268 +size 64395 diff --git a/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/377cdf36-32a8-43af-b161-cea890505d43_model.json b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/377cdf36-32a8-43af-b161-cea890505d43_model.json new file mode 100644 index 0000000000000000000000000000000000000000..485b8c0c9c258e268196876df3765b5b8a158d87 --- /dev/null +++ b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/377cdf36-32a8-43af-b161-cea890505d43_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f14b40ce6534944b0f72c8ec74122a5e119af91245ba8458900f94fd63cd07ca +size 78210 diff --git a/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/377cdf36-32a8-43af-b161-cea890505d43_origin.pdf b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/377cdf36-32a8-43af-b161-cea890505d43_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0b424587bee28536fd7e09dca7064540e2e91558 --- /dev/null +++ b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/377cdf36-32a8-43af-b161-cea890505d43_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88e8de27882379ede742474e51a7c8dbbaecba3e05b7e7ec58c44cbf2ba639c0 +size 4070196 diff --git a/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/full.md b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8eda583bbbf4f528e19ef505de70614d9d256106 --- /dev/null +++ b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/full.md @@ -0,0 +1,244 @@ +# Use the Force, Luke! Learning to Predict Physical Forces by Simulating Effects + +Kiana Ehsani\*2, Shubham Tulsiani1, Saurabh Gupta3, Ali Farhadi2, Abhinav Gupta1,4 1 FAIR, 2 University of Washington, 3 UIUC, 4 Carnegie Mellon University https://ehsanik.github.io/forcecvpr2020 + +![](images/e9cef1a78e9a04f31555aa834031968be307e7c26c6e46c871825101431c2e69.jpg) +Input Videos + +![](images/600ee1b12e8e8d01a6b41a2d057e4768b3ef7b3db6bcf5e68ece08380d172587.jpg) +Output Contact points + Forces + +![](images/fccc57a41f41adb51b579476beb47b3e2eb965a92ac5b956c39e57280dbddda0.jpg) +Applying Forces + +![](images/bb03d8397661bea58658f99dbf012987180f9598e3ffb688fbf7e8f4a41231fc.jpg) +Simulated Result +Figure 1: We study the problem of physical understanding of human-object interactions by inferring object motion, points of contacts and forces from RGB videos. We use physics simulation to see how these interactions change the dynamics of the object and try to imitate the motion observed in the video. + +# Abstract + +When we humans look at a video of human-object interaction, we can not only infer what is happening but we can even extract actionable information and imitate those interactions. On the other hand, current recognition or geometric approaches lack the physicality of action representation. In this paper, we take a step towards more physical understanding of actions. We address the problem of inferring contact points and the physical forces from videos of humans interacting with objects. One of the main challenges in tackling this problem is obtaining ground-truth labels for forces. We sidestep this problem by instead using a physics simulator for supervision. Specifically, we use a simulator to predict effects, and enforce that estimated forces must lead to same effect as depicted in the video. Our quantitative and qualitative results show that (a) we can predict meaningful forces from videos whose effects lead to accurate imitation of the motions observed, (b) by jointly optimizing for contact point and force prediction, we can improve the performance on both tasks in comparison to independent training, and (c) we can learn a representation from this model that generalizes to novel objects using few shot examples. + +# 1. Introduction + +What does it mean to understand a video of human-object interaction such as the one shown in Figure 1? One popular answer would be to recognize the nouns (objects) and verbs (actions) – e.g., in this case lifting a pot. But such an understanding is quite limited in nature. For example, simply recognizing 'lifting' does not tell one anything about how the pot was grasped, or how high it was lifted. To address these shortcomings, there has been a recent push towards a deeper geometric understanding of videos. From estimating contact points on the object [2] to estimating human and object poses [21], these approaches tend to estimate the visible geometric structure. While the high-level semantic labeling ('lifting') or the geometric inferences (human and object pose estimation), both provide an answer to what happened in the video, it lacks the true physical substance for actionable understanding. For example, just knowing how the pot is moved is not sufficient for the robot to imitate – it needs to also understand how the act was accomplished. + +In order to obtain a more actionable understanding, we argue that one must account for the physical nature of the task. The answer then, to the question of how the act was done, is rather straightforward from a physical perspective – the object was in contact with the human hand on two sides, and a combination of inward and upward forces applied at these contact points allowed it to be lifted up against gravity. This + +understanding of physical forces is not only directly useful for an active agent but also completely represents the interaction from the object's perspective as only external forces cause its motion. In this work, we take a step towards developing such an understanding and present a system that can infer the contact points and forces applied to a known object from an interaction video. + +While the goal of being able to infer these forces is desirable, it is unfortunately tedious (if not impossible) to acquire direct supervision for this task. The existing force sensors [22] are not precise enough to provide accurate direction or magnitude measurement, and not compact enough to keep the interaction natural. So, how do we get the supervision? We note that if we can infer physical forces applied to an object, we can also recover a full geometric understanding by simulating the effect of the forces on that object. We build on this insight and present an approach to learn prediction of physical forces, that instead of directly supervising the predicted forces, enforces that their effects match the observations through the interaction video. + +To train our system, we collect a dataset of videos recorded from multiple participants grabbing and moving objects. Then we use Mechanical Turk to annotate the keypoints of the objects and contact points on each frame and use this limited information in camera frame to infer the object's 6DOF pose in world coordinates and the person's contact points on object mesh. We observe that our approach of learning to predict forces via supervising their effects allows us to learn meaningful estimates and that these can explain the observed interaction in terms of reproducing the observed motion. + +Our experiments show that our model learns to infer human contact points on object mesh, and estimate the corresponding forces. We observe that applying these forces on the predicted contact points at each time step in physics simulation we can repeat the behavior depicted in the video. We also show that contact point and force prediction are highly correlated and jointly optimizing improves the performance on both tasks. Finally, we provide interesting evidence that the representation we learn encodes rich geometric and physical understanding that enables us to generalize to interacting with novel objects using only few shot examples. + +# 2. Related Work + +Pose estimation. In order to understand physical motions, a network needs to implicitly reason about the object pose. There is a long line of work in this area, with two different approaches: category-based [12, 28, 29] and instance-based [8, 19, 30, 33]. Our work is more aligned with the latter, and we use the YCB object set [3] which provides richly textured objects. While some of our model design decisions is inspired by these works, e.g. iterative pose es + +timation [20], our final goal, to infer about physics of the observed motions, is different. + +Contact point prediction. Predicting the contact point and hand pose estimation for object manipulation has been studied in the domain of detecting plausible tool grasping [1], human action recognition [10], hand tracking [14], and common grasp pattern recognition [17]. Brahmbhatt et al. [2] collected a dataset of detailed contact maps using a thermal camera, and introduced a model to predict diverse contact patterns from object shape. While our model also reasons about the contact points, it is only one of the components towards better understanding the physical actions. Moreover, we show that we benefit from force prediction to improve the contact point estimations. + +Human Object interaction. Typical approaches for understanding human object interaction use high level semantic labels [11, 13, 34]. Recently there have been some works in understanding the physical aspects of the interaction. Pham et al. [26] have used data from force and motion sensors to reason about human object interactions. They also use off-the-shelf tracking, pose estimation, and analytical calculations to infer forces [25]. Hwang et al. [18] studied the forces applied to deformable objects and the changes it makes on object shape. Li et al. [21] reasoned about human body pose and forces on the joints when the person is interacting with rigid stick-like hand tools. While these methods show encouraging results for this direction, our work concentrates on interaction scenarios with complex object meshes and more diverse contact point patterns. + +Predicting physical motions. Recently, learning the physics dynamic has been widely studied by classifying the dynamics of objects in static images [23], applying external forces in synthetic environments [24], predicting postbounces of a ball [27], simulating billiard games [9], and using generative models to produce plausible human-object interactions [31]. These works are more broadly related to understanding the physical environment, however, their goal to predict how scenes evolve in the future is different from ours. We try to tackle the problem of physically reasoning about the motions observed in the videos. + +Recovering physical properties. In recent years there have been efforts in building differentiable physics simulation [6, 16]. Wu et al. [32] use physics engines to estimate physical properties of objects from visual inputs. However, in contrast to these approaches aimed at retrieving the properties of the physical world, we assume these are known and examine the problem of interacting with it. Our real-to-sim method is more aligned with the path taken by [4]; that being said, our goal is not bringing the simulation's and real world's distributions closer. We rather focus on replicating the observed trajectory in simulation. + +# 3. Approach + +Given a video depicting a human interacting with an object, our goal is to infer the physical forces applied over the course of the interaction. This is an extremely challenging task in the most general form. For example, the object geometry may vary wildly and even alter over the interaction (e.g. picking a cloth), or forms of contact may be challenging (e.g. from elbowing a door to playing a guitar). We therefore restrict the setup to make the task tractable, and assume that the interaction is with a known rigid object (given 3D model), and only involves a single hand (five fingers apply the force). Given such an interaction video, our goal is then to infer the forces applied to it at each time-step along with the corresponding contact points. + +Formally, given a sequence of images $\{I_t\}$ depicting an interaction with a known object, and additional annotation for (approximate) initial object pose, we predict the person's contact points in object coordinates frame $C_t = (c_t^0, \dots, c_t^4)$ (each representing one finger), and the forces applied to each contact point $(f_t^0, \dots, f_t^4)$ . As alluded to earlier, it is not possible to acquire supervision in the form of the ground-truth forces over a set of training interactions. Our key insight is that we can enable learning despite this, by instead acquiring indirect supervisory signal via enforcing that the simulated effect of predicted forces matches the observed motions across the video. We first describe in Section 3.1 a dataset we collect to allow learning using this procedure. We then describe in Section 3.2 how we can extract supervisory signal from this data, and finally present our overall learning procedure in Section 3.3. + +# 3.1. Interaction Dataset + +We collect a dataset of object manipulation videos, representing a diverse set of objects, motions, and grasping variations. We leverage the objects from the YCB set [3], as these have the underlying geometry available, and record a set of videos showing participants manipulating 8 objects. To enable learning using these videos, we collect additional annotations in the form of semantic keypoints and pixel locations of contact points to (indirectly) allow recovering the motion of the objects as well as the 3D contact points for each interaction. + +We describe the data collection procedure in more detail in the supplementary, but in summary, we obtain: a) annotations for 2D locations for visible keypoints in each frame, b) 6D pose of the object w.r.t. the camera in each frame, though these are noisy due to partial visibility, co-planar keypoints, etc., and c) 3D contact points on the object mesh over each interaction video. There are 174 distinct interaction videos in our dataset (111 train, 31 Test, 32 Validation), 13K frames in total. The 8 objects used are: pitcher, bleach bottle, skillet, drill, hammer, toy airplane, tomato soup can and mustard bottle. We show some examples from + +the dataset in Figure 2. We will publicly release the dataset and believe that it will also encourage future research on understanding physical interactions. + +# 3.2. Supervisory Signal via Physical Simulation + +Given per-timestep predicted forces $f_{t}$ and corresponding contact points $C_t$ , we show that these can get supervisory signal by simulating their effects, and comparing the simulated motion against the observed one. + +Discrepancy between Simulated and Observed Motions. A rigid body's 'state' can be succinctly captured by its 6D pose, linear velocity, and angular velocity. Given a current state $s_t$ and the specification of the applied forces, one can compute using a physics simulator $\mathcal{P}$ , the resulting state $s_{t+1} \equiv \mathcal{P}(s_t, f_t, C_t)$ . Therefore, given the initial state, and predicted forces and contact points, we can simulate the entire trajectory under these forces and obtain a resulting state at each timestep. + +One possible way to measure the discrepancy between this resulting simulated motion and the observed one is to penalize the difference between the corresponding 6D poses. However, our annotated 'ground-truth' 6D poses are often not accurate (due to partial visibility etc.), and this measure of error is not robust. Instead, we note that we can directly use the annotated 2D keypoint locations to measure the error, by penalizing the re-projection error between the projected keypoints under the simulated pose and the annotated locations of the observed ones. We define a loss function that penalizes this error: + +$$ +\mathcal {L} _ {\text {k e y p o i n t}} \left(l _ {t} ^ {k p}, s _ {t}\right) := \left\| l _ {t} ^ {k p} - \pi \left(R _ {t}, T _ {t}\right) \right\| ^ {2} \tag {1} +$$ + +Here, $l_{t}^{kp}$ is the annotated 2D location for keypoints, $\pi$ is the projection operator which transforms 3D keypoints on the model to the camera frame under the (simulated) rotation and the translation at $s_t = (R_t,T_t)$ . + +Differentiable Physics Simulation. To allow learning using the objective above, we require a differentiable physics simulator $\mathcal{P}$ . While typical general-purpose simulators are unfortunately not differentiable, we note that the number of input variables (state $s_t$ , forces $f_t$ , and contact points $C_t$ ) in our scenario is low-dimensional. We can therefore use finite difference method to calculate the gradients of the outputs of the simulation with respect to its inputs. + +In order to calculate the derivative of output with respect to input, we need to calculate the partial derivatives $\frac{\partial S_{t + 1}}{S_t}$ , $\frac{\partial S_{t + 1}}{f_t}$ and $\frac{\partial S_{t + 1}}{C}$ . We use the approximation + +$$ +\frac {d f}{d x} \cong \frac {f (x + h) - f (x - h)}{2 h} \tag {2} +$$ + +where $h$ is a small constant. As $s_t \in \mathbb{R}^{13}$ , $f_t \in \mathbb{R}^{k \times 3}$ , and $C_t \in \mathbb{R}^{k \times 3}$ ( $k = 5$ is the number of contact points), we can + +![](images/7a13e6f668ddc4aec6b94463e254ceb251120074806100a30b65d5b180a3a530.jpg) +Figure 2: Dataset. Showing two sample frames (drill and hammer) from our dataset. We collect annotation for semantic keypoints of the objects (Column 2) and human contact points. This data helps us to calculate object 6DOF pose (Column 3) and contact points on object mesh (Column 4). + +![](images/2fa612cb782f4284226ca42cce5f3f3cfd2662cc453651ce5a204dc2c3ca6c06.jpg) +Figure 3: Training schema. Given a video as input, the model predicts the forces and their corresponding contact points. We then apply these forces on the object mesh in physics simulation and jointly optimize for keypoint projection loss $\mathcal{L}_{\text {keypoint }}$ and contact point prediction loss $\mathcal{L}_{cp}$ with the aim to imitate the motion observed in the video. + +compute the gradients w.r.t the input using $(13 + 3k + 3k) + 1$ calls to the simulator $\mathcal{P}$ (the last call is for calculating $f(x)$ ). We use the PyBullet simulator [5] for our work, and find that each (differentiable) call takes only 0.12 seconds. + +# 3.3. Putting it together: Joint Learning of Forces and Contact Points + +Given a video and the initial state of the object, we encode the sequence into a visual embedding, and use this embedding to predict the contact points and their corresponding forces. We then apply these forces in the physics simulation to infer the updated state of the object, and use it in addition to the sequence embedding to iteratively predict the subsequent forces to be applied. This can help the network to adapt to the possible mistakes it might have made, and change the forces in the next steps accordingly (Figure 4). To train our model we have two objectives: (1) to minimize the keypoint re-projection error, that help with reducing the discrepancy between the object trajectory in simulation and the one seen in the video (Equation 1), and (2) to minimize the error in contact point prediction in compare to the + +ground-truth (Figure 3). The objective we use for optimizing the contact point estimation is defined as, + +$$ +\mathcal {L} _ {c p} \left(C _ {t}, \hat {C} _ {t}\right) := \sum_ {i = 0, \dots , k} \| c _ {i} - \hat {c} _ {i} \| ^ {2}, \tag {3} +$$ + +where $k$ is the number of contact points, and $C_t$ and $\hat{C}_t$ are the ground truth and predicted contact points at time $t$ . + +We note that the contact point decoder gets supervisory signals both from contact point loss and the keypoint loss. We believe this constrains contact point prediction to generate physically plausible motions as seen in videos. In experiments, we show this joint loss leads to improvement even in contact point prediction. + +Training details. The backbone for obtaining primary image features is ResNet18 [15] pre-trained on ImageNet [7]. We take the features (which are of size $512 \times 7 \times 7$ ) before the average pooling. For all the experiments we use batch size 64, Adam optimizer with learning rate of 0.001, videos of length 10 frames, with frequency of 30 fps, $h_f, h_s = 0.01$ and $h_c = 0.05$ for approximating gradients (refer to Equation 2) for force, state and contact point respectively. + +We calculate the direction of the gravity in world coordinates and use it in physics simulation to ensure realistic behavior. To train our model we first train each branch in isolation using $\mathcal{L}_{cp}$ for contact point prediction and $\mathcal{L}_{keypoint}$ for force prediction modules, then we jointly optimize for both objectives and train end to end. + +# 4. Experiments + +The area of physical understanding of human-object interaction is largely unexplored, and there are no established benchmark datasets or evaluation metrics. In this work, we use our novel dataset to provide empirical evaluations, and in particular to show that: a) our results are qualitatively meaningful; and (b) individual components and loss terms are quantitatively meaningful (ablations). We will + +![](images/0addd03b23360ce622c930450be66f0bdc38d2075ffe6676ed9ae09477f0041a.jpg) +Figure 4: Model overview. Given a video of a person moving an object, along with the initial pose of the object, our network predicts the human contact points and the forces applied at those for each time step. The implied effects of these forces can then be recovered by applying them in a physics simulation. Using the gradients through this simulated interaction, our model learns how to optimize for its two objectives: minimizing the error in projection of the object to camera frame, and predicting the accurate contact points. + +also demonstrate that a physical understanding of human-object interactions leads to improvement even in individual components such as contact point estimation and estimating object poses; and (c) finally we will demonstrate the generalization power by showing that our network learns a rich representation that can use few examples to generalize to manipulating novel objects. + +Evaluation Metric: The goal of our work is to obtain physical understanding of human-object interactions. But getting ground truth forces is hard, which makes it impossible to quantitatively measure the performance by just force values. So instead of measuring forces, we evaluate if our predicted forces lead to similar motions as depicted in the videos. Therefore, for evaluating our performance, we use the CP and KP error (Equations 1 and 3) as evaluation metrics. The former measures the $L1$ distance between the predictions and ground truth for contact point (in object coordinates), and the latter measures error in keypoint projection (in image frame). Original image size is $1920 \times 1080$ and the keypoint projection error is reported in pixels in the original image dimension. Rotation and translation error are the angular difference (quaternion distance) in rotation and $L2$ distance (meters) in translation respectively. + +# 4.1. Qualitative Evaluation + +We first show qualitative results of our full model: joint contact point and force prediction. The qualitative results for force prediction and contact point predictions are shown in Figure 5 and Figure 6 respectively. As the figure shows, our forces are quite meaningful. For example, in case of plane at $t = 0$ (See Figure 5(a)), initially the yellow and blue arrow is pushing to left and purple arrow is on the other side is pushing to right. This creates a twist motion and as seen at $t = 4$ rotates the plane. Also, in case of skillet (Figure 5(b)), there is a big change in the orientation of the object from $t = 0$ to $t = 4$ , therefore a bigger magnitude of force is required. However, after getting the initial + +momentum the forces decrease to the minimum needed for maintaining the current state. Refer to project page* for more visualizations. + +Next we show few examples of contact point prediction. If contact points are predicted in isolation, small differences can lead to fundamentally different grasps. By enforcing physical meaning to these grasps (via forces), our approach ensures more meaningful predictions. An example is the top of Figure 5, where isolated prediction leads to grasp on the rim of the pitcher; but joint prediction leads to prediction of grasp on the handle. + +# 4.2.Quantitative Evaluation + +To quantitatively evaluate our approach, we measure performance by evaluating if application of forces as predicted lead to effects as depicted in the videos. Table 1 shows the performance in terms of CP metric and KP error. We report both the joint optimization (depicted as $\mathcal{L}_{\text {keypoint }} + \mathcal{L}_{\text {cp}}$ ) and the case where contact point prediction and force prediction modules are learned in an isolated manner $(\mathcal{L}_{\text {keypoint }} / \mathcal{L}_{\text {cp}})$ . We observe that the joint model is significantly better (low error), both in contact point prediction and keypoint prediction. + +Next, we measure what happens if the contact point prediction was perfectly matched with the annotated ground truth. So, instead of predicting them, we use ground truth contact points. Given a video, initial pose, and human contact points, we predict the forces applied to each point of contact to replicate the motion. Table 2 shows the results for unseen videos. Note that the training and test sets of contact points are disjoint, so model needs to be able to generalize to applying forces to the object under novel contact point configurations. + +Comparing results in Table 1 and Table 2 shows that the jointly optimized model $(\mathcal{L}_{keypoint} + \mathcal{L}_{cp})$ , (even though it is using the predicted contact points which may have er + +![](images/f9e499f83f7b7aa503a870b2d998ac8dd39178409971a49802e7bb2586e2e2ae.jpg) +Figure 5: Qualitative Results. We show the results for the model which optimizes for both $\mathcal{L}_{keypoint}$ and $\mathcal{L}_{cp}$ . Due to space limitations only Frames for $t = 0,4$ are shown. For more videos and contact point visualizations refer to supplementary material. + +rors), predicts forces that result in better KP metric in compare to the model that uses ground-truth contact points (and is only trained on $\mathcal{L}_{\mathrm{keypoint}}$ ). This shows that jointly reasoning about where to apply the force and what force to apply can help with a better physical understanding. + +Training one model for different objects. We try two training setup for each experiment: (1) training a separate model per object, and (2) sharing weights for one model across all objects (referred to as "All objects"). The common trend of performance improvement for both metrics after joint optimization is observed when training one model for all objects as well. + +# 4.3. Few-shot Generalization to Novel Objects + +In order to evaluate the representation we learn from this training schema, we train a model for manipulating plane and use that to predict forces on unseen objects using few shot examples. Figure 7 shows that the representation we learned from predicting forces on one object can generalize to estimating forces for held-out objects using only few examples. Increasing the number of training samples yields better results on the test set. The 10 few shot experiment without pre-training (red) has a significantly lower accuracy than the one with our pre-training (light green) and is comparable with our 1-shot experiment (dark green). + +
ObjectInputObjectiveCP ErrorKeypoint Error (in px)Rotation ErrorTranslation Error
PlaneImageLkeypoint/Lcp8.79e-2109.730.2200.152
ImageLkeypoint + Lcp7.97e-299.890.1520.182
SkilletImageLkeypoint/Lcp2.37e-270.020.0850.094
ImageLkeypoint + Lcp2.18e-265.250.0760.063
PitcherImageLkeypoint/Lcp7.3e-2131.620.1260.212
ImageLkeypoint + Lcp5.61e-2113.400.1310.129
DrillImageLkeypoint/Lcp7.08e-285.860.1920.312
ImageLkeypoint + Lcp6.47e-271.000.1630.250
All objectsImageLkeypoint/Lcp6.83e-2104.570.2180.250
ImageLkeypoint + Lcp6.71e-299.380.1830.212
+ +Table 1: Contact point prediction and key point projection error on test set, independent vs. joint optimization In each set, the first row shows the results of the model optimizing for contact point and keypoint projection error separately, and the second row represents the joint optimization results. End to end training improves the results for both contact point prediction and keypoint projection. + +
ObjectInputObjectiveKeypoint Error (in px)Rotation ErrorTranslation Error
PlaneImage + CPgtLkeypoint104.330.1340.199
SkilletImage + CPgtLkeypoint67.470.0750.089
PitcherImage + CPgtLkeypoint124.700.1300.176
DrillImage + CPgtLkeypoint91.250.2360.352
All objectsImage + CPgtLkeypoint102.400.2370.273
+ +# 4.4. Additional Ablation Analysis + +Regressing the force without simulation gradients. One alternative approach to solving the force inference problem is to predict the forces without the gradients from simulation. However, this requires having ground-truth labels for forces, which is almost impossible to obtain. So, we try to optimize for a set of pseudo-ground truth forces. + +The goal of this experiment is to investigate how keeping the physics simulation in the training loop can help with understanding physics of the environment and generalizing to unseen trajectories. + +To obtain pseudo-labels, we optimize a set of valid forces per training example which minimizes the error in keypoint projection. Then we train a model that given the sequence of images and ground truth contact points regresses these forces. The objective is defined as follows: + +$$ +\mathcal {L} _ {f o r c e} (f _ {g t}, \hat {f}) = \| f _ {g t} - \hat {f} \| ^ {2} +$$ + +Table 3 shows that even though the error for training is relatively low, it still fails to generalize to unseen trajectories and gets a high test error. The intuition is that the gradients the network gets from interaction helps with learning a + +Table 2: Predicting the forces using ground truth contact points We first train a model to predict the forces on the ground-truth contact points. The first four rows show the quantitative results for training separate model per object using the $\mathcal{L}_{keypoint}$ objective and the last row shows the result for training one shared model for all 8 objects. + +
SetObjectiveKP (px)RotationTranslation
TrainLkeypoint55.960.1290.063
TestLkeypoint105.600.1380.198
TrainLforce59.860.1200.065
TestLforce185.330.1560.307
+ +Table 3: Pseudo-ground truth force regression. We trained a model to predict the pseudo-ground truth forces for toy airplane from video, initial pose and contact points as input, by directly optimizing for the force prediction $(\mathcal{L}_{force})$ . Although the training error is similar to the model trained on keypoint projection loss, it fails to generalize to unseen images and trajectories. + +more generalizable representation. + +Predicting initial state. We want to evaluate the necessity of giving the initial state as the input to the network. Thus, we try to predict the initial pose instead of using the ground truth. We do so by training a model that given a video as input and contact points in object coordinates (independent of object state), predicts the initial state of the object as well as the forces that are applied on each contact point (Table 4). + +Adding noise to initial state during inference. We also + +![](images/71d226ee8389b5d7ac900acaf77baf7b05fa325a5ee84ed74abc1b055de891ec.jpg) +Figure 6: Improvements in contact point prediction after joint optimization. We qualitatively show some examples for which the model makes better contact point predictions when it is trained using both $\mathcal{L}_{\text {keypoint }}$ and $\mathcal{L}_{cp}$ . Fingers are color-coded (Thumb: orange, Index: Red, Middle: Blue, Ring: Green, Pinky: Purple). + +![](images/3fc33bce496447e1b6e03b5f4fb2e5754c3b6ac8e95933762a2ebcf851976b8b.jpg) +Figure 7: Few shot experiment. Showing the keypoint projection error for the model that is trained on planes and fine-tuned on few examples for held out objects (Lower is better). The results are shown for 1, 5, or 10 examples, as well as the model trained on the whole training set. The red bar shows errors for training on 10 examples without plane pre-training. + +want to investigate the effects of adding noise to initial state on performance. This experiment evaluates the robustness of the performance of the model to the initial state estimation. We used the trained model on toy airplane from Table 2, and added noise to the input initial state during inference time. Figure 8 shows the changes in KP metric with respect to tweaks in the rotation and translation of the initial state. + +
InputKP (px)RotationTranslation
Image135.800.1600.496
Image+S0gt128.550.1740.329
+ +Table 4: Predicting initial state. The result for the model trained on toy plane object set, predicting the initial pose as well as the forces on ground truth contact points. To see how the error in object initial pose estimation is affecting the performance, we input the ground-truth object pose to the model as input during inference to compare. This model is trained with $\mathcal{L}_{\text {keypoint }}$ objective. + +![](images/128aa66ce0bb9c3a7b5eaa83e824b7fbf2ba3cca5b224512c1ced1ca6f6784a8.jpg) +Figure 8: Robustness to initial pose. The changes in the keypoint projection error with respect to the magnitude of the noise added to the initial state. We also calculated the error bars for 5 runs with different random seeds. The labels on the bottom of the chart show the magnitude of the noise in rotation in degrees and the one on the top shows the magnitude of noise in translation in meters. + +# 5. Conclusion + +We have proposed a model that given a video depicting human-object interaction, predicts the contact points and the corresponding forces such that it replicates the observed motion. We demonstrate that jointly optimizing for both contact point prediction and keypoint projection error improves the results on both tasks in comparison to training models in isolation. We also show that our model learns a meaningful physical representation that can generalize to novel objects using few examples. Since our approach needs textured non-symmetric objects we were able to show these results on 8 objects from the YCB set [3], but we conjecture that if the keypoint labels in camera frame can be estimated, this method can generalize further than this object set. We believe our work takes step towards integrating action and perception in one common framework - bringing it closer to real-world robotics. A feasible future work would be to investigate how our model's prediction can speed up the robotic imitation learning procedure. + +Acknowledgments. We would like to thank Dhiraj Gandhi for his help with the hardware setup. + +# References + +[1] Shuichi Akizuki and Yoshimitsu Aoki. Tactile logging for understanding plausible tool use based on human demonstration. In *British Machine Vision Conference (BMVC)*, 2018. 2 +[2] Samarth Brahmbhatt, Cusuh Ham, Charles C Kemp, and James Hays. Contactdb: Analyzing and predicting grasp contact via thermal imaging. In Conference on Computer Vision and Pattern Recognition, pages 8709-8719, 2019. 1, 2 +[3] Berk Calli, Arjun Singh, Aaron Walsman, Siddhartha Srinivasa, Pieter Abbeel, and Aaron M Dollar. The ycb object and model set: Towards common benchmarks for manipulation research. In International Conference on Advanced Robotics (ICAR), pages 510-517. IEEE, 2015. 2, 3, 8 +[4] Yevgen Chebotar, Ankur Handa, Viktor Makoviychuk, Miles Macklin, Jan Issac, Nathan Ratliff, and Dieter Fox. Closing the sim-to-real loop: Adapting simulation randomization with real world experience. In International Conference on Robotics and Automation (ICRA), pages 8973-8979. IEEE, 2019. 2 +[5] Erwin Coumans and Yunfei Bai. Pybullet, a python module for physics simulation for games, robotics and machine learning. http://pybullet.org, 2016-2019. 4 +[6] Filipe de Avila Belbute-Peres, Kevin Smith, Kelsey Allen, Josh Tenenbaum, and J Zico Kolter. End-to-end differentiable physics for learning and control. In Advances in Neural Information Processing Systems, pages 7178–7189, 2018. 2 +[7] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Conference on Computer Vision and Pattern Recognition, pages 248-255. IEEE, 2009. 4 +[8] Andreas Doumanoglou, Rigas Kouskouridas, Sotiris Malassiotis, and Tae-Kyun Kim. Recovering 6d object pose and predicting next-best-view in the crowd. In Conference on Computer Vision and Pattern Recognition, pages 3583-3592, 2016. 2 +[9] Katerina Fragkiadaki, Pulkit Agrawal, Sergey Levine, and Jitendra Malik. Predictive visual models of physics for playing billiards. In International Conference on Learning Representations, 2016. 2 +[10] Guillermo Garcia-Hernando, Shanxin Yuan, Seungryul Baek, and Tae-Kyun Kim. First-person hand action benchmark with rgb-d videos and 3d hand pose annotations. In Conference on Computer Vision and Pattern Recognition, pages 409-419, 2018. 2 +[11] Georgia Gkioxari, Ross Girshick, Piotr Dólar, and Kaiming He. Detecting and recognizing human-object interactions. In Conference on Computer Vision and Pattern Recognition, pages 8359-8367, 2018. 2 +[12] Saurabh Gupta, Pablo Arbeláez, Ross Girshick, and Jitendra Malik. Aligning 3d models to rgb-d images of cluttered scenes. In Conference on Computer Vision and Pattern Recognition, pages 4731-4740, 2015. 2 +[13] Saurabh Gupta and Jitendra Malik. Visual semantic role labeling. arXiv preprint arXiv:1505.04474, 2015. 2 +[14] Henning Hamer, Juergen Gall, Thibaut Weise, and Luc + +Van Gool. An object-dependent hand pose prior from sparse training data. In Computer Society Conference on Computer Vision and Pattern Recognition, pages 671-678. IEEE, 2010. 2 +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Conference on Computer Vision and Pattern Recognition, pages 770-778. IEEE, 2016. 4 +[16] Yuanming Hu, Jiancheng Liu, Andrew Spielberg, Joshua B Tenenbaum, William T Freeman, Jiajun Wu, Daniela Rus, and Wojciech Matusik. Chainqueen: A real-time differentiable physical simulator for soft robotics. In International Conference on Robotics and Automation (ICRA), pages 6265-6271. IEEE, 2019. 2 +[17] De-An Huang, Minghuang Ma, Wei-Chiu Ma, and Kris M Kitani. How do we use our hands? discovering a diverse set of common grasps. In Conference on Computer Vision and Pattern Recognition, pages 666-675, 2015. 2 +[18] Wonjun Hwang and Soo-Chul Lim. Inferring interaction force from visual information without using physical force sensors. Sensors, 17(11):2455, 2017. 2 +[19] Wadim Kehl, Fausto Milletari, Federico Tombari, Slobodan Ilic, and Nassir Navab. Deep learning of local rgb-d patches for 3d object detection and 6d pose estimation. In European Conference on Computer Vision, pages 205-220. Springer, 2016. 2 +[20] Yi Li, Gu Wang, Xiangyang Ji, Yu Xiang, and Dieter Fox. Deepim: Deep iterative matching for 6d pose estimation. In European Conference on Computer Vision (ECCV), pages 683-698, 2018. 2 +[21] Zongmian Li, Jiri Sedlar, Justin Carpentier, Ivan Laptev, Nicolas Mansard, and Josef Sivic. Estimating 3d motion and forces of person-object interactions from monocular video. In Conference on Computer Vision and Pattern Recognition, pages 8640-8649, 2019. 1, 2 +[22] Tao Liu, Yoshio Inoue, and Kyoko Shibata. Design of low-cost tactile force sensor for 3d force scan. In Sensors, pages 1513-1516. IEEE, 2008. 2 +[23] Roozbeh Mottaghi, Hessam Bagherinezhad, Mohammad Rastegari, and Ali Farhadi. Newtonian scene understanding: Unfolding the dynamics of objects in static images. In Conference on Computer Vision and Pattern Recognition, pages 3521-3529, 2016. 2 +[24] Roozbeh Mottaghi, Mohammad Rastegari, Abhinav Gupta, and Ali Farhadi. “what happens if...” learning to predict the effect of forces in images. In European Conference on Computer Vision, pages 269–285. Springer, 2016. 2 +[25] Tu-Hoa Pham, Abderrahmane Kheddar, Ammar Qammaz, and Antonis A Argyros. Towards force sensing from vision: Observing hand-object interactions to infer manipulation forces. In Conference on Computer Vision and Pattern Recognition, pages 2810-2819, 2015. 2 +[26] Tu-Hoa Pham, Nikolaos Kyriazis, Antonis A Argyros, and Abderrahmane Kheddar. Hand-object contact force estimation from markerless visual tracking. Transactions on Pattern Analysis and Machine Intelligence, 40(12):2883-2896, 2017. 2 +[27] Senthil Purushwalkam, Abhinav Gupta, Danny Kaufman, and Bryan Russell. Bounce and learn: Modeling scene dy + +namics with real-world bounces. In International Conference on Learning Representations, 2019. 2 +[28] Caner Sahin and Tae-Kyun Kim. Category-level 6d object pose recovery in depth images. In European Conference on Computer Vision (ECCV), 2018. 2 +[29] Shuran Song and Jianxiong Xiao. Sliding shapes for 3d object detection in depth images. In European conference on computer vision, pages 634-651. Springer, 2014. 2 +[30] Jonathan Tremblay, Thang To, Balakumar Sundaralingam, Yu Xiang, Dieter Fox, and Stan Birchfield. Deep object pose estimation for semantic robotic grasping of household objects. In Conference on Robot Learning, pages 306-316, 2018. 2 +[31] He Wang, Soren Pirk, Ersin Yumer, Vladimir G Kim, Ozan Sener, Srinath Sridhar, and Leonidas J Guibas. Learning a generative model for multi-step human-object interactions from videos. In Computer Graphics Forum, volume 38, pages 367-378. Wiley Online Library, 2019. 2 +[32] Jiajun Wu, Ilker Yildirim, Joseph J Lim, Bill Freeman, and Josh Tenenbaum. Galileo: Perceiving physical object properties by integrating a physics engine with deep learning. In Advances in Neural Information Processing Systems, pages 127-135, 2015. 2 +[33] Yu Xiang, Tanner Schmidt, Venkatraman Narayanan, and Dieter Fox. Posecnn: A convolutional neural network for 6d object pose estimation in cluttered scenes. In Robotics: Science and Systems (RSS), 2018. 2 +[34] Mark Yatskar, Luke Zettlemoyer, and Ali Farhadi. Situation recognition: Visual semantic role labeling for image understanding. In IEEE Conference on Computer Vision and Pattern Recognition, pages 5534-5542, 2016. 2 \ No newline at end of file diff --git a/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/images.zip b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..20934fc4fbcbb535ee3805a671a7ea4efdf1157b --- /dev/null +++ b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7c60b51d8447c4e308d3423ec071c169bdd1682096b11e8912f0fe10824ef5a +size 573263 diff --git a/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/layout.json b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..344c32bcdc80d01aba251d94616232e21a6361af --- /dev/null +++ b/usetheforcelukelearningtopredictphysicalforcesbysimulatingeffects/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aec5d8a638357e14487605a073e302a3fba031d9b8db5ae83304f18e83925bdf +size 294678 diff --git a/vibevideoinferenceforhumanbodyposeandshapeestimation/f71f992b-2f76-4041-99d8-caac2e8357d2_content_list.json b/vibevideoinferenceforhumanbodyposeandshapeestimation/f71f992b-2f76-4041-99d8-caac2e8357d2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..26545b76d9995228c084ff46d326daa2d36734b4 --- /dev/null +++ b/vibevideoinferenceforhumanbodyposeandshapeestimation/f71f992b-2f76-4041-99d8-caac2e8357d2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9b817abe2420b452ff58b41dfb6631b79353df7d1aa97093af9dc71fed9a9d1 +size 70587 diff --git a/vibevideoinferenceforhumanbodyposeandshapeestimation/f71f992b-2f76-4041-99d8-caac2e8357d2_model.json b/vibevideoinferenceforhumanbodyposeandshapeestimation/f71f992b-2f76-4041-99d8-caac2e8357d2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4006c964ba9ef48b2acb3c398c766dadfce1aeb2 --- /dev/null +++ b/vibevideoinferenceforhumanbodyposeandshapeestimation/f71f992b-2f76-4041-99d8-caac2e8357d2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3609e76bb7004f18fb70285f27bb89197d4b61c9fc09f67e42b06b1489e66d32 +size 90226 diff --git a/vibevideoinferenceforhumanbodyposeandshapeestimation/f71f992b-2f76-4041-99d8-caac2e8357d2_origin.pdf b/vibevideoinferenceforhumanbodyposeandshapeestimation/f71f992b-2f76-4041-99d8-caac2e8357d2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7e218f95cd274c698215ca6fb86a482b9f5a33e6 --- /dev/null +++ b/vibevideoinferenceforhumanbodyposeandshapeestimation/f71f992b-2f76-4041-99d8-caac2e8357d2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f61189af12d49c8b27227752e86231f10b48fe0bcfbcd6c7fc0e77801d52d30 +size 4100714 diff --git a/vibevideoinferenceforhumanbodyposeandshapeestimation/full.md b/vibevideoinferenceforhumanbodyposeandshapeestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..bde2788a636e4de541029cf9598ad765d2f0877a --- /dev/null +++ b/vibevideoinferenceforhumanbodyposeandshapeestimation/full.md @@ -0,0 +1,257 @@ +# VIBE: Video Inference for Human Body Pose and Shape Estimation + +Muhammed Kocabas $^{1,2}$ , Nikos Athanasiou $^{1}$ , Michael J. Black $^{1}$ + +1Max Planck Institute for Intelligent Systems, Tübingen, Germany + +$^{2}$ Max Planck ETH Center for Learning Systems + +{mkocabas,nathanasiou,black}@tue.mpg.de + +![](images/ac963db158362f878f6968cf69140bc25473ce17fd49eb5a33753c70e4cc1d84.jpg) +Figure 1: Given challenging in-the-wild videos, a recent state-of-the-art video-post-estimation approach [30] (top), fails to produce accurate 3D body poses. To address this, we exploit a large-scale motion-capture dataset to train a motion discriminator using an adversarial approach. Our model (VIBE) (bottom) is able to produce realistic and accurate pose and shape, outperforming previous work on standard benchmarks. + +# Abstract + +Human motion is fundamental to understanding behavior. Despite progress on single-image 3D pose and shape estimation, existing video-based state-of-the-art methods fail to produce accurate and natural motion sequences due to a lack of ground-truth 3D motion data for training. To address this problem, we propose "Video Inference for Body Pose and Shape Estimation" (VIBE), which makes use of an existing large-scale motion capture dataset (AMASS) together with unpaired, in-the-wild, 2D keypoint annotations. Our key novelty is an adversarial learning framework that leverages AMASS to discriminate between real human motions and those produced by our temporal pose and shape regression networks. We define a novel temporal network architecture with a self-attention mechanism + +and show that adversarial training, at the sequence level, produces kinematically plausible motion sequences without in-the-wild ground-truth 3D labels. We perform extensive experimentation to analyze the importance of motion and demonstrate the effectiveness of VIBE on challenging 3D pose estimation datasets, achieving state-of-the-art performance. Code and pretrained models are available at https://github.com/mkocabas/VIBE + +# 1. Introduction + +Tremendous progress has been made on estimating 3D human pose and shape from a single image [11, 21, 25, 29, 35, 36, 38, 45, 48]. While this is useful for many applications, it is the motion of the body in the world that tells us about human behavior. As noted by Johansson [28] even a + +few moving point lights on a human body in motion informs us about behavior. Here we address how to exploit temporal information to more accurately estimate the 3D motion of the body from monocular video. While this problem has received over 30 years of study, we may ask why reliable methods are still not readily available. Our insight is that the previous temporal models of human motion have not captured the complexity and variability of real human motions due to insufficient training data. We address this problem here with a new temporal neural network and training approach, and show that it significantly improves 3D human pose estimation from monocular video. + +Existing methods for video pose and shape estimation [30, 53] often fail to produce accurate predictions as illustrated in Fig. 1 (top). A major reason behind this is the lack of in-the-wild ground-truth 3D annotations, which are non-trivial to obtain even for single images. Previous work [30, 53] combines indoor 3D datasets with videos having 2D ground-truth or pseudo-ground-truth keypoint annotations. However, this has several limitations: (1) indoor 3D datasets are limited in the number of subjects, range of motions, and image complexity; (2) the amount of video labeled with ground-truth 2D pose is still insufficient to train deep networks; and (3) pseudo-ground-truth 2D labels are not reliable for modeling 3D human motion. + +To address this, we take inspiration from Kanazawa et al. [29] who train a single-image pose estimator using only 2D keypoints and an unpaired dataset of static 3D human shapes and poses using an adversarial training approach. For video sequences, there already exist in-the-wild videos with 2D keypoint annotations. The question is then how to obtain realistic 3D human motions in sufficient quality for adversarial training. For that, we leverage the large-scale 3D motion-capture dataset called AMASS [41], which is sufficiently rich to learn a model of how people move. Our approach learns to estimate sequences of 3D body shapes poses from in-the-wild videos such that a discriminator cannot tell the difference between the estimated motions and motions in the AMASS dataset. As in [29], we also use 3D keypoints when available. + +The output of our method is a sequence of pose and shape parameters in the SMPL body model format [40], which is consistent with AMASS and the recent literature. Our method learns about the richness of how people appear in images and is grounded by AMASS to produce valid human motions. Specifically, we leverage two sources of unpaired information by training a sequence-based generative adversarial network (GAN) [18]. Here, given the video of a person, we train a temporal model to predict the parameters of the SMPL body model for each frame while a motion discriminator tries to distinguish between real and regressed sequences. By doing so, the regressor is encouraged to output poses that represent plausible motions through + +minimizing an adversarial training loss while the discriminator acts as weak supervision. The motion discriminator implicitly learns to account for the statics, physics and kinematics of the human body in motion using the ground-truth motion-capture (mocap) data. We call our method VIBE, which stands for "Video Inference for Body Pose and Shape Estimation." + +During training, VIBE takes in-the-wild images as input and predicts SMPL body model parameters using a convolutional neural network (CNN) pretrained for single-image body pose and shape estimation [36] followed by a temporal encoder and body parameter regressor used in [29]. Then, a motion discriminator takes predicted poses along with the poses sampled from the AMASS dataset and outputs a real/fake label for each sequence. We implement both the temporal encoder and motion discriminator using Gated Recurrent Units (GRUs) [14] to capture the sequential nature of human motion. The motion discriminator employs a learned attention mechanism to amplify the contribution of distinctive frames. The whole model is supervised by an adversarial loss along with regression losses to minimize the error between predicted and ground-truth keypoints, pose, and shape parameters. + +At test time, given a video, we use the pretrained CNN [36] and our temporal module to predict pose and shape parameters for each frame. The method works for video sequences of arbitrary length. We perform extensive experiments on multiple datasets and outperform all state-of-the-art methods; see Fig. 1 (bottom) for an example of VIBE's output. Importantly, we show that our video-based method always outperforms single-frame methods by a significant margin on the challenging 3D pose estimation benchmarks 3DPW [61] and MPI-INF-3DHP [42]. This clearly demonstrates the benefit of using video in 3D pose estimation. + +In summary, the key contributions in this paper are: First, we leverage the AMASS dataset of motions for adversarial training of VIBE. This encourages the regressor to produce realistic and accurate motions. Second, we employ an attention mechanism in the motion discriminator to weight the contribution of different frames and show that this improves our results over baselines. Third, we quantitatively compare different temporal architectures for 3D human motion estimation. Fourth, we achieve state-of-the-art results on major 3D pose estimation benchmarks. Code and pretrained models are available for research purposes at https://github.com/mkocabas/VIBE. + +# 2. Related Work + +3D pose and shape from a single image. Parametric 3D human body models [4, 40, 47] are widely used as the output target for human pose estimation because they capture the statistics of human shape and provide a 3D mesh that can be used for many tasks. Early work explores "bot + +![](images/2da2c7dab36f7f5b2b3b4f575a99b807768977038c00de2bc6561d5087b70313.jpg) +Figure 2: VIBE architecture. VIBE estimates SMPL body model parameters for each frame in a video sequence using a temporal generation network, which is trained together with a motion discriminator. The discriminator has access to a large corpus of human motions in SMPL format. + +tom up" regression approaches, "top down" optimization approaches, and multi-camera settings using keypoints and silhouettes as input [1, 8, 19, 52]. These approaches are brittle, require manual intervention, or do not generalize well to images in the wild. Bogo et al. [11] propose SMPLify, one of the first end-to-end approaches, which fits the SMPL model to the output of a CNN keypoint detector [50]. Lassner et al. [38] use silhouettes along with keypoints during fitting. Recently, deep neural networks are trained to directly regress the parameters of the SMPL body model from pixels [21, 29, 45, 48, 55, 57]. Due to the lack of in-the-wild 3D ground-truth labels, these methods use weak supervision signals obtained from a 2D keypoint reprojection loss [29, 55, 57], use body/part segmentation as an intermediate representation [45, 48], or employ a human in the loop [38]. Kolotouros et al. [36] combine regression-based and optimization-based methods in a collaborative fashion by using SMPLify in the training loop. At each step of the training, the deep network [29] initializes the SMPLify optimization method that fits the body model to 2D joints, producing an improved fit that is used to supervise the network. Alternatively, several non-parametric body mesh reconstruction methods [37, 51, 59] has been proposed. Varol et al. [59] use voxels as the output body representation. Kolotouros et al. [37] directly regress vertex locations of a template body mesh using graph convolutional networks [33]. Saito et al. [51] predict body shapes using pixel-aligned implicit functions followed by a mesh reconstruction step. Despite capturing the human body from single images, when applied to video, these methods yield jittery, unstable results. + +3D pose and shape from video. The capture of human motion from video has a long history. In early work, Hogg et al. [23] fit a simplified human body model to images features of a walking person. Early approaches also exploit methods like PCA and GPLVMs to learn motion priors from mocap data [46, 58] but these approaches were limited to simple motions. Many of the recent deep learning methods that estimate human pose from video [15, 24, 43, 49, 44] focus on joint locations only. Several methods [15, 24, 49] use + +a two-stage approach to "lift" off-the-shelf 2D keypoints into 3D joint locations. In contrast, Mehta et al. [43, 44] employ end-to-end methods to directly regress 3D joint locations. Despite impressive performance on indoor datasets like Human3.6M [26], they do not perform well on in-the-wild datasets like 3DPW [61] and MPI-INF-3DHP [42]. Several recent methods recover SMPL pose and shape parameters from video by extending SMPLify over time to compute a consistent body shape and smooth motions [6, 25]. Particularly, Arnab et al. [6] show that Internet videos annotated with their version of SMPLify help to improve HMR when used for fine tuning. Kanazawa et al. [30] learn human motion kinematics by predicting past and future frames1. They also show that Internet videos annotated using a 2D keypoint detector can mitigate the need for the in-the-wild 3D pose labels. Sun et al. [53] propose to use a transformer-based temporal model [60] to improve the performance further. They propose an unsupervised adversarial training strategy that learns to order shuffled frames. + +GANs for sequence modeling. Generative adversarial networks GANs [5, 18, 27, 39] have had a significant impact on image modeling and synthesis. Recent works have incorporated GANs into recurrent architectures to model sequence-to-sequence tasks like machine translation [54, 62, 63]. Research in motion modelling has shown that combining sequential architectures and adversarial training can be used to predict future motion sequences based on previous ones [9, 20] or to generate human motion sequences [2]. In contrast, we focus on adversarially refining predicted poses conditioned on the sequential input data. Following that direction, we employ a motion discriminator that encodes pose and shape parameters in a latent space using a recurrent architecture and an adversarial objective taking advantage of 3D mocap data [41]. + +# 3. Approach + +The overall framework of VIBE is summarized in Fig. 2. Given an input video $V = \{I_t\}_{t=1}^T$ of length $T$ , of a sin + +gle person, we extract the features of each frame $I_{t}$ using a pretrained CNN. We train a temporal encoder composed of bidirectional Gated Recurrent Units (GRU) that outputs latent variables containing information incorporated from past and future frames. Then, these features are used to regress the parameters of the SMPL body model at each time instance. + +SMPL represents the body pose and shape by $\Theta$ , which consists of the pose and shape parameters $\theta \in \mathbb{R}^{72}$ and $\beta \in \mathbb{R}^{10}$ respectively. The pose parameters include the global body rotation and the relative rotation of 23 joints in axis-angle format. The shape parameters are the first 10 coefficients of a PCA shape space; here we use the gender-neutral shape model as in previous work [29, 36] Given these parameters, the SMPL model is a differentiable function, $\mathcal{M}(\theta ,\beta)\in \mathbb{R}^{6890\times 3}$ , that outputs a posed 3D mesh. + +Given a video sequence, VIBE computes $\hat{\Theta} = [(\hat{\theta}_1,\dots ,\hat{\theta}_T),\hat{\beta} ]$ where $\hat{\theta}_t$ are the pose parameters at time step $t$ and $\hat{\beta}$ is the single body shape prediction for the sequence. Specifically, for each frame we predict the body shape parameters. Then, we apply average pooling to get a single shape $(\hat{\beta})$ across the whole input sequence. We refer to the model described so far as the temporal generator $\mathcal{G}$ . Then, output, $\hat{\Theta}$ , from $\mathcal{G}$ and samples from AMASS, $\Theta_{real}$ , are given to a motion discriminator, $\mathcal{D}_M$ , in order to differentiate fake and real examples. + +# 3.1. Temporal Encoder + +The intuition behind using a recurrent architecture is that future frames can benefit from past video pose information. This is useful when the pose of a person is ambiguous or the body is partially occluded in a given frame. Here, past information can help resolve and constrain the pose estimate. The temporal encoder acts as a generator that, given a sequence of frames $I_{1}, \ldots, I_{T}$ , outputs the corresponding pose and shape parameters in each frame. A sequence of $T$ frames is fed to a convolutional network, $f$ , which functions as a feature extractor and outputs a vector $f_{i} \in \mathbb{R}^{2048}$ for each frame $f(I_{1}), \ldots, f(I_{T})$ . These are sent to a Gated Recurrent Unit (GRU) layer [14] that yields a latent feature vector $g_{i}$ for each frame, $g(f_{1}), \ldots, g(f_{T})$ , based on the previous frames. Then, we use $g_{i}$ as input to $T$ regressors with iterative feedback as in [29]. The regressor is initialized with the mean pose $\bar{\Theta}$ and takes as input the current parameters $\Theta_{k}$ along with the features $g_{i}$ in each iteration $k$ . Following Kolotouros et al. [36], we use a 6D continuous rotation representation [65] instead of axis angles. + +Overall, the loss of the proposed temporal encoder is composed of 2D $(x)$ , 3D $(X)$ , pose $(\theta)$ and shape $(\beta)$ losses when they are available. This is combined with an adversarial $\mathcal{D}_M$ loss. Specifically the total loss of the $\mathcal{G}$ is: + +$$ +L _ {\mathcal {G}} = L _ {3 D} + L _ {2 D} + L _ {S M P L} + L _ {a d v} \tag {1} +$$ + +where each term is calculated as: + +$$ +L _ {3 D} = \sum_ {t = 1} ^ {T} \| X _ {t} - \hat {X} _ {t} \| _ {2}, +$$ + +$$ +L _ {2 D} = \sum_ {t = 1} ^ {T} \| x _ {t} - \hat {x} _ {t} \| _ {2}, +$$ + +$$ +L _ {S M P L} = \| \beta - \hat {\beta} \| _ {2} + \sum_ {t = 1} ^ {T} \| \theta_ {t} - \hat {\theta} _ {t} \| _ {2}, +$$ + +where $L_{adv}$ is the adversarial loss explained below. + +To compute the 2D keypoint loss, we need the SMPL 3D joint locations $\hat{X}(\Theta) = W\mathcal{M}(\theta, \beta)$ , which are computed from the body vertices with a pretrained linear regressor, $W$ . We use a weak-perspective camera model with scale and translation parameters $[s, t], t \in \mathbb{R}^2$ . With this we compute the 2D projection of the 3D joints $\hat{X}$ , as $\hat{x} \in \mathbb{R}^{j \times 2} = s\Pi(R\hat{X}(\Theta)) + t$ , where $R \in \mathbb{R}^3$ is the global rotation matrix and $\Pi$ represents orthographic projection. + +# 3.2. Motion Discriminator + +The body discriminator and the reprojection loss used in [29] enforce the generator to produce feasible real world poses that are aligned with 2D joint locations. However, single-image constraints are not sufficient to account for sequences of poses. Multiple inaccurate poses may be recognized as valid when the temporal continuity of movement is ignored. To mitigate this, we employ a motion discriminator, $\mathcal{D}_M$ , to tell whether the generated sequence of poses corresponds to a realistic sequence or not. The output, $\hat{\Theta}$ , of the generator is given as input to a multi-layer GRU model $f_{M}$ depicted in Fig. 3, which estimates a latent code $h_i$ at each time step $i$ where $h_i = f_m(\hat{\Theta}_i)$ . In order to aggregate hidden states $[h_i,\dots ,h_T]$ we use self attention [7] elaborated below. Finally, a linear layer predicts a value $\in [0,1]$ representing the probability that $\hat{\Theta}$ belongs to the manifold of plausible human motions. The adversarial loss term that is backpropagated to $\mathcal{G}$ is: + +$$ +L _ {a d v} = \mathbb {E} _ {\Theta \sim p _ {G}} \left[ \left(\mathcal {D} _ {M} (\hat {\Theta}) - 1\right) ^ {2} \right] \tag {2} +$$ + +and the objective for $\mathcal{D}_M$ is: + +$$ +L _ {\mathcal {D} _ {M}} = \mathbb {E} _ {\Theta \sim p _ {R}} \left[ \left(\mathcal {D} _ {M} (\Theta) - 1\right) ^ {2} \right] + \mathbb {E} _ {\Theta \sim p _ {G}} \left[ \mathcal {D} _ {M} (\hat {\Theta}) ^ {2} \right] (3) +$$ + +where $p_R$ is a real motion sequence from the AMASS dataset, while $p_G$ is a generated motion sequence. Since $\mathcal{D}_M$ is trained on ground-truth poses, it also learns plausible body pose configurations, hence alleviating the need for a separate single-frame discriminator [29]. + +Motion Prior (MPoser). In addition to the $\mathcal{D}_M$ , we experiment with a motion prior model, which we call MPoser. + +![](images/3099ca0964916952001cdce6af50b3759bf948ebdaa5d2c4c4d6c4d6ad98f68d.jpg) +Figure 3: Motion discriminator architecture $\mathcal{D}_M$ consists of GRU layers followed by a self attention layer. $\mathcal{D}_M$ outputs a real/fake probability for each input sequence. + +It is an extension of the variational body pose prior model VPoser [47] to temporal sequences. We train MPoser as a sequential VAE [32] on the AMASS dataset to learn a latent representation of plausible human motions. Then, we use MPoser as a regularizer to penalize implausible sequences. The MPoser encoder and decoder consist of GRU layers that output a latent vector $z_{i} \in \mathbb{R}^{32}$ for each time step $i$ . When we employ MPoser, we disable $\mathcal{D}_M$ and add a prior loss $L_{MPoser} = \|z\|_2$ to $L_{\mathcal{G}}$ . + +Self-Attention Mechanism. Recurrent networks update their hidden states as they process input sequentially. As a result, the final hidden state holds a summary of the information in the sequence. We use a self-attention mechanism [7, 10] to amplify the contribution of the most important frames in the final representation instead of using either the final hidden state $h_t$ or a hard-choice pooling of the hidden state feature space of the whole sequence. By employing an attention mechanism, the representation $r$ of the input sequence $\hat{\Theta}$ is a learned convex combination of the hidden states. The weights $a_i$ are learned by a linear MLP layer $\phi$ , and are then normalized using softmax to form a probability distribution. Formally: + +$$ +\phi_ {i} = \phi (h _ {i}), \quad a _ {i} = \frac {\mathrm {e} ^ {\phi_ {i}}}{\sum_ {t = 1} ^ {N} \mathrm {e} ^ {\phi_ {t}}}, \quad r = \sum_ {i = 1} ^ {N} a _ {i} h _ {i}. \tag {4} +$$ + +We compare our dynamic feature weighting with a static pooling schema. Specifically, the features $h_i$ , representing the hidden state at each frame, are averaged and max pooled. Then, those two representations $r_{avg}$ and $r_{max}$ are concatenated to constitute the final static vector, $r$ , used for the $D_m$ fake/real decision. + +# 3.3. Training Procedure + +We use a ResNet-50 network [22] as an image encoder pretrained on single frame pose and shape estimation task [29, 36] that outputs $f_{i} \in \mathbb{R}^{2048}$ . Similar to [30] we precompute each frame's $f_{i}$ and do not update the ResNet-50. We use $T = 16$ as the sequence length with a minibatch size of 32, which makes it possible to train our model on a single Nvidia RTX2080ti GPU. Although, we experimented with $T = [8,16,32,64,128]$ , we chose $T = 16$ as it yields the best results. For the temporal encoder, we use a 2-layer GRU with a hidden size of 1024. The SMPL regressor has 2 fully-connected layers with 1024 neurons each, followed by a final layer that outputs $\hat{\Theta} \in \mathbb{R}^{85}$ , containing pose, shape, and camera parameters. The outputs of the generator are given as input to the $\mathcal{D}_M$ as fake samples along with the ground truth motion sequences as real samples. The motion discriminator architecture is identical to the temporal encoder. For self attention, we use 2 MLP layers with 1024 neurons each and $\tanh$ activation to learn the attention weights. The final linear layer predicts a single fake/real probability for each sample. We also use the Adam optimizer [31] with a learning rate of $5 \times 10^{-5}$ and $1 \times 10^{-4}$ for the $\mathcal{G}$ and $\mathcal{D}_M$ , respectively. Finally, each term in the loss function has different weighting coefficients. We refer the reader to Sup. Mat. for further details. + +# 4. Experiments + +We first describe the datasets used for training and evaluation. Next, we compare our results with previous frame-based and video-based state-of-the-art approaches. We also conduct ablation experiments to show the effect of our contributions. Finally, we present qualitative results in Fig. 4. + +Training. Following previous work [29, 30, 36], we use batches of mixed 2D and 3D datasets. PennAction [64] and PoseTrack [3] are the only ground-truth 2D video datasets we use, while InstaVariety [30] and Kinetics-400 [13] are pseudo ground-truth datasets annotated using a 2D keypoint detector [12, 34]. For 3D annotations, we employ 3D joint labels from MPI-INF-3DHP [42] and Human3.6M [26]. When used, 3DPW and Human3.6M provide SMPL parameters that we use to calculate $L_{SMPL}$ . AMASS [41] is used for adversarial training to obtain real samples of 3D human motion. We also use the 3DPW [61] training set to perform ablation experiments; this demonstrate the strength of our model on in-the-wild data. + +
Models3DPWMPI-INF-3DHPH36M
PA-MPJPE ↓MPJPE ↓PVE ↓Accel ↓PA-MPJPE ↓MPJPE ↓PCK ↑PA-MPJPE ↓MPJPE ↓
Frame-basedKanazawa et al. [29]76.7130.0-37.489.8124.272.956.888
Omran et al. [45]-------59.9-
Pavlakos et al. [48]-------75.9-
Kolotouros et al. [37]70.2------50.1-
Arnab et al. [6]72.2------54.377.8
Kolotouros et al. [36]59.296.9116.429.867.5105.276.441.1-
TemporalKanazawa et al. [30]72.6116.5139.315.2---56.9-
Doersch et al. [16]74.7--------
Sun et al. [53]69.5------42.459.1
VIBE (direct comp.)56.593.5113.427.163.497.789.041.565.9
VIBE51.982.999.123.464.696.689.341.465.6
+ +Table 1: Evaluation of state-of-the-art models on 3DPW, MPI-INF-3DHP, and Human3.6M datasets. VIBE (direct comp.) is our proposed model trained on video datasets similar to [30, 53], while VIBE is trained with extra data from the 3DPW training set. VIBE outperforms all state-of-the-art models including SPIN [36] on the challenging in-the-wild datasets (3DPW and MPI-INF-3DHP) and obtains comparable result on Human3.6M. “—” shows the results that are not available. + +Evaluation. For evaluation, we use 3DPW [61], MPI-INF-3DHP [42], and Human3.6M [26]. We report results with and without the 3DPW training to enable direct comparison with previous work that does not use 3DPW for training. We report Procrustes-aligned mean per joint position error (PA-MPJPE), mean per joint position error (MPJPE), Percentage of Correct Keypoints (PCK) and Per Vertex Error (PVE). We compare VIBE with state-of-the-art single-image and temporal methods. For 3DPW, we report acceleration error $(mm / s^2)$ , calculated as the difference in acceleration between the ground-truth and predicted 3D joints. + +# 4.1. Comparison to state-of-the-art results + +Table 1 compares VIBE with previous state-of-the-art frame-based and temporal methods. VIBE (direct comp.) corresponds to our model trained using the same datasets as Temporal-HMR [30], while VIBE also uses the 3DPW training set. As standard practice, previous methods do not use 3DPW, however we want to demonstrate that using 3DPW for training improves in-the-wild performance of our model. Our models in Table 1 use pretrained HMR from SPIN [36] as a feature extractor. We observe that our method improves the results of SPIN, which is the previous state-of-the-art. Furthermore, VIBE outperforms all previous frame-based and temporal methods on the challenging in-the-wild 3DPW and MPI-INF-3DHP datasets by a significant amount, while achieving results on-par with SPIN on Human3.6M. Note that, Human3.6M is an indoor dataset with a limited number of subjects and minimal background variation, while 3DPW and MPI-INF-3DHP contain challenging in-the-wild videos. + +We observe significant improvements in the MPJPE and PVE metrics since our model encourages temporal pose + +and shape consistency. These results validate our hypothesis that the exploitation of human motion is important for improving pose and shape estimation from video. In addition to the reconstruction metrics, e.g. MPJPE, PA-MPJPE, we also report acceleration error (Table 1). While we achieve smoother results compared with the baseline frame-based methods [29, 36], Temporal-HMR [30] yields even smoother predictions. However, we note that Temporal-HMR applies aggressive smoothing that results in poor accuracy on videos with fast motion or extreme poses. There is a trade-off between accuracy and smoothness. We demonstrate this finding in a qualitative comparison between VIBE and Temporal-HMR in Fig. 5. This figure depicts how Temporal-HMR over-smooths the pose predictions while sacrificing accuracy. Visualizations from alternative viewpoints in Fig. 4 show that our model is able to recover the correct global body rotation, which is a significant problem for previous methods. This is further quantitatively demonstrated by the improvements in the MPJPE and PVE errors. For video results see the GitHub page. + +# 4.2. Ablation Experiments + +Table 2 shows the performance of models with and without the motion discriminator, $\mathcal{D}_M$ . First, we use the original HMR model proposed by [29] as a feature extractor. Once we add our generator, $\mathcal{G}$ , we obtain slightly worse but smoother results than the frame-based model due to lack of sufficient video training data. This effect has also been observed in the Temporal-HMR method [30]. Using $\mathcal{D}_M$ helps to improve the performance of $\mathcal{G}$ while yielding smoother predictions. + +When we use the pretrained HMR from [36], we observe a similar boost when using $\mathcal{D}_M$ over using only $\mathcal{G}$ . We also experimented with MPoser as a strong baseline against + +
3DPW
PA-MPJPE ↓MJPE ↓PVE ↓Accel ↓
Kanazawa et al. [29]73.6120.1142.734.3
Baseline (only G)75.8126.1147.528.3
G + DM72.4116.7132.427.8
Kolotouros et al. [36]60.1102.4129.229.2
Baseline (only G)56.990.2109.528.0
G + MPoser Prior54.187.0103.928.2
G + DM (VIBE)51.982.999.123.4
+ +$\mathcal{D}_M$ . MPoser acts as a regularizer in the loss function to ensure valid pose sequence predictions. Even though, MPoser performs better than using only $\mathcal{G}$ , it is worse than using $\mathcal{D}_M$ . One intuitive explanation for this is that, even though AMASS is the largest mocap dataset available, it fails to cover all possible human motions occurring in in-the-wild videos. VAEs, due to over-regularization attributed to the KL divergence term [56], fail to capture real motions that are poorly represented in AMASS. In contrast, GANs do not suffer from this problem [17]. Note that, when trained on AMASS, MPoser gives $4.5\mathrm{mm}$ PVE on a held out test set, while the frame-based VPoser gives $6.0\mathrm{mm}$ PVE error; thus modeling motion matters. Overall, results shown in Table 1 demonstrate that introducing $\mathcal{D}_M$ improves performance in all cases. Although one may think that the motion discriminator might emphasize on motion smoothness over single pose correctness, our experiments with a pose only, motion only, and both modules revealed that the motion discriminator is capable of refining single poses while producing smooth motion. + +Dynamic feature aggregation in $\mathcal{D}_M$ significantly improves the final results compared to static pooling ( $\mathcal{D}_M$ - concat), as demonstrated in Table 3. The self-attention mechanism enables $\mathcal{D}_M$ to learn how the frames correlate temporally instead of hard-pooling their features. In most of the cases, the use of self attention yields better results. Even with an MLP hidden size of 512, adding one more layer outperforms static aggregation. The attention mechanism is able to produce better results because it can learn a better representation of the motion sequence by weighting features from each individual frame. In contrast, average and max pooling the features produces a rough representation of the sequence without considering each frame in detail. Self-attention involves learning a coefficient for each frame to re-weight its contribution in the final vector $(r)$ producing a more fine-grained output. That validates our intuition that attention is helpful for modeling temporal de + +Table 2: Ablation experiments with motion discriminator $\mathcal{D}_M$ . We experiment with several models using HMR [29] and SPIN [36] as pretrained feature extractors and add our temporal generator $\mathcal{G}$ along with $\mathcal{D}_M$ . $\mathcal{D}_M$ provides consistent improvements over all baselines. + +
ModelPA-MPJPE ↓MPJPE ↓
DM - concat53.785.9
DM - attention [2 layers,512 nodes]54.286.6
DM - attention [2 layers,1024 nodes]51.982.9
DM - attention [3 layers,512 nodes]53.685.3
DM - attention [3 layers,1024 nodes]52.482.7
+ +Table 3: Ablation experiments on self-attention. We experiment with several self-attention configurations and compare our method to a static pooling approach. We report results on the 3DPW dataset with different hidden sizes and numbers of layers of the MLP network. + +pendencies in human motion sequences. + +# 5. Conclusion + +While current 3D human pose methods work well, most are not trained to estimate human motion in video. Such motion is critical for understanding human behavior. Here we explore several novel methods to extend static methods to video: (1) we introduce a recurrent architecture that propagates information over time; (2) we introduce discriminative training of motion sequences using the AMASS dataset; (3) we introduce self-attention in the discriminator so that it learns to focus on the important temporal structure of human motion; (4) we also learn a new motion prior (MPoser) from AMASS and show it also helps training but is less powerful than the discriminator. We carefully evaluate our contributions in ablation studies and show how each choice contributes to our state-of-the-art performance on video benchmark datasets. This provides definitive evidence for the value of training from video. + +Future work should explore using video for supervising single-frame methods by fine tuning the HMR features, examine whether dense motion cues (optical flow) could help, use motion to disambiguate the multi-person case, and exploit motion to track through occlusion. In addition, we aim to experiment with other attentional encoding techniques such as transformers to better estimate body kinematics. + +Acknowledgements: We thank Joachim Tesch for helping with Blender rendering. We thank all Perceiving Systems department members for their feedback and the fruitful discussions. This research was partially supported by the Max Planck ETH Center for Learning Systems and the Max Planck Graduate Center for Computer and Information Science. + +Disclosure: MJB has received research gift funds from Intel, Nvidia, Adobe, Facebook, and Amazon. While MJB is a part-time employee of Amazon, his research was performed solely at, and funded solely by, MPI. MJB has financial interests in Amazon and Meshcapade GmbH. + +![](images/1f9ded7740016a9520ff4e66038587fdd28650d36fcac8b5be3698fb6302e4e3.jpg) +Figure 4: Qualitative results of VIBE on challenging in-the-wild sequences. For each video, the top row shows some cropped images, the middle rows show the predicted body mesh from the camera view, and the bottom row shows the predicted mesh from an alternate view point. + +![](images/ec079ddba80467d771a9b5c9dac3226a5cddf29665a5fc97549de1afaf6d15d9.jpg) +Figure 5: Qualitative comparison between VIBE (top) and Temporal-HMR [30] (bottom). This challenging video contains fast motion, extreme poses, and self occlusion. VIBE produces more accurate poses than Temporal HMR. + +# References + +[1] Ankur Agarwal and Bill Triggs. Recovering 3D human pose from monocular images. In IEEE Transaction on Pattern Analysis and Machine Intelligence, 2006. 3 +[2] Emre Aksan, Manuel Kaufmann, and Otmar Hilliges. Structured prediction helps 3D human motion modelling. In International Conference on Computer Vision, 2019. 3 +[3] Mykhaylo Andriluka, Umar Iqbal, Eldar Insafutdinov, Leonid Pishchulin, Anton Milan, Juergen Gall, and Bernt Schiele. Posetrack: A benchmark for human pose estimation and tracking. In IEEE Conference on Computer Vision and Pattern Recognition, June 2018. 5 +[4] Dragomir Anguelov, Praveen Srinivasan, Daphne Koller, Sebastian Thrun, Jim Rodgers, and James Davis. Scope: Shape completion and animation of people. SIGGRAPH, 2005. 2 +[5] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In International Conference on Machine Learning, 2017. 3 +[6] Anurag Arnab, Carl Doersch, and Andrew Zisserman. Exploiting temporal context for 3D human pose estimation in the wild. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3, 6 +[7] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations, 2015. 4, 5 +[8] Alexandru Balan and Michael J Black. The naked truth: Estimating body shape under clothing. In European Conference on Computer Vision, 2008. 3 +[9] Emad Barsoum, John Kender, and Zicheng Liu. HP-GAN: Probabilistic 3D human motion prediction via GAN. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, June 2018. 3 +[10] Christos Baziotis, Athanasiou Nikolaos, Alexandra Chronopoulou, Athanasia Kolovou, Georgios Paraskevopoulos, Nikolaos Ellinas, Shrikanth Narayanan, and Alexandros Potamianos. NTUA-SLP at SemEval-2018 task 1: Predicting affective content in tweets with deep attentive RNNs and transfer learning. In Proceedings of The International Workshop on Semantic Evaluation. Association for Computational Linguistics, 2018. 5 +[11] Federica Bogo, Angjoo Kanazawa, Christoph Lassner, Peter Gehler, Javier Romero, and Michael J. Black. Keep it SMPL: Automatic estimation of 3D human pose and shape from a single image. In European Conference on Computer Vision, 2016. 1, 3 +[12] Zhe Cao, Tomas Simon, Shih-En Wei, and Yaser Sheikh. Realtime multi-person 2D pose estimation using part affinity fields. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 5 +[13] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 5 +[14] Kyunghyun Cho, Bart van Merrienboer, aglar Glehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using + +rnn encoder-decoder for statistical machine translation. In EMNLP, 2014. 2, 4 +[15] Rishabh Dabral, Anurag Mundhada, Uday Kusupati, Safeer Afaque, and Arjun Jain. Learning 3D human pose from structure and motion. European Conference on Computer Vision, 2018. 3 +[16] Carl Doersch and Andrew Zisserman. Sim2real transfer learning for 3D pose estimation: motion to the rescue. In Advances in Neural Information Processing, 2019. 6 +[17] Partha Ghosh, Mehdi S. M. Sajjadi, Antonio Vergari, Michael Black, and Bernhard Schölkopf. From variational to deterministic autoencoders. In International Conference on Learning Representations, 2020. 7 +[18] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing, 2014. 2, 3 +[19] Kristen Grauman, Gregory Shakhnarovich, and Trevor Darryll. Inferring 3D structure with a statistical image-based shape model. In International Conference on Computer Vision, 2003. 3 +[20] Liang-Yan Gui, Yu-Xiong Wang, Xiaodan Liang, and Jose M. F. Moura. Adversarial geometry-aware human motion prediction. In European Conference on Computer Vision, 2018. 3 +[21] Riza Alp Guler and Iasonas Kokkinos. HoloPose: Holistic 3D human reconstruction in-the-wild. In IEEE Conference on Computer Vision and Pattern Recognition, June 2019. 1, 3 +[22] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision, 2016. 5 +[23] David Hogg. Model-based vision: A program to see a walking person. In Image and Vision Computing, 1983. 3 +[24] Mir Rayat Imtiaz Hossain and James J Little. Exploiting temporal information for 3D human pose estimation. In European Conference on Computer Vision, 2018. 3 +[25] Yinghao Huang, Federica Bogo, Christoph Lassner, Angjoo Kanazawa, Peter V. Gehler, Javier Romero, Ijaz Akhter, and Michael J. Black. Towards accurate marker-less human shape and pose estimation over time. In International Conference on 3DVision, 2017. 1, 3 +[26] Catalin Ionescu, Dragos Papava, Vlad Olaru, and Cristian Sminchisescu. Human3.6M: Large scale datasets and predictive methods for 3D human sensing in natural environments. In IEEE Transaction on Pattern Analysis and Machine Intelligence, 2014. 3, 5, 6 +[27] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 3 +[28] Gunnar Johansson. Visual perception of biological motion and a model for its analysis. In Perception and Psychophysics, 1973. 1 +[29] Angjoo Kanazawa, Michael J. Black, David W. Jacobs, and Jitendra Malik. End-to-end recovery of human shape and pose. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 1, 2, 3, 4, 5, 6, 7 + +[30] Angjoo Kanazawa, Jason Y. Zhang, Panna Felsen, and Jitendra Malik. Learning 3D human dynamics from video. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 2, 3, 5, 6, 8 +[31] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2014. 5 +[32] Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In International Conference on Learning Representations, 2014. 5 +[33] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2017. 3 +[34] Muhammed Kocabas, Salih Karagoz, and Emre Akbas. MultiPoseNet: Fast multi-person pose estimation using pose residual network. In European Conference on Computer Vision (ECCV), 2018. 5 +[35] Muhammed Kocabas, Salih Karagoz, and Emre Akbas. Self-supervised learning of 3D human pose using multi-view geometry. In IEEE Conference on Computer Vision and Pattern Recognition, June 2019. 1 +[36] Nikos Kolotouros, Georgios Pavlakos, Michael J. Black, and Kostas Daniilidis. Learning to reconstruct 3D human pose and shape via model-fitting in the loop. In International Conference on Computer Vision, 2019. 1, 2, 3, 4, 5, 6, 7 +[37] Nikos Kolotouros, Georgios Pavlakos, and Kostas Dani-ilidis. Convolutional mesh regression for single-image human shape reconstruction. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3, 6 +[38] Christoph Lassner, Javier Romero, Martin Kiefel, Federica Bogo, Michael J. Black, and Peter V. Gehler. Unite the People: Closing the loop between 3D and 2D human representations. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 1, 3 +[39] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In Advances in neural information processing systems, 2017. 3 +[40] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J. Black. SMPL: A skinned multiperson linear model. In ACM Trans. Graphics (Proc. SIGGRAPH Asia), 2015. 2 +[41] Naureen Mahmood, Nima Ghorbani, Nikolaus F. Troje, Gerard Pons-Moll, and Michael J. Black. AMASS: Archive of motion capture as surface shapes. In International Conference on Computer Vision, 2019. 2, 3, 5 +[42] Dushyant Mehta, Helge Rhodin, Dan Casas, Pascal Fua, Oleksandr Sotnychenko, Weipeng Xu, and Christian Theobalt. Monocular 3D human pose estimation in the wild using improved CNN supervision. In International Conference on 3DVision, 2017. 2, 3, 5, 6 +[43] Dushyant Mehta, Oleksandr Sotnychenko, Franziska Mueller, Weipeng Xu, Srinath Sridhar, Gerard Pons-Moll, and Christian Theobalt. Single-shot multi-person 3D pose estimation from monocular RGB. In International Conference on 3DVision, 2018. 3 +[44] Dushyant Mehta, Srinath Sridhar, Oleksandr Sotnychenko, Helge Rhodin, Mohammad Shafiei, Hans-Peter Seidel, + +Weipeng Xu, Dan Casas, and Christian Theobalt. VNect: Real-time 3D human pose estimation with a single RGB camera. In SIGGRAPH, July 2017. 3 +[45] Mohamed Omran, Christoph Lassner, Gerard Pons-Moll, Peter V. Gehler, and Bernt Schiele. Neural body fitting: Unifying deep learning and model-based human pose and shape estimation. In International Conference on 3D Vision, 2018. 1, 3, 6 +[46] Dirk Ormoneit, Hedvig Sidenbladh, Michael J. Black, and Trevor Hastie. Learning and tracking cyclic human motion. In Advances in Neural Information Processing. 2001. 3 +[47] Georgios Pavlakos, Vasileios Choutas, Nima Ghorbani, Timo Bolkart, Ahmed A. A. Osman, Dimitrios Tzionas, and Michael J. Black. Expressive body capture: 3D hands, face, and body from a single image. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2, 5 +[48] Georgios Pavlakos, Luyang Zhu, Xiaowei Zhou, and Kostas Daniilidis. Learning to estimate 3D human pose and shape from a single color image. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 1, 3, 6 +[49] Dario Pavllo, Christoph Feichtenhofer, David Grangier, and Michael Auli. 3D human pose estimation in video with temporal convolutions and semi-supervised training. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3 +[50] Leonid Pishchulin, Eldar Insafutdinov, Siyu Tang, Bjöern Andres, Mykhaylo Andriluka, Peter Gehler, and Bernt Schiele. DeepCut: Joint subset partition and labeling for multi person pose estimation. In IEEE Conference on Computer Vision and Pattern Recognition, 2016. 3 +[51] Shunsuke Saito, Zeng Huang, Ryota Natsume, Shigeo Morishima, Angjoo Kanazawa, and Hao Li. PIFu: Pixel-aligned implicit function for high-resolution clothed human digitization. International Conference on Computer Vision, 2019. 3 +[52] Leonid Sigal, Alexandru Balan, and Michael J Black. Combined discriminative and generative articulated pose and non-rigid shape estimation. In Advances in Neural Information Processing, 2008. 3 +[53] Yu Sun, Yun Ye, Wu Liu, Wenpeng Gao, Yili Fu, and Tao Mei. Human mesh recovery from monocular images via a skeleton-disentangled representation. In International Conference on Computer Vision, 2019. 2, 3, 6 +[54] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, 2014. 3 +[55] Jun Kai Vince Tan, Ignas Budvyitis, and Roberto Cipolla. Indirect deep structured learning for 3D human shape and pose prediction. In British Machine Vision Conference, 2017. 3 +[56] Ilya Tolstikhin, Olivier Bousquet, Sylvain Gelly, and Bernhard Scholkopf. Wasserstein auto-encoders. In International Conference on Learning Representations, 2018. 7 +[57] Hsiao-Yu Tung, Hsiao-Wei Tung, Ersin Yumer, and Katerina Fragkiadaki. Self-supervised learning of motion capture. In Advances in Neural Information Processing, 2017. 3 +[58] Raquel Urtasun, David J. Fleet, and Pascal Fua. 3D people tracking with Gaussian process dynamical models. In + +IEEE Conference on Computer Vision and Pattern Recognition, 2006. 3 +[59] Gül Varol, Duygu Ceylan, Bryan Russell, Jimei Yang, Ersin Yumer, Ivan Laptev, and Cordelia Schmid. BodyNet: Volumetric inference of 3D human body shapes. In European Conference on Computer Vision, 2018. 3 +[60] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing, 2017. 3 +[61] Timo von Marcard, Roberto Henschel, Michael Black, Bodo Rosenhahn, and Gerard Pons-Moll. Recovering accurate 3D human pose in the wild using IMUs and a moving camera. In European Conference on Computer Vision, 2018. 2, 3, 5, 6 +[62] Lijun Wu, Yingce Xia, Li Zhao, Fei Tian, Tao Qin, Jianhuang Lai, , and Tie-Yan Liu. Adversarial neural machine translation. In Proceedings of The Asian Conference on Machine Learning, 2018. 3 +[63] Zhen Yang, Wei Chen, Feng Wang, and Bo Xu. Improving neural machine translation with conditional sequence generative adversarial nets. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics, 2018. 3 +[64] Weiyu Zhang, Menglong Zhu, and Konstantinos G Derpanis. From actemes to action: A strongly-supervised representation for detailed action understanding. In International Conference on Computer Vision, 2013. 5 +[65] Yi Zhou, Connelly Barnes, Jingwan Lu, Jimei Yang, and Hao Li. On the continuity of rotation representations in neural networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 4 \ No newline at end of file diff --git a/vibevideoinferenceforhumanbodyposeandshapeestimation/images.zip b/vibevideoinferenceforhumanbodyposeandshapeestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5b9e4b0608b46a77dd2bad8a08c5eb035d285d72 --- /dev/null +++ b/vibevideoinferenceforhumanbodyposeandshapeestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa690dfb30a12eaf872212a48d51e6dcc79f15bdc948c50073a9d4ced5fb6790 +size 720063 diff --git a/vibevideoinferenceforhumanbodyposeandshapeestimation/layout.json b/vibevideoinferenceforhumanbodyposeandshapeestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c150b2e69aea2937d4453487f3257a37818a57df --- /dev/null +++ b/vibevideoinferenceforhumanbodyposeandshapeestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8447622c18d91bec1a17f9a29b1516ffd72805a56293df52036a4c0aa32dade7 +size 371775 diff --git a/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/c86bee7d-0080-48a6-942d-c5713bd2baa2_content_list.json b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/c86bee7d-0080-48a6-942d-c5713bd2baa2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..17ab69e1832913163b1b702cef190c66bbe78643 --- /dev/null +++ b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/c86bee7d-0080-48a6-942d-c5713bd2baa2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bef1f81aa7db6cc8543647e2e24734c941cac8eaf5d1e687b4db9a1dda1601a9 +size 98114 diff --git a/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/c86bee7d-0080-48a6-942d-c5713bd2baa2_model.json b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/c86bee7d-0080-48a6-942d-c5713bd2baa2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..de218e5f626c6c0f18132998ffc644cb6aa7d7f2 --- /dev/null +++ b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/c86bee7d-0080-48a6-942d-c5713bd2baa2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60af96e8e4a281c156c60fc1acacd1dc6d743767ef713774257dd0a18504a00e +size 128843 diff --git a/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/c86bee7d-0080-48a6-942d-c5713bd2baa2_origin.pdf b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/c86bee7d-0080-48a6-942d-c5713bd2baa2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5246348d68c24dce32c33548a750d44434767f9d --- /dev/null +++ b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/c86bee7d-0080-48a6-942d-c5713bd2baa2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21bb32712cb0397b31a353d70b862fdb9d46a6366770eb0bbfd85158cb0f27f1 +size 2638585 diff --git a/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/full.md b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b0d92433fa4ed1af6ae92efa2cb5da1dddae2007 --- /dev/null +++ b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/full.md @@ -0,0 +1,435 @@ +# VOLDOR: Visual Odometry from Log-logistic Dense Optical flow Residuals + +Zhixiang Min Yiding Yang Enrique Dunn Stevens Institute of Technology + +{zmin1,yyang99,edunn}@stevens.edu + +# Abstract + +We propose a dense indirect visual odometry method taking as input externally estimated optical flow fields instead of hand-crafted feature correspondences. We define our problem as a probabilistic model and develop a generalized-EM formulation for the joint inference of camera motion, pixel depth, and motion-track confidence. Contrary to traditional methods assuming Gaussian-distributed observation errors, we supervise our inference framework under an (empirically validated) adaptive log-logistic distribution model. Moreover, the log-logistic residual model generalizes well to different state-of-the-art optical flow methods, making our approach modular and agnostic to the choice of optical flow estimators. Our method achieved top-ranking results on both TUM RGB-D and KITTI odometry benchmarks. Our open-sourced implementation is inherently GPU-friendly with only linear computational and storage growth. + +# 1. Introduction + +Visual odometry (VO) [60, 21, 22] addresses the recovery of camera poses from an input video sequence, which supports applications such as augmented reality, robotics and autonomous driving. Traditional indirect VO [47, 64, 57] methods rely on the geometric analysis of sparse keypoint correspondences to determine multi-view relationships among the input video frames. Moreover, by virtue of relying on local feature detection and correspondence pre-processing modules, indirect methods pose the VO problem as a reprojection-error minimization task. Conversely, direct methods [58, 16, 45], strive to jointly determine a (semi-)dense registration (warping) across images, as well as the parameters of a camera motion model. By virtue of evaluating a dense correspondence field, direct methods strive to minimize photometric error among registered images. While both of these contrasting approaches have been successful in practice, there are important limitations to be addressed. An open problem within indi + +![](images/1bec12d79647ac583ad2f55de2b25eb22ac2a54a9274042ad010e4087cd3ad2f.jpg) +Figure 1: VOLDOR probabilistic graphical model. Optical flow field sequences are modeled as observed variables subject to Fisk-distributed measurement errors. Camera poses, depth map and rigidity maps are modeled as hidden variables. + +![](images/27b39eb194e179f606d8e8264a795885d9388698bfd829a0ea4bec05bc6f3c04.jpg) + +![](images/6b7db1051274a4f98db2d399606b1a80283c9dea18de8aa3c6cbd1a8d7430d0d.jpg) + +rect methods, is how to characterize feature localization error within the context of VO [41, 40, 39, 93], where motion blur, depth occlusions and viewpoint variations may corrupt such estimates. Nevertheless, least squares methods are commonly used under the assumption of zero-mean Gaussian distributed observation errors. On the other hand, the efficacy of direct methods relies on the strict adherence to the small-motion and appearance-constancy assumptions (or on the development of registration models robust to such variations), which speaks to the difficulty of adequately modeling data variability in this context and, in turn, reduces the scope of their applicability. + +Recent developments on optical flow estimation [77, 35] using supervised learning have yielded state-of-the-art performance. However, such performance benefits have not yet permeated to pose-estimation tasks, where standard multiview geometry methods still provide the "gold standard". This work develops a dense indirect framework for monocular VO that takes as input externally computed optical flow from supervised-learning estimators. We have empirically observed that optical flow residuals tend to conform to a log-logistic (i.e. Fisk) distribution model parametrized by the optical flow magnitude. We leverage this insight to pro + +pose a probabilistic framework that fuses a dense optical flow sequence and jointly estimates camera motion, pixel depth, and motion-track confidence through a generalized-EM formulation. Our approach is dense in the sense that each pixel corresponds to an instance of our estimated random variables; it is indirect in the sense that we treat individual pixels as viewing rays within minimal feature-based multi-view geometry models (i.e. P3P for camera pose, 3D triangulation for pixel depth) and implicitly optimize for reprojection error. Starting from a deterministic bootstrap of a camera pose and pixel depths attained from optical flow inputs, we iteratively alternate the inference of depth, pose and track confidence over a batch of consecutive images. + +The advantages of our framework include: 1) We present a modular framework that is agnostic to the optical flow estimator engine, which allows us to take full advantage of recent deep-learning optical flow methods. Moreover, by replacing sparse hand-crafted features inputs by learned dense optical flows, we gain surface information for poorly textured (i.e. feature-less) regions. 2) By leveraging our empirically validated log-logistic residual model, we attain highly accurate probabilistic estimates for our scene depth and camera motion, which do not rely on Gaussian error assumptions. Experiments on the KITTI [25] and TUM RGB-D [76] benchmark have yielded top-ranking performance both on the visual odometry and depth estimation tasks. Our highly parallelizable approach also allows real-time application on commodity GPU-based architectures. + +# 2. Related Works + +Indirect methods. Indirect methods [92, 32, 59, 20, 13, 29] rely on geometric analysis of sparse keypoint correspondences among input video frames, and pose VO problem as a reprojection-error minimization task. VISO [47] employs Kalman filter with RANSAC-based outlier rejection to robustly estimate frame-to-frame motion. PTAM [64] splits tracking and mapping to different threads, and applies expensive bundle adjustment (BA) at the back-end to achieve better accuracy while retaining real-time application. ORBSLAM [56, 57] further introduces a versatile SLAM system with a more powerful back-end with global relocalization and loop closing, allowing large environment applications. + +Direct methods. Direct methods [61, 71, 98, 46, 45, 44, 70, 86] maintain a (semi-)dense model, and estimates the camera motion by finding a warping that minimizes the photometric error w.r.t. video frames. DTAM [58] introduces a GPU-based real-time dense modelling and tracking approach for small workspaces. LSD-SLAM [16] switched to semi-dense model that allows large scale CPU real-time application. DSO [15] builds sparse models and combines a probabilistic model that jointly optimizes for all parameters as well as further integrates a full photometric calibration to achieve current state-of-the-art accuracy. + +Deep learning VO. Recently, deep-learning has shown thriving progress on the visual odometry problem. Boosting VO through geometric priors from learning-based depth predictions has been presented in [89, 52, 79]. Integration of deep-representations into components such as featurepoints, depth maps and optimizers has been presented in [78, 5, 11, 12]. Deep-learning framework that jointly estimate depth, optical flow and camera motion has been presented in [102, 91, 94, 80, 81, 54, 103, 36, 84, 66, 72, 6, 9, 97]. Further adding recurrent neural networks for learning temporal information is presented in [82, 83, 88, 49]. However, deep learning methods are usually less explainable and have difficulty when transferring to unseen dataset or cameras with different calibration. Moreover, the precision of such methods still underperforms the state of the art. + +Deep learning optical flow. Contrary to learning-based monocular depth approaches [23, 28, 27, 96, 31], which develop and impose strong semantic priors, learning for optical flow estimation may be informed by photometric error and achieve better generalization. Recent deep learning works on optical flow estimation [85, 33, 90, 65, 38, 51, 34, 101, 35, 14, 77] have shown satisfying accuracy, robustness and generalization, outperforming traditional methods, especially under challenging conditions such as texture-less regions, motion blur and large occlusions. FlowNet [14] introduced an encoder-decoder convolutional neural network for optical flow. FlowNet2 [35] improved its performance by stacking multiple basic FlowNets. Most recently, PwCNet [77] integrates spatial pyramids, warping and cost volumes into deep optical flow estimation, improving performance and generalization to the current state-of-the-art. + +# 3. Problem Formulation + +Rationale. Optical flow can be seen as a combination of rigid flow, which is relevant to the camera motion and scene structure, along with an unconstrained flow describing general object motion [87]. Our VO method inputs a batch of externally computed optical flow fields and infers the underlying temporally-consistent aforementioned scene structure (depth map), camera motions, as well as pixelwise probabilities for the "rigidness" of each optical flow estimate. Further, we posit the system framework under the supervision of an empirically validated adaptive log-logistic residual model over the end-point-error (EPE) between the estimated rigid flow and the input (observed) flow. + +Geometric Notation. We input a sequence of externally computed (observed) dense optical flow fields $\mathbb{X} = \{X_{t}\mid t = 1,\dots ,t_{N}\}$ , where $X_{t}$ is the optical flow map from image $I_{t - 1}$ to $I_{t}$ , while $X_{t}^{j} = (u_{t}^{j},v_{t}^{j})^{T}$ denotes the optical flow vector of pixel $j$ at time $t$ . We aim to infer the camera poses $\mathbb{T} = \{\pmb {T}_t\mid t = 1,\dots ,t_N\}$ , where $\pmb {T}_t\in SE(3)$ represents the relative motion from time $t - 1$ to $t$ . + +To define a likelihood model relating our observations $\mathbb{X}$ + +![](images/d69ba5c4ccc2328f16c90ad0087a82fd7aaf23508594245a527a8f264c9b475f.jpg) +Figure 2: Iterative estimation workflow. We input externally computed optical flow estimates of a video sequence. Scene depth, camera poses and a rigidity maps are alternatively estimated by enforcing congruence between predicted rigid flow and input flow observations. Estimation is posed as a probabilistic inference task governed by a Fisk-distributed residual model. + +to $\mathbb{T}$ , we introduce two additional (latent) variable types: 1) a depth field $\pmb{\theta}$ defined over $I_0$ ; where we denote $\theta^j$ as the depth value at pixel $j$ , and 2) a rigidity probability map $\boldsymbol{W}_t$ associated to $\pmb{\theta}$ at time $t$ ; while $\mathbb{W} = \{\boldsymbol{W}_t \mid t = 1, \dots, t_N\}$ denotes the set of rigidity maps, and $W_t^j$ denotes the rigidity probability of pixel $j$ at time $t$ . + +Having depth map $\theta$ and rigidity maps $\mathbb{W}$ , we can obtain a rigid flow $\xi_t(\theta^j)$ by applying the rigid transformation $\mathbb{T}$ to the point cloud associated with $\theta$ , conditioned on $\mathbb{W}$ . Assuming $T_0 = I$ , we let $\pi_t(\theta^j)$ denote the pixel coordinate of projecting the 3D point associated with $\theta^j$ into the camera image plane at time $t$ using given camera poses $\mathbb{T}$ , by + +$$ +\boldsymbol {\pi} _ {t} \left(\theta^ {j}\right) = \boldsymbol {K} \left(\prod_ {i = 0} ^ {t} \boldsymbol {T} _ {i}\right) \theta^ {j} \boldsymbol {K} ^ {- 1} \left[ x _ {j} y _ {j} 1 \right] ^ {T} \tag {1} +$$ + +where $\pmb{K}$ is the camera intrinsic and $x_{j}, y_{j}$ are the image coordinates of pixel $j$ . Hence, rigid flow can be defined as $\pmb{\xi}_{t}(\theta^{j}) = \pmb{\pi}_{t}(\theta^{j}) - \pmb{\pi}_{t-1}(\theta^{j})$ . + +Mixture Likelihood Model We model the residuals between observation flow and rigid flow with respect to the continuous rigidity probability $W_{t}^{j}$ . + +$$ +\begin{array}{l} P \left(\boldsymbol {X} _ {t} ^ {\boldsymbol {\pi} _ {t - 1} (\theta^ {j})} \mid \theta^ {j}, \boldsymbol {T} _ {t}, W _ {t} ^ {j}; \boldsymbol {T} _ {1} \dots \boldsymbol {T} _ {t - 1}\right) \\ = \left\{ \begin{array}{l l} \rho \left(\boldsymbol {\xi} _ {t} \left(\theta^ {j}\right) \mid \mid \boldsymbol {X} _ {t} ^ {\pi_ {t - 1} \left(\theta^ {j}\right)}\right) & \text {i f} W _ {t} ^ {j} = 1 \\ \mu \left(\boldsymbol {X} _ {t} ^ {\pi_ {t - 1} \left(\theta^ {j}\right)}\right) & \text {i f} W _ {t} ^ {j} = 0 \end{array} \right. \tag {2} \\ \end{array} +$$ + +where the probability density function $\rho(\cdot ||\cdot)$ represents the probability for having the rigid flow $\xi_t(\theta^j)$ under the observation flow of $X_t^{\pi_{t-1}(\theta^j)}$ , and $\mu(\cdot)$ is a uniform distribution whose density varies with $X_t^{\pi_{t-1}(\theta^j)}$ . We will define these two functions in §4. Henceforth, when modeling the probability of $X_t$ , we only write down $T_t$ in the conditional probability, although the projection also depends + +on preceding camera poses $T_{1},\dots ,T_{t - 1}$ , that we assume fixed and for which $\pmb{X}_{t}$ inherently does not contain any information. Moreover, jointly modeling for all previous camera poses along with $\pmb{X}_{t}$ would bias them as well as increase the computational complexity. In the following paragraph, we will denote Eq. (2) simply as $P(X_{t}^{\pi_{t - 1}(\theta^{j})}|$ $\theta^j,T_t,W_t^j)$ . At this point, our visual odometry problem can be modeled as a maximum likelihood estimation problem + +$$ +\begin{array}{l} \underset {\boldsymbol {\theta}, \mathbb {T}, \mathbb {W}} {\operatorname {a r g m a x}} P (\mathbb {X} \mid \boldsymbol {\theta}, \mathbb {T}, \mathbb {W}) \\ = \underset {\boldsymbol {\theta}, \mathbb {T}, \mathbb {W}} {\operatorname {a r g m a x}} \prod_ {t} \prod_ {j} P \left(\boldsymbol {X} _ {t} ^ {\pi_ {t - 1} \left(\theta^ {j}\right)} \mid \theta^ {j}, \boldsymbol {T} _ {t}, W _ {t} ^ {j}\right) \tag {3} \\ \end{array} +$$ + +Furthermore, we promote spatial consistency among both our dense hidden variables $\theta$ and $\mathbb{W}$ , through different mechanisms described in §5.1. + +# 4. Fisk Residual Model + +The choice of an observation residual model plays a critical role for accurate statistical inference from a reduced number of observations [30, 37], where in our case, a residual is defined as the end-point error in pixels between two optical flow vectors. + +In practice, hierarchical optical flow methods (i.e. relying on recursive scale-space analysis) [77, 50] tend to amplify estimation errors in proportion to the magnitude of the pixel flow vector. In light of this, we explore an adaptive residual model determining the residuals distribution w.r.t. the magnitude of optical flow observations. In Figure 3, we empirically analyzed the residual distribution of multiple leading optical flow methods [77, 35, 50, 67] w.r.t. groundtruth. We fit the empirical distribution to five different analytic models, and found the Fisk distribution to yield the most congruent shape over all flow magnitudes (See Figure 3 overlay). To quantify the goodness of fit, in + +![](images/687ad607e7eba2ac5070578bfe0fd070113d3dea52232610fbeea1e970b46bd4.jpg) +Figure 3: Empirical residual distribution. Optical flow EPE residual over flow magnitude for PWC-Net outputs on the entire groundtruth data for the KITTI [25] and Sintel [7] datasets. + +Figure 4 (a), we posit K-S test results [3], which quantify the supremum distance (D value) of the CDF between our empirical distribution and a reference analytic distribution. + +Hence, given $\pmb{v}_{ob} = \pmb{X}_t^{\pi_{t-1}(\theta^j)}$ , we model the probability of $\pmb{v}_{rig} = \pmb{\xi}_t(\theta^j)$ matching the underlying groundtruth, as + +$$ +\rho \left(\boldsymbol {v} _ {r i g} \| \boldsymbol {v} _ {o b}\right) = \mathcal {F} \left(\left\| \boldsymbol {v} _ {r i g} - \boldsymbol {v} _ {o b} \right\| _ {2} ^ {2}; A (\boldsymbol {v} _ {o b}), B (\boldsymbol {v} _ {o b})\right), \tag {4} +$$ + +where the functional form for the PDF of the Fisk distribution $\mathcal{F}$ is given by + +$$ +\mathcal {F} (x; \alpha , \beta) = \frac {(\beta / \alpha) (x / \alpha) ^ {\beta - 1}}{(1 + (x / \alpha) ^ {\beta}) ^ {2}} \tag {5} +$$ + +From Figure 4 (b), we further determine the parameters of Fisk distribution. Since a clear linear correspondence is shown in the figure, instead of using a look-up table, we applied the fitted function to find the parameters, as + +$$ +A \left(\boldsymbol {v} _ {\boldsymbol {o b}}\right) = a _ {1} e ^ {a _ {2} \| \boldsymbol {v} _ {\boldsymbol {o b}} \| _ {2}} \tag {6} +$$ + +$$ +B \left(\boldsymbol {v} _ {\boldsymbol {o b}}\right) = b _ {1} \| \boldsymbol {v} _ {\boldsymbol {o b}} \| _ {2} + b _ {2} \tag {7} +$$ + +where $a_1, a_2$ and $b_1, b_2$ are learned parameters depending on the optical flow estimation method. + +Next, we model the outlier likelihood function $\mu(\cdot)$ . The general approach [53, 99] is to assign outliers with uniform distribution to improve the robustness. In our work, for utilizing the prior given by the observation flow, we further let the density of uniform distribution be a function $\mu(\cdot)$ over the observation flow vector. + +$$ +\mu (\boldsymbol {v} _ {\boldsymbol {o b}}) = \mathcal {F} \left(\lambda^ {2} \| \boldsymbol {v} _ {\boldsymbol {o b}} \| _ {2} ^ {2}; A (\boldsymbol {v} _ {\boldsymbol {o b}}), B (\boldsymbol {v} _ {\boldsymbol {o b}})\right) \tag {8} +$$ + +where $\lambda$ is a hyper-parameter adjusting the density, which is also the strictness for choosing inliers. The numerical interpretation of $\lambda$ is the optical flow percentage EPE for indistinguishable outlier $(W_{t}^{j} = 0.5)$ . Hence, flows with different magnitudes can be compared under a fair metrics to be selected as an inlier. + +![](images/63f8b8391d720006d8816c691efd13e1abcd2c963cb672656bf3d946c0e0832b.jpg) +(a) K-S Test + +![](images/4196f6d3c518ae4e63725be2094c10e7760f22bb2a56af0f70f1478324767998.jpg) + +![](images/0b97d594831c595219a4a428f452cb2003187344a9acd4f4b82548b5a9af173c.jpg) +(b) Parameterization of $\alpha, \beta$ +Figure 4: Fitness quantification and model parameterization. (a) Results of KS-test [3] over four optical flow methods with five distributions (lower D values indicate better fit). (b) $\alpha, \beta$ are estimated from KITTI empirical data using, respectively, log-linear and linear regression, as described in Eq. (6), (7). + +# 5. Inference + +In this section, we introduce our iterative inference framework which alternately optimizes depth map, camera poses and rigidity maps. + +# 5.1. Depth and Rigidness Update + +Generalized Expectation-Maximization (GEM). We infer depth $\theta$ and its rigidity $\mathbb{W}$ over time while assuming fixed known camera pose $\mathbb{T}$ . We approximate the true posterior $P(\mathbb{X} \mid \theta, \mathbb{W}; \mathbb{T})$ through a GEM framework [73]. In this section, we will denote Eq. (2) as $P(\mathbb{X} \mid \theta, \mathbb{W})$ , where the fixed $\mathbb{T}$ is omitted. We approximate the intractable real posterior $P(\theta, \mathbb{W} \mid \mathbb{X})$ with a restricted family of distributions $q(\theta, \mathbb{W})$ , where $q(\theta, \mathbb{W}) = \prod_{j} q(\theta^{j}) \prod_{t} q(W_{t})$ . For tractability, $q(\theta^{j})$ is further constrained to the family of Kronecker delta functions $q(\theta^{j}) = \delta(\theta^{j} = \theta^{j*})$ , where $\theta^{j*}$ is a parameter to be estimated. Moreover, $q(W_{t})$ inherits the smoothness defined on the rigidity map $W_{t}$ in Eq. (11), which is proved in [73] as minimizing KL divergence between the variational distribution and the true posterior. In the M step, we seek to estimate an optimal value for $\theta^{j}$ given an estimated PDF on $W_{t}^{j}$ . Next, we describe our choice for the estimators used for this task. + +Maximum Likelihood Estimator (MLE). The standard definition of the MLE for our problem is given by + +$$ +\theta_ {\mathrm {M L E}} ^ {j} = \underset {\theta^ {j *}} {\operatorname {a r g m a x}} \sum_ {t} q \left(W _ {t} ^ {j}\right) \log P \left(\boldsymbol {X} _ {t} ^ {\pi_ {t - 1} \left(\theta^ {j}\right)} \mid \theta^ {j} = \theta^ {j *}, W _ {t} ^ {j}\right) \tag {9} +$$ + +where $q(W_{t}^{j})$ is the estimated distribution density given by E step. However, we empirically found the MLE criteria to be overly sensitive to inaccurate initialization. More specifically, we bootstrap our depth map using only the first optical flow and use its depth values to sequentially bootstrap subsequent camera poses (more details in §5.2 and §5.3). Hence, for noisy/inaccurate initialization, using MLE for estimate refinement will impose high selectivity pressure on + +![](images/6cfaf802c7659301e4f7459dc602bb66eba06af6a39058e45b95e0c42e3747d2.jpg) +Figure 5: Model for depth inference. The image 2D field is broken into alternatively directed 1D chains, while depth values are propagated through each chain. Hidden Markov chain smoothing is imposed on the rigidity maps. + +the rigidity probabilities $\mathbb{W}$ , favoring a reduced number of higher-accuracy initialization. Given the sequential nature of our image-batch analysis, this tends to effectively reduce the set of useful down-stream observations used to estimate subsequent cameras. + +Maximum Inlier Estimation (MIE). To reduce the bias caused by initialization and sequential updating, we relax the MLE criteria to the following MIE criteria, + +$$ +\theta_ {\text {M I E}} ^ {j} = \underset {\theta^ {j *}} {\operatorname {a r g m a x}} \sum_ {t} q \left(W _ {t} ^ {j} = 1\right) \log \frac {P \left(\boldsymbol {X} _ {t} ^ {\pi_ {t - 1} (\theta^ {j})} \mid \theta^ {j} = \theta^ {j *} , W _ {t} ^ {j} = 1\right)}{\sum_ {W _ {t} ^ {j}} P \left(\boldsymbol {X} _ {t} ^ {\pi_ {t - 1} (\theta^ {j})} \mid \theta^ {j} = \theta^ {j *} , W _ {t} ^ {j}\right)} \tag {10} +$$ + +which finds a depth maximizing for the rigidity (inlier selection) map $\mathbb{W}$ . We provide experimental details regarding the MIE criteria in §6.3. + +We optimize $\theta_{\mathrm{MIE}}^j$ through a sampling-propagation scheme as shown in Fig. 5. A randomly sampled depth $\theta_{smp}^j$ is compared with the previous depth value $\theta_{prev}^j$ together with a value propagated from the previous neighbor $\theta_{nbr}^{j - 1}$ . Then, $\theta_{\mathrm{MIE}}^j$ will be updated to the value of the best estimation among these three options. The updated $\theta_{\mathrm{MIE}}^j$ will further be propagated to the neighbor pixel $j + 1$ . + +Updating the Rigidness Maps. We adopt a scheme where the image is split into rows and columns, reducing a 2D image to several 1D hidden Markov chains, and a pairwise smoothness term is posed on the rigidity map + +$$ +P \left(W _ {t} ^ {j} \mid W _ {t} ^ {j - 1}\right) = \left( \begin{array}{c c} \gamma & 1 - \gamma \\ 1 - \gamma & \gamma \end{array} \right) \tag {11} +$$ + +where $\gamma$ is a transition probability encouraging similar neighboring rigidity. In the E step, we update rigidity maps $\mathbb{W}$ according to $\theta$ . As the smoothness defined in Eq. (11), the forward-backward algorithm is used for inferring $\mathbb{W}$ in the hidden Markov chain. + +$$ +q \left(W _ {t} ^ {j}\right) = \frac {1}{A} m _ {f} \left(W _ {t} ^ {j}\right) m _ {b} \left(W _ {t} ^ {j}\right) \tag {12} +$$ + +where $A$ is a normalization factor while $m_{f}(W_{t}^{j})$ and $m_{b}(W_{t}^{j})$ are the forward and backward message of $W_{t}^{j}$ + +computed recursively as + +$$ +m _ {f} \left(W _ {t} ^ {j}\right) = P _ {e m s} ^ {t, j} \sum_ {W _ {t} ^ {j - 1}} m _ {f} \left(W _ {t} ^ {j - 1}\right) P \left(W _ {t} ^ {j} \mid W _ {t} ^ {j - 1}\right) \tag {13} +$$ + +$$ +m _ {b} \left(W _ {t} ^ {j}\right) = \sum_ {W _ {t} ^ {j + 1}} m _ {b} \left(W _ {t} ^ {j + 1}\right) P _ {e m s} ^ {t, j + 1} P \left(W _ {t} ^ {j + 1} \mid W _ {t} ^ {j}\right) \tag {14} +$$ + +where $P_{ems}^{j}$ is the emission probability refer to Eq. (2), $P_{ems}^{t,j} = P(\pmb{X}_{t}^{\pi_{t-1}(\theta^{j})} \mid \theta^{j}, W_{t}^{j}; \mathbb{T})$ . + +# 5.2. Pose Update + +We update camera poses while assuming fixed known depth $\theta$ and rigidity maps $\mathbb{W}$ . We use the optical flow chains in $\mathbb{X}$ to determine the 2D projection of any given 3D point extracted from our depth map. Since we aim to estimate relative camera motion we express scene depth relative to the camera pose at time $t - 1$ and use the attained 3D-2D correspondences to define a dense PnP instance [100]. We solve this instance by estimating the mode on an approximated posterior distribution given by Monte-Carlo sampling of the pose space through (minimal) P3P instances. The robustness to outliers correspondences and the independence from initialization provided by our method is crucial to bootstrapping our visual odometry system §5.3, where the camera pose need to be estimated from scratch with an uninformative rigidity map (all one). + +The problem can be written down as maximum a posterior (MAP) by + +$$ +\underset {\mathbb {T}} {\operatorname {a r g m a x}} P (\mathbb {T} \mid \mathbb {X}; \boldsymbol {\theta}, \mathbb {W}) \tag {15} +$$ + +Finding the optimum camera pose is equal to compute the maximum posterior distribution $P(\mathbb{T} \mid \mathbb{X}; \boldsymbol{\theta}, \mathbb{W})$ , which is not tractable since it requires to integral over $\mathbb{T}$ to compute $P(\mathbb{X})$ . Thus, we use a Monte-Carlo based approximation, where for each depth map position $\theta^{j_1}$ we randomly sample two additional distinct positions $\{j_2, j_3\}$ to form a 3-tuple $\Theta^g = \{\theta^{j_1}, \theta^{j_2}, \theta^{j_3}\}$ , with associated rigidity values $\mathbb{W}_t^g = \{\bar{W}_t^{j_1}, W_t^{j_2}, W_t^{j_3}\}$ , to represent the $g^{th}$ group. Then the posterior can be approximated as + +$$ +\begin{array}{l} P (\mathbb {T} \mid \mathbb {X}; \boldsymbol {\theta}, \mathbb {W}) \\ \approx \prod_ {t} \left[ \frac {1}{S} \sum_ {g} ^ {S} P \left(\boldsymbol {T} _ {t} \mid \boldsymbol {X} _ {t} ^ {\pi_ {t - 1} (\Theta^ {g})}; \boldsymbol {\Theta} ^ {g}, \mathbb {W} _ {t} ^ {g}\right) \right] \tag {16} \\ \end{array} +$$ + +where $S$ is the total number of groups. Although the posterior $P(\pmb{T}_t \mid \pmb{X}_t^{\pi_{t-1}(\Theta^g)}; \Theta^g, \mathbb{W}_t^g)$ is still not tractable, using 3 pairs of 3D-2D correspondences, PnP reaches its minimal form of P3P, which can be solved efficiently using the P3P algorithm [24, 48, 55, 42]. Hence we have + +$$ +\hat {\boldsymbol {T}} _ {t} ^ {g} = \phi \left(\left(\prod_ {i = 0} ^ {t - 1} \boldsymbol {T} _ {i}\right) \Theta^ {g} \boldsymbol {K} ^ {- 1} \left[ x _ {g} y _ {g} 1 \right] ^ {T}, \pi_ {t - 1} \left(\Theta^ {g}\right) + X _ {t} ^ {\pi_ {t - 1} \left(\Theta^ {g}\right)}\right) \tag {17} +$$ + +![](images/b29b89f786d8ba27a7244773a42a275b0e931058255dec1f521609228a3ba1be.jpg) +Figure 6: Pose MAP approximation via meanshift-based mode search. Each 3D-2D correspondence is part of a unique minimal P3P instance, constituting a pose sample that is weighted by the rigidity map. We map samples to $\mathfrak{se}(3)$ and run meanshift to find the mode. +Table 1: The VOLDOR algorithm. + +where $\phi (\cdot ,\cdot)$ denotes the P3P solver, for which we use AP3P [42]. The first input argument indicates the 3D coordinates of selected depth map pixels at time $t - 1$ obtained by combining previous camera poses, while the second input argument is their 2D correspondences at time $t$ , obtained using optical flow displacement. Hence, we use a tractable variational distribution $q(T_{t}^{g})$ to approximate its true posterior. + +$$ +q \left(\boldsymbol {T} _ {t} ^ {g}\right) \sim \mathcal {N} \left(\hat {\boldsymbol {T}} _ {t} ^ {g}, \boldsymbol {\Sigma}\right) \tag {18} +$$ + +where $q(\pmb{T}_t^g)$ is a normal distribution with mean $\hat{T}_t^g$ and predefined fixed covariance matrix $\pmb{\Sigma}$ for simplicity. Furthermore, we weight each variational distribution with $\| \mathbb{W}_t^g\| = \prod_{W_i\in \mathbb{W}_t^g}W_i$ , such that potential outliers indicated by rigidity maps can be excluded or down weighted. Then, the full posterior can be approximated as + +$$ +P (\mathbb {T} \mid \mathbb {X}; \boldsymbol {\theta}, \mathbb {W}) \approx \prod_ {t} \left[ \frac {1}{\sum_ {g} \| \mathbb {W} _ {t} ^ {g} \|} \sum_ {g} \| \mathbb {W} _ {t} ^ {g} \| q \left(\boldsymbol {T} _ {\boldsymbol {t}} ^ {\boldsymbol {g}}\right) \right] \tag {19} +$$ + +We have approximated the posterior $P(\mathbb{T} \mid \mathbb{X}; \boldsymbol{\theta}, \mathbb{W})$ with a weighted combination of $q(\pmb{T}_t^g)$ . Solving for the optimum $\pmb{T}_t^*$ on the posterior equates to finding the mode of the posterior. Since we assume all $q(\pmb{T}_t^g)$ to share the same covariance structure, mode finding on this distribution equates to applying meanshift [10] with a Gaussian kernel of covariance $\pmb{\Sigma}$ . Note that since $\hat{T}_t^g$ lies in $SE(3)$ [4], while meanshift is applied to vector space, an obtained a mode can not be guaranteed to lie in $SE(3)$ . Thus, poses $\hat{T}_t^g$ are first converted to a 6-vector $\pmb{p} = \log (\hat{T}_t^g) \in \mathfrak{se}(3)$ in Lie algebra through logarithm mapping, and meanshift is applied to the 6-vector space. + +Input: Optical flow sequence $\mathbb{X} = \{\pmb {X}_t\mid t = 1\dots t_N\}$ +Output: Camera poses $\mathbb{T} = \{\pmb {T}_t\mid t = 1\dots t_N\}$ Depth map $\theta$ of the first frame +Initialize $\mathbb{W} = \{\pmb {W}_t\mid t = 1\dots t_N\}$ all to one. Initialize $T_{1}$ using epipolar geometry from $X_{1}$ +Triangulate $\theta$ from $T_{1}$ and $X_{1}$ +Repeat until $\mathbb{T}$ converges For $i = 1\dots t$ Update $T_{i}$ according to Eq. (19) Update and smooth W according to Eq. (12) Update $\theta$ according to Eq. (10) Update W according to Eq. (12) w/o smoothing + +# 5.3. Algorithm Integration + +We now describe the integrated workflow of our visual odometry algorithm, which we denote VOLDOR. Per Table 1, our input is a sequence of dense optical flows $\mathbb{X} = \{X_{t}\mid t = 1\dots t_{N}\}$ , and our output will be the camera poses of each frame $\mathbb{T} = \{T_t\mid t = 1\dots t_N\}$ as well as the depth map $\theta$ of the first frame. Usually, 4-8 optical flows per batch are used. Firstly, VOLDOR initializes all $\mathbb{W}$ to one and $T_{1}$ is initialized from epipolar geometry estimated from $X_{1}$ using a least median of squares estimator [68] or, alternatively, from previous estimates if available (i.e. overlapping consecutive frame batches). Then, $\theta$ is obtained from two-view triangulation using $T_{1}$ and $X_{1}$ . Next, the optimization loop between camera pose, depth map and rigidity map runs until convergence, usually within 3 to 5 iterations. Note we did not smooth the rigidity map before updating camera poses to prevent loss of fine details indicating the potential high-frequency noise in the observations. + +# 6. Experiments + +# 6.1. KITTI Benchmark + +We tested on the KITTI odometry benchmark [25] of a car driving at urban and highway environments. We use PWC-Net [77] as our external dense optical flow input. The sliding window size is set to 6 frames. We set $\lambda$ in Eq. (8) to $0.15$ , $\gamma$ in Eq. (11) to 0.9. The Gaussian kernel covariance matrix $\Sigma$ in Eq. (18) is set to diagonal, scaled to 0.1 and 0.004 at the dimensions of translation and rotation respectively. The hyper-parameters for the Fisk residual model are $a_1 = 0.01$ , $a_2 = 0.09$ , $b_1 = -0.0022$ , $b_2 = 1.0$ , obtained from Figure 3. Finally, absolute scale is estimated from ground plane by taking the mode of pixels with surface normal vector near perpendicular. More details of ground plane estimation are provided in the appendix. + +Table 2 and Figure 7 are our results on the KITTI odometry training set sequences 0-10. We picked VISO2 [26] + +![](images/ff70301b266a65b06126cd8667eb2de075e0f47d7b4af6678af1171ea359f13b.jpg) +Figure 7: Results on KITTI sequences 00, 01, 05, 07. Monocular VOLDOR does not deploy any mapping, bundle adjustment or loop closure. Scale is estimated assuming fixed and known camera height from the ground. + +![](images/d7d8a12e8d9adea8cdc4c48d8396bf24dad4cc22c36936a917c0cc65d4e3d61a.jpg) + +![](images/9efe5905e0fa74790cf255e2d8666c53d1592f011388d33d15d4312f8f8a2573.jpg) + +![](images/6166406c284701e5073842dd48c9a28e009bb5b8ee8a480729351d4fba1bf9ea.jpg) + +
VISO2-MMLM-SFMVOLDOR
SequenceTrans. (%)Rot. (deg/m)Trans. (%)Rot. (deg/m)Trans. (%)Rot. (deg/m)
0012.530.02602.040.00481.090.0039
0128.090.0641--2.310.0037
023.980.01231.500.00351.190.0042
034.090.02063.370.00211.460.0034
042.580.01621.430.00231.130.0049
0514.680.03792.190.00381.150.0041
066.730.01952.090.00811.130.0045
0714.950.0558--1.630.0054
0811.630.02152.370.00441.500.0044
094.940.01401.760.00471.610.0039
1023.360.03482.120.00851.440.0043
Avg.10.850.02492.030.00451.320.0042
+ +Table 2: Results on KITTI training sequences 0-10. The translation and rotation errors are averaged over all sub-sequences of length from 100 meters to 800 meters with 100 meter steps. + +
MethodTrans. (%)Rot. (deg/m)
VISO2-M [26]11.940.0234
MLM-SFM [74] [75]2.540.0057
PbT-M2 [19] [17] [18]2.050.0051
BVO [62]1.760.0036
VOLDOR (Ours)1.650.0050
VO3pt* [2] [1]2.690.0068
VISO2-S* [26]2.440.0114
eVO* [69]1.760.0036
S-PTAM* [63] [64]1.190.0025
ORB-SLAM2* [57]1.150.0027
+ +and MLM-SFM [74] [75] as our baselines, whose scales are also estimated from ground height. Table 3 compares our result with recent popular methods on KITTI test set sequences 11-21, where we download from KITTI odometry official ranking board. As the results show, VOLDOR has achieved top-ranking accuracy under KITTI dataset among monocular methods. + +Table 4 shows our depth map quality on the KITTI stereo benchmark. We masked out foreground moving object as well as aligned our depth with groundtruth to solve scale ambiguity. We separately evaluated the depth quality for + +Table 3: Results on KITTI odometry testing sequences 11-21. * indicates the method is based on stereo input. + +
MethodsDensityEPE / pxbg-outlier
GC-Net [43]100.00%0.72.21%
PSMNet [8]100.00%0.61.86%
GA-Net-15 [95]100.00%0.51.55%
Ours (Wj>5)27.07%0.56161.47%
Ours (Wj>4)37.87%0.67112.05%
Ours (Wj>3)49.55%0.73422.56%
Ours (Wj>2)62.50%0.81353.17%
Ours (Wj>1)78.18%0.92744.17%
Ours (Wj>0)100.00%1.23045.82%
+ +Table 4: Results on KITTI stereo benchmark. A pixel is considered as outlier if disparity EPE is $> {3px}$ and $> 5\% .{W}^{j}$ denotes the sum of pixel rigidity ${W}^{j} = \mathop{\sum }\limits_{t}{W}_{t}^{j}$ . + +
SequenceORB-SLAM2 +(RGB-D)DVO-SLAM +(RGB-D)DSO +(Mono)Ours +(Mono)
fr1/desk0.01630.01850.01680.0133
fr1/desk20.01620.02380.01880.0150
fr1/room0.01020.01170.01080.0090
fr2/desk0.00450.00680.00480.0053
fr2.xyz0.00340.00550.00250.0034
fr3/office0.00460.01020.00500.0045
fr3/nst0.00790.00730.00870.0071
+ +Table 5: Results on TUM RGB-D dataset. The values are translation RMSE in meters. + +different rigidity probabilities, where $W^{j} = \sum_{t}W_{t}^{j}$ . The EPE of PSMNet [8], GC-Net [43] and GA-Net [95] are measured on stereo 2012 test set and background outlier percentage is measured on stereo 2015 test set while our method is measured on training set on stereo 2015. + +# 6.2. TUM RGB-D Benchmark + +Accuracy experiments on TUM RGB-D [76] compared VOLDOR vs. full SLAM systems. In all instances, we rigidly align trajectories to groundtruth for segments with 6 frames and estimate mean translation RMSE of all segments. Parameters remains the same to KITTI experiments. Our comparative baselines are an indirect sparse method ORB-SLAM2 [57], a direct sparse method DSO [15] and a dense direct method DVO-SLAM [45]. Per Table 5, + +![](images/00036bde9375717a50ba81c33a197726e4af5440587a5091c1a19c786254aabd.jpg) +(a) Depth likelihood with Gaussian (MLE/MIE) Residual Model + +![](images/73576229038f2bd5f2dcfa70244b550f0ba5677254fd78efa6a3e4c56fac805a.jpg) +(b) Epipole distribution with Gaussian Residual Model + +![](images/cc732a5eb4931005d136512dcd863b03c925dcbb8dc74da2a64dd68b76eac215.jpg) +(c) Depth likelihood with Fisk-MLE/MIE) Residual Model + +![](images/57933f5f865285b3e3be8eae6bfed5d1fb1e4fb2d42e08886c39e804d3ad4fbf.jpg) +(d) Epipole distribution with Fisk Residual Model + +![](images/051f74a2885896dbe2e3460b0db4b0601231750c5d3d0b328f904db98172c54f.jpg) +Figure 8: Fisk model qualitative study. (a) and (c) visualize the depth likelihood function under Gaussian and Fisk residual models with MLE and MIE criteria. Dashed lines indicate the likelihood given by a single optical flow. Solid lines are joint likelihood obtained by fusing all dashed lines. MLE and MIE are shown in different colors. (c) and (d) visualize the epipole distribution for 40K camera pose samples. For better visualization, the density color bars of (b) (d) are scaled differently. +(a) Ablation study over camera pose +Figure 9: Ablation study and runtime. (a) shows the camera pose error of VOLDOR under different residual models and dense optical flow input (*due to noisy ground estimations given by C2F-Flow, its scale is corrected using groundtruth). (b) shows our depth map accuracy under different residual models. (c) and (d) show the runtime of our method tested on a GTX 1080Ti GPU. + +![](images/f1bb249d425b15949bc74df4de10ad54f421134adbde621b9dbfc3f20816c57b.jpg) +(b) Ablation study over depth + +![](images/fbeeb0851d7c0ffeac0699ffbf47b8011a52ea2467f87040ff5a3a15c87d8910.jpg) +(c) Timing over frame numbers + +![](images/697f48e5182b8422f4293eeb4dabf6167ae21f993e7ceb7a8c8aec0805bf1185.jpg) +(d) Timing over pose samples + +VOLDOR performs well under indoor capture exhibiting smaller camera motions and diverse motion patterns. + +# 6.3. Ablation and Performance Study + +Figure 8 visualizes the depth likelihood function and camera pose sampling distribution. With our Fisk residual model, depth likelihood from each single frame has a well localized extremum (Fig.8-c), compared to a Gaussian residual model (Fig.8-a). This leads to a joint likelihood having a more distinguishable optimum, and results in more concentrated camera pose samplings (Fig.8-b,d). Also, with the MIE criteria, depth likelihood of the Fisk residual model is relaxed to a smoother shape whose effectiveness is further analyzed in Fig. 9, while a Gaussian residual model is agnostic to the choice between MIE and MLE (Fig.8-a). Per the quantitative study in Fig. 9 (b), compared to other analytic distributions, the Fisk residual model gives significantly better depth estimation when only a small number of reliable observations (low $W^{j}$ ) are used. Performance across different residual models tends to converge as the number of reliable samples increases (high $W^{j}$ ), while the Fisk residual model still provides the lowest EPE. Figure 9 (a) shows the ablation study on camera pose estimation for three optical flow methods, four residual models and our + +proposed MIE criteria. The accuracy of combining PWC-Net optical flow, a Fisk residual model, and our MIE criteria, strictly dominates (in the Pareto sense) all other combinations. Figure 9 (b) shows the MIE criteria yields depth estimates that are more consistent across the entire image sequence, leading to improved overall accuracy. However, at the extreme case of predominantly unreliable observations (very low $W^{j}$ ) MLE provides the most accurate depth. Figure 9 (c) shows the overall runtime evaluation for each component under different frame numbers. Figure 9 (d) shows runtime for pose update under different sample rates. + +# 7. Conclusion + +Conceptually, we pose the VO problem as an instance of geometric parameter inference under the supervision of an adaptive model of the empirical distribution of dense optical flow residuals. Pragmatically, we develop a monocular VO pipeline which obviates the need for a) feature extraction, b) ransac-based estimation, and c) local bundle adjustment, yet still achieves top-ranked performance in the KITTI and TUM RGB-D benchmarks. We posit the use of dense-indirect representations and adaptive data-driven supervision as a general and extensible framework for multiview geometric analysis tasks. + +# References + +[1] P. Fernández Alcantarilla. Vision based localization: from humanoid robots to visually impaired people. *Electronics* (University of Alcala, 2011), 2011. 7 +[2] Pablo F Alcantarilla, José J Yebes, Javier Almazán, and Luis M Bergasa. On combining visual slam and dense scene flow to increase the robustness of localization and mapping in dynamic environments. In 2012 IEEE International Conference on Robotics and Automation, pages 1290-1297. IEEE, 2012. 7 +[3] G Jogesh Babu and Calyampudi R Rao. Goodness-of-fit tests when parameters are estimated. Sankhya, 66(1):63-74, 2004. 4 +[4] Jose-Luis Blanco. A tutorial on se (3) transformation parameterizations and on-manifold optimization. University of Malaga, Tech. Rep, 3, 2010. 6 +[5] Michael Bloesch, Jan Czarnowski, Ronald Clark, Stefan Leutenegger, and Andrew J Davison. Codeslamlearning a compact, optimisable representation for dense visual slam. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2560-2568, 2018. 2 +[6] Behzad Bozortabar, Mohammad Saeed Rad, Dwarikanath Mahapatra, and Jean-Philippe Thiran. Syndemo: Synergistic deep feature alignment for joint learning of depth and ego-motion. In Proceedings of the IEEE International Conference on Computer Vision, pages 4210–4219, 2019. 2 +[7] D. J. Butler, J. Wulff, G. B. Stanley, and M. J. Black. A naturalistic open source movie for optical flow evaluation. In A. Fitzgibbon et al. (Eds.), editor, European Conf. on Computer Vision (ECCV), Part IV, LNCS 7577, pages 611-625. Springer-Verlag, Oct. 2012. 4 +[8] Jia-Ren Chang and Yong-Sheng Chen. Pyramid stereo matching network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5410-5418, 2018. 7 +[9] Yuhua Chen, Cordelia Schmid, and Cristian Sminchisescu. Self-supervised learning with geometric constraints in monocular video: Connecting flow, depth, and camera. In Proceedings of the IEEE International Conference on Computer Vision, pages 7063-7072, 2019. 2 +[10] Yizong Cheng. Mean shift, mode seeking, and clustering. IEEE transactions on pattern analysis and machine intelligence, 17(8):790-799, 1995. 6 +[11] Ronald Clark, Michael Bloesch, Jan Czarnowski, Stefan Leutenegger, and Andrew J Davison. Ls-net: Learning to solve nonlinear least squares for monocular stereo. arXiv preprint arXiv:1809.02966, 2018. 2 +[12] Gabriele Costante, Michele Mancini, Paolo Valigi, and Thomas A Ciarfuglia. Exploring representation learning with cnns for frame-to-frame ego-motion estimation. IEEE robotics and automation letters, 1(1):18-25, 2015. 2 +[13] Andrew J Davison, Ian D Reid, Nicholas D Molton, and Olivier Stasse. Monoslam: Real-time single camera slam. IEEE Transactions on Pattern Analysis & Machine Intelligence, (6):1052-1067, 2007. 2 +[14] Alexey Dosovitskiy, Philipp Fischer, Eddy Ilg, Philip Hausser, Caner Hazirbas, Vladimir Golkov, Patrick Van + +Der Smagt, Daniel Cremers, and Thomas Brox. Flownet: Learning optical flow with convolutional networks. In Proceedings of the IEEE international conference on computer vision, pages 2758-2766, 2015. 2 +[15] Jakob Engel, Vladlen Koltun, and Daniel Cremers. Direct sparse odometry. IEEE transactions on pattern analysis and machine intelligence, 40(3):611-625, 2017. 2, 7 +[16] Jakob Engel, Thomas Schöps, and Daniel Cremers. Lsdslam: Large-scale direct monocular slam. In European conference on computer vision, pages 834-849. Springer, 2014. 1, 2 +[17] Nolang Fanani, Matthias Ochs, Henry Bradler, and Rudolf Mester. Keypoint trajectory estimation using propagation based tracking. In 2016 IEEE Intelligent Vehicles Symposium (IV), pages 933-939. IEEE, 2016. 7 +[18] Nolang Fanani, Alina Stürck, Marc Barnada, and Rudolf Mester. Multimodal scale estimation for monocular visual odometry. In 2017 IEEE Intelligent Vehicles Symposium (IV), pages 1714-1721. IEEE, 2017. 7 +[19] Nolang Fanani, Alina Stürck, Matthias Ochs, Henry Bradler, and Rudolf Mester. Predictive monocular odometry (pmo): What is possible without ransac and multiframe bundle adjustment? Image and Vision Computing, 68:3-13, 2017. 7 +[20] Christian Forster, Matia Pizzoli, and Davide Scaramuzza. Svo: Fast semi-direct monocular visual odometry. In 2014 IEEE international conference on robotics and automation (ICRA), pages 15-22. IEEE, 2014. 2 +[21] Friedrich Fraundorfer and Davide Scaramuzza. Visual odometry: Part i: The first 30 years and fundamentals. IEEE Robotics and Automation Magazine, 18(4):80-92, 2011. 1 +[22] Friedrich Fraundorfer and Davide Scaramuzza. Visual odometry: Part ii: Matching, robustness, optimization, and applications. IEEE Robotics & Automation Magazine, 19(2):78-90, 2012. 1 +[23] Huan Fu, Mingming Gong, Chaohui Wang, Kayhan Batmanghelich, and Dacheng Tao. Deep ordinal regression network for monocular depth estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2002-2011, 2018. 2 +[24] Xiao-Shan Gao, Xiao-Rong Hou, Jianliang Tang, and Hang-Fei Cheng. Complete solution classification for the perspective-three-point problem. IEEE transactions on pattern analysis and machine intelligence, 25(8):930–943, 2003. 5 +[25] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 3354-3361. IEEE, 2012. 2, 4, 6 +[26] Andreas Geiger, Julius Ziegler, and Christoph Stiller. Stereoscan: Dense 3d reconstruction in real-time. In 2011 IEEE Intelligent Vehicles Symposium (IV), pages 963-968. IEEE, 2011. 6, 7 +[27] Clément Godard, Oisin Mac Aodha, Michael Firman, and Gabriel J Brostow. Digging into self-supervised monocular depth estimation. In Proceedings of the IEEE International + +Conference on Computer Vision, pages 3828-3838, 2019. 2 +[28] Clément Godard, Oisin Mac Aodha, and Gabriel J Bros-tow. Unsupervised monocular depth estimation with left-right consistency. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 270-279, 2017. 2 +[29] Ruben Gomez-Ojeda and Javier Gonzalez-Jimenez. Robust stereo visual odometry through a probabilistic combination of points and line segments. In 2016 IEEE International Conference on Robotics and Automation (ICRA), pages 2521-2526. IEEE, 2016. 2 +[30] Ruben Gomez-Ojeda, Francisco-Angel Moreno, and Javier Gonzalez-Jimenez. Accurate stereo visual odometry with gamma distributions. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 1423-1428. IEEE, 2017. 3 +[31] Xiaoyang Guo, Hongsheng Li, Shuai Yi, Jimmy Ren, and Xiaogang Wang. Learning monocular depth by distilling cross-domain stereo networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 484-500, 2018. 2 +[32] Jiahui Huang, Sheng Yang, Zishuo Zhao, Yu-Kun Lai, and Shi-Min Hu. Clusterslam: A slam backend for simultaneous rigid body clustering and motion estimation. In Proceedings of the IEEE International Conference on Computer Vision, pages 5875-5884, 2019. 2 +[33] Tak-Wai Hui, Xiaou Tang, and Chen Change Loy. Liteflownet: A lightweight convolutional neural network for optical flow estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8981-8989, 2018. 2 +[34] Junhwa Hur and Stefan Roth. Iterative residual refinement for joint optical flow and occlusion estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5754-5763, 2019. 2 +[35] Eddy Ilg, Nikolaus Mayer, Tonmoy Saikia, Margret Keuper, Alexey Dosovitskiy, and Thomas Brox. Flownet 2.0: Evolution of optical flow estimation with deep networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2462-2470, 2017. 1, 2, 3 +[36] Eddy Ilg, Tonmoy Saikia, Margret Keuper, and Thomas Brox. Occlusions, motion and depth boundaries with a generic network for disparity, optical flow or scene flow estimation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 614-630, 2018. 2 +[37] Andrew Jaegle, Stephen Phillips, and Kostas Daniilidis. Fast, robust, continuous monocular egomotion computation. In 2016 IEEE International Conference on Robotics and Automation (ICRA), pages 773-780. IEEE, 2016. 3 +[38] Joel Janai, Fatma Guney, Anurag Ranjan, Michael Black, and Andreas Geiger. Unsupervised learning of multi-frame optical flow with occlusions. In Proceedings of the European Conference on Computer Vision (ECCV), pages 690-706, 2018. 2 +[39] Kenichi Kanatani. Statistical optimization for geometric fitting: Theoretical accuracy bound and high order error anal- + +ysis. International Journal of Computer Vision, 80(2):167-188, 2008. 1 +[40] Ken-ichi Kanatani. Uncertainty modeling and model selection for geometric inference. IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(10):1307-1319, 2004. 1 +[41] Yasushi Kanazawa and Kenichi Kanatani. Do we really have to consider covariance matrices for image feature points? Electronics and Communications in Japan (Part III: Fundamental Electronic Science), 86(1):1-10, 2003. 1 +[42] Tong Ke and Stergios I Roumeliotis. An efficient algebraic solution to the perspective-three-point problem. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7225-7233, 2017. 5, 6 +[43] Alex Kendall, Hayk Martirosyan, Saumitro Dasgupta, Peter Henry, Ryan Kennedy, Abraham Bachrach, and Adam Bry. End-to-end learning of geometry and context for deep stereo regression. In Proceedings of the IEEE International Conference on Computer Vision, pages 66-75, 2017. 7 +[44] Christian Kerl, Jorg Stuckler, and Daniel Cremers. Dense continuous-time tracking and mapping with rolling shutter rgb-d cameras. In Proceedings of the IEEE international conference on computer vision, pages 2264-2272, 2015. 2 +[45] Christian Kerl, Jürgen Sturm, and Daniel Cremers. Dense visual slam for rgb-d cameras. In 2013 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 2100-2106. IEEE, 2013. 1, 2, 7 +[46] Pyojin Kim, Brian Coltin, and H Jin Kim. Linear rgb-d slam for planar environments. In Proceedings of the European Conference on Computer Vision (ECCV), pages 333-348, 2018. 2 +[47] Bernd Kitt, Andreas Geiger, and Henning Lategahn. Visual odometry based on stereo image sequences with ransac-based outlier rejection scheme. In 2010 iee intelligent vehicles symposium, pages 486-492. IEEE, 2010. 1, 2 +[48] Laurent Kneip, Davide Scaramuzza, and Roland Siegwart. A novel parametrization of the perspective-three-point problem for a direct computation of absolute camera position and orientation. In CVPR 2011, pages 2969-2976. IEEE, 2011. 5 +[49] Shunkai Li, Fei Xue, Xin Wang, Zike Yan, and Hongbin Zha. Sequential adversarial learning for self-supervised deep visual odometry. In Proceedings of the IEEE International Conference on Computer Vision, pages 2851-2860, 2019. 2 +[50] Ce Liu et al. Beyond pixels: exploring new representations and applications for motion analysis. PhD thesis, Massachusetts Institute of Technology, 2009. 3 +[51] Pengpeng Liu, Michael Lyu, Irwin King, and Jia Xu. Selflow: Self-supervised learning of optical flow. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4571-4580, 2019. 2 +[52] Shing Yan Loo, Ali Jahani Amiri, Syamsiah Mashohor, Sai Hong Tang, and Hong Zhang. Cnn-svo: Improving the mapping in semi-direct visual odometry using single-image depth prediction. In 2019 International Conference on Robotics and Automation (ICRA), pages 5218-5223. IEEE, 2019. 2 + +[53] J. Ma, J. Zhao, J. Tian, A. L. Yuille, and Z. Tu. Robust point matching via vector field consensus. IEEE Transactions on Image Processing, 23(4):1706-1721, April 2014. 4 +[54] Reza Mahjourian, Martin Wicke, and Anelia Angelova. Unsupervised learning of depth and ego-motion from monocular video using 3d geometric constraints. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5667-5675, 2018. 2 +[55] Andreas Masselli and Andreas Zell. A new geometric approach for faster solving the perspective-three-point problem. In 2014 22nd International Conference on Pattern Recognition, pages 2119-2124. IEEE, 2014. 5 +[56] Raul Mur-Artal, Jose Maria Martinez Montiel, and Juan D Tardos. Orb-slam: a versatile and accurate monocular slam system. IEEE transactions on robotics, 31(5):1147-1163, 2015. 2 +[57] Raul Mur-Artal and Juan D Tardós. Orb-slam2: An opensource slam system for monocular, stereo, and rgb-d cameras. IEEE Transactions on Robotics, 33(5):1255-1262, 2017. 1, 2, 7 +[58] R. A. Newcombe, S. J. Lovegrove, and A. J. Davison. Dtam: Dense tracking and mapping in real-time. In 2011 International Conference on Computer Vision, pages 2320-2327, Nov 2011. 1, 2 +[59] David Nister. An efficient solution to the five-point relative pose problem. IEEE transactions on pattern analysis and machine intelligence, 26(6):0756-777, 2004. 2 +[60] David Nister, Oleg Naroditsky, and James Bergen. Visual odometry for ground vehicle applications. Journal of Field Robotics, 23(1):3-20, 2006. 1 +[61] Geoffrey Pascoe, Will Maddern, Michael Tanner, Pedro Piniés, and Paul Newman. Nid-slam: Robust monocular slam using normalised information distance. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1435-1444, 2017. 2 +[62] Fabio Pereira, Joel Luft, Gustavo Ilha, Arthur Sofiatti, and Altamiro Susin. Backward motion for estimation enhancement in sparse visual odometry. In 2017 Workshop of Computer Vision (WVC), pages 61-66. IEEE, 2017. 7 +[63] Taihú Pire, Thomas Fischer, Gastón Castro, Pablo De Cristóforis, Javier Civera, and Julio Jacobo Berlles. Siptam: Stereo parallel tracking and mapping. Robotics and Autonomous Systems, 93:27-42, 2017. 7 +[64] Taihú Pire, Thomas Fischer, Javier Civera, Pablo De Cristóforis, and Julio Jacobo Berlles. Stereo parallel tracking and mapping for robot localization. In 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1373-1378. IEEE, 2015. 1, 2, 7 +[65] Anurag Ranjan and Michael J Black. Optical flow estimation using a spatial pyramid network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4161-4170, 2017. 2 +[66] Anurag Ranjan, Varun Jampani, Lukas Balles, Kihwan Kim, Deqing Sun, Jonas Wulff, and Michael J Black. Competitive collaboration: Joint unsupervised learning of depth, camera motion, optical flow and motion segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12240-12249, 2019. 2 + +[67] Jerome Revaud, Philippe Weinzaepfel, Zaid Harchaoui, and Cordelia Schmid. Epicflow: Edge-preserving interpolation of correspondences for optical flow. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1164-1172, 2015. 3 +[68] Peter J Rousseeuw. Least median of squares regression. Journal of the American statistical association, 79(388):871-880, 1984. 6 +[69] Martial Sanfourche, Vincent Vittori, and Guy Le Besnerais. evo: A realtime embedded stereo odometry for MAV applications. In 2013 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 2107-2114. IEEE, 2013. 7 +[70] Thomas Schops, Torsten Sattler, and Marc Pollefeys. Bad slam: Bundle adjusted direct rgb-d slam. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 134-144, 2019. 2 +[71] David Schubert, Nikolaus Demmel, Vladyslav Usenko, Jorg Stuckler, and Daniel Cremers. Direct sparse odometry with rolling shutter. In Proceedings of the European Conference on Computer Vision (ECCV), pages 682-697, 2018. 2 +[72] Lu Sheng, Dan Xu, Wanli Ouyang, and Xiaogang Wang. Unsupervised collaborative learning of keyframe detection and visual odometry towards monocular deep slam. In Proceedings of the IEEE International Conference on Computer Vision, pages 4302-4311, 2019. 2 +[73] S. Song and M. Chandraker. Robust scale estimation in real-time monocular sfm for autonomous driving. In 2014 IEEE Conference on Computer Vision and Pattern Recognition, pages 1566-1573, June 2014. 4 +[74] Shiyu Song and Manmohan Chandraker. Robust scale estimation in real-time monocular sfm for autonomous driving. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1566-1573, 2014. 7 +[75] Shiyu Song, Manmohan Chandraker, and Clark C Guest. Parallel, real-time monocular visual odometry. In 2013 IEEE international conference on robotics and automation, pages 4698-4705. IEEE, 2013. 7 +[76] Jürgen Sturm, Nikolas Engelhard, Felix Endres, Wolfram Burgard, and Daniel Cremers. A benchmark for the evaluation of rgb-d slam systems. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 573-580. IEEE, 2012. 2, 7 +[77] Deqing Sun, Xiaodong Yang, Ming-Yu Liu, and Jan Kautz. Pwc-net: Cnns for optical flow using pyramid, warping, and cost volume. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8934-8943, 2018. 1, 2, 3, 6 +[78] Chengzhou Tang and Ping Tan. Ba-net: Dense bundle adjustment network. arXiv preprint arXiv:1806.04807, 2018. 2 +[79] Keisuke Tateno, Federico Tombari, Iro Laina, and Nassir Navab. Cnn-slam: Real-time dense monocular slam with learned depth prediction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6243-6252, 2017. 2 + +[80] Benjamin Ummenhofer, Huizhong Zhou, Jonas Uhrig, Nikolaus Mayer, Eddy Ilg, Alexey Dosovitskiy, and Thomas Brox. Demon: Depth and motion network for learning monocular stereo. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5038-5047, 2017. 2 +[81] Chaoyang Wang, José Miguel Buenapasada, Rui Zhu, and Simon Lucey. Learning depth from monocular videos using direct methods. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2022–2030, 2018. 2 +[82] Rui Wang, Stephen M Pizer, and Jan-Michael Frahm. Recurrent neural network for (un-) supervised learning of monocular video visual odometry and depth. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5555-5564, 2019. 2 +[83] Sen Wang, Ronald Clark, Hongkai Wen, and Niki Trigoni. Deepvo: Towards end-to-end visual odometry with deep recurrent convolutional neural networks. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 2043-2050. IEEE, 2017. 2 +[84] Yang Wang, Peng Wang, Zhenheng Yang, Chenxu Luo, Yi Yang, and Wei Xu. Unos: Unified unsupervised optical-flow and stereo-depth estimation by watching videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8071-8081, 2019. 2 +[85] Yang Wang, Yi Yang, Zhenheng Yang, Liang Zhao, Peng Wang, and Wei Xu. Occlusion aware unsupervised learning of optical flow. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4884-4893, 2018. 2 +[86] Thomas Whelan, Stefan Leutenegger, R Salas-Moreno, Ben Glocker, and Andrew Davison. Elasticfusion: Dense slam without a pose graph. Robotics: Science and Systems, 2015. 2 +[87] Jonas Wulff, Laura Sevilla-Lara, and Michael J Black. Optical flow in mostly rigid scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4671-4680, 2017. 2 +[88] Fei Xue, Xin Wang, Shunkai Li, Qiuyuan Wang, Junqiu Wang, and Hongbin Zha. Beyond tracking: Selecting memory and refining poses for deep visual odometry. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8575-8583, 2019. 2 +[89] Nan Yang, Rui Wang, Jorg Stuckler, and Daniel Cremers. Deep virtual stereo odometry: Leveraging deep depth prediction for monocular direct sparse odometry. In Proceedings of the European Conference on Computer Vision (ECCV), pages 817-833, 2018. 2 +[90] Yanchao Yang and Stefano Soatto. Conditional prior networks for optical flow. In Proceedings of the European Conference on Computer Vision (ECCV), pages 271-287, 2018. 2 +[91] Zhichao Yin and Jianping Shi. Geonet: Unsupervised learning of dense depth, optical flow and camera pose. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1983-1992, 2018. 2 + +[92] Masashi Yokozuka, Shuji Oishi, Simon Thompson, and Atsuhiko Banno. Vitamin-e: Visual tracking and mapping with extremely dense feature points. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9641-9650, 2019. 2 +[93] Bernhard Zeisl, Pierre Fite Georgel, Florian Schweiger, Eckehard G Steinbach, Nassir Navab, and G Munich. Estimation of location uncertainty for scale invariant features points. In BMVC, pages 1-12, 2009. 1 +[94] Huangying Zhan, Ravi Garg, Chamara Saroj Weerasekera, Kejie Li, Harsh Agarwal, and Ian Reid. Unsupervised learning of monocular depth estimation and visual odometry with deep feature reconstruction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 340-349, 2018. 2 +[95] Feihu Zhang, Victor Prisacariu, Ruigang Yang, and Philip H.S. Torr. Ga-net: Guided aggregation net for end-to-end stereo matching. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 7 +[96] Zhenyu Zhang, Zhen Cui, Chunyan Xu, Yan Yan, Nicu Sebe, and Jian Yang. Pattern-affinitive propagation across depth, surface normal and semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4106-4115, 2019. 2 +[97] Cheng Zhao, Li Sun, Pulak Purkait, Tom Duckett, and Rustam Stolkin. Learning monocular visual odometry with dense 3d mapping from dense 3d flow. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 6864-6871. IEEE, 2018. 2 +[98] Yipu Zhao and Patricio A Vela. Good line cutting: Towards accurate pose tracking of line-assisted vo/vslam. In Proceedings of the European Conference on Computer Vision (ECCV), pages 516-531, 2018. 2 +[99] Enliang Zheng, Enrique Dunn, Vladimir Jojic, and Jan-Michael Frahm. Patchmatch based joint view selection and depthmap estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1510-1517, 2014. 4 +[100] Yinqiang Zheng, Yubin Kuang, Shigeki Sugimoto, Kalle Astrom, and Masatoshi Okutomi. Revisiting the pnp problem: A fast, general and optimal solution. In Proceedings of the IEEE International Conference on Computer Vision, pages 2344-2351, 2013. 5 +[101] Yiran Zhong, Pan Ji, Jianyuan Wang, Yuchao Dai, and Hongdong Li. Unsupervised deep epipolar flow for stationary or dynamic scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12095-12104, 2019. 2 +[102] Tinghui Zhou, Matthew Brown, Noah Snavely, and David G Lowe. Unsupervised learning of depth and egomotion from video. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1851-1858, 2017. 2 +[103] Yuliang Zou, Zelun Luo, and Jia-Bin Huang. Df-net: Unsupervised joint learning of depth and flow using cross-task consistency. In Proceedings of the European Conference on Computer Vision (ECCV), pages 36-53, 2018. 2 \ No newline at end of file diff --git a/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/images.zip b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..dd1784c44637c27a90b701cb82e1e6ad46872e2e --- /dev/null +++ b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a516f2419407ad6257f8c4e39478f3d82e397ab5ff81927ba7d8b8ca622ffe9 +size 605218 diff --git a/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/layout.json b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..fdacf2884780d363e46e825be836d7c94d156503 --- /dev/null +++ b/voldorvisualodometryfromloglogisticdenseopticalflowresiduals/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bc202fd9c5c11195463b84a83ea3874725a1be56e4f369a0d13cfb9c19549eb +size 581593 diff --git a/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/011f2439-744b-407e-809e-93c29153b578_content_list.json b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/011f2439-744b-407e-809e-93c29153b578_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a39d8004355b5b4103b74f38a153e2a7d6f99f1a --- /dev/null +++ b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/011f2439-744b-407e-809e-93c29153b578_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dd3a7ae42789155184f2de9876aa13081835cb5236c261de5d09768de9a4e64 +size 83475 diff --git a/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/011f2439-744b-407e-809e-93c29153b578_model.json b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/011f2439-744b-407e-809e-93c29153b578_model.json new file mode 100644 index 0000000000000000000000000000000000000000..64cd8eab824953441543461f3ed7e8d284a1c9c6 --- /dev/null +++ b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/011f2439-744b-407e-809e-93c29153b578_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34a1a62a63c47e5a854c4426960e559afb24cc14df9d2e30ab633ad4b9c31c06 +size 100121 diff --git a/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/011f2439-744b-407e-809e-93c29153b578_origin.pdf b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/011f2439-744b-407e-809e-93c29153b578_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c052560fa8477906b7f0743505bad570862d67de --- /dev/null +++ b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/011f2439-744b-407e-809e-93c29153b578_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89452ae0c48a135dc1d2de08b9c9c597aba97db180ed1d8c1a94425c3022723c +size 1462473 diff --git a/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/full.md b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5694338c6c7c2e7a0a26c8601190e0b11bed3993 --- /dev/null +++ b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/full.md @@ -0,0 +1,370 @@ +# VPLNet: Deep Single View Normal Estimation with Vanishing Points and Lines + +Rui Wang $^{1}$ , David Geraghty $^{2}$ , Kevin Matzen $^{2}$ , Richard Szeliski $^{2}$ , and Jan-Michael Frahm $^{1,2}$ + +1University of North Carolina at Chapel Hill +2Facebook, Inc. + +# Abstract + +We present a novel single-view surface normal estimation method that combines traditional line and vanishing point analysis with a deep learning approach. Starting from a color image and a Manhattan line map, we use a deep neural network to regress on a dense normal map, and a dense Manhattan label map that identifies planar regions aligned with the Manhattan directions. We fuse the normal map and label map in a fully differentiable manner to produce a refined normal map as final output. To do so, we softly decompose the output into a Manhattan part and a non-Manhattan part. The Manhattan part is treated by discrete classification and vanishing points, while the non-Manhattan part is learned by direct supervision. + +Our method achieves state-of-the-art results on standard single-view normal estimation benchmarks. More importantly, we show that by using vanishing points and lines, our method has better generalization ability than existing works. In addition, we demonstrate how our surface normal network can improve the performance of depth estimation networks, both quantitatively and qualitatively, in particular, in 3D reconstructions of walls and other flat surfaces. + +# 1. Introduction + +Single-view surface normal estimation has been extensively studied in the past few decades. A traditional approach for solving this problem is based on vanishing point and line estimation [14, 22, 16]. However, this approach has certain limitations, for example: 1) large textureless surfaces, common in indoor scenes, are challenging, 2) due to degeneracies, it is common to find lines in the image that are compatible with two distinct vanishing points. Recently, researchers have focused on deep learning methods for tasks in single-view geometry estimation such as surface normals, depth, room layout and canonical frames [2, 5, 38, 12]. These methods typically produce dense outputs and work well for featureless regions, where most traditional methods + +![](images/4a27f580f973237b3d955fc7b25ba601510a614d4f8ebd45e1dbc6824da7d055.jpg) +(a) Image + +![](images/27feb077b29cd979af97a3fde8502b5591653c5efa97b8e7ccc9057c3261d62c.jpg) + +![](images/873c4d252c08d8aea178a420396aa7e5f3b50cbfca08d903a5374279e8b0ed64.jpg) +(c) Normal Map +Figure 1: Example inputs and outputs of our method. The first row shows the input image and the Manhattan line map. The second row shows the output normal and Manhattan label maps. The colors in the Manhattan line and label maps represent the unsigned Manhattan directions: blue corresponds to vertical, while red and green correspond to the two orthogonal horizontal directions. + +![](images/15eff07142c3a07021f97fc78cd037a847ba277c3f81c8c01432f3c41aec7752.jpg) +(b) Manhattan Line Map +(d) Manhattan Label Map + +fail. However, deep learning-based methods tend to be data-hungry and to not generalize well to unseen datasets. In contrast, traditional geometric methods do not suffer from the generalization problem. In this paper, we demonstrate that the benefits of deep learning-based methods and traditional vision methods are complementary, and that combining them produces significant improvements. + +In this paper, we develop a single-view normal estimation framework that combines line and vanishing point analysis with a deep neural network in both the training and prediction phases. We softly decompose the normal map into a Manhattan part (treated by discrete classification and vanishing points) and a non-Manhattan part (learned directly). Our method outperforms the state-of-the-art on typical benchmarks and generalizes well to unseen datasets. + +In more details, we use a line detection and vanishing point estimation method to compute the dominant vanish- + +![](images/f37974752e942ddf63427ee5e5276f9ed46b4e6f156ee9382525c1e5cfbd4b15.jpg) +Figure 2: The full pipeline of our proposed model. The network takes an RGB image and a Manhattan line map as input, and produces a Manhattan label map and a raw normal prediction as intermediate output. These intermediate outputs are then combined with the analytically computed dominant vanishing points to generate a "combined normal map". This operation is differentiable. Finally, the combined and raw normal maps are fused through a refinement network to produce the final normal prediction. + +ing points and "Manhattan lines", i.e. lines in the Manhattan directions, for each image. As shown in Figure 2, we provide a Manhattan line map and color image together with vanishing points as input to the network and output a raw normal estimate, a Manhattan label map, and finally a refined normal map. The ground truth Manhattan label map is generated using both the ground truth normal map and the computed vanishing points, which we detail in Section 3.2. The estimation of the Manhattan label map is equivalent to normal estimation in the coordinate system aligned to the Manhattan frame. Since the Manhattan label map only contains normals in the dominant vanishing point directions, we also perform raw normal estimation, which fills in the normals for surface points that are not in the dominant directions. The refined normal map is generated by fusing the Manhattan label map with the raw normal estimation. Figure 1 shows an example of the inputs and outputs of our proposed method. We use the ScanNet [4] dataset for training and validation, and we use the NYUD-v2 [23] and Replica [29] datasets to show the generalization ability of our proposed method. + +In summary, our main contributions are: + +- We introduce the idea of a Manhattan label map, which only represents the dominant directions but is easier to learn than a dense normal map. +- We combine a traditional vision method with a deep neural network by providing an analytically computed Manhattan line map and label map as input and as ground truth training label for the network, respectively, which achieves higher accuracy and better generalization. +- We use multi-task learning and a refinement network to jointly predict the Manhattan label map and a raw normal map and fuse them in a fully differentiable manner. + +# 2. Related Works + +Inferring 3D geometry from a single image is a longstanding task in computer vision. By utilizing the property of parallel lines in perspective geometry, vanishing point detection algorithms [3, 1, 28, 26] can be used to estimate plane normals. However, this typically succeeds only in regions containing lines that point in two distinct 3D directions. Shape-from-shading algorithms [37, 27] solve the single view 3D reconstruction as an inverse problem, with a set of assumptions that often limits their applicability. + +Convolutional neural networks (CNNs) have begun to produce better results than traditional methods on single view geometry estimation tasks. Not relying on handcrafted features or heuristic assumptions, they can work on more complex environments. For tasks such as depth and surface normal estimation, they produce dense output. Works by Eigen et al. [6] and Liu et al. [21] proposed supervised training pipelines for single view depth estimation. Godard et al. [9] and Garg et al. [8] proposed unsupervised single view depth estimation pipelines using stereo pairs. Wang et al. [31] proposed using RNNs to leverage multiple consecutive video frames for depth estimation and demonstrated both supervised and unsupervised training. + +It has been shown by Zamir et al. [36] that the surface normal is the visual representation that has the most direct connection to the majority of vision tasks in deep learning. Marr revisited [2] proposed using synthetic data to augment the normal estimation training. Wang et al. [32] proposed estimating surface normals, room layout and edges at both local and global scales, and fusing them together to produce the final normal estimation. GeoNet [24] and Wang et al., [30] proposed estimating depth and normal maps simultaneously. Wei et al. [35] recently proposed using "virtual normals" to regularize and improve the depth estimation. + +They randomly sample triplets of 3D points from their predicted geometry; each triplet forms a virtual plane whose normal is a virtual normal. They showed that the virtual normal is more robust to noise than the surface normal. + +Normal estimation in different coordinate systems has also been studied. FrameNet [12] proposed jointly estimating local canonical frames and their projections, together with the normal map. This joint estimation has been shown to improve results. Xian et al. [33] estimate the 2DoF camera orientation by computing the alignment between the local camera coordinate system, and a global reference coordinate system which is aligned with gravity. The two coordinate systems are represented by the two surface geometries estimated from a deep neural network. We also leverage the normal estimation in different frames to impose more geometric constraints. We provide analytically computed Manhattan line map as input to help our normal estimation in Manhattan coordinates. In addition, since the Manhattan directions (dominant vanishing points) are analytically computed from lines, we turn the normal estimation in Manhattan coordinates into a classification problem to further reduce its difficulty. + +Besides per-pixel normal estimation, piece-wise planar surface estimation is another popular way for surface normal estimation under the assumption that our world is piecewise planar. PlaneNet [20] represents each plane as a normal plus an offset. It uses a CNN to predict a segmentation into planes as well as the parameters for each plane segment. Whereas it assumes a fixed number of planes, PlaneRCNN [19] eliminates that constraint. It uses Mask-RCNN [11] to segment out an arbitrary number of planes and then estimates parameters for each plane. Compared to per-pixel dense estimation, piece-wise planar methods produce more regularized predictions but have the drawback that an error in an estimated parameter will result in an accumulated error in the whole plane. + +LayoutNet [38] uses Manhattan lines as input to help the network predicting room layouts. Li et al. [18] used multiview stereo on a large collection of internet photos to create a large dataset for training CNNs for depth estimation. Both papers show the usefulness of traditional geometric reasoning based methods in deep neural network training. In our work, in both the training and prediction phases, we combine the vanishing point and line method with the deep learning method. Our experiments demonstrate that this combination leverages the advantage of both methods and produces better results than the state of the art. + +# 3. Method + +In this section, we introduce our single-view normal estimation framework. First, we briefly introduce the vanishing point and line detection method, and our method for generating the Manhattan label map. Then, we discuss the overall + +![](images/8ec61bab542f8f10a8bb68c2427f4eb365c76594d1f96bb7fb3512e2d301c5ac.jpg) +Figure 3: Example images of the Manhattan line and label maps. For better visualization, the parallel planes with opposite directions are assigned to the same color in the Manhattan label map. The actual Manhattan label map is a seven-class label map $(\pm 3$ Manhattan directions plus one non-Manhattan direction). + +network architecture. Finally, we elaborate on the energy terms and training details. + +# 3.1. Line and vanishing point detection + +Under a pinhole camera model, parallel lines in 3D space project to converging lines in the image plane. The common point of intersection in the image plane is called the vanishing point (VP). The steps for detecting VPs are 1) detect line segments, 2) cluster the lines into groups with the assumption that a cluster will share a common vanishing point, 3) find the three dominant pair-wise orthogonal vanishing points. + +Line segments are detected using the LSD line detector [10]. We use the Expectation-Maximization approach of [13] to fit vanishing points. Before running EM, the vanishing points are initialized as follows: in our training data, the vertical vanishing point is initialized from a gravity-aligned camera pose. We then form the corresponding horizon line in the projective image plane, and divide it into equal-angle bins. To initialize horizontal vanishing points, we intersect image line segments with the horizon line, and consider peaks in the resulting histogram. Between EM iterations, we purge candidate vanishing points with low evidence, and merge vanishing points that become sufficiently close. + +# 3.2. Manhattan line and label map + +After the dominant vanishing points have been detected, we classify the corresponding line segments to form a color-coded Manhattan line map. We use blue for line segments in the vertical vanishing point direction, and green and red for line segments in the two orthogonal horizontal vanishing point directions. We always render the lines in a fixed order based on the Manhattan directions. Row 2 of Figure 3 shows an example of the Manhattan line map, which is used as an input to our normal estimation network. + +Given the classified line segments, one can determine the plane normals near the intersection of two groups of lines. However, it is non-trivial to determine whether the + +![](images/a9d8248c71cb955cfb62b023d9c207a20d1ea037d65c785b2be67dca0554d2f3.jpg) +Figure 4: The process of ground truth (GT) Manhattan label map generation. Middle: a GT normal map in which the coordinates in the lower right corner correspond to the three dominant vanishing points. Right: the GT Manhattan label map generated by classifying each surface normal in the GT normal map into one of the dominant vanishing point directions based on a threshold. For better visualization, the parallel planes with opposite directions are assigned to the same color in the Manhattan label map. + +two groups are coplanar and to select the appropriate region near the line intersections where normals can be estimated. Therefore, we introduce a discrete classification problem where each pixel is classified into seven classes: six classes for surfaces aligned to the signed Manhattan directions, and one extra class for non-Manhattan surfaces. For each training image we create a seven-class one-hot encoded Manhattan label map $M^{gt}$ , using the given dominant vanishing points $\mathbf{v}$ and ground truth normal map $\mathbf{n}_{gt}$ . + +Figure 4 shows an example of generating $M^{gt}$ given $\mathbf{n}_{gt}$ and $\mathbf{v}$ . The third row in Figure 3 shows more examples of the Manhattan label maps. In the visualizations, we ignore sign differences in the label map. As above, the Manhattan label map is a seven-class label map with each label specifying a dominant vanishing point direction, or a non-Manhattan direction. Given the ground truth normal map and dominant vanishing points, we classify each normal direction into one of the dominant vanishing point directions if it is within a certain angle; otherwise it is classified as an unknown (non-Manhattan) direction. The one-hot encoding of the labels if given by: + +$$ +M _ {c} ^ {g t} (i) = \left\{ \begin{array}{l l} 1 & \text {i f} \angle \left(\mathbf {n} _ {g t} (i), \mathbf {v} _ {c}\right) < T \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {1} +$$ + +$$ +M _ {u} ^ {g t} (i) = 1 - \sum_ {c = 1} ^ {C} M _ {c} ^ {g t} (i), i = 1 \dots N, +$$ + +where $C = 6$ is the number of signed Manhattan directions, $c$ runs over these directions, $\mathbf{v}_c$ is the signed Manhattan direction associated to label $c$ , $u = 7$ corresponds to an unknown (non-Manhattan) direction, $\angle (\cdot ,\cdot)$ is the angle between two vectors, $T$ is a selected angle threshold, $N$ is the number of pixels in the image, and $i$ runs over all pixels. We are using consistent labeling of the directions, e.g. $c = 0$ is always corresponding to the up direction. + +The advantages of converting the normal map representation into the Manhattan label map representation are that 1) the problem of regressing arbitrary normal direction is converted to a classification problem; 2) the color coding + +![](images/25c07e9d63f9fef14a30db0dc2975eb8aba21cf82d78be230bbb0485a74b114e.jpg) +Figure 5: The UperNet (our baseline) architecture. It combines a Feature Pyramid Network (FPN) with a Pyramid Pooling Module (PPM) attached at the last layer of the encoder of the FPN. + +of the Manhattan label map is complementary to the Manhattan line map and thus can directly take advantage of the input Manhattan line map, for example, Manhattan normal directions should be orthogonal to nearby Manhattan line directions. In the next subsection, we introduce our network architecture for the Manhattan label map and normal map estimation, given the analytically computed dominant vanishing points and Manhattan line map. + +# 3.3. Manhattan Label Map and Normal Estimation + +As mentioned in Section 3.2, the Manhattan label map is a seven-class label map. It is natural to adopt a semantic segmentation network architecture for the task of learning this labeling. We adopt the UPerNet [34] architecture, which combines a Feature Pyramid Network (FPN) and a Pyramid Pooling Module (PPM). It has large receptive fields while remaining efficient compared to the UNet [25] or DORN [7] architectures. A more detailed architecture is shown in Figure 5. The encoder is a ResNet101 backbone, and the decoder is a FPN. Between the encoder and decoder is a PPM that further increases the receptive field of the network. Please refer to [34] for more details. + +Baseline model. We first trained a baseline model that takes a single image as input and outputs a dense normal map. We initialize all the weights in our baseline model, except the last layer, using the pretrained UPerNet weights from a semantic segmentation task. Then all layers are finetuned (except for the last layer, which is freshly trained) on the normal prediction task. From our experiments, our baseline model already outperforms FrameNet. + +vp-line model. Our full model is shown in Figure 2; we name it the vp-line model. The input to the vp-line model is an RGB image together with analytically computed vanishing points and Manhattan line map. The 3-channel Manhattan line map contains color-coded lines, where blue corresponds to the vertical direction and the other two colors correspond to two orthogonal horizontal dominant vanishing point directions. The Manhattan line map provides useful information for the Manhattan label map estimation. The RGB image and the Manhattan line map are processed separately using two convolutional blocks and then concatenated for use in the third convolutional block. The decoder of the + +vp-line model is the same as the baseline model except for the last convolutional layer, where the vp-line model has a ten-channel output layer instead of three. The seven additional channels correspond to the predicted Manhattan label map: after the decoder, for each pixel $i$ , we have a raw predicted surface normal $\mathbf{n}^{\mathrm{raw}}(i)$ , and a set of softmax probabilities $\mathbf{p}(i) = (p_1(i),\dots,p_7(i))$ for the labels described above. The Manhattan label map is similar to a dense version of the Manhattan line map. The Manhattan label map estimation can be interpreted as semantic segmentation; it is also equivalent to normal estimation in an aligned coordinate system since it classifies surface normals into Manhattan directions. + +Next, we convert the Manhattan label map into a surface normal map in camera coordinates. As above, the predicted Manhattan label map contains probabilities for each of the six Manhattan directions, and a non-Manhattan direction. An easy way to convert the Manhattan label map to a normal map is to directly assign a Manhattan direction to each pixel in the label map based on the highest probability. However, such an assignment is non-differentiable and thus cannot be integrated into the network training process. Therefore, instead of direct assignment, we make full use of the softmax probabilities and the raw predicted normals, to produce a "combined normal" $\mathbf{n}^{\mathrm{comb}}(i)$ at each pixel $i$ by taking: + +$$ +\mathbf {n} ^ {\operatorname {c o m b}} (i) = \left\langle \sum_ {c = 1} ^ {6} p _ {c} (i) \mathbf {v} _ {c} + p _ {7} (i) \mathbf {n} ^ {\operatorname {r a w}} (i) \right\rangle , i = 1 \dots N, \tag {2} +$$ + +where each $\mathbf{v}_c$ is the (constant) signed Manhattan direction corresponding to label $c$ , and $\langle \cdot \rangle$ is a normalization operation. For pixels strongly associated to a Manhattan direction $c$ , the network can leverage the provided direction $\mathbf{v}_c$ by increasing the weight $p_c(i)$ . Many object surfaces are irregularly shaped, so we cannot expect only the dominant Manhattan directions to represent the whole scene. For pixels not lying on a Manhattan aligned surface, the weight $p_7(i)$ should be large, and thus $\mathbf{n}^{\mathrm{raw}}(i)$ should dominate in the sum. + +At this point, our vp-line model has two normal map predictions: $\mathbf{n}^{\mathrm{raw}}$ and $\mathbf{n}^{\mathrm{comb}}$ . To produce a final output normal map $\mathbf{n}^{\mathrm{out}}$ , we follow the idea in GeoNet [24] of using a refinement network, as shown in Figure 2. The refinement network we use is a three-layer residual network with a 6-channel input obtained by concatenating $(\mathbf{n}^{\mathrm{raw}}, \mathbf{n}^{\mathrm{comb}})$ , and whose output is our final prediction $\mathbf{n}^{\mathrm{out}}$ . + +# 3.4. Loss Functions + +As mentioned in the previous subsection, there are three intermediate outputs, and one final output in the vp-line model: 1) the softmax output $\mathbf{p}(i)$ for Manhattan label classification, 2) the raw normal map $\mathbf{n}^{\mathrm{raw}}(i)$ , which is the other output of the decoder, 3) the combined normal map + +$\mathbf{n}^{\mathrm{comb}}(i)$ , defined by (2), and 4) the final output normal map $\mathbf{n}^{\mathrm{out}}(i)$ from the refinement network. We use a negative log likelihood for the Manhattan label map estimation: + +$$ +L _ {\text {l a b e l}} = - \sum_ {i = 1} ^ {N} \sum_ {c = 1} ^ {7} M _ {c} ^ {g t} (i) \log \left(p _ {c} (i)\right), \tag {3} +$$ + +where $M_c^{gt}(i)$ are the ground truth one-hot labels from (1). + +We use angular distance between predicted normals and ground truth normals as the loss for all normal predictions: + +$$ +L _ {\text {n o r m}} = \sum_ {*} \sum_ {i = 1} ^ {N} \omega_ {*} \operatorname {a r c c o s} \left(\mathbf {n} ^ {*} (i) \cdot \mathbf {n} _ {g t} (i)\right), \tag {4} +$$ + +where $*$ runs over $\{\text{raw, comb, out}\}$ , and $\omega_*$ controls the importance of each normal prediction; in this work we weigh them equally. The overall loss is defined as: + +$$ +L = L _ {\text {n o r m}} + \lambda L _ {\text {l a b e l}}, \tag {5} +$$ + +# 4. Experiments + +In this section, we show quantitative and qualitative evaluation results of our proposed vp-line model. We perform comparisons with state-of-the-art normal estimation methods using the ScanNet dataset, showing the superiority of our method. We also demonstrate the generalization ability of our method using the Replica and NYUD-v2 datasets. Through our experiments, we conclude that the combination of vanishing points and axis-aligned lines with a deep neural network, and our decomposition of the normal into the Manhattan part (learned by discrete classification) and non-Manhattan part (learned by regression) not only improves the normal estimation accuracy but also improves generalization ability. + +# 4.1. Implementation Details + +To generate the ground truth Manhattan label map, we used a hard threshold $T = 15$ degrees for classifying a normal direction into one of the Manhattan directions. We set the weights $\omega_{*} = 1.0$ (in Eq. 4) and the weight $\lambda = 0.2$ (in Eq. 5). We used the Adam optimizer with $\beta_{1} = 0.5$ and $\beta_{2} = 0.999$ . We set the initial learning rate to be 0.0001, with 0.95 exponential decay rate. The input image size was $640 \times 480$ , and the prediction size was $320 \times 240$ . The batch size we used was 6 on an Nvidia V100 GPU. For data augmentation, we used random center cropping. + +# 4.2. Datasets + +We used the ScanNet dataset [4], which contains more than 2.5 million images, to train our models. Similar to FrameNet, we used 2/3 of the dataset for training and the rest for validation and testing. We also generated all the + +![](images/219e0b69b3836087f4fd1a5f1c9290fc669df091c2c27b15674b3a72b2e6b1b2.jpg) +(a) Image + +![](images/94588d56e48bbc661bef38362654588bc4c0db6ccf64fee3c6b0bb7f1ebfee35.jpg) +(b) GT + +![](images/2a677c84107c8b35f1a78ab4a7d00ad32aab93b53dcac7273ddc01ab681c2b0a.jpg) +(c) Baseline + +![](images/0d8db2fa8958e5f1b74e8aa82df29e90b1d1c4ee95bbeed818bab13e528a2aa9.jpg) +(d) vp-line model +Figure 6: Visual comparison of the results on ScanNet [4] dataset. By incorporating the vanishing points and lines, our vp-line method improves the baseline method. + +Manhattan line maps during data preparation using the vanishing point and line method described in Section 3.1. + +NYUD-v2 [23] is another large benchmark dataset; we directly applied our ScanNet pretrained model on its official test set to demonstrate the generalization ability of our model, and also compared with the state-of-the-art methods. + +In addition to NYUD-v2, we also demonstrate the generalization ability of our method using the Replica dataset [29]. Replica has the highest ground truth normals quality compared to the other datasets, but it has a lot fewer scenes. + +# 4.3. Normal estimation + +To evaluate the performance of our vp-line model, we compare to the state-of-the-art deep learning-based normal estimation methods. We use mean and median angle error as well as the percentage of normals within certain angles as the evaluation metrics. As shown in Table 1, our baseline model, based on UPerNet architecture, already outperforms the state-of-the-art. The proposed vp-line model achieves the best result, demonstrating the effectiveness of incorporating Manhattan lines and vanishing points into normal estimation as well as the joint estimation of normals in both Manhattan frame aligned coordinates and camera coordinates. Figure 6 shows the qualitative results; as can be seen, the vp-line model produces more correct results. + +
MethodsError metricAccuracy metric
meanmedian11.25°22.5°30°
GeoNet [24]19.7711.3449.770.477.7
FrameNet [12]15.288.1460.678.684.7
Our baseline14.237.0364.881.286.5
vp-line model13.766.6866.381.887.0
+ +Table 1: Normal prediction on the ScanNet [4] dataset. Our baseline model outperforms the state-of-the-art, and our vp-line model achieves the best results. + +Generalization to unseen datasets. One advantage of combining analytically computed Manhattan lines and van- + +ishing points into a deep learning-based normal estimation framework is the improved generalization ability. To demonstrate this, we directly applied our vp-line model, which is trained on the ScanNet dataset, to other datasets. Table 2 shows the quantitative results on the NYUD-v2 dataset. It can be seen that our vp-line model performs even better than methods trained on the NYUD-v2 dataset, demonstrating its good generalization ability. We also directly ran FrameNet, trained on ScanNet, on the NYUD-v2 dataset; it can be seen that the degradation of its performance when applied to an unseen dataset is much larger than our vp-line model. Figure ?? shows a qualitative comparison with the-state-of-the-art methods. It can be seen that our predicted normal maps capture many more details than other methods. + +
MethodsTrainingError metricAccuracy metric
meanmedian11.25°22.5°30°
Eigen et al. [5]NYUD-v223.715.539.262.071.1
GeoNet [24]NYUD-v219.011.8048.471.579.5
FrameNet [12]ScanNet21.6013.5243.765.774.2
vp-line modelScanNet17.989.8354.373.880.7
+ +Table 2: Normal prediction on the NYUD-v2 [23] dataset. Both FrameNet and our vp-line model are trained on ScanNet. Our vp-line model achieves the best results, demonstrating its good generalization ability. + +To further show the generalization ability of our proposed vp-line model, we used the Replica dataset that has much larger scene variation compared to the ScanNet dataset. Table 3 and Figure 8 show the comparison results of FrameNet, our baseline model, and our vp-line model. All three models were trained on the ScanNet dataset and directly applied to the Replica dataset. Compared to the evaluation result on the ScanNet dataset, the performance degradation of the FrameNet and our baseline model is larger than that of the vp-line model, demonstrating that the incorporation of the vanishing points and the Manhattan line map improves the generalization ability of the model. + +
MethodsError metricAccuracy metric
meanmedian11.25°22.5°30°
FrameNet [12]19.5113.6039.172.782.0
Our baseline18.2312.7744.576.284.6
vp-line model17.0810.5051.977.585.2
+ +Table 3: Normal prediction on the Replica [29] dataset. All methods are trained on ScanNet to compare the generalization ability. Our vp-line model achieves best results and lowest performance degradation, demonstrating its good generalization ability. + +# 4.4. Ablation Study + +To investigate our architecture choices, we conduct a series of ablation studies. To explore the impact of the input Manhattan line map, we trained a model with only an RGB + +![](images/5d1ce745fecf37ffbeb58890e4938c99c8e445bbfaeaebb4271d7c0b0e988aff.jpg) + +![](images/1275d88e3c7b7b712b48a0dc98718eb809a72673254b20e03bc5835e72ebe147.jpg) + +![](images/b6e096132b991c72ec9b6f7acbb6b2ff961dfdda83f98a24ecd90e98873ab105.jpg) +(a) image +Figure 7: Visual comparison with the state-of-the-art on NYUv2 [23]. Our vp-line model produces more detailed results, such as the box on the wall in the first image and the sink in the second image. + +![](images/54c09e8945f0b0936857898086dc4879b38e6f725633b17d14451a9cafb11336.jpg) + +![](images/276f21c8c1b3e892d6b55ffddf223af373b297c1b83b0486083ca174b4e30466.jpg) + +![](images/df537c91b58730ff981a3daec847b1744d44191c12fa7651a2d1e0f21bd607e6.jpg) +(b) GT + +![](images/291a1211bd8971a29470449d3ec57d078d4e398e250648c2cdee4210ec3af842.jpg) + +![](images/9d10889a57628d4fd1f7992e0365ab2dddd2ecce147d6ba4f68280750947446f.jpg) + +![](images/f213c557ac85ff8a9b81546d14572ab16325fbb2e6a8550f879bd1cbb2b24d8e.jpg) +(c) Eigen et al. [6] + +![](images/371d1bf3e214717f687d73fe3251cdfd7947d46316f702b46e46d139c0987095.jpg) + +![](images/4579cac9928308c4909af6e08f0d977ec26242586d9d4554f4afa54c2cf1295d.jpg) + +![](images/bf0c228d688cb1cda9faa9099c87cde0c40f040b0430c2661a0bc3603071253a.jpg) +(d) GeoNet [24] + +![](images/ccac4fa72121c290afdd1c2b98e06e671498af1614357498180dd54d36ab1933.jpg) + +![](images/cdcfdc8f39bd159ffe5b1a70703baf442686359b75c701bd33d009e250a5eaec.jpg) + +![](images/454594d5569bca94d215eacd676d8104409f17f5ea5a8f0d1fd444150d030ed3.jpg) +(e) FrameNet [12] + +![](images/a092fca69c117bcf47f568834f054c367fd4c0f3873c8b5f22058411943dcc01.jpg) + +![](images/ba6685b2dc337ee269aea1c5f517c04e6cc8fbf4230a782a22432e96971b451f.jpg) + +![](images/b71ebb69e483eac998a563c1a9258ac4d9e72ff10befbe1c99c51e4726179e9a.jpg) +(f) vp-line model + +![](images/ca39c23e88b88e906e52c45e66833ac8cbdb0c8e67451e653f2f567a39928217.jpg) + +![](images/027a7760995ccab4ca2da7252cf3ee39ea5d514600f25baf4e7ba454605809c7.jpg) + +![](images/91bef3ed237fcbd811d3beedbe296b89dc8a56dc9108f5e0e73a56c0f3cce441.jpg) +(a) Image +Figure 8: Visual comparison on the Replica [29] dataset. Our vpline model can handle difficult cases such as shadow and low light conditions. + +![](images/e83d9d1246f9e8dbd00b27350a7c7de4ca165a3ea4216ea7267c74b0db068b07.jpg) + +![](images/bbeab20a280a7a699ad9195d0e1c54d75b73da3d1dfd64c82e3005c7d8fc3281.jpg) + +![](images/4e5f690b9346941adb02c049451084827f5d7d2556a4d4563b12022bb1591327.jpg) +(b) GT + +![](images/3432498c7ee7fcd882ff67ad97b4d7c387c528c4237023fdcf0f958e2fb4bf80.jpg) + +![](images/dd70d77fcb46dae15c09853254bb9d2801c323b0cf8e36ef95a7638c66f622fc.jpg) + +![](images/211523c079af07e37385f8295dc17fce49ceea9ae187d51d4dff89bd6b4af840.jpg) +(c) Baseline + +![](images/9dbc137a5102afc115d2d2d7c2a78536b81eb44f9bd78f4a683df99bcc1c8c88.jpg) + +![](images/912f684b8570b839b875bf7edae0bda37dc58baac11b90cb8772809ae8af5ae0.jpg) + +![](images/7e69a1b0541c14c9c1a31a1a1c60fd0dadf072345a8c70024c1c6704adec3918.jpg) +(d) vp-line model + +image and vanishing points as input; the output remains the same as from the vp-line model (vp-line model (no line)). Similarly, to show the impact of the Manhattan label map, we trained a model with an RGB image and a Manhattan line map as input and only a normal map as output(vp-line model (no label)): in other words our decoder produces a 3-channel output $\mathbf{n}^{\mathrm{raw}}(i)$ , which we take as the final output. Table 4 shows the quantitative results of the ablation studies. It can be seen that only the combination of the Manhattan line and label map can produce significantly better normal estimation results than the baseline model. One explanation is that the input Manhattan lines are helpful for the Manhattan label map estimation but not directly for the normal estimation. + +As mentioned in Section 3.3, our vp-line model outputs multiple normal estimates. The accuracy of the normals + +
MethodsError metricAccuracy metric
meanmedian11.25°22.5°30°
vp-line model (no line)13.936.7965.581.686.8
vp-line model (no label)14.147.0864.781.286.5
Our baseline14.237.0364.881.286.5
vp-line model13.766.6866.381.887.0
+ +Table 4: Evaluation of the impact of different components in vline model. Only the combination of the Manhattan line and label map can improve the performance over our baseline. + +
OutputsError metricAccuracy metric
meanmedian11.25°22.5°30°
ncomb14.087.0165.181.686.8
nraw13.926.9765.881.886.9
nout13.766.6866.381.887.0
+ +Table 5: Evaluation of different normal predictions in the vp-line model. The final fused result $\mathbf{n}^{\mathrm{out}}$ has the best result. + +from the Manhattan label map $\mathbf{n}^{\mathrm{comb}}$ , the direct normal prediction $\mathbf{n}^{\mathrm{raw}}$ and the fused final normal prediction $\mathbf{n}^{\mathrm{out}}$ is shown in Table 5. The fused normal map $\mathbf{n}^{\mathrm{out}}$ takes advantage of both $\mathbf{n}^{\mathrm{comb}}$ and $\mathbf{n}^{\mathrm{raw}}$ and thus has the best result. The network converges after twenty epochs of training. During the first ten epochs, the accuracy of $\mathbf{n}^{\mathrm{comb}}$ is higher than $\mathbf{n}^{\mathrm{raw}}$ , which suggests the Manhattan label map is easier to learn than to the direct normal map. However, after ten epochs, $\mathbf{n}^{\mathrm{raw}}$ starts to achieve better results, possibly because the accuracy of $\mathbf{n}^{\mathrm{comb}}$ is bounded by the analytically computed vanishing points. + +We observed that inheriting weights from a network pretrained on semantic segmentation makes a significant difference. We suspect this is because normal estimation is closely related to semantic segmentation; for example, if a region is identified as a ground plane, the normal is very likely to be pointing upward. That was also our motivation + +
MethodsError metricAccuracy metric
meanmedian11.25°22.5°30°
Baseline (no init)16.908.6958.776.482.5
Baseline14.237.0364.881.286.5
vp-line model (no init)15.337.5962.478.984.5
vp-line model13.766.6866.381.887.0
+ +Table 6: Evaluation of normal estimation with and without weights pretrained from semantic segmentation tasks. + +![](images/eadce0deef058343554df9c035e79dc5147088ceb83536509fd3b44621f0de2e.jpg) +Figure 9: Visual comparison of depth estimation with and without our predicted normal map as input. The left image is with predicted normal map as input. It can be seen that the wall and the sofa are flatter and the corner is sharper. + +for choosing a semantic segmentation network as the backbone for our normal estimation model. Table 6 shows the quantitative results of our proposed model with and without pretrained semantic segmentation weights as initialization. + +# 4.5. Depth estimation + +In recent years, single-view depth estimation has received even more interest than normal estimation. However, most current deep learning-based depth estimation methods suffer from large scale surface irregularities, as shown in Figure 9. It can be seen that the estimated geometry from an ordinary single-view depth prediction network tends not to be smooth, even in flat regions. Since surface normals are closely related to depth, they can provide large scale regularization for depth estimation. In order to prove that the predicted normal map is helpful for depth estimation, we conducted a series of depth estimation experiments. We evaluate the performance of depth prediction based on the following metrics: mean absolute relative error (ARD), root mean squared error (RMSE), root mean squared log error (RMSE $(\log)$ ) and the accuracy under threshold $(\delta_{i} < 1.25^{i}, i = 1,2,3)$ . + +
MethodsRMSERMSE (log)ARD
model-d0.3420.0870.120
model-nd0.2800.0570.104
model-pd0.2670.0530.098
+ +Table 7: Depth prediction on ScanNet [4] dataset. The numbers are lower the better. Both model-nd and model-pd perform significantly better than model-d, demonstrating the usefulness of the normal map in depth prediction. + +As shown in Table 7, we trained three networks using the ScanNet dataset, with the same training and test split as in the normal estimation evaluation: 1) a baseline depth estimation network (model-d), which takes a single image as input and outputs a depth map, 2) a joint depth and normal estimation network (model-nd), which predicts both depth and normal maps simultaneously, and 3) a depth estimation network (model-pd) that takes a color image together with a normal map from our pretrained normal estimation network as inputs. It can be seen that both model-nd and model-pd perform significantly better than model-d, which supports our idea that normals are helpful for depth estimation. Figure 9 shows that with an additional normal map as input, the predicted depth map is more regularized. + +We further ran model-pd on the NYUD-v2 dataset without retraining or fine-tuning. As shown in Table 8, it has comparable performance with the state-of-the-art models trained on NYUD-v2. + +
MethodsError metricAccuracy metric
RMSERMSE (log)ARDδ < 1.25δ < 1.252δ < 1.253
Laina et al. [15]0.5840.1640.13682.295.698.9
DORN [7]0.5470.1580.11685.696.198.6
Lee et al. [17]0.5380.1480.13183.797.199.4
Yin et al. [35]0.416-0.10887.597.699.4
model-d0.5080.1620.13283.096.199.0
model-pd0.4380.1360.10388.497.099.2
+ +Table 8: Depth prediction on NYUD-v2 [23] dataset. With a pretrained normal map as input, our proposed model-pd, trained on ScanNet, has comparable performance with the state-of-the-art trained on NYUD-v2. + +# 5. Conclusion + +In this paper, we have presented a novel single-view normal estimation method that combines a robust vanishing point and line detection method with a deep convolutional neural network. We introduced the Manhattan label map that can serve as a bridge to connect the Manhattan lines and vanishing points with the direct normal prediction in a fully differentiable manner. We demonstrated that such a combination not only allows our model to produce superior results over the state of the art but also leads to better generalization ability. Furthermore, by providing the normal map from our pretrained model as input to a depth estimation network, the performance of the depth estimation network can be significantly improved. + +# References + +[1] M. Antunes and J. P. Barreto. A global approach for the detection of vanishing points and mutually orthogonal vanishing directions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1336-1343, 2013. 2 +[2] A. Bansal, B. Russell, and A. Gupta. Marr revisited: 2d-3d alignment via surface normal prediction. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5965-5974, 2016. 1, 2 +[3] B. Caprile and V. Torre. Using vanishing points for camera calibration. International journal of computer vision, 4(2):127-139, 1990. 2 +[4] A. Dai, A. X. Chang, M. Savva, M. Halber, T. Funkhouser, and M. Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proc. Computer Vision and Pattern Recognition (CVPR), IEEE, 2017. 2, 5, 6, 8 +[5] D. Eigen and R. Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In Proceedings of the IEEE international conference on computer vision, pages 2650-2658, 2015. 1, 6 +[6] D. Eigen, C. Puhrsch, and R. Fergus. Depth map prediction from a single image using a multi-scale deep network. In Advances in neural information processing systems, pages 2366-2374, 2014. 2, 7 +[7] H. Fu, M. Gong, C. Wang, K. Batmanghelich, and D. Tao. Deep ordinal regression network for monocular depth estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2002-2011, 2018. 4, 8 +[8] R. Garg, V. K. BG, G. Carneiro, and I. Reid. Unsupervised cnn for single view depth estimation: Geometry to the rescue. In European Conference on Computer Vision, pages 740-756. Springer, 2016. 2 +[9] C. Godard, O. Mac Aodha, and G. J. Brostow. Unsupervised monocular depth estimation with left-right consistency. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 270-279, 2017. 2 +[10] R. Grompone von Gioi, J. Jakubowicz, J.-M. Morel, and G. Randall. LSD: a Line Segment Detector. Image Processing On Line, 2:35-55, 2012. 3 +[11] K. He, G. Gkioxari, P. Dólár, and R. Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961-2969, 2017. 3 +[12] J. Huang, Y. Zhou, T. Funkhouser, and L. Guibas. FrameNet: Learning local canonical frames of 3d surfaces from a single RGB image. arXiv preprint arXiv:1903.12305, 2019. 1, 3, 6, 7 +[13] J. Kosecka and W. Zhang. Video compass. pages 476-490, 2002. 3 +[14] J. Košecka and W. Zhang. Extraction, matching, and pose recovery based on dominant rectangular structures. Computer Vision and Image Understanding, 100(3):274-293, 2005. 1 +[15] I. Laina, C. Rupprecht, V. Belagiannis, F. Tombari, and N. Navab. Deeper depth prediction with fully convolutional + +residual networks. In 2016 Fourth international conference on 3D vision (3DV), pages 239-248. IEEE, 2016. 8 +[16] D. C. Lee, M. Hebert, and T. Kanade. Geometric reasoning for single image structure recovery. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 2136-2143. IEEE, 2009. 1 +[17] J.-H. Lee and C.-S. Kim. Monocular depth estimation using relative depth maps. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9729-9738, 2019. 8 +[18] Z. Li and N. Snavely. MegaDepth: Learning single-view depth prediction from internet photos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2041-2050, 2018. 3 +[19] C. Liu, K. Kim, J. Gu, Y. Furukawa, and J. Kautz. Planercnn: 3d plane detection and reconstruction from a single image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4450-4459, 2019. 3 +[20] C. Liu, J. Yang, D. Ceylan, E. Yumer, and Y. Furukawa. Planenet: Piece-wise planar reconstruction from a single RGB image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2579-2588, 2018. 3 +[21] F. Liu, C. Shen, G. Lin, and I. Reid. Learning depth from single monocular images using deep convolutional neural fields. IEEE transactions on pattern analysis and machine intelligence, 38(10):2024-2039, 2015. 2 +[22] B. Micusk, H. Wildenauer, and M. Vincze. Towards detection of orthogonal planes in monocular images of indoor environments. In 2008 IEEE International Conference on Robotics and Automation, pages 999-1004. IEEE, 2008. 1 +[23] P. K. Nathan Silberman, Derek Hoiem and R. Fergus. Indoor segmentation and support inference from RGBD images. In ECCV, 2012. 2, 6, 7, 8 +[24] X. Qi, R. Liao, Z. Liu, R. Urtasun, and J. Jia. Geonet: Geometric neural network for joint depth and surface normal estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 283-291, 2018. 2, 5, 6, 7 +[25] O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241. Springer, 2015. 4 +[26] C. Rother. A new approach to vanishing point detection in architectural environments. Image and Vision Computing, 20(9-10):647-655, 2002. 2 +[27] E. Rouy and A. Tourin. A viscosity solutions approach to shape-from-shading. SIAM Journal on Numerical Analysis, 29(3):867-884, 1992. 2 +[28] S. N. Sinha, D. Steedly, and R. Szeliski. Piecewise planar stereo for image-based rendering. In Twelfth IEEE International Conference on Computer Vision (ICCV 2009), pages 1881-1888, September 2009. 2 +[29] J. Straub, T. Whelan, L. Ma, Y. Chen, E. Wijmans, S. Green, J. J. Engel, R. Mur-Artal, C. Ren, S. Verma, A. Clarkson, M. Yan, B. Budge, Y. Yan, X. Pan, J. Yon, Y. Zou, + +K. Leon, N. Carter, J. Briales, T. Gillingham, E. Mueggler, L. Pesqueira, M. Savva, D. Batra, H. M. Strasdat, R. D. Nardi, M. Goesele, S. Lovegrove, and R. Newcombe. The Replica dataset: A digital replica of indoor spaces. arXiv preprint arXiv:1906.05797, 2019. 2, 6, 7 +[30] P. Wang, X. Shen, B. Russell, S. Cohen, B. Price, and A. L. Yuille. Surge: Surface regularized geometry estimation from a single image. In Advances in Neural Information Processing Systems, pages 172-180, 2016. 2 +[31] R. Wang, S. M. Pizer, and J.-M. Frahm. Recurrent neural network for (un-)supervised learning of monocular video visual odometry and depth. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[32] X. Wang, D. Fouhey, and A. Gupta. Designing deep networks for surface normal estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 539-547, 2015. 2 +[33] W. Xian, Z. Li, M. Fisher, J. Eisenmann, E. Shechtman, and N. Snively. Uprightnet: Geometry-aware camera orientation estimation from single images. In Proceedings of the IEEE International Conference on Computer Vision, pages 9974-9983, 2019. 3 +[34] T. Xiao, Y. Liu, B. Zhou, Y. Jiang, and J. Sun. Unified perceptual parsing for scene understanding. In Proceedings of the European Conference on Computer Vision (ECCV), pages 418-434, 2018. 4 +[35] W. Yin, Y. Liu, C. Shen, and Y. Yan. Enforcing geometric constraints of virtual normal for depth prediction. In Proceedings of the IEEE International Conference on Computer Vision, pages 5684-5693, 2019. 2, 8 +[36] A. R. Zamir, A. Sax, W. Shen, L. J. Guibas, J. Malik, and S. Savarese. Taskonomy: Disentangling task transfer learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3712-3722, 2018. 2 +[37] R. Zhang, P.-S. Tsai, J. E. Cryer, and M. Shah. Shape-from-shading: a survey. IEEE transactions on pattern analysis and machine intelligence, 21(8):690-706, 1999. 2 +[38] C. Zou, A. Colburn, Q. Shan, and D. Hoiem. Layoutnet: Reconstructing the 3d room layout from a single rgb image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2051-2059, 2018. 1, 3 \ No newline at end of file diff --git a/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/images.zip b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6796b35b1d9222ff66ff03e16933c88b129c5388 --- /dev/null +++ b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a61cf9b5faab4bfa90c802c5a03b9a1f4a11a033ada7459e11e699aa3898a6c8 +size 628591 diff --git a/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/layout.json b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2ad0f7b6431166c257d7e1aacb27010e38e7feb0 --- /dev/null +++ b/vplnetdeepsingleviewnormalestimationwithvanishingpointsandlines/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1005b5bc043fa66786e405b1169ae2241eb49a53eb529dba80cc21c8da00233 +size 420003 diff --git a/vqawithnoquestionsanswerstraining/e822037c-f638-496b-b949-6defda88b110_content_list.json b/vqawithnoquestionsanswerstraining/e822037c-f638-496b-b949-6defda88b110_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1cf43b00cd8d79883189ca4ebb75e77ddce2b992 --- /dev/null +++ b/vqawithnoquestionsanswerstraining/e822037c-f638-496b-b949-6defda88b110_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b0fb71b71ff0fab54686b69107e45b27262927f3df698bb865d7c0bdb22ef40 +size 95120 diff --git a/vqawithnoquestionsanswerstraining/e822037c-f638-496b-b949-6defda88b110_model.json b/vqawithnoquestionsanswerstraining/e822037c-f638-496b-b949-6defda88b110_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3da5b8fa00fba843f85468450f9c6791e320c784 --- /dev/null +++ b/vqawithnoquestionsanswerstraining/e822037c-f638-496b-b949-6defda88b110_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc664229a350ae825d439b26ff250a6552730cedd38e7e99d4493b4bd0c18385 +size 135669 diff --git a/vqawithnoquestionsanswerstraining/e822037c-f638-496b-b949-6defda88b110_origin.pdf b/vqawithnoquestionsanswerstraining/e822037c-f638-496b-b949-6defda88b110_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5a1e16c2f164bd2dba227881b7004f46deb7586d --- /dev/null +++ b/vqawithnoquestionsanswerstraining/e822037c-f638-496b-b949-6defda88b110_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1ebfef398c07f12e349b020f4d6736cb536d5cfbbb4484a7f4c1c77cc712b2d +size 2104016 diff --git a/vqawithnoquestionsanswerstraining/full.md b/vqawithnoquestionsanswerstraining/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ca702fe505843219b9a8a36dce86a8441d7917ba --- /dev/null +++ b/vqawithnoquestionsanswerstraining/full.md @@ -0,0 +1,445 @@ +# VQA with No Questions-Answers Training + +Ben-Zion Vatashsky Shimon Ullman Weizmann Institute of Science, Israel + +vatashsky@gmail.com, shimon.ullman@weizmann.ac.il + +# Abstract + +Methods for teaching machines to answer visual questions have made significant progress in recent years, but current methods still lack important human capabilities, including integrating new visual classes and concepts in a modular manner, providing explanations for the answers and handling new domains without explicit examples. We propose a novel method that consists of two main parts: generating a question graph representation, and an answering procedure, guided by the abstract structure of the question graph to invoke an extendable set of visual estimators. Training is performed for the language part and the visual part on their own, but unlike existing schemes, the method does not require any training using images with associated questions and answers. This approach is able to handle novel domains (extended question types and new object classes, properties and relations) as long as corresponding visual estimators are available. In addition, it can provide explanations to its answers and suggest alternatives when questions are not grounded in the image. We demonstrate that this approach achieves both high performance and domain extensibility without any questions-answers training. + +# 1. Introduction + +Visual question answering is inspired by the remarkable human ability to answer specific questions on images, which may require analysis of subtle cues, along with the integration of prior knowledge and experience. The learning of new visual classes, properties and relations, can be easily integrated into the question-answering process. Humans can elaborate on the answers they give, explain how they were derived, and why they failed to produce an adequate answer. Current approaches to handle VQA by a machine [67, 62, 55, 77, 32] take a different path, where most answering systems are trained directly to select an answer from common answers of a training set, based on fused image features (mostly using a pre-trained CNN [25]) and question features (mostly using an RNN). + +The answering approach we take below is the first, as far as we know, that does not rely on any explicit question- + +![](images/58d3421d13ae24352051e557ca596a0db5f77d02e04ac44416c71e50e9bb4a23.jpg) +Q: What shape is the object closest to the red sphere? + +![](images/5eba686982e2d44935ec385ea12818a861f4fa4ede382650be578f6c97c1f272.jpg) +Q: How many other objects are the same size as the yellow stackable object? + +![](images/7a75182312804a991137f3110ac452c9eb6b2cd77f199d06385ed74f2dba80c0.jpg) +A: cube +Q: Are all the boats white? +A: no [full: There are not enough white boats (failed due to a red boat)] +Figure 1. UnCoRd generalizes without QA training to novel properties and relations (top), and to real-world domain (bottom). + +![](images/491ead1f12d80cd339ea2577bd2109d9a2670dc8341a0d575de7060eaec7e449.jpg) +A:2 +Q: There is a person that is of a different gender than the young person closest to the cup; how old is he? +A:22-35 + +answering training. It uses a process composed according to the question's structure, and applies a sequence of 'visual estimators' for object detection and identifying a set of visual properties and relations. Answering by our 'Understand,Compose and Respond' (UnCoRd) approach is divided into two stages (illustrated in Figure 2). First, a graph representation is generated for the question, in terms of classes, properties and relations, supplemented with quantifiers and logical connectives. An answering procedure then follows the question graph, and seeks either a single or multiple assignments of the classes, properties and relations in the graph to the image (Section 3.3). The method is modular, extensible and uses intermediate results to provide elaborated answers, including alternatives to answers not grounded in the image, and notifying about unsupported categories. With an ability to handle extended domains, the UnCoRd approach demonstrates the potential to build a general answering scheme, not coupled to a specific dataset. + +Our work includes several novel contributions. First, a method that produces state-of-the-art results on the CLEVR dataset [30] without any questions-answers training. Second, we developed sequence-to-sequence based method, in + +![](images/3799c7685f52895f39f0014d42edddcc6c3f4f957f845c8113ac97a541796548.jpg) +Figure 2. A schematic illustration of our method. The first stage (1) maps the question into a graph representation using a sequence-to-sequence LSTM based model. At the second stage (2), the recursive answering procedure follows the graph, searching for a valid assignment in the image. At each step, the handled node is set and objects (extracted using mask R-CNN) are examined according to the node's requirements (utilizing corresponding visual estimators). If succeeded, a new node is set (according to a DFS traversal) and the function is called again to handle the unassigned subgraph. The Example illustrates the flow: 'check node $(a)$ $\rightarrow$ 'relation success' $\rightarrow$ 'check node $(b)$ $\rightarrow$ answer. + +dependent of images, to map questions into their graph representation. Third, we describe a formalism to represent a broad range of possible questions, with an algorithm that finds valid assignments of a question graph in the image, and provides an answer. Fourth, we present a model that can both perform well on CLEVR, as well as generalize to novel domains by just adding visual estimators (for objects, properties and relations) but without QA examples. Some examples are shown in Figure 1 (elaborated later in text). + +# 2. Related Work + +Current answering schemes are dominated by end-to-end methods, trained as multi-class classifiers. Many recent works focused on improving the image-question fused features [17, 9, 84, 10, 16], attention mechanisms for selecting important features [80, 54, 47, 4, 12, 59, 50, 27], including self and guided attention [83, 21, 82], applying pre-trained networks [65, 46, 86], and incorporating outputs of other visual tasks [23, 3, 15, 68, 40, 75, 33, 28]. Some provide reasoning using "facts" extraction (e.g. scene type) [73], image caption [42, 1, 41] or by linking visual "facts" with question's logical form [51, 36]. Other integrated external prior knowledge, by generating a query to a knowledge database [72, 14], fusing it in the representation [78, 38], using a textual image description [39] or by added loss terms [66]. The language prior was addressed as well [22, 20, 13, 76, 57]. + +Some methods use dynamic networks with architecture affected by the question [18, 56]. The Neural Module Networks (NMN) are dynamically composed out of sub-modules. Originally modules arrangement was based on the dependency parsing of the question [6, 5], while later versions used supervised answering program learning + +[31, 26, 52, 63], including a probabilistic model [71]. Note that the modules are trained only as components of an answering network for a specific dataset and do no function as independent visual estimators. One method [81] performs full scene analysis in order to carry out the program. This method uses questions-answers training to learn the programs, hence cannot be extended by a simple addition of visual estimators. Moreover, performing full scene analysis (detecting all objects, properties and relations in the scene) may become infeasible for data less restricted than CLEVR (especially for relations). In our method, the answering process is guided by the question and does not perform a full scene analysis. It allows a flexible integration of additional visual capabilities (e.g. novel object classes), providing elaborated answers and proposing alternatives. These capacities are obtained without requiring any QA examples. + +Current methods fit models to particular datasets and exploit inherent biases, which can lead to ignoring parts of the question/image, and to failures on novel domains and rephrasing [2, 60]. In contrast to the modular approach we pursue, any adaptation or upgrade requires a full retraining. + +# 3. Method + +# 3.1. Overview + +In the formalism we use, a simple question without quantifiers can be transformed to an assertion about the image that may have free variables (e.g. 'color' in 'what is the color of...'). The question is answered by finding an assignment to the image that will make the statement true, and retrieving the free variables. The quantifiers derived from the question require multiple true assignments (such as '5', 'all', etc.). The procedure we use seeks the required assignments and + +returns the desired answer. The answering process consists of two stages (see Figure 2 for a scheme): + +1. Question mapping into a graph representation - First, a representation of the question as a directed graph is generated, where nodes represent objects and edges represent relations between objects. Graph components include objects classes, properties and relations. The node representation includes all the object visual requirements needed to answer the question, which is a combination of the following (see examples in the supplement, section 1): + +- Object class $c$ (e.g. 'horse'). +- Object property $p$ (e.g. 'red'). +- Queried object property $f$ (e.g. 'color'). +- Queried set property $g$ (e.g. 'number'). +- Quantifiers (e.g. 'all', 'two'). +- Quantity relative to another node (e.g. same). +- Node type: regular or SuperNode: OR of nodes (with optional additional requirements). + +2. Answering procedure - In this stage, a recursive procedure finds valid assignments of the graph in the image. The number of required assignments for each node is determined by its quantifiers. The procedure follows the graph, invoking relevant sub-procedures and integrates the information to provide the answer. Importantly, it depends only on the abstract structure of the question graph, where the particular object classes, properties and relations are parameters, used to apply the corresponding visual estimators (e.g. which property to extract). The invoked sub-procedures are selected from a pool of the following basic procedures, which are simple visual procedures used to compose the full answering procedure: + +- Detect object of a certain class $c$ . +- Check the existence of object property $p$ . +- Return an object property of type $f$ . +- Return an object's set property of type $g$ . +- Check the existence of relation $r$ between two objects. + +Our construction of a question graph and using its abstract structure to guide the answering procedure leads to our ability to handle novel domains by adding visual estimators but using the same answering procedure. In our method we only train the question-to-graph mappers and the required visual estimators. Unlike QA training, we use independent trainings, which may utilize existing methods and be developed separately. This also simplifies domain extension (e.g. automatic modification is simpler for question-graph examples than for question-image-answer examples). + +# 3.2. Question to Graph Mapping + +Understanding natural language questions and parsing them to a logical form is a hard problem, still under study [29, 7, 74, 11, 58]. Retrieving question's structure by language parsers was previously performed in visual question + +answering [6], utilizing the Stanford Parser [34]. + +We handled the question-to-graph task as a translation problem from natural language questions into a graph representation, training an LSTM based sequence to sequence models [64]. The graph was serialized (using DFS traversal) and represented as a sequence of strings (including special tokens for graph fields), so the model task is to translate the question sequence into the graph sequence (see examples in Section 1 of the supplement). All our models use the architecture of Google's Neural Machine Translation model [79], and are trained using tensorflow implementation [48]. A simple post-processing fixes invalid graphs. The description below starts with a question-to-graph model trained for CLEVR data, and then elaborates on the generation of extended models, trained for extended scopes of questions. + +# 3.2.1 Question-to-Graph for CLEVR Data + +Our basic question-to-graph model is for CLEVR questions and categories (3 objects, 12 properties, 4 property types, 4 relations). The graph annotations are based on the CLEVR answering programs [30], corresponding to the dataset's questions. The programs can be described as trees, where nodes are functions performing visual evaluations for object classes, properties and relations. These programs can be transferred to our graph representation, providing annotations for our mappers training. Note that concepts may be mapped to their synonyms (e.g. 'ball' to 'sphere'). + +# 3.2.2 Extended Question-to-Graph Domain + +CLEVR questions are limited, both in the used categories and in question types (e.g. without quantifiers). To handle questions beyond the CLEVR scope, we trained question-to-graph mappers using modified sets of questions (randomization was shown to enable domain extension [69]). There were two types of modifications: increasing the vocabulary of visual elements (object classes, properties and relations) and adding questions of new types. The vocabulary was expanded by replacing CLEVR visual elements with ones from a larger collection. This operation does not add question examples to the set, but uses the existing examples with replaced visual elements. Note that as this stage deals with question mapping and not question answering, the questions, which are generated automatically, do not have to be meaningful (e.g. "What is the age of the water?") as long as they have a proper mapping, preserving the role of each visual element. To guarantee graph-question correspondence a preprocessing is performed where for each concept, all its synonyms are modified to one form. In addition, for each question all appearances of a particular visual element are replaced with the same term. We used three replacement 'modes', each generating a modified dataset by selecting from a corresponding set (real world categories from existing datasets): i) Minimal: Most categories are from COCO [43] and VRD [45] (100 objects, 32 properties, 7 property + +types, 82 relations). ii) Extended: 'Minimal' + additional categories, sampled from 'VG' (230 objects, 200 properties, 53 property types, 160 relations). iii) VG: The categories of the Visual Genome dataset [35] (65,178 objects, 53,498 properties, 53 property types, 47,448 relations, sampled according to prevalence in the dataset). The categories include many inaccuracies, such as mixed categories (e.g. 'fat fluffy clouds') and irrelevant concepts (e.g. objects: 'there are white'), which adds inconsistency to the mapping. + +The second type of question modification increased the variability of questions. We created enhanced question sets where additional examples were added to the sets generated by each replacement mode (including 'None'). These examples include questions where 'same $

$ ' is replaced with 'different $

$ ' (where $

$ is a property), questions with added quantifiers ('all' and numbers) and elemental questions (with and without quantifiers). The elemental questions were defined as existence and count questions for: class, class and property, class and 2 properties, 2 objects and a relation, as well as queries for objects class (in a relation) and property types (including various WH questions). + +The words vocabulary we used for training all sets was the same: 56,000 words, composed by the union of the English vocabulary from IWSLT'15 [49] together with all the used object classes, properties and relations. Both the question and the graph representations were based on the same vocabulary, with additional tokens in the graph vocabulary to mark graph nodes and fields (e.g. ,

). + +Different mappers were trained for all the modified sets above. An example of a graph, mapped using the 'Extended-Enhanced' model, as well as the corresponding original question is given in Figure 3. Note that the modified question, although meaningless, has the same structure as the original question and is mapped to the same graph, except for the replaced visual elements and added quantifiers. This means that the same answering procedure will be carried out, fulfilling our intent to apply the same procedure to similar structured questions. + +![](images/d3cf70b355beff2a5f7b4ad78229220c1eccb64ca298ec4f619e54ce275f6cb8.jpg) +Q: What is the size of the object that is both right of the cyan sphere and left of the tiny red metallic object? + +![](images/a812bb220c93349c88f51a69335e324e8acb3e4d884ce0aa1f300adfaccd425f.jpg) +Q: What is the fabric of the object that is both walking towards all the light blue girls and next to the sixteen full tied-up tiled objects? +Figure 3. Left: A CLEVR question and a corresponding graph. Right: A modified question and a corresponding graph, mapped using Extended-Enhanced model. The accuracy of the modified representation is confirmed, as it matches the original accurate graph (with modified graph concepts). + +# 3.3. Answering Procedure + +In this stage a recursive procedure seeks valid assignments (see Section 3.1) between the question graph and the + +image. The question graph, the image and the mask R-CNN [24] produced for the image provide the input to the procedure that recursively processes each node (see Figure 2). For each node, basic procedures (see Section 3.1) are invoked sequentially, according to the node's requirements and activate visual estimators according to the particular visual elements. The number of required valid assignments is set by the node's quantifier (a single assignment, a specific number, or all) or by the need of all objects for evaluating the entire object set (e.g. counting, number comparisons). The next processed nodes are according to a DFS traversal. Each basic procedure provides an answer, used to produce the final answer, reporting unsupported categories and providing elaborations, based on intermediate results. For more details and examples see Section 2 of the supplement. + +# 3.3.1 CLEVR Visual Estimators + +In order to find a valid assignment of a question graph in the image, and provide the answer, corresponding visual estimators need to be trained. Object locations are not explicitly provided for CLEVR data, however they can be automatically recovered using the provided scene annotations. This process provided approximated contour annotations for CLEVR objects (see Figure 4), which were used for training. Mask R-CNN [24] was used for instance segmentation. For property classifiers, simple CNN models (3 convolutional layers and 3 fully connected layers) were trained to classify color and material; size was estimated according to object's bottom coordinates and its largest edge. Relations are classified according to objects' locations. + +# 3.3.2 Real World Visual Estimators + +Handling questions in the real-world domain beyond CLEVR objects was performed by utilizing existing visual estimators. For instance segmentation we use a pre-trained mask R-CNN [24] for the 80 classes of COCO dataset [43]. Any other visual estimator may be incorporated to enhance answering capability. In our experiments (Section 4.2.5 and Figure 1) we use color map estimation [70], age and gender classification [37] (utilizing face detection [53]) and depth estimation [44] (utilized for estimating spatial relations). + +# 4. Experiments + +The experiments tested the abilities of the UnCoRd system, to first, provide accurate results for the CLEVR dataset and second, to handle extended questions and real-world domains. Our analysis included the two answering stages: creating a correct graph representation of the question, and answering the questions. Adam optimizer was used for question-to-graph and visual estimators training with a learning rate of $10^{-4}$ ( $10^{-3}$ for the 'Extended-Enhanced' model), selected according to the corresponding validation set results. Each model training was using one NVIDIA + +Tesla V100 GPU. All reported results are for a single evaluation. For each model, the same version was used in all experiments. Unless stated, system was configured to provide short answers (concise and without elaborations); markings on images in the figures correspond to intermediate results. Code will be available at https://github.com/benyv/uncord + +# 4.1. CLEVR Experiments + +We trained a question-to-graph model for CLEVR ('None'-'Basic', as denoted in Section 4.2.1), which generated $100\%$ perfect graphs on its validation set. The visual estimators, described in Section 3.3.1 were also trained and provided the results given in Table 1. CLEVR relations were estimated by simple rules using the objects' coordinates. + +![](images/c1866840825e2b9479f0f607cd3259d9b1b028b123264fd0b5a7ab682f042e39.jpg) +Figure 4. Instance segmentation example for CLEVR data. Left: GT (approximated from scene data), Right: results. + +![](images/54bbb2bca9b13c922352031db69ae77d93e991f8fb735a789e2b33657a879c22.jpg) +Table 1. CLEVR estimators results on CLEVR validation set + +
Estimator|APloU=50|Acc.
Ins. seg.99.0
Color
Material
Size
100
+ +We tested the answering performance of the UnCoRd system on the CLEVR test set. The results, including for other state-of-the-art methods (all use answers labels for training) are given in Table 2. + +
MethodExistCountComp. Num.Query Att.Comp. Att.Overall test setOverall val. set
IEP-strong [31]97.192.798.798.198.996.9
FiLM [56]99.394.393.499.399.397.6
DDRprog [63]98.896.598.499.199.098.3
MAC [27]99.597.199.199.599.598.9
TbD [52]99.297.699.499.599.699.1
HAN [50]99.697.296.999.699.698.8
NS-VQA [81]a99.999.799.999.899.8-99.8
UnCoRdNone-B99.8999.5499.9199.7499.8099.7499.8
+ +${}^{a}$ Reported for val. set,hence not compared to test set results + +As can be seen, our model achieves state-of-the-art results without training for the visual question answering task and not using any answers GT, as other methods. In addition UnCoRd can elaborate and explain answers and failures using intermediate results, and extend the handled domain with no need of images and related QA examples, as demonstrated in Section 4.2 and Figure 6. On a sample of 10,000 validation set examples, all mistakes were due to wrong visual estimators' predictions, mainly miss detection of a highly occluded object. Hence, accurate annotation of object coordinates (as performed in NS-VQA [81]) may even further reduce the small number of errors. Note that NS-VQA requires full scene analysis, which is not scalable for domain extension with a large number of objects and relations. It also uses images with question-answer pairs to train the programs, coupling the method to the specific + +trained question answering domain. + +# 4.2. Out of Domain Experiments + +Next, we test UnCoRd beyond the scope of CLEVR data. We trained question-to-graph models on the modified and enhanced CLEVR data and used corresponding visual estimators. We examined whether domain extension is possible while maintaining a good performance on the original data. + +# 4.2.1 Question to Graph + +For evaluating question representation, we trained and tested (see Section 3.2.2) 8 question-to-graph models that include all replacement modes (None, Minimal, Extended, VG), each trained in two forms: Basic (B), i.e. no added question examples ( $\sim$ 700K examples) and Enhanced (E), i.e. with additional examples ( $\sim$ 1.4M examples). + +In Table 3, we report the results of each trained model on the validation sets of all 8 models, which provides information on generalization across the different sets. Note that as the "None" extension, unlike the data of other models, includes mapping from concepts to their synonyms (see Section 3.2.2), prediction for "None" data by the "Minimal", "Extended" and "VG" models include a preprocessing stage transforming each concept synonyms to a single form. + +Table 2. CLEVR QA accuracy for state-of-the-art methods + +
Train\TestNoneMinimalExtendedVG
BEBEBEBE
NoneB10049.50.50.20.10.00.1
E99.799.80.50.40.10.10.1
MinimalB99.848.998.450.00.50.31.2
E99.098.698.097.70.51.01.1
ExtendedB99.148.698.249.996.249.118.1
E99.198.797.997.595.795.819.3
VGB87.544.865.734.684.145.376.9
E90.090.063.764.181.983.075.0
+ +Table 3. Accuracy of question-to-graph mapping for all data types + +Results demonstrate that models perform well on data with lower variability than their training data. The high performance of the 'Extended' models on their corresponding data illustrates that substantial extensions are possible in question-to-graph mapping without requiring any new training images. VG models' lower accuracy is expected due to the unsuitable elements in its data (see Section 3.2.2). Additional tests are required to check possible advantages of VG models for different domains. We report such a test next. + +# 4.2.2 VQA Representation + +In this experiment, representation capabilities are tested for a different dataset. Since normally, annotations corresponding to our graph representation are not provided, we sampled 100 questions of the VQA [8] validation set and manually examined the results for the eight question-to-graph models (see Section 4.2.1). + +The results in Table 4 express the large gaps in the abilities of models to represent new domains. Models trained + +specifically on CLEVR do not generalize at all to the untrained domain. As the models are trained on more diverse data, results improve substantially, peaking clearly for VG-Enhanced model by a large margin from other models. This is also evident in the example given in Figure 5 where adequacy of the graph increases in a similar manner. This result is interesting as using this model provides high accuracy for CLEVR as well (see Table 5). The fact that substantial performance gain is achieved for a data domain that was not used in training (the VQA dataset domain), while preserving good results on the original data (CLEVR), demonstrates the potential of the approach to provide a general answering system for visual questions. Further investigation is required for means to enrich question description examples and produce further significant improvements. + +
NoneMinimalExtendedVG
BEBEBEBE
10121222223450
+ +Table 4. Accuracy of graph representation for VQA [8] sample, given for the different UnCoRd mappers. As expected, training on more diverse data allows better generalization across domains. + +![](images/8b696e2c0944e1e95d5a9ca3a7b2f11939169c67d1bcbb3396b583790ab33611.jpg) +Q: What kind of ground is beneath the young baseball player? +Figure 5. Generated graphs for a free form question (from the VQA [8] dataset). Blue text: accurate concepts, red: inaccurate. + +# 4.2.3 Maintaining Performance on CLEVR Questions + +We evaluated the performance change for the CLEVR test set, as the training data variability of the question-to-graph models increases. The results are given in Table 5. + +
MapperExistCountComp. Num.Query Att.Comp. Att.Overall
NoneB99.8999.5499.9199.7499.8099.74
E99.8999.5499.9199.7499.8099.74
MinB99.8199.3699.8799.7399.8099.68
E99.6999.2199.4799.4699.5999.46
ExtB96.8289.3478.6499.4099.4194.80
E99.7899.3398.3699.6599.7699.49
VGB96.8289.3478.6499.4499.4194.81
E98.0397.3996.8897.6297.2297.49
+ +Table 5. Accuracy of CLEVR dataset question answering by UnCoRd using the different question-to-graph mappers + +It is evident that even models that were trained on a much larger vocabulary and question types than the original CLEVR data still perform well, mostly with only minor + +accuracy reduction. This demonstrates that with more variable training we can handle more complex questions, while maintaining good results on the simpler domains. Examples on CLEVR images for both CLEVR questions and others are shown in Figure 6 (using 'None-Enhanced' mapper). + +![](images/4952c36d4f50a8d6f9cc8336e30e80b14326b8ca02fb7bd98350be4fc13051e6.jpg) +(a) Q: There is a yellow thing to the right of the rubber thing on the left side of the gray rubber cylinder; what is its material? A: metal + +![](images/e6ca9dd6bc6929e68ee788afad86836467a451e7a1ec4fce86b7195fc520951f.jpg) +(b) Q: How many big cubes are of a different color than the large cylinder? A: 3 + +![](images/df06f0a3e88234e59ed84e00e5aa7f16d0fc06f56d12d3866977864ab56be2af.jpg) +(c) Q: What color is the cube to the right of the four big spheres? A: yellow + +![](images/ccd44c4bc6fee6a58c2da1d9e23c63b2e01794f307dfa2915288b6ce450a1cec.jpg) +Figure 6. Examples for answering different question types on CLEVR images: (a) taken from CLEVR, (b) includes 'different color' relation, (c) uses a quantifier, and (d) a simple property existence (+ 'all' quantifier) question. + +# 4.2.4 CLEVR Humans + +An example of using the CLEVR images with different questions is the CLEVR-Humans [31] (7145 questions in test set), where people were asked to provide challenging questions for CLEVR images. The questions vary in phrasing and in the required prior knowledge. + +
MethodNo FTFT
IEP-18k54.066.6
FiLM56.675.9
MAC57.481.5
NS-VQA-67.0
UnCoRd-NoneB60.46
E60.59
UnCoRd-MinB48.24
E52.23
UnCoRd-ExtB43.97
E52.83
UnCoRd-VGB43.47
E48.71
+ +Table 6. Question answering accuracy of CLEVR-Humans test set for state-of-the-art methods, with and without finetuning (FT). + +![](images/de27a9d3ca77e2c16115b62e9af2ba6dcca5380c4081f44662af52084c609113.jpg) +Q: What color is the item to the far left? (GT: purple) None-E A: brown, VG-E A: purple IEP-Str A (No FT): blue, IEP-Hum A (FT): purple + +![](images/8314ce2a5ec74cecb47049370f89d54ae56ed69abc050ffe1ac626a807f3d661.jpg) +Q: How many of these things could be stacked on top of each other? (GT: 8) +None-E A: 1, VG-E A: Unknown class: each other IEP-Str A (FT): 0, IEP-Hum A (FT): 2 +Figure 7. Examples for CLEVR-Humans questions + +Results, given in Table 6, demonstrate that for models without finetuning, our 'None-Enhanced' model provides state-of-the-art results (without any answer examples). For all models, questions with phrasing not included in training are prone to errors, including 'hallucinations' of concepts. Note that CLEVR-Humans answers are the same answers as in CLEVR (by instructions to workers), hence models biased towards CLEVR (the "None" models) have a better success chances. Models with a rich vocabulary may capture the question graph more accurately, but that may include concepts with no corresponding visual estimators, resulting with answers such as: "Unknown relation 'in between'". Adding such visual estimators will improve performance. Since accuracy calculation does not reward for such limitation indications, just "guessing" the answer would increase the computed accuracy, especially as success chances rise with a simple question categorization (e.g. $50\%$ for yes/no and size questions). However, indicating limitations gives a better sense of the system's level of understanding the question, and can lead to corrective actions. Such answers can be promoted in QA systems, by reducing "score" for wrong answers, or giving partial scores to answers identifying a missing component. + +Examples of CLEVR-Humans questions are given in Figure 7. It is evident that the more general model (VG-Enhanced) can perform on out of scope questions (top) and report limitations (bottom). + +# 4.2.5 Extensibility to Real-World Images + +The UnCoRd system can be naturally extended to novel domains by a simple plug-in of visual estimators. This is illustrated in Figure 1 for using new properties/relations and for an entirely different domain of real-world images. An experiment that adds questions with a novel property is presented in Section 3 of the supplement. We next describe an experiment for real-world images, where we use real world visual estimators (see Section 3.3.2) and our most general trained mapper (VG-Enhanced). We compare our model to Pythia [85], which has top performance on the VQA v2 dataset [19]. The experiment includes two parts: + +1. 'Non VQA_v2' questions: 100 questions outside Pythia's training domain (VQA v2), with unambiguous answers, on 50 COCO images (two similar questions per image with different answers). We freely generated questions to include one or more of the following categories: + +- A combination of properties and relations requirements linked by logical connectives ('and', 'or'). +- Property comparison (e.g. 'same color'). +- Quantifiers (e.g. 'all', 'five'). +- Quantity comparison (e.g. 'fewer', 'more'). +- A chain of over two objects connected by relations. + +2. 'VQA_v2' questions: 100 questions sampled from VQA v2 dataset [19] with terms that have visual estimators in + +UnCoRd and unambiguous answers (annotated by us). + +In addition to the estimators mentioned in Section 3.3.2, ConceptNet [61] is used by UnCoRd to query for optional classes when superordinate groups are used (e.g. 'animals'). More details are in Section 4 of the supplement. + +The non VQA_v2 results, given in Table 7, demonstrate the substantial advantage of UnCoRd for these types of questions. All UnCoRd's failures are due to wrong results of the invoked visual estimators. Note the substantial performance difference in Pythia between yes/no and WH questions, unlike the moderate difference in UnCoRd. We found that Pythia recognizes the yes/no group (i.e. answers 'yes'/no'), but its accuracy (56%) is close to chance level (50%). Examples of successful UnCoRd answers to the non VQA_v2 questions are provided in Figure 8, while failure examples, including failure sources, are shown in Figure 9. Pythia's answers are given as well. + +
MethodYes/NoWHOverall
Pythia [85]56.014.035.0
UnCoRd-VG-E88.064.076.0
+ +Table 7. Answering accuracy for 100 questions outside the VQA v2 domain (including quantifiers, comparisons, multiple relation chains and multiple relations and properties) on COCO images. + +![](images/1561872d9c758320735e17a7274de95ea4f097dc6ee500ed1f8292db8f5eca15.jpg) +Q: How many cell phones are left of the red cell phone that is closest to the right cell phone? + +![](images/613de5f41fcd1d68e50fbffc0f7ed6660f82d8b95d92e7893a63b328582d592b.jpg) +UnCoRd A: 9, Pythia A: 4 +UnCoRd A: 11, Pythia A: 5 +Q:Is the number of people that are to the right of the left ball the same as the number of balls? +UnCoRd A: no, Pythia A: no +Q: Is the number of people that are to the right of the left ball greater than the number of balls? +UnCoRd A: yes, Pythia A: no + +![](images/32a7deb58e6042c6d4a3667ed2723adb2191bc6bfc241abb6122446c7a0a3c2c.jpg) +Q: What object is supporting the person that is left of the person above the skateboard? +UnCoRd A: bicycle, Pythia A: skateboard + +![](images/2f1eb4e2f249c857c9c1397bbe44fd2b559b384da78e29dc8a5802c2f47872e4.jpg) +Q: How many cell phones are left of the right cell phone? +Q: What thing is on an object that is left of the person above the skateboard? +UnCoRd A: person, Pythia A: skateboard +Q: What color is the suitcase that is both below a blue suitcase and left of a suitcase? +UnCoRd A: red, Pythia A: blue +Q: What color is the suitcase that is both below a blue suitcase and right of a suitcase? +UnCoRd A: orange, Pythia A: blue + +Figure 8. Examples of UnCoRd successes in answering questions outside the VQA v2 domain on COCO images. + +Results for the 100 VQA_v2 questions are given in Table 8. As can be seen, UnCoRd's results are better by a large margin, compared to Pythia [85] end-to-end model, even + +![](images/8d9bdda60ab3286403b6bda73b0be2dab902a3b99bc5844cb8130d32d9725e3b.jpg) +Q: What color is the kite closest to the yellow kite that is left of the orange kite? + +![](images/c644414eb842bb8edfdc5d6a49586c4d82ca5241640a466698d3c70e051b6262.jpg) +Q: What color is the kite closest to the yellow kite that is right of the orange kite? +Failure source: wrong color estimation [70] (below: failed object in the red box above) +Figure 9. Examples of UnCoRd failures in answering questions outside the VQA v2 domain on COCO images. + +![](images/6b56d245cc5ea9fe1dc725715dae72dd7bda001df77ffd1d02f37de241ed7efc.jpg) +UnCoRd A: no valid orange kite, Pythia A: blue +Predicted pixels' colors (yellow instead of orange) + +![](images/6b9e955427e9f5e72f3d03b3951702fe830847280006bf2eb8ece8d10eba3843.jpg) +UnCoRd A: no valid orange kite, Pythia A: blue +Q: There is a bottle that is left of a bottle; how many wine glasses are right of it? UnCoRd A: no bottle, Pythia A: 5 +Q: There is a bottle that is right of a bottle; how many wine glasses are left of it? UnCoRd A: no bottle, Pythia A: 5 + +![](images/dad675604a9224a105ce7590a54233778317f1c7bbcf099907e95560c830476d.jpg) +Failure source: failed object detection (below: mask R-CNN results [24]) + +though questions were sampled from VQA v2, a dataset used for Pythia's training. As in the previous part, all UnCoRd's failures are only due to wrong results of the invoked visual estimators. Examples of UnCoRd's answers for the VQA_v2 questions are given in Figure 10, including the corresponding answers of Pythia. + +
MethodYes/NoWHOverall
Pythia [85]90.068.377.0
UnCoRd-VG-E97.588.392.0
+ +Table 8. Answering accuracy for 100 questions sampled from VQA v2 dataset (on terms with visual estimators in UnCoRd). + +The above experiments on real-world images show that when corresponding visual estimators are available, our method performs better than a leading end-to-end model, both for questions outside the training domain of the end-to-end model (where the advantage is substantial) and for questions from this domain. This is achieved without any question answering training. + +# 5. Conclusions and Future Directions + +We proposed a novel approach to answer visual questions by combining a language step, which maps the question into a graph representation, with a novel algorithm that maps the question graph into an answering procedure. Because the algorithm uses the abstract structure of this graph, it allows a transfer to entirely different domains. Training is performed for the language step to learn the graph representation, and for the visual step to train visual estimators. However, unlike existing schemes, our method does not use images and associated question-answer pairs for training. Our approach allows handling novel domains provided that corresponding visual estimators are available. The combination of the question graph and answering procedure + +![](images/a67c83537a4184a84c5a06aae97b58c300b88ca8514479ee08af75edb80ac99a.jpg) +Q: What kind of animal is shown? + +![](images/c23bd96dd68c82dbe6a0889e3621e2c339a6509f849ca80073037f4eaa8a8900.jpg) +VG-E A: horse [full: The type of the animal: horse, where horse is a subclass of animal] +Pythia A: horse +Q: How many people are on the motorcycle? +UnCoRd A: 1 + +![](images/047e9c74071bcb3ed545c336a2883b234f0217813e3bb6765fb3819243bebb38.jpg) +Q: Is there a boat behind the car? +VG-E A: no [full: There is no car The boat is behind a boat] + +![](images/cb0eb9ce3299bfdbbbff1d6723ff51aa5a028c047c3cc86e2cb95fcfd889e85b.jpg) +Pythia A: yes +Q: Is there a yellow bus in the picture? +UnCoRd A: no [full: There are no yellow buses (failed due to a blue + +![](images/a8beb15688f25adcab6989cafa12de7bf3c6de7f4ea4b21b98e0e1bcb9427946.jpg) +Pythia A: 1 +Q: How many brown horses are there? +UnCoRd A: 1, Pythia A: 2 + +![](images/d450c0c3f10b05e38895e5ab04315e04d68043f005ee38900000d62b7f41ee04.jpg) +Pythia A: no +Q: How many people are there? +UnCoRd A: 6, Pythia A: 7 +Figure 10. Examples of UnCoRd answers to VQA v2 questions (including 'full' answers when they add information). + +also gives the method some capacity to explain its answers and suggest alternatives when question is not grounded in the image. Based on this approach, our answering system achieves near perfect results on a challenging dataset, without using any question-answer examples. We have demonstrated that question representation and answering capabilities can be extended outside the scope of the data used in training, preserving good results for the original domain. + +Substantial work is required to obtain a system that will be able to perform well on entirely general images and questions. The main immediate bottleneck is obtaining question-to-graph mapping with general representation capabilities for a broad range of questions. Question graph representation may also be enhanced to support questions with more complex logic, as well as extending the scope of the supported visual categories (e.g. global scene types). Any general VQA requires vast estimation capabilities, as any visual category can be queried. In UnCoRd they are modularly incremented and automatically integrated with existing questions. Additional basic areas that current schemes, including ours, have only begun to address, are the use of external, non-visual knowledge in the answering process, and the composition of detailed, informative answers, integrating the language and visual aspects of VQA. + +Acknowledgements: This work was supported by EU Horizon 2020 Framework 785907 and ISF grant 320/16. + +# References + +[1] Somak Aditya, Yezhou Yang, and Chitta Baral. Explicit reasoning over end-to-end neural architectures for visual question answering. In AAAI, 2018. +[2] Aishwarya Agrawal, Dhruv Batra, and Devi Parikh. Analyzing the behavior of visual question answering models. In Conference on Empirical Methods in Natural Language Processing (EMNLP), Austin, Texas, USA, 2016. +[3] Aishwarya Agrawal, Dhruv Batra, Devi Parikh, and Aniruddha Kembhavi. Don't just assume; look and answer: Overcoming priors for visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. +[4] Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6077-6086, 2018. +[5] Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Learning to compose neural networks for question answering. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL), 2016. +[6] Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural module networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 39-48, 2016. +[7] Jacob Andreas, Andreas Vlachos, and Stephen Clark. Semantic parsing as machine translation. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), volume 2, pages 47-52, 2013. +[8] Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C. Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In International Conference on Computer Vision (ICCV), 2015. +[9] Hedi Ben-younes, Rémi Cadene, Matthieu Cord, and Nicolas Thome. Mutan: Multimodal tucker fusion for visual question answering. In The IEEE International Conference on Computer Vision (ICCV), 2017. +[10] Hedi Ben-Younes, Remi Cadene, Nicolas Thome, and Matthieu Cord. Block: Bilinear superdiagonal fusion for visual question answering and visual relationship detection. In AAAI 2019-33rd AAAI Conference on Artificial Intelligence, 2019. +[11] J. Berant, A. Chou, R. Frostig, and P. Liang. Semantic parsing on Freebase from question-answer pairs. In Empirical Methods in Natural Language Processing (EMNLP), 2013. +[12] Remi Cadene, Hedi Ben-Younes, Nicolas Thome, and Matthieu Cord. Murel: Multimodal Relational Reasoning for Visual Question Answering. In IEEE Conference on Computer Vision and Pattern Recognition CVPR, 2019. +[13] Remi Cadene, Corentin Dancette, Hedi Ben-younes, Matthieu Cord, and Devi Parikh. Rubi: Reducing unimodal biases in visual question answering. arXiv preprint arXiv:1906.10169, 2019. + +[14] Qingxing Cao, Bailin Li, Xiaodan Liang, and Liang Lin. Explainable high-order visual question reasoning: A new benchmark and knowledge-routed network. arXiv preprint arXiv:1909.10128, 2019. +[15] Mikyas T Desta, Larry Chen, and Tomasz Kornuta. Object-based reasoning in vqa. In Winter Conference on Applications of Computer Vision, WACV. IEEE, 2018. +[16] Tuong Do, Thanh-Toan Do, Huy Tran, Erman Tjiputra, and Quang D. Tran. Compact trilinear interaction for visual question answering. In ICCV, 2019. +[17] Akira Fukui, Dong Huk Park, Daylen Yang, Anna Rohrbach, Trevor Darrell, and Marcus Rohrbach. Multimodal compact bilinear pooling for visual question answering and visual grounding. In Conference on Empirical Methods in Natural Language Processing (EMNLP), Austin, Texas, USA, 2016. +[18] Peng Gao, Hongsheng Li, Shuang Li, Pan Lu, Yikang Li, Steven CH Hoi, and Xiaogang Wang. Question-guided hybrid convolution for visual question answering. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. +[19] Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Bartra, and Devi Parikh. Making the V in VQA matter: Elevating the role of image understanding in Visual Question Answering. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017. +[20] Gabriel Grand and Yonatan Belinkov. Adversarial regularization for visual question answering: Strengths, shortcomings, and side effects. In Proceedings of the Second Workshop on Shortcomings in Vision and Language, pages 1-13, 2019. +[21] Dalu Guo, Chang Xu, and Dacheng Tao. Graph reasoning networks for visual question answering. arXiv preprint arXiv:1907.09815, 2019. +[22] Yangyang Guo, Zhiyong Cheng, Liqiang Nie, Yibing Liu, Yinglong Wang, and Mohan Kankanhalli. Quantifying and alleviating the language prior problem in visual question answering. arXiv preprint arXiv:1905.04877, 2019. +[23] Tanmay Gupta, Kevin Shih, Saurabh Singh, and Derek Hoiem. Aligned image-word representations improve inductive transfer across vision-language tasks. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. +[24] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask R-CNN. In Proceedings of the International Conference on Computer Vision (ICCV), 2017. +[25] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997. +[26] Ronghang Hu, Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Kate Saenko. Learning to reason: End-to-end module networks for visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 804-813, 2017. +[27] Drew A Hudson and Christopher D Manning. Compositional attention networks for machine reasoning. In International Conference on Learning Representations (ICLR), 2018. +[28] Drew A Hudson and Christopher D Manning. Learning by abstraction: The neural state machine. arXiv preprint arXiv:1907.03950, 2019. + +[29] Robin Jia and Percy Liang. Data recombination for neural semantic parsing. arXiv preprint arXiv:1606.03622, 2016. +[30] Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C. Lawrence Zitnick, and Ross Girshick. CLEVR: A diagnostic dataset for compositional language and elementary visual reasoning. In CVPR, 2017. +[31] Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Judy Hoffman, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Inferring and executing programs for visual reasoning. In ICCV, 2017. +[32] Kushal Kafle and Christopher Kanan. Visual question answering: Datasets, algorithms, and future challenges, 2016. +[33] Hyounghun Kim and Mohit Bansal. Improving visual question answering by referring to generated paragraph captions. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (ACL), 2019. +[34] Dan Klein and Christopher D Manning. Accurate unlexicalized parsing. In Proceedings of the 41st Annual Meeting on Association for Computational Linguistics-Volume 1, pages 423–430. Association for Computational Linguistics, 2003. +[35] Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. International Journal of Computer Vision, 123(1):32-73, 2017. +[36] Jayant Krishnamurthy and Thomas Kollar. Jointly learning to parse and perceive: Connecting natural language to the physical world. TACL, 1:193-206, 2013. +[37] Gil Levi and Tal Hassner. Age and gender classification using convolutional neural networks. In IEEE Conf. on Computer Vision and Pattern Recognition (CVPR) workshops, June 2015. +[38] Guohao Li, Hang Su, and Wenwu Zhu. Incorporating external knowledge to answer open-domain visual questions with dynamic memory networks, 2017. +[39] Hui Li, Peng Wang, Chunhua Shen, and Anton van den Hengel. Visual question answering as reading comprehension. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6319-6328, 2019. +[40] Linjie Li, Zhe Gan, Yu Cheng, and Jingjing Liu. Relation-aware graph attention network for visual question answering. arXiv preprint arXiv:1903.12314, 2019. +[41] Qing Li, Jianlong Fu, Dongfei Yu, Tao Mei, and Jiebo Luo. Tell-and-answer: Towards explainable visual question answering using attributes and captions, 2018. +[42] Qing Li, Qingyi Tao, Shafiq Joty, Jianfei Cai, and Jiebo Luo. Vqa-e: Explaining, elaborating, and enhancing your answers for visual questions. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. +[43] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In Computer Vision-ECCV 2014. 2014. +[44] Fayao Liu, Chunhua Shen, Guosheng Lin, and Ian Reid. Learning depth from single monocular images using deep + +convolutional neural fields. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(10):2024-2039, 2016. +[45] Cewu Lu, Ranjay Krishna, Michael Bernstein, and Li Fei-Fei. Visual relationship detection with language priors. In European Conference on Computer Vision, 2016. +[46] Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. arXiv preprint arXiv:1908.02265, 2019. +[47] Pan Lu, Hongsheng Li, Wei Zhang, Jianyong Wang, and Xiaogang Wang. Co-attending free-form regions and detections with multi-modal multiplicative feature embedding for visual question answering. In AAAI, 2018. +[48] Minh-Thang Luong, Eugene Brevdo, and Rui Zhao. Neural machine translation (seq2seq) tutorial, 2017. +[49] Minh-Thang Luong and Christopher D. Manning. Stanford neural machine translation systems for spoken language domain. In International Workshop on Spoken Language Translation, Da Nang, Vietnam, 2015. +[50] Mateusz Malinowski, Carl Doersch, Adam Santoro, and Peter Battaglia. Learning visual question answering by bootstrapping hard attention. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. +[51] Mateusz Malinowski and Mario Fritz. A multi-world approach to question answering about real-world scenes based on uncertain input. In Neural Information Processing Systems (NIPS), pages 1682-1690, 2014. +[52] David Mascharka, Philip Tran, Ryan Soklaski, and Arjun Majumdar. Transparency by design: Closing the gap between performance and interpretability in visual reasoning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4942-4950, 2018. +[53] M. Mathias, R. Benenson, M. Pedersoli, and L. Van Gool. Face detection without bells and whistles. In ECCV, 2014. +[54] Duy-Kien Nguyen and Takayuki Okatani. Improved fusion of visual and language representations by dense symmetric co-attention for visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6087–6096, 2018. +[55] Supriya Pandhre and Shagun Sodhani. Survey of recent advances in visual question answering, 2017. +[56] Ethan Perez, Florian Strub, Harm de Vries, Vincent Dumoulin, and Aaron C. Courville. Film: Visual reasoning with a general conditioning layer. In AAAI, 2018. +[57] Arijit Ray, Karan Sikka, Ajay Divakaran, Stefan Lee, and Giedrius Burachas. Sunny and dark outside?! improving consistency in vqa through entailed question generation. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2019. +[58] Michael Ringgaard, Rahul Gupta, and Fernando CN Pereira. Sling: A framework for frame semantic parsing. arXiv preprint arXiv:1710.07032, 2017. +[59] Ramprasaath R Selvaraju, Stefan Lee, Yilin Shen, Hongxia Jin, Dhruv Batra, and Devi Parikh. Taking a hint: Leveraging explanations to make vision and language models more grounded. arXiv preprint arXiv:1902.03751, 2019. + +[60] Meet Shah, Xinlei Chen, Marcus Rohrbach, and Devi Parikh. Cycle-consistency for robust visual question answering. arXiv preprint arXiv:1902.05660, 2019. +[61] Robert Speer and Catherine Havasi. Conceptnet 5: A large semantic network for relational knowledge. In The People's Web Meets NLP: Collaboratively Constructed Language Resources, pages 161-176. Springer Berlin Heidelberg, 2013. +[62] Yash Srivastava, Vaishnav Murali, Shiv Ram Dubey, and Snehasis Mukherjee. Visual question answering using deep learning: A survey and performance analysis. arXiv preprint arXiv:1909.01860, 2019. +[63] Joseph Suarez, Justin Johnson, and Fei-Fei Li. Ddrprog: A clever differentiable dynamic reasoning programmer. arXiv preprint arXiv:1803.11361, 2018. +[64] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems 27, pages 3104-3112. Curran Associates, Inc., 2014. +[65] Hao Tan and Mohit Bansal. Lxmert: Learning cross-modality encoder representations from transformers. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2019. +[66] Damien Teney, Ehsan Abbasnejad, and Anton Hengel. On incorporating semantic prior knowledge in deep learning through embedding-space constraints. arXiv preprint arXiv:1909.13471, 2019. +[67] Damien Teney, Peter Anderson, Xiaodong He, and Anton van den Hengel. Tips and tricks for visual question answering: Learnings from the 2017 challenge, 2017. +[68] Damien Teney, Lingqiao Liu, and Anton van den Hengel. Graph-structured representations for visual question answering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. +[69] Josh Tobin, Rachel Fong, Alex Ray, Jonas Schneider, Wojciech Zaremba, and Pieter Abbeel. Domain randomization for transferring deep neural networks from simulation to the real world. In 2017 IEEE/RSJ international conference on intelligent robots and systems (IROS), 2017. +[70] Joost Van De Weijer, Cordelia Schmid, and Jakob Verbeek. Learning color names from real-world images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2007. +[71] Ramakrishna Vedantam, Karan Desai, Stefan Lee, Marcus Rohrbach, Dhruv Batra, and Devi Parikh. Probabilistic neural-symbolic models for interpretable visual question answering. arXiv preprint arXiv:1902.07864, 2019. +[72] Peng Wang, Qi Wu, Chunhua Shen, Anton van den Hengel, and Anthony Dick. FVQA: Fact-based visual question answering, 2016. +[73] Peng Wang, Qi Wu, Chunhua Shen, and Anton van den Hengel. The vqa-machine: Learning how to use existing vision algorithms to answer new questions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1173-1182, 2017. +[74] Yushi Wang, Jonathan Berant, and Percy Liang. Building a semantic parser overnight. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural + +Language Processing (Volume 1: Long Papers), volume 1, pages 1332-1342, 2015. +[75] Jialin Wu, Zeyuan Hu, and Raymond J. Mooney. Generating question relevant captions to aid visual question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (ACL), 2019. +[76] Jialin Wu and Raymond J Mooney. Self-critical reasoning for robust visual question answering. arXiv preprint arXiv:1905.09998, 2019. +[77] Qi Wu, Damien Teney, Peng Wang, Chunhua Shen, Anthony Dick, and Anton van den Hengel. Visual question answering: A survey of methods and datasets, 2016. +[78] Qi Wu, Peng Wang, Chunhua Shen, Anthony Dick, and Anton van den Hengel. Ask me anything: Free-form visual question answering based on knowledge from external sources. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. +[79] Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google's neural machine translation system: Bridging the gap between human and machine translation, 2016. +[80] Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. +[81] Kexin Yi, Jiajun Wu, Chuang Gan, Antonio Torralba, Pushmeet Kohli, and Joshua B Tenenbaum. Neural-Symbolic VQA: Disentangling Reasoning from Vision and Language Understanding. In Advances in Neural Information Processing Systems (NIPS), 2018. +[82] Zhou Yu, Yuhao Cui, Jun Yu, Dacheng Tao, and Qi Tian. Multimodal unified attention networks for vision-and-language interactions. arXiv preprint arXiv:1908.04107, 2019. +[83] Zhou Yu, Jun Yu, Yuhao Cui, Dacheng Tao, and Qi Tian. Deep modular co-attention networks for visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6281–6290, 2019. +[84] Zhou Yu, Jun Yu, Jianping Fan, and Dacheng Tao. Multimodal factorized bilinear pooling with co-attention learning for visual question answering. In Proc. IEEE Int. Conf. Comp. Vis, volume 3, 2017. +[85] Yu Jiang*, Vivek Natarajan*, Xinlei Chen*, Marcus Rohrbach, Dhruv Batra, and Devi Parikh. Pythia v0.1: the winning entry to the vqa challenge 2018. arXiv preprint arXiv:1807.09956, 2018. +[86] Luowei Zhou, Hamid Palangi, Lei Zhang, Houdong Hu, Jason J Corso, and Jianfeng Gao. Unified vision-language pre-training for image captioning and vqa. arXiv preprint arXiv:1909.11059, 2019. \ No newline at end of file diff --git a/vqawithnoquestionsanswerstraining/images.zip b/vqawithnoquestionsanswerstraining/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1f24c9a3051905f9a27467b715f861801f9c531e --- /dev/null +++ b/vqawithnoquestionsanswerstraining/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c7acdd5bebc8258d935240205f6e5a90a2cd2b2877d2defd1ca323bf19a79df +size 575472 diff --git a/vqawithnoquestionsanswerstraining/layout.json b/vqawithnoquestionsanswerstraining/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..287690541b6e722fd2b218eee042239d4a0bddd0 --- /dev/null +++ b/vqawithnoquestionsanswerstraining/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64d042cbfc521e861276a5d8c17662a09b0e9222284ea3ebcf06f6fc64efe8e6 +size 519732 diff --git a/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/102e27b9-c27c-4c7b-878a-389f497636d1_content_list.json b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/102e27b9-c27c-4c7b-878a-389f497636d1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e12e15813c69015fbbdf0df4eee68a0602bff5d3 --- /dev/null +++ b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/102e27b9-c27c-4c7b-878a-389f497636d1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d0c123da4bfb4c9ff18897617bb712430a63af12af1b20942e8ecd0ad6bb3c1 +size 80362 diff --git a/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/102e27b9-c27c-4c7b-878a-389f497636d1_model.json b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/102e27b9-c27c-4c7b-878a-389f497636d1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..cdc0245d0a9ab57227bb207c939866c425289d84 --- /dev/null +++ b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/102e27b9-c27c-4c7b-878a-389f497636d1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78b31c577f8dbbc741e4fc5d5686f2b2ac6fa05831b7e2a16d2b95fdcf8c8757 +size 98016 diff --git a/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/102e27b9-c27c-4c7b-878a-389f497636d1_origin.pdf b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/102e27b9-c27c-4c7b-878a-389f497636d1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8863793b0abbbbf0011dad08261b4920fb07aae5 --- /dev/null +++ b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/102e27b9-c27c-4c7b-878a-389f497636d1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb86196b232e2f13d73df71d3b5aed1c8aa2ba205759471b15099c3e31218d80 +size 584445 diff --git a/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/full.md b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/full.md new file mode 100644 index 0000000000000000000000000000000000000000..65bdd7409f7cbe8adfddcfd51bcd16c3d60490e5 --- /dev/null +++ b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/full.md @@ -0,0 +1,376 @@ +# VSGNet: Spatial Attention Network for Detecting Human Object Interactions Using Graph Convolutions + +Oytun Ulutan*† + +A S M Iftekhar* + +B. S. Manjunath + +Department of Electrical and Computer Engineering +University of California, Santa Barbara, CA + +# Abstract + +Comprehensive visual understanding requires detection frameworks that can effectively learn and utilize object interactions while analyzing objects individually. This is the main objective in Human-Object Interaction (HOI) detection task. In particular, relative spatial reasoning and structural connections between objects are essential cues for analyzing interactions, which is addressed by the proposed Visual-Spatial-Graph Network (VSGNet) architecture. VSGNet extracts visual features from the human-object pairs, refines the features with spatial configurations of the pair, and utilizes the structural connections between the pair via graph convolutions. The performance of VSGNet is thoroughly evaluated using the Verbs in COCO (V-COCO) and HICO-DET datasets. Experimental results indicate that VSGNet outperforms state-of-the-art solutions by $8\%$ or 4 mAP in V-COCO and $16\%$ or 3 mAP in HICO-DET. Code is available online. $^{1}$ + +# 1. Introduction + +The task of detecting human object interaction (HOI) in images refers to detecting the interactions between a human and object pair and localizing them. HOI detection can be considered a part of the task of visual scene understanding [2, 33, 31], visual question answering [3, 32, 20, 27], and activity recognition in videos [19, 30, 28]. Although there has been significant improvements in recent years for detecting and recognizing objects [6, 23, 10], HOI detection still poses various challenges. For example, interactions usually happen in a subtle way, same types of relations vary significantly across different settings, multiple humans can interact with the same object or vice-versa, and different relations might have visually subtle differences [8, 1]. + +Most of the existing methods in HOI detection task [15, 4, 7] follow a similar structure. Using an object detection framework, human and object features are extracted. These + +![](images/3d74551b941c27f82712c3bb7f5c511b07a98479d2446e7812fbc3c1c606bd24.jpg) +Figure 1. Visual, Spatial and Graph branches of our proposed VSGNet model. Visual branch analyzes humans/objects/context individually, Spatial branch uses spatial configurations of the pairs to refine visual features and the Graph branch utilizes the structural connections by Graph convolutions which uses interaction proposal scores as edge intensities between human-object nodes. + +features are paired exhaustively along with some other features (e.g. pose, relative geometric locations) [15, 4] and then fed into a multi-branch deep neural network to detect the relationship between humans and objects. Even though this approach achieves good results for detecting HOIs, it does not explicitly utilize the interaction information or the spatial relations between pairs. HOIs such as person on a skateboard or a person holding a bat have well defined spatial relations and structural interactions which should be leveraged in this detection task. + +For utilizing spatial configurations, VSGNet uses a spatial attention branch that explicitly uses the spatial relations of the pairs to refine the visual features. Instead of modeling humans and objects individually, our attention module uses the spatial configurations of the pairs to extract attention weights which refine the visual features. Although a few past works [1, 4] have used these types of spatial configurations as features for classification directly, these models do not combine the visual information with spatial informa + +tion. These features are more useful for refining the visual features and providing an attention mechanism for modeling the interactions of the human-object pairs explicitly. + +For modeling the interactions, an image can be defined as a graph. Nodes in this graph are the humans and objects, in which case the edges define the interactions. As the edges between nodes define interactions between pairs, our model utilizes the interaction proposal scores as the intensities of the edges in the graph. Interaction proposal scores are generated from the spatially refined visual features and they quantify if the human-object pair is interacting. + +To summarize, the proposed VSGNet for HOI detection refines the visual features using spatial relations of humans and objects. This approach amplifies the visual features of spatially relevant pairs while damping the others. Additionally, this model uses graph convolutional networks to model the interactions between humans and objects. The resulting model consists of multiple specialized branches. We evaluate our model on V-COCO[8] and HICO-DET[1] datasets and demonstrate 4 mAP (8%) and 3 mAP (16%) improvement over the state of the art methods. + +# Technical Contributions: + +- We propose a new spatial attention branch that leverages the spatial configuration of human-object pairs and refines the visual features such that spatially relevant human-object pairs are amplified. +- We use a graph convolutional branch which utilizes the structural connections between humans and objects. The interaction proposal score, generated from the spatially refined features, are used to define the edge intensities between human and object nodes. +- We implement a robust pipeline that contains Visual, Spatial and Graph based branches named VSGNet. This model achieves state-of-the-art results for HOI detection task on V-COCO and HICO-DET datasets. + +# 2. Related Work + +Object Detection: For detecting HOIs the first step is to detect humans and objects properly. With the recent object detection frameworks like RCNN [6], Faster RCNN [23],YOLO [22], Feature Pyramid Network [16] and SSD [18], models are able to detect multi scale objects robustly in images. Following this we utilize a pre-trained Faster-RCNN model in our network for detecting humans and objects. Additionally, we utilize the region proposal network idea from Faster-RCNN and extend it to interaction proposals which predict if an human-object pair is interacting. + +Human Object Interaction: Activity recognition is a research area in computer vision that has received interest for a long time. There are different datasets like UCF-101 [25], Thumos [12] with a focus on detecting human + +actions in videos. But in these datasets, the goal is to detect one action in a short video which is not representative of real life scenarios. To extend human activity recognition in images Gupta et al. [8] introduced V-COCO dataset and Chao et al. [1] introduces HICO-DET dataset. These datasets are different from the previous datasets as they require models to explicitly detect humans, objects and their interactions. This extends the task to include detection of human activities while localizing the humans and the objects. + +For the HOI detection task, Gkioxari et al. [7] proposed a human-centric approach arguing that human appearance provides strong cues in both detecting the action and localizing the object. This method does not consider interactions where the object is far away from the human. Qi et al. [21] proposed a graph based network which depends on detecting an adjacency matrix between various nodes (here, nodes are humans and objects) but does not utilize any spatial relation cues between pairs. Kolesnikov et al. [13] incorporates the HOI detection process with the object detection by individually analyzing humans and objects without considering the relationship between the pairs. + +Gao et al. [4] proposed an attention network based on the previous work of [29]. They derived an attention map from the human and object features over the whole convolutional feature map. Although they used a binary spatial map similar to [1], they use the spatial map to extract features and concatenate them with human visual features. As these are two completely different features defining separate things, concatenation does not enforce spatial configurations as much as an attention mechanism. To address this in our network we use the spatial features as attention maps which refines our visual features. + +Li et al. [15] integrated pose estimation with the iCAN [4] and predicted the interaction probabilities between a human and object pair. These methods however, do not explicitly leverage the interaction probabilities to detect the relational structure between the human and object pairs. Our VSGNet addresses this by utilizing a graph network for learning interactions and achieves better results without using poses which shows VSGNet can benefit from pose estimation as well. + +# 3. Proposed Method + +This section introduces our proposed VSGNet for detecting human-object interactions(HOI). From each given image, the task is to detect bounding boxes for the humans, objects and correctly label the interactions between them. Each human-object pair can have multiple interaction labels and each scene can include multiple humans and objects in them. We simplify the task by running a pre-trained object detector which detects humans and objects in an image. + +Detecting the interactions between human-object pairs is a challenging task. Simple methods such as extracting + +![](images/a5d29a6dcb15443f3863d2476eb8df693ad492b1ca615503c8fbe8f2d6672609.jpg) +Figure 2. Model Architecture. Rounded rectangles are operations, sharp rectangles are extracted features and $\otimes$ is element-wise multiplication. The model consists of three main branches. Visual branch extracts human, object and context features. Spatial Attention branch refines the visual features by utilizing the spatial configuration of the human-object pair. Graph Convolutional branch extracts interaction features by considering humans/objects as nodes and their interactions as edges. Action class probabilities from each branch and the interaction proposal score are multiplied together to aggregate the final prediction. These operations are repeated for every human-object pair. + +features from human and object locations individually and analyzing them are ineffective as these methods ignore the contextual information of the surroundings and the spatial relations of the human-object pair. Extensions such as using union boxes to model the spatial relations/context also fall short as they don't explicitly model the interactions. To address these issues, we propose a multi-branch network with specialized branches. The proposed VSGNet consists of the Visual Branch (Section 3.2) which extracts visual features from human, object and surrounding context individually; the Spatial Attention Branch (Section 3.3) which models spatial relations between the human-object pair; and the Graph Convolutional Branch (Section 3.4) which considers the scene as a graph with humans and objects as nodes and models the structural interactions. The proposed model architecture with the branches is shown in Fig.2. + +# 3.1. Overview + +The inputs to our model are image features $\mathbf{F}$ from a backbone CNN (e.g. ResNet-152 [10]) and bounding boxes $x_{h}$ for human $h\in [1,H]$ and $x_{o}$ for object $o\in [1,O]$ . $H$ and $O$ represents the total number of humans and objects in the scene respectively. Bounding boxes are obtained from a pre-trained object detector. We define the objective of this model as: + +- Detect if human $h$ is interacting with object $o$ with an interaction proposal score $i_{h,o}$ . +- Predict the action class probability vector $\mathbf{p}_{h,o}$ of size $A$ where $A$ is the number of classes. + +# 3.2. Visual Branch + +This branch focuses on extracting visual features for the human-object pairs. Following the object detection methods, we use region of interest (RoI) pooling on the human/object regions to extract features. This operation is followed by a residual block (Res) [10] and global average pooling(GAP) operations to extract the visual feature vectors for objects and humans. + +$$ +\mathbf {f} _ {h} = G A P \left(R e s _ {h} \left(R o I (\mathbf {F}, x _ {h})\right)\right) \tag {1} +$$ + +$$ +\mathbf {f} _ {o} = G A P \left(R e s _ {o} \left(R o I (\mathbf {F}, x _ {o})\right)\right) \tag {2} +$$ + +where $Res_{\{\}}$ represents residual blocks, $\mathbf{f}_h$ and $\mathbf{f}_o$ are visual feature vectors of sizes $R$ . This operation is repeated for each human $h$ and object $o$ . + +Context plays an important role in detecting HOI. Surrounding objects, background and other humans can help detecting the interactions. We include the context in our network by extracting features from the entire input image followed by a residual block and global average pooling. + +$$ +\mathbf {f} _ {C} = G A P \left(R e s _ {C} (\mathbf {F})\right) \tag {3} +$$ + +where $\mathbf{f}_C$ is a feature vector of size $R$ . + +Finally, this branch combines all the visual feature vectors by concatenating them and projecting it by a fully connected layer. + +$$ +\mathbf {f} _ {h o} ^ {\text {V i s}} = \mathbf {W} _ {v i s} \left(\mathbf {f} _ {h} \oplus \mathbf {f} _ {o} \oplus \mathbf {f} _ {C}\right) \tag {4} +$$ + +![](images/30f338a3522464c2aae27e9cd115ae7552a52a08f2c8465d2522d4c2b4d6abf5.jpg) +Figure 3. Spatial Attention Branch. Initially human, object and context visual features are extracted from the image using RoI pooling. Using binary maps of human and object locations, spatial attention features are extracted using convolutions. These attention features encode the spatial configuration of the human-object pair. Attention features are used to refine the visual features by amplifying the pairs with high spatial correlation. + +where $\oplus$ is the concatenation operation, $\mathbf{W}_{\{\}}$ is the projection matrix, $\mathbf{f}_{ho}^{Vis}$ is the combined visual feature vector of dimension $D$ which represents the human-object pair $ho$ . + +The feature $\mathbf{f}_{ho}^{Vis}$ can be used directly for classifying actions. We implement this as a base model for comparisons. + +# 3.3. Spatial Attention Branch + +This branch focuses on learning the spatial interaction patterns between humans and objects. The main task is to generate attention features which are used to refine the visual features by amplifying the pairs with high spatial correlation. This branch is visualized in Fig.3. + +Given the human bounding box $x_{h}$ and object bounding box $x_{o}$ , we generate two binary maps. These binary maps have zeros everywhere except in locations defined by human and object box coordinates $x_{h}$ and $x_{o}$ for each map respectively. This generates a 2-channel binary spatial configuration map $\mathbf{B}_{ho}$ . + +Similar to [1, 4], we use 2 layers of convolutions to analyze the binary spatial configuration map. This is followed by a GAP operation and a fully connected layer. + +$$ +\mathbf {a} _ {h o} = \mathbf {W} _ {\text {S p a t}} (G A P (\operatorname {C o n v} (\mathbf {B} _ {h o}))) \tag {5} +$$ + +where $\mathbf{a}_{ho}$ is an attention feature vector of size D and represents the spatial configuration of the human-object pair $ho$ . As the objects and humans are defined in different channels, using convolutions on the binary spatial configuration maps $\mathbf{B}_{ho}$ allows the model to learn the possible spatial relations between humans and objects. + +Since $\mathbf{a}_{ho}$ encodes the spatial configuration, it can be used directly to classify the HOIs as in [1]. We keep this classification as an auxiliary prediction but mainly use $\mathbf{a}_{ho}$ as an attention mechanism for refining visual features. Auxiliary predictions can be defined as: + +$$ +\mathbf {p} _ {h o} ^ {A t t} = \sigma \left(\mathbf {W} _ {A t t} \left(\mathbf {a} _ {h o}\right)\right) \tag {6} +$$ + +where $\mathbf{p}_{ho}^{Att}$ is the action class probabilities of size $A$ and $\sigma$ is the sigmoid function. + +The attention vector $\mathbf{a}_{ho}$ and the visual feature vector $\mathbf{f}_{ho}^{Vis}$ are set to be the same size $D$ . This allows us to multiply these two vectors together in order to refine the visual features with spatial configuration. We use $\mathbf{a}_{ho}$ as an attention function and multiply $\mathbf{a}_{ho}$ and $\mathbf{f}_{ho}^{Vis}$ elementwise. + +$$ +\mathbf {f} _ {h o} ^ {R e f} = \mathbf {a} _ {h o} \otimes \mathbf {f} _ {h o} ^ {V i s} \tag {7} +$$ + +where $\otimes$ is element-wise multiplication and $f_{ho}^{Ref}$ is the spatially refined feature vector of size $D$ . + +The refined feature vector is then used to predict the interaction proposal score of human-object pair $ho$ and to predict the action class probabilities. + +$$ +i _ {h o} = \sigma \left(\mathbf {W} _ {I P} \left(\mathbf {f} _ {h o} ^ {R e f}\right)\right) \tag {8} +$$ + +$$ +\mathbf {p} _ {h o} ^ {R e f} = \sigma \left(\mathbf {W} _ {R e f} \left(\mathbf {f} _ {h o} ^ {R e f}\right)\right) \tag {9} +$$ + +where $i_{ho}$ is the interaction proposal probability of size 1 and $\mathbf{p}_{ho}^{Ref}$ is the action class probabilities of size $A$ . + +# 3.4. Graph Convolutional Interaction Branch + +This branch uses a graph convolutional network to generate effective features for humans and objects. Graph convolutional networks extract features that model the structural relations between nodes. This is done by traversing and updating the nodes in the graph using their edges. In this setting, we propose to use humans and objects as nodes and their relations as edges. + +Instead of having a fully connected graph, we connect each human with every object and each object with every human. However, without this simplification, proposed model can also be extended to fully connected settings. + +Given the visual features $\mathbf{f}_h$ , $\mathbf{f}_o$ and connecting the edges between humans and objects, graph features $\mathbf{f}_h^\prime$ and $\mathbf{f}_o^\prime$ are defined as follows: + +$$ +\mathbf {f} _ {h} ^ {\prime} = \mathbf {f} _ {h} + \sum_ {o = 1} ^ {O} \alpha_ {h o} \mathbf {W} _ {o h} \left(\mathbf {f} _ {o}\right) \tag {10} +$$ + +$$ +\mathbf {f} _ {o} ^ {\prime} = \mathbf {f} _ {o} + \sum_ {h = 1} ^ {H} \alpha_ {o h} \mathbf {W} _ {h o} (\mathbf {f} _ {h}) \tag {11} +$$ + +where $\alpha_{ho}$ defines the adjacency between $h$ and $o$ and $\mathbf{W}_{oh}$ , $\mathbf{W}_{ho}$ are mapping functions which project the object features to human feature space and vice versa. Previous works [14, 21] defined the adjacency as visual similarity. In our task, however, adjacency defines interactions between + +![](images/f293166c05f84cf1d6db26f9c8d7a3dbaf9f6a23bd837c4c9573a3d7f4a90dcc.jpg) +Figure 4. Graph Convolutional Branch. This model learns the structural connections between humans and objects. For this task, we define the humans and objects as nodes and only connecting edges between human-object pairs. Instead of using visual similarity as the edge adjacency, we propose to use the interaction proposal scores. This allows the edges to utilize the interactions between human-object pairs and generates better features. + +nodes of visually unsimilar things which are human and object. Following this idea, we define adjacency values between $h$ and $o$ pair as: + +$$ +\alpha_ {h o} = \alpha_ {o h} = i _ {h o} \tag {12} +$$ + +where $i_{ho}$ is the interaction proposal score which are generated from the spatially refined visual features and measure the interactions of the human-object pair. Pairing up the graph features, classification predictions are calculated as: + +$$ +\mathbf {p} _ {h o} ^ {\text {G r a p h}} = \sigma \left(\mathbf {W} _ {\text {g r a p h}} \left(f _ {h} ^ {\prime} \oplus f _ {o} ^ {\prime}\right)\right) \tag {13} +$$ + +where $\oplus$ is concatenation operation and $\mathbf{p}_{ho}^{Graph}$ is the action class probabilities of size $A$ . + +The graph convolutional branch is visualized in Figure 4. This concludes all of the outputs of the proposed network. Finally we combine the action predictions and the interaction proposal scores by multiplying the probabilities similar to previous works [4, 15, 7]. + +$$ +\mathbf {p} _ {h o} = \mathbf {p} _ {h o} ^ {A t t} \times \mathbf {p} _ {h o} ^ {R e f} \times \mathbf {p} _ {h o} ^ {G r a p h} \times i _ {h o} \tag {14} +$$ + +where $P_{ho}$ is the final prediction vector of size $A$ . + +# 4. Experiments + +We first introduce the datasets and our evaluation metrics along with our implementation details and then perform extensive quantitative and qualitative analysis on our model and show the improvements over the existing methods. + +# 4.1. Datasets and Evaluation Metrics + +Datasets: To evaluate our model's performance, we use the V-COCO [8] and HICO-DET [1] datasets. + +V-COCO is derived from COCO [17] dataset. It has 10,346 images. 2533 images are for training, 2867 images are for validating and 4946 images are for testing. The training and validation set images are from COCO training set and the test images are from the COCO validation set. Each person in the images are annotated with a label indicating one of the 29 actions. If an object in the image is related to that action then the object is also annotated. Among these 29 actions, four of them has no object pair and one of them (point) has only 21 samples. Following the previous HOI detection works, we are not going to report our performance in these classes. We report our performance for the rest of the 24 classes. + +HICO-DET is a large dataset for detecting HOIs with 38118 training and 9658 testing images. HICO-DET annotates the images for 600 human-object interactions. Following the previous works, in HICO-DET we report our performance in Full, Rare and Non-Rare Categories. These categories are based on the number of training samples [1]. + +Metrics: Following [8] we evaluate our performance on two types of average precision(AP) metrics: Scenario 1 and Scenario 2. During AP calculation in both metrics, a prediction for a human-object pair is considered correct (1) if the human and object bounding boxes have an IoU greater than 0.5 with the ground-truth boxes and (2) the interaction class label of the prediction for the pair is correct. For the cases when there is no object(human only), in Scenario 1 a prediction is correct if the corresponding bounding box for the object is empty and in Scenario 2 the bounding box of the object is not considered. This makes Scenario 1 much harsher than Scenario 2 [8]. In HICO-DET our evaluation metrics is similar to the Scenario 1 case of V-COCO. + +# 4.2. Implementation Details + +Resnet-152 [10] network is used as the backbone feature extractor. We extract the input feature map before the last residual block of Resnet-152. This serves as the input to the rest of the network. We extract $10 \times 10$ feature maps for all the humans and objects from the input feature map by region of interest pooling [5]. Extracted RoIs and input feature map(context) pass through a residual block followed by a global average pooling similar to [4]. After these steps, we obtain three feature vectors of size $R = 1024$ for human, object and context. These are fed to the rest of the network. For the spatial attention branch we have used $64 \times 64 \times 2$ binary inputs. Before the element wise multiplication with the attention vector in the spatial attention branch, we project all our input feature vectors to a $D = 512$ dimensional space followed by a ReLU. In our final classification layer for all the branches, we have one linear layer. + +For training the network, we utilize off-the-shelf Faster-RCNN [23] to generate human and object bounding boxes. We have filtered the detected bounding boxes by setting 0.6 confidence threshold for human bounding boxes and 0.3 for object bounding boxes. The threshold values are chosen experimentally. Following [7] we did not fine tune the backbone CNN Resnet-152 [10] and Faster-RCNN during our training process. Faster-RCNN was trained on the COCO [17] training set and did not see any image from V-COCO testing sets. Unlike previous works[4, 15], we do not use ground truth boxes during training as object proposals. As our object detector is robust, we directly use the bounding boxes generated from the detector which generates sufficient amount of positive and negative boxes. + +Initially, we have trained the model on the training set of V-COCO while validating with the validation set. Then we train the model in both training and validation set like [7]. Our initial learning rate is set to 0.01 with a batch size of 8. As optimizer, Stochastic Gradient Descent(SGD) have been used with a weight decay of 0.0001 and a momentum of 0.9. To reduce the training time we have increased our learning rate to 0.01 for all the layers except for the spatial attention branch between epoch 9 to epoch 21. We trained the whole model for 50 epochs. + +For HICO-DET we use the same hyper-parameters from V-COCO. We train the network individually for 20 epochs in HICO-DET training set without any initialization from the V-COCO model. + +During inference, we multiply all the prediction outputs from the different branches of our network as in 14. Additionally, we multiply the final prediction output with the detection confidences of the human and object from the object detector. To differentiate between high and low quality detection scores we have adopted Low grade Instance Suppressive Function (LIS) [15]. We additionally remove the incompatible interaction-object pairs by using a post processing similar to iCAN [4] (e.g. if the object is not phone then the interaction can not be talk on the phone). + +While making inference most of the existing[4, 15, 7] models multiply all the outputs from different modules but these modules are optimized separately while training. Following [9] we have used a single cross entropy loss function for each action class to optimize the network. One thing to note is that as in Eq. 14, interaction proposal score is also multiplied in these predictions and included in predictions for every class. This allows the proposal score to quantify if there are interactions between the human-object pair regardless of the class of that interaction. Our experiments show that combining all the predictions and using a single loss function improves the performance. + +
V-COCOmAP(Sc 1)mAP(Sc 2)
InteractNet [7]40.047.98
Kolesnikov et al. [13]41.0-
GPNN [21]44.0-
iCAN [4]45.352.4
Li et al. [15]47.8-
VSGNet51.7657.03
+ +Table 1. Comparison of results in V-COCO [8] test set on Scenario 1 and Scenario 2. Our method outperforms the closest method by $8\%$ . For actor only classes (no object), scenario 1 requires the model to detect it specifically as no object, whereas scenario 2 ignores if there is an object assigned to that prediction. Some of these methods did not provide results for scenario 2. + +
HICO-DET (mAP)FullRareNon-Rare
HO-RCNN [1]7.815.378.54
InteractNet [7]9.947.1610.77
GPNN [21]13.119.349.34
iCAN [4]14.8410.4516.15
Li et al. [15]17.0313.4218.11
VSGNet19.8016.0520.91
+ +Table 2. Comparison of results in HICO-DET [8] test set. VSGNet outperforms the closest method by $16\%$ . + +# 4.3. Comparisons with the State of the Art + +We compare our model's performance with five recent state of the art methods [7, 13, 21, 4, 15] in both of the datasets. We report mean Average Precision (mAP) score in the settings provided by [8] and [1]. + +Table 1 shows that our method outperforms all the existing models and achieves an improvement of $4\mathrm{mAP}$ in scenario 1 for V-COCO dataset. We also reported our performance in scenario 2 which outperforms all the available existing methods who reported their results in that scenario. + +Table 2 shows the results compared to other methods in HICO-DET and our model achieves the best results among the previous works. + +The closest work to our results is Li et al. [15] which builds on top of iCAN [4] by adding an interaction proposal network and utilizing person poses. Addition of interaction proposal and person poses improve $\sim 2$ mAP in V-COCO and $\sim 3$ mAP in HICO-DET on top of iCAN with a computational cost of calculating the poses for each human. Our model achieves better results without the pose extraction and can possibly improve another $5\%$ if the pose features are added to our visual feature branch. + +In Table 3 we report per-class performances compare with the existing methods which reported per-class APs for V-COCO. Our proposed VSGNet achieves better performance in majority of the classes compared to the other methods. Additionally, per-class performances show that + +
HOI ClassInteractNet [7]iCAN [4]VSGNet
hold-obj26.3829.0648.27
sit-instr19.8826.0429.9
ride-instr55.2361.970.84
look-obj20.226.4942.78
hit-instr62.3274.1176.08
hit-obj43.3246.1348.6
eat-obj32.3737.7338.3
eat-instr1.978.266.3
jump-instr45.1451.4552.66
lay-instr20.9922.421.66
talk_on_phone31.7752.8162.23
carry-obj33.1132.0239.09
throw-obj40.4440.6245.12
catch-obj42.5247.6144.84
cut-instr22.9737.1846.78
cut-obj36.434.7636.58
work_on_comp57.2656.2964.6
ski-instr36.4741.6950.59
surf-instr65.5977.1582.22
skateboard-instr75.5179.3587.8
drink-instr33.8132.1954.41
kick-obj69.4466.8969.85
read-obj23.8530.7442.83
snowboard-instr63.8574.3579.9
Average40.045.351.76
+ +some of the action classes perform badly due to the failure of object detectors (e.g. eat instruments which usually have small objects and commonly become occluded in the images). As our main task is to detect HOIs, we did not fine-tune the existing object detectors according to our needs which can also possibly handle these cases. + +# 4.4. Ablation Studies + +Analysis of Individual Branches: Our overall architecture consists of three main branches. To evaluate how these branches are affecting our overall performance, we evaluate these branches individually in the V-COCO [8] test set. Our evaluation method and metrics are same as Table 1. We consider the base model as the Visual branch without the spatial attention or the graph convolutions. In this setting, interaction proposal score $I_{ho}$ and the class probabilities $P_{ho}$ are predicted from the visual features $f_{ho}^{Vis}$ directly. + +We have added the graph network and the spatial network with our base model individually to evaluate each of the branch's performance separately. The results are shown in Table 4. With addition of the individual branches, model performance has improves gradually. Visual+Spatial branch achieves state of the art results by itself without the Graph branch. Addition of the graph branch adds additional 1.5 mAP and a total of 4mAP over the state of the art. + +An important detail is that the graph branch directly depends on the quality of the interaction proposal score $i_{ho}$ as it is used to determine the edge interactions. Without the spatial attention, visual features generate inferior $i_{ho}$ which + +Table 3. Per class AP comparisons to the existing methods in V-COCO Scenario 1. Our method demonstrates superior performance in majority of the classes. We only compared to the methods which have reported the per class AP values. Obj refers object cases where instr refers to instrument [8]. + +
BranchesmAP(Sc 1)mAP(Sc 2)
Visual (Base)47.352.15
Visual+Graph48.1953.12
Visual+Spatial50.3355.32
Visual+Spatial+Graph(VSG)51.7657.03
+ +Table 4. Analysis of the branches. Our base model consists of only the Visual branch. We add the graph branch and the spatial attention branch to this base model separately to analyze their performances. Individually, both branches improve the performance upon the base model. Visual+Spatial model beats the state of the art results and all three branches combined adds another $1.5\mathrm{mAP}$ . + +
BranchmAP (Scenario 1)
VGG-19[24]48.37
InceptionV3[26]49.39
SqueezeNet[11]43.4
Resnet34[10]50.88
Resnet50[10]51.01
Resnet101[10]50.01
Resnet152[10]51.76
+ +Table 5. Effects of the backbone CNN on V-COCO dataset. VSGNet is implemented using various common backbone CNNs. Resnet-152 model with VSGNet achieves the best performance. + +affects the graph branch. This is the reason that addition of Graph to Visual branch only adds $0.9\mathrm{mAP}$ whereas addition of Graph to Visual+Spat makes a larger improvement and adds $1.5\mathrm{mAP}$ . + +Spatial attention branch improves the result by $3\mathrm{mAP}$ when added to the visual branch. This demonstrates the importance of the spatial reasoning and refining the visual features. Graph and Spatial attention combined improves the performance by about $4.5\mathrm{mAP}$ over the base model. + +Analysis of Backbone CNNs: In addition to all Resnet models [10], we implement our model with various common CNNs used in image analysis. Table 5 shows the results of VSGNet implemented with these various backbone CNNs in V-COCO with Resnet152 performing the best. + +Qualitative Results: Figure 5 shows qualitative results and compares the VSGNet with the base model (Visual only). The interaction prediction probabilities for the correct action is visualized. The images show the variance in object sizes, human sizes and different interaction classes. VSGNet performs better than the base model. Even in the cases when the object is not entirely visible (image 9) or the interaction is very subtle (image 2) VSGNet performs well and improves upon the base model. + +Failure Cases: When the visual or spatial cues are confusing, the model can fail to predict the correctly. In Figure 6 a few failure cases are shown. Our method can fail if the spatial configuration is confusing (a), confusing ground truth labels (hold and carry in (b)), multiple humans interacting + +![](images/7c8bc08b4e4a9b6a7e192740ca34943c29b171e97136d5ca73ef20d05d741146.jpg) +1) Talk on Phone, 0.86 | 0.52 + +![](images/f4b15eb754bd55aaae71d6557d2d0185c5105d1d5ccd29f052a39cb26bb396d1.jpg) +2) Look_obj, 0.9 | 0.68 + +![](images/9b044cde5e7ebc2a7b599965bcd4ffdfab9cae2fbfb352846059b096d4fd523b.jpg) +3) Hold_obj, 0.67 | 0.57 + +![](images/4574b8f6d0393f99c6855c3552bbab24025bfcec35bb5b595630970474c4d46f.jpg) +4) Surf_obj, 0.85 | 0.74 + +![](images/d6da4c5ebfd6318419ad9466e82d732f7e30b2b6ed07ec38aaba9f9a12121b15.jpg) +5) Ride_obj,0.95|0.84 + +![](images/98981eb14d17c7d9ef220d0695b770d3794b6c8295b1f2fda056ea51f6acdecd.jpg) +6) Hold_obj, 0.42 | 0.07 + +![](images/9cb529b032b4364f7ab465f2b55ae860fafc16c6a0e2c63b50e0d03dca73e129.jpg) +7) Hit_insj, 0.81 | 0.62 + +![](images/b609ea06bc74a2a227e1f9c9aafc248f42bbb4c7b0c65c7dab82269c491105fb.jpg) +8) Work on Comp, 0.36 | 0.16 + +![](images/5f879b9c598902015f701f5bdddefbce5e086efe403fe8decef27dab4b6a7931.jpg) +9) Throw_obj, 0.96 | 0.41 + +![](images/7248293182c5c68f853ddd3c6928b0bceb46070d5d5c1c23fc2db6c4c903c018.jpg) +10)Sit_obj,0.63|0.36 +Figure 5. Qualitative results. Red values show the confidences for the base model (Visual only) and blue values are the results for the VSGNet. The prediction results and the correct action labels are shown for the human-object pair visualized with the bounding boxes. + +![](images/934e16f711dc5258ecb387da9512e2ebde8e2a271014cd3ac33fa3525c596b12.jpg) +(a) + +![](images/3e9d43d3087d07e4a23e2c73b27a8fc810a11f7dca8036f78af2a971d19f2f75.jpg) +(b) + +![](images/188420efb6b959b870b7efe46478c82b7c6cbbfb66082e9b1c9db24b49e49892.jpg) +(c) +Figure 6. Few of the cases where our VSGNet's prediction is wrong due to the confusing visual and spatial cue from the images. (a) Human-object pair is detected to be interacting but they are not, (b) Label mismatch (hold vs carry), (c) confusing scene and (d) object detector fails to detect the fork. + +![](images/14eb1b967814497dc8781d056f75a8399f61758d1a204f0ae36961bdaaa8008e.jpg) +(d) + +with the same object with similar spatial configuration (c), the object detector fails to detect the objects of interest (d). + +# 5. Discussions + +# 5.1. Differences with similar works + +We compare VSGNet with methods using spatial relations [1, 4, 15], attention[4] and graph convolutions[21, 14]. + +There have been previous works which use spatial relation maps such [1, 4, 15]. These methods have either used the spatial relation maps directly for classification [1] or concatenated the spatial relation features to their visual features[4, 15]. Directly using them for classification ignores the visual features which in turn only learns relationship between the interaction label and spatial configuration. Concatenation of visual and spatial relations is also inferior to our method. As these are two completely different fea + +tures defining separate things, concatenation does not enforce spatial configurations as much as an attention mechanism. In contrast, we use the spatial relations to extract attention features which are then used to alter the visual features. This is more effective as it models the relations between the visual feature channels and spatial configuration due to the element-wise multiplication. + +Attention models also have been used on HOI task. iCAN[4] model uses an attention model inspired from [29] and models the attention of the human or object region with the whole input scene individually. However, this approach does not consider the relation between the pairs and they only include the spatial configuration at the end. Our approach uses the spatial configuration directly to alter the visual features of the pairs which amplifies connected ones and dampens irrelevant ones at feature level. + +Graph convolutions [21, 14] have been effective in various tasks. These tasks learn or use visual similarity as adjacency values between nodes and extract graph features. However, for our task, interaction proposal scores already defines the adjacencies between human-object node pairs and are used as edge intensities. This approach effectively extracts graph features by traversing relevant object nodes for the humans and relevant human nodes for objects. + +# 5.2. Summary + +We presented a novel human-object interaction detection model VSGNet which utilizes Visual, Spatial and Graph branches. VSGNet generates spatial attention features which alter the visual features and uses graph convolutions to model the interactions between pairs. The altered visual features generate interaction proposal scores which are used as edge intensities between human-object node pairs. We demonstrated with thorough experimentation that VSGNet improves the performance and outperforms the state-of-the-art. + +Acknowledgements: This work is partially supported by NSF SI2-SSI award #1664172. + +# References + +[1] Yu-Wei Chao, Yunfan Liu, Xieyang Liu, Huayi Zeng, and Jia Deng. Learning to detect human-object interactions. In 2018 IEEE winter conference on applications of computer vision (wacv), pages 381-389. IEEE, 2018. 1, 2, 4, 5, 6, 8 +[2] SM Ali Eslami, Nicolas Heess, Theophane Weber, Yuval Tassa, David Szepesvari, Geoffrey E Hinton, et al. Attend, infer, repeat: Fast scene understanding with generative models. In Advances in Neural Information Processing Systems, pages 3225-3233, 2016. 1 +[3] Haoqi Fan and Jiatong Zhou. Stacked latent attention for multimodal reasoning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1072-1080, 2018. 1 +[4] Chen Gao, Yuliang Zou, and Jia-Bin Huang. ican: Instance-centric attention network for human-object interaction detection. In British Machine Vision Conference, 2018. 1, 2, 4, 5, 6, 7, 8 +[5] Ross Girshick. Fast r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 1440-1448, 2015. 5 +[6] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 580-587, 2014. 1, 2 +[7] Georgia Gkioxari, Ross Girshick, Piotr Dólar, and Kaiming He. Detecting and recognizing human-object interactions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8359-8367, 2018. 1, 2, 5, 6, 7 +[8] Saurabh Gupta and Jitendra Malik. Visual semantic role labeling. arXiv preprint arXiv:1505.04474, 2015. 1, 2, 5, 6, 7 +[9] Tanmay Gupta, Alexander Schwing, and Derek Hoiem. No-frills human-object interaction detection: Factorization, layout encodings, and training techniques. In Proceedings of the IEEE International Conference on Computer Vision, pages 9677–9685, 2019. 6 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 1, 3, 5, 6, 7 +[11] Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. SqueezeNet: Alexnet-level accuracy with 50x fewer parameters and 0.5 mb model size. arXiv preprint arXiv:1602.07360, 2016. 7 +[12] Haroon Idrees, Amir R Zamir, Yu-Gang Jiang, Alex Gorban, Ivan Laptev, Rahul Sukthankar, and Mubarak Shah. The thumos challenge on action recognition for videos “in the wild”. Computer Vision and Image Understanding, 155:1-23, 2017. 2 +[13] Alexander Kolesnikov, Alina Kuznetsova, Christoph Lampert, and Vittorio Ferrari. Detecting visual relationships using box attention. In Proceedings of the IEEE Interna + +tional Conference on Computer Vision Workshops, pages 0- 0,2019.2,6 +[14] Linjie Li, Zhe Gan, Yu Cheng, and Jingjing Liu. Relation-aware graph attention network for visual question answering. arXiv preprint arXiv:1903.12314, 2019. 4, 8 +[15] Yong-Lu Li, Siyuan Zhou, Xijie Huang, Liang Xu, Ze Ma, Hao-Shu Fang, Yanfeng Wang, and Cewu Lu. Transferable interactiveness knowledge for human-object interaction detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3585-3594, 2019. 1, 2, 5, 6, 8 +[16] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2117-2125, 2017. 2 +[17] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dálár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. 5, 6 +[18] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In European conference on computer vision, pages 21-37. Springer, 2016. 2 +[19] Xiaochen Liu, Pradipta Ghosh, Oytun Ulutan, BS Manjunath, Kevin Chan, and Ramesh Govindan. Caesar: cross-camera complex activity recognition. In Proceedings of the 17th Conference on Embedded Networked Sensor Systems, pages 232-244. ACM, 2019. 1 +[20] Hyeonseob Nam, Jung-Woo Ha, and Jeonghee Kim. Dual attention networks for multimodal reasoning and matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 299-307, 2017. 1 +[21] Siyuan Qi, Wenguan Wang, Baoxiong Jia, Jianbing Shen, and Song-Chun Zhu. Learning human-object interactions by graph parsing neural networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 401-417, 2018. 2, 4, 6, 8 +[22] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 779-788, 2016. 2 +[23] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91-99, 2015. 1, 2, 6 +[24] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 7 +[25] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. 2 +[26] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818-2826, 2016. 7 + +[27] Damien Teney, Peter Anderson, Xiaodong He, and Anton van den Hengel. Tips and tricks for visual question answering: Learnings from the 2017 challenge. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4223-4232, 2018. 1 +[28] Oytun Ulutan, Swati Rallapalli, Mudhakar Srivatsa, and BS Manjunath. Actor conditioned attention maps for video action detection. arXiv preprint arXiv:1812.11631, 2018. 1 +[29] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008, 2017. 2, 8 +[30] Jianchao Wu, Limin Wang, Li Wang, Jie Guo, and Gangshan Wu. Learning actor relation graphs for group activity recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9964-9974, 2019. 1 +[31] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In Proceedings of the European Conference on Computer Vision (ECCV), pages 418-434, 2018. 1 +[32] Dongfei Yu, Jianlong Fu, Tao Mei, and Yong Rui. Multi-level attention networks for visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4709-4717, 2017. 1 +[33] Bolei Zhou, Hang Zhao, Xavier Puig, Tete Xiao, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Semantic understanding of scenes through the ade20k dataset. International Journal of Computer Vision, 127(3):302-321, 2019. 1 \ No newline at end of file diff --git a/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/images.zip b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0629d416691ce91e6ddbd0786b3c54fea041c1f5 --- /dev/null +++ b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca2d142e4fc198f9a671f35638ed00143a6c0dbcd167c3d820ec0d02d96aa640 +size 536358 diff --git a/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/layout.json b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..11365b6391f466405dc458905623eb61c14d62e2 --- /dev/null +++ b/vsgnetspatialattentionnetworkfordetectinghumanobjectinteractionsusinggraphconvolutions/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c020811d63ab6ee9cfffbb9948c3b1abd2f2bf17c2a048a2baa58bd8c8f7ddc6 +size 413385